Basic instructions
7.9 Word logic operations
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
277
Table 7- 133 Data types for the parameters
IN ENCO: Byte, Word, DWord
ENCO: Bit pattern to encode
OUT ENCO: Int
ENCO: Encoded value
DECO: Decoded bit pattern
Table 7- 134 ENO status
The DECO parameter OUT data type selection of a Byte, Word, or DWord restricts the
useful range of parameter IN. If the value of parameter IN exceeds the useful range, then a
modulo operation is performed to extract the least significant bits shown below.
DECO parameter IN range:
● 3 bits (values 0-7) IN are used to set 1 bit position in a Byte OUT
● 4-bits (values 0-15) IN are used to set 1 bit position in a Word OUT
● 5 bits (values 0-31) IN are used to set 1 bit position in a DWord OUT
Table 7- 135 Examples
DECO OUT value ( Decode single bit position)
Byte OUT
Word OUT
DWord OUT
00000000000000000000000000000001
10000000000000000000000000000000