Multiplexer - Mitsubishi MELSEC-q Programming Manual

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

6 IEC FUNCTIONS

6.8.5 Multiplexer

One data is selected from among the specified data according to the specified selection condition.
Function definition
6 - 55
MUX
MUX_E
ANY MUX ( INT n, ANY S1, ANY S2,....,ANY Sn );
Argument
Argument Name
IN/OUT
n
IN
S1 to Sn
IN
Return value
Return Value
ANY
Selection result
When n = 1, return value = S1
When n = 2, return value = S2
:
When n = n, return value = Sn
Example of use
Argument Type
REAL
Real4 :=
MUX(Int1, Real1,Real2,
Real3);
INT
Int4:=
MUX( wCon1 , Int1 , Int2,
Int3 );
DINT
Dint4:=
MUX(D0, Dint1,Dint2,Dint3 );
BOOL
bBit4:=
MUX(3,bBit1,bBit2,bBit3);
Selection condition
Selection target data
:
ST Program
Conversion Result
LD=
EMOV
LD=
EMOV
LD=
EMOV
LD=
MOV
LD=
MOV
LD=
MOV
LD=
DMOV
LD=
DMOV
LD=
DMOV
LD=
MPS
AND
SET
MPP
ANI
RST
LD=
MPS
AND
SET
MPP
ANI
RST
LD=
MPS
AND
SET
MPP
ANI
RST
Description
Description
Used Instruction
Int1 K1
LD=,EMOV
Real1 Real4
Int1 K2
Real2 Real4
Int1 K3
Real3 Real4
wCon1 K1
LD=,MOV
Int1 Int4
wCon1 K2
Int2 Int4
wCon1 K3
Int3 Int4
D0 K1
LD=,DMOV
Dint1 Dint4
D0 K2
Dint2 Dint4
D0 K3
Dint3 Dint4
K3 K1
LD=,MPS,AND,SET,
MPP,ANI,RST
bBit1
bBit4
bBit1
bBit4
K3 K2
bBit2
bBit4
bBit2
bBit4
K3 K3
bBit3
bBit4
bBit3
bBit4
6 - 55

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents