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.

Ex. No.<br />

9 Sample Code<br />

Preliminary Remarks<br />

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

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

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

in the functional examples 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 />

Two three-phase asynchronous motors can be started independently<br />

of one another with separate push buttons (NO).<br />

The motors are either safely stopped:<br />

1. individually (respectively one emergency stop button assigned<br />

to one group) or<br />

2. as group shutdown. An emergency stop button exists that<br />

switches off all groups (stopping all motors).<br />

Download<br />

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

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

21330890<br />

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

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

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

defined directory.<br />

For downloading the project into the F-CPU please proceed as<br />

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

■ Independent starting of two motors M1 (group 1)and M2<br />

(group 2).<br />

■ Safe shutdown of individual groups (motor M1 and/or M2)<br />

■ Group shutdown for both motors (M1 and M2)<br />

288 Functional Example No. AS-FE-I-009-V10-EN<br />

Note<br />

Operational stopping has not been prepared in this<br />

example.<br />

Program procedure<br />

The standard user program consists of two networks of OB 1.<br />

Network 1<br />

"START_M1"<br />

"INSTANZ_<br />

FB1".EN1<br />

"INSTANZ_<br />

FB1"<br />

ERROR1<br />

The signal for operational starting (START_M1) for group 1<br />

consisting of motor M1 is given in network 1.<br />

The "INSTANZ_FB1".... ensures that the motor cannot be<br />

started with an acknowledgement transmitted in the safety<br />

program. As long as on of these bits is "0", COND1= "0" remains<br />

true also if the start button is pressed, since the reset<br />

function has priority in this flip-flop type.<br />

Network 2<br />

"START_M2"<br />

"INSTANZ_<br />

FB1".EN2<br />

"INSTANZ_<br />

FB1"<br />

ERROR2<br />

"P1" "SR1"<br />

P<br />

SR<br />

S<br />

>=1<br />

R Q<br />

"P2" "SR2"<br />

P<br />

SR<br />

>=1<br />

"COND1"<br />

=<br />

"COND2"<br />

=<br />

Basically the above information on network 1 applies to group<br />

2 with motor M2.<br />

The information of the flags "COND1" and "COND2" from the<br />

networks 1 and 2 is read in the safety program as flag<br />

COND1_F or COND2_F. This allocation occurs in the cyclic interrupt<br />

OB 35 for the following reason:<br />

If you want to read data from the standard user program (flags<br />

or PII of standard I/O) in the safety program (here: COND1 or<br />

S<br />

R Q<br />

G_FB_XX_171<br />

G_FB_XX_172

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

Saved successfully!

Ooh no, something went wrong!