TESTBIT
Function - Test a bit of an integer register.
Inputs
Input |
Data type |
Description |
IN |
ANY |
8 to 64 bit integer register. |
BIT |
DINT |
Bit number (0 = least significant bit). |
Outputs
Output |
Data type |
Description |
Q |
BOOL |
Bit value. |
Remarks
Types REAL, LREAL, TIME and STRING are not supported for IN and Q. IN and Q must have the same type. In case of invalid arguments (bad bit number or invalid input type) the function returns FALSE.
In LD language, the operation is executed only if the input rung (EN) is TRUE. The output rung is the output of the function.
ST Language
Q := TESTBIT (IN, BIT);
FBD Language
LD Language
The function is executed only if EN is TRUE.
|
TESTBIT |
IEC 61131-3 Automation platform > Programming - Reference guide > Registers > TESTBIT |
Created with the Personal Edition of HelpNDoc: Streamline Your Documentation Creation with a Help Authoring Tool