- Posts: 84
- Thank you received: 0
toggle2nist description
When is-on changes state it always drives both outputs to false. then only one toggle is allowed on in pin per attached truth table.
Looks like i'm not allowed to attach my truth table so I'll try to explain it. If in is false when is-on goes false, off goes true.If in is true when is-on goes true, on goes true.
toggle2nist description.xlsx
Here I'll try to build a table but I see the html screws up the spacing.
toggle2nist
| is-on | in | on | off | output |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | |
| 0 | 0 | 0 | 1 | note: no change |
| 0 | 1 | 0 | 2 | note: no change |
| 1 | 1 | 0 | 0 | |
| 1 | 0 | 1 | 0 | |
| 1 | 1 | 1 | 0 | no change |
Please Log in to join the conversation.
toggle2nist code ....
I hope these help.
Giorgio
Please Log in to join the conversation.
I think a better description for my understanding would be:
A reset condition occurs whenever "is-on" changes state. When in the reset condition both outputs are false.
If in the reset condition "is-on" is false, a change of state of "in" changes "on" to true.
If in the reset condition "is-on" is true, a change of state of "in" changes "off" to true.
Further changes in output will not occur until unit is reset by change of state of "is-on"
Please Log in to join the conversation.
toggle2nist can be used with a momentary push button connected to a
toggle component to control a device that has seperate on and off inputs
and has an is-on output.
If in changes states via the toggle output
If is-on is true then on is false and off is true.
If is-on is false the on true and off is false.
sorry if my comment I was upset a little ... but ... if then else or and not I think is boolean basic math not only c code ... more English is not my language .... so use the code it seems to me better.
Anyhow ... now you are solved the question??
regards
giorgio
Please Log in to join the conversation.
Please Log in to join the conversation.
I found that after pausing, 1st depress of the run/step button, the unit finishes the line of Gcode it is on, pauses, depressing it again would advance 1 step, pressing it again would not step, but make is-on change state then the further presses did nothing. pressing resume/pause at this point does resume properly.
Please Log in to join the conversation.
Please Log in to join the conversation.
I found that after pausing, 1st depress of the run/step button, the unit finishes the line of Gcode it is on, pauses, depressing it again would advance 1 step, pressing it again would not step, but make is-on change state then the further presses did nothing. pressing resume/pause at this point does resume properly.
Ok is more clear for me .... because I have the same problem ... (very rarely but I have) ... so the next week I try to understand the problem better.
Reagrds
giorgio
Please Log in to join the conversation.
jensor wrote: I used: forum.linuxcnc.org/47-hal-examples/13201...-hold-resume-buttons
I found that after pausing, 1st depress of the run/step button, the unit finishes the line of Gcode it is on, pauses, depressing it again would advance 1 step, pressing it again would not step, but make is-on change state then the further presses did nothing. pressing resume/pause at this point does resume properly.
I'll have to take a look at it, the code was provided by someone else and I only use Run and Pause/Resume no single step.
JT
Please Log in to join the conversation.
Jensor
Attachment not found
Please Log in to join the conversation.
