Siemens IEC Timer

Sparks

Member
Join Date
May 2005
Posts
8
Hi all, is it possible to compare the Elapsed time from an iec timer (SF4) with another value using a compare block.
 
hello Sparks;

I don't have Step 7 available now, so I am basing my answer to this statement from Siemens' website:

How can you calculate times?

ANSWER:
The IEC TIME format is a double-integer format type and can therefore be calculated with normal arithmetic.

A TIME variable is equivalent to the number of milliseconds you want to represent; that is,
[TIME] T#1s == {DINT] L#1000

So yes, you should ne able to compare the value of expired time (attributed to a MDxx variable, for example) of the IEC ttimer with a DINT value.

Hope this helps,
Daniel Chartier
 
The problem is that the comparing DINTs with TIMEs isnt allowed in LAD or FBD when typechecking is on (and it SHOULD be on !).

Do it in STL.
There is no typechecking in STL, so you can do it with no problems.

Here is how to:
Create the compare network in LAD as normal, and specify two DINTs for the compare block.
Switch to STL and exchange one of the DINTs for the TIME variable.
When switching back to LAD, the "offending" rung will remain in STL.
 

Similar Topics

Tried Googling and searching this forum for the answer to this, but no luck, so figured start a new post to see if anyone can help me...or confirm...
Replies
8
Views
3,328
Hello! I intend to use the iec timer SFB4 for alarm blocks. In order not to use up one instance data block for each timer, my intention was to...
Replies
4
Views
7,716
Hello, I want to create a FC function that uses SCL code that checks deviation of a controllers actual measured value from its setpoint and then...
Replies
3
Views
7,058
Hi, Im investigating for my work if it is possible to transfer a simple program from Step7 to RSLogix5000. According to the site of siemens this...
Replies
6
Views
8,669
Hi, In one of my projects i am using Siemens Siprotec Numerical Relays (7SJ611,7SJ641,7RW600) for IEC-103 communication with Telvent RTU. I have...
Replies
9
Views
9,431
Back
Top Bottom