Simple Ladder Timer Question

afm

Member
Join Date
Aug 2023
Location
Tennessee
Posts
88
Hi all,

I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay on for 2 seconds after variable Condition1 and Condition2 are true. Condition 1 and 2 will be on very briefly, so I want the light to hold the high state for 2 seconds after the positive transition, regardless of any change in the status for condition 1 or 2. If Condition 1 or 2 goes True again WHILE the light is being held on for 2 seconds, I want that light to continue to stay on. How would I achieve that? This is what I have now.

1709755093494.png
 
What platform is this?
A few observations/questions.
1) Is the -|P|- instruction a pulse?
2) I assume the -(S)- is a "SET" that will turn ON HoldLight
3) I assume TON is an on-delay timer and its Q is on once it's finished timing.

With that said, if the timer is NOT running, either Moderate or HighIntensity will latch ON HoldLight and start the timer, which will time out. The LightHoldTimer.Q instruction will not do anything at all because:
a) the |P| instructions have already turned off (using some verbal shorthand here)
b) there is no (R) "reset", whatever it's called to turn off HoldLight

I would look for an off-delay timer that is triggered by either |P| pulse. While the TOF.Q is on, the light is on.

Note: Most of my analysis is based on AB PLCs, from 5, 500, and 5000. If your platform is significantly different, you may get different results.
 
If Condition 1 or 2 goes True again WHILE the light is being held on for 2 seconds, I want that light to continue to stay on.
The critical question to me is about this recurrence of the trigger conditions before the previous two seconds of light-on time expire.

If either Condition 1 or 2 go True again while the light is already on from a previous Condition1 or Condition2 event, do you want the two seconds of "On" time that the light stays on to restart? Stated more simply, do you want the Light to be on
  • BOTH for any scan cycle when either Condition is True,
  • AND for 2s after the last scan cycle when either Condition transitions was True?
If yes, then the TOF (Timer OFf-delay) instruction, as @joseph_e2 mentions, is custom made for this application, because the description above describes the TOF logic exactly, and the logic can be expressed with only three instructions on one rung.
 
Try this, the contacts with up arrow are the same as your "P" contacts
The first rung is effectively the reset for the timer if either of the two triggers occur again, it will not trigger if the latch is off first time as the P contacts are only one scan so reset before the next scan (as it is before the latch it only happens once the latch has been set).
Then on the first pulse of the triggers the latch is set enabling the timer, the latch is reset when the timer tinmes out.
The timer will rtun on the latch for two seconds but if another pulse from the triggers activates then the timer is reset keeping the latch (light) on for another two seconds.
 

Attachments

  • Code.png
    Code.png
    40.2 KB · Views: 9
I would look for an off-delay timer that is triggered by either |P| pulse. While the TOF.Q is on, the light is on.
If yes, then the TOF (Timer OFf-delay) instruction, as @joseph_e2 mentions, is custom made for this application, because the description above describes the TOF logic exactly, and the logic can be expressed with only three instructions on one rung.
Ah, insanely simple solution. This was a good refresher and reminder on TOFs, thank you!

Try this, the contacts with up arrow are the same as your "P" contacts
The first rung is effectively the reset for the timer if either of the two triggers occur again, it will not trigger if the latch is off first time as the P contacts are only one scan so reset before the next scan (as it is before the latch it only happens once the latch has been set).
Then on the first pulse of the triggers the latch is set enabling the timer, the latch is reset when the timer tinmes out.
The timer will rtun on the latch for two seconds but if another pulse from the triggers activates then the timer is reset keeping the latch (light) on for another two seconds.
Something like this latch procedure was what I was initially wanting to do, but wasn't doing correctly. Both this and the TOF method worked great so thank you everyone for the help!
 

Similar Topics

Hi all, Having a problem inserting a basic timer into my Mitsi Ladder. I am just playing around learning with the basics. However I have read my...
Replies
6
Views
5,543
I have a program that does a 7 second "scan" sensor calibration routine whenever a setting (setting is called assistance level or "AL" and ranges...
Replies
3
Views
212
I need help answering a problem regarding the design a ladder diagram for a security light control. The question states when a sensor is...
Replies
8
Views
2,056
I want simple logic for elevator . m going to use four pushbuttons for four levels and four proximity sensors . that's all. m trying this in ab...
Replies
7
Views
2,467
Hello. After doing a couple quick searches I couldn't find anything concrete on what I should use for a simple ladder drawing program. Since all...
Replies
3
Views
1,794
Back
Top Bottom