Momentary Switch reset

PLCfromNZ

Member
Join Date
Mar 2016
Location
NZ
Posts
27
Hi, just curious are you able to use a momentary switch to reset something, lets say a light? so the light has come on due to a previous condition in the program, are you able to switch it off with a momentary switch?

So far I'm stuck with it turning off when the momentary switch is pressed down and as soon as you let go and the switch 'opens' the light comes back on. But is it possible that just activating (closure) of the switch resets the light and doesn't come back on?
 
Is this the sort of thing you mean?
Code:
|  AlarmExists                       AlarmLight
|-----| |------------------+------------(  )---|
|                          |
|  AlarmLight    ResetPB   |
|-----| |----------|/|-----+
 
So I have a timer which activates a light at Y212-

3hAcnlRJHjA.jpg


And now I would like to turn off that light with a momentary pushbutton switch, but obviously with what i have below the light only turns off when the momentary button is pushed in, once i let go it becomes open and the light comes back on.

XDCmz2zdXoc.jpg


Is it possible for it to interpret to reset (turn off) when momentary is activated and ignore the fact that momentary comes back to open? so just the push resets
 
A quick note...

The OUT instruction works like this:
- If rung in condition is TRUE, set the attached address (in your case, Y212) to 1
- If rung in condition is FALSE, set the attached address (in your case, Y212) to 0

The RST instruction works like this:
- If rung in condition is TRUE, set the attached address (in your case, Y212) to 0
- If rung in condition is FALSE, do nothing

You typically don't use OUT and RST instructions together (there are exceptions, but this is not one of them). You use SET and RST together. SET works like RST:
- If rung in condition is TRUE, set the attached address (in your case, Y212) to 1
- If rung in condition is FALSE, do nothing

In your example above, assuming T1 is true, Y212 will be set to 1 at the end of rung 3. Then, for as long as you hold the button down, Y212 will be set back to 0 at the end of rung 5. So when you get to the end of your program scan, and the PLC writes the output states to it's hardware outputs, the output will be OFF.

But as soon as you release the button, rung 3 will still quite happily set Y212 back to 1 for as long as the T1 contact is true.

From your posts, I'm assuming that you only want the light to come on ONCE when T1 is triggered - and then, having pressed the button and turned it off, you don't want the light to come on again until T1 is reset, and then times out again. Am I right?

If so, change the OUT to a SET and use a rising edge trigger for the T1 contact. When the T1 contact goes from false to true, it will once and only once set Y212 to 1. When you press the button, it will set Y212 to 0. For Y212 to be set to 1 again, T1 will have to go from true to false and back to true again.
 
No problem!

FWIW, a simpler and more readable solution would be to just use the OUT instruction, with a hold-in contact, like the one I drew above. Just substitute your inputs and outputs accordingly, and change my "AlarmExists" tag to your rising edge off T1. Gets it all on one rung, so you can see what's going on, and gets you out of the habit of using Set/Reset instructions, which are abused terribly in most beginner's PLC programs ;)
 

Similar Topics

Hey guys, I am looking for your opinions on 3 position push pull switches. When using them for other than emergency stops, is it better to use...
Replies
4
Views
2,074
It's been a long time since I played with an old PV1000. With the momentary pushbuttons, is there really no way to let you push/hold a button...
Replies
12
Views
2,926
Hello everyone, Does anybody know if there is a way of simulating the behaviour of a FTV momentary push button on iFix? I am trying to create a...
Replies
5
Views
1,733
I have GE iFIX 6.1. I have several PBs on my screens. I use the "click" option and select ToggleDigitalPoint. But this not what i want. As i have...
Replies
5
Views
1,785
Hi All Could anyone advise me on how to protect the push button on the screen from occasional touch? I've faced up the problem that I can't...
Replies
22
Views
6,394
Back
Top Bottom