Você está na página 1de 38

1ACESYS Program

PID Controller

By FLS Automation

FLS Automation A/S Hffdingsvej 77 DK-2500 Valby Copenhagen Denmark +45 36 18 27 00 Fax: +45 36 18 27 99 Printing History:
Version Last modified Author Last modified by Name of Word File Index Range AceV6.5.4 $Revision:: 1 $Modtime:: 26. October 2001 Poul Nielsen $Author:: Finn Kousgaard Poulsen $Workfile:: PID_Controller.doc 0-1000 $ $ $ $

Disclaimer:
Information in this document is subject to change without notice and does not represent a commitment on the part of FLS Automation A/S. The present documentation from FLS Automation A/S is subject to the content of the ordered, confirmed and supplied system configuration. Options specified and described in the FLS Automation A/S documentation as part of the general description but initially neither ordered by the customer nor confirmed by the seller - will not commit the supplier to any further and future supply and/or installation. FLS Automation A/S assumes no responsibility for any errors that may appear in this document. Copyright FLS Automation A/S. All rights reserved.

Contents
PID Controller........................................................................................1
Introduction..........................................................................................................................1 Operating modes...................................................................................................................3 1. Automatic mode........................................................................................................3 2. Manual mode.............................................................................................................3 3. Cascade mode............................................................................................................3 4. Balanced Mode..........................................................................................................3 List of Abbreviations............................................................................................................4 PID Controller Input parameters/Flags................................................................................5 1. NO PID Controller Number.....................................................................................5 2. PVNO Number of the Analog block used as PV ...................................................5 3. PV_TRACK Enable/Disable PV Tracking..............................................................5 4. AUTO_EN Enable/Disable Auto mode...................................................................5 5. EXT1_EN Enable/Disable External 1 mode (Cascade)...........................................5 6. EXT1SP External 1 Setpoint (Cascade)...................................................................5 7. FR1 Enable/Disable Force 1 (Up) Value.................................................................5 8. FR1SP Force 1 (Up) Value......................................................................................5 9. FR2 Enable/Disable Force 2 (Down) Value............................................................5 10. FR2SP Force 2 Value.............................................................................................5 11. EXT2 Enable/Disable External 2 (Balanced) Mode..............................................6 12. EXT2SP External 2 Setpoint (Balanced Mode).....................................................6 13. EXTPV_EN Enable/Disable External PV..............................................................6 14. EXTPV External PV (Value).................................................................................6 15. EXT_FAULT External Fault.................................................................................6 PID Controller Output parameters/Flags..............................................................................7 1. CV - Controlled Value..............................................................................................7 2. CO - Physical Analog Output...................................................................................7 3. AUTO - Controller in Auto.......................................................................................7 4. AINORM - Process Variable Normalised.................................................................7 5. SPNORM - Set point Normalised.............................................................................7 PID Controller Interface Flags.............................................................................................8 1. PID_PARA_CTLx P, I, Dparameter 1 .. 4...............................................................8 2. FR_AUTO Force Auto.............................................................................................8 3. FR_MAN Force Manual..........................................................................................8 4. FR_EXT1 Force External 1 (Cascade).....................................................................8 5. INV Inverse Operation.............................................................................................8 Additional Parameter Settings..............................................................................................9 1. Deviation Fault..........................................................................................................9 2. Ramp Time................................................................................................................9 3. Output Min/Max........................................................................................................9 4. Upper/Lower Deadband ...........................................................................................9 Program structure ................................................................................................................9 ECS-Faceplate Controller...................................................................................................11 ECS-Faceplate, PID Parameters 1......................................................................................12 ECS-Faceplate, PID Parameters 2......................................................................................13 ECS-Faceplate, Trend Curve diagram................................................................................14 Controller status to ECS.....................................................................................................15 Siemens S7-program structure...........................................................................................16 Reserved Function-blocks in STEP7 ..........................................................................16

Copyright FLS Automation A/S. All rights reserved.

PID Controller i

Reserved data blocks...................................................................................................16 PID Controller Step7 program structure 1..................................................................18 PID Controller Step7 program structure 2..................................................................19 PID Controller Step7 program structure 3..................................................................20 Control Logix program structure .......................................................................................21 Calling Subroutines for PID Controllers.....................................................................25 Defining Module type.................................................................................................26 Point address Configuration........................................................................................27 Concept program structure.................................................................................................29 Special output pins for PID-ACESYS........................................................................29 Concept program structure..........................................................................................30 A and B point address configuration...........................................................................31

ii PID Controller

Copyright FLS Automation A/S. All rights reserved.

PID Controller

Introduction
The PID function block is pre-programmed to handle all commonly used control loops, such as standard loops, cascade control and Balanced Mode etc., and a step controller in combination with the positioner. All Controllers have the functions of Manual/Auto changeover. In Manual operating mode the output can be controlled directly with +/- or a decimal value can be set directly. Four set of controller parameters P-I-D are available. If a controlled system has different dynamics based on the operating point, then a different set of PID-controller parameters can be adapted through the ECS system. Tracking of setpoint and output for bumble transfer is also a part of the controller. A PID controller, often called a three-point controller, has three important parameters to be set. The P-value (proportional part), the I-value (integral time) and the D-value (derivative time). All pre-programmed ACESYS controllers have their D part equal to zero. The standard PID faceplate allows, depending on the mode the user, to adjust the set point or output value of the associated PID controller. The value may be adjusted by manual entry, by moving the slider bar or by a percentage adjustment. Through the external modes provision is made for support of cascaded control loops. In this case the Aux. signal could reflect an external set point. PID loops are implemented at the PLC level so the values displayed in the faceplate describe the immediate values in the PLC. The PID parameter window allows for examination and modification of the Proportional, Integral and Derivative controller parameters as well as setting values for maximal and minimal allowed output. Any parameter change is logged in the ECS event system and therefore traceable. Change of parameters in the PID controller is only allowed for users being granted the proper access privileges. Being a general faceplate the faceplate model can be modified to make an exact match of the PID parameters available in the PLC. The PID trend window provides a short-term trend display for the measurements involved in the PID control. The curves are updated every second and the window length of the display is 10 minutes. In addition to providing a quick overview of the control performance due to fast updating, the PID trend window is suitable for tuning of fast control loops. Long term

Copyright FLS Automation A/S. All rights reserved.

PID Controller 1

history information on the PID values must be found using the general trend utility.

2 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Operating modes
The following four operating modes are possible: 1. Automatic mode This operating mode is released from the faceplate, and if the interface Controller in Automatic mode Enable = 1 and there are no faults controller will go into AUTO mode. In Auto mode the controller is using the internal setpoint send out from the ECS system. The Automatic setpoint can be set in three different ways. Via 1% or 5% keys Entering a decimal figure Using the sliding bar

2. Manual mode This operating mode is released from the faceplate, and is a flip-flop function with the Auto mode. In operating mode MANUAL the output can be controlled directly with more / less or a value can be set directly as a decimal value. 3. Cascade mode This operating mode is released from the faceplate, and if the interface Controller in Cascade mode Enable = 1, then the controller will accept the External 1 setpoint. 4. Balanced Mode With Interface Controller Balanced mode = "1", done in the PLC program, will the controller go into Balanced mode, and then the Balanced setpoint value is transferred to the output of the controller. For example, when two controllers are connected to form a cascade, the output of the primary controller can be connected as the Balanced mode set point of the secondary controller. This interface is normally written into in manual mode by the ECS system if the program does not provide it. (E.g.: If the controller is the leading one in a cascade, the set point of the subordinate controller is connected to this interface.) An example of Balanced mode is also the ratio calculation of a mill total feed is transferred via the controller to the external controller when the total feed controller is in AUTO.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 3

List of Abbreviations
FLSA
NO PV_NO PV_TRACK AUTO_EN EXT1_EN EXT1SP FR1 FR1SP FR2 FR2SP EXT2 EXT2SP EXTPV_EN EXTPV EXT_FAULT CV CO AUTO AINORM SPNORM PID_PARA_CTL1 PID_PARA_CTL2 PID_PARA_CTL3 PID_PARA_CTL4 FR_AUTO FR_MAN FR_EXT1 INV

HTC
NR RX1NR RSNF RFGS RWEE1 RWEX1 RWEE2 RWEX2 RWEE3 RWEX3 RWEE4 RWEX4 RX2NR RX2PV RSA RYCO RYA RAUT RX1NORM RWENORM RTA1 RTA2 RTA3 RTA4 FR_RFGS FR_RHND FR_RWEE1 RINV

Analog signal description


PID-Controller Number Number of the analog block used as PV Enable/Disable PV tracking Enable/Disable Auto mode Enable/Disable Extern l Set Point (Cascade) Extern l Set Point ( Cascade) Enable/Disable Force Value l (Up) Set Point Force Value l (Up) Set Point Enable/Disable Force Value 2 (Down) Set Point Force Value 2 (Down) Set Point Enable/Disable Extern 2 Set Point (Balanced Mode) Extern 2 Set Point (Balanced Mode) Enable/Disable Extern PV Extern PV External Fault Controlled Value Physical Analog Output Controller in Auto = "1" PV Normalized in 0-100 Set Point Normalized in 0-100 PID-Controller use PID-Set 1 PID-Controller use PID-Set 2 PID-Controller use PID-Set 3 PID-Controller use PID-Set 4 Force PID-Controller into AUTO MODE Force PID-Controller into MANUAL MODE Force PID-Controller into EXTERNAL 1 MODE (Cascade) Inverse operating mode of the PID-Controller

Interface
Input integer Input integer Input Flag Input Flag Input Flag Input Floating point Input Flag Input Floating point Input Flag Input Floating point Input Flag Input Floating point Input Flag Input Floating point Input Flag Output Floating point Output integer Output Flag Output Floating point Output Floating point Interface Flag Interface Flag Interface Flag Interface Flag Interface Flag Interface Flag Interface Flag Interface Flag

4 PID Controller

Copyright FLS Automation A/S. All rights reserved.

PID Controller Input parameters/Flags


1. NO PID Controller Number This parameter must be assigned each module, within a range of 140, and must be unique. 2. PVNO Number of the Analog block used as PV This parameter is a decimal number for this controller is using the Process Variable subroutine there. 3. PV_TRACK Enable/Disable PV Tracking A logic 1 on this parameter will let the Automatic setpoint follow the actual value in Manual mode, for a bumbles transfer when the controller is swapped from Manual to Automatic mode, and visa-verse. 4. AUTO_EN Enable/Disable Auto mode A logic 1 on this parameter permits the controller to go into Auto mode, when selected from the faceplate. 5. EXT1_EN Enable/Disable External 1 mode (Cascade) A logic 1 on the External 1 parameter allows the controller to be selected into cascade mode from the faceplate. 6. EXT1SP External 1 Setpoint (Cascade) The controller will use the External 1 setpoint shown on the faceplate, when selected. The setpoint can come from e.g. a calculation or a master controller. 7. FR1 Enable/Disable Force 1 (Up) Value A logic 1 on this parameter will force the controller output up to the setpoint given on Forced 1 (up) Value. The controller will after the force is removed go into Manual mode. 8. FR1SP Force 1 (Up) Value Setpoint for the controller when its brought into Force 1 (up) mode. 9. FR2 Enable/Disable Force 2 (Down) Value A logic 1 on this parameter will force the controller output down to the setpoint given on Forced 2 (Down) Value The controller will after the force is removed go into Manual mode. 10. FR2SP Force 2 Value Setpoint for the controller when its brought into Force 2 (Down) mode.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 5

11. EXT2 Enable/Disable External 2 (Balanced) Mode A logic 1 on this parameter will bring the controller in Balanced mode. Balanced Mode, where the leading controller in a cascade sets its CV, so bumbles auto <-> man transition is ensured. 12. EXT2SP External 2 Setpoint (Balanced Mode) The controller will use the Setpoint Balanced Mode when there is a Logic 1 on the Balanced Mode parameter. The setpoint can come from e.g. a calculation or a master controller. 13. EXTPV_EN Enable/Disable External PV A logic 1 on this parameter will enable the controller to use an external PV, which could come from e.g. a calculation 14. EXTPV External PV (Value) This value is this Variable, normalised in a range from 0-100, could come from e.g. from a calculation e.g. PV mill total feed 15. EXT_FAULT External Fault An external fault signal switches the controller to mode Manual. The controller displays a fault. This signal is in addition to the analog fault and the fault from the corresponding positioner module.

6 PID Controller

Copyright FLS Automation A/S. All rights reserved.

PID Controller Output parameters/Flags


1. CV - Controlled Value The Controlled Value is an output from the controller and is normalised in a range from 0-100. This output can e.g. be used as inputs to slave controllers or as input to the Positioner. 2. CO - Physical Analog Output This is an output from the controller for the analog output module. 3. AUTO - Controller in Auto In Auto mode is an output flag which is logic 1 when the controller is in Auto mode. 4. AINORM - Process Variable Normalised This Process Variable, normalised in range from 0-100, is output coming from the Analog Measuring module. If the PV gets faulty the controller will swap into Manual mode. 5. SPNORM - Set point Normalised This is the actual setpoint, normalised in range from 0-100, used by the controller.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 7

PID Controller Interface Flags


1. PID_PARA_CTLx P, I, Dparameter 1 .. 4 The controller can be set to use four sets of PID-parameters. Setting the actual flag in the PLC for the set one wants to use individually enables them. It can be useful to swap between different sets of parameters e.g. in a cooling tower control were the amount of gasses lead through the cooling changes drastically, depending on the process situation. 2. FR_AUTO Force Auto The controller can be forced into "Auto" mode by programming a logically "1" on this parameter. 3. FR_MAN Force Manual The controller can be forced into "Manual" mode by programming a logically "1" on this parameter. 4. FR_EXT1 Force External 1 (Cascade) The controller can be forced into "Cascade" mode by programming a logically "1" on this parameter. 5. INV Inverse Operation The controller will operate in inverse mode, PV increase = CV decrease, by programming a logically "1" on this parameter. (The Normal operation of the controller is PV increase = CV increases.)

8 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Additional Parameter Settings


1. Deviation Fault If the Setpoint plus/minus the PV value exceed the inserted max. limit value and the deviation fault enable is enabled and the alarm delay time has expired, then an alarm will be generated, indicating "DEV. FAULT"

2. Ramp Time The output of the controller can by means of the Ramp Time, when it's enabled, be set to follow a certain time-driven curve. The smaller the time is set the smaller are changes over the time period.

3. Output Min/Max The output of the controller can be limited by given in the values for minimum and maximum of the controller. The range is 0 to 100%.

4. Upper/Lower Deadband If the process variable or the setpoint is affected by higher frequency noise and the controller is optimally set, the noise will also affect the controller output. This can lead to faster wear and tear on the final control element. The Deadband function can suppress this noise and thereby reduce oscillation of the controller output.

Program structure

Copyright FLS Automation A/S. All rights reserved.

PID Controller 9

Below is shown a layout of a standard PID Controller:

Tag Name for PID Controller Module No. - NO Process Variable No. - PVNO PV Tracking - PV_TRACK Auto Enable - AUTO_EN Cascade Enable - EXT1_EN Setpoint Cascade Mode - EXT1SP Force Up - FR1 Setpoint Force Up - FR1SP Force Down - FR2 Setpoint Force Down - FR2SP Balanced Mode - EXT2 Setpoint Balanced Mode - EXT2SP Ext. PV Enable - EXTPV_EN External PV (0-100) - EXTPV External Fault - EXT_FAULT CV - Controlled Value 0-100 CO - Analog Output AUTO - Controller in Auto AINORM -Process Variable 0-100 SPNORM - Set Point 0-100

PID-Controller

10 PID Controller

Copyright FLS Automation A/S. All rights reserved.

ECS-Faceplate Controller
The operator can bring up the following faceplate by right hand clicking on a motor symbol or a motor status field.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 11

ECS-Faceplate, PID Parameters 1

12 PID Controller

Copyright FLS Automation A/S. All rights reserved.

ECS-Faceplate, PID Parameters 2

Copyright FLS Automation A/S. All rights reserved.

PID Controller 13

ECS-Faceplate, Trend Curve diagram

14 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Controller status to ECS


The ECS system is polling a data block in the PLC for retrieving status from the controller. Below are showing the various states a controller can be in. Value Value Text 1 Auto 2 Cascade 3 Forced Dn 4 Forced Up 5 Manual 6 Balance 7 Dev. Fault 8 Dev. Fault 9 Ext. Fault 10 AI Fault Text Color Green Gold Cyan Cyan Brown White Flash Red Red Red Red Alarm State Normal Normal Normal Normal Normal Normal Alarm Alarm Alarm Alarm Symbol Operating Offset Hours 1 FALSE 1 FALSE 0 FALSE 0 FALSE 0 FALSE 0 FALSE 0 TRUE 0 TRUE 0 TRUE 0 TRUE

The PID Controller uses the B-point algorithm no. 40 for the controller mode.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 15

Siemens S7-program structure


The programming language STEP7 corresponds to IEC standard IEC 1131-3 and DIN EN-61131-3. The ACESYS PID controllers are realised using the standard MODREG (= modular control) package for PLCs in the SIMATIC family. The MODREG function blocks are not a part of ACESYS and have to be purchased separately together with their manual. STEP7 is used for SIMATIC Functions, it stores programs in FC-blocks and is using Function Blocks (FBs) as subroutines. In ACESYS FB-blocks are already pre-programmed for all motors, valves, gates and dampers, which can be programmed. The following diagram shows in which Function blocks (FCs) that the subroutines (FB s) are to be programmed.

Reserved Function-blocks in STEP7

Block list Controllers


FC2001 FC2002 FC2003 FC2040 Controller #1 Controller #2 Controller #3 Controller #40

Reserved data blocks For the purpose to store and organise data for ECS communication and internal status of a function block, Data Blocks are used. In the following table the overview of used DBs is shown: In ACESYS controller the setpoint are stored in DB20. The first word is the Auto setpoint and the next is the Manual setpoint the consecutive order is: data word; Controller No * 8, e.g.. Controller No. 2 (2 x 8 = DW16).

16 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Data block DB20 controller setpoints DW8 DW12 DW16 DW20 DW24 DW28 DW32 DW36 .. DW320 DW322 Setpoint controller #40 Man Setpoint controller #40 Setpoint controller #1 Man setpoint controller #1 Setpoint controller #2 Man setpoint controller #2 Setpoint controller #3 Man setpoint controller #3 Setpoint controller #4 Man setpoint controller #4

Data block No.: 21 contain the Controller modes. The first word is the controller mode and the next is the timestamp. The consecutive order is: data word; Controller No * 4, e.g. Controller No. 2 (2 x 4 = DW8).
Data block DB21 controller Mode DW4 DW6 DW8 DW10 DW12 DW14 DW16 DW18 .. DW160 DW162 Mode controller #40 Time Stamp controller #40 Mode controller #1 Time Stamp controller #1 Mode controller #2 Time Stamp controller #2 Mode controller #3 Time Stamp controller #3 Mode controller #4 Time Stamp controller #4

Copyright FLS Automation A/S. All rights reserved.

PID Controller 17

PID Controller Step7 program structure 1

Continuing on next page

18 PID Controller

Copyright FLS Automation A/S. All rights reserved.

PID Controller Step7 program structure 2

Copyright FLS Automation A/S. All rights reserved.

PID Controller 19

PID Controller Step7 program structure 3

20 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Control Logix program structure


A AceSys subroutine called Z12_FLSA_Controller is used for all PID Controllers. One tag has to be created for each PID Controller as shown below: It is possible to manipulate and monitor data in the data structures for the created tags. In general tags starting with int should not be changed since they are for internal use in the subroutine. In the following example are shown necessary rungs to program a PIDController: Selecting PID-parameters:

It is possible to select between 4 sets of PID parameters. In the above rungs parameter set 1 is selected. Inverted Operating mode:

To invert the operation mode of the PID controller, set the INV flag high. The default value is low. Auto Mode:

The AUTO_EN is used to control if it should be possible to select Auto Mode from the faceplate. If the flag is low, it is not possible to select Auto mode from faceplate.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 21

The FR_AUTO is used to force the PID into Auto Mode controlled by the PLC-program. Manual Mode:

The FR_MAN is used to force the PID into Manual Mode controlled by the PLC-program. Force Up:

The variable FR1SP is the setpoint for Force Up mode. The value has to be in the interval 0-100. To force the PID into Force Up mode the pin FR1 has to be set. Force Up will bring the PID into manual mode. Force Down:

The variable FR2SP is the setpoint for Force Down mode. The value has to be in the interval 0-100. To force the PID into Force Down mode the pin FR2 has to be set. Force Down will bring the PID into manual mode.

22 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Cascade Mode:

The variable EXT1SP is the setpoint for Cascade Mode. The value has to be in the interval 0-100. To bring the PID into Cascade mode the pin EXT1 has to be set. The PID must be in Auto Mode to activate Cascade Mode. The EXT1_EN is used to control if it should be possible to select Cascade Mode from the faceplate. If the flag is low, it is not possible to select Cascade Mode from faceplate. The Auto Setpoint will be tracked in Cascade Mode. Balanced Mode:

The variable EXT2SP is the setpoint for Balanced Mode. The value has to be in the interval 0-100. To bring the PID into Balanced mode the pin EXT2 has to be set. Balanced Mode will bring the PID into manual mode. The Manual Setpoint will be tracked in Balanced Mode. Extern PV:

The variable EXTPV is used to decide the wanted external PV. The value has to be in the interval 0-100. To activate the External Process Value the pin EXTPV_EN has to be set.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 23

PV Track:

If the PID is in Manual Mode and the flag PV_TRACK is high, the Auto Setpoint will track on the Process value. The purpose is to obtain a bumbles transfer when the controller is swapped from Manual to Auto Mode. Process Value:

The Process Value for the PID is moved to the variable AINORM. The value has to be in the range 0-100. To ensure that the PID is not acting on a invalid process value the flag ANA_OK is used to bring the status from the analog signal to the PID. The flag must be high to bring the PID into Auto Mode. Calling the Subroutine:

1st instruction: 2 instruction: 3rd instruction: 4 instruction:


th nd

Assign the unit number Code for the signal type (e.g. 1 = 4-20mA) Code for the analog output type (e.g. 0 = 1756 series) Calling the subroutine with the following parameters: Routine Name Input par. Input par. Return par. : : : : Z12_FLSA_Controller Unit tag Group/Route command tag Unit tag

24 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Outputs:

Two outputs are available from the PID Controller. The CO output is for direct connection of a analog output, in the range decided by the input signals CODE and MOD_TYPE. CV is a output in the range 0-100. If the PID Controller is controlling a positioner nothing has to be connected to the output pins. Connection has to be done on the positioner.

Calling Subroutines for PID Controllers The subroutines for PID Controllers are call from the program F00_DISPATCHER. This dispatcher is executed every 100mS. In the dispatcher program is implemented a counter counting to 10. Depending of the value of this counter various subroutines are called. The purpose of this program is to reduce the PLC load. Each PID Controller subroutine is executed every seconds.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 25

Defining Module type Since the raw value range from Control Logix I/O module return differ it has been necessary to assign a new input to the analog block, when using Control Logix PLCs. The following table shows the supported combinations of output modules and signals:

Signal Data MOD_TYPE 0=1756-xxxx (Output) 0=1756-xxxx (Output) 0=1756-xxxx (Output) CODE 0= 0-20mA 1= 4-20mA * 6= 0-10V Low Signal 0 (0mA) -25 (0mA) 0 (0V) High Signal 100 (20mA) 100 (20mA) 100 (10V)

Raw range and limits RAW_MIN 0 (0mA) 0 (4mA) 0 (0V) RAW_MAX 100 (20mA) 100 (20mA) 100 (10V)

10=1794-OE4/B (Output) 0= 0-20mA ** 0 (0mA) 10=1794-OE4/B (Output) 1= 4-20mA ** 0 (0mA) 10=1794-OE4/B (Output) 6= 0-10V ** 0 (0V)

31200 (20mA) 31200 (20mA) 31200 (10V)

0 (0mA) 6240 (4mA) 0 (0V)

31200 (20mA) 31200 (20mA) 31200 (10V)

100=Calc 0-100 101=Calc 0-4095 102=Calc 0-31200 * Module Config 0-20mA

100=Calc 100=Calc 100=Calc

0 0 0

100 4095 31200

0 0 0

100 4095 31200

** Module Config 0-10V / 0-20mA

For the 1756-serie modules it is expected that the modules are configured to use the output range 0-100 equal to the signal range indicated by the code. Example 1: Module = 0 (1756-series) Code = 1 (4-20mA) Module has to be configured for input range 0-20mA High signal = 20.0mA / High Engineering = 100.0 Low signal = 0.0mA / Low Engineering = -25.0 Example 2: Module = 0 (1756-series) Code = 0 (0-20mA) Module has to be configured for input range 0-20mA High signal = 20mA / High Engineering = 100.0 Low signal = 0.0mA / Low Engineering = 0.0

26 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Point address Configuration

For each PID controller one B-point and two A-points are necessary. The Bpoint is used to monitor the PID mode, and the A-points are used to set and monitor the SPA (Setpoint Auto) and SPM (Setpoint Manual). The following picture illustrates the configuration of the B-point for PID mode:

The index for PID_MODE corresponds to the variable NO assigned before calling the subroutine for the PID Controller. B-point algorithm no. 40 is used for PID-mode.

Copyright FLS Automation A/S. All rights reserved.

PID Controller 27

The following picture illustrates the configuration of A-points for PID setpoint Auto and Manual:

The configuration of the address for SPA and SPM is the same, except for the index for the PID_SETPOINT. The index is calculated as follow: Index for SPA Index for SPA : (NO * 2 ) 1 : NO * 2

The variable NO is assigned before calling the subroutine for the PID Controller. A-point algorithm no. 3 is used for Setpoint Auto. A-point algorithm no. 4 is used for Setpoint Manual.

28 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Concept program structure


Special input pins for PID-ACESYS. INV: Literal (Data type: BOOL (0 or 1)) for direct or inverse reaction of the controller. 0=Direct reaction (ERROR increasing means controller output increasing). 1= Inverse reaction (ERROR increasing means controller output decrease). P_en: Literal (Data type: BOOL (0 or 1)) for enabling P-portion (Gain factor) in the controller. 1= Enable, 0= Disable. I_en: Literal (Data type: BOOL (0 or 1)) for enabling I-portion (Integration factor) in the controller. 1= Enable, 0= Disable. D_en: Literal (Data type: BOOL (0 or 1)) for enabling D-portion (Differentiation factor) in the controller. 1= Enable, 0= Disable. The controller works after the formula: Y=(err*P)+(err*I)+(err*D) if all factors are enabled. PIDpar: Literal (Data type: UINT) for selecting which PID constant the controller must be working after. 1=PID-set 1, 2=PID-set 2, 3=PIDset 3, 4=PID-set 4. (Chapter ECS-Faceplate, PID Parameters 1 & 2, show that the controller are able to work with 4 different sets of PID parameters). SPpoint: Literal (Data type: UINT) pointing to 4xx-register where the PIDACESYS block can read the Automatic Setpoint (SPA) and the Manuel Setpoint (SPM) from ECS. It must be the same literal as the direct 4xxregister address connected to the output pin (STAT1), but without the number 4 in front of it. (ex. If STAT1=%4:05107, then SPpoint=5107) PARAno: Literal (Data type: UINT) pointing to 4xx-register where the parameter area for the PID_ASEC is beginning. Each PID-ACESYS block is taken up 80 words as parameter area. (See Data-layout for the Concept program Chapter 15 page 19) DEP_COM: Structured variable (Data type: DEPCOM) containing all Department commands. (See Group table 1)

Special output pins for PID-ACESYS. STAT1: Direct 4xx-register address (Data type: RealArr2 of 2 real values (4words)) holding the Automatic Setpoint (SPA) and the Manuel Setpoint (SPM) from ECS. STAT2: Direct 4xx-register address (Data type: Word-array of 2 words.) holding status information and timestamp for the controller. These 2 words are read by the ECS. 1.Word: contain status information about the analog signal. 2.Word: contain Timestamp for events in the PID-ACESYS block. (Se Data-layout for the Concept program Chapter 15 page 19)

Copyright FLS Automation A/S. All rights reserved.

PID Controller 29

Concept program structure

30 PID Controller

Copyright FLS Automation A/S. All rights reserved.

A and B point address configuration The PID-ACESYS block needs 3 points in the ECS. Next you will see the 1. Point: an A-point (Automatic Setpoint) address configuration in the ECS.

The point Code: UF01M013F1_SPA. PLC: 1 (PLC no. (In which PLC this point is reading)). Input type: Float (Reading 2 words: The value of the Automatic Setpoint) Input Register: 5107 (equal to the data register address %4:05107 connected to the output pin STAT1 on the PID-ACESYS block) Input Bit: Always zero. Output type: Holding Register (Reading 1 word). Output Register: 5107 (the same as input register). Output Bit: Always zero. Parameter type: Holding Register (Pointer for start reading data register area of 80 words). Parameter Register: 49081 (equal to the data type UINT connected to the input pin PARAno on the PID-ACESYS block).

Copyright FLS Automation A/S. All rights reserved.

PID Controller 31

Next you will see the 2. Point: an A-point (Manual Setpoint) address configuration in the ECS.

The point Code: UF01M013F1_SPM. PLC: 1 (PLC no. (In which PLC this point is reading)). Input type: Float (Reading 2 words: The value of the Manual Setpoint) Input Register: 5109 (equal to the data register address %4:05109 which must be data register address connected to the output pin STAT1 + 2 (5107 + 2 = 5109). Input Bit: Always zero. Output type: Holding Register (Reading 1 word). Output Register: 5109 (the same as input register). Output Bit: Always zero. Parameter type: Holding Register (Pointer for start reading data register area of 80 words). Parameter Register: 49081 (equal to the data type UINT connected to the input pin PARAno on the PID-ACESYS block).

32 PID Controller

Copyright FLS Automation A/S. All rights reserved.

Next you will see the 3. Point: a B-point (The MODE of the PID) address configuration in the ECS.

The point Code: UF01M013F1_MODE. PLC: 1 (PLC no. (In which PLC this point is reading)). Input type: HR-16bit/Timestamp (Reading 2 words: 1.word=Status for the PID. 2.word=Timestamp for when an event happened.) Input Register: 5111 (equal to the data register address %4:05111 connected to the output pin STAT2 on the PID-ACESYS block) Input Bit: Always zero. Output type: Holding Register (Reading 1 word). Output Register: 49107 (equal to the data register address %4:49107, which must be parameter address + 26 (49081+26=49107). Output Bit: Always zero. Parameter type: Holding Register (Pointer for start reading data register area of 80 words). Parameter Register: 49081 (equal to the data type UINT connected to the input pin PARAno on the PID-ACESYS block)

Copyright FLS Automation A/S. All rights reserved.

PID Controller 33

Copyright FLS Automation A/S. All rights reserved.

PID Controller 35

Você também pode gostar