Larger(999+) in LAD in S7

Hi rsdoran.

You put up a valid point.
When it comes to timers and counters in S7, then there are several possibilities.

The "S5 style" timers and counters are to my opinion only available in order to make S7 backwards compatible with S5.
They are limited, cumbersome to use and best avoided to my opinion.

Then there are the "IEC style" timers and counters implemented in SFBs.
They work as intended. Drawback is that you have to assign an instance DB to each or to work with "multiple instance". This has its own disadvantages.

Lastly, there are many kinds of "do it yourself" timers and counters.
As a counter is so easy to implement, I prefer to go this way.
A timer is a little bit more difficult.
 
I don't bother using the S7 counters either. In fact, I don't think I've ever used one. I do it just as STL??? described above.

But the timers are pretty useful, and I like the fact that I still have five types like in S5. But if I ever needed needed a longer time base than their timer allows, then I would just increment an int using the previous scan time and compare it to an int setpoint.

I haven't taken advantage of the canned function blocks that emulate timer and counters, because I just can't see calling a function to do something like counting when the basic instructions are right there to do it instead.
 
rsdoran said:
I am not strong on Step7 therfore I am somewhat confused on the question.

I know it has SFB0 count up which goes from 0-32767 plus other functions (Siemens call them functions but others would say instructions, at least that is how I think about it).

It has SFB1 count down, SFB2 CTUD, and the one I have used the most is SFB38 high speed counter. All of these can be used in ladder.

DID I miss something?

Siemens have counter/timer instructions, functions and function blocks, they are different.

An instruction is the type you get in other PLC's which is part of the instruction list (like normally open contacts etc), whilst a function is a sub-routine block of code that takes space in the program memory and a function block type is the same except it needs an instance data block.

Not so sure of the advantage of the function, but a function block can be included in another function blocks STAT parameters, which means two things, its instance DB requirements are catered for in the instance DB of the master block in which it is a STAT, the second of course is that you can use these timers/counters in a subroutine and for each separate call will function only for that call and remember its status just for that call, something you cannot do with normal timers and counters and why Siemens programmers (used to S5) normally make their own by incrementing marker words.
 
rsdoran said:
I am not strong on Step7 therfore I am somewhat confused on the question.

I know it has SFB0 count up which goes from 0-32767 plus other functions (Siemens call them functions but others would say instructions, at least that is how I think about it).

It has SFB1 count down, SFB2 CTUD, and the one I have used the most is SFB38 high speed counter. All of these can be used in ladder.

DID I miss something?
I'm sorry to say Ron, but you indeed did miss something: the fact that not all CPU's have these SFBs available, at least not all the older ones. I would have to check about our latest 314s (version 10), but I'm sure our older ones (versions 1 and 2) didn't have these functions and as such were not IEC compliant.

Kind regards,
 

Similar Topics

I'm a beginner in the automation field and I've set up an automation system connecting several devices (datalogger, radio, etc.) via Modbus RS485...
Replies
5
Views
220
I have been tasked to supply a location with a backup power supply that can run 240V at 20 amp nominal with 70 amp peak pump loads (120 Seconds...
Replies
13
Views
3,787
Hi guys, Been handed a new SNAFU on a job. The MCC what provided with a SMC Flex Soft Starter for a 40hp motor but the motor that was installed...
Replies
11
Views
2,417
I am trying to send data from my Guardlogix 1756-L72S to a Leibinger JET3 UP PI Printer trough a MSG instruction, I can send information if the...
Replies
10
Views
4,208
Hi Everyone, It's been a while. I have an opportunity to install a system that uses a 480V 3phase 4.4kW gearmotor driven by a 11kW VFD. Everything...
Replies
17
Views
8,691
Back
Top Bottom