Module 07 - Variables Tree - Basics
Module 07 - Variables Tree - Basics
Module 07
Variables Tree - Basics
Contents
1 Introduction 3
1.1 PcVue version 3
1.2 In this module you will learn 3
1.3 Files used in this module 3
1.4 Third party software used in this module 3
4 Managing variables 9
4.1 Creating variables using Application Architect 9
4.1.1 The Templates tab 10
4.1.2 The Instances tab 11
4.1.3 Identifying templates 12
4.1.4 Creating a template and adding a variable 13
4.1.5 Instantiating templates 15
4.1.6 Generation 16
4.2 Managing variables using Application Explorer 18
4.2.1 The variables tool bar 19
4.2.2 Variable selector 21
4.3 Managing Variables using Application Architect 21
5 Summing-up 23
Figure 1
3.1.1 Type
PcVue supports three types of variable:
Bit: Digital value
Register: Analogue value
Text: Text value
3.1.2 Name
The variable's name is the identity by which it is known throughout PcVue.
The name of a variable is a string composed of up to twelve fields delimited by the
character “.”. All but the last part of the variable name is also known as its branch.
Using branches you can group a set of variables together as they would be in the
outside world. For example a Bit, two Registers and a Text variable could be grouped
together to represent a simple temperature controller. For example:
BUILDING.FLOOR_01.ROOM_001.AC.INFO
BUILDING.FLOOR_01.ROOM_001.AC.ON
BUILDING.FLOOR_01.ROOM_001.AC.SETPOINT
BUILDING.FLOOR_01.ROOM_001.AC.TEMP
If the variables in the example above are represented in a (horizontal) tree format
the grouping becomes more apparent. In the example that follows there are two
temperature controllers plus two lights making a total of 14 variables.
Figure 3
Figure 4
Light fitting
At this stage, we are only interested in the variable name, not the
branch.
Figure 5
b. Change the name to one appropriate to the application – for example LT.
c. You can give the template a Description using the Properties pane. ([F] in
the screenshot of the Templates Tab above.) The description is not used
in the final application but is useful for identification. (When you return to
make some changes to the application some time later for example.)
Step 3. Add a variable to the template.
a. Select the template you just created and, in the Properties pane, select
Configuration Elements.
Figure 6
c. Change the bit name to one appropriate to the application – for example
CMD.
d. Select the bit and configure its properties using the Element Properties
pane (lower right).
Step 4. Save the configuration using the menu command File.Save.
Exercise 1.
Now we can start our project.
Determine a variable naming scheme for the project.
Create the templates for the Thermostat and Light Fitting.
Add variables to the templates.
Of course this naming scheme is not the only appropriate one. With some
experience you will know what suits a particular project.
Step 2. Start the instantiation process by adding some topology elements to
create the structure.
a. Open the Application Architect and select the Instances tab. The topology
tree should be empty other than the top node which has the name of the
project.
b. Select the top node and select the Add Topology Element tool. A new
topology element with a default name is created. Change the name to
Figure 7
4.1.6 Generation
The final step of the process is to generate the project configuration that has just
been configured.
Step 1. Select the menu command Task.Generation. This opens a
Generation Options dialog.
Step 2. Select Continue to proceed with the generation. At this point you
may be prompted to close any open mimics. If so you must close the mimics
and select Continue once again to start the process.
Step 3. A dialog will then open charting the progress of the generation. In
our case it will be very quick as we are only generating one variable, but in a
large project this may take several seconds or even minutes. You can use the
>> button to expand the dialog and see the generation in more detail including
any error messages.
Step 4. When the process is complete, and you have checked for error
messages, the dialog can be closed.
Exercise 2.
Configure the topology and generate.
What do you notice about the Branch property for each of the topology
elements and template instances you have created?
Figure 8
The following features are specific to when the Application Explorer is being used to
manage variables.
[B]: Variables tool bar. (See next)
[C]: Variables tree.
[D]: Branches and variables sub-ordinate to the branch currently selected in the
variables tree. The display of a variable includes its main properties and real time
value and status (See the section on Run-time properties).
[E]: Associated behaviours toolbar. Tools to add modify and delete a variable’s
associated behaviour. The tools that are available depend on the type of variable that
is selected.
You can change the properties that are displayed in the right
pane by right clicking in the pane and selecting them from a
context menu.
Add a new bit variable to the branch selected in the variables tree.
Add a new register variable to the branch selected in the variables tree.
Add a new text variable to the branch selected in the variables tree.
* The icon that is displayed depends on the type of variable or branch selected.
1. Open the Application Explorer and expand the variable tree to check
that the configuration is what you would expect.
What is the SYSTEM variables branch and how did it get there?
Figure 9