TIA IEC timer: unwanted behaviour

Which CPU are you using?


For reference, if you use non-optimised blocks you can see that there are 'hidden' variables in the IEC timer interface. At address 0.0 is a #time value (referenced by variable name .ST) which is the time value stored when the timer starts. At address 12.0 is a status bit which I interpret to be a timer timing bit (I haven't found the name for this variable).


If you are using non-optimed blocks you could monitor this data in a watch table when your timers 'freeze' after an instnce DB update and report the contents.

iec0.jpg
 
I agree. I've played with his code and tried everything possible to recreate the issue he described on transition from start-stop-start and could not. Interesting nonetheless.

That is good to hear... His network with timers is not something I'd do that way, but it should work..

I don't have 1500 CPU, but I understanded that problem was after downloading IDB and FB modifications to CPU, not normal boot.

He said it was both.

I may get the chance to power cycle in a couple of weeks. I'll let you know what happens on that occasion. But guaranteed, it happens every time on DB update.

The modifications part I believe, the restart part, I don't. I think there is a problem somewhere else.
 
It sounds like you have made a snapshot, and to start value while timer input .IN is true.
So when you load the Block and input to .IN is true the timer wont see the start trigger.
Try to see in the IDB for the timer the variable .IN have true in start value.
If so change to false.

When copy snapshot to start value. Dont use all. Use instead OnlyRetain

Peter
 
Pjolle, I have looked at the start values and many of the IN start values are set to TRUE. I will change them and monitor at the next opportunity. Thanks.
 
As you have probably gathered, my experience with Siemens is limited, so I have to ask: When I edit the start values will the subsequent download be "consistent" or will it require a reinitialize? I have spoken with S tech but the response was "I don't know; try it and see". Not my favorite answer.
 
Yes you have to download the IDB again to make it consistent.
And im pretty sure it Will take all the start values as actual values.
And thats also youre issue.
You Will only have the timer issue if the signal/sensor is true to activate the timer IN
If it’s false it Will be okay. But a IEC Timer starts on rising edge
And the timer dont see the edge if the start value is true. And the input is true.
It happend when you load the DB. Or if the DB element isn’t retain and you make a new start of the CPU, then it take the start value.

Just dont use the snapshot value -> start value for all.
Use Only Retain. All TON timers are not retain
 
Last edited:
It sounds like you have made a snapshot, and to start value while timer input .IN is true.
So when you load the Block and input to .IN is true the timer wont see the start trigger.
Try to see in the IDB for the timer the variable .IN have true in start value.
If so change to false.

When copy snapshot to start value. Dont use all. Use instead OnlyRetain

Peter


Thanks you for that. That was brilliant and exactly what happens 🍺
 

Similar Topics

I've tried to add an "s" after the tag for the PT value of an IEC timer but it's rejected, even if the tag type is "time". As the timebase is ms...
Replies
4
Views
2,094
Hi guys , I'm new with Allen Bradley, but I have experience with Tia portal (s7 1200 ,s7 1500) I want to convert my project from Tia portal to...
Replies
1
Views
92
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
109
Hello gentlemen, Im working on a small project on TIA Portal, about establishing a Modbus TCP connection between my ET200SP plc and a socomec...
Replies
11
Views
253
I am currently am in a PLC class and need urgent help on how the ladder logic would be laid out. I understand how to get the traffic lights to...
Replies
19
Views
410
Back
Top Bottom