STEP7 Safety Programming
STEP7 Safety Programming
STEP 7 Safety
Licenses for Safety Basic (Industry Mall) ►
► Functional segment
M3
► Security information
STEP 7 Safety
Licenses for Safety Advanced (Industry Mall) ►
► Functional segment
M3
Description Order No. ► Security information
**SUS compact means that irrespective of the number of ordered packages only one data carrier and one USB stick will be delivered.
To open Safety projects is always possible (with or without Safety installed): ► STEP 7 Safety
With Safety V13 installed or Safety installed and Trial License invalid:
Standard program Standard HW-Config Safety program Safety HW-Config
Download
STEP 7 Safety
Safety Administration Editor - General: ►
► Functional segment
M3
• In "General", you find the status of safety mode, the safety program, and the collective ► Security information
In addition to data in the standard user program, which can always be modified, you can
modify the following data of a safety program in deactivated safety mode:
STEP 7 Safety
Safety Administration Editor – F-runtime ►
► Functional segment
group: M3
► Security information
STEP 7 Safety
Safety Administration Editor – Protection: ►
► Functional segment
M3
• In “Protection", you can set up, change, or revoke the password for the safety program. ► Security information
STEP 7 Safety
Safety Administration Editor – Settings: ►
► Functional segment
M3
• In "Settings", you set the parameters for the safety program. ► Security information
STEP 7 Safety
Safety program always consists… ►
► Programming
S7-1200F/1500F ► Functional segment
M3
• User created F-blocks
► Security information
• Management in the program blocks folder
• Call in the Main Safety block
STEP 7 Safety
F_GLOBDB ►
► Programming
► Functional segment
M3
• Is a system created F-data block
► Security information
STEP 7 Safety
F_RTG1SysInfo DB ►
► Programming
► Functional segment
M3
► Security information
STEP 7 Safety
TRUE and FALSE for block calls ►
► Programming
► Functional segment
M3
The Boolean constants "FALSE" for 0 and "TRUE" for 1 are available for S7-1500 F-CPUs to
► Security information
assign parameters during block calls.
S7-1500F S7-300F/400F
STEP 7 Safety
TRUE and FALSE 1 for bit logic operations ►
► Programming
► Functional segment
M3
• If you require the Boolean constant 1 for bit logic operations, you can interconnect the
► Security information
corresponding input of the bit logic operation with the "Assignment" instruction. Do not
interconnect the box input of the "Assignment" instruction in FBD.
and
• If you require the Boolean constant 0 for bit logic operations, you can interconnect the
corresponding input of the bit logic operation with the "Assignment" instruction. Negate the
output of the "Assignment" instruction. Do not interconnect the box input of the
"Assignment" instruction in FBD.
STEP 7 Safety
Use of variables in the F-I/O DB ►
► Programming
► F - I/O access
►
Value status
Data exchange
► STEP 7 Safety
► Functional segment
For reintegration M3
of F-I/O ► Security information
I/O evaluation
Not with
S7-1200F/1500F
STEP 7 Safety
Value status ►
► Programming
► F - I/O access
►
Value status
Data exchange
► Functional segment
M3
• Supports fail-safe modules ET200SP, ET200S, ET200iSP, ET200pro, ET200M
► Security information
• The channel value and value status of a F-I/O module can only be accessed
from the same F-runtime group.
• The value status is entered in the process image of the inputs (PII).
STEP 7 Safety
As with standard I/O, ►
► Programming
via the process image (PII and ► F - I/O access
PIQ). ►
►
Value status
Data exchange
STEP 7 Safety
Differences in evaluation in S7-1200F/1500F and S7-300F/400F ►
► Programming
► F - I/O access
Value status QBAD_I/O_xx Value status
Scenario ►
► Functional segment
M3
Valid values on F-I/O (no fault) True False
► Security information
STEP 7 Safety
Differences in evaluation in S7-1200F/1500F and S7-300F/400F ►
► Programming
► F - I/O access
Tag in the F-I/O DB or Value status
F-I/O with S7-1200F/1500F-CPU F-I/O with S7-300/400F-CPU ►
► Functional segment
M3
ACK_NEC
► Security information
QBAD
PASS_OUT
QBAD_I_xx *
QBAD_O_xx *
Value status
* QBAD_I_xx and QBAD_O_xx indicate the validity of the channel and are therefore equivalent to the inverted value status in S7-1500
► STEP 7 Safety
► Functional segment
M3
reading writing reading writing
► Security information
Inputs
Standard
process image
Outputs
Inputs
Fail-safe
process image
Outputs
► STEP 7 Safety
► Functional segment
M3
reading writing reading writing
► Security information
STEP 7 Safety
Decoupling of the safety program from the standard program in case of data transfer ►
► Programming
► F - I/O access
For data exchange between standard user program and safety program, we recommend that ►
►
Value status
Data exchange
you define special data blocks (transfer blocks) in which the data to be exchanged is stored. ► Functional segment
M3
► Security information
à This action allows you to decouple the blocks of the standard and the safety program.
STEP 7 Safety
Compile ►
► Programming
► F - I/O access
►
Value status
Data exchange
• This consistency check extends across all selected blocks ► Functional segment
M3
• STEP 7 V5.5: „check block consistency“ was only an option
► Security information
• Search for syntax errors in the whole program
• Compile of the whole program into machine code
• For compiling a F-FB with know-how protection in S7-300F/400F, you have to open it before.
• Dependent of the project tree selection in the TIA portal is the compile content
STEP 7 Safety
Downloading the Safety Program ►
► Programming
► F - I/O access
• Once the safety program was successfully compiled, it can be download to the F-CPU ►
►
Value status
Data exchange
• The same basic procedure and buttons as for downloading a standard user program ► Functional segment
M3
• Download of single blocks or all blocks
► Security information
• Download of blocks into “accessible devices” via Drag & Drop in the project navigation
• In the "Load preview" dialog (next slide) , enter data (e.g. password for the F-CPU) and set
the requirements for downloading (e.g. that the F-CPU is switched to STOP mode before
downloading).
• Dependent of the project tree selection in the TIA portal is the download content
STEP 7 Safety
"Load preview" dialog For a “Consistent
►
► Programming
download”, the F-CPU ► F - I/O access
has to be stopped ► Value status
► Data exchange
► Functional segment
F-CPU password that is M3
Selectively or consistent
download of standard
blocks
Selectively (300F/400F)
or consistent download
of F-blocks
► Security information
Tasks:
• Implement safe shutdown with „ESTOP1“.
• Realize the protection door with „SFDOOR“.
• If there isn't any fault in the system. You can start with “Start” button (consider for reset: Estop.Q, auto mode, global
Qbad)
Note:
to switch on the M3 you can use the outputs „Drive_M3_slow“ .
Tasks:
• Implement safe shutdown with „ESTOP1“.
• Realize the protection door with „SFDOOR“.
• Expand / Create the block “signal lights”
Note:
For fast motion the outputs „Drive_M3_slow“ and „Drive_M3_fast “ need a “1”-signal .
STEP 7 Safety
Protecting blocks ►
► Functional segment
M3
You can use a password to protect one or more blocks from unauthorized access. ►
►
Functional signature
Safety printout
The following actions can be performed with a know-how protected block: ► Security information
• Copying and deleting
• Calling in a program
• Online/offline comparison
• Load
STEP 7 Safety
Notes regarding Know-How protected F-blocks: ►
► Functional segment
M3
• If you use the safety program to migrate F-blocks with know-how protection, remove the ►
►
Functional signature
Safety printout
know-how protection prior to migration! ► Security information
You can assign the F-blocks know-how protection again once the migration is completed.
• Main safety blocks, F-FBs/F-FCs and F-DBs of a S7-1200 and S7-1500 F-CPU cannot
be know-how-protected!
If they are, the safety program cannot be compiled.
STEP 7 Safety
Functional signature of F-blocks ►
► Functional segment
M3
►
Functional signature
Safety printout
The functional signature of F-blocks will be changed just in case if the logic within the F-block is ► Security information
changed and not by any changed block number, block interface or new version.
STEP 7 Safety
Changing the F-block interface: ►
► Functional segment
M3
► Functional signature
► Safety printout
► Security information
Same
signature!
STEP 7 Safety
Changing the F-block logic: ►
► Functional segment
M3
► Functional signature
► Safety printout
► Security information
New
signature!
STEP 7 Safety
The safety printout provides documentation of the safety program and ►
► Functional segment
provides support for the acceptance test of the system! M3
► Functional signature
► Safety printout
In the safety printout you find: ► Security information
• General information for program identification as e.g.
• Used software versions
• F-signature and time stamp of last compilation
STEP 7 Safety
Procedure for creation of safety printout ►
► Functional segment
1 M3
Select the Safety ► Functional signature
Administration Editor of 2 ► Safety printout
STEP 7 Safety
Procedure for creation of safety printout ►
► Functional segment
M3
3
► Functional signature
► Safety printout
In the displayed dialog, you ► Security information
can make layout settings for
the printout and choose a
document template.
Programming Guideline:
• Optimized Blocks, datatypes, instructions
• storage concept, symbolic addressing, libraries
• Recommentations for Step 7 Safety in TIA-Portal
• …
Programming Styleguide:
• Consistent continuous style
• Easily readable and comprehensible
• Simple maintenance and reusability
• Easy and quick troubleshooting and error correction
• Efficient working at the same project with several programmers
• …
download
user program
2 kinds of libraries
§ Project library
§ Unique for each project
§ Attached to the project (opened, Types
saved and closed with the project).
Project library
Restricted / © Siemens AG 2015. All Rights Reserved.
Page 80 Safety Integrated Systems Support
Security information
Siemens provides automation and drive products with industrial security functions that support the secure
operation of plants or machines. They are an important component in a holistic industrial security concept.
With this in mind, our products undergo continuous development. We therefore recommend that you keep
yourself informed with respect to our product updates.
Please find further information and newsletters on this subject at: http://support.automation.siemens.com
To ensure the secure operation of a plant or machine it is also necessary to take suitable preventive action
(e.g. cell protection concept) and to integrate the automation and drive components into a state-of-the-art
holistic industrial security concept for the entire plant or machine. Any third-party products that may be in use
must also be taken into account.
Please find further information at: http://www.siemens.com/industrialsecurity