Disable cycle start / run button until conditions are met?

More
3 years 4 months ago #273025 by chris@cnc
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 run
Code:
sudo halcompile --install not4.comp
and for the docs
​​​​​​​
Code:
sudo halcompile --install-doc not4.comp
now you can see in
​​​​​​​
Code:
man not4
the man page for how to use it or take the not4.hal file example.

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273027 by HansU

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.
That's what Rod suggested and he doesn't want.

@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.

More
3 years 4 months ago #273032 by chris@cnc
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.

More
3 years 4 months ago #273048 by MaHa
This problem is more tricky than expected.
If you are using logic with personality=0x1207  (7 input for sensor, 'or' and 'nor' output)
Code:
loadrt logic personality=0x1207 addf logic.0 servo-thread

net the sensors to logic.0.in-0n

net the output as
Code:
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.

 

 
 

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273056 by spumco
May this is where classic ladder would be useful?
  • Disconnect cycle start button from whatever hal pin you're using to start a program
  • Add a ladder rung with a bunch of NO contacts in series
  • Connect cycle start button signal to one of the NO contacts, and connect the rest of your sensors to the other contacts.
  • Rung output connected to program run hal pin (halui.program.run?)
  • Another rung the same way, except connect to program step (so the operators can't step/single-block through a program)
Ladder won't let the output go true unless all the conditions are met, and it's easier to see the connections for future modification.  Perhaps if you need to add a sensor (or bypass one).

Bonus - add a keyed switch and connect it to ladder that lets you bypass the interlock chain.

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #273060 by newbynobi
Cycle Start Button in gmoccapy is not connected in any Hal file, as the button do execute a "command run" code internal. So the button can not be disconnected without touching the gmoccapy code. 

If you want to really disable the start button for certain circumstances you will need to add a few lines of code in gmoccapy file.
IMHO the AND solution proposed is the best way to solve the descriped situation. I personally would add some user messages and with messages inform the user what sensor is not in correct position.

Norbert

Please Log in or Create an account to join the conversation.

Moderators: newbynobi, HansU
Time to create page: 0.138 seconds
Powered by Kunena Forum