PLC5 program control, does .tt or .dn get reset

vibbo

Member
Join Date
Aug 2018
Location
Kirwee
Posts
12
Plant PLC has no reasonable stop start sequencer.
There is 3 states, Available, Start & Stop.
A 10 sec timer exists in the Stop Ladder that is only solved for plant shutdown.
This timer is reset only when there is a Plant Start.
But what happens to the .tt bit or the .dn bit?
If a shutdown process begins, the .tt bit turns ON, but say 2 sec later someone has reset the plant, goes into the available state, so the shutdown ladder stops solving, so I expect the Timer accumulator value freezes? and the .tt bit stays ON?. Then when the operator presses the Start, the Timer gets a reset, I assume this resets the accumulated value in the memory, but does this also turn off the .tt bit?
Same question for the .dn bit, if the Stop is on for more than 10 seconds then the .tt will turn off and the .dn bit will turn on, but if the Plant is reset, the Shutdown Ladder stops solving, and then if operator presses the start, this will reset the Timer accumulated value, but will it turn off the .dn bit?
 
In the shutdown ladder, there is also the .tt bit turning on an OTE.
I know this OTE will never turn off unless the Timer gets done.
I can see a race problem ocurring at the beginning of the Start state in some situations, and I am sure its related to this. Will suggest they allow us to install a sequence logic like our other plant.

But perhaps the .tt & .dn bit states are changed elsewhere, outside of ladder logic, based on the value in the memory, and are not dependant on the Rung being active at all?
 
Last edited:
There is also some OTU in the Shutdown Ladder.
If a rung is true to make the OTU unlatch the bit,
And then say the shutdown ladder stops solving,
then the associated OTL is turned on in the active Start ladder,
what effect does the OTU in the inactive ladder have, considering this OTU action was true before it stopped being solved?
 
Not sure what you're trying to ask. Add this bit of knowledge to your investigation. In the AB world a timer's "tt" and "dn" bits have distinct meanings. The "tt" is timer timing. The timer has been enabled/started but has not reached it's preset value. The "dn" bit is active when the timer is enabled and has reached its preset value.
Posting a copy of your logic might help solicit more technical responses.
 
First what type of timer are you looking at
On Delay TON or Off Delay TOF
Most timers in a PLC are On Delay TON and then there are guys like me that like using Off Delay TOF in the stop command. This may be where the confusion is I have seen it many times before.
So a short description here
In an TON timer
The .EN (Enable) bit is true when the rung is true
When the .EN bit is true the .TT (Timing) bit is set true when the timer is timing
The ACC value will increase
The .DN (Done) bit set true when the ACC Value = the Preset Value and the .EN bit is true
When the .EN bit goes False the ACC Value is reset to 0 and the .DN bit it cleared / reset to False and the .TT bit also is set to False
In an TOF timer
The .EN (Enable) bit is true when the rung is true
On the first scan only when .EN bit set to true the ACC value it set to the Preset value and the .DN (Done) bit is set true
When the .EN bit goes false the .TT (Timing) bit is set true and the timer is timing
The ACC value will decrease
When the ACC value = 0 and the .EN bit is false the .DN bit will be reset to false.
So to sum up
With a TON the .DN bit is set when the timer finishes and the Acc Value = Preset Value
With a TOF the .DN bit is set when the .EN bit is true and resets when the ACC value = 0
The TOF is great when you want to clean out a conveyor when you turn it off
I often use then together to delay the start and then to keep it on for a short time after a stop command
 
Then there's the RTO (retentive timer on)...


EN reflects rung condition into the timer

ACC accumulates time while EN is true until ACC >= PRE

TT is on while ACC is accumulating, off while it's not (either DN goes high or EN goes low)DN is on while ACC >= PRE, regardless of EN status



The big difference between TON and RTO is that RTO doesn't reset when its EN goes low. It just freezes. To clear the ACC register, use a RES instruction.


I find it very helpful to go to Help -> Instruction help, or to highlight the instruction and hit F1. For the most part, AB's instruction help is actually useful. There are, however, a couple of typos in the flow chart and ladder example explanation for the RTO help in v34.
 
Ladder 2 - Program Control
XIC B3:9/7 "Stop Bit"---------- JSR U:11 "Stop Control"
-----------------------------------JSR U:12 "Start Control"


Ladder 11 - "Stop Control"
XIC B3:9/7 "Stop Bit" ---------TON T4:77 10sec
XIC T4:77.tt--------------------OTE O:004/10

Ladder 12 - "Start Control"
XIC B3:9/8 "Start Bit"---------RES T4:77

1.
If "Stop Bit" turns ON, then Ladder 11- "Stop" is solving.
2.
2 seconds later, "Stop Bit" turns OFF, Mode goes into "Available State", then Ladder 11 is not solving, T4:77.acc = 2 seconds
Would appear that T4:77.tt would be still ON, and ditto the OTE?
This is because the state of XIC stop is not scanned again in Ladder 11
The last scan was when the State of "Stop Bit" was ON.
3.
20 sec later "Start Bit" is turned on by operator
T4:77 accumulator is reset
What happens now, does the T4:77.tt bit turn off in memory, because the accumulated value is in memory, or does the TON T4:77 rung have to be scanned on an active rung to get turned off? But moreover since the XIC T4:77.tt rung is not scanned then the OTE never gets turned off
 
Ladder 2 - Program Control
XIC B3:9/7 "Stop Bit"---------- JSR U:11 "Stop Control"
-----------------------------------JSR U:12 "Start Control"


Ladder 11 - "Stop Control"
XIC B3:9/7 "Stop Bit" ---------TON T4:77 10sec
XIC T4:77.tt--------------------OTE O:004/10

Ladder 12 - "Start Control"
XIC B3:9/8 "Start Bit"---------RES T4:77
Thank you for posting this code.
1. If "Stop Bit" turns ON, then Ladder 11- "Stop" is solving.
2. 2 seconds later, "Stop Bit" turns OFF, Mode goes into "Available State", then Ladder 11 is not solving, T4:77.acc = 2 seconds
Would appear that T4:77.tt would be still ON, and ditto the OTE?
Yes, T4:77/TT will be on and remain on. It cannot change until

  • EITHER [U:11 Ladder 11] is called (JSR U:11) with B3:9/7 equal to 0 (which looks like it cannot happen with the given code)
  • OR T4:77 is reset somewhere else with a RESet instruction (which looks like it happens in [U:12 Ladder 12]
This is because the state of XIC stop is not scanned again in Ladder 11
The last scan was when the State of "Stop Bit" was ON.
3.
20 sec later "Start Bit" is turned on by operator
T4:77 accumulator is reset
What happens now, does the T4:77.tt bit turn off in memory, because the accumulated value is in memory,

Yes, according to this, the [RESet T4:77] will assign value of 0 to all three timer object bits: T4:77/EN; T4:77/EN; T4:77/DN. That is in addition to resetting the accumulator value to 0.

or does the TON T4:77 rung have to be scanned on an active rung to get turned off?

Well, a TON instruction will only "turn off" the T4:77 timer object when two things happen:

  1. BOTH the PLC executes the rung with the TON instruction,
    1. I am guessing that this is what you mean by "scanned on an active rung,"
  2. AND the feed rung is False at the point where it enters the TON,
    1. Which in this case means B3:9/7 must be 0

So in the code shown, if B3:9/7 becomes 0 before T4:77 expires (i.e. before ten seconds), then T4:77 will not be turned off by the TON T4:77 instruction in [U:11 Ladder 11], because if [U:11 Ladder 11] is not called via the [XIC B3:9/7 JSR U11] rung, then the TON T4:77 in [U:11 Ladder 11] will not be executed.

But moreover since the XIC T4:77.tt rung is not scanned then the OTE never gets turned off

Exactly. It's the same as the TON instruction: the output instruction on any rung can only be executed (change its outputs) if the rung is "active."

I do not know your process, so take this with a grain of salt: but perhaps the right thing to do with this code is to remove the [XIC B3:9/7] in [U:2 Ladder 2]. At least that way, if B3:9/7 does not have a value of 1 for the full 10s of the [TON T4:77] timinmg, then the feed rung into the TON instruction will go False and reset T4:77, which will put values of 0 into both T4:77/TT and O:004/10.

Note that T4:77/TT is the logical [T4:77/EN] AND [NOT T4:77/DN].
 

Similar Topics

It's a PLC2/30 system, besides the regular I/O, it has a 1771-VHSC, 1771-KA2, and 1771-KE. You can PM me. TIA.
Replies
1
Views
1,533
I had a problem yesterday, the PLC5 lose the program, I did new download and re-start the process. Today, I get the crash log and I do not...
Replies
1
Views
2,453
Hi everyone, I need to program a PLC 5 to calculate the difference in percent between the highest and lowest of either 2 or 4 floating point...
Replies
4
Views
1,986
dear all, I have question, i realy need to help from everyone. Which cable I can use for upload/download program from PLC5/20 to Computer...
Replies
4
Views
2,144
how to upload program from PLC5/20(1785-L20B), If anyone who konws the software and the cable ,plesae tell me. thanks!:utoh:
Replies
1
Views
4,479
Back
Top Bottom