Non-retentive SET and RESET coil basic question...

timothy585

Supporting Member
Join Date
Apr 2021
Location
Cajun Country
Posts
47
GE 90-30 using ME 6.0 -

Newbie question...

Let's say on rung 10 I set a coil (S) with a one-shot. Input to coil drops out, but coil stays energized, no problem.

Further down in the logic, rung 15, the same coil is reset (R).

Will the (S) coil in rung 10 still appear energized, even though I reset it in rung 15, or should it turn off immediately in the logic on rung 10?

Thanks.
 
If it was Set then Reset 6 rungs later it would not show as ON at the end of the program scan.


If the bit was checked in between 10 & 15 then that rung would treat it as TRUE, but rungs after 15 would see FALSE. And the online monitoring by programming software and any HMI would never see it as ON.
 
You have to remember how a program scans in normal operation, it scans from top to bottom so yes the coil will be reset in other words (assuming the reset is on the same scan i.e. the logic that resets it is true in that scan) so in effect the latch gets set on rung 10 & stays on until rung 15 so if that coil is used to trigger something else between rungs 10 & 15 it will be true but from the end of rung 15 to the end of the program it will be false.
 
That's what I thought. Both SET and RESET coils are looking at the same BOOLEAN bit, so it can't be both on and off at the same time.

Thanks.
 
Also it does not matter if the bit is retentive or not, retentive means if the PLC is switched off it will return to it's previous state i.e. if set then will stay set unless turned off, however, non-retentive will reset if powered down.
Also a set/reset in the same scan is a bit like a one shot but instead of turning on for one scan it is reset before the end of scan, often used as a toggle bit i.e. making a button a two state so 1 press for on & another press for off.
 
Thanks parky, I think you're on to something with what I'm trying to figure out.

First I apologize for the horrible picture of the logic. PAC ME is running on an older VM engineering workstation and I have no way of printing or exporting this file to my thumb drive, so a picture is the best I could do.

Rung 351 uses two one-shots (M04126 & M04129) to SET Q00231.

The very next Rung 352 use two NO contacts (Same M04126 & M04129) and a 2-sec timer to RESET Q00231.

Backstory is the two E-Shutdown inputs are used to shunt-trip a breaker (Q00231) when SET.

Of course there is a lot more going on, but I cannot figure out the purpose of these two consecutive rungs.

Thanks.

One-shot Set and Reset.jpg
 
Just so you're aware, using Estops like this does not comply with current safety standards.

The way it is written here, once an input is triggered, the shunt relay is tuned on. After 2 seconds of the same input being high, the output is reset.

Not a very nice way of doing this at all, an potentially cause issues.

first I see, is if an input isn't high for >2s then the output doesn't reset. Will that burn out the shunt coil?
 
Appreciate the feedback. I didn't write this code, it was written by another company for my current customer and has been in service in it's current config for about 20 years.

So, I was right in being a little confused as to why it was programmed like this.
 
first I see, is if an input isn't high for >2s then the output doesn't reset. Will that burn out the shunt coil?


I would change rung 352 to check if the latched output is ON and have the output reset itself.


The way this is the output would show online as ON for the 2 seconds, as it isn't reset the same scan.
 
I would change rung 352 to check if the latched output is ON and have the output reset itself.


The way this is the output would show online as ON for the 2 seconds, as it isn't reset the same scan.

Agreed, a better solution would be to also include feedback from the shunt trip, that way using the timer would be a backup.

I would reiterate though, this isn't safety rated.
 
So, I was right in being a little confused as to why it was programmed like this.


With you there.

I guess the key question is, what is the behavior of the output rung of the TMR instruction?

  • If the TMR output rung is the timer .Q (timer expiry)
    • similar to say Siemens TIA portal,
    • then we will see this odd behavior where the Q00231 is not reset unless one of the one-shot inputs (%M04126 or %M4129) remains 1 for 2s.
  • If the TMR output rung is the timer .EN (timer enabled; mirror of input rung),
    • similar to say Rockwell RSLogix,
    • then the TMR .Q, if used elsewhere, is essentially a debounce of the inputs,
    • although there is still odd behavior: the Q00231 bit will immediately reset i.e. on the same scan it was set. So what is the purpose of Q00231 in that case?
 
I would reiterate though, this isn't safety rated.


If this is indeed part of an E-Stop (and not, say, some non-critical secondary logging of an E-Stop event), it may be best to put the other concerns aside and address this first.

Maybe dealing with the safety issues addresses the other concerns and maybe it does not, but if something goes south and the lawyers find this thread, ...
 
If this is indeed part of an E-Stop (and not, say, some non-critical secondary logging of an E-Stop event), it may be best to put the other concerns aside and address this first.

Maybe dealing with the safety issues addresses the other concerns and maybe it does not, but if something goes south and the lawyers find this thread, ...


My take from the OP is trips the power breaker to kill power (to motors, heaters, etc.) at an E-stop.


My way would be remove this from the PLC and have the E-stop itself trip the breaker shunt using the power provided by that breaker, so when the breaker trips it can't power the shunt anymore.


But you have to make sure that turning the breaker back ON doesn't repower the shunt and trip it again, unless the E-stop has to be reset first and doesn't rely on this being on. If the E-stop loop needs this breaker ON then something like another safety relay and timer would be needed.


As far as "if something goes south and the lawyers find this thread, ..." you have had your hands in this control and any lawyer will add you to the list of defendants. Plus if you see a safety issue and 'let it ride' you can really be liable. I have told customers at this point something has to be done for safety (in writing) and if not I walk away without taking on the liability.
 
Please relax on the legal. I didn't write the code, test the code, FAT with the customer, etc. I didn't modify the code. I'm simply in monitor mode looking at the logic while troubleshooting other issues and noticed this didn't look quite right.

I shoot of an email to the customer and their I&E contract company who did write the code telling them they may want to take a look at this and I'll be fine.
 

Similar Topics

Been a long time since I've posted, but here we go. Started a new role in august and progressively learning about Codesys programming in...
Replies
2
Views
1,129
Hello guys, I am currently looking through some examples of how timers work, but this ladder logic diagram gets me really confused. Once I:1/0 is...
Replies
2
Views
1,819
I have a question about the TOFR instruction, a non-retentive timer that accumulates when the input bit goes low. For me this is in Rockwell's...
Replies
7
Views
3,652
Hi All I have tried to use the following code to reset a tmr. if Cycle.St & not(CycleStart_Rst) then Tmr_Main.Reset [:=] 1; CycleStart_Rst...
Replies
4
Views
3,642
I am using some MCR pairs in RSLogix 500 as if they were subroutines. I could, for example, have used JMP & LBL instruction pairs instead. When...
Replies
9
Views
6,120
Back
Top Bottom