How to right sequence run - pause -stop
- andypugh
-
- Offline
- Moderator
-
- Posts: 23377
- Thank you received: 4966
You astonish me.this works
What on earth are you trying to achieve? That makes no sense at all.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
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.
- BigJohnT
-
- Offline
- Administrator
-
- Posts: 7000
- Thank you received: 1176
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.
- piasdom
-
- Offline
- Platinum Member
-
- Posts: 469
- Thank you received: 10
piasdom wrote:
You astonish me.this works
What on earth are you trying to achieve? That makes no sense at all.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
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.
- piasdom
-
- Offline
- Platinum Member
-
- Posts: 469
- Thank you received: 10
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.
- piasdom
-
- Offline
- Platinum Member
-
- Posts: 469
- Thank you received: 10
Please Log in or Create an account to join the conversation.
- BigJohnT
-
- Offline
- Administrator
-
- Posts: 7000
- Thank you received: 1176
John
Please Log in or Create an account to join the conversation.
- BigJohnT
-
- Offline
- Administrator
-
- Posts: 7000
- Thank you received: 1176
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.
- piasdom
-
- Offline
- Platinum Member
-
- Posts: 469
- Thank you received: 10
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.
- piasdom
-
- Offline
- Platinum Member
-
- Posts: 469
- Thank you received: 10
<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.
- piasdom
-
- Offline
- Platinum Member
-
- Posts: 469
- Thank you received: 10
thought someone told me to use toggle.n
Please Log in or Create an account to join the conversation.