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,140
Hi PLC people, think about this scenario: The PLC is somehow connected to the same network with the facilities` network. Then someone connects to...
Replies
2
Views
89
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
5
Views
192
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
116
Hello, i am using profibus as communication between plc and fanuc arm. I can easily send inputs from plc to arm, but i can't monitor any outputs...
Replies
0
Views
47
Back
Top Bottom