2012/2/25 Lee Osborne <l...@lomach.com>: > Hi > > Can anyone help with making a user m code for a digital output on a > mesa 5i20, 7i33 and 7i37 set up. I have managed to get all the servos > working and coolant but I have extra digital outputs connected to > solenoids for a toolchanger. I have tried making an M101 file but I > cant get it to do anything. There are no error messages either so I can > only assume it is reading it but it is not changing the state of the > pin. The contents of the M101 file is below which came straight from > the manual but I have changed it from a parallel port pin to a mesa I/o > Pin. Any ideas would be great as I have tried several things and am > stuck on this one. > > #!/bin/sh > halcmd setp hm2_5i20.0.gpio.0042.out True > exit 0 >
Firstly, is it hm2_5i20.0.gpio.0042.out or hm2_5i20.0.gpio.042.out? AFAIK the pin number is 3-digit. Secondly, what do You have in HAL file? You need to specify, that gpio.042 is output pin like this: setp hm2_5i20.0.gpio.042.is_output True Thirdly, is there any particular reason not to use M commands that are dedicated for output controls from g-code? http://linuxcnc.org/docs/html/gcode_main.html#sec:M62-to-M65 Simply link the hm2_5i20.0.gpio.042.out to motion.digital-out-00 (or 01, 02 etc, if You need more outputs for M62-65 commands). http://linuxcnc.org/docs/html/config_emc2hal.html#r1_1_2 Viesturs ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users