Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
45 views

Module 07 - Variables Tree - Basics

This document discusses variables in PcVue, including their mandatory properties like type, name, and source. It describes how to manage variables using the Application Architect and Application Explorer tools, including creating templates with variables, instantiating templates to generate instances, and managing variables at runtime.

Uploaded by

Marious Ees
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Module 07 - Variables Tree - Basics

This document discusses variables in PcVue, including their mandatory properties like type, name, and source. It describes how to manage variables using the Application Architect and Application Explorer tools, including creating templates with variables, instantiating templates to generate instances, and managing variables at runtime.

Uploaded by

Marious Ees
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Variables

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

2 This feature in PcVue architecture 4


3 Basics 5
3.1 Mandatory properties 5
3.1.1 Type 5
3.1.2 Name 5
3.1.3 Source 7
3.2 Main optional properties 7
3.3 Run-time properties 8

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

V12 Module 07 - Variables Tree - Basics


Page 2/23
1 Introduction
1.1 PcVue version
This module applies to PcVue version 12

1.2 In this module you will learn


About the main properties of PcVue’s variables,
How to manage variables using the Application Explorer,
How to use the Variable Selector.

1.3 Files used in this module


None

1.4 Third party software used in this module


None

V12 Module 07 - Variables Tree - Basics


Page 3/23
2 This feature in PcVue architecture

Figure 1

V12 Module 07 - Variables Tree - Basics


Page 4/23
3 Basics
Real-time data is the engine of PcVue. It is managed as a collection of tags. In PcVue
terminology a tag is called a Variable. The collection of variables in a project is
known as the Variables Tree because of the tree-like structure of the variable
naming scheme.
When each variable is created it is given characteristics selected from a range of
properties which determine its behaviour.
Some properties are mandatory and some are optional.

3.1 Mandatory properties


The mandatory properties are:
Type
Name
Source

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.

V12 Module 07 - Variables Tree - Basics


Page 5/23
Figure 2

Arranging variables in hierarchical groups simplifies development and maintenance as


tools in the Application Explorer allow you to cut, copy and paste entire branches with
their variables. The main benefit however lies in how the variables tree is used in
conjunction with graphical objects to accelerate the development of your project.

The main limits are:


The name can contain a maximum of 12 fields.
The maximum total size of a name is 255 characters
including the delimiters “.”.

V12 Module 07 - Variables Tree - Basics


Page 6/23
3.1.3 Source
To determine the source of a variable you ask yourself the following question: “Where
is the value for this variable coming from?”
The various sources are:
Equipment: The value is collected from a device using one of the native
drivers (i.e. Modbus TCP/IP),
OPC: The value is collected from an OPC Server,
Lonworks: The value is collected from a Lonworks network,
DDE: The value is collected from a DDE Server,
BACNet: The value is collected from a BACNet network,
DNP3: The value is collected from a DNP3 network,
IEC: The value is collected from either an IEC 61850, or IEC 60870-104
network,
SNMP: The value is collected using the SNMP protocol from a device on a
TCP/IP network.
Internal: The value is not collected from any outside source but the
variable still belongs to the real-time database. (The value may be
calculated using an expression or script.)

3.2 Main optional properties


Here are the main optional properties. During the training we will discover several
more.
Description. A string describing the variable. You can display the
Description in the HMI instead of the variable’s name.
Command. The Command property is used to determine whether a
variable can be set by PcVue or not.
Properties related to variable type. Some optional properties depend on
the variable type. For example when a variable is a Register it has a Units
property and a Minimum/Maximum range.

We recommend that you always use the Description property.

V12 Module 07 - Variables Tree - Basics


Page 7/23
3.3 Run-time properties
Each variable is represented at run-time by three properties:
 Value:
The possible range of values for each type are:
o Bit: 1 (True), 0 (False)
o Register: -3.37E+38 to +3.37E+38,
o Text: 1 to 32,000 characters.
 Timestamp:
The timestamp usually gives the time when PcVue receives the variable value
from a device.
When PcVue is using a time stamped protocol (like OPC) the timestamp is
provided by the device.
 Status:
There are 2 main statuses:
o S (Set): The variable is valid. We can be sure that the value is usable.
o NS (Not Set): The variable is not valid. We are not sure whether the
value is usable.
For example when a sensor is out of order, the value given by the
device may be out of range. For PcVue the status is then NS.

A list of the statuses is available in the online Help in the topic:


Application Explorer / Variables / Variables tree / Using the
Variable Selector.

V12 Module 07 - Variables Tree - Basics


Page 8/23
4 Managing variables
First let us be clear by what we mean by Managing Variables. By managing we mean
the creation, configuration and maintenance (making changes after the main
application development).
There are two main tools in PcVue that can be used for managing variables, the
Application Architect and the Application Explorer.
The Application Architect is best for projects with a homogenous structure. That
is projects where PcVue is supervising real world objects (pumps, valves, lights
etc.) many of which have an identical or at least very similar structure.
The Application Explorer is best for projects that don’t have a homogenous
structure. That is projects where PcVue is supervising real world objects, several
or all of which, have very different structures.
Of course, in practice, it’s unlikely that you would ever have an application that you
could manage entirely just with the Application Architect, so PcVue allows you to use
both the Application Architect and Application Explorer on the same application.

4.1 Creating variables using Application Architect


The Application Architect allows the designer to produce much of the configuration
required for a project by the instantiation of templates. A template is a representation
of a real-world object (for example a temperature controller) in terms of the
Supervisor's configuration elements. One of the configuration elements is variables
and their behaviours.
First we are going to look at the two of the three main features of the Application
Architect, the Templates tab and the Instances tab, and then how it is used to
manage variables.

The third tab in the Application Architect, the Parameters tab, is


covered in a later module.

V12 Module 07 - Variables Tree - Basics


Page 9/23
4.1.1 The Templates tab
The Templates tab is use to manage templates.

Figure 3

[A]: Main menu.


[B]: Templates toolbar.
[C]: Templates pane. Used to create and configure templates.
[D]: Templates tree. Templates are saved in libraries (as configured in the
Application Explorer and used for mimics, symbols, images etc.)

The libraries in the Application Architect are listed alphabetically. In


the Application Explorer they are listed in the order in which they
were created.
[E]: Template elements. Comprised of Parameters, Included Templates,
Configuration Elements (variables and their behaviours) and Graphic Elements.
[F]: Element properties. The properties of the selected element, or if no element is
selected, the template’s properties.

V12 Module 07 - Variables Tree - Basics


Page 10/23
4.1.2 The Instances tab
The Instances tab is used to create template instances and to add topology elements.

Figure 4

[A]: Main menu.


[B]: Instances toolbar.
[C]: Instances pane. Used to create and configure instances of the templates. (Also
known as instantiation.)
[D]: Instances tree. Graphical representation of the template instantiation tree
including both instances of templates and topology elements.
[E] [F]: General properties and elements of the template instance currently selected.

V12 Module 07 - Variables Tree - Basics


Page 11/23
4.1.3 Identifying templates
The first step, when using the Application Architect, is to identify the templates.
Taking our example from earlier we can clearly see the possibility for two templates,
one representing a temperature controller (thermostat) and the other a light fitting.
We could describe the templates by listing the variables and their properties as
follows.
Thermostat

Name Type Source Description Command Units Min / Max

INFO Text Internal Information No

ON Bit Internal Thermostat on Yes

SETPOINT Register Internal Set point Yes Celsius 15 / 25

TEMP Register Internal Temperature No Celsius 0 / 40

Light fitting

Name Type Source Description Command Units Min / Max

CMD Bit Internal Command Yes

ON Bit Internal Light on No

LUM Register Internal Luminosity No % 0 / 100

At this stage, we are only interested in the variable name, not the
branch.

V12 Module 07 - Variables Tree - Basics


Page 12/23
4.1.4 Creating a template and adding a variable
Now we will create our first template and add a single variable. Later, in this module,
you will add the remainder of the variables to complete that part of the template. And
in a later module we will complete the template by adding a graphical symbol.
Step 1. Select the library to which the template will be added.
a. Open the Application Architect.
b. Select the Templates tab and then select one of the libraries. In the
screenshot of the templates tab above we used the Default Local Library
which is self-contained within the project.
Step 2. Create the template.
a. Using either the toolbar or the context menu (right click on the library)
select the Add Template tool. A new template is created with default
properties.

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.

V12 Module 07 - Variables Tree - Basics


Page 13/23
b. Using either the toolbar or context menu select the Add Bit tool. A new bit
is created with default properties.

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.

Although we have only made a small amount of configuration it’s


good to get into the habit of saving it regularly!

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.

1. Determine the variable naming scheme. This is easy as we have


already done this for you in the section Identifying Templates.

2. Use the Application Architect (Templates tab) to create two new


templates LT and AC in the Default Local Library.

V12 Module 07 - Variables Tree - Basics


Page 14/23
3. Add variables to the templates. The variables you should add, and their
properties, are those in the tables in the section Identifying Templates.

4. Save the configuration.

4.1.5 Instantiating templates


Instantiating templates creates the structure (topology) of the project and, in
particular, the Variables Tree. However, before you start you must decide on a
naming scheme for the variables as you require this for the instantiation process.
During the instantiation process you add topology elements and template instances. A
topology element is rather like a blank template and is used to add branches to the
structure. (In fact a topology element can be later converted to a template if
required.)
Step 1. Determine the naming scheme for the variables. We will adopt the
structure illustrated in the first section of this module and in Figure 2.
Field 1 = Branch 1 - Always BUILDING
Field 2 = Branch 2 - FLOOR_XX where XX is the floor number
Field 3 = Branch 3 - ROOM_XXX where XXX is the room number
Field 4 = Branch 4 - DeviceType where AC is a Thermostat and LT a Light
Fitting.
Field 5 = Variable: The variable itself (TEMP for temperature, etc.)

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

V12 Module 07 - Variables Tree - Basics


Page 15/23
BUILDING. Repeat the process to add FLOOR_01 and then ROOM_001.

Figure 7

Step 3. Add an instance of the template LT to the topology node


ROOM_001. There are two methods by which this can be done.
a. Right click on the ROOM_001 topology element and, from the context
menu, select Add Instance expanding the tree to select the LT template.
OR
b. Expand the Templates tree in the left pane and find the LT template. Drag
and drop it under the ROOM_001 topology element
c. Whichever method is used an instance of the LT template is created with
a default name. You can change the name by clicking in the field and
entering the new name. In this case we want it to be LT.
Step 4. Save the configuration.

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.

V12 Module 07 - Variables Tree - Basics


Page 16/23
We will look at the options in the Generation Options dialog in a
later module.

Exercise 2.
Configure the topology and generate.

1. Using the Application Architect’s Instances tab add topology elements


to create the structure:
BUILDING.FLOOR_01.ROOM_001

2. Add an instance of each of the templates AC and LT to the topology


element ROOM_001.

3. Save the configuration and generate!

What do you notice about the Branch property for each of the topology
elements and template instances you have created?

V12 Module 07 - Variables Tree - Basics


Page 17/23
4.2 Managing variables using Application Explorer
The Application Explorer can also be used to manage variables and can sometimes be
more convenient, particularly when developing a project that doesn’t have a
homogenous structure.
Using the Application Explorer you configure variables one at a time. Of course you
can use copy and paste to duplicate variables or even complete branches, but if you
ever need to change the configuration of the variable you must do each one
individually – there are no Templates to change or Instances to re-generate.
Step 1. Open the Application Explorer and expand the configuration tree (centre
pane) to display the Variables Tree node. If you expand further you should clearly
see the branches that have been created following the topology created in the
Application Architect

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.

V12 Module 07 - Variables Tree - Basics


Page 18/23
[F]: Lower pane. Displays any associated behaviour for the selected variable.

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.

4.2.1 The variables tool bar


The commands available in the tool bar change depending on what is currently
selected. Here is a complete list.

Add a new sub-branch to the branch selected in the variables tree.

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.

*Display the selected variable’s properties.

*Delete the selected variable or branch.

Copy the selected variable or branch.

Cut the selected variable or branch.

Paste the selected variable or branch.

* The icon that is displayed depends on the type of variable or branch selected.

V12 Module 07 - Variables Tree - Basics


Page 19/23
Exercise 3.

1. Open the Application Explorer and expand the variable tree to check
that the configuration is what you would expect.

2. Double click on one or two of the variables and examine their


properties.

What is the SYSTEM variables branch and how did it get there?

In Application Explorer, select a variable generated by Architect and delete it.


What do you think will happen if we generate again from Application
Architect?

V12 Module 07 - Variables Tree - Basics


Page 20/23
In Application Explorer, select a variable generated by Architect and change
1 property.
What do you think will happen if we generate again from Application
Architect?

4.2.2 Variable selector


The Variable Selector can be used when you just want to visualise the variables tree
but not the rest of the configuration. It is effectively a sub-set of the Application
Explorer. It can be opened from the menu using the command Configure.Variables
Selector and is also opened automatically when selecting a variable for an animation
in one of PcVue’s mimics. The Variables Selector behaviour is almost identical to that
of the Application Explorer except that it does not have the Task Pane and the
Configuration Pane shows only the variables tree.

Figure 9

4.3 Managing Variables using Application Architect


The Application Architect is a very powerful tool for managing variables when
developing an application with a homogenous structure. By making a single change to
a variable in the Architect and re-generating you change all instances of it in the

V12 Module 07 - Variables Tree - Basics


Page 21/23
application which could amount to changing 100’s or even 1000’s of variables with
just a single edit!
Three very important points to remember.
When a variable is created by the Architect it is owned by the Architect.
Re-generation will re-create the variable.
Variable properties that are set in the Architect are owned by the
Architect. Re-generation will re-create the property with the value set in
the Architect overwriting any changes made elsewhere.
Properties not set in the Architect can be changed elsewhere. Even if the
variable is re-generated the property will retain its value.

V12 Module 07 - Variables Tree - Basics


Page 22/23
5 Summing-up
Real-time data is the engine of PcVue.
The Variable Tree is made up of Branches and Variables.
You must decide on a suitable naming scheme.
A variable has many properties.
You can manage variables using the Application Architect and/or the
Application Explorer.
The status of a variable indicates its validity.

V12 Module 07 - Variables Tree - Basics


Page 23/23

You might also like