19.08.2013 Views

Safety Integrated - Industry - Siemens

Safety Integrated - Industry - Siemens

Safety Integrated - Industry - Siemens

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sample Code<br />

Preliminary Remarks<br />

Enclosed, we offer you the STEP 7 project as sample code with<br />

which you can reset the described emergency stop functionality.<br />

The sample code is always assigned to the components used<br />

in the functional example and implements the required functionality.<br />

Problems not dealt with in this document are to be<br />

implemented by the user; the sample code may serve as a basis.<br />

Password<br />

In all cases, the passwords used for the safety-relevant part is<br />

„siemens“.<br />

Use of the STEP 7 Project<br />

The STEP 7 project shows the possibility of a safety door locking<br />

without guard locking in safety category 4. In this example,<br />

the hazardous machine is simulated by an indicator light.<br />

The conditions necessary for the actuators to reach safety category<br />

4 (e.g. read back of actuator signals) are not considered<br />

in this example.<br />

Download<br />

The download is available via the following link:<br />

http://support.automation.siemens.com/WW/view/en/<br />

21331363<br />

To call the corresponding project file, open the<br />

"as_fe_i_004_v10_code_sdoor.zip" file offered as a separate<br />

download (on the HTML page) and extract it into a user defined<br />

directory. For downloading the project into the F-CPU<br />

please proceed as follows:<br />

■ First load the hardware configuration into the S7-CPU<br />

■ Switch to the SIMATIC Manager<br />

■ Select the "Blocks" container<br />

■ Menu "Options" -> Edit safety program.<br />

■ Click the "Download" button<br />

The sample code with the given configurations enables the<br />

following:<br />

■ An application (here: Machine simulated by indicator<br />

lights) can only be started if the safety door is closed.<br />

■ Opening the safety door during operation of the machine<br />

stops the application<br />

■ After each opening, the safety must be acknowledged prior<br />

to a restart.<br />

■ If an actuator breaks off during opening the safety door<br />

and gets stuck in the position switch, this error will be certainly<br />

recognized.<br />

Program procedure<br />

The (non-failsafe) FC "STANDARD" (FC 3) is called from OB 1<br />

(see following figure).<br />

...<br />

"START"<br />

"STOP"<br />

EN<br />

START<br />

STOP<br />

"STANDARD"<br />

COND<br />

ENO<br />

"COND"<br />

Parameter Adress Explanation<br />

START E 0.1 Push button (NO) for the start<br />

requirement.<br />

STOP E 0.1 Button (NC) for the stop requirement.<br />

COND M 90.0 Information for the safety program<br />

The information of the memory bit "COND" is read as memory<br />

bit COND1 in the safety program. This allocation occurs in the<br />

cyclic interrupt OB 35 for the following reason:<br />

When reading data, which may be changed by the standard<br />

user program or an operation control and monitoring system<br />

during running of an F runtime group, from the standard user<br />

program (memory bits or PAE of standard I/O), in the safety<br />

program, it is necessary to use separate memory bits (here<br />

COND1). Data from the standard user program have to be<br />

written to these memory bits immediately before calling the F<br />

runtime group. Only these memory bits may then be accessed<br />

in the safety program.<br />

Functional Example No. AS-FE-I-004-V10-EN 215<br />

G_FB_XX_111<br />

Ex. No.<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!