Справочник Пользователя для Mitsubishi Electronics FX2NC

Скачать
Страница из 382
FX Series Programmable Controllers
Points Of Technique 10
10-24
10.15
PID Programming Techniques
10.15.1 Keeping MV within a set range
In the reserved registers of the PID data block S
3
+18 and S
3
+19 form a double word device
that contains the previous MV x K100. The following program uses this to keep MV under
control when it exceeds the operating limits.
Example Program to keep MV in the range K100 to K5000
If data registers are used to hold the limit values, it is possible to use a MUL instruction instead
of the DMOV. E.g. When D50 is upper limit use: MUL D50 K100 D38 because the result of
MUL is already a double word DMUL is not needed.
Resetting (S
3
+19, S
3
+18) in this way prevents runaway, which occurs if only MV is changed.
10.15.2 Manual/Automatic change over
In order to switch from automatic (PID) control to manual control and back to automatic it is
necessary for the PID process to perform 'Manual Tracking'. Although the FX PID instruction
does not have a manual tracking feature there are two methods that can be used to make the
switch from manual back to automatic as trouble free as possible.
To understand the reason for the two methods the following should be noted. The PID
instruction sets its initial output value based on the initial value of the output register.
When the PID instruction is switched on it can only do P as it has only 1 data reading. On the
first reading the current value of the output register is used as 
MV. Thereafter the previous
output value is used (stored in S
3
+18, S
3
+19). 
After the next reading PI can be calculated and from the third reading full PID is performed.
Please see section 5.98, PID (FNC 88), for the complete equations.
Method 1
It is recommended that if manual to auto switching is desired that the PID instruction is
switched off during manual operation and the operator controls the value of the MV register
(the Output Value). When returning to auto mode, the PID instruction is switched on again and
uses the last MV input by the operator during the first PID calculation. After 3 readings full PID
will be operating and the process should be under control quickly. (Assuming that manual
control did not cause a move too far from the Set Point.)
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
X10
D18
D19
D20
D46
PID
K100
K5000
D46
M20
ZCP
M20
K100
D46
MOV
K10000
D38
DMOV
M22
K5000
D46
MOV
K500000
D38
DMOV
SV
PV
Data
Block
MV
MV
MV
MV
MV
n-1
 x
K100
MV
n-1
 x
K100
Below
Lower Limit
Above
Upper Limit
Reset PID data to upper limit
MV > 5000: Fix MV to upper limit
Reset PID data to lower limit
MV < 100: Fix MV to lower limit
Check MV against range