advertisement
from the Irish department...
Siemens S7 IEC Timers
PLCs and related questions. topic
Posted by Paul Darby on 17 October, 2002 - 6:06 am
Has anybody used IEC Timers when programming in Step 7? If so, do you have to program in SCL to utilise them?

I am setting up a redundancy system which specifies that I cannot use the usual S5T# type timers.


Posted by Koen Toorenburg on 17 October, 2002 - 6:15 pm
By my knowledge, the S7 doen't support IEC-time.
I usually make my own counters in scl as a function. In adds 1 to an integer value every clockpulse. Once the value has reached the preset-value it sets a bit. The clockpulse can be made by using an one shot-trigger linked to a time-pulse from the CPU.
If you redundancy-system is another S7, they can share the memories with the integer counter-values.
Due to the slow program-execution of the S7, the timebase of the counter is at least 100ms.

Have "fun" with the S7


Posted by SMM on 18 October, 2002 - 11:07 am
Of course there are IEC timers. Look under
Libraries- Stardard Libray- System Function Blocks.

There are your TON, TOF timers ..etc


Posted by Paul Darby on 18 October, 2002 - 11:14 am
I have since found some IEC format timers and counters in \Standard Library\System Function Blocks\SFB's 0-6 which seem to work ok...


Posted by Dobrowolski, Jacek on 23 October, 2002 - 4:07 pm
Koen Toorenburg wrote:
<...>
By my knowledge, the S7 doen't support IEC-time.
<...>

As far as S7-300/400 is concerned you are wrong.

<...>
I usually make my own counters in scl as a function. .....Due to the slow program-execution of the S7, the timebase of the counter is at least 100ms.
<...>

Possibly you could improve your timers by using OB1_PREV_CYCLE variable - depending on you program scan time it could be up to 100 times
shorter time base.

Best regards,

Jacek Dobrowolski, M. Sc. E. Eng.
Software Eng.

P.S. And good luck with having "fun" with S7, whatever this means for you.


Posted by Eric Buysse on 18 October, 2002 - 11:54 am
TIME (IEC time)IEC time in steps of 1 ms, integer signed
example
L T#0D_1H_1M_0S_0MS
Or
L TIME#0D_1H_1M_0S_0MS

Greetings
Eric


Posted by Ronald Nijssen on 20 October, 2002 - 2:29 pm
No, you can use them in any Step7 language: LAD, IL, FDB, SCL, CFC Please see my answer to a similar question on Sept. 1, 2002 (look for "IEC Timers" in the Archive")

Consider using them in Multi-Instance form, this means declaring them in the STATIC part of a FB Header, this will give a much more efficient memeory (DB-nr) usage

Regards
Ronald


Posted by Dobrowolski, Jacek on 23 October, 2002 - 9:42 am
Hi,

You can use them in any S7 language. But there're two ways of doing that:
1) calling them as FBs with a instance DB,
2) defining variable of type of desired timer in a FB static data area and calling the timer from this FB body.

Regards,

Jacek Dobrowolski, M. Sc. E. Eng.
Software Eng.

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
Xerox does it again and again and again and ...
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive