How to right sequence run - pause -stop
You can only pause resume when running... are you in e-stop and off?
always happen went first starting emc from desktop.
ThanksAnd yes everything in the hal files are executed in order from top down in the order that they are called in the ini file.
To never get that error you would have to add code to check that your in run or pause before doing the halui.program.pause and halui.program.resume.
John
great more to learn SCRIPT ? only heard of such a thing.
Please Log in or Create an account to join the conversation.
so you mean they are loaded in "this" order ? with jog,leds and other stuff above this loading first ?
#estop/reset
net estop-btn == toggle.0.in pyvcp.abort-button
net btn-estop toggle.0.out iocontrol.0.emc-enable-in
#power on/off
net on-btn toggle.1.in == halui.machine.on pyvcp.mach-on
net off-btn toggle.1.out == pyvcp.selectimage halui.machine.off
#=============================================================================
#program run/stop needs work
net run-prog pyvcp.run-prog => toggle.2.in halui.mode.auto
net run-link toggle.2.out => halui.program.run
net run-link toggle.2.out => not.0.in
net stop-prog not.0.out => halui.program.stop
#=======================================================================
#pause/resume
net pause-btn pyvcp.prog-pause => toggle.3.in
net pause-link toggle.3.out => halui.program.pause
net pause-link toggle.3.out => not.2.in
net pause-resume not.2.out => halui.program.resume
Please Log in or Create an account to join the conversation.
When exactly do you get the error?
John
Please Log in or Create an account to join the conversation.
but i found if i disable the first line in below all works. it even starts as fast as it use to.(another problem for later)
my pyvcp button doesn't work and the run/stop still gives that error.
#pause/resume
#net pause-btn pyvcp.prog-pause => toggle.3.in
net pause-link toggle.3.out => halui.program.pause
net pause-link toggle.3.out => not.2.in
net pause-resume not.2.out => halui.program.resume
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
i rearranged them because of above. did i misunderstand that ?
Rearranging them will not stop an error.
When exactly do you get the error?
John
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
Why not just have a separate run and stop button?
John
i guess i'll do that till i learn more better about this.
Thanks
Please Log in or Create an account to join the conversation.
i got this to work,(don't know how) but if i click too fast/slow i get error msg....
can't do that(EMC_TRAJ_SET_TELEOP_ENABLE)in auto mode
with the interpreter idle. but if i click just right both work.
net run-prog pyvcp.run-prog => halui.program.run halui.mode.auto halui.program.stop
p.s. this confuses me to no end, why or how can this work
when toggle,not and or couldn't(i couldn't) get it to work.
i just want a simple run btn and stop btn. two btn would be
ok as well. as with pause/resume. will 2.5 be easier ?
more better . . will halui be easier ?
Please Log in or Create an account to join the conversation.
does it need to be it the hal file also ? Thanks
A text button controls a "bit" halpin. The halpin is false until the button is pressed then it is true. The button is a momentary button.
The text button has an optional disable pin that is created when you add <disable_pin>True</disable_pin>.
<button>
<halpin>"ok-button"</halpin>
<text>"OK"</text>
</button>
<button>
<halpin>"abort-button"</halpin>
<text>"Abort"</text>
</button>
Please Log in or Create an account to join the conversation.