- Posts: 19
- Thank you received: 3
how to pause program through input pin?
8 years 9 months ago - 8 years 9 months ago #104889
by IrishMoss
how to pause program through input pin? was created by IrishMoss
Hi, HAL noob here. 
I'm trying to initiate a program pause in my setup, though one of the input pins.
I have a tb6560 variant, and have already successfully configured a limit/home switch through one of the input pins, so I know they work on the board.
I currently have pin 12 connected to a relay switch, and I'd like the program to pause when the relay opens.
Here's what I've added to my hal file:
net halui.program.pause <= parport.0.pin-12-in
(i've also tried it inverted with 'pin-12-in-not', and it didn't help)
Unfortunately, when the relay triggers, nothing happens.
I'm sure I'm missing something obvious. Is there something additional i need to add to the ini to make this work?
Thanks.
I'm trying to initiate a program pause in my setup, though one of the input pins.
I have a tb6560 variant, and have already successfully configured a limit/home switch through one of the input pins, so I know they work on the board.
I currently have pin 12 connected to a relay switch, and I'd like the program to pause when the relay opens.
Here's what I've added to my hal file:
net halui.program.pause <= parport.0.pin-12-in
(i've also tried it inverted with 'pin-12-in-not', and it didn't help)
Unfortunately, when the relay triggers, nothing happens.
I'm sure I'm missing something obvious. Is there something additional i need to add to the ini to make this work?
Thanks.
Last edit: 8 years 9 months ago by IrishMoss.
Please Log in or Create an account to join the conversation.
- skunkworks
- Offline
- Moderator
-
Less
More
- Posts: 351
- Thank you received: 153
8 years 9 months ago #104891
by skunkworks
Replied by skunkworks on topic how to pause program through input pin?
Are you sure that is your exact line? Net format is
net signal pin pin pin and so on.
It would be something like
net pause halui.program.pause parport.0.pin-12.in
could we see your hal file?
net signal pin pin pin and so on.
It would be something like
net pause halui.program.pause parport.0.pin-12.in
could we see your hal file?
Please Log in or Create an account to join the conversation.
8 years 9 months ago #104893
by IrishMoss
Replied by IrishMoss on topic how to pause program through input pin?
I'm attaching my HAL file, but there's no references to that pin in it. I've been putting the changes in the custom.hal file, and it only had that one line.
I thought I needed "net halui.program.pause <= parport.0.pin-12-in" to reference the pause operation to pin 12
I replaced it with "net pause halui.program.pause parport.0.pin-12.in", but then linuxcnc bombs out with:
./custom.hal:6: Pin 'halui.program.pause' does not exist
I know I'm missing something obvious here, as I've only just started dipping into this custom hal stuff.
I thought I needed "net halui.program.pause <= parport.0.pin-12-in" to reference the pause operation to pin 12
I replaced it with "net pause halui.program.pause parport.0.pin-12.in", but then linuxcnc bombs out with:
./custom.hal:6: Pin 'halui.program.pause' does not exist
I know I'm missing something obvious here, as I've only just started dipping into this custom hal stuff.
Please Log in or Create an account to join the conversation.
- skunkworks
- Offline
- Moderator
-
Less
More
- Posts: 351
- Thank you received: 153
8 years 9 months ago #104894
by skunkworks
Replied by skunkworks on topic how to pause program through input pin?
Great - so I think what you are missing is the
HALUI = halui in the [hal] section of your ini file.
linuxcnc.org/docs/2.6/html/config/ini_co...id_sub_hal_section_a
HALUI = halui in the [hal] section of your ini file.
linuxcnc.org/docs/2.6/html/config/ini_co...id_sub_hal_section_a
Please Log in or Create an account to join the conversation.
8 years 9 months ago #104897
by IrishMoss
Replied by IrishMoss on topic how to pause program through input pin?
wow, that was a lot easier than expected. I knew it was something simple. 
The past few weeks have been like drinking cnc information from a firehose! But it's oh so satisfying when you get things working the way you want.
Thanks for the help!
The past few weeks have been like drinking cnc information from a firehose! But it's oh so satisfying when you get things working the way you want.
Thanks for the help!
Please Log in or Create an account to join the conversation.
8 years 7 months ago #107198
by davidcnc
Replied by davidcnc on topic how to pause program through input pin?
New client. I currently comand a hydraulic cylinder to move. Then next line G4 P2.5 then the next line completes the next operation.
In your answer I thought why not use 2p micro, switching states, at end of travel going in to pin 12.
Would the following work???
net pause hauli.program.pause parport.0.pin-12-in ( to replace G4 Pxxxx)
# at end of travel & state change.
net pause hauli.program.pause parport.0.pin-12-in-not (continue program execution)
Dave N.
In your answer I thought why not use 2p micro, switching states, at end of travel going in to pin 12.
Would the following work???
net pause hauli.program.pause parport.0.pin-12-in ( to replace G4 Pxxxx)
# at end of travel & state change.
net pause hauli.program.pause parport.0.pin-12-in-not (continue program execution)
Dave N.
Please Log in or Create an account to join the conversation.
Time to create page: 0.062 seconds