User`s manual

4 - 2 4 - 2
MELSEC-Q
4 HOW TO EXECUTE PROCESS CONTROL INSTRUCTIONS
4.2 Concept of Program
[Program example using S.2PID instruction at execution cycle of 1s]
T0
Loop tag memory setting
Operation constant setting
K10
(1s)
T0
PLS M0
M0
MOV U0\GO D0
CALL P1
RST T0
FLT D0 R0
FEND
SM400
S.IN R0 R100 R200 R1000
EMOV R100 R20
S.PHPL R20 R120 R220 R1000
EMOV R120 R40
S.2PID R40 R140 R240 R1000 R300
EMOV R140 R60
S.OUT1 R60 R160 R260 R1000
P1
MOV D1 U2\G0
INT R160 D1
RET
Loop tag memory setting
S.IN instruction
S.PHPL instruction
S.2PID instruction
S.OUT1 instruction
Execution cycle measurement
Process control instruction
designation
Setting of data for S.IN,
S.PHPL, S.2PID and S.OUT1
Operation constant setting
Input data (PV) setting
Import of data (PV) from
A/D converter module or like
MV output
Output of MV from D/A
converter module or like
Execution
command
4