TIA IEC timer: unwanted behaviour

Something is wrong here..I believe that in some combination of online change with iDB reinit it might not work, but on restart it should work normally. I'd have problems with this by now if it didn't.


The No contact is still true but in the iDB it is false after the reset, just like the output. And when it is called it starts to time again because he got a true on the in contact..
And if the iDB is set to be Retain, then it won't start to count but the output will stay true too.

No, I believe he stated that the program starts with the NO contact ( I believe this is tied to the physical input) already True and in FB and in the bit in IDB and the result of this is that the timer doesn't see the transition and doesn't time out again meaning the output remains false.
 
Tanks, L D[AR2,P#0.0], new info for me to learn there.
Kalabdel, you have read it correctly; in my case the FB instances are for scaling analogue inputs from process sensors and incorporate four adjustable (e.g. via HMI) switching thresholds. The scaled value is compared with the presets and in each case, debounced by a TON. The Q of each TON is the output for that threshold. So there will be many instances where the TON En conditions will be true when the processor starts running following a power cycle, e.g. tank levels.
The controlled plant in this case includes a section which gathers and pumps collected rainwater between silos. This area runs 24/7 and is expected to resume operation following a power interruption. However, as it's still at the commissioning (and wish-list developing) stage, there are times when I need to modify FBs that necessarily impact on their iDBs.That's when I first encountered the non-restarting timer problem.
 
Last edited:
No, I believe he stated that the program starts with the NO contact ( I believe this is tied to the physical input) already True and in FB and in the bit in IDB and the result of this is that the timer doesn't see the transition and doesn't time out again meaning the output remains false.

Yeah, I see what he stated, bu I don't believe it. I've done hundrets of 1200's and a dozen 1500's and I think I'd have some problems by now if this was the case..

Tanks, L D[AR2,P#0.0], new info for me to learn there.
Kalabdel, you have read it correctly; in my case the FB instances are for scaling analogue inputs from process sensors and incorporate four adjustable (e.g. via HMI) switching thresholds. The scaled value is compared with the presets and in each case, debounced by a TON. The Q of each TON is the output for that threshold. So there will be many instances where the TON En conditions will be true when the processor starts running following a power cycle, e.g. tank levels.
The controlled plant in this case includes a section which gathers and pumps collected rainwater between silos. This area runs 24/7 and is expected to resume operation following a power interruption. However, as it's still at the commissioning (and wish-list developing) stage, there are times when I need to modify FBs that necessarily impact on their iDBs.That's when I first encountered the non-restarting timer problem.

I do this on most of my programs (with s7-1200, but it has the same IEC-TON) and I never had a problem. Can you post your timer call, please?
 
Here's a pdf of the fb. The timers are in networks 9-12. All containing FBs and FB instances are called unconditionally: OB1/containing fb/instances.
 
Last edited:
moggie, Thanks for that. Not strictly relevant but a perfect example of how platform quirks can leave you scratching a hole in your head before even getting to the application debug. This is only my third Siemens application, the last one being about three years ago, so it's a steep one each time.
 
S7-300 had at least IEC timer issue with t#0s. Timers don't time never with that time.



On 1200 it is at least different, and IEC TON with t#0s works.
You maybe need to check that it isn't case on 1500.


When you load DB block, what is timers setpoints. Can it be t#0s on one scan after download?



Also, what if you change to shared IDB with enought spares to TON timers, then you don't need make modifications to IDB of TON timers and you make modifiactions to FB and Ton timer IDB different time o_O
 
I would change code to RS flipflop block and 2*ton timers.


That way timers won't affect even if output is off one program scan o_O
 
Yeah, I see what he stated, bu I don't believe it. I've done hundrets of 1200's and a dozen 1500's and I think I'd have some problems by now if this was the case..


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.
 
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.


I don't have 1500 CPU, but I understanded that problem was after downloading IDB and FB modifications to CPU, not normal boot.
 
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.
 

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,110
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
206
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
2
Views
191
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
160
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
12
Views
305
Back
Top Bottom