Delta Electronics DVP15MC11T Operation Manual page 210

Table of Contents

Advertisement

When the data types of input variables are not BOOL, TIME, DATE, TOD or STRING, the input
parameters In0~InN are allowed to connect the variables of different data types.
When the data types of input variables are one of BOOL, TIME, DATE, TOD and STRING, all the
input variables and output variable should be of the data type. For example, if the data type of In0 is
TIME, the data types of the variables connected to In1~InN and Out must be TIME. Otherwise, an
error will occur during 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
the input variables are omitted. But the output variable is allowed to omit.
The length of the data type of the output variable must contain the length of the variables that the
input parameters In0 ~ InN connect. Otherwise, an error will occur during the compiling of the
software.
Programming Example
The data types of MUX_K, MUX_In0 and MUX_In1 are UINT, UINT and DINT and the data type of
Out1 is DINT. When MUX_EN is TRUE, the value of Out1 is 50 if the values of MUX_K, MUX_In0
and MUX_In1 are 0, 50 and 100 as shown in the following table Variable 1. If the values of MUX_K,
MUX_In0 and MUX_In1 are 1, 50 and 100, the value of Out1 is 100 as shown in the following table
Variable 2.
Variable 1
Variable name
MUX_EN
MUX_K
MUX_In0
MUX_In1
Out1
Variable 2
Variable name
MUX_EN
MUX_K
MUX_In0
MUX_In1
Out1
The program
The value of K
0
1
2
3
4
5
6
7
MUX
MUX_E N
EN
MUX_K
K
MUX_ In0
In0
MUX_ In1
In1
Chapter 8 Logic Instructions
The value of Out
In0
In1
In2
In3
In4
In5
In6
In7
Data type
BOOL
USINT
UINT
DINT
DINT
Data type
BOOL
UINT
UINT
DINT
DINT
1
ENO
Ou t
O ut1
Current value
TRUE
0
50
100
50
Current value
TRUE
1
50
100
100
8-139
8_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents