IOR block
Short summary
Name |
IOR |
→POU type |
|
Category |
|
Conform to →IEC-standard |
not defined in IEC-standard |
Graphical interface |
|
Available since |
version 1.23.0 (for logi.CAD 3) |
Functionality
The block returns the result of a bitwise OR operation of all values connected to the inputs of ANY_INT.
Compare: "OR block" for OR operation for values of ANY_BIT.
Inputs, return value
|
Identifier |
Description |
|
Inputs: |
IN1 |
USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT(corresponds to →generic data type ANY_INT) |
1st value |
IN2 |
USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT(corresponds to →generic data type ANY_INT) |
2nd value |
|
... (extensible until) |
|||
IN16 |
USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT(corresponds to →generic data type ANY_INT) |
16th value |
|
Return value: |
– |
USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT(corresponds to →generic data type ANY_INT) |
|
Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.
Example for usage within ST-editor
PROGRAM Test
VAR
result1, result2, result3, result4 : INT;
END_VAR
result1 := IOR(IN1 :=
2
, IN2 :=
2
); (* The variable
'result1'
evaluates to
'2'
. *)
result2 := IOR(IN1 :=
2
, IN2 :=
5
); (* The variable
'result2'
evaluates to
'7'
. *)
result3 := IOR(IN1 :=
5
, IN2 :=
2
); (* The variable
'result3'
evaluates to
'7'
. *)
result4 := IOR(IN1 :=
5
, IN2 :=
5
); (* The variable
'result4'
evaluates to
'5'
. *)
END_PROGRAM
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.