Siemens SIMATIC S7-400H Manual page 85

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 6-1
STL
WBGA:
WBGB:
WBG0:
PZOK:
S7-400H Programmable Controller Fault-Tolerant Systems
A5E00068197-04
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?
JCN PZOK;
//If No, process access OK
U VERSUCH2;
//Was this access the second attempt?
JC 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?
JCN PZOK;
//If No, process access OK
U VERSUCH2;
//Was this access the second attempt?
JC WBG0;
//If Yes, use substitute value
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
6-13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents