Category: Advanced Configuration
Hey Everyone,
I am working on getting a cnc mill to autoload the next part.
The general idea is a motor will turn a vise until it senses it opened. Then the spindle will use a vacuum sucker on a pneumatic cylinder (connected to the spindle head so it can move (router style)) to remove the old part, drop it off, then grab the next part, close the vise, probe the new stock and resume machining.
I can code most of the movements in a gcode subroutine but am struggling with the logic for the vise (air powered) motor and pneumatics.
hal file
# Vise Outputs
net dout-01 => hm2_7i96s.0.ssr.00.out-01
net dout-02 => hm2_7i96s.0.ssr.00.out-02
#vise sensor
net din-01 <= hm2_7i96s.0.inm.00.input-09-not
made the custom mcode that can control the output but only with the signal not the pin
#!/bin/bash
halcmd sets dout-01 True
exit 0
if i try (using the hal command in the "halshow" to test)
setp dout-01 True
or
getp din-01
I get an error that that pin doesnt exist, and with no way to read the signal that i can see in halcmd that leaves me with pins only.
linuxcnc.org/docs/html/man/man1/halcmd.1.html
to my understanding "pin" is the software component, ui button, hardware IO, etc. Signal is the wirename that connects pins together. Looking at halshow it seems like din and douts are signals not pins themselves.
So how would I create a pin? Now that i look at it again after typing all this...... seems like I could just use the pins "hm2_7i96s.0.ssr.00.out-01" directly and not rely on signals at all. Might get messy trying to remember what input/output is what without a signal.
Any help would be great. I'm open to other ways of doing this as well