PIDCAL Instruction
The PIDCAL command performs PID calculation based on the SV and PV values and stores the results in the MV area of the word device. Refer to the table below for operation data location.
Offset | Item | Description and Range | Remark |
0 | Set Value (SV) | 0 –16,000 | For each loop |
1 | Process Value (PV) | 0 –16,000 | |
2 | Manipulated Value (MV) | 0 –16,000 | |
3 | PV after filtering (PVnf) | 0 –16,000 | |
4 | Manual MV (MVMAN) | 0 –16,000 | |
5 |
Function Selection Flag | Bit #0 : Automatic (0) / Manual (1) Bit #1 : Enable ‘Self-Learning’ Bit #2 : Kp x 100 Bit #15 : Request to delete the learned data | |
6 | Reserved (Not available to users) |
| |
7 | |||
8 | |||
· | |||
10 | Status | ||
· |
| ||
19 |
Setting data for each loop
Offset | Item | Description |
0 | Set Value (SV) | Enter the desired target value that a user wants to control. |
1 | Process Value (PV) | It is the current value of the controlled unit read from the A/D card. A user either has to update the PV value regularly by reading the value from the A/D card using the "FROM command" or update other measurement values using the "MOV command". |
2 | Manipulated Value (MV) | It is the result value of the PID operation that needs to be outputted to the control unit by using the D/A card or I/O card. |
3 | PV after filtering (PVnf) | The filtering is used to prevent instantaneous deviation caused by the PV noise. The filtered PV value is then stored in the PVnf area. When the filter coefficient () is 0, the filtering is not applied to the PV. This area can only be monitored. |
4 | Manual MV (MVMAN) | When in manual mode, the value set as the ‘manual manipulated value’ is outputted as the Manipulated Variable (MV). |
5 | Function Selection Flag | Automatic / Manual Mode Selection A user gets to select whether to control the controlled unit automatically by using the PID function or to output the value specified in the manual manipulated variable to the controlled unit.
Enable Self-Learning Function It is the feature newly added for PID_2 version. The self-learning function allows a user to take advantage of its ability to calculate the most suitable MV output level for the SV based on the result of the previously executed PID control and the control operation on the basis of the existing PID control algorithm. By using this feature, the user can obtain a faster system response.
Kp x 100 This function is newly added for PID_2 version. Proportional gain (Kp) can maximize its setting range (1 – 65535) up to 100 times by using this feature. While this flag is set, the range value of Kp can be expanded from 1 to a maximum of 6,553,500. If this flag was to be forcefully reset, it is necessary to reconfigure the [Kp x 100] as the Kp constant in order to obtain the same control effect.
Delete Self-Learning data It is the function newly added for PID_2 version. When this flag gets set, the PLC is initialized to delete all of the self-learning data that has already been collected and to build a new learning data. Because the self-learning data is composed of files that are internal-use- only for PLC CPU, the user cannot use this for reference. |
10 | Status | Displays the status of the relevant loop. *Refer to the table below. |
Status descriptions for each loop
Bit | Function | Description |
0 – 3 | Reserved | |
4 | Applying self-learning data | Status when the control is performed by using the collected self-learning data |
5 | Collecting self-learning data | This status gets activated when the self-learning data is being collected (When the value of SV is changed, the function of collecting the self-learning data gets activated) |
6 | Stability | Status in which the control system is being stable (PV and SV are the same, and MV output is fixed with no change) |
7 | Self-learning retention | Status in which the self-learning data is stored in the memory |
8 | PV inertia amount data retention | This status is set when a non-zero value is stored in the PV inertia amount memory |
9 – 15 | Reserved |
NOTES
|
To configure the starting addresses for PIDINIT and PIDCAL
Please make sure that [PIDINIT starting address] and [PIDCAL starting address] do not overlap and that the following calculation is satisfied.
[PIDCAL starting address] > = [PIDINIT starting address] + [Total number of Loop] x 20 + 2 OR [PIDINIT starting address] > = [PIDCAL starting address] + [Total number of Loop] x 20
Ex) If the total number of Loops is 10 / "PIDINIT starting address" is 100, < 10 Loop x 20 Word + 2 (common area) = 202 --- > 50 + 202 = 252 > "PIDCAL" starting address should be set as 202 or above. |