EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #215 background imageLoading...
Page #215 background image
Program instructions
7.5 Convert
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
215
7.5.5
Encode and decode
LAD / FBD
STL
Description
ENCO IN, OUT
Encode writes the bit number of the least significant bit set in the input word IN, to
the least significant "nibble" (4 bits) of the output byte OUT.
DECO IN, OUT
Decode sets the bit in the output word OUT that corresponds to the bit number
represented by the least significant "nibble" (4 bits) of the input byte IN. All other
bits of the output word are set to 0.
Non-fatal error conditions with ENO =
0
SM bits affected
0006H Indirect address
None
Input / output
Data type
Operand
IN
WORD (ENCO)
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AIW, *VD, *LD, *AC, Constant
BYTE (DECO)
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
OUT
BYTE (ENCO)
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC
WORD (DECO)
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AQW, *VD, *LD, *AC
Example: Encode and decode
LAD
STL
If AC2 contains error bits:
1. The DECO instruction
sets the bit in VW40 that
corresponds to this error
code
2. The ENCO instruction
converts the least signif-
icant bit set to an error
code that is stored in
VB50.
Network 1
LD I3.1
DECO AC2, VW40
ENCO AC3, VB50

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals