Resetting latched logic

Jim G.

Member
Join Date
Nov 2007
Location
Georgia
Posts
187
Beginner level in Siemens programming.
S7-1500 PLC and TIA portal V14 SP1
Long story short…. I installed a horn to come on to remindoperators to verify their work. They are preparing a splice for an automaticpaper unwinding operation. After they prepare their splice, they press a buttonon an HMI to declare the roll is ready. Upon pressing this PB, I sound the hornwith a voice message telling the operator to verify their splice preparation.An indicator on the HMI also begins to flash red. The indicator/PB is labelled“Verify splice preparation” The operator presses this PB and the indicator goesfrom flashing red to green and displays “Splice Preparation Verified” Upon asuccessful splice, the indicators reset to grey color awaiting the next rollprep.
Occasionally, the logic gets hung up and the horn sounds,the “Splice Prep Verified” indicator is green, but the horn does not go off.Nor does it reset upon a splice.
Could someone look over my logic and tell me what I havedone wrong.
On the HMI, I am using 2 indicator PB on top of each otherand using visibility to display the one I want.
See my attachment
Any help is appreciated.
 
Caveat: this is all a guess; I did not look at your code in depth, so you might already be using the "set & forget" approach.



To summarize, there may be no error in your code, other than assuming the HMI/PLC comms are perfect.


Which element (PC or HMI) is currently responsible for assigning the 0 to each bit?


If it's the HMI, because comms are not perfect it is usually best to let the HMI assign the value 1, and then have the PLC 1) detect the rising edge and 2) assign the 0. This is called "set-and-forget."


TL;DR


E.g. something like this might work:


Code:
     BitXFromHMI         InStateX
--+------] [-----+---+-----( )--------+--
  |              |   |                |
  |    InStateX  |   |  BitXFromHMI   |
  +------] [-----+   +-----(R)--------+
And the HMI only ever writes a 1 to (sets) Bit0FromHMI, and does not bother with ever writing a 0 as that is the PLC's job (forgets).


That's more clumsy than it needs to be; it's basically a form of one-shot or Set/Latch, but I think it expresses the logic more clearly; the point is that the HMI is not responsible for writing the 0 to the bit.


Some later event will eventually assign a 0 to InStateX, possibly in a similar type of logic when moving to state "Y."




Update: none of the tags in that PDF are legible; I suggest using the [Print Screen] (prt sc?) button to copy the screen to the copy-paste buffer, and then paste the image into the Paint application, and annotating those images.


That said, the contact in the top branch in the middle of Rung 23 looks like it could leave the output of that rung as a 1 if the HMI was responsible for, and failed, writing a 0 to the bit in that contact. Again, I cannot read it well, but it looks like the output of Rung 23 is responsible for the horn.
 
Last edited:
Try to increase your font, could hardly read it, some of the people on here are old timers & our eyes are not what they were, also your PDF is un-intelligible.
The symbols are virtually un-readable.
 
this project: https://www.plctalk.net/qanda/showthread.php?p=878184#post878184 uses the set-and-forget approach, specifically for the [accept_pattern (boolean)] and [hmi_pattern (integer)] tags. I can post a .zip with the .zap* if you are interested in the full project.


P.S. where are you in GA? My brother used to work at a plant that did a lot of web handling, but almost everything was A-B.
 
Attached is a cleaned up version of the logic. Trying to copy straight from TIA didn't work out. I knew it looked bad when I sent it. My apologies.


Anyway, I am still having intermittent issues with the logic holding the horn on and not resetting.


drbitboy - I work just outside of Atlanta for a Japanese company.
Some A-B, mostly Yaskawa and Omron PLC's.
Jack of all trades, master of none.
 
...I am still having intermittent issues with the logic holding the horn on and not resetting.


Which bit is not being assigned a 0 and stays as a 1, which keeps the horn on?


The PLC needs to assign a 0 to that bit; the HMI will not do it reliably.
 
Haven’t used ladder in 8 years, so i might be off.
And, not sure what’s an operator input and machine/sequence input. But it looks like you are using two latches? First in NW1, then the flip-flop.

It looks to me like you can get stuck at the SR-latch.
If both set & reset is true, Set will win.
Change to a RS-latch instead, making the Reset input dominant.

My two cents!
 
Which bit is not being assigned a 0 and stays as a 1, which keeps the horn on?


The PLC needs to assign a 0 to that bit; the HMI will not do it reliably.

Do you have a screen shot of the actual logic from the PLC? What output is the Q driving from the S/R block?

Im not a siemens expert but it appears you are sealing the contacts and using SET/RESET, you should pick one or the other.
 
It appears to be the output bit (VerifySplicePreparation) on the first line. It is set to 1 when the "roll"ready" button is pushed. Pressing the reset button is supposed to set this to zero. Obviously that is not happening all the time.


I am looking at my SR flip-flop because if the VerifySplicePrep bit doesn't get turned off, then the flip-flop cannot be reset at a CutRequest. That may be where my conflict occurs.


Since the "Roll Ready" is set by other logic in the program, I think I can use that condition to set and reset the "VerfiySplicePreparation" condition. Get rid of the flip-flop and use the set and reset bits.


This all worked good on a bench setup. Real Life and Operators can find the bugs in everything.


Thank you everyone.
 
Pressing the [HMI] reset button is supposed to set this to zero. Obviously that is not happening all the time.


Bingo.


SET and FORGET: the HMI assigns - SETs - the "do something" state, but then never un-assigns - i.e. always FORGETs about - that state; the PLC is responsible for un-assigning that state.
 

Similar Topics

Does Rockwell still offer reset codes for old school Master Disk floppy's? In a bind and need to reset the activation disk soon and to be pointed...
Replies
9
Views
238
Hi, I recently installed 2 1783-NATR devices into two of our machines. The machines are pretty much identical, both having 1769- L24ER-QFC1B...
Replies
4
Views
304
How is it going y'all? So We have had a pesky problem with an EH 300 flow meter. We are using EIP to reset the totalizer, and for some reason the...
Replies
3
Views
799
MELSEQ "intelligent modules" configuration, programmatically resetting the CPU Hello. This is for the Mitsubishi experts, and thanks in advance...
Replies
5
Views
1,069
Hi all, is there an easy way to reset a user defined shift register to 0? i have a data type containing 8 bools for an array of 10 and would like...
Replies
12
Views
3,200
Back
Top Bottom