ozturbo
07-03-2008, 10:03 AM
Hello,
I have what may be a dumb question, I have read through the entire Hal tutorial
and looked at all the configuration files for setting up the Mesa 5i20 but I can't figure out how to assign certain pins to functions. Say I want to have pin 1 and 2 for the estop circuit on the 7i37. How do I do this?
I'm not exactly sure what you're asking, but I'll try to answer. :)
I assume you're using the m5i20 driver with the Hostmot-4 firmware. The pinouts are given in the EMC2 Integrator Manual (http://www.linuxcnc.org/docs/devel/EMC2_Integrator_Manual.pdf), in section 15.5.4. Looks like P3 and P4 have the digital I/O pins.
The physical pins on the connector are mapped to HAL pins. For example, pin 1 on P3 is mapped to the HAL pin called "in-00", and pin 33 on P3 is mapped to "out-00".
Does that help?
ozturbo
07-03-2008, 06:33 PM
I guess maybe I just have more reading, I kept looking for something like choosing pin 2 on P3 is estop and pin 4 on P3 is x home or something, like how i setup the pins in mach 3.
ozturbo
07-03-2008, 09:31 PM
Ok so I reread the section you provided, I think I understand better the hal code would be something like this correct? m5i20.1.digital-in-00, if it is correct how would I then make emc recognize this as the estop circuit. Thanks
E-stop pins are in section 5.3 of the EMC2 Integrator Manual I pointed you to before. You should read that document and the HAL User Manual (http://www.linuxcnc.org/docs/devel/HAL_User_Manual.pdf) cover to cover, it should help you get started.
So for example, if you wanted a digital input pin on the 7i37 to signal an externally-detected E-stop condition to EMC, you'd tell HAL something like this:
net estop m5i20.0.in-00 => iocontrol.emc-enable-in
That assumes the external estop is active high. If the digital input goes low, the emc-enable-in pin will go low and estop emc. Use m5i20.0.in-00-not if the external signal is active low.
Similarly for emc signaling estop out:
net iocontrol.user-enable-out => m5i20.0.out-00
user-enable-out is high when emc (or the emc user) wants the machine to be running, and low when emc wants to estop the machine.
I just noticed that there are some m5i20 pins for estop, but I dont know what they do.
Hope this helps, you might try asking on the emc-users (https://lists.sourceforge.net/lists/listinfo/emc-users) mailing list if you have more questions, it gets more eyeballs than this forum.
ozturbo
07-23-2008, 11:20 AM
Ok, I have one last question, I hope. I wired the estop as the pinout says to in the 5120 file but if I press the button emc doesn't recognize anything happened.
Do i need power in the circuit?
PCW_MESA
07-23-2008, 09:51 PM
Ok, I have one last question, I hope. I wired the estop as the pinout says to in the 5120 file but if I press the button emc doesn't recognize anything happened.
Do i need power in the circuit?
A couple of things:
The 7I37 inverts input signals so you may need to invert the sense of the input logic (use the .not input)
and yes, the 7I37 inputs sense voltage so you must supply an external voltage (4 to 24 VDC) to the input pins for the input to be detected. Also the 7I37 inputs are polarized, reversed inputs will not work.
Peter Wallace