You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Thread Tools Display Modes
Old July 12th, 2005, 06:49 AM   #1
United Kingdom

Sparks is offline
Join Date: May 2005
Posts: 8
Siemens IEC Timer

Hi all, is it possible to compare the Elapsed time from an iec timer (SF4) with another value using a compare block.
  Reply With Quote
Old July 12th, 2005, 07:06 AM   #2

dchartier is offline
Join Date: May 2003
Posts: 1,539
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?

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
  Reply With Quote
Old July 13th, 2005, 10:01 AM   #3
Lifetime Supporting Member + Moderator

JesperMP is online now
JesperMP's Avatar
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,179
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.
3 strikes and you're out
  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Siemens S5 Retentive Timer advocar LIVE PLC Questions And Answers 8 April 21st, 2011 06:15 AM
S7 IEC timer preset from MP panel jtpetersen LIVE PLC Questions And Answers 2 July 6th, 2005 03:28 PM
S7 IEC timer - RESET functionality. JesperMP LIVE PLC Questions And Answers 6 May 28th, 2004 03:26 AM
How to initialise S7 IEC timer ? JesperMP LIVE PLC Questions And Answers 5 May 21st, 2004 09:18 AM
Siemens S7 Timer Questions GTX LIVE PLC Questions And Answers 6 April 30th, 2004 09:55 AM

All times are GMT -5. The time now is 02:46 AM.