- Posts: 26
- Thank you received: 0
Preventing program from running while pin is asserted
6 years 11 months ago #150345
by kentavv
Preventing program from running while pin is asserted was created by kentavv
Is there a way in LinuxCNC 2.7.14 or later to prevent a program from running in Axis without out modifications of Axis or toggling machine power? Asserting halui.program.stop stops a running program but the program can be restarted while the pin is asserted. The thread below is precisely what I'm looking for, but I would rather not modify Axis in case collisions might occur during updates. The thread is from five years ago. It would be great to incorporate this idea into the distributed Axis.
forum.linuxcnc.org/21-axis/27585-enable-disable-run-button
Thank you
forum.linuxcnc.org/21-axis/27585-enable-disable-run-button
Thank you
Please Log in to join the conversation.
6 years 11 months ago #150347
by pl7i92
Replied by pl7i92 on topic Preventing program from running while pin is asserted
use pause and resume
you can have 2 buttons
or simply a toggle state on pin
its the same as a KEYswitch on the mashine
or with flipflop
and as yoiu like to combinate things
you can have 2 buttons
or simply a toggle state on pin
its the same as a KEYswitch on the mashine
or with flipflop
Code:
loadrt flipflop names=flipflop_resume,flipflop_pause
addf flipflop_resume servo-thread
addf flipflop_pause servo-thread
Code:
net button-start-pause ((your-pin)) => flipflop_pause.clk flipflop_resume.clk
net is-paused halui.program.is-paused => flipflop_resume.data flipflop_pause.reset
net is-running halui.program.is-running => flipflop_pause.data flipflop_run.reset flipflop_resume.reset
net is-idle halui.program.is-idle => flipflop_run.data
net resume flipflop_resume.out => halui.program.resume
net pause flipflop_pause.out => halui.program.pause
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
6 years 11 months ago #150367
by Todd Zuercher
Replied by Todd Zuercher on topic Preventing program from running while pin is asserted
Would motion.feed−inhibit or motion.feed−hold do what you need? but they will prevent jogging as well?
Please Log in to join the conversation.
6 years 11 months ago #150486
by kentavv
Replied by kentavv on topic Preventing program from running while pin is asserted
Something about those pins didn't work. Maybe the pendent couldn't be used? Modifying Axis worked well. It's good lesson anyway in case I'd like other changes. E.g., I'd love a large MDI screen, perhaps as one of the tabs in Axis, or an adjustable split between the MDI and the plot.
Please Log in to join the conversation.
Time to create page: 0.093 seconds
