Exercise 5: Creating a
New Module (LI-101) from Scratch
In this exercise, you will
use Control Studio to create from scratch a module to monitor the
tank level. The module will have one analog input function block
(to allow reading of the analog input signal) and one output, a
promoted parameter. Promoted parameters are available under the
Special Items palette. The promoted output parameter allows this
value to be more easily accessed systemwide.
Four other changes will be
made.
- The IO parameter of
the analog input block will be edited to identify the Device Signal
Tag for the level transmitter, LT-1.
- The OUT_SCALE
parameter on the analog input block will be changed from the
default value of 100 to 10,000 to reflect the 10,000-gallon
capacity of the tank.
- The HI_HI_LIM value
will be changed to 1000.
- History collection
will be added to the PV of the AI block so that the tank level can
be trended in the Process History View application.
To create a new
module
- In Control
Studio, click the Main button, then click New. The New dialog box
appears.
- Click OK to
accept the default settings in the New dialog.
Control Studio opens
with a blank, untitled Function Block diagram.
To add and modify a
function block for analog input
- Select IO
palette category. A list of function blocks related to I/O
appears.
- Select the
Analog Input (AI) function block from the palette; drag-and-drop it
onto the Function Block diagram.
- To find out
more about this function block, point to the AI block, click the
right mouse button and select What's this? from the menu.
Tip To access detailed
information, you can click the Books Online (Reference) icon at the
end of the pop-up text. After reading about the function block,
click the Close button in the Books Online window to quit that
application and return to Control Studio.
- Make sure
the block is selected.
- In the list
of parameters, double-click HI_HI_LIM (or click the right mouse
button and select Properties).
- In the
Properties dialog box, change the value to 1000 and click OK.
- Double-click
the IO_IN parameter.
- In the
Properties dialog box, enter the Device Signal Tag, LT-1 (for the
level transmitter), and click OK. The system selects the default
parameter.
In the Parameter list,
note that the parameter named L_TYPE (linearization type) has a
default value of Indirect. This must remain Indirect for you to be
able to define the Engineering Units of the input.
- To set the
Engineering Units (EU) and the scale, double-click the OUT_SCALE
parameter.
- Modify
OUT_SCALE as follows:
- Change the 100% scale from 100 to 10000 (for
10,000 gallons).
- For Engineering unit descriptor, select gal
(for gallons).
- Click
OK.
For our example, we would
like to make the output value easy to reference system wide.
Promoting the parameter to the module level allows the value to be
referenced throughout the system as LI-101/PV rather than
LI-101/AI1/OUT.
To add a module-level
parameter for output of the process value
- Select the
Special Items palette.
- Select the
Output parameter, click the right mouse button, and select What's
This? from the menu to get a description.
- Drag-and-drop the Output parameter onto the diagram
to the right of the AI function block.
A Properties dialog box
appears.
- Change the
parameter name to PV (for process value).
- Select
Floating point with status in the Parameter field, select I/O in
the Parameter category field, accept the default status (it will be
overwritten), and click OK.
The block named PV now
appears on the Function Block Diagram.
To add history
collection to the PV
- Select the
AI block in the Diagram View.
- In the
Parameter View list, click the right mouse button on PV and select
Add History Recorder.
The Add History
Collection dialog opens.
- The path to
the current value for the PV (AI1/PV.CV) appears in the Parameter
field path box. (If this path does not appear here, click the
Browse button and browse for it.)
- Click
Enabled.
- Click Line
as the Display Representation.
Note The line style
can be changed in the Process History View application.
- Use the
default value of 60 seconds as the sampling period.
- Click
OK.
Later, we will assign the
area (TANK-101) to the Continuous Historian subsystem, enable
history collection on the workstation, and download the workstation
in order to collect and view the historical data for the field
values.
To connect the two
blocks
- Click the
Out connector on the AI block and hold down the left mouse button.
(The focus must be in Diagram View for this button to be
active.)
- While
holding down the left mouse button, draw a line from the Out
parameter on the AI block to the PV parameter.
The pencil changes to a
* when you are over the right spot for making the connection.
Tip If you want to
rearrange the diagram, click one of the function blocks and move
it. The connector line moves and resizes automatically.
Your finished diagram should
look like this: