CitectSCADA CSV - Include PDF
CitectSCADA CSV - Include PDF
CitectSCADA CSV - Include PDF
3 Fitzsimons Lane
PO Box 174
Pymble NSW 2073
Australia
COPYRIGHT
Copyright 2004 Citect Corporation. All rights reserved.
TRADEMARKS
Citect Pty. Limited has made every effort to supply trademark information about company names, products and services mentioned in this manual.
Trademarks shown below were derived from various sources.
IBM, IBM PC and IBM PC AT are registered trademarks of International Business Machines Corporation.
MS-DOS, Windows, Windows 95, Windows NT, Windows 98, Windows 2000, Windows for Workgroups, LAN Manager, Microsoft Windows XP, Excel
and MSMAIL are trademarks of Microsoft Corporation.
Novell, Netware and Netware Lite are registered trademarks of Novell Inc.
GENERAL NOTICE
Some product names used in this manual are used for identification purposes only and may be trademarks of their respective companies.
Printed in Australia.
Contents
Introducing CSV_Include
Where to Find Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
[Navigation] Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
[TrendX] Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
[Privilege] Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
CSV_Include Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
When you create a new project based on CSV_Include, the following templates
and pages are available for you to use as you create your graphics pages. This
section describes the pages and their features (buttons, menus, and tools)
The CSV_Include project has the following templates:
Template Name Description
Normal Standard graphics page
Alarm Active alarm page
Disabled Disabled alarm page
Summary Summary alarm page
Hardware Hardware alarm page
Trend Trend page (8 pens)
Double Trend Split-page trend page (16 pens)
File Displays a file
Admin Tools Engineering tools page
Poptrend Popup trend
Instanttrend Instant trend
Popup_Small Small popup window
Popup_Mid Medium popup window
Popup_Large Large popup window
Popup_Xlarge Extra large popup window
Common functionality The alarm page templates all share panels to the left of the alarms list that
support the following functionality.
Acknowledge Tasks
Offers the option to acknowledge all alarms on the current page, to acknowledge
just the selected alarm, or to silence the audible alarm. It is featured on the
Active Alarms page and the Hardware Alarms page.
Chapter 2: Using Pages and Templates 5
The Trend, Double Trend and PopTrend displays allow you to select and display
trend tags from your CitectSCADA project on a color-coded linear chart. Being
based on information coming from the CitectSCADA trend server, these
displays are supported by stored historical data that can be recalled if required.
The Instant Trend display is unique as it allows the selection of up to four
variable tags for display. This allows you to visually monitor a tag without
having to set it up within your CitectSCADA project as a trend tag. You can even
load tags directly into the display by hovering the mouse over a tag value on a
graphics page and keying in a plus sign (see the parameter [TrendX]KeySeq).
There are limitations to this feature, however, as data is only available from the
time the display is launched and is lost when the display is closed. The Instant
Trend feature has a duration setting that limits the amount of time the display
can remain open, you can adjust the default setting for this via the parameter
[TrendX]Duration.
For details on implementing instant trending, see Setting Up Instant Trending.
Common functionality The trend display templates share common controls that support the following
functionality.
The field is color coded to match the graphical display, hence the colorful nature
of the listed fields.
To load a trend into a Selected Trend field, right-click the field. A menu appears
allowing you to select a trend or clear the field. Once you have loaded all your
selected trends, you can make a particular pen the focus of the graph by clicking
this field. An arrow to the left of the field indicates it is currently the focus trend.
Note that this field appears slightly different when using instant trending, as the
graph will be displaying current data for a variable tag, not a trend tag. In this
case, the selection field appears as below, with the tag name, current value,
description and sample period displayed.
Chapter 2: Using Pages and Templates 7
Range/Scale markers
These markers appear along the vertical axis and show the scale of the display
for the currently selected pen, highlighting the lowest to highest values for the
scale range.
Span markers
These markers appear along the horizontal axis, and show the span of the trend
display in time. The left hand marker shows the current start time and date, the
right shows the current end time and date. Typically the right hand marker will
show the current time, however, this can be affected by zooming or displaying in
Historical mode.
Trend cursor
The trend cursor allows you to select a location on the graphical trend display
and determine the time and date for that particular point. The arrows to the left
end of the popup display allow you to move the cursor to the left or right. The
Exit icon to the right closes the trend cursor.
History mode
History mode allows you to scroll back and forth through a graphical
representation of a trend tag's history. To switch into History Mode, check the
8 Chapter 2: Using Pages and Templates
Display History Mode checkbox. The display changes to lower version of the
control shown to the left.
The four buttons allow you to progress backwards and forwards through the
trend graph, with the two outer buttons shifting a page at a time, and the two
inner buttons shifting half a page. The clock icon allows you to edit the end time
for the historical display.
Deselecting the box returns to the normal trend view.
Zoom
These buttons zoom in and out on the current display. Zoom in (+) increases the
focus of the display, and continues zooming in on subsequent clicks. Zoom out (-
) returns to the default.
Autoscale
This button allows you to autoscale the current view, which means the scale will
adjust to the lowest and highest values reached.
Scale defaults
This buttons returns the scale for the display to the default for the currently
selected trend.
Export to file
Click this button to export the data for the currently displayed trend to a file. A
Save As dialog will appear, allowing you to save the data as a D Base III file
(.DBF file), a comma separated value file (.CSV file) or a text file (.TXT).
Chapter 2: Using Pages and Templates 9
Paste to clipboard
Click this button to send the data for the currently displayed trend to the
Windows clipboard.
Plot trend
Click this button to plot the trend to a printer. You should use this button for
printing a trend graph instead of the Print Page button. A dialog will appear
allowing you to configure the printer setup.
Trend group
The folder icon allows you to load a trend group. A dialog will appear listing all
the currently configured groups. It also allows you to clear all currently
displayed variable tags. See Creating a Trends Group.
any page you specify for this parameter is based on the CSV_File template,
otherwise CSV_Nav_File will not be able to execute properly.
Common Toolbars
All the pages in the CSV_Include project include common toolbars that provide
easy navigation and access to key functionality, as well as a consistent
appearance.
The following three toolbars remain on screen during operation:
Navigation toolbar: Provides navigation buttons and direct access to key
pages such as the Trends page and Admin Tools page.
Alarm toolbar: Provides access to Alarms pages and displays the last three
active alarms.
Custom Menus toolbar: Provides menus capable of navigating to a specific
page or calling a Cicode function. The content of the menus is generated at
runtime using a lookup table.
12 Chapter 2: Using Pages and Templates
Navigation Toolbar
The Navigation toolbar includes buttons that allow the user to move between a
projects pages. If the current user has insufficient privilege or there is no option
configured for a particular button, it is unavailable to the user.
Back button
Takes you back to the page that was displayed prior to the current page. The
arrow to the right of the button allows you to select from a drop-down list of
recently visited pages. You can set the maximum number of pages included in
this drop-down list by adjusting the parameter
[Navigation]LastPageStackSize.
Forward button
Takes you back to the page that was displayed prior to the back button being
pressed. The arrow to the right of the button allows you to select from a drop-
down list of pages you've recently navigated back from. You can set the
Chapter 2: Using Pages and Templates 13
Previous/Next buttons
Move back and forth through the pages in a browse sequence, if one has been
configured.
To configure a browse sequence, go to the Page Properties dialog (File |
Properties) for each page in the sequence and set the Next and Previous fields on
the General tab accordingly.
button to call a function, or to launch a page with a name other than network,
adjust the parameter [Navigation]NetworkPage.
Tools button
This button displays the Admin Tools page, named CSV_AdminTools. You can
adjust the parameter [Navigation]ToolsPage if you want to call a function
with this button or change the page that's displayed; however, this is not
recommended. This button also features a menu to launch the Tag Debug tool
and Instant Trend display. It also allows you to switch tool tips on and off.
Login button
Calls up the standard CitectSCADA login prompt. The drop-down menu to the
right offers additional options, including Logout, Change Password, Edit User
(restricted by login) and Create User (restricted by login).
Help button
Used to display help information relevant to your project. The action this button
triggers is determined by the parameter [Navigation]Help.
Note that the default setting for this parameter calls a page called "Help", which
does not actually exist in the CSV_Include project. Therefore, to make this
button work, you must do one of the following:
Add a page called "Help" to your project, or adjust this parameter so that a
page with a different name is called.
Apply an action to the button so that an online Help file (a .HLP or .CHM
file) is launched. You have to use the format:
Chapter 2: Using Pages and Templates 15
[Navigation]
HelpPage = ?LaunchOnlineHelp
where LaunchOnlineHelp is a Cicode function that launches the required
Help file.
Implement page-based Help by setting an environmental variable called
HelpPage for each particular page. To do this, open the required page, go to
the properties dialog (File | Properties), and click the Environment tab.
Add a new variable called HelpPage with a value of a real page name or a
function name.
See Also Alarms Toolbar
Creating Custom Menus
Alarms Toolbar
The Alarms toolbar provides access to current alarm information and navigation
buttons for single-click access to alarm pages. It also include the standard Citect
prompt and current date and time.
page of the Computer Setup Wizard. See Running the Computer Setup
Wizard.
5 Ensure your users have appropriate privileges associated with their login to
acknowledge alarms, otherwise they will not be able to silence an alarm. See
Creating a Privileged User and the parameter [Privilege]AckAlarms.
See Also Alarm Page Templates
Creating Pages
When considering the pages required for your project, first determine if you can
use any of the predefined pages in the CSV_Include project:
Page name Description
CSV_Trend Default 8-pen Trend page, called from the Trend button on the Navigation
toolbar.
CSV_Alarm Active Alarms page, called from the Alarms toolbar.
CSV_AlarmHardware Hardware Alarms page, called from the Alarms toolbar.
CSV_AlarmDisabled Disabled Alarms page, called from the Alarms toolbar.
CSV_AlarmSummary Alarms Summary page, called from the Alarms toolbar.
CSV_AdminTools Admin Tools page, called from the Tools button on the Navigation toolbar.
There are also several pages that are accommodated by the Navigation toolbar
that you'll need to create if required. Decide if the following pages would be
useful in your project and create them using the appropriate name:
Page name Description
Home Called from the Home button on the Navigation toolbar.
Network Called from the Network button on the Navigation toolbar. Note that this
button does not display if a page called "Network" does not exist.
Help Called from the Help button on the Navigation toolbar.
The links between the pages listed above and the buttons that call them are
defined by the [Navigation] parameter settings within the Citect.INI file. If you
want a button to call a page with a different name, adjust these parameter
settings. For details see Citect.ini Parameters.
Creating new pages The Normal and Popup templates are designed with minimal content to enable
the presentation of customer-required information and plant mimics.
Pages are created based on these templates within Graphics Builder by choosing
the required template from the Use Template dialog (File | New Page). The
CSV_Include templates are accessible by selecting csv_xp_01 from the Style
field.
22 Chapter 3: Creating a New Project
Note: If you try to launch a CSV template from within Citect Explorer, you must
drill down to [Project Name]/Graphics/Templates/csv_xp_01/XGA to locate
it.
The CSV_Include project can add rollover buttons to pages without the need to
draw and configure multiple elements. You can add text to a page that has a
button appear behind it whenever the cursor passes by. This is achieved by
adding the function DspButtonRollOver() to a button's visibility property. No
arguments are required.
See Also Using Pages and Templates
Menu Configuration tool The content of the menus can be configured via the Menu Configuration tool,
which is launched from the Citect Configuration panel of the Admin Tools page.
The Menu Configuration tool has two panels. The panel to the left represents the
menus configured for the current project in a directory structure. The panel to
the right includes information about the item currently selected in the left panel.
The structure pictured above includes the default settings generated for any new
projects based on the CSV_Include templates.
Chapter 3: Creating a New Project 23
The directory in the left panel is a graphical representation of a DBF lookup table
that forms the basis of the menus displayed at runtime. The hierarchical
structure is determined by the following fields within this table:
Page The page field is defined as either Generic (as pictured above), or the name of a page
within the project. Generic specifies that the menu is associated with all pages, a specific
page name indicates the menus that will appear just on that particular page.
Menuname The name(s) of the menus included on the specified page.
Menuitem The item(s) that appear within each menu.
Submenu Any submenus that appear in a menu (optional). Note that adding a sub menu will
automatically remove the action defined for the menu item it is branched from, as the parent
becomes a placeholder for the list of sub menus.
In the example pictured above, the Page is defined as "generic", indicating that
the menus configured appear on all the pages within the project.
The Menu Names that appear are the five defaults: Pages, Trends, Alarms, File
and Tools. The Pages menu is expanded, showing the Menu Item Update Page
List. As Update Page List is the currently selected item, the fields associated with
it are pictured in the right.
The fields you can expect to see associated with an item, as defined in the DBF
table, are as follows:
Action Either the name of the page to display or a Cicode function. If specifying a Cicode function, it
must be prefixed by a question mark ("?").
Privilege The login privilege required to trigger the associated action.
Disabled Indicates if the item is currently disabled (embossed). For example, if the current login does
not meet the required privilege set for the item (see above), this field will be set to True and
the menu item will appear embossed to indicate its currently not active.
Checked Indicates if the menu item is currently checked (with a tick). True indicates
Btnwidth Specifies the width of the button (optional).
24 Chapter 3: Creating a New Project
Building custom menus Creating a custom menu entails adding the required pages, menus, and items to
the Configure Menus directory structure, and then assigning the required action
and privileges to each item. This is all achieved via right-click menus.
Copy page Copies the currently selected page adds automatically pastes it to the end of
the menu configuration. This option is useful if you want a page to include the
generic page menu configuration, but with additional menus that only appear
when the particular page is displayed. To achieve this, copy the generic page,
rename it to match the page you would like to customize the menus for, then
adds the required menus and items.
Save Save the current menu configuration
Editing an item A menu item's functionality is configured via the Edit Item Menu dialog.
Use this dialog to identify the action an item will trigger, be it navigation to a
specific page, or execution a function. To launch this dialog, right-click the item
to configure and select Edit Item from the menu that appears.
You should fill out the fields as follows:
Action Indicate the name of the page to display, or a Cicode function. If specifying a Cicode
function, it must be prefixed by a question mark ("?").
Privilege The login privilege required to trigger the action. Only users with appropriate access
privileges will be able to use this item.
Disabled As this setting is determined automatically depending on the current user's access
privileges, you should leave this set to False unless you want the item disabled by default.
Checked Again, you should leave this set to False unless you want the item checked by default.
Button Width Leave this set to zero (0) as this will automatically set the menu button to the appropriate
width. If you want to set a specific width for the button, input the width in pixels.
See Also Common Toolbars
For example, you could create a group defined by all category one alarms. This
group could then be used as a filter to create a list of all the category one alarms
currently displayed on the Active Alarms page.
Alarm groups are configured by clicking the appropriate link on the Citect
Configuration panel to the left of the Admin Tools page. The functionality can
also be added to a custom menu for easier access.
To configure an alarm group:
1 Go to the Admin Tools page of a runtime project by clicking the Tools but-
ton.
2 Select Configure an Alarm Group from the Citect Configuration panel. The
Configure Alarm Groups dialog appears.
3 In the Alarm Group Description box, key in the name you would like to use
to identify the group.
4 In the Categories box, list the alarm categories configured in the Citect
runtime project that you would like to use to define the group.
5 In the Area box, key in the areas defined in the Citect project that you would
like to use to define the group.
6 Click Add.
The information to the right of the dialog indicates how many alarm groups are
configured and where you are currently positioned in this list. You can scroll
through the list of configured groups by using the up and down arrows.
To change a group, locate it in the list, make the required changes, then click
Replace.
See Also Creating a Trends Group
Chapter 3: Creating a New Project 27
3 In the Description text box, key in the name you would like to use to
identify the group.
4 In the Trend Pen text boxes, select the eight variable tags you would like the
group to trend. The button to the right of each field calls up a list of the
available tags within the CitectSCADA Runtime project.
5 In the Area text box, key in the areas defined in the Citect project that you
would like to use to define the group.
6 Click Add.
28 Chapter 3: Creating a New Project
The information to the right of the dialog indicates how many trend groups are
configured and where you are currently positioned in this list. You can scroll
through the list of configured groups by using the up and down arrows.
To change a group, locate it in the list of groups or browse to it using the
selection button to the right of the Description text box, make the required
changes, then click Replace.
See Also Creating an Alarms Group
Citect.ini Parameters
The table below shows parameter information for the sections within the
citect.ini file.
Section Parameter
[Alarm] Soundn
SoundnInterval
LastAlarmFmt
LastAlarmCategories
LastAlarmPriorities
LastAlarmType
[Multimonitors] Monitors
ScreenWidth
LastPageStackSize
StartupPagen
[Page] MenuDisable
DelayRepaint
[Navigation] HomePage
NetworkPage
TrendPage
FilePage
ToolsPage
HelpPage
AlarmPage
HardwarePage
SummaryPage
DisabledPage
MenuXPos
MenuYPos
MenuBackColour
MenuForeColour
[TrendX] KeySeq
TagListEnable
Duration
[Privilege] AckAlarms
DisableAlarms
EngTools
EditUser
Shutdown
30 Chapter 4: CSV_Include Reference
Soundn Determines the wav file that is used when an alarm sounds, based on the
priority of the alarm (n). For example, [Alarm]Sound1 identifies the .wav file
that will be sounded when a priority 1 alarm is triggered.
Allowable Values: Any valid wav file name, including a full directory path.
Note: You can use CitectSCADA's predefined path substitutions to locate a wav
file; for example:
Sound1=[RUN]:Alarm1.wav.
Default Value: (no sound)
SoundnInterval Determines how long an alarm sounds for, based on the priority of the alarm (n).
For example, [Alarm]Sound1Interval identifies how long the audible alert
runs for when a priority 1 alarm is triggered.
Allowable Values: 250 - 30000 milliseconds
Default Value: 2000
LastAlarmFmt Specifies the columns and formatting used for the list of recent alarms on the
alarms toolbar.
Note: This parameter is available to all CitectSCADA projects; however, its
default value is different when implemented as part of project based on a
CSV_Include templates.
Allowable Values: Any combination of Alarm Display Fields.
Default Value: {Time,12}{Date,12}^t{Name,15}^t{Desc,35}^t{State,9}
LastAlarmCategories Determines which alarms are displayed on the alarms toolbar, based on
category. For example, if you want the list of alarms to just display category 1
alarms, you would set this parameter to 1.
Allowable Values: 1 - 16376
Default Value: 0 (all alarms)
Chapter 4: CSV_Include Reference 31
LastAlarmPriorities Determines which alarms are displayed on the alarms toolbar, based on priority.
For example, if you want the list of alarms to just display priority 1 alarms, you
would set this parameter to 1.
Allowable Values: 1 - 255
Default Value: 0 (all alarms)
LastAlarmType Determines which alarms are displayed in the alarms toolbar, based on type.
Allowable Values: 0 - 14
Non-hardware alarms
0 - All active alarms, i.e. Types 1 and 2
1 - All unacknowledged alarms, ON and OFF
2 - All acknowledged ON alarms
3 - All disabled alarms
4 - All configured (non-hardware) alarms, i.e. Types 0 to 3, plus
acknowledged OFF alarms.
Hardware alarms
5 - All active alarms, i.e. Types 6 and 7
6 - All unacknowledged alarms, ON and OFF
7 - All acknowledged ON alarms
8 - All disabled alarms
9 - All configured alarms, i.e. Types 5 to 8
Alarm Summary
10 - All summary alarms
Alarm General
11 - All ON alarms
12 - All OFF alarms
13 - All ON hardware alarms
14 -All OFF hardware alarms
Default Value: 0
32 Chapter 4: CSV_Include Reference
[MultiMonitors] Parameters
The [MultiMonitors] section contains the following parameters.
Monitors Indicates the number of monitors the project will be displayed on.
Allowable Values: 1 and above.
Note: The CSV_Include project has only been tested on a system with up to three
monitors. System performance on more than three monitors has not been
confirmed.
Default Value: 1
ScreenWidth Adjusts the displayed page to suit the width of the screen in pixels. If you are not
running with the recommended default screen size of 1024 x 768, you should
adjust this setting to match the screen width currently set in your computer's
display properties.
Allowable Values: 640, 800, 1024, 1152, 1280, 1920, etc.
Default Value: 1024
LastPageStackSize Determines the maximum number of pages that can be included in the Back
buttons drop-down list of previously visited pages.
Allowable Values: 1 - 10
Default Value: 10
StartupPagen Determines the pages that appear when starting up a multi monitor setup. For
example, StartupPage1 determines the page that appears on the first monitor at
startup, StartupPage2 determines what appears on the second monitor, and so
on.
Allowable Values: Any valid page name
Default Value: The page named CSV_Start. If CSV_Start does not exist, the
current setting for [Page]Startup will be used.
[Page] Parameters
The [Page] section contains the following parameters.
Chapter 4: CSV_Include Reference 33
MenuDisable Enables or disables the menu bar. If disabled, the available menus will not
appear.
This parameter is available to all CitectSCADA projects, however, its usage is
different when implemented as part of project based on a CSV_Include
templates.
Allowable Values: 0 menu bar enabled
1 menu disabled
Default Value: 0
DelayRepaint Delays the loading of pages until all the animation points are updated, allowing
an instant repaint of the page.
Allowable Values: 1 delay repaint on
0 delay repaint off
Default Value: 1
[Navigation] Parameters
The [Navigation] section contains the following parameters.
HomePage Determines the page that will appear, or the action that is triggered, when the
Home button is selected from the Navigation toolbar.
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_Start
If no value is defined for this parameter, then the page set for
[MultiMonitor]StartupPage1 will be loaded. If nothing is defined there, then the
default CSV_Start will be used.
NetworkPage Determines the page that will appear, or the action that is triggered, when the
Trend button is selected from the Navigation toolbar.
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_Trend
34 Chapter 4: CSV_Include Reference
TrendPage Determines the page that will appear, or the action that is triggered, when the
Trend button is selected from the Navigation toolbar.
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_Trend
FilePage Determines the page that is loaded when the function CSV_Nav_File is used to
display a text file (.txt or .rtf).
When executed, CSV_Nav_File determines the file that is to be displayed on the
page, its location, the title that is applied to the page, and whether or not the file
is editable. The page defined by this parameter merely provides a palette for this
action. Therefore, you must ensure that any page you specify for this parameter
must be based on the CSV_File template, otherwise the function will not be able
to execute properly.
Allowable Values: the name of any page based on the CSV_File template
Default Value: CSV_File
ToolsPage Determines the page that will appear, or the action that is triggered, when the
Admin Tools button is selected from the Navigation toolbar.
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_AdminTools
HelpPage Determines the page that will appear, or the action that is triggered, when the
Help button is selected from the Navigation toolbar. Note that the default setting
calls a page called "Help", which does not actually exist in the CSV_Include
project. Therefore, to make this button work, you will have to perform one of the
following:
1 Add a page called "Help" to your project, or adjust this parameter so that a
page with a different name is called.
2 Apply an action to the button so that an online Help file (a .HLP or .CHM
file) is launched. You have to use the format:
[Navigation]
HelpPage = ?LaunchOnlineHelp
Chapter 4: CSV_Include Reference 35
AlarmPage Determines the page that will appear, or the action that is triggered, when the
Current Alarms button is selected from the Alarms toolbar.
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_Alarm
HardwarePage Determines the page that will appear, or the action that is triggered, when the
Hardware Alarms button is selected from the Alarms toolbar.
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_AlarmHardware
SummaryPage Determines the page that will appear, or the action that is triggered, when the
Alarms Summary button is selected from the Alarms toolbar.
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_AlarmSummary
DisabledPage Determines the page that will appear, or the action that is triggered, when the
Disabled Alarms button is selected from the Alarms toolbar.
36 Chapter 4: CSV_Include Reference
Allowable Values: any valid page name, or the relevant function name if a
particular action is required. To trigger a function you must prefix the function
name with a question mark (?).
Default Value: CSV_AlarmDisabled
MenuXPos Determines the horizontal point from the left of the screen where the menu bars
begins.
Default Value: 2 pixels
It is not recommended that you change this parameter as it will impact on the
logical appearance of your project pages.
MenuYPos Determines the vertical point from the top of the screen where the menu bars
begins.
Default Value: 25 pixels
It is not recommended that you change this parameter as it will impact on the
logical appearance of your project pages.
MenuBackColour Determines the background color used for the menu bar.
Allowable Values: 0x000000 - 0xFFFFFF
Color defined as an RGB value, for example:
0x000000 - (Black)
0x000080 - (Blue)
0x008000 - (Green)
0x008080 - (Cyan)
0x800000 - (Red)
0x800080 - (Magenta)
0x808000 - (Brown)
0xBFBFBF - (Grey)
0x7F7F7F - (Dark Grey)
0x0000FF - (Light blue)
0x00FF00 - (Light green)
0x00FFFF - (Light cyan)
Chapter 4: CSV_Include Reference 37
MenuForeColour Determines the foreground color used for the menu bar.
Allowable Values: 0x000000 - 0xFFFFFF.
Color defined as an RGB value, for example:
0x000000 - (Black)
0x000080 - (Blue)
0x008000 - (Green)
0x008080 - (Cyan)
0x800000 - (Red)
0x800080 - (Magenta)
0x808000 - (Brown)
0xBFBFBF - (Grey)
0x7F7F7F - (Dark Grey)
0x0000FF - (Light blue)
0x00FF00 - (Light green)
0x00FFFF - (Light cyan)
0xFF0000 - (Light red)
0xFF00FF - (Light Magenta)
0xFFFF00 - (Yellow)
0xFFFFFF - (White)
Default Value: 225
[TrendX] Parameters
The [TrendX] section contains the following parameters.
38 Chapter 4: CSV_Include Reference
KeySeq Determines the key sequence used to automatically add tags to the Instant Trend
display from a graphics page.
Default Value: + (plus sign)
It is recommended that you only change this parameter if the default setting
conflicts with some other functionality on your system.
TagListEnable Determines whether a list of current tags is loaded into the Tag Selection dialog
when using the instant trend display. Having no tags appear in the selection
dialog may be useful if your project has a large number of tags that takes a while
to load. If the list is disabled, you can still enter known tag names into the
selection field.
Allowable Values: 0 = tag list disabled
1 = tag list enabled
Default Value: 1
Duration Determines the default length of time the instant trend window opens for when
launched.
Allowable Values: 0, 0.25, 0.5 hours, etc.
or
1 192 hours
Default Value: 8
[Privilege] Parameters
The [Privilege] section contains the following parameters.
EngTools Determines the privilege level a user requires to access the functionality on the
Admin Tools page.
Allowable Values: 0 - 8
Default Value: 8
CSV_Include Functions
The table below contains the CSV_Include categories of functions:
Function Category Functions
CSV_Include Alarms CSV_Alarms_Ack
CSV_Alarms_AckHardware
CSV_Alarms_AckPage
CSV_Alarms_AckRec
CSV_Alarms_AdvFilter
CSV_Alarms_AdvFilterConfig
CSV_Alarms_AdvFilterQuery
CSV_Alarms_AdvFilterSetDateTime
CSV_Alarms_CheckSound
CSV_Alarms_ClearGroupFilter
CSV_Alarms_Disable
CSV_Alarms_DisableRec
CSV_Alarms_DspGroupFilter
CSV_Alarms_DspGroupList
CSV_Alarms_DspInfo
CSV_Alarms_DspInfoRec
CSV_Alarms_DspLast
CSV_Alarms_Enable
CSV_Alarms_EnableRec
CSV_Alarms_GetAckPrivilege()
CSV_Alarms_GetDisablePrivilege()
CSV_Alarms_GetGroupFilter
CSV_Alarms_GetGroupFilterID
CSV_Alarms_GetUniqueGroupName
CSV_Alarms_GroupAdd
CSV_Alarms_GroupConfig()
CSV_Alarms_GroupRemove
CSV_Alarms_GroupEdit
CSV_Alarms_GroupFilter
CSV_Alarms_GroupSelect
CSV_Alarms_GroupsInit()
CSV_Alarms_Help
CSV_Alarms_HelpRec
CSV_Alarms_ListHeading
CSV_Alarms_ListHeadingFont()
CSV_Alarms_PopupMenu
CSV_Alarms_Sound()
CSV_Alarms_SoundActive()
CSV_Alarms_Silence()
Chapter 4: CSV_Include Reference 41
Syntax CSV_Alarms_Ack(iAN)
iAN: Animation point number of alarm to acknowledge.
Syntax CSV_Alarms_AckHardware(iAN)
iAN: Animation point number of alarm to acknowledge.
Note: Hardware alarms are not stored in the same way as standard alarms.
Therefore, AlarmGetDsp() does not return any information for a hardware
alarm. Thus, CSV_Alarms_Ack will not function correctly for hardware alarms.
Syntax CSV_Alarms_AckPage(iAN)
iAN: Starting animation point number of page of alarms to acknowledge.
CSV_Alarms_AckRec Acknowledges an alarm by record number, and silences the alarm sound.
Syntax CSV_Alarms_AckRec(iRecNo)
iRecNo: Record number of alarm to acknowledge.
CSV_Alarms_AdvFilter Applies an advanced filter to the alarm list displayed at a specified AN. The
advanced filter allows alarms to be filtered based on Date, Time, Tag, Name,
Description, Area, Category, Priority, State and Type (or any combination of
these).
Syntax CSV_Alarms_AdvFilter(iAN,iAlarmType,iMonitor)
iAN: Animation point where the alarm list is displayed.
48 Chapter 4: CSV_Include Reference
Return Value 0
CSV_Alarms_AdvFilter Displays a popup window allowing the user to configure advance alarm
Config filtering.
Syntax CSV_Alarms_AdvFilterConfig(iAlarmType,iMonitor)
iAlarmType: Type of alarm list associated with filter:
CSV_Alarms_AdvFilter Called for each alarm to determine which alarm is displayed when a user
Query defined advanced filter has been applied.
Syntax CSV_Alarms_AdvFilterQuery(iRecNo,nVer,sFromDate,sFromTime,sToDate
,sToTime,sTag,sName,sArea,sCategory,sPriority,sState,sType)
iRecNo: Record number of the alarm.
nVer: Version (not used).
sFromDate: Alarms prior to this date won't be displayed ("" sets FromDate to
earliest possible).
Chapter 4: CSV_Include Reference 49
sFromTime: Alarms prior to this time won't be displayed ("" sets FromTime
to 12:00 Midnight).
sToDate: Alarms subsequent to this date won't be displayed ("" sets ToDate
to current date).
sToTime: Alarms subsequent to this time won't be displayed ("" sets ToDate
to current time).
sTag: Alarm Tag must be 'Like' sTag i.e. = *sTag*.
CSV_Alarms_AdvFilter Writes the date and time entered via a keypad form to specified Text boxes.
SetDateTime (Used in the Advanced Alarm Filter form).
CSV_Alarms_CheckSou Checks alarm summary records between a specified index and the current index
nd until an unacknowledged alarm is found (for given area/s) with a priority higher
than a specified priority.
Note: This function should only be called on an alarm server.
Syntax CSV_Alarms_CheckSound(iAlarmIndexPrevious,iPriorityPrevious,sArea
)
50 Chapter 4: CSV_Include Reference
sArea: Current logged in areas (i.e., only check alarms within these areas).
Return Value This function returns a string containing three values separated by a single
space:
Alarm Priority: Priority of higher priority alarm if one is found, otherwise
iPriorityPrevious as originally passed to function.
Alarm Index: Index of most recent alarm checked.
Alarm Acknowledged: 1 if an alarm has been acknowledged and no further
alarms have since been triggered, otherwise 0.
Syntax CSV_Alarms_Disable(iAN)
iAN: Animation point number of alarm to disable.
Syntax CSV_Alarms_DisableRec(iRecNo)
iRecNo: Record number of alarm to disable.
CSV_Alarms_DspGroup Displays the Alarm Group listbox, and stores the selected filter for the specified
Filter alarm page and the specified monitor.
Syntax CSV_Alarms_DspGroupFilter(iAlarmType,iMonitor)
iAlarmType: Type of alarm list associated with filter:
Syntax CSV_Alarms_DspGroupList
sSelectedGroup: Name of group to preselect in the list.
sAreas: Areas to enable in the list; i.e., only alarm groups belonging to these
areas are displayed.
Return Value Alarm group (description) selected from the list, or "" if cancel is pressed.
CSV_Alarms_DspInfo Displays information popup for alarm at specified animation point in alarm list.
Syntax CSV_Alarms_DspInfo(iAN)
52 Chapter 4: CSV_Include Reference
CSV_Alarms_DspInfoR Displays information popup for alarm at the specified record number.
ec
Syntax CSV_Alarms_DspInfoRec(iRecNo)
iRecNo: Record number of alarm to display information for.
Syntax CSV_Alarms_DspLast(iAN,iAlarmCount,iType)
iAN: Animation point number of start of alarm list.
11 = All ON alarms.
12 = All OFF alarms.
13 = All ON hardware alarms.
14 = All OFF hardware alarms.
Syntax CSV_Alarms_Enable(iAN)
iAN: Animation point number of alarm to enable.
Syntax CSV_Alarms_EnableRec(iRecNo)
iRecNo: Record number of alarm to enable.
CSV_Alarms_GetAckPri Checks that the user has privilege level required for acknowledging alarms.
vilege()
CSV_Alarms_GetDisabl Checks that the user has privilege level required for disabling alarms.
ePrivilege()
CSV_Alarms_GetGroup Returns the description of the filter currently applied to the alarm list.
Filter
Syntax CSV_Alarms_GetGroupFilter(iAlarmType,iMonitor,iChars)
54 Chapter 4: CSV_Include Reference
Return Value Description of the filter currently applied to a specified alarm list, returned as
lines if a maximum number of characters per line is specified.
CSV_Alarms_GetGroup Returns the name of the group associated with the filter currently applied to a
FilterID specified alarm list.
Syntax CSV_Alarms_GetGroupFilterID(iAlarmType,iMonitor)
iAlarmType: Type of alarm list associated with filter:
Return Value Name of alarm group, or "_AdvFilter_" if advanced filter applied, "" if no filter
applied.
CSV_Alarms_GetUniqu Checks if a group of a specified name exists. If a group already exists with the
eGroupName specified name then a new name is found by appending a number to the original
name.
Syntax CSV_Alarms_GetUniqueGroupName(sGroupName)
sGroupName: Name of a group to check.
Note: Call this function to ensure a new group can be created with a specified
name, before attempting to create the group.
Chapter 4: CSV_Include Reference 55
Return Value Name of a group not yet assigned (= sGroupName, or modified version of
sGroupName).
CSV_Alarms_GroupAdd Adds an alarm group to the Alarm Group Listbox, and creates a group to store
the associated alarm categories. The alarm group is also added to AlarmGrp.dbf.
The name of the group is stored in the second field of the listbox (non-visible
field), as well as in the "Name" field of the AlarmGrp.dbf.
Note: Alarm groups are used to filter alarms on an alarm page. When a group is
selected from the list only alarms having the associated categories are displayed
on the alarm page.
CSV_Alarms_GroupRe Removes an alarm group from the Alarm Group Listbox, and deletes the Citect
move group of the same name. The alarm group is also removed from the
AlarmGrp.dbf.
Note: Alarm groups are used to filter alarms on an alarm page. When a group is
selected from the list, only alarms having the associated categories are displayed
on the alarm page.
Syntax CSV_Alarms_GroupRemove(sGroupName)
sGroupName: Unique Name/ID of alarm group (= second field (non-visible)
of Alarm Group listbox, which can be retrieved by calling
CSV_ListBox_GetSelectedItemID.)
56 Chapter 4: CSV_Include Reference
CSV_Alarms_GroupEdit Edits an existing alarm group in the Alarm Group Listbox, and updates the
AlarmGrp.dbf.
Note: Alarm groups are used to filter alarms on an alarm page. When a group is
selected from the list, only alarms having the associated categories are displayed
on the alarm page.
Syntax CSV_Alarms_GroupEdit(sGroupName,sDesc,sCategories,sArea)
sGroupName: Name/ID of alarm group (must be unique).
CSV_Alarms_GroupFilt Filters the alarm list starting at a specified animation point for a group of
er categories.
Note: If the group name = "_AllAlarms_", the all alarms is displayed; i.e., the
filter is cleared. If the group name = "_AdvFilter_", the selected advanced filter is
applied to the alarm list.
Syntax CSV_Alarms_GroupFilter(iAN,sGroupName,iAlarmType,iMonitor)
iAN: Animation point number of start of alarm list.
CSV_Alarms_GroupSel Filters the alarm list starting at a specified animation point for a group of
ect categories. The alarm group may be specified by either the group name or the
group description (as found in the AlarmGrp.dbf). Stores the applied filter for a
specified monitor and specified alarm page type.
Syntax CSV_Alarms_GroupSelect(iAN,sGroupID,sGroupIDType,iAlarmType,
iMonitor)
iAN: Animation point number of start of alarm list.
sGroupID: Name/Desc of alarm group to filter for. If sGroupID = "", the filter
is cleared.
sGroupIDType:
CSV_Alarms_GroupsIni Initializes Alarm Group Listbox with groups specified in AlarmGrp.dbf. For
t() each alarm group listed in AlarmGrp.dbf, a group is created to store the alarm
categories assigned to the alarm group. Groups are used to filter alarm list.
When a group is selected from the list, only alarms having those categories are
displayed on the alarm page.
CSV_Alarms_Help For alarm at specified animation point in alarm list: Displays page specified in
help field of alarm dbf, or if help field begins with "?", calls the function named
in the field (i.e., the text following "?").
CSV_Alarms_HelpRec For alarm at specified record number: displays the page specified in the help
field of alarm dbf, or if the help field begins with "?", calls the function named in
the field (i.e., the text following "?").
Syntax CSV_Alarms_HelpRec(iAN)
iAN: Animation point number of alarm to display help for.
CSV_Alarms_ListHeadi Returns a formatted heading for the specified alarm list type. The heading
ng format is specified by the ini parameters [Alarm]ActiveHeading,
[Alarm]SummaryHeading, [Alarm]DisabledHeading, and
[Alarm]HardwareHeading.
Syntax CSV_Alarms_ListHeading(iAlarmType)
iAlarmType: Type of alarm list associated with filter.
Return Value Alarm list heading. Returns "" if no heading has been specified.
Example [Alarm]
ActiveHeading =
{DATE,12}^t{TIME,14}^t{NAME,15}^t{DESC,40}^t{STATE,10}
CSV_Alarms_ListHeadi Returns the font to use for alarm list headings. The font is specified by the ini
ngFont() parameter [Alarm]HeadingFont. If no font is specified the default, (tahoma,
bold, 9 blue) is used.
CSV_Alarms_PopupMe Displays popup menu for alarm at specified animation point in alarm list.
nu Available menu items:
Alarm information
Acknowledge
Disable
Enable
Help
Note: The Disable/Enable options are available only to user with privilege level
specified by [Privilege] DisableAlarms parameter. Acknowledge option
available only to user with privilege level specified by [Privilege] AckAlarms
parameter.
Syntax CSV_Alarms_PopupMenu(iAN,iAlarmType)
iAN: Animation point number of alarm to display menu for.
CSV_Alarms_Sound() Checks if there are unacknowledged alarms in the system, and if there are it
sounds the relevant alarm.
CSV_Alarms_SoundAct Checks if an alarm is being sounded. This function is used to animate siren in
ive() templates, and so on.
Syntax CSV_DB_BOF(hRecordSet)
hRecordSet: Handle to recordset (as returned from CSV_DB_Execute() )
Syntax CSV_DB_Close(hRecordSet)
hRecordSet: Handle to recordset (as returned from CSV_DB_Execute() )
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\somepath\MyExcel.xls; Extended Properties=Excel
8.0;HDR=Yes;IMEX=1"
where:
HDR=Yes; indicates that the first row contains columnnames, not data
IMEX=1; tells the driver to always read "intermixed" data columns as text
Text:
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\somepath\MyTxtFilesFolder\;Extended
Properties=text;HDR=Yes;FMT=Delimited"
where:
"HDR=Yes;" indicates that the first row contains column names, not data
DBF:
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\somepath\MyDbfFolder;Extended Properties=dBASE IV;User
ID=Admin;Password="
DSN:
"DSN=MyDsn;Uid=MyUserID;Pwd=MyPassword;"
UDL:
"File Name=c:\somepath\myDataLink.udl;"
Syntax CSV_DB_Execute(sCommand,sPrimaryConnection,sStandbyConnection)
#sCommand: Command to execute
#sPrimaryConnection: Connection string for primary connection path.
#sStandbyConnection: Connection string for standby connection path.
CSV_DB_GetExecuteEr Returns a description of the error that occurred for the last CSV_DB_Execute
ror command call.
Syntax CSV_DB_GetExecuteError(nMode)
#nMode
Syntax CSV_DB_GetFieldCount(hRecordSet)
Syntax CSV_DB_GetFieldIndex(hRecordSet,sField)
#sField: Name of field.
CSV_DB_GetFieldName Returns the name of a field contained in a specified recordset. The field is
identified by a field index.
Syntax CSV_DB_GetFieldName(hRecordSet,nFieldIndex)
#nFieldIndex: Index of field (first field has nFieldIndex = 0).
CSV_DB_GetFieldText Returns the value of a field (as a string) contained in a specified recordset. The
field is identified by a field index.
Syntax CSV_DB_GetFieldText(hRecordSet,sField,nFieldIndex,sNullValue)
#sField: Name of field. (Leave blank "" if nFieldIndex is to be used instead.)
#nFieldIndex: Index of field.The first field has nFieldIndex = 0. (Used only
if sField = "")
#sNullValue: Value to return if the field value is Null
Note: If the value of the field is Null then this function will return the string
specified by the argument sNullValue.
Syntax CSV_DB_GetRowCount(hRecordSet)
Chapter 4: CSV_Include Reference 63
CSV_DB_GetRowCurre Returns the row number of the current record in a specified recordset.
nt
Syntax CSV_DB_GetRowCurrent(hRecordSet)
CSV_DB_GetRowFieldT Get the value of a specified field in a specified row of a specified recordset.
ext
Syntax CSV_DB_GetRowFieldText(hRecordSet,nRowOffset,sField,nFieldIndex,
sNullValue)
#nRowOffset: Offset of row (from current position)
Syntax CSV_DB_MoveFirst(hRecordSet)
Syntax CSV_DB_MoveLast(hRecordSet)
Syntax CSV_DB_MoveNext(hRecordSet)
CSV_DB_MoveOffset Finds the record at a specified offset from the current record in a specified
recordset.
64 Chapter 4: CSV_Include Reference
Syntax CSV_DB_MoveOffset(hRecordSet)
Syntax CSV_DB_MovePrev(hRecordSet)
CSV_DB_StandbyConn Check the last connection state of the specified primary connection and the
ectionActive specified standby connection.
Syntax CSV_DB_StandbyConnectionActive(sPrimaryConnection,
sStandbyConnection)
Return Value If the primary connection state is offline and the standby connection state is
online then return 1 otherwise return 0.
CSV_DB_StrToSQL Replaces single quote with two single quotes to ensure SQL interprets single
quote as text only.
Syntax CSV_DB_StrToSQL(sText)
#sText: The text to convert to SQL format
CSV_Display_Display_L Note: Displays company logo at specified x and y coordinates. The logo must be
ogo a 256-color (maximum) bitmap file. The default file is "logo.bmp" located in the
[RUN] directory. Alternatively, a file name and path may be specified.
Note: The logo will only be displayed on the first scanupdate of the page.
Syntax CSV_Display_Logo(iX,iY,sLogoFile)
#iX: X coordinate to display top-left corner of logo.
#iY: Y coordinate to display top-left corner of logo.
CSV_Display_Display_S Gets Citect Service PackHotfix in the form 'Service Pack A' or 'HF....'.
ervicePack()
Syntax CSV_File_Display(sFile,iAN,iMode,sFontName,sFontSize,
iFontColour,iBackColour,iWordWrap,iScrollbars)
#sFile: Name of file to display.
#iMode:
#iWordWrap: Wrap text (for text files only; i.e., not rtf files).
0 = None
1 = Horizontal
66 Chapter 4: CSV_Include Reference
2 = Vertical
3 = Both
Syntax CSV_File_Print(Name)
#Name: Name of file to print.
Syntax CSV_File_Save(sFile)
#sFile: Name of File to save.
CSV_Form_Login() Displays the login form, gest the user name and password, and then tries to log
the user in. If the login fails, it will retry unti login is OK or user presses the
Cancel button.
CSV_Form_NumPad Generates a form that allows the user to enter values through a number pad. The
form is displayed on the current ('active') monitor, at the cursor position.
Syntax CSV_Form_NumPad(sTitle,sInput,iMode)
#sTitle: Title of numeric pad form.
0 = Normal keypad.
1 = With a Password style edit field.
2 = Mode not yet implemented.
4 = With "+-" button.
8 = With "" button.
16 = With "." button.
32 = With ":" button, not compatible with mode "+-".
64 = With "AM" and "PM" buttons, not compatable with mode "" or "."
128 = With "Now" button.
512 = With "1hr", "2hr", "8hr", "24hr" buttons, not compatible with mode
"Now".
Return Value Returns the string of value entered through the keypad if closed with the accept
button, or a null string if closed any other way.
CSV_Form_Position Displays a form at the specified x,y coordinates, while ensuring that all of the
form is displayed within the boundaries of the current monitor. (i.e., that the x,y
coordinates are automatically adjusted if necessary).
CSV_Form_Shutdown() Displays a dialog box to verify that the user really wants to shut down the Citect
system. If the user selects [Yes], Citect will be shut down.
CSV_Form_UserCreate( Displays a form to create a record for a new user. A new user of the specified
) type is created. The name of the user must be unique.
CSV_Form_UserEdit() Displays a form to allow the user to create or delete any user record in the
database. This function should have restricted access. Changes are written to
both the Users database and the runtime database in memory.
CSV_Form_UserPassw Displays a form to allow users to change their own passwords. Changes are
ord() written to both the Users database and the runtime database in memory.
Syntax CSV_ListBox_AddItem(hList,sItem,sCategory,sItemID)
#hList: Handle to list object.
#sItem: Item text to add to list.
Syntax CSV_ListBox_Clear(hList)
#hList: Handle to list object.
Return Value Handle to the created list if list box was created successfully; otherwise -1.
Syntax CSV_ListBox_Destroy(hList)
#hList: Handle to list object.
Syntax CSV_ListBox_GetCategory(hList,sItemID)
#hList: Handle to list object.
Syntax CSV_ListBox_GetItem(hList,sItemID)
#hList: Handle to list object.
Syntax CSV_ListBox_GetItemID(hList,sItem)
70 Chapter 4: CSV_Include Reference
Syntax CSV_ListBox_GetSelectedItem(hList)
#hList: Handle to list object.
CSV_ListBox_GetSelect Call after selection has been made from list. Returns the category of the selected
edItemCategory item.
Syntax CSV_ListBox_GetSelectedItemCategory(hList)
#hList: Handle to list object.
CSV_ListBox_GetSelect Call after item has been selected from list to retrieve its Item ID.
edItemID
Syntax CSV_ListBox_GetSelectedItemID(hList)
#hList: Handle to list object.
CSV_ListBox_GetTagC Extracts the tag comment from a string containing the name followed by, in
omment brackets, the tag comment.
Syntax CSV_ListBox_GetTagComment(sItem)
#sItem: String containing tag name and comment.
CSV_ListBox_GetTagD Extracts the tag name and comment from the tag name.
escFromTag
Syntax CSV_ListBox_GetTagDescFromTag(sTrendTag)
#sTrendTag: Name of tag.
CSV_ListBox_GetTagNa Extracts the tag name from a string containing the name followed by, in brackets,
me the tag comment.
Syntax CSV_ListBox_GetTagName(sItem)
#sItem: String containing tag name and comment.
Return Value String containing formatted trend tag name and comment.
Syntax CSV_ListBox_RemoveItem(hList,sItem,sCategory,sItemID)
#hList: Handle to list object.
#sItemID: ID of item.
Syntax CSV_ListBox_Hide(hList)
#hList: Handle to list object.
CSV_ListBox_SelectCat Select categories of items to be displayed in list (filters list to display only items
egories having specified category. More than one category can be displayed by
separating each category with a comma (and no spaces between categories).
Note: Categories = "" -> removes category filter.
CSV_ListBox_SelectTag Creates an ActiveX object which provides a combo box to allow a tag to be
s() selected from a list. If a tag list object already exists a new instance of it is
created.
CSV_ListBox_SelectTre Creates an ActiveX object which provides a combo box to allow a trend tag to be
nds() selected from a list. If a trend tag list object already exists a new instance of it is
created.
CSV_ListBox_SetText Set title, description, OK button, and Cancel button text on ActiveX list object.
Syntax CSV_ListBox_SetText(hList,sTitle,sDesc,sOK,sCancel)
#hList: Handle to list object.
Syntax CSV_ListBox_Show(hList,sTitle,sDesc,sOK,sCancel,iX,iY)
#hList: Handle to list object.
Return Value Item selected from list (returns empty string if no item selected)
CSV_ListBox_TagForm Formats a string to contain the name of the specified variable followed by, in
at brackets, the comment associated with the variable. Called before adding a
variable to a drop down list of variables available for trending. Formats each
item in the drop down list.
Syntax CSV_ListBox_TagFormat(sVariable)
#sVariable: Name of variable to be formatted.
Syntax CSV_ListBox_Visible(hObject)
#hObject: Handle to list object.
#iDecPlaces: The number of decimal places the value is rounded down to.
Syntax CSV_Math_Truncate(rValue)
Example CSV_Math_Truncate(4.328) = 4
CSV_Math_Truncate(5.867) = 5
CSV_MenuConfig_Clos Closes the Menu Configuration popup. If changes have not been saved, a
e() prompt to save the configuration will appear.
CSV_MenuConfig_Displ Displays Menu configuration popup, which gives the user the ability to
ay() configure menus at runtime.
CSV_MenuConfig_User Updates the menu configuration to allow the user to select from the "Pages"
Pages() menu all non-system pages (maximum number of pages = 25).
CSV_MessageBox Displays a message box centered on the active monitor screen and waits for the
user to select a button. Can display up to three buttons, as well as a checkbox.
Can disappear after specified timeout.
Syntax CSV_MessageBox(sTitle,sPrompt,iMode,iTimeout,SButton1Text,
SButton2Text,SButton3Text)
#sTitle: Message box title
#sPrompt: Message box prompt
#iMode
0 - OK button only (default)
1 - OK and Cancel buttons
2 - Abort, Retry, and Ignore buttons
3 - Yes, No, and Cancel buttons
4 - Yes and No buttons
5 - Retry and Cancel buttons
16 - Critical message
32 - Warning query
48 - Warning message
64 - Information message
0 - First button is default (default)
256 - Second button is default
512 - Third button is default
768 - Fourth button is default
0 - Application modal message box (default)
4096 - System modal message box
16384 - Adds Help button to the message box
65536 - Specifies the message box window as the foreground window
524288 - Text is right aligned
1048576 - Specifies text should appear as right-to-left reading on
Hebrew and Arabic systems
#iTimeout: The number of seconds before the message box disappears.
#sButton1Text: Text for first button
CSV_Misc_CheckNumP Uses the MultiMonitor Numpad to get a value, then checks the value's range
adValue and returns the new value, or the old if range is incorrect.
#rUpLimit: The Upper limit that the original value can be changed to (as a
real or int)
#rLowLimit: The Lower limit that the original value can be changed to (as a
real or int)
Return Value The new value or the original value if out of range.
CSV_Misc_IntRange Checks the range is valid for Integers; if not, a message box appears informing
the user of the correct range.
Syntax CSV_Misc_IntRange(LowerRange,UpperRange,OriginalValue,NewValue)
#LowerRange: The Lower range of the required Range
#Original Value: The value to be change back too; this is used if the value
is invalid or out of range.
#New Value: The new value to change to.
Return Value The new value, or the original value if out of range.
CSV_Misc_MouseOver Returns TRUE if the mouse is inside the region defined by the extents of the
object at 'hAN'.
Syntax CSV_Misc_MouseOver(hAN)
#hAN: The animation number of the display object
Return Value TRUE (1) if the mouse cursor is inside the region bounded by the extents of
the specified display object
FALSE (0) otherwise.
CSV_MM_GetMonitor() Gets the number of the currently active monitor. The 'active' monitor is the
monitor that contains the largest part of the area of the currently active window.
Syntax CSV_MM_GetMouseX(iMode)
#iMode
0 = Gets mouse position with respect to top-left corner of desktop.
1 = Gets mouse position with respect to top-left corner of active monitor.
2 = Gets mouse position with respect to top-left corner of active window.
Syntax CSV_MM_GetMouseY(iMode)
#iMode
0 = Gets mouse position with respect to top-left corner of desktop.
Chapter 4: CSV_Include Reference 79
CSV_MM_GetOffset Gets X-offset of selected monitor. To display a page on the selected monitor the
page must have its X coordinate set to this value.
Syntax CSV_MM_GetOffset(iMonitorNo)
#iMonitorNo: Number of monitor to get X-offset for.
CSV_MM_ListLastPage Displays on the active monitor a menu listing pages that may be navigated
s backwards or forwards from the current page. A stack stores recently displayed
pages in the order in which they were displayed. This function can be used to
allow these pages to be selected for display.
Syntax CSV_MM_ListLastPages(Mode)
#Mode
0 = Lists pages which may be navigated backwards.
1 = Lists pages which may be navigated forwards.
CSV_MM_MonitorFrom Gets number of monitor intersecting the largest area of the specified window.
Window
Syntax CSV_MM_MonitorFromWindow(iWindowNo)
#iWindowNo: Window number to get monitor number for.
Syntax CSV_MM_MonitorGoto(iMonitor)
#iMonitor: Number of monitor to go to.
Return Value Number of main window associated with monitor if successful, otherwise -1.
CSV_MM_NextEmpty() Checks if a 'Next' page has been defined for the current page.
Note: If CSV_MM_NextEmpty() = 1 then disable 'Next Page' navigation button.
Syntax CSV_MM_PageDisplay(sPage,iMonitor,bStoreLastPage,sStoreFunction)
#sPage: Name of page to display.
#iMonitor: Number of monitor to display page on. First monitor = '0',
Second = '1' etc. If iMonitor = -1 then page is displayed on the 'active' (ie.
currently selected) monitor.
#bStoreLastPage: Add page to last page stack. If bStoreLastPage = 0 then
the page is not written to the queue that stores the previous pages displayed.
#sStoreFunction: Name of function to store on last page stack.
If a function has been specified then that function will be called when
navigating through the last pages, rather than displaying the page.
To include arguments append a space and then a comma-separated list of
the arguments (string constants) to the function name.
CSV_MM_PageLast Navigates last page stack. Allows moving backward and (subsequently)
forward through a predefined number of previously displayed pages, in the
order in which they were displayed. The stack is unique to the currently active
monitor. ie. only the last pages displayed on the active monitor are navigated.
Syntax CSV_MM_PageLast(iMode)
0 = backwards (Default).
1 = forwards.
CSV_MM_PageNext() Displays 'Next page' of currently active page. Page is displayed on same monitor
(ie. currently active monitor).
CSV_MM_PagePrev() Displays 'Previous page' of currently active page. Page is displayed on same
monitor (i.e., currently active monitor).
CSV_MM_PagesInit() Displays startup pages. Parameter values are read from .ini file [MultiMonitors]
section.
Note: This function is to be called on startup for all clients requiring multiple-
monitor support. To implement this without requiring a call to this function
from within the startup cicode function, it has been configured as a periodic
event (listed as a 'CSV_MultiMonitor' event). The first time the event is
processed the multi-monitor functionality is initialized. All subsequent calls
return immediately without effect.
CSV_MM_PreviousEmp Checks if a 'Previous' page has been defined for the current page.
ty() Note: If CSV_MM_PreviousEmpty() = 1 then disable 'Previous Page' navigation
button.
CSV_MM_StoreLastPag Adds page to last page stack for selected monitor. Page Title is written to queue
e that stores pages in order of access. (Each monitor has its own queue.) The action
to perform when navigating through the last page stack is also stored.
Syntax CSV_MM_StoreLastPage(iMonitorNo,sPageAction,sPageTitle)
#iMonitorNo: Number of monitor page was displayed on.
CSV_MM_WinDrag() Moves active window with mouse; i.e., window position will track mouse
movements.
Note: Call CSV_MM_WinDragEnd to end dragging of window.
CSV_MM_WinFree() Closes active window, if active window is not main window for a monitor.
Calling CSV_MM_WinFree rather than WinFree ensures that all assigned monitors
maintain at least one open window. That window will be the one opened by the
CSV_MM_PageDisplay function.
Always call CSV_MM_WinFree to close a window if multi-monitor functionality
has been implemented.
Return Value 0 if successful, otherwise an error is returned. -1 indicates that you attempted to
close the main window of a monitor.
CSV_MM_WinNewAt Displays a new window at the X and Y coordinates relative to the top-left corner
of active monitor.
Syntax CSV_MM_WinNewAt(sPage,iX,iY,iMode)
Chapter 4: CSV_Include Reference 83
Return Value The window number of the window, or -1 if the window cannot be opened.
CSV_MM_WinPopup Display popup window at x and y coordinates relative to top left corner of active
monitor.
Return Value The window number of the window, or -1 if the window cannot be opened.
Note: The entire window is displayed within the borders of a single screen. If iX
= -1 and iY = -1, the window is centered on screen.
CSV_MM_WinTitle Sets the window title. Call this function rather than WinTitle to set window
title. Changes the title of the page on the last page stack if the window is a main
page. Shows the correct page title in the forward/back navigation drop down
list.
Syntax CSV_MM_WinTitle(sTitle)
#sTitle: Title of window.
CSV_Nav_Alarms() Displays Alarm page, or calls function defined for alarm page.
Note: The Network page is defined by the parameter [Navigation] AlarmPage.
To specify a function prefix the function name with "?"
CSV_Nav_AlarmsDisabl Displays Disabled Alarm page, or calls function defined for disabled alarm
ed() page.
Note: The Network page is defined by the parameter [Navigation]
DisabledPage. To specify a function prefix the function name with "?".
CSV_Nav_AlarmsHardw Displays Hardware Alarm page, or calls function defined for hardware alarm
are() page.
Note: The Network page is defined by the parameter [Navigation]
HardwarePage. To specify a function prefix the function name with "?"
CSV_Nav_AlarmsSumm Displays Alarm page, or calls function defined for alarm page.
ary() Note: The Network page is defined by the parameter [Navigation]
SummaryPage. To specify a function prefix the function name with "?"
Syntax CSV_Nav_DisableMenuItem(iMode,sMenuItem,sSubMenuItem,sMenuName,sP
ageName)
#iMode
Chapter 4: CSV_Include Reference 85
CSV_Nav_DisplayMenu Creates menu bar for specified page. The menu.dbf is accessed to determine
Bar what buttons should appear in the menu bar. A new menu bar (ActiveX object)
is created with the specified buttons.
Syntax CSV_Nav_DisplayMenuBar(sPageName,iX,iY,nBackColour,nForeColour)
#sPageName: Name of page.
#iX: X-coordinate of top left corner of menu bar.
CSV_Nav_DisplayPopu Displays popup menu for specified page and specified menu. Top left corner of
pMenu menu is displayed at nominated x,y coordinates.
Syntax CSV_Nav_DisplayPopupMenu(sPageName,sMenuName,iX,iY)
#sPageName: Name of page.
Syntax CSV_Nav_File(sTitle,sFile,iMode,sFontName,iFontSize,iFontColour,
iBackColour,iWordWrap)
#sTitle: Title to appear on file page.
CSV_Nav_GetEngTools Checks that the user has the privilege level required for engineering tools.
Privilege()
CSV_Nav_Help() Displays Help page, or calls function defined for help page.
Note: The Help page is defined by the page environment variable "HelpPage" if
it exists, otherwise by the parameter [Navigation] HelpPage. To specify a
function prefix the function name with "?"
CSV_Nav_Home() Displays Home page, or calls function defined for home page.
Note: The Home page is defined by the parameter [Navigation] HomePage. To
specify a function prefix the function name with "?"
Syntax CSV_Nav_MenuBar_MenuClick(sPageName,sButtonName,iX,iY)
#sPageName: Name of page containing menu bar.
CSV_Nav_Network() Displays Network page, or calls function defined for network page.
Note: The Network page is defined by the parameter [Navigation]
NetworkPage. To specify a function prefix the function name with "?"
Return Value 1 if network page exists, or function has been specified for network page.
88 Chapter 4: CSV_Include Reference
CSV_Nav_PageExists Checks if a page exists by attempting to locate its associated runtime file.
Syntax CSV_Nav_PageExists(sPage)
#sPage: Name of page to check.
CSV_Nav_PagePrint() Creates a screen print of the active page, or calls the function defined for page
print.
Note: The print function is defined by the page environment variable
"PrintPage" if it exists, otherwise by the parameter [Navigation] PrintPage.
To specify a function prefix the function name with "?". If no function has been
defined, a screen print will be performed.
CSV_Nav_Parent() Displays page configured as ParentPage environment variable for current page,
or calls function specified by ParentPage.
CSV_Nav_ParentBtnEn Checks if a page has been defined for the current page.
abled()
CSV_Nav_Report() Displays Report page, or calls function defined for report page.
Note: The Network page is defined by the parameter [Navigation]
ReportPage. To specify a function prefix the function name with "?".
Return Value 1 if Report page exists, or function has been specified for Report page.
Chapter 4: CSV_Include Reference 89
Syntax CSV_Nav_ReportMenu(iX,iY)
#iX: X-coordinate of popup menu position.
CSV_Nav_Tools() Displays Tools page, or calls function defined for tools page.
Note: The Tools page is defined by the parameter [Navigation] ToolsPage.
To specify a function, prefix the function name with "?".
Return Value 1 if Tools page exists, or function has been specified for Tools page.
CSV_Nav_Trend() Displays Trend page, or calls function defined for trend page.
Note: The Trend page is defined by the parameter [Navigation] TrendPage. To
specify a function prefix the function name with "?".
Return Value 1 if Trend page exists, or function has been specified for Trend page.
90 Chapter 4: CSV_Include Reference
Syntax CSV_Nav_TickMenuItem(iMode,sMenuItem,sSubMenuItem,sMenuName,sPage
Name)
#iMode
1 = Check menu item.
0 = Uncheck menu item.
#sMenuItem: Menu item to check/uncheck.
CSV_Sec_ShowLoginM Displays a popup menu allowing user to login, logout, change the password,
enu and, if the user has the required privilege, to edit a user or add a user.
Syntax CSV_Sec_ShowLoginMenu(iXpos,iYpos,iUserEditPrivilege)
#iXpos: X position of top-left corner of popup menu.
#iYpos: Y position of top-left corner of popup menu.
CSV_String_GetField Gets a field value (text) from a string, where the string consists of a number of
fields separated by a field separation character.
Chapter 4: CSV_Include Reference 91
Syntax CSV_String_GetField(sText,iField,sFieldSeparator)
#sText: String containing fields.
CSV_String_GetLines Returns the number of lines in a string, given a maximum number of characters
per line.
CSV_String_Replace Returns a string in which a specified substring has been replaced with another
substring a specified number of times.
Syntax CSV_String_Replace(sTextString,sFind,sReplace,iStart,iCount)
#sTextString: Expression containing substring to replace.
CSV_Tag_Debug Builds a form to provide simple user access to all Variable Tags during runtime.
Reading and writing are supported. The Form is always on top, and only one
instance is allowed.
92 Chapter 4: CSV_Include Reference
Syntax CSV_Tag_Debug()
CSV_Trend_AutoScale Auto scales all trend pens, such that the 100% scale is 10% of the full tag range
above the maximum tag value in the viewable trend window, and the 0% scale is
10% of the tag range below the minimum tag value in the viewable trend
window.
Syntax CSV_Trend_AutoScale(hTrendAN)
#hTrendAN: Animation point number of the trend.
CSV_Trend_DspGroup Displays a specified group of trend pens on a specified trend page. The group of
trend pens must have been defined in the TrendGrp.dbf file in the [RUN]
directory. The group may be specified by either the group name or the group
description.
Syntax CSV_Trend_DspGroup(sTitle,sTrendPage,hTrendAN,sTrendID,iTrendIDTy
pe, iTrendDataSet)
#sTitle: Title to appear on trend page.
CSV_Trend_DspGroupL Displays available groups of trend tags in a listbox. Returns the description of
ist the item selected from the list. Groups are configured in the TrendGrp.dbf file
found in the [RUN] directory.
Syntax CSV_Trend_DspGroupList(sSelectedGroup,sAreas)
#sSelectedGroup: Name of group to preselect in the list.
Chapter 4: CSV_Include Reference 93
#sAreas: Areas to enable in the list; i.e., only trend groups belonging to
these areas are displayed.
Return Value Trend group (description) selected from the list, or "" if cancel is pressed.
CSV_Trend_DspPopup Displays a popup menu to allow the user to add or clear the selected pen.
Menu
Syntax CSV_Trend_DspPopupMenu(hTrendAN,iPen)
#hTrendAN: Animation point number of the trend.
#iPen: Number of selected pen.
CSV_Trend_DspScaleR Returns the current displayed scale range for a specified trend pen, in the
ange format: "Lo - HiEU" where Lo = RangeMin, Hi = RangeMax, and EU =
engineering units.
Syntax CSV_Trend_DspScaleRange(hTrendAN,iPen)
#hTrendAN: Animation point number of the trend.
CSV_Trend_DspTrendT Returns the comment for the trend tag plotted by the specified pen if a comment
ext exists, otherwise returns the name of the trend tag.
Syntax CSV_Trend_DspTrendText(hTrendAN,iPen)
#hTrendAN: Animation point number of the trend.
Return Value Trend tag comment if it exists, otherwise the trend tag name (all capitalized).
CSV_Trend_GetCursorP Gets the offset of a trend cursor from its origin, in samples.
os
94 Chapter 4: CSV_Include Reference
Syntax CSV_Trend_GetCursorPos(hTrendAN)
#hTrendAN: Animation point number of the trend.
Return Value The offset of a trend cursor from its origin, in samples, or -1 if the trend cursor is
disabled.
CSV_Trend_GetCursorT Returns text indicating whether the cusor is displayed. Used in conjunction with
ypeStr CSV_Trend_GetCursorValueStr() to notify the user whether the displayed
trend tag value corresponds to the value at the cursor, or the current value.
Syntax CSV_Trend_GetCursorTypeStr(hTrendAN)
#hTrendAN: Animation point number of the trend.
Return Value Returns "Current Value" if the cursor is not displayed, or "Cursor Value" if the
cursor is displayed.
CSV_Trend_GetCursorV Gets the value of a trend pen at the cursor position, or the current value of the
alueStr trend pen if the cursor is disabled. The value is returned as a string, optionally
followed by the engineering units of the tag.
Return Value Value of the trend pen at the cursor position, or its current value if the cursor is
not displayed.
CSV_Trend_GetGroup Gets the description of the group of trends (as defined in TrendGrp.dbf)
currently displayed (or last displayed) on a specified monitor.
#iTrendDataSet: Identifies the data set to be used for the group of trend
tags. Normal trend page uses data set 0; a double trend page uses data sets 1
and 2.
CSV_Trend_GetMode Gets the mode (real-time or historical trending) of the trend pen.
Syntax CSV_Trend_GetMode(hTrendAN)
#hTrendAN: Animation point number of the trend.
Syntax CSV_Trend_GetPenFocus(hTrendAN)
#hTrendAN: Animation point number of the trend.
CSV_Trend_GetSettings Reads an .ini file to recall (Get) the settings (Tags displayed and scales) for the
current page. This function will allocate a separate section in the .ini file for each
page.
Example [TrendPage1]
Tag_1=TrendTag1
Zero_1=0.
Full_1=1000.
Tag_2=TrendTag2
96 Chapter 4: CSV_Include Reference
Zero_2=0.
Full_2=1000.
Tag_3=TrendTag3
Zero_3=0.
Full_3=1000.
Tag_4=TrendTag4
Zero_4=0.
Full_4=1000.
Tag_5=
Tag_6=
Tag_7=
Tag_8=
Note: Call this function on entry to the Trend Page.
CSV_Trend_GetSettings Writes an .ini file to recall (Get) the settings (tags displayed and scales) for the
current page. This function allocates a separate section in the .ini file for each
page.
Syntax CSV_Trend_GetSettings(sPage,hTrendAN)
Example [TrendPage1]
Tag_1=TrendTag1
Zero_1=0.
Full_1=1000.
Tag_2=TrendTag2
Zero_2=0.
Full_2=1000.
Tag_3=TrendTag3
Zero_3=0.
Full_3=1000.
Tag_4=TrendTag4
Zero_4=0.
Full_4=1000.
Tag_5=
Tag_6=
Chapter 4: CSV_Include Reference 97
Tag_7=
Tag_8=
Note: Call this function on exiting the Trend Page.
CSV_Trend_GetSpan Gets the time span as a time formatted string "HH:MM:SS" for a specified trend.
Syntax CSV_Trend_GetSpan(hTrendAN)
#hTrendAN: Animation point number of the trend.
CSV_Trend_GetTime Gets the time of the trend at a percentage along the trend, using the time of the
right-most sample displayed. The time associated with the right-most sample
displayed is known as the end time. The start time is the time of the left-most
sample displayed. Percent 0 (zero) will correspond to the end time, and Percent
100 will correspond to the start time.
#iPercent: The percentage of the trend from the time of the right-most
sample displayed.
CSV_Trend_GetDate Gets the date of the trend at a percentage along the trend, using the date of the
right-most sample displayed. The date associated with the right-most sample
displayed is known as the end date.
The start date is the date of the left-most sample displayed. Percent 0 (zero) will
correspond to the end date, and Percent 100 will correspond to the start date.
Syntax GetDate(hTrendAN,iPercent)
#hTrendAN: Animation point number of the trend.
#iPercent: The percentage of the trend from the date of the right-most
sample displayed.
Return Value The date of the trend in the format month day year.
98 Chapter 4: CSV_Include Reference
Syntax CSV_Trend_Page(sPage,sPen1,sPen2,sPen3,sPen4,sPen5,sPen6,sPen7,sP
en8)
#sPage: Name of trend page to display.
CSV_Trend_Popup Builds a Pop-up trend page in a new window with the specified pens. The
window is centered on the active monitor.
Syntax CSV_Trend_Popup(sPage,sPen1,sPen2,sPen3,sPen4)
#sPage: Name of trend page to display.
Return Value Window number of popup trend window; otherwise -1 if the window couldn't
be created.
Chapter 4: CSV_Include Reference 99
Syntax CSV_Trend_ScaleDigital(hTrendAN,iPen)
#hTrendAN: Animation point number of the trend.
CSV_Trend_SelectGrou Allows the user to select a group of trend tags from a listbox. Each group has an
p associated name, description and list of up to 8 tags. This function stores the
selected group data and returns the name of the group selected from the list.
Note: Groups are configured in the TrendGrp.dbf file found in the [RUN]
directory.
Syntax CSV_Trend_SelectGroup(iMonitor,iTrendDataSet)
#iMonitor: Number of monitor the trend is/was displayed on.
#iTrendDataSet: Identifies the data set to be used for the group of trend
tags. A normal trend page uses data set 0, double trend page uses data sets 1
and 2.
Return Value Trend group (description) selected from the list, or "" if Cancel is pressed.
CSV_Trend_SelectPen Displays a listbox to allow the user to select a tag to trend with the selected pen.
Syntax CSV_Trend_SelectPen(sSelectedPen)
#sSelectedPen: Name of trend tag to pre-select.
Return Value Name of trend tag selected from list, or "" if action is cancelled.
CSV_Trend_SetCursor If no trend pen has the focus, this function returns, otherwise it moves the trend
cursor by a specified number of samples. If the trend cursor is disabled, this
function enables it. If the cursor is enabled and the number of samples is 0 (zero),
the cursor is disabled. If the cursor is moved off the current trend frame, the
trend scrolls.
Syntax CSV_Trend_SetCursor(hTrendAN)
#hTrendAN: Animation point number of the trend.
100 Chapter 4: CSV_Include Reference
CSV_Trend_SetDate Sets the 0% date of the trend via a keypad form. This allows the user to view
trend information up to the date entered.
Syntax CSV_Trend_SetDate(hTrendAN,sValue)
#hTrendAN: Animation point number of the trend.
#sValue: The date to set the 0% trend date to. If sValue = "", a form is
displayed for the user to select a date.
CSV_Trend_SetDateTim Sets the 0% date and time of the trend via a keypad form. This allows the user to
e view trend information up to the time and date entered.
Syntax CSV_Trend_SetDateTime(hTrendAN)
#hTrendAN: Animation point number of the trend.
CSV_Trend_SetPens Allocates trend tags to trend pens. The names of the trend tags are extracted
from a string that stores the last group of trend tags displayed on a particular
monitor.
CSV_Trend_SetRange Gets the default range for all trend pens and sets page strings 1017 to the values
of the ranges.
Syntax CSV_Trend_SetRange(hTrendAN)
#hTrendAN: Animation point number of trend.
Chapter 4: CSV_Include Reference 101
CSV_Trend_SetScale Allows the user to set the zero and full scale values of the trend. The scale may
be changed for all trends or only the current trend.
Syntax CSV_Trend_SetScale(hTrendAN,iPercentage,sValue)
#hTrendAN: Animation point number of trend for which the timebase is to be
set.
#iPercentage: Scale percentage to set (0 or 100).
#sValue: Value to set scale percentage to. If sValue = "", a form will be
displayed allowing the user to select a new scale.
CSV_Trend_SetSpan Sets the span (total amount of time visible) on the trend.
Syntax CSV_Trend_SetSpan(hTrendAN,sSpan)
#hTrendAN: Animation point number of trend.
#sSpan: Value to set the span to. If sSpan = "", a form will be displayed
allowing the user to select the trend span.
CSV_Trend_SetTime Sets the 0% time of the trend via a keypad form. This allows the user to view
trend information up to the time entered.
Syntax CSV_Trend_SetTime(hTrendAN,sValue)
#hTrendAN: Animation point number of the trend.
#sValue: The time to set the 0% trend time to. If sValue = "", a form is
displayed for the user to select a time.
CSV_Trend_SetTimeba Allows the operator to set the time interval between each sample.
se
Syntax CSV_Trend_SetTimebase(hTrendAN,sValue)
#hTrendAN: Animation point number of trend for which the timebase is to be
set.
102 Chapter 4: CSV_Include Reference
#sValue: Value to set timebase to. If sValue = "", a form will be displayed
allowing the user to select a new timebase.
Syntax CSV_Trend_UpdatePens(hTrendAN,iMonitor,iTrendDataSet)
#hTrendAN: Animation point number of the trend.
CSV_Trend_Win Builds a trend page in a new window with the specified pens.
Syntax CSV_Trend_Win(sPage,iX,iY,iMode,sPen1,sPen2,sPen3,sPen4,sPen5,sPe
n6,sPen7, sPen8)
#sPage: Name of trend page to display.
Return Value Window number of the window; otherwise -1 if window can't be opened.
Chapter 4: CSV_Include Reference 103
CSV_TrendX_AddVariab Assigns a variable to the first available instant trend tag. An instant trend tag is
le available if no variable is currently being trended by it; that is,
msTrendXVariable[iTrendNo] = "", where iTrendNo is the number of the
instant trend.
Note: This function is to be called only on a trend server. To maintain
redundancy the function is also called with the same arguments on the second/
redundant trend server.
The variable is assigned a trend duration. The variable name is also added to the
end of a queue storing all currently assigned variables in the order in which they
were assigned.
If there are no available trend tags then the variable is not assigned to be
trended.
CSV_TrendX_ClearTren Clears trend cache and delete trend file associated with specified trend.
d This function must be called before a new variable can be assigned to a Instant
Trend tag. This must be done as the trend tag may have been previously
assigned to a different variable, in which case scrolling back through the trends
history could display data not associated with the current variable.
Note: This function is to be called only on a trend server. To maintain
redundancy the function is also called with the same arguments on the second/
redundant trend server.
104 Chapter 4: CSV_Include Reference
CSV_TrendX_Close Frees instant trend tags associated with trend pens. Close the instant trend
popup.
Syntax CSV_TrendX_Close(hAN)
#hAN: AN number of instant trend.
CSV_TrendX_DeletePen Deletes trend pen on instant trend page. Stop trending variable assigned to
() instant trend Tag.
#hAN: AN number of Instant Trend
CSV_TrendX_Display() Displays the Instant Trend popup. Set trend duration to default value.
CSV_TrendX_DspPopu Creates a popup at the location of the mouse on an Instant Trend page, giving
pMenu the user a choice of selecting a trend pen (i.e., selecting a tag to be trended by the
selected pen), or clearing a trend pen.
If the user chooses 'select trend pen' then a form is displayed allowing the user to
select a variable tag to be trended by the pen from a menu of available variable
tags. If the user chooses 'clear trend pen', the selected trend pen is deleted.
Called when the user right-clicks a trend pen marker.
CSV_TrendX_GenericTo Converts raw integer value (032000) to real value scaled between specified tag's
Tag engineering zero and engineering full scale.
Syntax CSV_TrendX_GenericToTag(iValue,sTagName)
#iValue: Raw value scaled between 0 32000.
#sTagname: Name of tag whose eng zero and eng full scale values are to be
used to scale iValue.
Return Value Value scaled between tag's eng zero scale and eng full scale.
CSV_TrendX_GenericT Converts raw integer value (032000) to real value scaled between specified tag's
oTagStr engineering zero and engineering full scale, then returns that value as a string.
Note: Instant trend data is stored in generic format. i.e., as a raw integer with
range 032000. Call this function to convert raw trend value into scaled value to
be displayed on the trend popup.
Syntax CSV_TrendX_GenericToTagStr(iValue,sTagName)
#iValue: Raw value scaled between 0 32000.
#sTagname: Name of tag whose eng zero and eng full scale values are to be
used to scale iValue.
Return Value Value (as string) scaled between tag's eng zero scale and eng full scale.
Syntax CSV_TrendX_GetComment(sVariable)
#sVariable: Name of tag to retrieve comment for.
Return Value Value of trend pen at cursor (returned as string). Value is scaled between eng
zero and eng full for variable being trended, as specified by in variable tag
configuration.
Return Value Trend duration of instant trend popup, in long time period format (hh:mm:ss).
Syntax CSV_TrendX_GetSamplePeriod(iTrendNo)
#iTrendNo: Number of trend tag to get sample period for.
CSV_TrendX_GetScale Gets value representing a percentage of the displayed range for trend pen in
focus. Used for determining/displaying 0, 50, 100% etc, scale on Instant Trend
page.
Syntax CSV_TrendX_GetTrendName(iTrendNo)
#iTrendNo: Number of instant trend tag.
CSV_TrendX_GetTrigge DescriptionThis function is called in the Trigger field of the Trend Tag
r configuration form for all Instant Trend tags.
Syntax CSV_TrendX_GetTrigger(iTrendNo)
#iTrendNo: Number of the instant trend tag.
Return Value Return ValueTrigger setting for each Instant Trend tag.
CSV_TrendX_GetVal This function is called in the Expression field of the Trend Tag configuration
form for all instant trend tags. Makes the element of the array that stores the
value assigned to a trend tag available to the trend system.
Syntax CSV_TrendX_GetVal(iTrendNo)
#iTrendNo: Number of the instant trend tag.
Return Value Last stored value of the variable associated with the instant trend tag, as an
integer between 1 and 32000.
CSV_TrendX_InitSrvr() Initializes trend server for instant trending. Set up table used for clearing data in
trend cache. Set all instant trend triggers to 1. Initializes queue for storing names
of variables being trended by instant trend system.
Note: This function is to be called on startup for all trend servers if instant trend
functionality is required. To implement this without requiring a call to this
function from within the startup cicode function, it has been configured as a
periodic event (listed as a CSV_TrendXServer event). The first time the event is
processed the instant trend server functionality is initialized. Subsequent calls
return immediately without effect.
108 Chapter 4: CSV_Include Reference
CSV_TrendX_RefreshTr Refreshes trend page. Called after a variable has been added to instant trend
endPage system. Scrolls to current time.
Syntax CSV_TrendX_RefreshTrendPage(hAN)
#hAN: AN number of instant trend.
Note: Calling TrendSetNow results in old/invalid data being cleared from the
screen. This is necessary when the variable being trended by a pen changes.
Syntax CSV_TrendX_SetDuration(iTrendNo,iDuration,iUpdateRedundantSrvr)
#iTrendNo: Number of trend to set duration for.
CSV_TrendX_SetPen() Displays form allowing user to select variable to assign to trend pen.
CSV_TrendX_SetSampl Sets the sample period for a specified instant trend pen. For display purposes
ePeriod only, the sample period is stored as a page-based integer. This is updated when
this function is called. The sample period is updated on the trend server.
CSV_TrendX_SetScale Sets scale for instant trend. Scale may be set for all pens or current pen only.
Syntax CSV_TrendX_SetScale(hAN,iPercent,iScaleVal,iDspNumPad)
#hAN: AN number of Instant Trend.
CSV_TrendX_TagSelect Assigns a variable to a pen on the Instant Trend page. The variable will be
assigned to the first available Instant Trend tag. The local page based variables
accessed by the trend page are updated.
Return Value Number of instant trend tag assigned to trending sVariable if successful,
otherwise -1.
Syntax CSV_TrendX_TagSelect(hAN,iPenNo,sVariable)
#hAN: AN number of Instant Trend.
CSV_TrendX_TagSelect Assigns a variable to a pen on the Instant Trend page by positioning the mouse
FrmCursor() pointer over an animation point. The variable associated with the AN point will
be selected.
110 Chapter 4: CSV_Include Reference
CSV_TrendX_TagToGen Converts real value scaled between specified tag's engineering zero and
eric engineering full scale, to a raw integer value (0 - 32000).
Instant Trend data is stored in generic format. i.e. as a raw integer with range 0
32000.
CSV_TrendX_TrendTim Monitors time remaining for trends associated with instant trend popup.
eout
Syntax CSV_TrendX_TrendTimeout(hAN)
#hAN: Number of Instant Trend AN.
CSV_WinUtl_DestroyCu Deletes the specified cursor and sets the cursor to the normal cursor.
rsor()
Return Value Screen color resolution: 0 = 256 colors, 1 = High color (16 bit), 2 = True color (24
bit/32 bit), -1 = Error.
CSV_WinUtl_GetCpuUs Gets the percent CPU usage of a specified process, or the total CPU usage.
age
Syntax CSV_WinUtl_GetCpuUsage(sProcessName)
#sProcessName: Name of process, or "" to get total CPU usage.
CSV_WinUtl_LoadCurs Loads the cursor for a specified window from a file (.ani or .cur).
or
Syntax CSV_WinUtl_LoadCursor(sCursor,hWnd)
#sCursor: File (including path) containing cursor.
#hWnd: Handle of window to change cursor for.
Syntax CSV_WinUtl_LockWindowUpdate(hWnd)
112 Chapter 4: CSV_Include Reference
Syntax CSV_WinUtl_NormalCursor(hWnd)
#hWnd: Handle of window to change cursor for.
Syntax CSV_WinUtl_ShellExec(sOperation,sFile,sArgs,sDir,iShowCmd)
#sOperation: Specifies the operation to perform. The following operation
strings are valid:
open - Opens the file specified by the lpFile parameter. The file can be an
executable file or a document file. It can also be a folder.
print - The function prints the file specified by lpFile. The file should be
a document file. If the file is an executable file, the function opens the
file, as if "open" had been specified.
explore - The function explores the folder specified by lpFile. This
parameter can be "". In that case, the function opens the file specified by
lpFile.
#sFile: Specifies the file to open or print or the folder to open or explore.
The function can open an executable file or a document file. The function
can print a document file.
#sArgs: If sFile specifies an executable file, sArgs specifies the parameters to
be passed to the application. If sFile specifies a document file, sArgs should
be "".
#sDir: Specifies the default directory.
Return Value Returns a value greater than 32 if successful, or an error value that is less than or
equal to 32 otherwise. The following table lists the error values.
ERROR_FILE_NOT_FOUND (=2) - The specified file was not found.
ERROR_PATH_NOT_FOUND (=3) - The specified path was not found.
ERROR_BAD_FORMAT (=17) - The .exe file is invalid (non-Win32 .exe or
error in .exe image).
SE_ERR_ACCESSDENIED (=5) - The operating system denied access to the
specified file.
SE_ERR_ASSOCINCOMPLETE (=27) - The file name association is
incomplete or invalid.
114 Chapter 4: CSV_Include Reference
CSV_WinUtl_UpdateTot Updates the total percent CPU usage at minimum of 0.5 second intervals. Called
alCpuUsage() from the Admin Tools page.
Syntax CSV_WinUtl_WaitCursor(hWnd)
#hWnd: Handle of window to change cursor for.
Filter page
The Filter page is the layout page for controlling and monitoring a copper
filtration process. Copper concentrate enters a tank (top left) and mixes with
flocculent to a specified density. The DIC_104 button displays a faceplate. Pump
A pumps the mixture to the filter tank, through VALVE_512. Pump B pumps
spillage (from the process) back to the mixing tank.
The DEVICE STATUS panel displays the status (on/off or open/closed) of the
pumps, valve, and density faceplate.
To do this: Do this...
Start or stop a pump Click the Pump A or Pump B button to display the command panel, and
then click the MANUAL and START (or STOP) buttons.
Open or close the valve Click the VALVE_512 button to display the command panel, and then click
the MANUAL and OPEN (or CLOSE) buttons.
Switch the filter on or off Click the Disk Filter button to toggle the filter on and off.
Display the runtime for Pump A Click the Spanner button to display the accumulator panel for the pump.
Display Loop Faceplates Click the Flocculent, Torque, Bed Depth, and Density numbers.
See Also Filter Page (Engineers Notes)
116 Chapter 5: CSV_Example Project
Loop Page
The Loop page provides control for five loops:
To change the setpoint for a loop, move the red thumb on the slider control.
To adjust the gain, integral, or derivative of a loop, click the Tune button.
Recipe Page
The Recipe page is the layout page for a bread-making process.
To select a recipe to manufacture:
1 Click the Select\Edit button.
2 Use the Prev or Next buttons to locate the recipe.
3 Click the Select button.
To start the manufacturing process, click the Start Process button. The process
stops automatically when complete.
See Also Recipe Page (Engineers Notes)
Genies Page
The Test Genies button toggles a tag off or on. You can see how Genies represent
on or off conditions.
See Also Genies Page (Engineers Notes)
Note: This copies all the Symbol library files. You can copy only the files you
need if you prefer.
To move the slider, point to the number then click and drag the mouse.
To enter new values position the mouse over the number, type the new value
and press Enter. To enter values via a number pad, double-click the numbers.