hit counter script

Siemens SIMATIC S7 System Manual page 128

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Programming instructions
6.1 Basic instructions
Parameter
IN
OUT
Encode and decode instructions
Parameter
IN
OUT
The ENCO instruction converts parameter IN to the binary number corresponding to the bit
position of the least-significant set bit of parameter IN and returns the result to parameter
OUT. If parameter IN is either 0000 0001 or 0000 0000, then a value of 0 is returned to OUT.
If the parameter IN value is 0000 0000, then ENO is set to FALSE.
The DECO instruction decodes a binary number from parameter IN, by setting the
corresponding bit position in parameter OUT to a 1 (all other bits are set to 0). ENO is
always TRUE following execution of the DECO instruction.
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 double word OUT
128
Data type
SInt, Int, DInt, USInt, UInt, UDInt, Byte, Word, DWord
SInt, Int, DInt, USInt, UInt, UDInt, Byte, Word, DWord
ENCO encodes a bit pattern to a binary number.
DECO decodes a binary number to a bit pattern.
Click below the box name and select a data type from the
drop-down menu.
Data type
ENCO: Byte, Word, DWord
DECO: UInt
ENCO: Int
DECO: Byte, Word, DWord
Description
Data element to invert
Inverted output
Description
ENCO: Bit pattern to encode
DECO: Value to decode
ENCO: Encoded value
DECO: Decoded bit pattern
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents

Save PDF