2070
APPX
Appendix 5 PID Control Program Examples
Program examples for PID control when switching modes
The program performs PID operation by switching an automatic mode and a manual mode.
The program conditions are as follows:
In manual mode, the set value (SV) is automatically rewritten to the process value (PV) when PID operation is
performed. Therefore, when the manual mode is returned to the automatic mode, the set value (SV) must be
rewritten to the one used before the mode was switched.
The set value (SV) is rewritten in 10 steps as shown below:
The following formula is used to rewritten the set value (SV).
SV
m
: SV in manual mode
SV
a
: SV in automatic mode
The value obtained with the above operational expression is subtracted from the set value (SV) every second.
The remainder is subtracted in the first subtraction.
Item
Inexact differential
Exact differential
Number of loops that performs PID operation
1
Sampling period
1 second
Device where PID control data are set
Common data
D500, D501
Loop 1 data
D502 to D515
D502 to D511
Device where I/O data are set
Common data
D600 to D609
Loop 1 data
D610 to D630
D610 to D627
Set value (SV) set by external digital
switches and manipulated value (MV)
in manual mode
SV
X30 to X3F
MV in manual mode
X20 to X2F
Device used to start/stop PID control
PID control start command
X0
PID control stop command
X1
Device used to switch the mode
SV set command
X3
MV (in manual mode) set
command
X4
Automatic/manual switch
command
X6 (Off: Automatic mode, On: Manual mode)
Digital value of the R60AD4 and R60DA4
0 to 2000
SM792, SM794
Off
1s
1s
1s
1s
10s
SV in manual mode
Mode change
command
SV in automatic mode
10
-
=
.........
SV
m
SV
a
Subtraction
value
Remainder
Summary of Contents for MELSEC iQ-R Series
Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...
Page 34: ...32 MEMO ...
Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...
Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...
Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...
Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...
Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...
Page 2109: ......