Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

toggle"momentary input" to switch output on/off 1

Status
Not open for further replies.

controlit

Industrial
Nov 28, 2007
1
0
0
US
I have been programming PLC's for 10 years,and was ask to program a "SINGLE" toggle input "momentary input" to control an "SINGLE" output(no big deal so far)except for the same "SINGLE"toggle input "momentary input" is to turn on and off the same "SINGLE" output,hence "can not use counters". Control Description(1), press the "SINGLE" toggle "momentary input" and instantly the "SINGLE" output is true or press the "SINGLE" toggle and the "SINGLE" toggle remains press for as long as desired and the "SINGLE" output is instantly true and remains true after the release of the"SINGLE" toggle.Control Description(2),Knowing the "SINGLE" output is now true after reading (control desciption 1)the same "SINGLE" toggle "momentary input" is to turn off the same "SINGLE"output. The pressing action of the "SINGLE" toggle desrcibed in (contol description 1) applies in (control description2).
Please forward and/or post your advice.
 
Replies continue below

Recommended for you

If I understand you correctly, it would seem that using Latch or Set relays would provide a solution. When the input goes true, use a one-shot to make a Latch relay go true. When the input goes false with the first latch relay on, Set a second latch relay on. With either latch relay on, turn on the output. Now, using another one-shot, program the unlatch relays (for both latched relays) to turn on when the input goes true. Input goes true, output cuts on. Input goes false, output stays on. Input goes true again, unlatch relays unlatch and output turns off. Input goes false again, output is off. The latch relays prevent relay chatter while the switch is on. I am not sure which PLC you may be using but if I managed to mangle that explanation, repost or email me.
 
I left out the part in CAPS on my first post. Sorry. If I understand you correctly, it would seem that using Latch or Set relays would provide a solution. When the input goes true, use a one-shot to make a Latch relay go true. When the input goes false with the first latch relay on, Set a second latch relay on. With either latch relay on, turn on the output. Now, using another one-shot, program the unlatch relays (for both latched relays) to turn on when the input goes true AND BOTH LATCH RELAYS ARE ON. Input goes true, output cuts on. Input goes false, output stays on. Input goes true again, unlatch relays unlatch and output turns off. Input goes false again, output is off. The latch relays prevent relay chatter while the switch is on. I am not sure which PLC you may be using but if I managed to mangle that explanation, repost or email me.
 
thats funny, I just got done doing this same thing

asc code
xic your_pb oneshot your_oneshot NOT(word_dint[1], word_dint[1])
Use the word_dint.x to light your_pb output

when you press the pb the NOT should fill the word_dint[1]=-1, then press it again and the word_dint[1]=0

have fun
 
OK, mine was for a single bit operating a single output.

Press 1 - Output goes on
Press 2 - Output goes off
Press 3 - Output goes on (etc etc)


and yours does similar, but the output is a SINT, INT or DINT, in other words multiple bits.
 
Here is a solution that doesn't rely on special instructions, so it is directly portable to all PLC's that use ladder programming. It's not easy to follow, but it works

Input Output R1
-| |---+---|/|---+--------------( )--
| |
R1 | Input |
-| |---+---|/|---+

Input R1 Output
-|/|---+---| |---+--------------( )--
| |
Output | Input |
-| |---+---| |---+
 
this worked for me quite well. the only issue is that the output is not retentive on power cycle. if the output is true and power is cycled, it will return to false.

input_pb one_shot one_shot_fired
--||-----------(ONS)----------------------( )

one_shot_fired output output
--||---------------|/|--------------------( )
| |
| |
| one_shot_fired output |
--|/|--------------||-----
 
Status
Not open for further replies.
Back
Top