STAT variable or memory bit in an S7 safety function block

tim2

Member
Join Date
Nov 2004
Posts
245
Question for the Siemens experts.

In an S7 safety function block, I'm adding two safety function blocks for emergency stops (F_ESTOP1, FB215) into the function block. I saw a Siemens example where they used local STAT variables as the output of the function block to enable logic in other parts of the block.

What's the advantage of using a local STAT variable over a memory bit?
In a safety program I'm pretty sure it's because the memory bit is not considered safety I/O (it highlights red in the safety function block), where the STAT variable is a part of the safety function block and its instance datablock.

What would the advantage be of using a STAT variable instead of a memory bit in a standard program? Retentivity?
 
Using a Stat variable makes it easy to manage the data. Markers tend to get messy quickly and do allow for reusable blocks.
Keep everything self contained in a FB by using Stats or Temps.

My 2 cents.
 
M Flags and STAT's can be accessed anywhere in the program, the big advantage of the STAT is is the fact that the FB can be called numerous times, so you can have a self contained sub-routine for a specific type of equipment.

If you have 3 of the same thing, then the block can be called 3 times and the internal memory (STAT) is unique for each call.

As Mike says above, even when not called multiple times it contains the code nicely.

I rarely use M flags for anything other than common items, like timed pulses, always on/off flags, etc.
 

Similar Topics

Having issues finding how to have a variable tag as an array offset, when that array is part of the FB STAT area and the array is being passed...
Replies
13
Views
2,389
Please inform me about any manual that can explain how to monitor and deal with the #stat variable because I don't know how to deal with it in...
Replies
0
Views
1,704
I've loved using the WinDirStat program for ages to show a nice intuitive chart showing what the biggest offenders on my old 10gb hard drives were...
Replies
5
Views
1,309
did a search, nothing came up... Doing an audit, and looking for an active port-inventory, such as netstat... yet can't seem to find anything...
Replies
5
Views
2,895
Curious to see if anyone has a suggestion for a visual representation of what is the biggest usage of memory in any program for the Logix family...
Replies
3
Views
1,814
Back
Top Bottom