How to right sequence run - pause -stop

More
27 Apr 2011 15:21 #9402 by andypugh
piasdom wrote:

this works

You astonish me.

net pause-btn toggle.0.in == pyvcp.prog-pause
net pause-btn toggle.0.in halui.program.pause
net all-paused toggle.0.out halui.program.resume

What on earth are you trying to achieve? That makes no sense at all.

The idea of toggle is that the output switches state every time you press the button. You would connect the input to the pyvcp button, and the output to the thing you want to switch.
To resume after pause, you would use an inverted version of the toggle output (which I am slightly surprised isn't a pin on the component). You can get the inverted value using:
www.linuxcnc.org/docview/html/man/man9/not.9.html
Which has an output of false if the input is true, and vice-versa.

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

More
27 Apr 2011 15:24 #9403 by BigJohnT
Nope only one shows depending on the state of the control pin.

halui.program.run will only work when the machine is in the auto mode.

John

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

More
27 Apr 2011 15:43 #9405 by piasdom
andypugh wrote:

piasdom wrote:

this works

You astonish me.

net pause-btn toggle.0.in == pyvcp.prog-pause
net pause-btn toggle.0.in halui.program.pause
net all-paused toggle.0.out halui.program.resume

What on earth are you trying to achieve? That makes no sense at all.

The idea of toggle is that the output switches state every time you press the button. You would connect the input to the pyvcp button, and the output to the thing you want to switch.
To resume after pause, you would use an inverted version of the toggle output (which I am slightly surprised isn't a pin on the component). You can get the inverted value using:
www.linuxcnc.org/docview/html/man/man9/not.9.html
Which has an output of false if the input is true, and vice-versa.


they say people that know a little about a lot are dangerous
i'll look into this :)

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

More
27 Apr 2011 15:45 #9406 by piasdom
BigJohnT wrote:

Nope only one shows depending on the state of the control pin.

halui.program.run will only work when the machine is in the auto mode.

John


is it in auto mode when i press axis run button ? that's when i'm
pressing pyvcp button.

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

More
27 Apr 2011 15:47 #9407 by piasdom
got his but have "NO" idea for to link to pyvcp. use <halpin>'selectimage'</halpin> ?

<image name='on' file='on.gif'/>
<image name='off' file='off.gif'/>
<vbox>
<image_bit halpin='selectimage' images='on off'/>
</vbox>

Attachments:

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

More
27 Apr 2011 15:49 #9408 by BigJohnT
Nope, you have to use halui.mode.auto which is the pin for requesting auto mode then to verify that auto mode is on check halui.mode.is-auto, if it is then you can press the run button.

John

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

More
27 Apr 2011 15:51 #9409 by BigJohnT
piasdom wrote:

got his but have "NO" idea for to link to pyvcp. use <halpin>'selectimage'</halpin> ?

<image name='on' file='on.gif'/>
<image name='off' file='off.gif'/>
<vbox>
<image_bit halpin='selectimage' images='on off'/>
</vbox>


You could use halui.machine.is-on to toggle the images.

John

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

More
27 Apr 2011 15:51 #9410 by piasdom

net pause-btn toggle.0.in == pyvcp.prog-pause
net pause-btn toggle.0.in halui.program.pause
net all-paused toggle.0.out halui.program.resume


What on earth are you trying to achieve? That makes no sense at all.

trying to get a one button to pause and resume.
lick click once = pause
click same button again = resume

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

More
27 Apr 2011 15:55 #9411 by piasdom
<image name='on' file='on.gif'/>
<image name='off' file='off.gif'/>
<vbox>
<image_bit halpin='selectimage' images='on off'/>
</vbox>

[/quote]
You could use halui.machine.is-on to toggle the images.
John[/quote]

i'm having trouble seeing where to link 'selectimage' to halui.machine.is-on.
do i use 'selectimage' or the whole thing <image_bit halpin='selectimage' images='on off'/> ?
what to use as the <halpin> ???? </halpin> ?
<halpin> 'selectimage' </halpin> ?????
i meant i have no idea what the pin is.

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

More
27 Apr 2011 16:41 #9412 by piasdom
so toggle.n and not.n are not the same ?
thought someone told me to use toggle.n

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

Time to create page: 0.103 seconds
Powered by Kunena Forum