Appendices - Mitsubishi MELSEC-Q series Programming Manual

Process control instructions
Hide thumbs Also See for MELSEC-Q series:
Table of Contents

Advertisement

APPENDICES

Appendix 1
In the following program, the operation mode at power-on is in manual mode. When X10 turns ON, the mode switches to
automatic mode and the module starts PID control.
X10
0
SM402
5
X1
8
X1
10
X2
12
X2
14
X0
16
T0
21
M0
24
31
P1
SM400
32
Program Example
MOVP
H10
R1001
MOVP
H0
R1003
CALL
P0
SM1500
SET
RST
SM1500
SET
SM1501
RST
SM1501
K1
T0
PLS
M0
CALL
P1
RST
T0
FEND
FLT
D0
R0
S.IN
R0
R100
R200
R1000
EMOV
R100
R20
S.PHPL
R20
R120
R220
R1000
EMOV
R120
R40
S.PID R40
R140
R240
R1000
R300
EMOV
R140
R60
S.OUT1
R60
R160
R260
R1000
INT
R160
D1
Changes operation mode to AUTO.
Changes Alarm Detection (ALM) to 0.
Jumps to P0 label when SM402 is ON.
Sets last value hold processing.
Resets last value hold processing.
Sets output value hold processing.
Resets output value hold processing.
Match with the time set for the execution cycle.
Jumps to P1 label when M0 is ON.
Changes T0 data to 0 when M0 turns ON.
Indicates the end of sequence program where SM402 is OFF.
Converts D0 value into real number and stores it into R0.
Sets each head device of S.IN instruction.
Transfers R100 value of S.IN instruction to R20 of S.PHPL.
Sets each head device of S.PHPL instruction.
Transfers R120 value of S.PHPL instruction to R40 of S.PID.
Sets each head device of S.PID instruction.
Transfers R140 value of S.PID instruction to R60 of S.OUT1.
Sets each head device of S.OUT1 instruction.
Converts R160, R161 real number into binary.
1
2
3
4
1
6
A
8
255

Advertisement

Table of Contents
loading

Table of Contents