How to right sequence run - pause -stop

More
04 May 2011 16:14 #9594 by piasdom
BigJohnT wrote:

You can only pause resume when running... are you in e-stop and off?


always happen went first starting emc from desktop.

And yes everything in the hal files are executed in order from top down in the order that they are called in the ini file.

Thanks

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.

More
04 May 2011 16:21 #9595 by piasdom
rearranged custom hal but still get that error. this is at the very end of custom_hal file.
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.

More
04 May 2011 16:48 #9596 by BigJohnT
Rearranging them will not stop and error.

When exactly do you get the error?

John

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

More
04 May 2011 17:00 #9597 by piasdom
when opening emc from desktop icon.

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.

More
04 May 2011 17:15 #9598 by BigJohnT
Why not just have a separate run and stop button?

John

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

More
04 May 2011 17:19 #9599 by piasdom
And yes everything in the hal files are executed in order from top down in the order that they are called in the ini file.

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.

More
04 May 2011 17:21 #9600 by BigJohnT
Yes, I think you might have misunderstood what I typed...

John

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

More
04 May 2011 17:25 #9601 by piasdom
BigJohnT wrote:

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.

More
05 May 2011 09:32 - 05 May 2011 09:49 #9607 by piasdom
as far as the run/stop button.
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 ?
Last edit: 05 May 2011 09:49 by piasdom.

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

More
05 May 2011 18:44 #9611 by piasdom
how do i use this disable pin? i added it to the xml file for Run button.
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.

Time to create page: 0.269 seconds
Powered by Kunena Forum