Example Of Stl - Siemens SIMATIC S7-400H Manual

Automation system, fault-tolerant systems
Hide thumbs Also See for SIMATIC S7-400H:
Table of Contents

Advertisement

Example of STL

The requisite sections of the user program (OB1, OB 122) are listed below.
Table 7-6
STL
WBGA:
WBGB:
WBG0:
PZOK:
Automation System S7-400H Fault-tolerant Systems
A5E00068197-07
OB 1
Explanation
NOP
0;
SET;
R
VERSUCH2;
//Initialization
A
BGA;
//Read module A first?
JCN
WBGB;
//If No, continue with module B
SET;
R PZF_BIT;
//Delete PZF bit
L PED 8;
//Read CPU 0
U PZF_BIT;
//Was PZF detected in OB 122?
SPBN PZOK;
//If no, process access OK
U VERSUCH2;
//Was this access the second attempt?
SPB WBG0;
//If yes, use substitute value
SET;
R BGA;
//Do not read module A first any more
//in future
S VERSUCH2;
SET;
R PZF_BIT;
//Delete PZF bit
L PED 12;
//Read CPU 1
U PZF_BIT;
//Was PZF detected in OB 122?
SPBN PZOK;
//If no, process access OK
U VERSUCH2;
//Was this access the second attempt?
//If yes, use substitute value
SPB WBG0;
SET;
S
BGA;
//Read module A first again in future
S
VERSUCH2;
JU
WBGA;
L ERSATZ;
//Substitute value
//The value to be used is in Accumulator1
Using I/O on the S7-400H
7-39

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents