19.08.2013 Views

Safety Integrated - Industry - Siemens

Safety Integrated - Industry - Siemens

Safety Integrated - Industry - Siemens

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Ex. No.<br />

3<br />

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 />

in safety category 4. In this example, the hazardous machine<br />

is simulated by an indicator light. The conditions necessary<br />

for the actuators to reach safety category 4 (e.g. read<br />

back of actuator signals) are not considered in this example.<br />

Note<br />

With this example, no real machine is controlled. The indicator<br />

lights simulate the state of a hazardous machine<br />

activity. The state "Machine in STOP" or "Machine in<br />

RUN" is simulated by a (NO) push button<br />

("0" signal means: "Machine in STOP").<br />

Download<br />

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

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

21064258<br />

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

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

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

defined 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 />

202 Functional Example No. AS-FE-I-003-V10-EN<br />

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

following:<br />

■ A safety door is guard locked until the hazardous action<br />

(example of a "machine" in RUN) is over.<br />

■ The safety door is interlocked and unlocked by setting/resetting<br />

a failsafe module (F-DO) of the ET 200S.<br />

Program procedure<br />

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

(see following figure).<br />

...<br />

"START"<br />

"E_MAGNET"<br />

"STOP"<br />

EN<br />

START<br />

E_MAGNET<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 requirement.<br />

E_MAGNET E 0.0 Position monitoring of the unlocking<br />

magnet in the safety position switch.<br />

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

COND M 90.0 Saves the information start/ stop of<br />

the "machine".<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 OB35 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 />

In this example it has already been implemented. Generally,<br />

however, the following applies:<br />

Note<br />

If the above section is not observed the F CPU may go to<br />

STOP mode.<br />

G_FB_XX_099

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

Saved successfully!

Ooh no, something went wrong!