Standard function blocks
298
BITOR
(10036)
Illustration
Execution time 0.32 µs
Operation The output (O) bit value is 1 if the corresponding bit value of any of the inputs (I1 or I2)
is 1. Otherwise the output bit value is 0.
Example:
Input Input (I1, I2): DINT
Output Output (O): DINT
BSET
(10037)
Illustration
Execution time 1.36 µs
Operation The value of a selected bit (BITNR) of the input (I) is set as defined by the bit value input
(BIT). The function must be enabled by the enable input (EN).
BITNR: Bit number (0 = bit number 0, 31 = bit number 31)
If BITNR is not in the range of 0…31 (for DINT) or 0…15 (for INT) or if EN is reset to
zero, the input value is stored to the output as it is (i.e. no bit setting occurs).
Example:
EN = 1, BITNR = 3, BIT = 0
IN = 0000 0000 1111 1111
O = 0000 0000 1111 0111
Inputs The input data type is selected by the user.
Enable input (EN): Boolean
Number of the bit (BITNR): DINT
Bit value input (BIT): Boolean
Input (I): INT, DINT
BITOR
66
TLA1 1 msec (1)
I1
I2
O
O(66)
I1 11100000111001011101001100110101
I2 00000111001011101001100110101111
O 11100111111011111101101110111111
BSET
(DINT) 67
TLA1 1 msec (1)
EN
BITNR
BIT
I
O
O(67)