PID Instruction

Specifications

Item

Specification

Remarks

Range to Set PID Constant

Proportional Constant(Kp)

1 – 10000 (0.01 – 100.00)

 

Integral Constant (Ki)

0 – 30000 (0.0s – 3000.0s)

0 : No Integral Operation

Differential Constant (Kd)

0 – 30000 (0.00s – 300.00s)

0 : No Differential Operation

Sampling Interval (Ts)

1 – 6000 (0.01s – 60.00s)

 

Range of Set Value(SV)

0 – 16,000

 

Range of Current Value(PV)

0 – 16,000

 

Range of Manipulated Output Value(MV)

0 – 16,000

 

Range of Manually Manipulated Value

0 – 16,000

 

PID Control Loop

32 Loop

 

Control Operation

Normal/Reverse Operation

 

Type of Operation

Differentiates measured values

 

 

 PID Special Program :

image-20240321-060605.png

Automatically created PID program by above dialog box uses two data tables for the loop control. As shown in the above picture,
one table (‘A’) is manipulated for PID initialization and the other table (‘B’) is used for the actual PID calculation. These two tables are summarized as followings. These device memory areas should not be overlapped by the other program memory area.

 

PIDINIT Instruction (A)

Instruction Operation

This is used to check the items set up for PID operation, and to initialize the devices for PID operation.
PIDINIT instruction is to be operated once initially in an initialization program. If an error occurs in a set value or etc.
while initializing, the PIDCAL instruction in a main program is not operated. But, in case of several loops, corresponding
loops only are not operated.

 

Instruction Form

PIDINIT " The start address among the devices where set values are stored "

Ex) If the set values of PID are stored from D0008 => PIDINIT D0008

 

Set Items

Offset

Item

Description

Range

Remarks

0

Number of Loops

 

1 – 32

Common for entire loops

1

Number of Loops for a Scan

 

1 – 32

2(0)

Operation Expression

Normal(0)/Reverse(1)

0 / 1

By loops

3(1)

Sampling Interval (Ts)

0.01 – 60.00s

1 – 6000

4(2)

Proportional Integer (Kp)

0.01 – 100.00

1 – 30000

5(3)

Integral Integer (Ki)

0.01 – 300.00s

0 – 30000

6(4)

Differential Integer (Kd)

0.00 – 300.00s

0 – 30000

7(5)

Filter Coefficient (¥á)

0.00 – 1.00

0 – 100

8 (6)

Min. Manipulated Value (MVLL)

0 – 16000

0 – 16000

9 (7)

Max. Manipulated Value (MVHL)

0 – 16000

0 – 16000

10 (8)

Variation Rate Limit of

Manipulated Value (∆MVL)

0 – 16000

0 – 16000

11 (9)

MV Transfer

Not Use(0)/Use(1)

0 / 1

12 (10)

SV Steadiness

Not Use(0)/Use(1)

0 / 1

13 (11)

States of PIDINIT

Indicates Errors

*Table

14 (12)

Devices for PID operation

Not Available to Users

 

 

15 (13)

 

16 (14)

 

17 (15)

 

18 (16)

 

19 (17)

 

20 (18)

 

21 (19)

 

 

 

 Statuses of PIDINIT

CODE

Item

Description

Range

0

No Error

 

 

1

Error in Number of Loops

In the case a value is out of the range(1~32)

Common for all the  loops, Stored in the start Loop Status device

2

Disable

Disable

3

Error in Operation Expression

In the case a value except 0 and 1 is selected

By Loops

4

Error in Sampling Interval (Ts)

In the case a value is out of the range(1~6000)

5

Error in Proportional Integer (Kp)

In the case a value is out of the range(1~10000)

6

Error in Integral Integer (Ki)

In the case a value is out of the range(0~30000)

7

Error in Differential Integer (Kd)

In the case a value is out of the range(0~30000)

8

Error in Filter Coefficient (¥á)

In the case a value is out of the range (0~100)

9

Error in Min. Manipulated Value (MVLL)

In the case a value is out of the range(0~16000)

10

Error in Max. Manipulated Value (MVHL)

In the case a value is out of the range(0~16000)

11

Error in Variation Rate Limit of Manipulated Value

(∆MVL)

In the case a value is out of the range(0~16000)

12

Error in MV Transfer

In the case a value except 0 and 1 is selected

13

Error in SV Steadiness

In the case a value except 0 and 1 is selected

14

Error in AutoTuning PID Calculation Value

In the case AutoTuning PID calculation value is out of range

15

Error in AutoTuning dMV Value

In the case AutoTuning fails because dMV is not calculated with MV maximum output

16

Failure of AutoTuning Initial Stabilization

In the case Stabilization fails when using the initial stabilization function of AutoTuning

 

 

  1. Number of Loops
    This is used to set up the number of loops to operate PID. To control an object, one PID operation loop is used.

  2. Number of Loops for a Scan
    This is used to set up the number of loops for one scan in case of several loops at sampling intervals.

  3. Operation Expression
    Normal(0) : This is the operation to output a manipulated value(MV) to get a current value to a target value in case that the current value(PV) is less than the target value(SV).
    Reverse(1) : This is the operation to output a manipulated value(MV) to get a current value near to a target value in case the current value(PV) is greater than the target value(SV).

  4. Sampling Interval(Ts)
    This is used to set up the interval at which PID is operated.

  5. Proportional Integer (Kp)
    This, as the constant which is multiplied to a deviation(Sv - Pv) in the proportional operation
    " Mv = Kp * (Sv - Pv) ", is the constant for the proportional operation of PID control. In the above expression, a current value
    reaches a target value fast if a proportional integer(Kp) is big. But, if this value is too big, that gives bad influence on a stable control.

  6. Integral Integer (Ki)
    This is the constant to add deviation to a manipulated value or subtract deviation from the manipulated value according
    to time continuously in the integral operation "Mv = P * E + P * 1/Ki * dE/dt" in order to clear the deviation, in case that the deviation(E)
    between a target value(Sv) and a current value(Pv) occurs. As proportional operation is not big influence on the variation of a manipulated
    value, in case of small deviation, the effect to clear the deviation can be gotten by integral operation. Integral time is the one for which the
    manipulated value in integral operation is to be the value in proportional operation after deviation occurs in the integral operation.

  7. Differential Integer (Kd)
    This is the constant used to operate a manipulated value in proportion to variation speed, and to control the variation of the deviation in the differential operation "Mv = Kp * E + Kp * dE/dt" in order to clear the deviation, in case that the deviation occurs. Integral time is the one for which the manipulated value in differential operation is to be the value in proportional operation after deviation occurs in the differential operation.

  8. Filter Coefficient (α)
    This is used to set up the range of the filtering effect on the measured value(PV), which is inputted from an A/D card. The closer it goes to 0, the less filtering effect is.

  9. Min. Manipulated Value (MVLL)
    This is used to set up the min. manipulated value from the PID operation in auto mode. In case that a manipulated value(MV) is less than the min. manipulated value (MVLL), the value is applied as the minimum.

  10. Max. Manipulated Value (MVHL)
    This is used to set up the max. manipulated value from the PID operation in auto mode. In case a manipulated value(MV) is greater than the min. manipulated value(MVHL), the value is applied as the maximum.

  11. Variation Rate Limit of Manipulated Value (∆MVL)
    This is used to apply the set value for Variation Rate Limit of Manipulated Value if a variation value, comparing the manipulated value(MV) for the previous scan to the manipulated value(MV) for current scan, is greater than the set value for Variation Rate of Manipulated Value.

  12. MV Transfer
    MV Transfer Use(1) : This is used to apply the manipulated value(MV) in auto mode to a manually manipulated value(MVMAN) in case that PID control is operated in auto mode and is converted to manual mode.
    MV Transfer Use(0) : This is used to apply the manipulated value(MV) in manual mode to a manually manipulated value(MVMAN).

  13. SV Steadiness
    To control the occurrence of over shoot due to a sharply changed target value(SV) and to keep stable control, this is used to divide a variation value into 10 steps, and to increase or decrease the value progressively at sampling intervals(Ts) when a target value is changed.

  14. States of PIDINIT
    This is used to indicate the status of error while PID operation is initialized.

 

PIDCAL Instruction(B)

Instruction Operation

This is used to execute PID operation.

 

Form of Instruction

PIDCAL   " The start address among the devices where the result values of PID operation are stored "

Ex) If the result values of PID operation are stored from D0100  => PIDCAL  D0100

 

Result Items

Offset

Item

Description

Range

Remarks

0

Set Value (SV)

0 – 16000

 

By loops

1

Measured Value (PV)

0 – 16000

 

2

Manipulated Value (MV)

0 – 16000

 

3

Measured Value after Filtering (PVnf)

0 – 16000

 

4

Manually Manipulated Value (MVMAN)

0 – 16000

 

5

Manual/Auto

Auto(0) / Manual(1)

 

6

State Code

 

 

7

 

 

 

 8

 

 9

 

10

 

11

 

12

 

13

 

14

 

15

 

16

 

17

 

18

 

19

 

 

  1. Set Value (SV : 0 ~ 16,000)
    This is used to input the target value controlled.

  2. Measured Value (PV : 0 ~ 16,000)
    This is the current value of the object controlled, which is read from an A/D card. The value in the device where a measured
    value is stored, is to be read from the A/D card using "FROM" instruction and be updated periodically.

  3. Manipulated Value (MV : 0 ~ 16,000)
    This is the result value of the PID operation, which is output to the object controlled through a D/A card.

  4. Measured Value after Filtered (PVnf : 0 ~ 16,000)
    The filter is used to protect the instantaneous deviation of the measured value(PV) caused by noise.
    The measured value(PV) is filtered and stored in the device assigned to the measured value after filtered(PVnf).
    At this time, if the filter coefficient(a) is 0, the measured value(PV) is not filtered.

  5. Manually Manipulated Value (MVMAN)
    The value set up as manually manipulated value (MVMAN) is outputted as manipulated value (MV).

  6. Manual/Auto (0 / 1)
    This is used to select whether the object controlled is controlled by using PID or the value set up in a manually manipulated
    value (MVMAN ) is output to the object controlled.

  7. Status Code
    Each of set values is initialized for PID operation. To check that, PID initialization instruction(PID INIT) is used. At this time,
    if there is an error in the set value or during PID operation, the error is stored in the device assigned to status code. Also,
    in case of an error, PID operation instruction(PIDCAL) cannot be operated.