Sie sind auf Seite 1von 27

Advanced Instructions

18.3
A t a Glan ce

Twido PID Quick Start Guide

O v erv iew

This section contains information for getting started with the PID control and AutoTuning functions available on Twido controllers. This section contains the following top ics:
Top ic Purp ose of Document S tep 1 - C onfiguration of Analog C hannels U sed for C ontrol S tep 2 - Prereq uisites for PID C onfiguration S tep 3 C onfiguring the PID S tep 4 - Initializ ation of C ontrol S et-U p S tep 5 - C ontrol S et-U p AT + PID S tep 6 - Debugging Adjustments Pag e 627 629 632 634 642 647 651

W h at's in th is Section ?

626

35011386 06/2008

Advanced Instructions

Purp os e of Docum en t
In troduction This q uick start guide aims to guide y ou, by p roviding ex amp les, through all the step s req uired to correctly configure and set up y our Twido controller's PID control functions. Note: Impl ementing the PID f unction on a Twido does not require an advanced l evel sy of stem understanding, does demand a certain degree of but rigor f good or resul ts.

Th is docum en t con tain s :

This document ex p lains the following step s:


Step 1 2 3 4 5 6 Des crip tion C onfiguration of analog channels used for control Prereq uisites for PID configuration PID configuration Initializ ation of control setup . AT + PID control setup Debugging and adjustments

35011386 06/2008

627

Advanced Instructions

C on cern in g th e ex am p le us ed in th is g uide

F or this ex amp le, we have chosen a Ty p e K ThermoC oup le (0-2 00 ). W e will use transistor control with the outp ut therefore being a base controller outp ut controlled directly by the PID controller using PW M (see p. 634). The diagram below shows the ex p erimental setup used in the ex amp le:

TWDLMDA20DRT TWDALM3 LT 1 /L1 2/T1

4 /A2- + 3 /A1 % Q 0.1 C o m (+ ) -V + 24 V 0V

Re s is to r

IN 0+ IN 0-

G re e n Wh ite

To 0-200 Th e rm o C o u p le

+ 24 V

0V

23 0 V AC

628

35011386 06/2008

Advanced Instructions

Step 1 - C on fig uration of A n alog C h an n els U s ed for C on trol


In troduction In general, a PID controller uses an analog feedback signal (k nown as the "p rocess value") to measure the value to be adjusted. This value can be a level, a temp erature, a distance, or another value for other ap p lications. E x am p le of an A n alog M eas urem en t Sig n al L et us tak e the ex amp le of a temp erature measurement. The sensor sends an analog measurement which dep ends on the measured value back to the controller. F or temp erature and with sensors such as PT1 00s or Thermocoup les, the measured signal increases with an increase in current temp erature. In offline mode, once y ou have selected the base controller, add the analog card as a base ex tension. The numbering of the channels will dep end on its configuration slot.

H ow to A dd an A n alog C ard (E x p an s ion M odule)

35011386 06/2008

629

Advanced Instructions

H ow to C on fig ure A n alog In p ut C h an n els

The following table describes the p rocedure for configuring the analog channels of the ex p ansion module:
Step 1 2 A ction S elect Des crib e step from the TwidoS uite interface. S ee (Describing Ap p lications, TwidoS uite Programming S oftware, O nline H elp ). Disp lay the p roduct catalog and select a module to add to the sy stem descrip tion. F or ex amp le, TW DA L M 3L T for measuring temp erature using a PT1 00 or Thermocoup le. Add the module to the sy stem descrip tion (see (Positioning a M odule, TwidoS uite Programming S oftware, O nline H elp ).) U se the C onfiguration E ditor (C onfiguration E ditor, TwidoS uite Programming S oftware, O nline H elp ) to set p arameters of analog I/O modules that y ou added as ex p ansion modules when y ou described the sy stem. In the Ty p e column, select the inp ut ty p e corresp onding to the ty p e of sensor used (ThermoC oup le K , if the sensor is of this ty p e). In the R an g e column, select the measurement unit for the sensor. F or temp erature sensors it is easier to select C els ius , as this mak es the number of counts sent back by the analog card a direct factor of the real measurement. Provide an address for the inp ut sy mbol of the configured analog card. It will be used to comp lete the PID fields (% IW 1 .0, for this ex amp le). Do the same for an analog outp ut if an outp ut must be used to drive the control sy stem.

3 4

5 6

7 8

630

35011386 06/2008

Advanced Instructions

E x am p le of A n alog C h an n el C on fig uration

S everal ty p es of configuration are p ossible dep ending on the ty p e of measurement used, as indicated below: z F or the ap p lication in the ex amp le used in this document, we have chosen a Ty p e K Th erm oC oup le (0-2 00 ). The p rocess value read will be directly comp rehensible (2 000 counts = 2 00 as the unit factor is 0.1 ). z F or other ty p es of measurement, y ou choose 0-10V or 4 -2 0 m A in the Ty p e column, or C us tom in the R an g e column. Then adjust the value scale (enter 0 in the M in im um column and 10000 in the M ax im um column) to be able to read the p rocess value directly (1 0 V = 1 0000 counts). The ex amp le below shows a configuration for a ThermoC oup le K analog channel:
Descrpti ofthe m odul i on e Ref erence num Description TW DALM3LT Address 2

Ex ansion modul with 2 anal inp ( p e og uts RTD -Th and 1 outp ( -10V, -20mA) ) ut 0 4 , 12 b removabe screw terminalK, its, l . J C an cel

Modul confgur on. e i ati IO Tabl / e U s ed A ddres s % IW 2 .0 % IW 2 .1 % Q W 2 .0 Sy m b ol

A p p ly

Ty p e N ot in use N ot in use N ot in use

Scop e N ormal N ormal N ormal

M in im um 0 0 0

M ax im um 1 09 5 4 09 5 4 09 5

U n its N one N one N one

35011386 06/2008

631

Advanced Instructions

Step 2 - Prereq uis ites for PID C on fig uration


In troduction B efore configuring the PID, ensure that the following p hases have been p erformed:
Ph as e 1 2 Des crip tion PID enabled in the p rogram. S can p eriod configured

E n ab lin g PID in th e Prog ram

The PID controller must be enabled in the p rogram by an instruction. This instruction can be p ermanent or be a condition of an inp ut or internal bit. In the following ex amp le, the PID is enabled by the instruction % M 0: z In L adder:

LD

SE C TIO N TITL E

Enter y comments here. Enter y our our comments here. Enter y comments here. Enter y our our comments here. Enter y comments here. Enter y our our comments here. Enter y comments here. Enter y comments here. our our

R ung 1

% M0

P ID 0

In Instruction L ist: ---0 LD %M0 1 [ PID 0 ]

Note: Ensur that you use corect syntax: e r Checkthat there is a space between " PID"and the PID number ( e.g. PID<space>0) .

632

35011386 06/2008

Advanced Instructions

C on fig uration of Scan Period

W hen using PID controllers, y ou are strongly advised to configure the scan mode of the PL C cy cle to p eriodic. The table below describes the p rocedure for configuring the scan mode. In this mode, the % s1 9 = 1 (scan p eriod overrun) shows that the PL C scan time is greater than the p eriod defined by the user.
Step 1 2 3 A ction U se the Prog ram o C on fig ure o C on fig ure th e B eh av ior task to configure the controller Scan M ode settings. C heck the Periodic box . S et the cy cle time as shown in the screen below:
C on fig ure th e B eh av ior N iv eaux fon ction Automatic ue Automatiq M anual A utom atic m an ag em en t The H ighest p ossible The L owest p ossible M an ual m an ag em en t
L evel 1 .0 L evel 2 .0 L evel 2 .5

Scan M ode

N ormal Periodic

Period (2 250

1 00 ms

ms

W atch dog Period (1 0-5 00 ms): Periodic E v en t N on used ot utilis Period (5 -2 5 0 ms): S ubp rogram number Startup

10 0

ms

Automatic start in R un R un / S top Inp ut: N one

A utos av e

Automatic R AM = > E E PR O M A p p ly R es tore

N ote: The cy cle time should be adjusted to the siz e of the p rogram and desired p erformance. (A time of 5 0ms is a good comp romise).

35011386 06/2008

633

Advanced Instructions

Step 3 C on fig urin g th e PID


In troduction F or this ex amp le, we have chosen to imp lement the majority of PID controller functions for Twido. S ome selections are not essential and can be simp lified. The PID controller has an Auto-Tuning function that simp lifies the regulation loop setting (this function is referred to as AT in the rest of the document). The Twido PID controller offers four distinct op erating modes, configurable in the Gen eral tab in the PID dialog box : z PID = S imp le PID controller. z A T + PID = The Auto-Tuning function is active when the PID starts up and automatically enters the gain values K p , Ti, Td (PID tab) and the ty p e of PID action (O utp ut tab). At the end of the Auto-Tuning, seq uence, the controller switches to PID mode for the adjusted setp oint, and using the p arameters set by AT. z A T = The Auto-Tuning function is active when the PID starts up and automatically enters the gain values K p , Ti, Td (PID tab) and the ty p e of PID action (O utp ut tab). At the end of the seq uence the PID stop s and waits. The gain values K p , Ti, Td (PID tab) and the ty p e of PID action (O utp ut tab) are entered. z W ord addres s = The selection of PID op erating mode can be controlled by the p rogram by assigning the desired value to the word address associated to this selection: z % M W x x = 1 : The controller op erates in simp le PID mode. z % M W x x = 2 : The controller op erates in AT + PID. z % M W x x = 3 : The controller op erates in AT mode only . z % M W x x = 4 : The controller op erates in PI mode only . This ty p e of configuration via the word address enables the user to manage the PID controller op erating mode via the ap p lication p rogram, thus mak ing it p ossible to adap t to the final req uirements.

A uto-Tun in g (A T) O p eratin g M odes

Note: PI regul ation can be sel ected f rom the PI tab. D

634

35011386 06/2008

Advanced Instructions

L aun ch in g th e PID Dialog B ox

The table below shows the PID dialog box and the p rocedure for accessing the different PID settings configuration tabs:
Step 1 A ction S elect the Prog ram o C on fig ure o C on fig ure th e Data task on the TwidoS uite interface. R es ult: The default software configuration window ap p ears. S elect A dv an ced O b jects from the O bject C ategory (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame and choose PID) from the O bjects Ty p e (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame. S elect the desired PID# from the PID table.

35011386 06/2008

635

Advanced Instructions

Step 4

A ction The PID dialog box ap p ears in the foreground and is used to enter the different controller settings as shown in the figure below. In offline mode, this disp lay s several tabs: Gen eral, In p ut, PID, A T, O utp ut:
Gen eral In p ut PID A T O utp ut A n im ation

A p p ly

C an cel

Oper ng m ode: ati

AT + PI D PI States D

W or addr d ess:

PI D PI contr l D oler

Output D/ I

Setpoi nt

I nput

Mes

AT PV Li i m t AT

Im p ortan t: The tabs must be entered in the order in which they ap p ear in the PID dialog box : first G eneral, Inp ut, PID, AT then O utp ut. N ote: In online mode, this screen disp lay s two more tabs, A n im ation and Trace, used resp ectively for the diagnostics and disp lay of the controller op eration.

Dy n am ic M odification of Param eters

F or the dy namic modification of the PID p arameters (in op eration and in online mode), it is advised to enter the memory addresses in the associated fields, thus avoiding switching to offline mode to mak e on-the-fly changes to values.

636

35011386 06/2008

Advanced Instructions

Gen eral Tab Settin g

The following table shows how to set the Gen eral tab in the PID dialog box :
Step 1 2 A ction In the Gen eral tab, check the C on fig ured box to activate the PID and set the following tabs. In the O p eratin g m ode drop -down list, select the ty p e of op eration desired (see p. 634). In th e ex am p le: W e will select the M emory address mode and enter the word % M W 1 7 in the associated field. The PID op erating mode will then be link ed to the value in % M W 1 7 .

In p ut Tab Settin g

The following table shows how to set the In p ut tab in the PID dialog box :
Step 1 A ction In the In p ut tab, enter the analog channel used as a measurement in the associated field. In th e ex am p le: W e have chosen % IW 1.0 as this is used as a temp erature measurement. W here necessary , set alarms on the low and high measurement thresholds by check ing the box es and filling in the associated fields. N ote: The values entered may be fix ed values (entered in the associated fields) or modifiable values (by filling in the fields associated with the memory addresses: % M W x x ).

35011386 06/2008

637

Advanced Instructions

PID Tab Settin g

The following table shows how to set the PID tab in the PID dialog box :
Step 1 A ction In the PID tab, enter the value to be used to set the controller setp oint. In general, this value is a memory address or setp oint of an analog inp ut. In th e ex am p le: W e have entered % M W 0, which will be used as a setp oint word. The C orrector ty p e can be selected only if the PID op erating mode has been p reviously chosen in the G eneral tab. In th e ex am p le: the C orrector ty p e is set to automatic and disabled. N ote: If y ou have p reviously chosen PID as y our op erating mode, y ou can select the desired corrector ty p e (PID or PI) from the drop -down list. If PI is selected the Td p aram eter is forced to z ero and this field is disabled. S et the K p , Ti, Td p arameters. Im p ortan t: If the A T or A T+ PID mode is selected, it is essential that the K p , Ti and Td fields be comp leted with m em ory addres s es , to enable the AutoTuning function to automatically fill in the values found. In th e ex am p le: W e have entered % M W 1 0 for K p , % M W 1 1 for Ti and % M W 1 2 for Td. N ote: In p rincip le, it is rather difficult to determine the op timal adjustment values of K p , Ti and Td for an ap p lication that has not y et been created. C onseq uently , we strongly recommend y ou enter the memory words addresses in these fields, in order to enter these values in online mode thus avoiding switching to offline mode to mak e on-the-fly changes to values. E nter the PID Sam p lin g p eriod. This value is used by the controller to acq uire measurements and up date outp uts. In th e ex am p le: W e have set the PID samp ling p eriod to 1 00, or 1 s. G iven that the adjusted sy stem has a time constant of several minutes, this samp ling p eriod value seems correct. Im p ortan t: W e advise y ou set the samp ling p eriod to a multip le of the controller scan p eriod, and a value consistent with the adjusted sy stem.

638

35011386 06/2008

Advanced Instructions

Tab Settin g for A T

The following table shows how to set the A T tab in the PID dialog box :
Step 1 2 3 Sp ecial N ote A dv ice A ction In the A T tab, check the A uth oriz e box if y ou want to use AT. E nter the M eas urem en t lim it value. This is the limit value that the measurement must not ex ceed during AT. E nter the O utp ut s etp oin t value which is the controller outp ut value sent to generate AT. F or furth er details ab out s ettin g th es e v alues refer to th e AT Tab of PID Function, p. 680 s ection . W e s tron g ly recom m en d y ou en ter th e m em ory words addres s es in th es e fields , in order to en ter th es e v alues in on lin e m ode th us av oidin g s witch in g to offlin e m ode to m ake on -th e-fly ch an g es to v alues .

35011386 06/2008

639

Advanced Instructions

O utp ut Tab Settin g

The following table shows how to set the O utp ut tab in the PID dialog box :

W A R N IN G
RI OF SYSTEM OVERLOAD SK You are reminded that manual mode has a direct efect on the control output. f l er Consequentl, y sending a manual setpoint ( Output f d)acts directl on the open iel y control sy l ed stem. You shoul theref proceed with care in this operating mode. d ore Faiur to f l these i ucti l e olow nstr ons can r esul i death,serous i ur or t n i nj y, equi ent dam age. pm

W A R N IN G
UNEXPECTED EQUI PMENT OPERATI ON Do not use rel output with PID as this mayresulin the number ofpermitted ay t operations f rel s being ex or ay ceeded and the rel destroy Depending on the ay ed. process being control this can have haz l ed, ardous consequences. Faiur to f l these i ucti l e olow nstr ons can r esul i death,serous i ur or t n i nj y, equi ent dam age. pm
Step 1 A ction In the O utp ut tab, enter the selection from the A ction drop -down list. This selection dep ends on the configured sy stem: z Direct action: the controller outp ut decreases as the variation value (setp oint - measurement) increases (cold controller). z Inverse action: Direct action: the controller outp ut decreases as the variation value (setp oint - measurement) increases (hot controller). Im p ortan t: W hen using the AT function, this list automatically selects B it addres s . The op erating mode is determined by the AT function, and in this case entered in the bit associated with this field. 2 W here necessary , enter the threshold values of the controller outp ut in the A larm s field. This function may be necessary in certain ap p lications for managing p rocess alarms where thresholds are ex ceeded.

640

35011386 06/2008

Advanced Instructions

Step 3

A ction S et the M an ual m ode op erating mode. The drop -down list offers several choices: z In h ib it = no manual mode. z A uth oriz e = the controller op erates in manual mode only . z B it addres s = the value of the bit is used to change the op eration of manual mode (bit set to 0 = automatic mode, bit set to 1 = manual mode). In th e ex am p le: H ere we select % M 2 to activate the choice, and % M W 1 8 to adjust the value of the manual setp oint. U se the manual mode to mak e trials to determine the m in /m ax outp ut lim itation , or most accurate A T outp ut s etp oin t. 4 Adjust the Dis crete outp ut word. This word is used by the controller to send the control setp oint. It can be sent directly to an analog outp ut channel (% Q W ..) or to a memory word (% M W x x ) for additional p rocessing. Im p ortan t: W hen using the PW M function, enter a memory address (% M W x x ) in this field. S et the PW M outp ut if req uired by the sy stem: 1. C heck the A uth oriz e box if y ou intend to control the sy stem via a PW M actuator. 2 . E nter the PW M control Period in the associated field. 3. E nter the O utp ut used to control the PW M actuator. W e recommend y ou use the base controller transistor outp uts for this function (for ex amp le, % Q 0.0 or % Q 0.1 for the TW DL M DA2 0DR T base controller). C onfirm the controller configuration by click ing O K in the bottom left of the screen. To configure several PID controllers, click N ex t to increment the number of the PID to be set.

6 7

35011386 06/2008

641

Advanced Instructions

Step 4 - In itializ ation of C on trol Set-U p


Prereq uis ites for Set-U p B efore set-up , y ou must follow the step s below:
Step 1 2 A ction C onnect the PC to the controller and transfer the ap p lication. S witch the controller to R U N mode.

Note: Bef switching the control to RUN mode,checkthat the machine ore l er s operating conditions al this f the rest ofthe appl l ow or ication.

642

35011386 06/2008

Advanced Instructions

Procedure

The step s below must be followed to initializ e control set-up :


Step 1 A ction C reate an animation table containing the main objects needed for diagnostics. In th e ex am p le: z % M W 0: loop controller setp oint, z % IW 1 .0: measurement, z % M 0: enabling of loop controller, z % M 1 : loop controller action ty p e (set by the AT function), z % M 2 : selection of Automatic or M anual mode, z % M W 1 0 to % M W 1 2 : PID loop controller coefficients, z % M W 1 3 : measurement limit not to be ex ceeded in AT mode, z % M W 1 4 : loop controller outp ut setp oint in AT mode, z % M W 1 5 : discrete outp ut of the PID loop controller (entered by the controller), z % M W 1 6 : setting of the PW M p eriod, z % M W 1 7 : op erating mode selection for the PID controller, z % M W 1 8 : manual setp oint associated with the % M 2 bit selection. C heck the consistency of the value measured in the % IW 1 .0 field. In th e ex am p le: 1. A measurement of 2 4 8 counts is obtained when the sy stem stable and cold. 2 . This seems consistent, as we have a multip lication coefficient of 1 0 between the temp erature and the value read. W e can also influence the measurement ex ternally to mak e sure the reading is consistent (increase the temp erature around the p robe to check the measurement also increases). N ote: This test is q uite imp ortant, as the op eration of the controller dep ends essentially on the accuracy of the measurement. 3. If y ou have any doubt about the accuracy of the measurement, set the controller to S TO P mode and check the wiring to the inp uts of the analog card (voltmeter or ammeter for inp uts 0-1 0V / 4 -2 0mA, ohmmeter for the PT1 00 (1 00 ohms at 2 0 ) or Thermocoup le (a few tens of ohms): z F irst disconnect the p robe from the analog card terminals. z C heck there is no wiring reversal (the colors of the wires connected to the inp uts, comp ensation cable for the PT1 00). Im p ortan t: IN 0 and IN 1 inp ut channels have a shared p otential at the terminals (-). z C heck that the analog card is p owered by a 2 4 V DC sup p ly to the first two terminals. z C heck that the 4 -2 0 mA inp ut sensors are sup p lied. The Twido analog inp ut cards are not a source of current.

35011386 06/2008

643

Advanced Instructions

Step 3

A ction To p ower up the loop controller, start by controlling the PID controller in M an ual mode in order to increase the limit values needed by the AT function. To set the controller to M anual mode: 1. S witch the controller to R U N mode. 2 . E nter the memory addresses with the following values in the animation table: z % M 2 : M anual mode selection = 1 , (M 2 = 1 = > M anual M ode, M 2 = 0 = > Automatic M ode), z % M W 1 6 : PW M p eriod setting = 1 0, z % M W 1 7 : O p erating mode selection for the PID controller = 1 (PID only ), z % M W 1 8 : M anual setp oint associated with the % M 2 bit selection = 1 000. This setp oint value can be selected several times, on condition that the sy stem be left to return to its initial state. In th e ex am p le: W e have selected the value 1 000, which corresp onds to an average temp erature increase value (for information, 2 000 counts = 2 00 ). W hen cold, the sy stem starts at a value of 2 5 0 counts. C heck that the controller is R U N mode. (% M 0: controller validation = 1 , to be entered in the animation table.) S elect A dv an ced O b jects from the O bject C ategory (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame and choose PID) from the O bjects Ty p e (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame. S elect the desired PID# from the PID table.

4 5

644

35011386 06/2008

Advanced Instructions

Step 6

A ction Activate the A n im ation tab for the req uired PID number and check that the animation matches the screen below:
Gen eral In p ut PID A T O utp ut A n im ation

A p p ly

C an cel

Oper ng m ode ati PI D

Li ofPI states st D 8/ 2005 11:3 AM PI Stop 29/ 5 D

PI D

Ts PI contr l D oler Kp Ti Td 0 0 0

Output

Perod i 20

Setpoi nt 0

Rev 0 0 Output

I nput

Mes 0

N ote: The screens of the PID controller are only refreshed if the controller is enabled (and API set to R U N ). 7 Activate the Trace tab for the req uired PID number, then: 1. S et the time elap se drop -down list to 15 m in to see a trace of the measurement signals p rogress. 2 . C heck that the measurement value remains within the accep table values for the sy stem. The increase in the measurement can be check ed in the Trace tab. W hen this has stabiliz ed, read the value corresp onding to the stabiliz ation of the measurement grap h (for ex amp le, 3 5 0 counts corresp onding to 3 5 , or an increase of 1 0 comp ared with the initial state).

35011386 06/2008

645

Advanced Instructions

Step 8

A ction S et the time elap se scroll list to 1 5 min to see a trace of the measurement signals p rogress. C heck that the measurement value remains within the accep table values for the sy stem. W e can view the increase in the measurement from the Trace tab. W hen this has stabiliz ed, read the value corresp onding to the stabiliz ation of the measurement grap h (for ex amp le, 3 5 0 counts corresp onding to 3 5 , or an increase of 1 0 comp ared with the initial state). If we see that the actuator is not controlled, check the outp ut circuit: z F or an analog outp ut, check the outp ut voltage or current from the analog card. z F or a PW M outp ut, check : z the L E D of the outp ut concerned is lit (% Q 0.1 , in this ex amp le), z the wiring of the sup p lies and 0V circuit for the TW DL M DA2 0DR T base outp uts, z the actuator p ower sup p ly . C lose the PID disp lay screen and stop the manual mode by entering the following values in the animation table: z % M 0: E nable loop controller = 0 (stop the loop controller) z % M 2 : S election of Automatic or M anual mode = 0 (stop manual mode) z % M W 1 7 : O p erating mode selection for the PID controller = 0 z % M W 1 8 : M anual setp oint associated with % M 2 bit selection = 0.

10

646

35011386 06/2008

Advanced Instructions

Step 5 - C on trol Set-U p A T + PID


In troduction In this section, we will be look ing at how to configure the controller to start op eration in AT+ PID. mode. In this op erating mode, the controller will automatically adjust the controller to coefficients K p , Ti, Td. Note: During the sequence,the sy stem shoul not be subj to anydisturbance d ect due to ex ternal variations that woul afect the f adj d f inal ustments. Al bef so, ore l aunching the AT sequence,mak sure the sy e stem is stabil ed. iz

R em in der of K p , Ti an d Td Settin g s

F or op eration in AT+ PID mode to be p ossible, the following two conditions must be met: z The K p , Ti, Td coefficients must be configured as m em ory addres s es (% M W x x ). z The A ction ty p e in the O utp ut tab must be set to a m em ory b it addres s (% M x x ).

35011386 06/2008

647

Advanced Instructions

To set the controller to AT+ PIDmode, p roceed as follows:


Step 1 A ction E nter or check the memory addresses with the following values in the animation table: z % M 2 : selection of Automatic or M anual mode = 0, z % M W 0: loop controller setp oint = 6 00 (in this ex amp le, the setp oint is active after the AT seq uence and the controller maintains a temp erature of 6 0 ), z % M W 1 0 to % M W 1 2 : coefficients of the PID controller (leave at 0, the AT seq uence will fill them in), z % M W 1 3 : measurement limit not to be ex ceeded in AT mode = 9 00 (in the ex amp le, if 9 0 is ex ceeded an error will occur inAT), z % M W 1 4 : controller outp ut setp oint in AT mode = 2 000 (from the test in manual mode). This is the step change value ap p lied to the p rocess. In AT mode, the outp ut setp oint is directly ap p lied at the controller outp ut. This value can be an internal word (% M W 0 to % M W 2 9 9 9 ), an internal constant (% K W 0 to % K W 2 5 5 ) or a direct value. The value must therefore be between 0 and 1 0,000. N ote: The outp ut autotuning setp oint must alway s be greater than the last outp ut ap p lied to the p rocess. z % M W 1 5 : discrete outp ut of the PID loop controller (entered by the controller), z % M W 1 6 : PW M p eriod setting (leave 1 0, as set p reviously ), z % M W 1 7 : op erating mode selection for the PID controller = 2 (AT + PID), z % M W 1 8 : manual setp oint associated with the % M 2 bit selection = 0. C onfigure the Twido controller so that it scans in Periodic m ode. S et the Tim e of the Twido controller scanning p eriod so that the Sam p lin g p eriod (Ts ) value of the PID controller is an ex act multip le. N ote: F or further details on how to determine the samp ling p eriod, see p. 7 0 0 and p. 7 0 1 . C heck that the controller is R U N mode. E nter the memory bit % M 0. % M 0: controller validation = 1 in the animation table. S elect A dv an ced O b jects from the O bject C ategory (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame and choose PID) from the O bjects Ty p e (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame. S elect the desired PID# from the PID table.

2 3

4 5 6

648

35011386 06/2008

Advanced Instructions

Step 7

A ction Activate the A n im ation tab for the req uired PID number and check that the animation matches the screen below:
Gen eral In p ut PID A T O utp ut A n im ation

A p p ly

C an cel

Oper ng m ode ati AT + PI D

Li ofPI states st D 8 29 2 / / 005 9:4 AM PI Stop 5 D

PI D

Ts 0 PI contr l D oler Kp Ti 0 0

Output

Perod i 2 0

Setpoi nt 0

Td 0

Rev 0 0 Output

I nput

Mes 0

AT PV Li i m t 0

Output setpoi nt 0 AT C reate an an im ation tab le

N ote: The screens of the PID controller are only refreshed if the controller is enabled (and API set to R U N ). 8 C lick on Trace button and wait for the sy stem to startAT. Trace N ote: The waiting time may last for 1 0-2 0 minutes before the AT p rocedure changes.

35011386 06/2008

649

Advanced Instructions

Storag e of C alculated K p , Ti an d Td C oefficien ts

O nce the Auto-Tuning seq uence is comp lete, the memory words assigned to the K p , Ti and Td coefficients are comp leted with the calculated values. These values are written to the R AM memory and saved in the controller as long as the ap p lication is valid (p ower-down of less than 3 0 day s) and no cold-start is p erformed (% S 0). Note: Ifthe sy stem is not inf l uenced byoutside f l uctuations,th val maybe e ues har written in the settings of PID control and the control switched to PID d the l er l er mode onl. y

R ep etition of A T

The Auto-Tuning seq uence is rep eated on every switch to R U N or cold start (% S 0). Y ou should therefore test the diagnostics words using the p rogram what to do in the event of a restart.

650

35011386 06/2008

Advanced Instructions

Step 6 - Deb ug g in g A djus tm en ts


A cces s in g th e A n im ation Tab le To mak e it easier to debug the sy stem, the animation table can be accessed at any time when the PID controller screens are in the foreground. Note: W hen viewingonl the setpoint and process val graphs usingthe Detach button y ue in the Tr ace tab ( Trace tab window bel ,the animation tabl can then be see ow) e accessed via Pr am o Debug o Ani ate the pr am task ogr m ogr .
PI 0 D
210 2 00 190 180 170 160 150 140 130 120 110 1 00 90 80 70 60 50 40 30 20 10 0 15 0
In itializ e 15 min

O rder

M easure

E x p ort

S creen data can be ex p orted into E x cel format by click ing on the E x p ort button. This op ens a dialog box in which y ou can sp ecify the name and location of an .c v s file. In this dialog box click Sav e to ex p ort the data or C an cel to abandon ex p ort.

35011386 06/2008

651

Advanced Instructions

R eturn in g to PID Screen s

To return to the PID controller screens without losing the grap h trace history , p roceed as follows:
Step 1 A ction S elect A dv an ced O b jects from the O bject C ategory (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame and choose PID) from the O bjects Ty p e (O bject C ategory F rame, TwidoS uite Programming S oftware, O nline H elp ) frame. S elect the desired PID# from the PID table. C lick the A n im ation tab.

H is tory of PID States

In the A n im ation tab for the PID controllers, y ou can access the last 1 5 states of the current controller by mak ing y our selection from the drop -down list as shown below:
Gen eral In p ut PID A T O utp ut A n im ation

A p p ly

C an cel

Oper ng m ode ati PI D

Li ofPI states st D 1 2 /04 /2 004 1 7 :3 5 The PID setp oint is reached 12/ 2004 17:29 The PI contr i i pr ess 04/ D ol s n ogr 1 2 /04 /2 004 1 7 :2 9 Autotuning p rocess finished 1 2 /04 /2 004 1 7 :2 0 Phase 4 autotuning in p rogress 1 2 /04 /2 004 1 7 :1 5 Phase 3 autotuning in p rogress 1 2 /04 /2 004 1 7 :1 0 Phase 2 autotuning in p rogress 1 2 /04 /2 004 1 7 :02 Phase 1 autotuning in p rogress

Note: The PID states are stored when the PC and TwidoSuite are in onl mode. ine

652

35011386 06/2008

Das könnte Ihnen auch gefallen