Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
3.1 Foreword
Many processes involve flow control loops, whether they are in the food, pharmaceutical,
chemical, pulp & paper, mining or virtually any of the industries served by MODCELL
and MOD 30ML. This lab is designed to help you learn the basic features of the ViZapp
configurator, as well as how to easily learn/demonstrate configuration of a PID loop.
3.2 Objectives
In this lab we will design a simple flow loop with a 4-20mA signal from a dP transmitter,
a square root extractor, a PID control loop and a modulating control valve. The P&ID for
this loop looks like this:
Figure 3 .1. FY FC
Sample Flow PID
Loop
FT
FCV
FE
We will use the built-in analog input 2 of MOD 30ML for connecting the process variable
(FT). We will use the built-in analog output 2 for sending the output of the PID. We will
also build a display for this PID loop.
3-1
Training Manual
3.3 Instructions
Follow these instructions step-by-step to configure a simple PID loop:
Figure 3 .2.
ViZapp
Configurator
Note that the configurator screen has two frames (left and right).
2. We will create a new Workspace and a new project in this step. Click on the File
menu on the menu bar at the top. Select New from the drop-down menu as shown in the
next figure:
Figure 3 .3.
File-New
3-2
Training Manual
This will open the New dialog box as shown in the next figure. There are 2 tabs
(sections) in this dialog box and it displays the Project tab as default.
Figure 3 .4.
New Project
Click on the little button next to the Location field to open the Browser for
Folder dialog as shown in the next figure:
Select the C: drive from this folder and select on it by double-clicking on it. See
next figure:
Figure 3 .5.
New Project
3-3
Training Manual
Figure 3 .6.
New Project
Type the name CLASS for your project in the name field. Notice that the name of
the location for this project changes to C:\Class. It creates a folder under the C:
drive (or any other drive you choose) automatically.
All project files and the instrument and display documents will be saved in this folder.
This makes project portability easier.
Click on the option Create a new Workspace. This will create a new workspace
for us. Click on OK.
The configurator will redisplay with a new workspace and a project as shown
below:
3-4
Training Manual
Figure 3 .7.
Class Workspace
The left frame shows the project tree. The Workspace is at the root of this tree and
contains the Project, and other components such as Event Log and Components.
The newly created workspace is given the same name as that of the project. The
project sub-tree or branch contains the components Security and Tags.
3. With what we have above, we have only created an environment to configure instrument
database and display files. Next we will create an instrument database. We will hereafter
call it the instrument document.
Click on the New Document button on the tool bar or Select File-New form the
menu bar to display the New dialog box again as shown below:
3-5
Training Manual
Figure 3 .8.
New Document
The New dialog box shows the Document tab now. Select the type MOD
Function Block diagram by clicking on it and then type the name PIDLAB for
the document in the Name field.
This document will be created in the project folder \class automatically and will be
added to your Class project by default. See figure above.
When you create a new project, a file with the project name and file extension .APRJ
will be created. This file is called project file in the ViZapp installation directory.
The instrument document/ configuration files (MOD Function block diagram files) will
have extension .AFBD and will be saved in the project folder.
The workspace we created will be saved as a file with extension .AWSP (Class.awsp) and
a file with same name and .FEQP extension (Class.feqp) in the root folder where the
project folder is located.
IF you move your workspace and project to a different location/ drive, move the
project folder and the two files for the workspace (.AWSP and .FEQP), maintaining
their relative location.
Click on OK. This will display the Choose Instrument Version dialog box as
shown in the next figure: This dialog box will display the different instrument ID
module versions (MODCELL and MOD 30ML).
3-6
Training Manual
Figure 3 .9.
Instrument Versions
Select MOD 30ML 2 from this list as our instrument version by clicking on it and
then click on the Close button.
The Configurator will redisplay as shown below. The instrument database will be
opened on the right frame and the default blocks (IF, SE, ST and DIF) for the
MOD 30ML database will be loaded.
Notice that the newly created document PIDLAB is shown in the project tree
attached to the Project Class.
Figure 3 .10.
Default instrument
database
The algorithm blocks belonging to the instrument version selected will be shown
as a menu on the left frame.
3-7
Training Manual
There could be as many as five scan groups in an instrument database. The control
loops (database blocks connected together) are grouped into Loop Compounds. The
Loop Compounds can be assigned to any of these scan groups. All the blocks and
compounds in a particular scan group will be executed at the same scan rate configured
for the group.
This way you can have many loops in the database and they can be executed at different
rates depending on their priority and speed of the process they are controlling.
Notice that all the four blocks on the screen are selected. Deselect them by clicking
on a blank space and then double-click on the IF (Interface) block. The Interface
block will open as shown in the next figure: The block is displayed in a visual
notebook format, with tabbed pages containing the parameters for configuration.
The Execution tab (page) of this block will be displayed by default.
Figure 3 .11.
IF Block
Change the Group 1 scan interval from 250 ms to 200 ms by typing in the ms field
of Scan Intervals:Group 1.
Notice that the Properties menu of the block has the following tabs:
Execution
Startup
Diagnostics
Incoming
Outgoing
3-8
Training Manual
Connect map
Shape
Configuration parameters related by common nature are grouped into these tabs. This
helps to display of information in a logical manner. Most fields under these tabs contain
default values that need not be changed.
5. Add a loop compound. We will configure our control loop inside this loop compound.
Select the Loop Cpd (Loop compound) block from the Algorithms window add it
to the document. Do this by first locating the block in the menu by selecting the
All submenu at the bottom and then by dragging the scroll bar on the right
up/down. See the next figure:
Figure 3 .12.
Algorithms menu
Drag the Loop Cpd block (Loop Compound) from the Algorithms menu on the left
frame to the right frame. Click on the Loop Cpd block with your left mouse
button and then drag it to the instrument document. Click on the mouse button to
place the Loop compound block with the other existing blocks (IF, SE, DIF and
ST) on the right frame.
6. Configure a name and description for the Loop Compound: Click once on this block
with your right mouse button. A menu as shown in the next figure will appear.
3-9
Training Manual
Figure 3 .13.
Loop Compound
Properties
Select Properties from the menu. The Algorithm Properties of the Loop Cpd block
will be displayed next as shown in the next figure.
Type Control in the Name field.
Type a description "This compound is for the Flow Control Loop"
Click on OK to close the Properties.
Figure 3 .14.
Loop Compound
Properties
3 - 10
Training Manual
Right-Click on the Control compound (Loop compound you just named) again and
select Open compound at the bottom of this menu.
The loop compound will open as shown below and will have a Loop block (LP) by
default.
Figure 3 .15.
Loop Block
A loop compound is a compound or group that contains a loop block. You configure
other blocks and compounds inside the loop compound. The compound can be added
to one of the five scan groups defined in the Interface block. All the blocks inside the
compound will be executed at that scan rate.
The compound will also have a Compound Signals menu that can be used to
make pre-defined connections in and out of this block. (We will not use this for
now. You can close it by clicking on the close button on its right hand side top
the X button)
8. Open the Loop block (LP-1) by double-clicking on it. The block will open as shown in
the next figure. We will not change anything in this block. Just notice that scan group this
compound belongs to defaults to Scan Group 1. (200 ms refer to step 4 - Interface block).
3 - 11
Training Manual
Figure 3 .16.
Loop Block
Let us start doing this by adding the necessary algorithm blocks to the Loop
Compond on the workspace on the right frame. Add the following blocks to the
database:
AIN Built-in Analog input
VCI Voltage or Current input function block
PID PID algorithm block
AOUT Built-in Current output block
You can either select the specific category at the bottom of the Algorithms menu first and
then the blocks or you can select the category All to pick any block.
After you placed the above blocks in the database, the right frame on your configurator
screen should look something like the next figure.
3 - 12
Training Manual
Figure 3 .17.
Algorithm blocks in
the Loop
Compound
10. Resize and move these blocks to fit them on the database workspace.
Select a block by clicking on it. The selected block will have handles around it.
See figure below:
Move the block with the left mouse button pressed on it and by moving the mouse.
Resize the block by dragging one of the handles (corner or side)
Figure 3 .18.
Move, Resize and
Configure
3 - 13
Training Manual
If you are using the MOD 30ML Demo box, leave the Input type as Volts in the above
configuration. Specify the Input signal range as 1 to 5 Volts.
Configure the VCI block: Double-click on the VCI block. We will configure this
to specify the input function for the analog input configured above. The VCI block
Properties will open as shown in the next figure:
3 - 14
Training Manual
Figure 3 .20.
VCI Properties
Type the name and description for this block as shown above. Move the cursor to
the Linearization Type field and click on the down arrow. Select Modifies Square
Root as the type from the drop-down menu. This will compensate for errors at very
low flow measurements.
Change the Range to 0 to 200 and Quality limits also to 0 to 200. The measured
signal (4-20mA or 1-5V) will be interpreted as 0 to 200 flow units.
We will not change anything else in this menu. Click on the OK button to
complete the configuration of this block.
Figure 3 .21.
File Menu
3 - 15
Training Manual
Select File Save All from the menu bar. This will save the document, the project
file and the workspace file.
Note that Save only saves the currently opened document. Unless you have made
changes in other documents that you do not wish to save, you may select Save-All
instead.
13. Continue configuring the other blocks. Double-click on the PID block. Give the block the
tag name FIC-100.
Change the Process Input range to 0 and 200. Type the description as shown in the
next figure. Note that the default Control Action id Reverse.
Figure 3 .22.
PID Block
Click on the Setpoint tab at the top of this block to configure the setpoint for this
control loop. The Setpoint page will display as shown in the next figure:
3 - 16
Training Manual
Figure 3 .23.
PID Properties
14. Configure AOUT block to define the properties of the analog output:
3 - 17
Training Manual
Figure 3 .24.
Aout Properties
3 - 18
Training Manual
Move to the workspace on the right and click on the AIN blocks (FT-100
source block) output connection point as shown in the next figure. Notice that
moving the cursor over the output of a block, shows a fly-by box. This box shows
the name of the output (for example, in this case MODOUT).
Figure 3 .26.
Connecting blocks
Move the cursor to the VCI blocks (destination block FY-100) input now.
Moving the cursor will draw a line.
Figure 3 .27.
Connecting blocks
You will get a fly-by box that will say MODIN when you move over the input.
3 - 19
Training Manual
Click on the input of the VCI block. See the figure above.
Figure 3 .28.
Connecting blocks
The connection will now be complete. The connection line will have the source
name and destination name displayed right on it as shown in the above figure.
The input connection points are on the left side of the blocks and the output connection
points are on the right hand side.
There might be more than one input or output for each block. All the inputs or outputs
need not be shown as connections attached to the block. To see all the inputs or outputs of
a block, you need to click right on the block in the connection mode.
As an example, the figure below shows the possible inputs of the PID block (destinations
for inputs into this block).
Figure 3 .29.
Choose parameter
for connecting
16. Connect the corrected flow as the process variable input the PID block.
Let us take Right angle connector this time. The right angle connector will connect
the blocks by horizontal and vertical lines instead of making a point to point
straight connection.
Select the right angle connector from the Algorithms menu as shown below:
3 - 20
Training Manual
Figure 3 .30.
Right Angle
connection
Click on the output point of the FY-100 block. This point is the result of the FY-
100 input function block. The fly-by box will say R when you click on the output.
Drag the line to the input point of the PID block and clock on it (PVI) to complete
the connection.
17. Connect the output of the PID (FIC-100) to the INPUT of the AOUT (analog output)
block with the right angle connector as shown below.
Figure 3 .31.
Right Angle
connection
If you made a mistake while connecting, or if you do not know where to connect, you
can always cancel it or get out of the connection mode by clicking on the right mouse
button to show a menu as shown below:
Select Cancel from this menu to cancel the connection.
3 - 21
Training Manual
Figure 3 .32.
Cancel Connection
When the Component Gallery dialog box appears, select the Compounds tab. A
library of pre-configured Compounds, or groups of algorithm blocks, appears.
3 - 22
Training Manual
Figure 3 .34.
Compound Library
Move the cursor to the PID Display compound and either double-click, or select it
and then select the Export button. The Component Gallery dialog box closes and a
set of blocks is placed in your workspace. The blocks are highlighted with small
green boxes.
Figure 3 .35.
Loaded compound
3 - 23
Training Manual
Click elsewhere on the screen to deselect them. The loaded blocks include a
Display (DISP) block, a Tuning List block (TL) and two text boxes. The text
boxes contain information about the compound. You can read the text and move
them to a different area of the screen or delete them from the screen.
Delete the TL (Tuning List) block from the screen. Delete also the connection
from the TL block to the display block.
Figure 3 .36.
Workspace with
new Display block
Move the Display block close to the PID block as shown above.
Figure 3 .37.
Workspace with
new Display block
connected
3 - 24
Training Manual
Using the Multi-Segment connector, click on the PID block and select PVI from
the resulting dialog box. Double-click on PVI or select and click on the OK button.
Figure 3 .38.
Selecting PID block
parameters to
connect
Drag the cursor over the Display block and click. Select process from the resulting
dialog box. See the next figure:
3 - 25
Training Manual
Figure 3 .39.
Choose parameter
for connecting
The connection between the Process variable in the PID block and the Dsiplay
Block input called process is now complete.
Continue connecting from the PID block to the Display block until the following
inputs are connected:
SP to setpoint
OP to output
OPMS to mode
SPMS to spmode
3 - 26
Training Manual
Figure 3 .40.
Connections from
PID block
parameters to
Display block inputs
20. The display compound from the Component Gallery is set up for 0 to 100. This must be
changed to match the PID block that we configured for 0 to 200. We must also designate
a display tag.
Double-click on the Display block. In the resulting dialog box, type FIC-100 in
the Display Tag field (overwrite the PID-100).
Figure 3 .41.
Entering the
Display Tag in the
Display Block
3 - 27
Training Manual
This tag must be unique to this display. It can also be used as the tag name that appears
on the front face. The default DISPTAG in Line 1 of the Intial Values causes the value
or name typed in the Display Tag field to appear on Line 1 of the display on the front
panel. For more detailed information on display building, refer to IB-1800R-SCR,
Display Guide.
Select the Formats tab in the Display Block
Figure 3 .42.
Display Block
Formats tab
Double-click on the name processL and change the High Limit in the resulting dialog
box to 200.
3 - 28
Training Manual
Figure 3 .43.
Changing
engineering unit
range for process
line display
Right-click (click on the right button of the mouse) on the empty workspace to get
a menu as shown in the next figure:
3 - 29
Training Manual
Figure 3 .44.
Closing Compound
22. Add the Display Tag to the Display Interface Block: The next step is to add the display
tag of the display block we configured in the previous steps to the display list in the
display interface block. During runtime, you can scroll through the displays in this list by
pressing the Tag button on the instrument.
Start by opening the DIF (Display Interface) block as shown in the figure below:
Figure 3 .45.
Closing Compound
3 - 30
Training Manual
A text edit box will appear in the area below and you will see a text edit cursor
blinking.
Type the name of your display tag (FIC-100). Refer to the next figure.
Click on the OK button when you are done.
If you had more than one display blocks in your configuration, you will need to add
their display tags in the DIF block as explained in the above step. The order in which
the display tags appear in this list is the order in which the displays will scroll when
you press the Tag button on the instrument. The display block gets executed by the
instrument when it is loaded on the face of the instrument. If you did not add the
display tag of a display block to this list, that display will not appear on the instrument
when you press the Tag button.
3 - 31
Training Manual
Figure 3 .47.
Closing Compound
23. Add a Configured list block and add signals to it: Next we will need to add parameters to
pass on the Extended Modbus that can be served by the XModbus OPC Server or a
Xmodbus Device Driver to Client Software packages like HMI/HSI clients. This is
needed only if you connect your controller to a host computer. If your controller will be
stand-alone, you do not need to send parameters over Modbus/ Xmodbus. In this course,
we will be using Xmodbus to pass parameters such as PV, SP, OP etc.
Pick a CL block from the Algorithms window and add it to the document
(strategy) workspace.
Double-click on it to configure: The CL block Properties will open as shown
below.
Click on the Inputs tab to add inputs
3 - 32
Training Manual
Figure 3 .48.
CL block
The Browse dialog will be displayed as shown above and will list all the blocks
and compounds that are present in your document as a tree structure. These will be
shown with box icons next to them meaning that there groups and there are further
items inside each group.
You must be seeing the Loop Compound Control also listed in this dialog.
3 - 33
Training Manual
Double-click on this item to open it. The tree will expand and will display the
blocks inside the Control group.
Figure 3 .50.
Browse
Click on the item FIC-100. This will display the attributes of the FIC-100 (PID
block) in the box on the right.
Click on OP (PID output) and then on the Add button at the bottom to add the PID
output to the CL block. DO not hit the OK button !
Select SP, PVI, SPMS and OPMS from this list and add them in the same way.
You can select multiple attributes by pressing the Ctrl key on the keyboard and by
clicking on them with the left mouse button. Hit the Add button after multiple
selection to all the selected attributes.
3 - 34
Training Manual
Figure 3 .51.
CL block
Click on OK on the Browse dialog. This will redisplay the CL block Properties as
shown above. The Inputs Tab will now display the attributes you just added.
The attributes will be displayed with full source path name of the connections. An alias
can be entered by selecting an item and typing in any alias name. This name will then
be displayed instead of the block tag and attribute name.
24. Assign Aliases to the tags added to the CL block: Select Control.FIC-100.OP by clicking
on it and then clicking on the Modify button.
Figure 3 .52.
Alias
Repeat the above procedure to assign aliases for the other attributes as shown
below:
3 - 35
Training Manual
Figure 3 .53.
CL block aliases
3 - 36
Training Manual
Make a connection from the CL block by selecting the right angle connection from
the Algorithms window and select CL blocks LISTOUT as the source. Terminate
the connection at the MSC block by connecting it to FGLISTIN. Refer to the
figure below:
3 - 37
Training Manual
Figure 3 .55.
CL to MSC
connection
3 - 38
Training Manual
Make a connection from the CL block by selecting the right angle connection from
the Algorithms window and select CL blocks LISTOUT as the source. Terminate
the connection at the ICN block by connecting it to FGLISTIN. Refer to the
figure below:
3 - 39
Training Manual
Figure 3 .57.
CL to MSC
connection
3 - 40
Training Manual
Figure 3 .58.
Instrument Compile
The Compile Setup dialog box as shown below will appear. Click on OK (Do not
reassign block occurrence numbers).
Figure 3 .59.
Compile Setup
The Interface File Options dialog box will be displayed as shown next. We want to
create a .MIF file (Modcell Interface File) for this control strategy. This file will be
used by the OPC Server to create tags.
Look at the Produce MIF section of this dialog box. Note that the MSC/ICN
blocks Type and its Tag Name are shown in this section.
3 - 41
Training Manual
Figure 3 .60.
Interface File
Options for Modbus
Check the box next to it (on the right) and type a name for the MIF file.
Type PIDLAB (if you are using Modbus) or ICNLAB (if you are using ICN) as
shown in the above figure or the figure below:
3 - 42
Training Manual
Figure 3 .61.
Interface File
Options for Modbus
Click on OK. If the database has errors, it will not be compiled successfully. A list
of errors will be displayed on the screen in a sub-window along with other
information such as the number of errors, warnings and info messages as shown
below:
Figure 3 .62.
Information Window
You can double-click on an error to open the block that has a configuration
problem. If the database has no errors, there is a message saying that the Compile
was completed without error.
Also look for messages on successful MIF file creation, database size and current
consumption of the instrument.
3 - 43
Training Manual
You can close this info sub-window by right-clicking on the window and then
clicking on the resulting Hide Window button or by selecting View-Information
from the menu bar at the top.
3 - 44