On 24 November 2010 13:32, ELHIMA Moustapha <melh...@yahoo.com> wrote:
> If it's possible to make in the M101 file hal command who can unlink my > ports and hook them to the C axis ? One solution would be to run an extra stepgen so that there is a position-mode one linked to the C-axis position and a Velocity mode one linked to spindle-speed-out. (looking at the quoted email it seems you already have this). You would then need to switch which stepgen is linked to the parallel port pins. This could be done most neatly with a bit-mode mux2 component, but as there isn't one a slightly less elegant solution will be needed using an assortment of and2, invert and or2 components (alternatively it would be very easy to create a logic-level, base-thread compatible mux2 based on the existing one) loadrt and2 count=4 loadrt or2 count=2 loadrt invert count=1 addf and2.0 base-thread addf and2.1 base-thread addf and2.2 base-thread addf and2.3 base-thread addf or2.0 base thread addf or2.1 base thread addf invert.0 servo-thread net inv motion.digital-out-00 => invert.0.in and2.0.in1 and2.2.in1 net vmode invert.0.out => and2.2.in1 and2.3.in1 net p-step stepgen.2.step => and2.0.in0 net v-step stepgen,3.step => and2.1.in0 net p-dir stepgen.2.dir => and2.2.in0 net v-dir stepgen.3.dir => and2.3.in0 net pstep-sw and2.0.out => or2.0.in0 net vstep-sw and2.1.out => or2.0.in1 net pdir-sw and2.2.out => or2.1.in0 net vdir-sw and2.3.out => or2.1.in1 net sel-step or2.0.out => parport.0.pin-NN-out net sel-dir or2.1.out => parport.0.pin-NN-out That should allow you to switch from one mode to another with M64 P0 and back with M65 P0 Note that this is written by hand with no access to EMC2, so pin names and underlying logic can not be guaranteed. If it was my machine I think I would write it all in a comp. -- atp ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers