Module 48 - The Grid Control
Module 48 - The Grid Control
Module 48
The Grid Control
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 products used in this module 3
7 Resume 22
Figure 1
Figure 2
Step 4. Close the configuration dialog and drag and resize the Grid to suit
your requirements. Note that in design mode the grid just appears as a grey
rectangle – no cells are displayed.
Figure 4
You configure the total number of rows and columns using Rows / Columns and the
number of rows and columns behaving as headers using Fixed Row / Col. The fixed
rows and/or columns can be set to 0 if not required.
The size of the rows and columns are normally configured at run-time by dragging the
header cell borders. Once you have done this you can de-select the Editable property
which will prevent anyone changing them accidentally at some later time.
Some properties are not available when using the Variable Tracking or
Historical modes.
The only way to stop a user resizing the columns is by setting the
Fixed row/col to 0. In which case there is no header.
This example has 20 rows. All the rows have a height of 24.
And there are 4 columns. The column widths are 100, 180, 180 & 180.
You can also populate the cells using VBA should you prefer that.
Figure 6
Figure 7
Load – Runs the function LoadGrid which uses mode PUTARRAY to populate the
grid using the contents of a text file.
Figure 8
To use tracking mode you must select the property Variable Tracking in the grid
configuration dialog, Variables tab. See picture below.
Figure 9
You can dynamically change the filter using the SCADA Basic SELECTOR
instruction mode VARIABLE.
5.4 Exercise
Exercise 1.
Configure a Grid Control in variable tracking mode.
Challenge !
Develop a SCADA Basic program to allow the filter to be changed
dynamically.
Figure 10
For more information on using the Grid in historical mode see the help:
Developing the HMI / The Viewers / Grid control / Historical mode
Figure 11
Figure 12
Figure 13
Step 4. Configure the sampling. You choose the number of, and type of
(milliseconds, seconds, minutes…), time unit. For example 1 minute would
generate a sample every 1 minute. (1440 for 24 hours.). In this module we will
only use basic data mode, Sample. For information about the other data mode,
Sample with synchronization, please refer to the help.
Figure 14
Figure 15
a. The left pane - contains the list of variables. At run-time, in the grid, each
variable is displayed in a column starting with the variable at the top of
this list as the leftmost.
Clicking Add new trend opens a dialog displaying a list of available (trend
recorded) variables for selection.
The buttons below the pane allow you to modify the position of variables
within the list or even delete them completely. The maximum number of
variables that can be added is 128 but you must keep in mind the number
of samples that will be generated.
b. The header pane – selects what will be displayed in the header for each
variable. The Custom option allows you to enter free format text.
c. The threshold pane allows you to apply a threshold system to each
variable to color the cells whenever the value goes outside of a
configurable range. If the variable already has a threshold system you
can use that by selecting Automatic. Or, you can manually enter the
thresholds.
Figure 16
Figure 17
Figure 18
In either case Apply generates the request leaving the dialog open and OK generates
the request and closes the dialog.
Exercise 2.
Configure a Grid Control in historical mode.
Challenge !
Modify the format of the date and time displayed in the first
column of the Grid Control.