How to right sequence run - pause -stop

More
03 May 2011 14:38 - 03 May 2011 14:41 #9564 by piasdom
yes i had the addf(had 10 addf) and setp oneshot. changed yyour and0 and 1 to and 7 and 8. my 0 and 1 were used.
i have a led for is-paused and one for is-running. when i click my pause button, both blink 3 or 4 time and the machine
is hesitating as it moves. after about a second or two machine pauses. click again and machine starts again fine.
what's the hesitating ?
Last edit: 03 May 2011 14:41 by piasdom.

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

More
03 May 2011 14:45 - 03 May 2011 14:47 #9565 by piasdom
now clicking pause button....machine moves in jerks then stops. even clicking again, does the same.
i didn't change anything. just clicking pause in the same program.
Last edit: 03 May 2011 14:47 by piasdom.

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

More
03 May 2011 14:51 #9566 by piasdom
what i have

post hal
net pause-resume-button oneshot.0.in <= pyvcp.prog-pause
net run-status and2.6.in0 <= halui.program.is-running pyvcp.running-on
net one-shot-pr and2.6.in1 <= oneshot.0.out
net set-pause halui.program.pause <= and2.6.out

net pause-status and2.7.in0 <= halui.program.is-paused pyvcp.paused-led
net one-shot-pr => and2.7.in1
net set-run halui.program.resume <= and2.7.out

hal
loadrt oneshot count=1

addf oneshot.0 servo-thread

setp oneshot.0.width 1

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

More
03 May 2011 17:42 #9567 by BigJohnT
Looks the same as mine...

John

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

More
03 May 2011 22:51 #9575 by piasdom
at home.... will try this tomorrow. hope it helps someone.

net on-off pyvcp.on-off => toggle.0.in
net off-on toggle.0.out => halui.program.run
net off-on toggle.0.out => not.0.in
net off-btn not.0.out => halui.program.stop



found on net
net button7 joypad.button.7 => toggle.0.in
net floodOn toggle.0.out => halui.flood.on
net floodOn toggle.0.out => not.0.in
net floodOff not.0.out => halui.flood.off

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

More
04 May 2011 11:42 - 04 May 2011 11:54 #9582 by piasdom
well, it works great for pause.resume but having trouble changing mode from
auto to manual on run.stop. it'll start ok but when i click again(to stop) it says
can't change mode while in auto while interpreter is not idle. i moved mode.manual
around but not too many places i can put it. tried is-manual and others.



#program run/stop
net run-prog pyvcp.run-prog => toggle.5.in halui.mode.auto
net run-link toggle.5.out => halui.program.run
net run-link toggle.5.out => not.0.in
net stop-prog halui.program.stop => not.0.out halui.mode.manual

#pause/resume
net pause-btn pyvcp.prog-pause => toggle.4.in
net pause-link toggle.4.out => halui.program.pause
net pause-link toggle.4.out => not.1.in
net pause-resume not.1.out => halui.program.resume
Last edit: 04 May 2011 11:54 by piasdom.

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

More
04 May 2011 14:08 #9586 by BigJohnT
The run/stop would take a bit more code I think, I'll look at it when I get time. I'm sure you will have to check the state of auto and and set auto to on before you set run on. Then when you want to turn it off you will have to not set auto on...

John

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

More
04 May 2011 14:30 #9589 by piasdom
Thanks John, i don't know "when" the mode changes or
"when" to change it: will keep looking !

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

More
04 May 2011 14:55 #9592 by piasdom
and this is giving me the error msg "command(EMC_PLAN_RESUME)cannot be executed until
machine is out of E-stop and turned on. should this be lower somewhere in the custom hal
or in another custom hal ? can't figure out why this is the first command.




#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 15:27 #9593 by BigJohnT
You can only pause resume when running... are you in e-stop and off?

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.

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

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

Time to create page: 0.176 seconds
Powered by Kunena Forum