0% found this document useful (0 votes)
91 views6 pages

2-PID Function Block Description Version 1.00

The Temperature Control 2-PID Function Block realizes 2-PID control for CP1W-TS expansion units. It simultaneously achieves set point tracking and disturbance suppression. The function block adds PID control with auto-tuning to CP1W-TS units. It requires connecting P_On to EN to operate. The function block evaluates status every PLC cycle and prevents uncontrolled output unless Enable is on. It supports various temperature sensor inputs and determines output based on set point and operating range.
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)
91 views6 pages

2-PID Function Block Description Version 1.00

The Temperature Control 2-PID Function Block realizes 2-PID control for CP1W-TS expansion units. It simultaneously achieves set point tracking and disturbance suppression. The function block adds PID control with auto-tuning to CP1W-TS units. It requires connecting P_On to EN to operate. The function block evaluates status every PLC cycle and prevents uncontrolled output unless Enable is on. It supports various temperature sensor inputs and determines output based on set point and operating range.
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/ 6

(1/6)

Title
Temperature Control 2-PID Function Block for CP1W-TS
Expansion Units
Basic Function The Temperature Control 2-PID Function Block for the CP1W-TS expansion units realizes 2-PID control for
the Compact CP1 Programmable Logic Controllers. The 2-PID simultaneously achieves two characteristics,
set point tracking and disturbance suppression.
Symbol
Function Block Name

TC_2PID_function_block
P_On

(BOOL) (BOOL)
EN ENO

(BOOL) (BOOL)
Activate PID Function Auto Tuning Status Bit
Enable AT_Status

(INT) (BOOL)
Process Variable PID Function Output
Process Value Control_Output

(INT) (BOOL)
Set Point Variable Error Status Bit
Set Point Error

(INT) (INT)
Maximum Set Point Variable Status Code
Maximum Status_Code

(INT) (WORD) Auto Tuning Proportional Band


Minimum Set Point Variable
Minimum OUT_P Output

(BOOL) (WORD)
Execute auto-tuning Auto Tuning Integral Output
Start_AT OUT_I

(BOOL) (WORD)
Stop auto-tuning Auto Tuning Derivative Output
Stop_AT OUT_D

(WORD)
Control Period for output R Control_Period

(INT)
Proportional Band Input
P_Input

(INT)
Integral Input
I_Input

(INT)
Derivative Input
D_Input

(BOOL)
Apply PID Input Values
Write_PID_Inputs

(WORD)
2PID Parameter
Filter_Coefficient

(BOOL)
Reset Error
Reset_Error
(2/6)

File Name TC_2PID_function_block.cxf


Developed by Omron Europe
Release Date 26 October 2018
Supported Model Input Description
Models • CP1W-TS001 2 Thermocouple Type K or J Inputs
• CP1W-TS002 4 Thermocouple Type K or J Inputs
• CP1W-TS003 4 Thermocouple Type K or J Inputs (Input 3 and 4 can also operate as
Analog Input; 0 to 10V, 1 to 5V or 4 to 20 mA)
• CP1W-TS004 12 Thermocouple Type K or J Inputs
• CP1W-TS101 2 Platinum Resistance Thermometer Type Pt100 or JPt100 Inputs
• CP1W-TS102 4 Platinum Resistance Thermometer Type Pt100 or JPt100 Inputs

Conditions for • P_On (Always On Bit) should be connected to the EN input.


Usage • The Enable input operates the PID Control.
• All input parameters should confirm the specification range.

Function The TC_2PID_function_block adds PID Control with Auto-Tuning feature for the CP1W-TS expansion units.
Description
Prerequisite for the Function Block to operate correctly, P_On (Always On Bit) should be connected to the
EN Input. The PLC evaluates the function block status every PLC cycle. Simultaneously the Control Output is
not operating unless the Enable input is on, thus preventing uncontrolled execution of any equipment
controlled by the PID Control.

The Process Value input is of sensor input type Thermocouple, Platinum Resistance Thermometer or
Analog. The Set Point is user defined and related based on the type of sensor input plus the operating
range of the sensor input. The operating range may differ per sensor type. The maximum and minimum
parameters contain the operating range of the sensor input. Please consult the specific sensor datasheet
for the accurate operating range.

The P, I, D and Control Period parameters determine the responsiveness of the PID Control function. The P,
I and D parameters can be configured using two different methods. The first method is configuring the
parameters manually. The second method automatically detects the ideal parameters using the built-in
Auto-Tuning feature. While the Auto-Tuning process is in progress, the Auto-Tuning Status Bit is on. Once
the Auto-Tuning is completed, the Auto-Tuning Status Bit is off and P, I and D Output parameters show the
result of the Auto-Tuning process. Starting and stopping of the Auto-Tuning process is executed manually.

The Control Period parameter defines the responsiveness of the Control Output. It evaluates at specified
time interval the output status of the 2PID function.

Errors generated by the TC_2PID_function_block cause the Control Output to stop operating. In the event
of an error, the Error Bit is on and the status code shall adjust accordingly. In order to continue the 2PID
Control Function, the error has to be reset manually.

FB precautions • Switching off the Enable input causes the Control Output to turn off.
• Invalid input values prohibit the Control_Output from operating. It remains off until the input
parameters are within the correct range and resetting the error.
• Invalid P, I and D parameters shall execute an Auto-Tuning process when attempting to enable the
Function Block.
• It is required to acknowledge an error using the Reset_Error input before the Function Block can
operate.

EN Input Connect P_On (Always On Bit) to EN Input in order to operate the Function Block.
Condition
Restrictions
Input Variables • Control_Period has an operating range from 1.00 to 99.99 seconds.
• Filter_Coefficient has input range from α = 0.00 to 0.99 (#0100 to #0163).
• Maximum and Minimum Set Point Values should be consistent with the connected Temperature
Output Sensor.
Variables
• The differential up of Start_AT and Stop_AT start or stop the Auto-Tuning process.
• AT_Status turns automatically off once the Auto-Tuning process is completed.
• The OUT_P, OUT_I and OUT_D variables display the used PID parameters.
(3/6)

Status Codes Status Code Description


• #0000 No Error or Normal Operation
• #0001 Manually Aborted Auto-Tuning
• #0002 Manually Started Auto-Tuning

• #0600 Invalid Input Entry at Control Period Input


• #0601 Invalid PID parameter Settings detected
• #0602 Invalid Input Entry at Minimum and/or Maximum Parameter Inputs
• #0603 Invalid Input Entry at Filter Coefficient (2-PID parameter) Input
(4/6)

Application
Example 1 :

Applying
Thermocouple
Input as Process
Value

• Please confirm that all parameters are set and are within the range specification. Otherwise, an error
occurs depending on what input parameter is invalid.
• The data range at the Process Value that include one digit after the decimal point are stored without
the decimal point, i.e., 10 times the actual value is stored, e.g. Unit: 0.1C° -> 500.0 C° = &5000 =
#1388.
• The Set Point parameter is the target value were the PID control focuses. Additional parameters
related to Set Point are Maximum and Minimum parameters. They define the maximum and
minimum range for the Set Point parameter.
• The PID parameters can be configured manually using P_Input, I_Input and D_Input. The
Write_PID_Inputs input is required to write the PID input parameters.
• If no PID parameters are stored, the function block shall generate a #0601 error when attempting to
enable the 2-PID function. The user can manually start the Auto-Tuning Process causing the status
code #0002 to occur. While the Auto-Tuning process in ongoing, the AT_Status bit is turned on and
will turn off when the Auto-Tuning process has been completed.
• OUT_P, OUT_I and OUT_D parameters are used as User Data Information outputs to inform the user
what PID parameters are applicable for the PID function.
• The Control Period parameter defines the responsiveness of the Control Output. The operating range
is 1.00 to 99.99 seconds. For example, when the Control Period is set to #0064 = &100 (1 second), the
PID function evaluates every 1 second whether to switch on or off the Control_Output.
• The Error Bit turns on when an error has occurred. Please refer to Status Codes for detailed
information regarding what type of error has occurred.
(5/6)

Application
Example 2 :

Applying Analog
Input as Process
Value
• CP1W-TS003
only

• Please confirm that all parameters are set and are within the range specification. Otherwise, an error
occurs depending on what input parameter is invalid.
• The data range at the Process Value is based on the Analog Input. For example, 4 to 20 mA is
converted into #0000 to #2EE0.
• The Set Point parameter is the target value were the PID control is focused. Additional parameters
related to Set Point are Maximum and Minimum parameters. They define the maximum and
minimum range for the Set Point parameter.
• The PID parameters can be configured manually using P_Input, I_Input and D_Input. The
Write_PID_Inputs input is required to write the PID input parameters.
• If no PID parameters are stored, the function block shall generate a #0601 error when attempting to
enable the 2-PID function. The user can manually start the Auto-Tuning Process and a status code of
#0002 shall occur. While the Auto-Tuning process in ongoing, the AT_Status bit is turned on and will
turn off when the Auto-Tuning process has been completed.
• OUT_P, OUT_I and OUT_D parameters are used as User Data Information outputs to inform the user
what PID parameters are applicable for the PID function.
• The Control Period parameter defines the responsiveness of the Control Output. The operating range
is 1.00 to 99.99 seconds. For example, when the Control Period is set to #0064 = &100 (1 second), the
PID function evaluates every 1 second whether to switch on or off the Control_Output.
• The Error Bit turns on when an error has occurred. Please refer to Status Codes for detailed
information regarding what type of error has occurred.
(6/6)

 Variable Tables

Input Variables
Name Variable name Data type Default Setting Range Description
EN EN BOOL To control execution of the
Function Block
Activate PID Enable BOOL 0, 1 Enable the PID function
Function
Process Variable Process_Value INT -32768 to 32767 Sensor Input Signal
Set Variable Set_Point INT 0 -32768 to 32767 Define Set Point value
Maximum Set Maximum INT 32767 Min to 32767 Define maximum Set Point value
Variable
Minimum Set Minimum INT -32768 -32768 to Max Define minimum Set Point value
Variable
Execute Start_AT BOOL 0 0, 1 Execute the Auto-Tuning process.
Auto-Tuning
Stop Auto-Tuning Stop_AT BOOL 0 0, 1 Manual Stop the Auto-Tuning
process.
Control Period for Control_Period WORD #0064 #0064 to #270F Define the control period for
Output: (1.00 to 99.99 Control_Output. For example,
Control_Output sec.) #0064 is 1 second. The state of
Control_Output is evaluated every
1 second.
Proportional Band P_Input INT #0001 to #270F Manually configure the “P”
Input parameter for the PID function.
Integral Input I_Input INT #0001 to #1FFF Manually configure the “I”
parameter for the PID function.
Derivative Input D_Input INT #0001 to #1FFF Manually configure the “D”
parameter for the PID function.
Apply PID Input Write_PID_Inputs BOOL 0 0, 1 Write the manually configured PID
Values parameters to the PID Control
Function.
2PID Parameter Filter_Coefficient WORD 0 #0000, #0000 : α = 0,65 (default)
#0100 to #0163 Setting from #0100 to #0163 :
α = 0,00 to α = 0,99
Reset Error Reset_Error BOOL 0 0, 1 Reset active error.

Output Variables
Name Variable name Data type Description
ENO ENO BOOL 1 (ON) : Function Block processed normally.
(May be omitted.) 0 (OFF) : Function Block not processed or ended in an error.
Auto-Tuning Status AT_Status BOOL 1 (ON) : Auto-Tuning process operational
Bit 0 (OFF) : Auto-Tuning process NOT operational
Control Output Control_Output BOOL PID Control Output
Error Status Bit Error BOOL 1 (ON) : Error Exist
0 (OFF) : Normal Operation
Error Code Status_Code INT #0000 : No Error or Normal Operation
Information #0001 : Manually Aborted Auto-Tuning
#0002 : Manually Started Auto-Tuning
#0600 : Invalid Input Entry at Control Period Input
#0601 : Invalid PID parameter Settings detected
#0602 : Invalid Input Entry at Minimum and/or Maximum
Parameter Inputs
#0603 : Invalid Input Entry at Filter Coefficient (2PID parameter)
Input
Auto-Tuning OUT_P WORD “P” parameter used by the PID Control Function. The parameter is
Proportional Band written manually or by the Auto-Tuning process.
Output
Auto-Tuning Integral OUT_I WORD “I” parameter used by the PID Control Function. The parameter is
Output written manually or by the Auto-Tuning process.
Auto-Tuning OUT_D WORD “D” parameter used by the PID Control Function. The parameter is
Derivative Output written manually or by the Auto-Tuning process.

 Version History
Version Date Contents
1.00 3-September-2015 Original production

You might also like