69336911 pid quick start guide twidosuite 21

27
Advanced Instructions 626 35011386 06/2008 18.3 Twido PID Quick Start Guide A t a Glan ce O v erv iew This section contains information for getting started with the PID control and Auto- Tuning functions available on Twido controllers. W h at's in th is Section ? This section contains the following top ics: Top ic Pag e Purp ose of Document 627 S tep 1 - C onfiguration of Analog C hannels U sed for C ontrol 629 S tep 2 - Prereq uisites for PID C onfiguration 632 S tep 3 – C onfiguring the PID 634 S tep 4 - Initializ ation of C ontrol S et-U p 642 S tep 5 - C ontrol S et-U p AT + PID 647 S tep 6 - Debugging Adjustments 651

Upload: giusssy

Post on 27-Dec-2015

123 views

Category:

Documents


3 download

DESCRIPTION

PID Quick Start Guide Twidosuit

TRANSCRIPT

Page 1: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

626 35011386 06/2008

18.3 Twido PID Quick Start Guide

A t a Glan ce

O v erv iew This section contains information for getting started with the PID control and Auto-

Tuning functions available on Twido controllers.

W h at's in th is

Section ?

This section contains the following top ics:

Top ic Pag e

Purp ose of Document 6 2 7

S tep 1 - C onfiguration of Analog C hannels U sed for C ontrol 6 2 9

S tep 2 - Prereq uisites for PID C onfiguration 6 3 2

S tep 3 – C onfiguring the PID 6 3 4

S tep 4 - Initializ ation of C ontrol S et-U p 6 4 2

S tep 5 - C ontrol S et-U p AT + PID 6 4 7

S tep 6 - Debugging Adjustments 6 5 1

Page 2: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 627

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.

Th is docum en t

con tain s :

This document ex p lains the following step s:

Note: Implementing the PID function on a Twido does not require an advanced

level of system understanding, but does demand a certain degree of rigor for good

results.

Step Des crip tion

1 C onfiguration of analog channels used for control

2 Prereq uisites for PID configuration

3 PID configuration

4 Initializ ation of control setup .

5 AT + PID control setup

6 Debugging and adjustments

Page 3: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

628 35011386 06/2008

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

% Q 0.1C o m (+ )-V

+ 24 V

0V

IN 0+ G re e n

Wh iteIN 0-

1 /L1 2/T1

4 /A2- + 3 /A1

Re s is to r

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

+ 24 V 0V

23 0 V AC

Page 4: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 629

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.

H ow to A dd an

A n alog C ard

(E x p an s ion

M odule)

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.

Page 5: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

630 35011386 06/2008

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 A ction

1 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 ).

2 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.

3 Add the module to the sy stem descrip tion (see (Positioning a M odule,

TwidoS uite Programming S oftware, O nline H elp ).)

4 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.

5 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).

6 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.

7 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).

8 Do the same for an analog outp ut if an outp ut must be used to drive the control

sy stem.

Page 6: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 631

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:

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 ).

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:

TW DALM3LT

Expansion module with 2 analog inputs (RTD

- Th) and 1 output (0 - 10V, 4 - 20mA),

12 bits, removable screw terminal. K, J

2Address

Description

Reference numDescription of the module

I/O Table

Module configuration.

U s ed Sy m b ol

% IW 2 .0

A ddres s

N ot in use

Ty p e

0

M in im um

1 09 5

M ax im um

N one

U n its

% IW 2 .1 N ot in use 0 4 09 5 N one

% Q W 2 .0 N ot in use 0 4 09 5 N one

N ormal

Scop e

N ormal

N ormal

A p p ly C an cel

Page 7: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

632 35011386 06/2008

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:

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:

In L adder:

In Instruction L ist:

----

0 LD %M0

1 [ PID 0 ]

Ph as e Des crip tion

1 PID enabled in the p rogram.

2 S can p eriod configured

Note: Ensure that you use correct syntax:

Check that there is a space between "PID" and the PID number (e.g.

PID<space>0).

L D SE C TIO N TITL E 1Enter your comments here. Enter your comments here.Enter your comments here. Enter your comments here. Enter your comments here. Enter your comments here.

R ung 1

Enter your comments here. Enter your comments here.

% M0P ID 0

Page 8: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 633

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 A ction

1 U se the Prog ram ! C on fig ure ! C on fig ure th e B eh av ior task to configure

the controller Scan M ode settings.

2 C heck the Periodic box .

3 S et the cy cle time as shown in the screen below:

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).

Automatiq ueN iv eaux fon ction -

N on utilisé

C on fig ure th e B eh av ior

M anual

A utom atic m an ag em en t

The H ighest p ossibleThe L owest p ossible

M an ual m an ag em en t

L evel 1 .0L evel 2 .0L evel 2 .5

N ormal

Periodic

2 5 0 ms

Period (2 -

W atch dogPeriod (1 0-5 00 ms):

Periodic E v en t

Period (5 -2 5 0 ms):

S ubp rogram number

Scan M ode

Startup Automatic start in R un

N oneR un / S top Inp ut:

Automatic R AM = > E E PR O MA utos av e

Automatic

1 00 ms

N ot used1 0 ms

0

A p p ly R es tore

Page 9: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

634 35011386 06/2008

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.

A uto-Tun in g

(A T)

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).

O p eratin g M odes The Twido PID controller offers four distinct op erating modes, configurable in the

Gen eral tab in the PID dialog box :

PID = S imp le PID controller.

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.

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.

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:

% M W x x = 1 : The controller op erates in simp le PID mode.

% M W x x = 2 : The controller op erates in AT + PID.

% M W x x = 3 : The controller op erates in AT mode only .

% 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.

Note: PI regulation can be selected from the PID tab.

Page 10: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 635

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 A ction

1 S elect the Prog ram ! C on fig ure ! C on fig ure th e Data task on the

TwidoS uite interface.

R es ult: The default software configuration window ap p ears.

2 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.

3 S elect the desired PID# from the PID table.

Page 11: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

636 35011386 06/2008

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.

4 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:

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.

Step A ction

AT + PIDOperating m ode:

O utp utGen eral In p ut PID A T

PID

Setpoint

Output

Input

Mes

PVLimit

AT

PID States

D/IPID controller

AT

A n im ation

W ord address:

A p p ly C an cel

Page 12: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 637

Gen eral Tab

Settin g

The following table shows how to set the Gen eral tab in the PID dialog box :

In p ut Tab Settin g The following table shows how to set the In p ut tab in the PID dialog box :

Step A ction

1 In the Gen eral tab, check the C on fig ured box to activate the PID and set the

following tabs.

2 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 .

Step A ction

1 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.

2 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 ).

Page 13: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

638 35011386 06/2008

PID Tab Settin g The following table shows how to set the PID tab in the PID dialog box :

Step A ction

1 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.

2 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.

3 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 Auto-

Tuning 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.

4 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.

Page 14: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 639

Tab Settin g for

A T

The following table shows how to set the A T tab in the PID dialog box :

Step A ction

1 In the A T tab, check the A uth oriz e box if y ou want to use AT.

2 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.

3 E nter the O utp ut s etp oin t value which is the controller outp ut value sent to

generate AT.

Sp ecial

N ote

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 .

A dv ice 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 .

Page 15: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

640 35011386 06/2008

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 GRISK OF SYSTEM OVERLOAD

You are reminded that manual mode has a direct effect on the controller output.

Consequently, sending a manual setpoint (Output field) acts directly on the open

controlled system. You should therefore proceed with care in this operating mode.

Failure to follow these instructions can result in death, serious injury, or

equipment damage.

W A R N IN GUNEXPECTED EQUIPMENT OPERATION

Do not use relay output with PID as this may result in the number of permitted

operations for relays being exceeded and the relay destroyed. Depending on the

process being controlled, this can have hazardous consequences.

Failure to follow these instructions can result in death, serious injury, or

equipment damage.

Step A ction

1 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:

Direct action: the controller outp ut decreases as the variation value (setp oint

- measurement) increases (cold controller).

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.

Page 16: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 641

3 S et the M an ual m ode op erating mode.

The drop -down list offers several choices:

In h ib it = no manual mode.

A uth oriz e = the controller op erates in manual mode only .

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.

5 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).

6 C onfirm the controller configuration by click ing O K in the bottom left of the

screen.

7 To configure several PID controllers, click N ex t to increment the number of the

PID to be set.

Step A ction

Page 17: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

642 35011386 06/2008

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 A ction

1 C onnect the PC to the controller and transfer the ap p lication.

2 S witch the controller to R U N mode.

Note: Before switching the controller to RUN mode, check that the machine’s

operating conditions allow this for the rest of the application.

Page 18: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 643

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

Step A ction

1 C reate an animation table containing the main objects needed for diagnostics.

In th e ex am p le:

% M W 0: loop controller setp oint,

% IW 1 .0: measurement,

% M 0: enabling of loop controller,

% M 1 : loop controller action ty p e (set by the AT function),

% M 2 : selection of Automatic or M anual mode,

% M W 1 0 to % M W 1 2 : PID loop controller coefficients,

% M W 1 3 : measurement limit not to be ex ceeded in AT mode,

% M W 1 4 : loop controller outp ut setp oint in AT mode,

% M W 1 5 : discrete outp ut of the PID loop controller (entered by the

controller),

% M W 1 6 : setting of the PW M p eriod,

% M W 1 7 : op erating mode selection for the PID controller,

% M W 1 8 : manual setp oint associated with the % M 2 bit selection.

2 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):

F irst disconnect the p robe from the analog card terminals.

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 (-).

C heck that the analog card is p owered by a 2 4 V DC sup p ly to the first two

terminals.

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.

Page 19: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

644 35011386 06/2008

3 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:

% M 2 : M anual mode selection = 1 ,

(M 2 = 1 = > M anual M ode, M 2 = 0 = > Automatic M ode),

% M W 1 6 : PW M p eriod setting = 1 0,

% M W 1 7 : O p erating mode selection for the PID controller = 1 (PID only ),

% 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.

4 C heck that the controller is R U N mode.

(% M 0: controller validation = 1 , to be entered in the animation table.)

5 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.

Step A ction

Page 20: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 645

6 Activate the A n im ation tab for the req uired PID number and check that the

animation matches the screen below:

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 signal’s 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).

Step A ction

A p p ly C an cel

PID

Operating m ode

O utp utGen eral In p ut PID A T

PID

Input

Mes

A n im ation

Output

Rev

List of PID states

8/29/2005 11:35 AM PID Stop

Setpoint

Ts

Kp Ti Td

PID controller

0

0

20

Output

Period

000 0 0

Page 21: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

646 35011386 06/2008

8 S et the time elap se scroll list to 1 5 min to see a trace of the measurement

signal’s 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).

9 If we see that the actuator is not controlled, check the outp ut circuit:

F or an analog outp ut, check the outp ut voltage or current from the analog

card.

F or a PW M outp ut, check :

the L E D of the outp ut concerned is lit (% Q 0.1 , in this ex amp le),

the wiring of the sup p lies and 0V circuit for the TW DL M DA2 0DR T base

outp uts,

the actuator p ower sup p ly .

1 0 C lose the PID disp lay screen and stop the manual mode by entering the

following values in the animation table:

% M 0: E nable loop controller = 0 (stop the loop controller)

% M 2 : S election of Automatic or M anual mode = 0 (stop manual mode)

% M W 1 7 : O p erating mode selection for the PID controller = 0

% M W 1 8 : M anual setp oint associated with % M 2 bit selection = 0.

Step A ction

Page 22: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 647

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.

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:

The K p , Ti, Td coefficients must be configured as m em ory addres s es

(% M W x x ).

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 ).

Note: During the sequence, the system should not be subject to any disturbance

due to external variations that would affect the final adjustments. Also, before

launching the AT sequence, make sure the system is stabilized.

Page 23: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

648 35011386 06/2008

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

Step A ction

1 E nter or check the memory addresses with the following values in the animation

table:

% M 2 : selection of Automatic or M anual mode = 0,

% 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° ),

% 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),

% 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),

% 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.

% M W 1 5 : discrete outp ut of the PID loop controller (entered by the

controller),

% M W 1 6 : PW M p eriod setting (leave 1 0, as set p reviously ),

% M W 1 7 : op erating mode selection for the PID controller = 2 (AT + PID),

% M W 1 8 : manual setp oint associated with the % M 2 bit selection = 0.

2 C onfigure the Twido controller so that it scans in Periodic m ode.

3 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 .

4 C heck that the controller is R U N mode.

5 E nter the memory bit % M 0.

% M 0: controller validation = 1 in the animation table.

6 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.

Page 24: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 649

7 Activate the A n im ation tab for the req uired PID number and check that the

animation matches the screen below:

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.

N ote: The waiting time may last for 1 0-2 0 minutes before the AT p rocedure

changes.

Step A ction

A p p ly C an cel

AT + PID

Operating mode

O utp utGen eral In p ut PID A T

PID

Input

Mes

A n im ation

Output

Rev

List of PID states

8/29/2005 9:45 AM PID Stop

Setpoint

Ts

Kp Ti Td

PID controller

0

0

20

Output

Period

000 0 0

AT

AT

0

Output setpoint

C reate anan im ation tab le

PVLim it

0

0

Trace

Page 25: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

650 35011386 06/2008

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).

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.

Note: If the system is not influenced by outside fluctuations, the values may be

hard written in the settings of the PID controller and the controller switched to PID

mode only.

Page 26: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

35011386 06/2008 651

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.

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.

Note:

W hen viewing only the setpoint and process value graphs using the Detach button

in the Trace tab (see Trace tab window below), the animation table can then be

accessed via Program ! Debug ! Animate the program task.

PID 0

15 min

2 1 0

In itializ e

E x p ort

2 00

1 9 0

1 8 0

1 7 0

1 6 0

1 5 0

1 4 0

1 3 0

1 2 0

1 1 0

1 00

9 0

8 0

7 0

6 0

5 0

4 0

3 0

2 0

1 0

01 5

O rder M easure

0

Page 27: 69336911 PID Quick Start Guide Twidosuite 21

Advanced Instructions

652 35011386 06/2008

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:

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:

Step A ction

1 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 C lick the A n im ation tab.

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

A p p ly C an cel

PID

Operating m ode

O utp utGen eral In p ut PID A T A n im ation

List of PID states

1 2 /04 /2 004 1 7 :3 5 The PID setp oint is reached

12/04/2004 17:29 The PID control is in progress

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