Delta Electronics DVP15MC11T Operation Manual page 185

Table of Contents

Advertisement

DVP15MC11T Operation Manual
In1~InN are allowed to be the variables of different data types when none of the data types of input
variables are BOOL.
When In1 to InN are the variables of different data types, take the data type which can include all
ranges of the values of In1~InN for the operation.
For example, if the data type of In1 is BYTE and In2 is WORD, the data type of Out is WORD. In
operation, the value of In1 is converted from BYTE to WORD as shown in the following figure. Bit8~
Bit 15 are complemented and their values are all 0. And then the logical OR of the bit values of In1
and In2 is conducted as below.
If the data type of an input variable is BOOL, the data types of all input and output variables are
required to be BOOL. Otherwise, an error will occur in the compiling of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if any
input variable is omitted. But the output variable is allowed to omit.
Programming Example
The data types of OR_In1, OR_In2 and Out1 are all BYTE. The values of OR_In1 and OR_In2 are
10 and 50 respectively and the value of Out1 is 58 when OR_EN is TRUE.
The variable table and program
_8
OR_EN
OR_In1
OR_In2
Out1
8-114
Bit7
In1
0
0
1
1
0
0
In2
In3
0
0
1
1
0
1
Out
Bit15
0
0
0
0
I n1_WO RD
0
0
1
1
In2
0
0
1
1
Out
Variable name
OR_EN
OR_In 1
OR_In 2
1
0
1
1
1
1
1
0
1
1
1
1
B it 7
I n1
0
0
1
1
Bit8
0
0
0
0
0
0
1
1
0
1
0
0
1
0
1
0
0
1
0
0
1
0
1
1
Data type
BOOL
BYTE
BYTE
BYTE
1
O R
EN
E NO
I n1
Out
Ou t1
In2
B it 0
0
0
1
0
0
0
1
0
Bit0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
Current value
TRUE
10
50
58

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents