EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 154

Mitsubishi Electric MELSEC FX Series
838 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 Applied Instructions
7.2 Move and Compare
152
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Program examples
1. When reading the current value of a timer and counter
2. When indirectly specifying the set value of a timer or counter
As the set value of the timer T20, two values can be specified by turning ON or OFF the switch X002.
For specifying more than two set values, more than one switch is required.
3. When transferring a bit device
The program written by basic instructions shown below can be expressed using MOV instruction.
(Current value of T0) (D20)
The operation is the same as a counter.
X001
MOV
EN
s
ENO
d
TN0 D20
[Structured ladder] [ ST ]
MOV(X001,TN0,D20);
(K100) (D 10)
D 10=K100(10-second timer)
D 10=K50(5-second timer)
When X002 is ON,
When X002 is OFF,
(K50)
(D 10)
D10
D10
X002
X002
MOV
EN
s
ENO
d
K100
MOV
EN
s
ENO
d
K50
OUT_T
EN ENO
TC20
M0
TCoil
TValue
D10
[Structured ladder]
[ ST ]
MOV(X002, K100, D10);
MOV(NOT X002, K50, D10);
OUT_T(M0, TC20, D10);
X000
X001
X002
X003
Y000
Y001
Y002
Y003
MOV(M8000, K1X000, K1Y000);
[
Structured ladder
]
[ ST ]
RUN
monitor
M8000
MOV
EN
s
ENO
d
K1X000
K1Y000

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals