How to right sequence run - pause -stop

More
19 May 2011 11:04 - 19 May 2011 11:06 #9923 by piasdom
guess it may help if you see what above looks like.

Attachments:
Last edit: 19 May 2011 11:06 by piasdom.

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

More
19 May 2011 13:05 #9926 by piasdom
found below online (www.anderswallin.net/tag/halui/) and works.
it doesn't get emc out of sync. it doesn't work on run/stop


loadrt toggle
loadrt toggle2nist

addf toggle.0 servo-thread
addf toggle2nist.0 servo-thread

net pausesig pyvcp.pausebutton toggle.0.in

net togglesig toggle.0.out toggle2nist.0.in

net toggleon toggle2nist.0.on => halui.program.pause
net toggleoff toggle2nist.0.off => halui.program.resume
net pauseison halui.program.is-paused => toggle2nist.0.is-on

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

More
19 May 2011 16:16 #9930 by BigJohnT
Great find!

However it will get out of sync if you press the button when a program is not running. What I came up with prevents the button press from getting to the toggle if the program is not running or paused by adding a couple of and2's and an or2.
# External Program Pause/Resume Button
net pause-resume-btn and2.3.in0 and2.4.in0 <= hm2_5i20.0.gpio.029.in_not
net pause-on toggle2nist.0.is-on and2.3.in1 <= halui.program.is-paused
net run-on and2.4.in1 <= halui.program.is-running
net pause-sig or2.5.in0 <= and2.3.out
net resume-sig or2.5.in1 <= and2.4.out
net toggle-ok toggle.0.in < or2.5.out
net togglesig toggle2nist.0.in <= toggle.0.out
net toggleon halui.program.pause <= toggle2nist.0.on
net toggleoff halui.program.resume <= toggle2nist.0.off

John

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

More
19 May 2011 16:52 - 19 May 2011 18:26 #9931 by piasdom
Thanks. been playing with it but never tried pausing when no program running.
it makes me hit stop to get back in sync.

p.s. i didn't read yours' completely and didn't see you already
found toggle2nist. :)

Kenneth
Last edit: 19 May 2011 18:26 by piasdom.

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

Time to create page: 0.098 seconds
Powered by Kunena Forum