Access to bits of an integer
You can directly specify a bit within an integer variable in expressions and diagrams, using the following notation:
Variable.BitNo
Where:
Variable: is the name of an integer variable.
BitNo: is the number of the bit in the integer.
The variable can have one of the following data types:
SINT, USINT, BYTE (8 bits from .0 to .7)
INT, UINT, WORD (16 bits from .0 to .15)
DINT, UDINT, DWORD (32 bits from .0 to 31)
LINT (from 0 to 63)
0 always represents the less significant bit.
Access to bits of an integer |
IEC 61131-3 Automation platform > Programming - Reference guide > Basic Operations > Access to bits of an integer |
Created with the Personal Edition of HelpNDoc: How to Protect Your PDFs with Encryption and Passwords