One button -two outputs
16 Feb 2017 21:46 #88081
by bevins
One button -two outputs was created by bevins
I am trying to get when you push one button, one output fires momentary. Push the same button a different output fires momentary.
Basically it is a flip flop. the monostable is being depricated, so I have to try and do it with the new TM timers.
But classicladder if you have two outputs the same re: two Q4, it treats it as an and. push it once you get first output push it again you get the second output and only then would you get its child contact. With regulat PLC's you can have as many outputs and anyone of them fire you get the child contact.
So I am struggling with this. Anyone have such a ladder or can I do it in HAL?
Basically it is a flip flop. the monostable is being depricated, so I have to try and do it with the new TM timers.
But classicladder if you have two outputs the same re: two Q4, it treats it as an and. push it once you get first output push it again you get the second output and only then would you get its child contact. With regulat PLC's you can have as many outputs and anyone of them fire you get the child contact.
So I am struggling with this. Anyone have such a ladder or can I do it in HAL?
Please Log in or Create an account to join the conversation.
17 Feb 2017 01:09 #88092
by bevins
Replied by bevins on topic One button -two outputs
I'll try with a counter.
Please Log in or Create an account to join the conversation.
17 Feb 2017 05:24 #88099
by cmorley
Replied by cmorley on topic One button -two outputs
monostables are not going away anytime soon - maybe never.
classicladder in linuxcnc is so old and customized I would doubt it will ever be updated,
unless it can't be supported in a new library upgrade.
( I was the last one to port it into linuxcnc - two other versions were ported before that)
If you put the EIC timer in TP mode I believe it works the same as the mono.
This is similar to what you want I think:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Classi...ret_indexing_counter
Chris M
classicladder in linuxcnc is so old and customized I would doubt it will ever be updated,
unless it can't be supported in a new library upgrade.
( I was the last one to port it into linuxcnc - two other versions were ported before that)
If you put the EIC timer in TP mode I believe it works the same as the mono.
This is similar to what you want I think:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Classi...ret_indexing_counter
Chris M
Please Log in or Create an account to join the conversation.
17 Feb 2017 14:25 - 17 Feb 2017 14:25 #88113
by BigJohnT
Replied by BigJohnT on topic One button -two outputs
Last edit: 17 Feb 2017 14:25 by BigJohnT.
Please Log in or Create an account to join the conversation.
17 Feb 2017 15:15 - 17 Feb 2017 15:16 #88114
by BigJohnT
Replied by BigJohnT on topic One button -two outputs
Last edit: 17 Feb 2017 15:16 by BigJohnT.
Please Log in or Create an account to join the conversation.
19 Feb 2017 16:48 #88277
by bevins
Replied by bevins on topic One button -two outputs
This kind of works but sometimes it doesn't flip it just energizes the same output. It will energize the same output twice and I cannot figure out why. The logic looks correct.
Please Log in or Create an account to join the conversation.
19 Feb 2017 18:11 #88281
by cmorley
Replied by cmorley on topic One button -two outputs
switch bounce?
Please Log in or Create an account to join the conversation.
19 Feb 2017 22:06 - 19 Feb 2017 22:07 #88305
by bevins
Replied by bevins on topic One button -two outputs
Last edit: 19 Feb 2017 22:07 by bevins.
Please Log in or Create an account to join the conversation.
19 Feb 2017 23:03 #88308
by bevins
I shortened the delay drastically and it seemed to have worked.
Replied by bevins on topic One button -two outputs
switch bounce?
I shortened the delay drastically and it seemed to have worked.
Please Log in or Create an account to join the conversation.
Time to create page: 0.139 seconds