Toggle Flood with One Button
# Flood Coolant Toggle
net coolant-btn and2.0.in0 <= pyvcp.coolant
net coolant-ok and2.0.in1 <= halui.machine.is-on
net coolant-request toggle.0.in <= and2.0.out
net coolant-toggle toggle2nist.0.in <= toggle.0.out
net coolant-is-on toggle2nist.0.is-on <= halui.flood.is-on
net coolant-on halui.flood.on <= toggle2nist.0.on
net coolant-off halui.flood.off <= toggle2nist.0.off
The image shows the basic connections. It breaks down like this:
If the button is pushed AND the machine is on then input to toggle is on.
When toggle input is on change the output state
When toggle out is on toggle2nist input is on.
When toggle2nist in changes states
If coolant is on output off
If coolant is not on output on
John
Please Log in or Create an account to join the conversation.
gonna see if it can use it on my on/off - run/stop pyvcp button.
Great Job ! T'anks !
p.s. edited - your toggle(in file, not pic) are mismatched?
Please Log in or Create an account to join the conversation.
p.s. edited - your toggle(in file, not pic) are mismatched?
What do you mean?
John
Please Log in or Create an account to join the conversation.
for my led to change. but other then that, it works.
THANKS John !
will be testing to see it gets out of sync anywhere.
#power on/off
net power-btn and2.11.in0 <= pyvcp.on-off
net power-ok and2.11.in1 <= halui.program.is-idle
net power-request toggle.4.in <= and2.11.out
net power-toggle toggle2nist.2.in <= toggle.4.out
net power-is-on toggle2nist.2.is-on <= halui.machine.is-on
net power-on halui.machine.on <= toggle2nist.2.on
net power-off halui.machine.off <= toggle2nist.2.off
Please Log in or Create an account to join the conversation.
yours:
net coolant-request toggle.0.in <= and2.0.out
net coolant-toggle toggle2nist.0.in <= toggle.1.out
Please Log in or Create an account to join the conversation.
Thanks
John
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Not sure that I would use halui.program.is-idle for your power on/off as it is true even if the e-stop is active which means you can't turn the power on in that state. I would use halui.estop.is-activated with a not to invert the state of the pin as part of my and2.
John
cool. i'll try that.
Please Log in or Create an account to join the conversation.
and what about using iocontrol.0.user-request-enable
to change state with toggle ?
Please Log in or Create an account to join the conversation.