Example Of Setting An Error Bit Using Decode For Lad, Stl, And Fbd; Example Of Converting The Error Bit Into An Error Code Using Encode For Lad, Stl, And Fbd - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

SIMATIC Instructions
Decode, Encode Examples
I3.1
EN
AC2
IN
AC2 contains the error code 3. The DECO instruction
sets the bit in VW40 that corresponds to this error code.
Figure 9-43
I3.1
AC2
AC2 contains the error bit. The ENCO instruction converts the
least significant bit set to an error code that is stored in VB40.
Figure 9-44
9-136
LAD
DECO
Set the bit that corresponds
ENO
to the error code in AC2.
OUT
VW40

Example of Setting an Error Bit Using Decode for LAD, STL, and FBD

LAD
ENCO
Convert the error bit in AC2
EN
ENO
to the error code in VB40.
IN
OUT
VB40
Example of Converting the Error Bit into an Error Code Using Encode for LAD,
STL, and FBD
LD
I3.1
DECO
AC2, VW40
I3.1
AC2
Application
AC2
15
VW40
0000 0000 0000
LD
I3.1
ENCO
AC2, VB40
I3.1
AC2
Application
AC2
VB40
S7-200 Programmable Controller System Manual
STL
FBD
DECO
EN
ENO
IN
OUT
VW40
3
DECO
3
0
1000
STL
FBD
ENCO
EN
ENO
IN
OUT
VB40
15
9
0
1000 0010 0000 0000
ENCO
9
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents