Disable cycle start / run button until conditions are met?
06 Jun 2023 05:08 #272997
by pseudo
Disable cycle start / run button until conditions are met? was created by pseudo
Hi all, I've searched for a while but can't find any info on how to do this, if there's a resource I missed please link me.
On my machine I have a few sensors for whether the operator has folded some fixtures away and I'd like to allow the machine to be on/jogging enabled etc but prevent starting a job if the sensors report that the fixtures are still out. How would I do this?
Basically I'd like to disable the start button until sensors A, B, and C report ok.
On my machine I have a few sensors for whether the operator has folded some fixtures away and I'd like to allow the machine to be on/jogging enabled etc but prevent starting a job if the sensors report that the fixtures are still out. How would I do this?
Basically I'd like to disable the start button until sensors A, B, and C report ok.
Please Log in or Create an account to join the conversation.
06 Jun 2023 09:32 #272999
by rodw
Replied by rodw on topic Disable cycle start / run button until conditions are met?
You can either physically add your sensors to your estop chain or you can build your estop chain in software with the estop-latch component.
There is an example in the forum here under hal examples of using estop-latch but it only uses 1 estop but chaining them together is the way to solve this.
There is an example in the forum here under hal examples of using estop-latch but it only uses 1 estop but chaining them together is the way to solve this.
Please Log in or Create an account to join the conversation.
06 Jun 2023 11:19 #273007
by pseudo
Replied by pseudo on topic Disable cycle start / run button until conditions are met?
Sorry, I should've been clearer; I don't want to estop the machine, i want the user to be able to jog the machine around and do all the normal manual things, I only want to disable starting an NC file.
It's more than just fixtures (it's about 7 sensors), it's also stuff like whether the door is shut - the user may need to move the machine with the door open, but shouldn't be able to start a job with the door open.
How would I do that?
It's more than just fixtures (it's about 7 sensors), it's also stuff like whether the door is shut - the user may need to move the machine with the door open, but shouldn't be able to start a job with the door open.
How would I do that?
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18563
- Thank you received: 6219
06 Jun 2023 12:02 #273009
by tommylight
Replied by tommylight on topic Disable cycle start / run button until conditions are met?
On the phone so might wana double check this.
LinuxCNC has pins for
mode.is.auto
mode.is.manual
mode.is.mdi
Or similar, also has state pins, but Rod knows that much better.
Basicaly you would just need it to not go into auto mode, the rest seems ok from your explanation.
LinuxCNC has pins for
mode.is.auto
mode.is.manual
mode.is.mdi
Or similar, also has state pins, but Rod knows that much better.
Basicaly you would just need it to not go into auto mode, the rest seems ok from your explanation.
Please Log in or Create an account to join the conversation.
06 Jun 2023 17:54 #273018
by HansU
Replied by HansU on topic Disable cycle start / run button until conditions are met?
Hmm I only could imagine to play with the homed state. So unhome the machine if one of the sensors A,B or C is not ok, otherwise home the machine. Not ideal but I have no better idea.
Please Log in or Create an account to join the conversation.
06 Jun 2023 18:30 #273024
by Aciera
Replied by Aciera on topic Disable cycle start / run button until conditions are met?
Maybe you could link your fixture sensors to the estop chain in hal to have them trigger an estop UNLESS mode-is.manual is true.
Please Log in or Create an account to join the conversation.
06 Jun 2023 18:32 #273025
by chris@cnc
Replied by chris@cnc on topic Disable cycle start / run button until conditions are met?
I think there are two options.
Hardware solution:
Use a separate push button for cycle start and connect all your sensors in line with it.
Software solution:
Write a custom comp like this not4 example and connect with halui.program.stop. If one of your sensor goes, off stop the program. To install this comp save file not4.comp in your folder and runand for the docs
now you can see in
the man page for how to use it or take the not4.hal file example.
Hardware solution:
Use a separate push button for cycle start and connect all your sensors in line with it.
Software solution:
Write a custom comp like this not4 example and connect with halui.program.stop. If one of your sensor goes, off stop the program. To install this comp save file not4.comp in your folder and run
sudo halcompile --install not4.comp
sudo halcompile --install-doc not4.comp
man not4
Please Log in or Create an account to join the conversation.
06 Jun 2023 18:55 #273027
by HansU
@Chris
I also thought about to immediately stop the program when one of the sensors is not ok.
But the start button would be clickable in this case.
Instead of compiling not4, this could be also done with lut5 linuxcnc.org/docs/2.9/html/man/man9/lut5.9.html
Replied by HansU on topic Disable cycle start / run button until conditions are met?
That's what Rod suggested and he doesn't want.Maybe you could link your fixture sensors to the estop chain in hal to have them trigger an estop UNLESS mode-is.manual is true.
@Chris
I also thought about to immediately stop the program when one of the sensors is not ok.
But the start button would be clickable in this case.
Instead of compiling not4, this could be also done with lut5 linuxcnc.org/docs/2.9/html/man/man9/lut5.9.html
Please Log in or Create an account to join the conversation.
06 Jun 2023 19:58 #273032
by chris@cnc
Replied by chris@cnc on topic Disable cycle start / run button until conditions are met?
I look at lut5 several times but get a headache with this feature. too much for a mechanic's mind.
Please Log in or Create an account to join the conversation.
07 Jun 2023 00:33 #273048
by MaHa
Replied by MaHa on topic Disable cycle start / run button until conditions are met?
This problem is more tricky than expected.
If you are using logic with personality=0x1207 (7 input for sensor, 'or' and 'nor' output)
net the sensors to logic.0.in-0n
net the output as
It will inhibit spindle and feed, if a program is started, nothing happens. The dangerous about that, when all the sensors are released, the machine starts running, But it doesn't, because the 'nor' output is linked to 'halui.program.stop' and will stop any started - and movement inhibited program.
If you are using logic with personality=0x1207 (7 input for sensor, 'or' and 'nor' output)
loadrt logic personality=0x1207
addf logic.0 servo-thread
net the sensors to logic.0.in-0n
net the output as
net inhbt logic.0.or
net inhbt spindle.0.inhibit
net inhbt motion.feed-inhibit
net p_stop logic.0.nor halui.program.stop
It will inhibit spindle and feed, if a program is started, nothing happens. The dangerous about that, when all the sensors are released, the machine starts running, But it doesn't, because the 'nor' output is linked to 'halui.program.stop' and will stop any started - and movement inhibited program.
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.222 seconds