Data conversion instructions Chapter 12
Rockwell Automation Publication 2080-RM001D-EN-E - February 2015 279
ANY_TO_BYTE converts a value to an 8-bit Byte value.
Arguments
Parameter Parameter Type Data Type Description
EN Input BOOL Function enable.
When Enable = TRUE, execute the conversion to the 8-bit BYTE
computation.
When Enable = FALSE, there is no computation.
Applies only to LD programs.
i1 Input BOOL - SINT -USINT - INT - UINT
- WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD
- REAL - LREAL - TIME - DATE -
STRING
Any non-Byte value.
o1 Output BYTE An 8-bit Byte value.
ENO Output BOOL Enable out.
Applies only to LD programs.
ANY_TO_BYTE operator ST language example
(* ST Equivalence: *)
bres := ANY_TO_BYTE (true);
tres := ANY_TO_BYTE (t#0s46ms);
mres := ANY_TO_BYTE ('0198');