0% found this document useful (0 votes)
4 views

PID

The document provides detailed instructions for using the PID control loop in PLC programming, outlining the operands, program steps, and specific settings for both 16-bit and 32-bit instructions. It explains the function of each operand, the required parameter settings, and the operational limits of the PID instruction. Additionally, it includes remarks on compatibility, usage frequency, and examples for proper implementation in a program.

Uploaded by

mevlutbal298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

PID

The document provides detailed instructions for using the PID control loop in PLC programming, outlining the operands, program steps, and specific settings for both 16-bit and 32-bit instructions. It explains the function of each operand, the required parameter settings, and the operational limits of the PID instruction. Additionally, it includes remarks on compatibility, usage frequency, and examples for proper implementation in a program.

Uploaded by

mevlutbal298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

API Mnemonic Operands Function

88 D PID PID Control Loop

Type Bit Devices Word Devices Program Steps


OP X Y M S K H KnX KnY KnM KnS T C D E F PID : 9 steps
S1 * DPID: 17 steps
S2 *
S3 *
D *
PULSE 16-bit 32-bit
EH3 EH3 EH3
ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV
SV2 SV2 SV2

Operands:
S1: Set value (SV) S2: Present value (PV) S3: Parameter D: Output value (MV)

Explanations:
1. In the 16-bit instruction, S3 will occupy 20 consecutive devices; in the 32-bit instruction, S3 will occupy 21
consecutive devices.
2. See the specifications of each model for their range of use.
3. See the Remarks below for the times of using PID instruction allowed in the program.
4. This instruction is specifically for PID control. PID operation will be executed by the scan only when the sampling
time is reached. PID refers to “proportion, integration and differential”. PID control is widely applied to many
machines, pneumatic and electronic equipments.
5. For the 16-bit instruction, the parameters are S3 ~ S3+19; for the 32-bit instruction, the parameters are S3 ~ S3+20.
After all the parameters are set up, PID instruction will start to be executed and the results will be stored in D. D
has to be the data register area without latched function. (If you wish to designate a latched data register area,
place the data register in the latched area at the beginning of the program and clear it as 0.)

Program Example:
1. Complete the parameter setting before executing PID instruction.
2. When X0 = On, the instruction will be executed and the result will be stored in D150. When X0 goes Off, the
instruction will not be executed and the data prior to the instruction will stay intact.
X0
PID D0 D1 D100 D150

Remarks:
1. ES/EX/SS series MPU V5.7 (and above) supports PID instruction. Other versions do not support the instruction.
2. There is no limitation on the times of using this instruction. However, the register No. designated in S3 cannot be
repeated.
3. For the 16-bit instruction, S3 will occupy 20 registers. In the program example above, the area designated in S3 is
D100 ~ D119. Before the execution of PID instruction, you have to transmit the setting value to the designated
register area by MOV instruction, If the designated registers are latched, use MOVP instruction to transmit all
setting value at a time.

D V P - P L C AP P L I C AT I O N M A N UA L 7-133
4. Settings of S3 in the 16-bit instruction
Device No. Function Setup Range Explanation
If TS is less than 1 program scan time, PID
instruction will be executed for 1 program scan
Sampling time (TS) 1 ~ 2,000
S3: time. If TS= 0, PID instruction will not be enabled.
(unit: 10ms) (unit: 10ms)
The minimum TS has to be longer than the
program scan time.
The magnified error proportional value between
S3 +1: Proportional gain (KP) 0 ~ 30,000 (%)
SV – PV.
S3 +2: Integral gain (KI) 0 ~ 30,000 (%) For control mode K0~K8
S3 +3: Differential gain (KD) -30,000 ~ 30,000 (%) For control mode K0~K8
0: automatic control
1: forward control (E = SV - PV)
2: inverse control (E = PV - SV)
3: Auto-tuning of parameter exclusively for the temperature control. The
device will automatically become K4 when the auto-tuning is
completed and be filled in with the appropriate parameter KP, KI and
KD (not avaliable in the 32-bit instruction).
4: Exclusively for the adjusted temperature control (not avaliable in the
32-bit instruction).
5: Auto direction control (limited integrall upper/lower limit)
S3 +4: Control mode P.S. K5 mode is only available in SV/EH2/EH3/SV2 V1.2, SA/SX V1.8
and SC V1.6, and EH3/SV2 V1.0.
7: Manual control 1: Users set an MV. The accumulated integral value
increases according to the error. It is suggested that the control mode
should be used in a control environment which changes more slowly.
EH3 V1.62 and SV2 V1.62 are supported.
8: Manual control 2: Users set an MV. The accumulated integral value
will stop increasing. When the control mode becomes the automatic
mode (the control mode K5 is used), the instruction PID outputs an
appropriate accumulated integral value according to the last MV. EH3
V1.62 and SV2 V1.62 are supported.
The range that error E = the error of SV – PV. When S3 +5 = K0, the
S3 +5: value (E) doesn’t 0 ~ 32,767 function will not be enabled, e.g. when S3 +5 is
work set as 5, MV of E between -5 and 5 will be 0.
Ex: if S3 +6 is set as 1,000, the output will be
Upper bound of output 1,000 when MV is bigger than 1,000. S3 +6 has
S3 +6: -32,768 ~ 32,767
value (MV) to be bigger or equal S3 +7; otherwise the upper
bound and lower bound will switch.

7-134 D V P - P L C AP P L I C AT I O N MA N U AL
Device No. Function Setup Range Explanation
Lower bound of output Ex: if S3 +7 is set as -1,000, the output will be
S3 +7: -32,768 ~ 32,767
value (MV) -1,000 when MV is smaller than -1,000.
Ex: if S3 +8 is set as 1,000, the output will be
1,000 when the integral value is bigger than
Upper bound of
S3 +8: -32,768~32,767 1,000 and the integration will stop. S3 +8 has to
integral value
be bigger or equal S3 +9; otherwier the upper
bound and lower bound will switch.
Ex: if S3 +9 is set as -1,000, the output will be
-1,000 when the integral value is smaller than
Lower bound of
S3 +9: -32,768 ~ 32,767 -1,000 and the integration will stop. If S3+8 and
integral value
S3+9 are set to 0, there will be no upper limit for
integration.
The accumulated integral value is only for
Accumulated integral
S3 +10,11: 32-bit floating point reference. You can still clear or modify it (in
value
32-bit floating point) according to your need.
The previous PV is only for reference. You can
S3 +12: The previous PV -32,768~32,767
still modify it according to your need.
S3 +13:
For system use only.
~

S3 +19:

5. When parameter setting exceeds its range, the upper bound and lower bound will become the setting value.
However, if the motion direction (DIR) exceeds the range, it will be set to 0.
6. PID instruction can be used in interruption subroutines, step points and CJ instruction.
7. The maximum error of sampling time TS = - (1 scan time + 1ms) ~ + (1 scan time). When the error affects the
output, please fix the scan time or execute PID instruction in the interruption subroutine of the timer.
8. PV of PID instruction has to be stable before the execution of PID instruction. If you are to extract the input value
of DVP04AD/04DA/06XA/04PT/04TC for PID operation, please be aware of the A/D conversion time of these
modules.
9. For the 32-bit instruction, If S3 designates the parameter setting area of PID instruction as D100 ~ D120, S3
occupies 21 registers. Before the execution of PID instruction, you have to use MOV instrction first to send the
setting value to the register area for setup. If the designated registers are latched one, use MOVP instruction to
send all the setting value at a time.
10. Settings of S3 in the 32-bit instruction
Device No. Function Setup range Explanation
If TS is less than 1 program scan time, PID
instruction will be executed for 1 program
Sampling time (TS) 1 ~ 2,000
S3: scan time. If TS= 0, PID instruction will not be
(unit: 10ms) (unit: 10ms)
enabled. The minimum TS has to be longer
than the program scan time.

D V P - P L C AP P L I C AT I O N M A N UA L 7-135

You might also like