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,152
Hey Guys, I am using a siemens IPC with a siemens RFID setup (Part numbers below). I am looking to create a screen where I can add/remove users...
Replies
2
Views
21
i am using profibus, i want to insert a hexadecimal word or byte to 4 byte like in the phot but i don't know how
Replies
6
Views
88
Hi! Is it possible to open the project I'm creating on a latest version? I'm working on TIA Portal V19, but the customer needs it on v18.
Replies
10
Views
323
Hi everyone I want to use a vm to run tia portal v13 to v15 What would you suggest, Windows an specification for each portal . Thanks will...
Replies
4
Views
119
Back
Top Bottom