Download as pdf or txt
Download as pdf or txt
You are on page 1of 1382

Table of contents

Project diagnostics & settings 5


Languages 8
Advanced 13
Audit & diagnostics 31
The counters tab 34
The monitoring tab 54
Examples of using the audits 65
General 69
Labels 71
Associated labels 73
Data connections 85
Communication 105
Data acquisition 108
BACnet 114
Configuring a BACnet network 125
Managing BACnet devices 133
BACnet data sharing 146
BACnet Alarm and Event notifications 151
BACnet Trending 160
BACnet Event Logging 168
BACnet Scheduling 174
Using the BACnet helpers 183
Equipment 196
Communication configuration in general 204
Configuring the communication 206
Optimising the communication 220
Communication status 225
Configuring a protocol 230
Serial protocols 232
Johnson Controls BUS9100 233
Matsushita Mewtocol-Com SR 241
Modbus II 249
Modbus/Jbus 265
Siemens S7 PPI 273
SAIA SBUS 281
Unitelway Slave 290
Ethernet TCP/IP protocols 298
Citilog 299
GE Fanuc SRTP 308
Hilscher NetLINK 317
Matsushita Mewtocol-Com IP 325
Mitsubishi TCP/IP 333
Modbus II 341
Open Modbus Master 357
Redundant node configuration 367
Using a Wago Dali node 373
Using Moxa remote I/O 379
Open Modbus Slave 383
POSM 391
Address selection 396
SAIA SBUS TCP/IP 406
Siemens IP-ISO S7 415
Siemens S7 Master 428
TwinCAT 439
Yokogawa 451
Support for timestamped data 459

-1-
Block Structures 464
Applicom 473
About Applicom 474
Configuring C-CURE Building Management System for Applicom 478
Node configuration 480
Frame configuration 483
DDE 495
DNP3 501
IEC 60870-5 545
IEC 61850 610
Configuring an IEC 61850 network 618
Adding a Physical Device to a IEC 61850 network 623
Adding a Data Report to an IEC 61850 device 631
Mapping IEC 61850 objects to variables 636
LonWorks 649
OPC 660
Configuring a connection to an OPC server 664
Configuring an OPC group 671
SNMP 681
Adding an SNMP network 690
Adding a device to an SNMP network 694
Mapping SNMP items to the Variables Tree 698
Mapping to an SNMP trap 704
Networked applications 715
Using the Application Explorer to configure the network architecture 725
Configuring stations 733
Using the Network Wizard to configure the network architecture 745
Without remote desktop session host server 747
With remote desktop session host server 754
Using redundant configurations - Associations 768
Using redundant configurations for real-time data 770
Network status variables 777
Architecture examples 790
Servers 796
Web & Mobile back ends 799
IEC 60870-5-104 Server 808
Adding an outstation to the IEC 60870-5-104 Server 812
Adding a sector to an IEC 60870-5-104 outstation 817
OPC Server 846
Mobile Server 852
Variables 858
Managing variables using the Application Explorer 859
The Variables Tree 871
Overview 872
Configuring variables 883
Configuring variables in general 884
Features specific to alarm variables 900
Associating behavior with a variable 904
Linking a variable to its source 917
Linking a variable to a BACnet object 919
Linking a variable to a DNP3 source 929
Linking a variable to a LonWorks variable 943
Linking a variable to an SNMP source 949
Linking a variable to a Sql Variables source 955
Population filters 971
The Expression Engine 976
Alarm synthesis (formerly group alarm) 994
Formulae 1001

-2-
Algorithms 1005
Recipes 1012
Configuring a recipe 1014
Using ODBC with Recipes 1021
Vartreat - special variable behaviors 1024
System variables 1034
Archives 1062
Using the Historic Data Server to record data 1067
The HDS configuration files 1070
Tracing problems with the HDS 1075
Using the C-CURE Building Management System's native data recording 1082
Configuring archive units 1085
Database archive unit 1091
Configuring log data recording 1093
Configuring trend data recording 1097
Proprietary archive unit 1105
Configuring a proprietary archive unit 1106
Backing-up and restoring archive unit files 1109
Advanced information about proprietary archive units 1113
Configuring log data recording 1117
Configuring trend data recording 1125
Configuring reports recording 1134
Other archive unit types 1141
Free archive unit 1143
ODBC archive unit 1148
Configuring databases 1159
Configuring a database 1164
Configuring the database tables 1169
Database maintenance 1176
Task scheduler 1186
Configuring triggers 1192
The trigger properties dialog 1194
Using the database creation wizard 1200
Using client-server archive units 1207
Actions 1215
Message profiles and templates 1218
Event actions 1227
Configuring an event to run a program 1231
Configuring an event to send a message 1233
Cyclic actions 1243
Scheduled actions 1248
Function keys 1256
User accounts 1261
Configuring users 1268
Configuring profiles 1271
Profile properties according to usage 1275
Using the advanced security strategy 1284
Using Windows domain user groups 1290
Data analysis (Data export) 1299
Configuring Data Export 1308
Adding pages to a Data Export 1315
Adding a trend page 1316
Adding a log page 1324
Generating the output 1332
Printing 1341
Printing graphics 1343
Printing Text 1347
Libraries 1355

-3-
Geographical data 1363

-4-
Project diagnostics & settings

-5-
Project Settings Overview
The Project Settings dialog collects together properties that affect the general operation of a project in one
convenient tree style dialog. Project Settings are accessed from the Application Explorer by selecting the top-
most folder in the configuration tree and using the Settings task. The properties are arranged in groups that,
in general, correspond to the main items in the configuration tree. Show picture

l Station startup - The behavior of the station at startup.


l Languages - Language selection.
l Settings - Languages parameters configuration.
l Default languages - Default languages for a new project.
l Advanced
l Variables
l Archives - Historical data recording.
l Programs - Programing environments and execution.
l Recipes
l Actions - SMS and Email, events and cyclics.
l User accounts - Including Active Directory integration.
l Communication - Including Data Acquisition, Networking, server interfaces (Web & Mobile back
ends, OPC server, Mobile server and IEC 104 outstation) and flow regulation.
l Printers
l Application Architect
l Compatibility - Compatibility of projects developed with earlier versions of the software.
l Miscellaneous
l Audit diagnostics

-6-
Station Startup
The Station Startup settings are displayed from the Application Explorer's main settings dialog. Show picture

Automatically displaying the first window


Nearly all applications automatically display a window after C-CURE Building Management System has star-
ted. The window provides an entry point for the application - a typical use is a menu or a plant overview. To
automatically display a window on startup:

1. Tick the First window box.


2. Select the mimic name from the Mimic drop down list box.
3. Select or enter a database branch for use with the mimic.

Running user (SCADA Basic) programs on startup


If your project includes programs written in SCADA Basic you must arrange for them load and run when the
project starts. Using the project start-up dialog you can select up to five programs.

l Declarations - The name of the declarations program, which contains common declarations and sub-
routines. If you run any SCADA Basic programs, you must also specify a declarations program (com-
monly called global.svb) See the book on programming for more information.
l Programs before initialization - The name of up to two SCADA basic programs that will be run before
variables are initialized.
l Programs after initialization - The name of up to two SCADA basic programs that will be run after vari-
ables are initialized.

To enable the running of programs at start-up you must tick the box Run user programs.

What is initialization?
At the start of C-CURE Building Management System, each variable subscribes to its configured source
(internal, equipment, DDE, OPC, LNS, BACnet etc.). The component responsible for that source will, one by
one, reply to the variable subscriptions with either a valid value or an invalid status. (An invalid status may
occur for a variety of reasons, for example a failure in industrial communication.) When this process is com-
plete, variable initialization is said to be finished even if one or more of the variables have an invalid status.
Therefore, even programs that are started after initialization must be designed in such a way that erroneous
operation does not occur if any variables to which they refer are invalid.

Starting communication
To start native communication drivers and DDE exchanges at start-up you must tick the corresponding
boxes. Whilst developing a project it is often convenient not to start communication or DDE exchanges auto-
matically in which case they can be started manually from the communication and DDE configuration dia-
logs.

-7-
Languages

-8-
Languages Overview
C-CURE Building Management System menus and dialogs are bilingual. The two languages that are available
are chosen as part of the project configuration using the Language Parameters dialog. The actual language
in use can be selected, from the two that were chosen, using the following methods.

l During development.
l Using the Selected display language property in the Languages dialogs. You can select either
Configuration 1 or Configuration 2. Show picture
l From the Languages option in the configuration menu. The languages that appear are those
selected using the Project language property in the Languages Parameters dialog.
l At run time.
l Using the Languages animation.
l Using a script written in one of the programming languages (SCADA Basic or VBA).

The development menus and dialogs are available in the following languages.

l Chinese (Simplified)
l Chinese (Traditional)
l English
l French
l German
l Italian
l Japanese
l Latvian
l Russian
l Spanish
l Portuguese
l Polish

In addition, if you tick Enable bilingual text strings, text strings that you enter as part of the project con-
figuration become bilingual. For each text string that you configure (Text drawing element in a mimic,
description property of a variable etc.) you can enter two strings. At run-time, which of the two strings that
is displayed depends on the language that has been selected for the menus and dialogs.
Text strings that you enter as part of the project configuration do not have an explicit language. If you select
the language corresponding to Configuration 1 then the first of the two text strings is displayed. If you select
the language corresponding to Configuration 2 then the second of the two text strings is displayed.

What is the Archives Language property used for?


The Archives Language property selects which of the display languages is used for any strings recorded by
C-CURE Building Management System archive units.

-9-
Languages Settings
The Languages Settings dialog manages the two language configurations. Each configuration includes lan-
guage plus other culture related properties and are known as Configuration 1 and Configuration 2. Show pic-
ture

The following settings are available for each of the two configurations.

l Project language - The language that you assign to the project. The Project Language is just a label
having no operational effect other than it is displayed when selecting a language using the Language
animation or the configuration menu. Show picture

l Display language - The language used for C-CURE Building Management System configuration menu
and dialogs. Selected from one of the languages listed in the topic Language Overview, or [Same as
project]. If you choose [Same as project], the software will attempt to select the language, from
those that are supported, that is closest to the project language. For example, if the Project Language
were French (Belgium) it would select French as the Display Language. If it is unable to determine a
language, it will default to English.
l Calendar
l First day of the week - The day that is considered the first of the week. Used by Data Export.
l First week of the year - The method used to determine the first week of the year. Used by Data
Export. The following options are available.
l Week containing January 1st.
l First full week.
l First week with four or more days.
l Date and time formats
l Custom format for date - A custom format for display of the date. Used by Data Export. You can
select one of the pre-configured formats or enter your own. The following format characters are
recognized.
M - The month from 1 to 12.
MM- The month from 01 to 12.
MMM - Month as a three character abbreviated name.
d - The day of the month from 1 to 31.
dd - The day of the month from 01 to 31.
yy - The year from 00 to 99.
yyyy - The year as four digits.
Any other characters are interpreted literally.

- 10 -
l Custom format for time - A custom format for display of the time. Used by Data Export. You can
select one of the pre-configured formats or enter your own. The following format characters are
recognized.
h - The hour using a 12-hour clock from 1 to 12.
hh - The hour using a 12-hour clock from 01 to 12.
H - The hour using a 24-hour clock from 0 to 23.
HH - The hour using a 24-hour clock from 00 to 23.
mm - The minute from 00 to 59.
fff - The millisecond from 0 to 999.
tt - The AM/PM designator.
Any other characters are interpreted literally.

- 11 -
Default Languages
The Default Languages dialog is used to select the language in use at startup, and for a new project. Show
picture

l Startup language - The language used by C-CURE Building Management System for any dialogs and
menus that are displayed before the project is loaded. For example, the Select Project dialog.
l Configuration 1 and Configuration 2 - The initial language settings when a new project is created.

- 12 -
Advanced

- 13 -
Variables Settings
The variables settings can be displayed from the Variables entry in the Application Explorer's Main settings
dialog or from the Settings task when the Variables folder is selected in the Application Explorer's con-
figuration tree. Show picture

l Persistence
l Save period for variables - The period at which variables with the Saved property enabled are
persisted on hard disk. The default is 1 minute.
l Internal variables
l Internal variable initialization - Defines the default initial value for internal bit and alarm vari-
ables. Can be overridden on a per variable basis.
l Initial value for internal bits
l Invalid - Internal bits are by default set to invalid.
l To 0 - Internal bits are by default set to 0.
l To 1 - Internal bits by default all set to 1.

- 14 -
l Initial value for internal alarms
l Invalid - Alarms are by default set to invalid.
l Alarm off - Alarms are by default set to off.
l Alarm on - Alarms are by default set to on.
l Behavior
l No producer list assigned behavior - The following two options only affect variables that
have not been assigned to a producer list.
l Local association - The saved value behaves normally.
l User context - The saved (and restored) value is dependent on the User that is
logged on. See the book Deploying C-CURE Building Management System on a
Remote Desktop Session (RDS) Host for more information.
l Permanent scan
l Permanent scan for all variables – Causes C-CURE Building Management System to permanently
scan all communication frames linked to one or more variables. If this property is not selected
then the scanning can be disabled if none of the variables linked to it are displayed in a window.
l Invalidate variable if no scan for mimic – When a communication frame is not scanned because
none of the linked variables are displayed in a mimic, all the linked variables are set to invalid.
l Attributes and properties
l Extended attributes – Enable the extended attributes for all inventory variables.
l Binary attribute
l Behavior
l Static - The attribute value can only be changed using the variable configuration dia-
log.
l Dynamic - The attribute can be changed at run-time using the SCADA Basic instruc-
tion VARIABLE.
l Distributed - When used in a multi-station project, changes in the value of the attrib-
ute are propagated to all interested stations.
l Commandable - The value of an attribute can be changed by any of C-CURE Building Man-
agement System sub-systems that have access to it.
l Command level - The command level that the User must have in order to write the
attribute value.
l Browsing level -The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Persistent - The value of the attribute is saved when C-CURE Building Management Sys-
tem is shut down and restored when it is restarted. The variable itself must be configured
to be Saved for this setting to take effect.
l Text attribute 3 (to 16)
l Behavior
l Static - The attribute value can only be changed using the variable configuration dia-
log.
l Dynamic - The attribute can be changed at run-time using the SCADA Basic instruc-
tion VARIABLE.
l Distributed - When used in a multi-station project, changes in the value of the attrib-
ute are propagated to all interested stations.
l Commandable - The value of an attribute can be changed by any of C-CURE Building Man-
agement System sub-systems that have access to it.
l Command level - The command level that the User must have in order to write the
attribute value.
l Browsing level -The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Persistent - The value of the attribute is saved when C-CURE Building Management Sys-
tem is shut down and restored when it is restarted. The variable itself must be Saved for
this setting to take effect.
l Simulated property
l Behavior
l Distributed - When used in a multi-station project, changes in the value of the prop-
erty are propagated to all interested stations.

- 15 -
l Commandable - The value of the simulated property can be changed by any of C-CURE
Building Management System sub-systems that have access to it.
l Command level - The command level that the User must have in order to change
this property.
l Browsing level -The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Persistent - The value of the property is saved when C-CURE Building Management Sys-
tem is shut down and restored when it is restarted. The variable itself must be Saved for
this setting to take effect.
l Thresholds
l Behavior
l Trigger on strict going beyond of the threshold - The threshold bit is only set if the
register value exceeds that of the threshold. Else the threshold bit is set if the value
exceeds OR equals the threshold.
l Commandable - The value of a threshold can be changed by any of C-CURE Building Man-
agement System sub-systems that have access to it.
l Command level - The command level that the User must have in order to write the
threshold value.
l Browsing level - The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Expressions
l Do not make expression result invalid when a member is invalid - Do not make expression res-
ult invalid when a member is invalid. The invalid member is assumed to be 0.
l Alarms
l Alarm acknowledge of both ON and OFF status change - If selected an alarm must be acknow-
ledged on the transition to both the on state and the off state. Show picture

l Enable the end of maintenance when alarm is On Ack - Allows an alarm to be taken out of main-
tenance even if it is on and acknowledged. By default, an alarm can only be taken out of main-
tenance when it is off.
l Enable alarm timestamp modification on its acknowledgement - Enable the timestamp of an
alarm to be modified to that of when it was acknowledged. By default, it is the time at which it
came on or went off.
l Domain/nature separator for alarm counter - The character used to separate domain and nature
in the name of a variable used as an alarm counter. By default, the separator is _ (underscore).
l Alarm priority
l Behavior
l Static - The property value can only be changed using the variable configuration dia-
log.
l Dynamic - The property can be changed at run-time using the SCADA Basic instruc-
tion ALARM.
l Distributed - When used in a multi-station project, changes in the value of the prop-
erty are propagated to all interested stations.
l Commandable
l Use alarm priority as command level - For alarms with the Command attribute set, use
the alarm level as the command level.

- 16 -
l Write
l Send write request even if the value to write is the same as the current value - If enabled, a
write request is made when the variable value is forced, even if the variable already has that
value.
l Status
l Display value even if out of range - Allows a register variable's value to be displayed even if its
quality is flagged as out of range (NS L< or NS L>). Applies to animations that display the
register value, the Trend Viewer when in real time mode, and the Trend Viewer in historical
mode if the historical data source is the HDS.

Settings named Browsing level define the browsing level that the User Account must have in order to
see the variable (items) when using a browsing service of C-CURE Building Management System.
See the topic Properties that affect access by 3rd party applications for further information about
interfaces for which this privilege is enforced.
See the topic Using the Authentication Option for further information about OPC Security.

- 17 -
Archives Settings
The archives settings can be displayed from the Archives folder in the Application Explorer's Main settings
dialog or by using the Settings task when the Archives is selected in the Application Explorer's configuration
tree. Show picture

l Log only log alarm on/off changes in log lists - Selecting this property causes the acknowledged con-
dition of an alarm to be ignored - see explanation below. You must restart C-CURE Building Man-
agement System after changing this property before it takes effect.
l Storage folder for archive units - Select the location of the folder used for proprietary, ODBC and VCR
archive units. You must restart C-CURE Building Management System after changing this property
before it takes effect.
l Default - Use the default folder (the TH folder of the project).
l Custom folder - Enter and use a specific folder. You can only use an absolute path, relative paths
are not allowed. The folder must always be accessible. The default setting is the TH folder of the
project.
l Proprietary archive units
l Secure records to prevent tampering - Adds a CRC (Cyclic Redundancy Check) to proprietary
format archive units to protect the data from being tampered with.
l Trend recording fast exit - Reduces the time taken to flush the trend recording buffers to hard
disk on shutdown by writing all the data in one shot. The disadvantage of this method is that it is
more prone to data loss should there be any problems during shutdown.
l Trend recording mode
l On change - Enable on-change (exception) trend recording. The trend Period property is used as
a time filter. Applies to the entire project.
l Force one record per period - Enable periodic trend recording. The trend Period property is used
as a sampling period. Applies to the entire project.

Using the Only log alarm on/off changes property


Selecting this property causes the acknowledged condition of an alarm to be ignored as follows.
Alarm state Logged as
On, On - Not Ack. and On - Ack On
Off and Off - Not Ack. Off
Unavailable Unavailable
Selecting this property changes the behavior of the Log Viewer and the appearance of the log list Event Filter
tab but it does not change the operation of the Alarm Viewer. Show picture

- 18 -
C-CURE Building Management System must be restarted after changing this property before it takes
effect.

- 19 -
Program Settings
The program settings are displayed from the Programs entry in the Application Explorer's Main settings dia-
log. The program settings affect the operation of the programing environments and operation within C-CURE
Building Management System. Show picture

l SCADA Basic
l Program infinite loop threshold - The maximum period for which a SCADA Basic program can
run continuously before it is stopped. Used to prevent infinite loops in SCADA Basic programs.
The default value is 30 seconds.
l Message on discarded function in a program with delay - Display an error message if a program
is called again whilst still executing a delay instruction from the previous call.
l Only log program errors once in the Event Viewer – Repetitive errors appearing in the trace win-
dow from program language are only logged once after which they do not appear again until C-
CURE Building Management System is restarted or the trace window is cleared.
l Use register variables as double in SCADA basic script – Treats register variables as type double
(normally type single) in a SCADA BASIC script.
l Working variables scope control - See the Working Variables topic in the SCADA Basic book for
full information on the behavior.
l Strict control - Use strict control for the scope of SCADA Basic variables. This is the
default setting for new projects.
l Legacy control with warning - As below but with additional warning messages when the
rules enforced by Strict Control are broken.
l Legacy control - Use the rules for the scope of SCADA Basic variables that were used prior
to version 11.2. This is the default setting after migration of existing projects.
l No message on temporary variable creation – Disables the message that is normally displayed when
temporary variables are created.

- 20 -
Recipe Settings
The recipe settings can be displayed from the Recipes entry in the Application Explorer's Main settings dialog
or from the Settings task when the Recipes folder is selected in the Application Explorer's configuration tree.
The recipe settings affect the general operation of the recipe system within C-CURE Building Management
System. Show picture

l Enable overwriting recipes by program – Allows the SCADA Basic recipe instruction to overwrite exist-
ing recipes.
l Send recipe even if a variable is unavailable – Allows a recipe to be sent even if one of the variables is
invalid or does not exist.
l User action log mode
l Log write actions for all variables except internal - When the recipe is sent the change in value
of variables is logged. (Except for internal variables)
l Write actions are not logged - When the recipe is sent the change in value of variables is not
logged.
l Maximum number of variables in a recipe - The maximum number of variables that can be configured
in a recipe. Default 2000.

- 21 -
Actions Settings
The actions settings can be displayed from the Actions folder in the Application Explorer's Main settings dia-
log or by using the Settings task when the Actions folder is selected in the Application Explorer's con-
figuration tree. Show picture

l Messages
l Email - See the Settings topic in the Message Profiles and Templates book.
l SMS - See the Settings topic in the Message Profiles and Templates book.
l Events - See the Settings topic in the Event actions book.
l Cyclics - See the Settings topic in the Cyclic actions book.

- 22 -
User Accounts Settings
The User Accounts settings are displayed from the Settings task when the User Accounts folder is selected in
the Application Explorer's configuration tree. Show picture

l Encrypt user accounts configuration file - Encrypt the User Accounts configuration file so that it cannot
be read with a text editor.
l Use the advanced security strategy - See the topic What is the Advanced Security Strategy for more
information.
l Number of login attempts - The number of login attempts before an account is locked. Range 1
to 10. Default 3.
l Enable networking-dependent profile association - Enable User Accounts to use different profiles
depending on which station the account is being used.
l Built-in user accounts directory
l Impose strong password - Force the use of a strong password. See the topic Choosing a Strong
Password for more information.
l 'Display name' property - Select the manner in which the Display Name is constructed from the
First Name and Last name properties.
l External user accounts directory
l Enable connection to the Microsoft Windows® directory - Enable the configuration of user
accounts using Windows User Group users. See the topic Using Windows Domain User Groups
for more information.
l Auto logon with current user - If activated, the current Windows user is automatically logged in
to C-CURE Building Management System at startup if it is allowed to (matching Windows user
groups/profile). If it is not, the login dialog box is displayed.
l Account properties update
l Display name - use the Full Name property from the external user account as C-CURE
Building Management System Display Name property.
l Description - Use the Description property from the external user account as C-CURE Build-
ing Management System Description property.
l Title - Use the Job title property from the external user account as C-CURE Building Man-
agement System Title property.
l Mobile phone number - Use the Telephone number property from the external user
account as C-CURE Building Management System Mobile phone number property.
l E-mail address - Use the Email address property from the external user account as C-
CURE Building Management System E-mail address property.
l Directory connection
l Domain name - Allow authentication of Users on a specific domain.
Defaults to empty to indicate that users should be authenticated against the domain to
which the computer belongs.
Set a value corresponding to a domain name if you need users to be authenticated against

- 23 -
another specific domain.
l Domain controller name - For large networks the domain can have several controllers.
This setting allows the selection of a specific controller (normally the fastest). In some
projects, this can bring significant performance improvements.
Defaults to empty to indicate that the first available Domain Controller will be used.
Set a value corresponding to a Domain Controller name if you need the authentication fea-
ture to rely on a specific Domain Controller.
l Logon type - Depending on the security strategy of the domain, some logon types do not
work. Do not cache the credentials requires a weaker strategy than Cache the credentials.
Cache the credentials, when allowed by the domain, allows a User to logon to a computer,
if he had already done so in the past, even if the controller is not accessible (LOGON32_
LOGON_INTERACTIVE).
Do not cache credentials is intended for high performance servers to authenticate with
plaintext passwords and does not cache credentials (LOGON32_LOGON_NETWORK).
l Buffer size to retrieve information - The size of the buffer used to retrieve the con-
figuration of the domain controller (list of user groups...). When a large number of user
groups are declared in the domain controller, increasing the value of this property can
help to improve performance if the Domain Controller is set accordingly. Range 1 to 1000
- Defaults to 100.

If the Domain controller name is left empty, C-CURE Building Management System will use the first
accessible domain controller as evaluated by the local Windows host operating system.

- 24 -
Communication Settings
The communications settings are displayed from the Communications entry in the Application Explorer Main
settings dialog or from the Settings task when the Communications folder is selected in the Application
Explorer configuration tree. The communications settings affect the operation of Data Acquisition, Network
applications, and C-CURE Building Management System server interfaces. Show picture

l Data acquisition - See the topic Data acquisition settings


l Networking - See the topic Networking settings
l Servers - See the topic Servers settings
l Regulation - See the topic Data Flow Regulation Settings.

- 25 -
Printers Settings
The printers settings are displayed from the Printers entry in the Application Explorer's Main settings dialog.
The printer settings affect the operation of packet printing within C-CURE Building Management System.
Show picture

l Printing period - The period between packets of messages sent to the printer.
l Number of lines per period - The maximum number of lines in each packet of messages.

These properties determine the maximum rate at which C-CURE Building Management System prints to a
line (text) printer if the Packet printing option was selected in the printer configuration. For example if the
printing period was set to 5 (seconds) and the number of lines per period was set to 10, C-CURE Building
Management System will be able to print up to 10 lines once every 5 seconds. The properties are used to
avoid congestion in the printing mechanism when attempting to print an excessive number of lines - for
example on recovery from a communication failure.
This option is included for compatibility only as the packet printing mechanism has been superseded by C-
CURE Building Management System print spooler.

- 26 -
Compatibility Settings
The compatibility settings are displayed from the Compatibility entry in the Application Explorer's Main set-
tings dialog. The settings affect the compatibility of projects developed with earlier versions of the C-CURE
Building Management System software. Show picture

l Configuration files
l Variables
l Write the variables persistence files in the PER directory (saved.dat and alarmsaved.dat)
- Store the persistence files in the PER directory instead of the C directory.
l Auto-number internal identifiers - If enabled, the tagnames associated to variables are
numbered automatically at start-up. This setting must not be enabled if the project takes
advantage of the legacy report feature.
l VAREXP.DAT format
l Use 6 + 1 fields for storing variable names - The six additional branches available
from version 10 onwards are stored in a single (spare) field. The format is com-
patible to that of earlier versions of C-CURE Building Management System.
l Use 12 fields for storing variable names - The six additional branches available from
version 10 onwards are stored in six new fields with all fields to the right of them
shifted six places. The format is not compatible with that from earlier versions of C-
CURE Building Management System.
l Archives
l Proprietary, free and ODBC log lists recording
l Record only loaded variables and local actions (Execute program and Logon/Logoff)
- Allow you to control the behavior of log list recording in networked architecture. If
selected, only those events having their origin on the local station (archive pro-
ducer) are recorded.
l Record all variables and local actions (Execute program and Logon/Logoff) from any
stations - Allow you to control the behavior of log list recording in networked archi-
tecture. If selected, all events are recorded, those originating from the local station
(archive producer) and also those coming from other stations.
l Scheduler
l Delete temporary schedules when reloading the Cron.dat file – If enabled, all Cron items
are deleted upon reload, even those created dynamically via a SCADA Basic script. Other-
wise, only those coming from the configuration file being reloaded are deleted.
l Syntax
l Format separator (first and second languages) - The character used to separate the format of
the first and second language when used with text variables.
l Mimics and symbols
l Limit substitution of the 6 first branch levels – Support for mimic & symbol branch sub-
stitution characters up to 6 branch segments only (#1 to #6, #B1 to #B6, #S1 to #S6…).
Those greater than 6 are interpreted as plain text and not as substitution string.
l Substitution of the 12 branch levels - Support for mimic & symbol branch substitution char-
acters up to 12 (#1 to #12, #B1 to #B12, #S1 to #S12…). Those between 7 and 12 are
not interpreted as plain text but substituted.

- 27 -
l Variable naming
l Space allowed at end of variable name - Variable names are allowed to end with a space
character.
l Number allowed at start of variable name - Variable names are allowed to start with a
number.
l Syntax check
l Enable - If selected, the syntax check for variable names is enforced: Alphanumeric char-
acters plus dollar ($), star (*), full stop (.), underscore (_), plus the character specified
for the Domain and Nature separator accepted.
l Enable - No checking at loading time - If selected, the syntax check for variable names is
enforced upon configuration change, but no verification is done at loading time.
l Disable - If selected, the syntax check for variable names is not enforced.
l Associated labels
l Allow use of mismatched label type - If enabled, it is possible to use alarm associated labels
with Bit variables.

- 28 -
Miscellaneous Settings
The miscellaneous settings are displayed from the Miscellaneous entry in the Application Explorer's Main set-
tings dialog. Show picture

l Configuration files
l Configuration backup (files) - The number of previous versions of configuration files that are
kept. Previous versions are stored in the project folder CTEMP\BAK.
l Check configuration files – The database configuration file is checked for errors as it is loaded
and any errors are reported in the file FORM.ERR.
l Merge communication objects – The communication frames are renumbered each time C-CURE
Building Management System is started.
l Enable reading PARAM.DAT from LIB – The global library directory (LIB in the project root) will
be searched for a PARAM.DAT file. Any parameters found in the file will be used together with
those in the normal PARAM.DAT (in the project’s C directory). When C-CURE Building Man-
agement System is shut down, all parameters are saved in the normal PARAM.DAT.
l Enable configuration change recording in MDF.DAT in the PER folder - If enabled, the MDF.DAT
file is stored in the PER folder of the project instead of the C folder.
l Configuration interfaces
l Reference number in old dialog box title – Displays a unique reference number in each dialog
box.
l Graphics
l Cache size - The number of windows that may be cached in memory at any one time. Windows
that are cached in memory will open more quickly than those from hard disk. The maximum
number of windows that may be cached is 999. Each cached window takes a significant amount
of memory (a simple window taking about 100 Kb of memory and a complex window, or one
using large bitmaps, 300 Kb or more) and this must be taken into account when specifying this
property.

- 29 -
Audit & Diagnostics Settings
Audit file configuration
The number of audit files and the frequency at which they are created can be configured using the following
properties. Show picture

l Rotating files
l Number of rotating audit files - The maximum number of audit files that can exist at any one
time in the Log Files folder. When the limit is reached, each time a new audit file is created the
oldest file is discarded. The default value is 1000, minimum value = 100 and maximum value =
9999.
l Write period for the Audit.Coumtersxxxx.txt files - The period at which each new general audit
file is created. The default value is 30 minutes, minimum value 1 minute, maximum value 24
hours.
l Audit Specific Counters period - The period at which each new memory specific audit file is cre-
ated. The default value is 10 minutes, minimum value 1 minute, maximum value 24 hours.
l Trace files
l Max size for the Trace.Log file - The maximum size of the Trace.Log file in megabytes. When the
file reaches this size, it is backed up and a new file is created.
l Max size for the MacroTrace.log file - The maximum size of the MacroTrace.Log file in mega-
bytes. When the file reaches this size, it is backed up and a new file is created.
l Dump files
l The maximum number of dump files that are persisted at any one time in the Log Files folder (in
addition to the last one). When the limit is reached, each time a new dump file is created, the
oldest file is discarded. The default value is 2 for large dumps (max 9) and 9 for small dumps
(max 20). Because dump files can be large, it is not recommended to use a large value, in par-
ticular for large dump files.

Enabling the audit system variables


If you want to use any of the audit system variables in the application, they must be enabled using the Sys-
tem Variables tab of the Audit Settings dialog. For each variable, you can use the default name or choose
your own. The Create all system variables tick box can be used to create all the variables, but before you do
this you should consider the impact on system performance. (There are over 1000 variables.) Show picture

- 30 -
Audit & diagnostics

- 31 -
Audit Overview
The Audit Dialog contains information about the internal operation of C-CURE Building Management System.
Its main use is as an aid to diagnose unexpected or erroneous behavior, but it can also be used to check the
general "health" of a project. The information comes from the executables (.exe) from which C-CURE Build-
ing Management System is composed, and the individual managers contained therein. The Audit Dialog con-
tains two tabs.

l Counters
l Objects - System resource and configuration object counters.
l Instance - Counters of messages between C-CURE Building Management System managers and
the memory that has been allocated.
l Time - The time spent processing the messages for each manager.
l Flow - Data flows associated with the change of real-time value of variables in the Variables
Tree.
l Monitoring - Detailed information about the data flows associated with the change of real-time value
of variables in the Variables Tree presented in a graphical format. Two graphics are available, one
that shows information about data acquisition (incoming data) and the other about data commands
(outgoing data).

The information from the Counters Tab is also dumped in text files that can be found in the Log Files folder.
For more information, see the topic Audit Files.
The information from the Flows tab is also available in system variables. These variables must be enabled in
the Audit Configuration dialog before C-CURE Building Management System creates them. For more inform-
ation, see the topic Audit system variables.

The Audit dialog can be opened using any of the following methods.

l From the Application Explorer. Select the Project node in the configuration tree and select the Audit
Diagnostics task in the left pane.
l From the keyboard. Function key F4 opens the About dialog from where you can open the Audit dialog
by clicking the Diagnostics button.
l From the event viewer, by using the Audits... command on the menu.

When accessing the Audits from the About dialog, an intermediate dialog is first opened with several
buttons. Each button opens a separate instance of the Audit dialog. The configuration (size, position,
options) of each instance of the Audit dialog is saved when it is closed and subsequent uses of same
button will open the Audit dialog with the same configuration. You can also configure a caption for
each button that is then displayed in the Audit dialog title bar. Show picture

- 32 -
Audit & Diagnostics Settings
Audit file configuration
The number of audit files and the frequency at which they are created can be configured using the following
properties. Show picture

l Rotating files
l Number of rotating audit files - The maximum number of audit files that can exist at any one
time in the Log Files folder. When the limit is reached, each time a new audit file is created the
oldest file is discarded. The default value is 1000, minimum value = 100 and maximum value =
9999.
l Write period for the Audit.Coumtersxxxx.txt files - The period at which each new general audit
file is created. The default value is 30 minutes, minimum value 1 minute, maximum value 24
hours.
l Audit Specific Counters period - The period at which each new memory specific audit file is cre-
ated. The default value is 10 minutes, minimum value 1 minute, maximum value 24 hours.
l Trace files
l Max size for the Trace.Log file - The maximum size of the Trace.Log file in megabytes. When the
file reaches this size, it is backed up and a new file is created.
l Max size for the MacroTrace.log file - The maximum size of the MacroTrace.Log file in mega-
bytes. When the file reaches this size, it is backed up and a new file is created.
l Dump files
l The maximum number of dump files that are persisted at any one time in the Log Files folder (in
addition to the last one). When the limit is reached, each time a new dump file is created, the
oldest file is discarded. The default value is 2 for large dumps (max 9) and 9 for small dumps
(max 20). Because dump files can be large, it is not recommended to use a large value, in par-
ticular for large dump files.

Enabling the audit system variables


If you want to use any of the audit system variables in the application, they must be enabled using the Sys-
tem Variables tab of the Audit Settings dialog. For each variable, you can use the default name or choose
your own. The Create all system variables tick box can be used to create all the variables, but before you do
this you should consider the impact on system performance. (There are over 1000 variables.) Show picture

- 33 -
The counters tab

- 34 -
Description of the Counters Tab
The Counters tab contains four sets of counters. The display of each set is enabled by the corresponding tick
box at the top of the tab.

l Object - System resource and configuration object counters. Used in conjunction with the instance
counters to assess the size of the project, detect memory leaks and run-time overflows. See the topic
Object counter descriptions.
l Time - Manager watchdogs and executable process timers. Used to detect when the project is remain-
ing too long processing information in a particular manager. See the topic Time counter descriptions.
l Flow - Data flow counters associated with the change in variable values. Used to monitor data acquis-
ition, data commands, trend recording, and for detecting run-time overflow. See the topic Flow
counter descriptions.
l Instance - Counters of the number of Variables, Alarms and Expressions and messages between man-
agers. Used in conjunction with the object counters to assess the size of the project, detect memory
leaks and run-time overflows. See the topic Instance counter descriptions.

Each set of counters is broken down further into a number of groups. The groups can be expanded or hidden,
as required, using the arrow tool found on the far right hand side of the title of each group. Show picture

- 35 -
To reduce the amount of information displayed in the Audit dialog any of the time, flow and instance
counters, for which all values are zero when the dialog is opened, are hidden. If, subsequently, they
become non-zero you must use the Refresh button to reveal them.

- 36 -
Object Counters
Each object counter includes the current value, the minimum value, the maximum value and average value.
By default, the average is calculated over a 30-minute period. Show picture

Global memory in station


The total conventional memory available in one computer. Does not include virtual memory or other forms
of memory expansion.
Object Definition
Total physical memory (in The total amount of memory (RAM) installed on a computer.
KB)
Free physical memory (in The amount of free memory available in a computer. This is the amount of phys-
KB) ical memory that can be immediately reused without having to write its contents
to disk first. It is the sum of the size of the standby, free, and zero lists.
RAM usage (in %) The percentage of used memory in a computer.

Memory usage in C-CURE Building Management System process


Memory in use by the main process (Sv32.exe), excluding that used by the other processes.
Object Definition
Private bytes (KB) The size of allocated memory.
Working set (KB) The set of pages in the virtual address space that are currently resident in phys-
ical memory.
Total virtual memory (in The size of the user-mode portion of the virtual address space. This value
KB) depends on the type of processor, and the configuration of the operating system.
This value is approximately 4 GB for a 64-bit operating system.
Free virtual memory (in The amount of unreserved and uncommitted memory currently in the user-mode
KB) portion of the virtual address space.

Memory usage in the HDS process


Memory in use by the HDS process (Hds.exe).
Object Definition
Private bytes (in KB) The size of memory that the HDS has allocated.
Working set (in KB) The set of pages in the virtual address space of the HDS that are currently res-
ident in physical memory.

- 37 -
Handles and threads in the Sv32 process
Handles and threads used by the main executable (Sv32.exe).
Object Definition
Handles The number of handles used by the process. A handle is a reference to a block of
memory in use by the process.
Total threads The total number of threads used by the process.
Free threads in pool The number of unused threads remaining in the SV thread pool and available to
the Sv32 process.
Used threads in pool The number of threads currently in use by the Sv32 process in the SV thread
pool.
Free Web threads in pool The number of unused threads remaining in the Web thread pool and available to
the Sv32 process.

Handle leak detection in the Sv32 process


A handle leak is when the Sv32 process asks for a handle to a resource but the handle is not freed when the
resource is no longer used.
Object Definition
Released thread handles The number of thread handles released by the thread pool processing. See sec-
tion [HANDLELEAK] and property ReleaseThreadHandleLeak in sv32.ini

Handles and threads in the HDS process


Handles and threads used by the HDS process (Hds.exe).
Object Definition
Handles The number of handles used by the process. A handle is a reference to a block of
memory in use by the process.
Total threads The total number of threads used by the process.

Graphic object counters


The Graphics object counters.
Object Definition
GDI objects The number of GDI objects currently in use.
GDI are system-level objects and represent graphical device interface
resources like fonts, bitmaps, brushes, pens, and device contexts (drawing sur-
faces).
USER objects The number of USER objects currently in use.
USER objects are system-level objects and get their name from the fact that
they represent user interface elements like windows, menus, cursors, icons,
and accelerator tables (menu keyboard shortcuts).
Displayed mimics The number of mimics currently opened.

Counters of variables
Counters of variables, configuration objects and actual runtime objects, according to the source of their
real-time value:

l Internal
l External
l Equipment
l OPC
l DDE
l LNS
l BACnet
l IEC 60870-5
l IEC 61850

- 38 -
l DNP3
l SNMP Manager

Counters of variables according to if they have the following properties set are also available:

l Deleted
l Inhibited
l Simulated
l Saved (permanent)
l Broadcast
l Extended attributes enabled
l Initialization value
l Permanent scan for mimics - None
l Remote access

Miscellaneous variable counters


Object Definition
Unloaded variables The number of variables that are configured, but neither produced nor con-
sumed.

Networking counters
Counters associated with multi-station architecture.
Object Definition
Number of OK server con- The current number of OK server connections to the local station.
nections
Number of OK client con- The current number of OK client connections to the local station.
nections
Number of allocated thread The number of threads being used to manage all connections.
Allocated server object The number of allocated server connection objects.
Allocated client objects The number of allocated client connection objects.
Deleting server objects The number of server connection objects in the Deleting state.
Deleting client objects The number of client connection objects in the Deleting state.
Cumulative OK server con- The total number of OK server connections that have been made to the local sta-
nections tion since the project started.
Cumulative OK client con- The total number of OK client connections that have been made to the local sta-
nections tion since the project started.
Size of send buffer (in The current size of the networking send buffer.
bytes)
Size of receive buffer (in The current size of the networking receive buffer.
bytes)
Other networking information are also available:
Object Definition
Number of stations The total number of stations configured in the application.
Number of real time asso- The total number of configured associations for data acquisition.
ciations
Number of historical asso- The total number of configured associations for archiving.
ciations
Number of external source The number of variables with an external (a server station) source for its real-
variables time value.

Subscriptions groups
Counters of variable subscriptions by group. A group is defined by its update rate.
Object Definition
Total number of variable The total number of variable subscriptions from local and remote stations.
subscriptions

- 39 -
Number of different groups The number of groups allocated for the local station variable subscriptions.
from local station
[ Update rate (ms) ] The subscription update rate in milliseconds.
Number of subscriptions The number of variable subscriptions in the group.
Number of data changes The number of data changes during the update rate. For example, if update rate
during the update rate = 10s and the data change every 500 ms, the value is 20.

- 40 -
Time Counters
Each time counter contains the immediate value plus the highest five values and their timestamp's. Show
picture

To reduce the amount of information displayed in the Audit dialog, time counters for which all values
are zero when the dialog is opened are hidden. If, subsequently, they become non-zero you must
use the Refresh button to reveal them.

Processing time - By manager


A series of time counters to measure the time taken for certain tasks performed by all managers. These
time counters are given with a breakdown by manager:

l Duration in the phase Start Project - By manager: The duration required in each of C-CURE Building
Management System managers to start the project. This includes the load phase and start phase.
l Duration for processing time of the watchdog message (similar to ping in TCP/IP) - By manager:
Watchdog messages are the internal keep-alive mechanism, allowing managers to know if other man-
agers are responsive.
l Duration for processing time of messages - By manager.

Duration for processing time on specific treatment in Variable Manager


A series of time counters to measure the time taken for certain tasks performed by the variable manager
(Var). This includes:

l Stop project
l Delete project
l Loading file Varexp.dat
l Saving file Varexp.dat
l Architect - load templates
l Architect - load parameters
l Architect - load instances
l Architect - generation
l Loading treatment (VarTreat.dat)
l Starting treatment

Duration for processing time on specific treatment in User Interface (UI)


A series of time counters to measure the time taken for certain tasks performed by the User Interface man-
ager (UI). This includes:

- 41 -
l Load variables: The time taken to load the variable definitions from Variable manager into memory.
l Variable subscriptions: The time taken to process subscription requests for variables to the Variable
manager and their acknowledgments.
l Load expression on variable: The time taken to load expression on variable items.
l Load expression used to mask alarm: The time taken to load expression used to mask alarms.
l Load events: The time taken to load event items.
l UI timer: The total time spent in the timer function of the User Interface manager.
l SCADA Basic timer: The time taken in the timer function of the User Interface manager to process
SCADA Basic functions.
l SCADA Basic function: Time taken to process SCADA Basic functions.
l SCADA Basic Expression Recalculation: Time taken to process expression recalculation when reques-
ted via a SCADA Basic script.

Duration for processing time opening and closing Web sessions and client contexts
A series of time counters to measure the time taken for certain tasks performed when opening and closing
Web sessions and client contexts. This includes:

l Session context creation/deletion


l Client context creation/deletion
l Session-related variables creation/deletion in Var manager
l Loading/unloading of alarm synthesis
l Starting/stopping alarm synthesis
l Events creation/deletion
l Expressions creation/deletion
l Cyclic functions creation/deletion

Duration with flow regulation active - By source


A series of time counters to measure the time spent with flow regulation active. These time counters are
given with a breakdown by source:

l All sources
l External source
l Equipment source
l DDE source
l OPC source
l LNS source
l BACnet source
l IEC 60870-5 source
l IEC 61850 source
l DNP3 source
l SNMP source

Other auditable processing time counters


Series of time counters are available to measure the time taken by some modules for some of their specific
tasks. This includes:
Tasks specific to the CimWay component:

l CimWay Start: The time taken to load the native driver definitions from the COMM.DAT file into
memory and starting all communication objects.
l CimWay Stop: The time taken to stop all communication objects and unload the native driver defin-
itions from memory.

Tasks specific to the LNS component:

l LNS Global Start


l LNS Lca Start
l LNS Network Start
l LNS Node Start
l LNS Variables Start

- 42 -
l LNS Variable Start
l LNS Monitoring Start

Tasks specific to the Alarm manager:

l Alarm counters initialization

Tasks specific to the Startup manager:

l Timer function
l Audit object counters update
l Audit flow counters update
l Audit system variables update

Other miscellaneous tasks:

l Proprietary log record: The time taken processing recording a log in a proprietary archive unit.
l Save Audit.Counters.xxxx file: The time taken saving the audit counters to file.
l Save Audit.SpecificCounters.xxxx file: The time taken saving the audit specific counters to file.
l Beep: The time spent when the SCADA Basic function Beep is used to sound the PC's speaker.
l Online print for log: The time taken to process the online print for a log.
l Graphic print: The time taken to process a graphic print.
l SvBatch select: The time taken to process a select operation in a batch process.
l SvBatch insert: The time taken to process an insert operation in a batch process.
l DDE - Transaction: The time taken to process a DDE transaction.
l SvBatch update: The time taken to process an update operation in a batch process.
l Global key read: The time taken to read the protection key.

- 43 -
Flow Counters
To reduce the amount of information displayed in the Audit dialog, flow counters for which all values
are zero when the dialog is opened are hidden. If they become non-zero while the dialog is open,
you must use the Refresh button to reveal them.
Each flow counter contains the immediate value plus the highest five values and their timestamp's. The flow
is the number of new instances of an object per second calculated using a 10-second rolling average. Show
picture

The flow counters generally reflect the activity of the variable manager and represent:

l The flow of messages or values,


l Sent by the variable manager (to other managers),
l Or received by the variable manager (from other managers).

<Source> can be one of the following. Flow counters for which all values are zero are not displayed so at
any one time only some of the flow counter sources will be displayed.

l All
l Internal
l External
l Equipment
l DDE
l OPC Client
l LNS
l BACnet
l IEC 61850
l IEC 60870-5
l DNP3
l SNMP Manager

<Manager> can be one of the following.

- 44 -
l All
l User Interface - Includes SCADA Basic, VBA, Expression, Recipes, Associated action, and the User
Interface itself.
l Alarm
l Historical
l Lan
l OPC Server
l SV Manager Toolkit<X> with X in the range of 1 to 8
l Interop manager
l IEC 104 server

Flow on data acquisition from <Source> source of variable


The data flow in the Variable Manager for variable values being acquired and to be sent to other managers.
Object Definition
Input packet item The flow of data packets to the Variable Manager from a particular data
source. The contents of the packet depends on the source. For example, for
an OPC server (Source = OPC Client) it is the number of item arrays per
second, for a native driver (Source = Equipment) it is the number of frames
per second.
Input single item The flow of single data items to the Variable Manager from a particular data
source.
Detected data change The flow of variable changes (after processing such as the application of a
dead-band for register variables) detected by the Variable Manager from a
particular data source.
Global dispatch - quality good The flow of variable changes with good quality sent by the Variable Manager
to all consuming local and remote managers from a particular data source.
Global dispatch - quality bad The flow of variable changes with bad quality sent by the Variable Manager to
all consuming local and remote managers from a particular data source.
Global dispatch bits The flow of bit variable changes with good quality sent by the Variable Man-
ager to all consuming local and remote managers from a particular data
source.
Global dispatch alarms The flow of alarm variable changes with good quality sent by the Variable Man-
ager to all consuming local and remote managers from a particular data
source.
Global dispatch registers The flow of register variable changes with good quality sent by the Variable
Manager to all consuming local and remote managers from a particular data
source.
Global dispatch texts The flow of text variable changes with good quality sent by the Variable Man-
ager to all consuming local and remote managers from a particular data
source.
Global dispatch per packet Flow of variable changes sent by packet by the Variable Manager to all con-
suming local and remote managers from a particular data source.
Dispatch to <Manager> The flow of variable changes received by a particular manager from a par-
ticular data source.

Flow on data command from <Source> source of variable


The data flows in the Variable Manager for variable values generated by the other managers.
There is one category of flow counters per source, and flows are given with a breakdown by sending man-
ager.
Object Definition
Writing by packet of variable The flow of packet variable writes sent to the Variable Manager by a par-
from <Manager> to Var ticular manager.
Variables written by packet The flow of single variable writes (inside packets) sent to the Variable Man-
from <Manager> to Var ager by a particular manager.
Writing of single variable The flow of single variable writes sent to the Variable Manager by a particular

- 45 -
from <Manager> to Var manager.

Flow of item data command outgoing from var to <Source>


The write item data flows by the Variable Manager to the particular data source.
There is one category of flow counters per source
Object Definition
Writing by packet of items The flow of packet item writes from the Variable Manager to the particular
data source.
Writing of single item The flow of single item writes from the Variable Manager to the particular
data source.

Flow on single variable data command by type of variable


The data flows in the Variable Manager for variable values generated by the other managers using write
commands.
Object Definition
Bit writing The flow of single bit variable writes to the Variable Manager, from all man-
agers, to all types of data source.
Alarm writing The flow of single alarm variable writes to the Variable Manager, from all
managers, to all types of data source.
Register writing The flow of single register variable writes to the Variable Manager, from all
managers, to all types of data source.
Text writing The flow of single text variable writes to the Variable Manager, from all man-
agers, to all types of data source.

Flow on single variable data command by type of variable


The data flows in the Variable Manager for variable values generated by the other managers using set com-
mands.
Object Definition
Bit setting The flow of single bit variable writes to the Variable Manager, from SCADA
Basic or the Manager Toolkit, to all types of data source.
Alarm setting The flow of single alarm variable writes to the Variable Manager, from SCADA
Basic or the Manager Toolkit, to all types of data source.
Register setting The flow of single register variable writes to the Variable Manager, from
SCADA Basic or the Manager Toolkit, to all types of data source.
Text setting The flow of single text variable writes to the Variable Manager, from SCADA
Basic or the Manager Toolkit, to all types of data source.
Bit setting from SV Manager The flow of single bit variable writes to the Variable Manager, from one of the
Toolkits manager toolkit, to all types of data source.
Alarm setting from The flow of single alarm variable writes to the Variable Manager, from one of
SV Manager Toolkits the manager toolkit, to all types of data source.
Register setting from The flow of single register variable writes to the Variable Manager, from one
SV Manager Toolkits of the manager toolkit, to all types of data source.
Text setting from SV Manager The flow of single text variable writes to the Variable Manager, from one of
Toolkits the manager toolkit, to all types of data source.

Flow on global dispatch of variable property change


The data flow in the Variable Manager for variable properties sent to other managers.
Object Definition
Dispatch extended properties Flow of dispatching all variable's extended properties.
Dispatch extended text prop- Flow of dispatching variable's extended text properties.
erties
Dispatch extended binary Flow of dispatching variable's extended binary properties.
properties

- 46 -
Dispatch properties Flow of dispatching variable's properties.

LAN flow counter from/to all stations


The data flow in the LAN Manager required to manage distributed variables.
Object Definition
Packets sent Flow of packets sent to all remote stations. A packet contains a number of
messages.
Messages sent Flow of messages sent to all remote stations.
Bytes sent Flow of bytes sent to all remote stations. Along with the Bytes received
counter, it can be used to calculate the network bandwidth.
Packets received Flow of packets received from all remote stations. A packet contains a num-
ber of messages.
Messages received Flow of messages received from all remote stations.
Bytes received Flow of bytes received from all remote stations. Along with the Bytes sent
counter, it can be used to calculate the network bandwidth.

Messages between managers


These counters represent the total message flow between the all of C-CURE Building Management System's
managers.
Object Definition
All messages The flow of all types of message between managers. A message is a general
term for the communication mechanism used between managers.
Request messages The flow of Request type message between managers. Request is inherited
from Message. When you send a Request, the target (recipient) manager
must always return a response. The response can be an Ack or Nack mes-
sage.
Mail messages The flow of Mail message between managers. A Mail message is similar to a
Request message except that the message is not acknowledgment by the tar-
get manager. For example, a mail message is used to notify an event log to
the Historical Manager.

Flow of requests to SNMP source


Flow of requests sent to the SNMP Manager module. This includes:

l Request pending: Total


l Request pending: Get
l Request pending: Ping
l Request pending: Set
l Request pending: GetBulk
l Request pending: Probe
l Request in queue: Total
l Request in queue: Get
l Request in queue: Ping
l Request in queue: Set
l Request in queue: GetBulk
l Request in queue: Probe

Flow around Historical Manager for archiving


Flow related to archiving in proprietary, ODBC or free units, including:

l Global record events


l Local record events

Flow related to archiving in database units, including:

l Dispatch HDS Trends


l Global record events

- 47 -
l Local record events

Flow around Historical Manager for DbConnect


Flow of commands for the DbConnect service.
Object Definition
Global Execute command: Total Counter of requests send to remote station and executed
locally.
Local Execute command: Total Counter of requests executed locally.
Local Execute command: TestConnection Counter of TestConnection requests executed locally.
Local Execute command: DataReader Counter of DataReader requests executed locally.
Local Execute command: Scalar Counter of Scalar requests executed locally.
Local Execute command: NonQuery Counter of NonQuery requests executed locally.
Local Execute command failed: Total Counter of requests failed locally.
Local Execute command failed: TestConnection Counter of TestConnection requests failed locally.
Local Execute command failed: DataReader Counter of DataReader requests failed locally.
Local Execute command failed: Scalar Counter of Scalar requests failed locally.
Local Execute command failed: NonQuery Counter of NonQuery requests failed locally.

- 48 -
Instance Counters
Each instance counter contains the current value, the accumulated value since the start of C-CURE Building
Management System and the allocated memory (in bytes) in current use. Show picture

Part of the instance counters reflect the message queuing and processing activity of the managers and rep-
resent quantity of messages sent by a manager or queued and waiting for processing.
Other instance counters reflect the quantity of objects configured or being processed.

Brief explanation of abbreviations used for C-CURE Building Management System's managers

l Startup – Synchronize the start of all other managers and manage the Event Viewer.
l Timer – Manage single shot and cyclic timers.
l Eqt – Data acquisition manager for native drivers only.
l Var – Variables manager, alarms and other data acquisition mechanisms.
l UI – User interface manager.
l AlarmList – Alarm server for alarm viewer. Its main function is to manage subscription of the alarm fil-
ter lists.
l His – Manager for historical data.
l OpcSvr – OPC server. The manager hosting the OPC server.
l CfgSvr – Configuration server
l Alarm – Alarm manager.
l Interop - Interop manager.
l I104server - IEC 60870-5-104 Server.
l RPC - Manager for inter-process communication.
l Geo data - Manager for Geographical data.

Brief explanation of message types

- 49 -
Messaging is a general term to designate the communication mechanism used between managers. It is
based on mailboxes and message exchanges between managers. There are different types of messages
including:

l Request – When you send a Request, the target (recipient) manager must always return a response.
The response message can be a positive acknowledgement (Ack) or a negative one (Nack).
l Good request response (Ack) – A positive acknowledgment of a Request message.
l Bad request response (Nack) – A negative acknowledgment of a Request message.
l Mail - Similar to a Request message except that the message is not acknowledged by the target man-
ager. For example, a mail message is used to notify an event log to the Historical Manager.
l Subscribe - This message is used to watch an object such as a variable. The target manager must
immediately return a response, good if the object is found, otherwise bad. The target manager must
also generate a message for every change of state of the watched object.

Brief explanation of variable kinds


In order to accommodate the variety of needs, there are different kinds of variables. In term of audit, the
main characteristic is the manager in charge of handling them:

l Variables: The main kind of variables, handled by the variable manager


l HMI variables: Kind of variable handled by the UI manager
l Temporary variables: Kind of variable handled by the UI manager
l % variables: Kind of variable handled by the UI manager

See the topic About the Variables Tree for more information on these different kinds of variables.

Counter of messages
The following categories of counters are available:

l Counter of pending messages in manager mailbox: Counters of messages waiting to be processed in a


manager’s mailbox. The current value should be around 0. Counters are given with a breakdown by
manager.
l Counter of message by type and by source and target manager: Counters according to the type of mes-
sage (see above), the target manager for the message and the source manager of the message. Coun-
ters are given with a breakdown by source manager, target manager and message type.
l Counter of subscribe messages by source and target manager: Counters of messages of type Sub-
scribe according to the source and target managers. Counters are given with a breakdown by message
type, source manager and target manager.
l Counter of good response to subscribe messages by source and target manager and by local and
remote managers: Subscribe message counters according to their source and target managers, and
the location of the source and target managers (local or remote station).
l Pending datachange by source: Current value should be around 0.
l Pending write command messages on variable by source and type: Counter of write command mes-
sages in a pending state. To write a variable, a message is created and sent to the variable manager.
When the variable manager receives it, it calls the source of variable to process the write command.
This message is deleted when the write is completed. Current value should be around 0. Counters are
given with a breakdown by type of write command and variable source type.
l Pending single write command messages on variable by source and type: Counter of single write com-
mand messages in a pending state. To write a variable, a message is created and sent to the variable
manager. When the variable manager receives it, it calls the source of variable to process the write
command. This message is deleted when the write is completed. Current value should be around 0.
Counters are given with a breakdown by variable source type and variable type.
l Pending write recipe command messages by type. Current value should be around 0.
l Pending write command to the device by source of variable. Current value should be around 0.
l Number of write command in error.
l Pending read command message on variable. Current value should be around 0.
l Pending read command by source of variable. Current value should be around 0.

Counters for the networking manager (Lan)


The following counters are available:

- 50 -
l Number of messages in waiting state before send
l Requests Pending
l Variable subscribes
l Number of client connections ready
l Cumulates packets sent
l Cumulates messages sent
l Cumulates bytes sent
l Cumulates messages received
l Cumulates bytes received
l Cumulates client connections aborted
l Cumulates server connections aborted
l Routed requests from VAR

Status on flow regulation: current value=0 means regulation is off, current value=1 means reg-
ulation is on. Cumulative value = number of off/on switch
The following counters are available:

l Status of XXXX source: The status of the flow regulation for the source XXXX. If the current value is 0
then the regulation is off (passive). If the current value is 1 then the regulation is on (active). The
cumulative value is the number of times that the regulation has switched to active.
l Waiting data changes in the FIFO: During active regulation, data change are not dispatched. Instead,
the most recent value only is stored in a FIFO. This counter is the number of waiting data changes in
the FIFO.
l Lost transitions: During active regulation, only the most recent value is stored in FIFO. This counter is
the number of lost values for all variables during current regulation period. It is reset when the reg-
ulation switches back to passive.

Counters related to data acquisition


There are counters specific to each data acquisition sources. They typically include configuration object
counts, as well as counters reflecting the data acquisition activity. Because measuring activity cannot be the
same for polling-based drivers and subscription or pub/sub drivers, these counters are mostly specific to the
type of source.
There are such counters for the following data source types and categories:

l CimWay: CimWay configuration


l BACnet: BACnet configuration, BACnet runtime, BACnet command
l DNP3: DNP3 configuration, DNP3 runtime
l IEC 60870-5: IEC 60870-5 runtime
l OPC client: OPC client runtime
l LNS: LNS runtime
l DDE: DDE runtime
l IEC 61850
l SNMP: SNMP Manager configuration, SNMP Manager runtime

Counters specific to the file transfer services are also available:

l Background file operation


l Device file transfer

Counters for the variable manager (Var)


The following categories of counters are available:
Counters of configuration objects in variable manager - Global context - By object type and scope: These
counters are the number of configured objects handled by the variable manager in the global context. Coun-
ters are given with a breakdown by object type and scope.
Counters of runtime objects in variable manager - Global context - By object type and scope: These coun-
ters are the number of runtime objects handled by the variable manager in the global context. Counters are
given with a breakdown by object type and scope.

- 51 -
Counters of configuration objects in variable manager - Web contexts - By object type and scope: These
counters are the number of configured objects handled by the variable manager in web contexts. Counters
are given with a breakdown by object type and scope.
Counters of runtime objects in variable manager - Web contexts - By object type and scope: These counters
are the number of runtime objects handled by the variable manager in web contexts. Counters are given
with a breakdown by object type and scope.

Counters for the UI manager (UI)


The following categories of counters are available:
Counters of runtime variable objects in UI manager - Global context - By variable kind and scope: These
counters are the number of variable runtime objects handled by the UI manager in the global context. Coun-
ters are given with a breakdown by variable kind and scope.
Counters of runtime variable objects in UI manager - Web contexts - By variable kind and scope: These
counters are the number of variable runtime objects handled by the UI manager in web contexts. Counters
are given with a breakdown by variable kind and scope.

Counters for actions


The following categories of counters are available:
Counters of configuration action objects - Global context - By object type and scope: These counters are the
number of configured action objects in the global context. Counters are given with a breakdown by object
type and scope.
Counters of configuration action objects - Web contexts - By object type and scope: These counters are the
number of configured action objects in web contexts. Counters are given with a breakdown by object type
and scope.
Counters of runtime action objects - Global context - By object type and scope: These counters are the num-
ber of runtime action objects in the global context. Counters are given with a breakdown by object type and
scope.
Counters of runtime action objects - Web contexts - By object type and scope: These counters are the num-
ber of runtime action objects in web contexts. Counters are given with a breakdown by object type and
scope.
Associated actions configuration: These counters are the number of configured associated action objects.
Counters are given with a breakdown by object type.

Other counters
The following other categories of counters are available:

l Application Architect: Mostly configured object counters


l Historical manager: Mostly configured object counters
l HDS: Mostly counters related to request handling
l DbConnect: A counter giving the number of Sql connections
l Alarm list manager: Mostly counters related to handling alarm list subscription, filtering and alarm
counters
l Web & Mobile: Mostly a series of counters related to the handling of sessions, subscription and web
services contexts
l Geographical data: Mostly configured object counters
l UIGA: A counter related to the number of animations being handled
l Scada basic: A series of counters related to the SCADA Basic script engine, including information
about loaded programs, and function execution.
The counter named ALLOC_BUFFER count is of particular interest. It is the counter of buffers that are
allocated and not yet freed up. If in your application, this counter is always increasing, it means that
at least one of your script is allocating buffers without freeing them after use, leading to memory
leaks.
l String management
l Associated labels configuration
l Log management
l Timer

- 52 -
l Miscellaneous runtime
l Miscellaneous configuration

- 53 -
The monitoring tab

- 54 -
Description of the Monitoring Tab
The monitoring tab contains information about the flow of real time data between C-CURE Building Man-
agement System managers.
Using the drop down list box at the top left hand corner of the dialog you can choose to display information
about either data being acquired by C-CURE Building Management System, or data being produced by C-
CURE Building Management System.

l Data acquisition - Data being acquired. For example, the contents of a read frame of one of the native
drivers.
l Data command - Data being produced and sent. For example, the contents of a write frame of one of
the native drivers.

Using the drop down list box at the center top of the dialog, you can choose the source of the data from one
of the following.

l All
l Internal
l External
l Equipment
l DDE
l OPC (client)
l LonWorks
l BACnet
l IEC 61850
l IEC 60870-5
l DNP3
l SNMP

If you choose ALL then the information about the flow of data from all sources is combined. In the following
picture, the monitoring tab is displaying Data Acquisition from the Internal source.
Menu commands are provided to reset the flow counters, reset the time counters and to close the dialog.
Show picture

- 55 -
Useful notes and terminology
Two types of information are displayed in the monitoring tab.

l Flow rates - A rolling 10 second average of the data rate (changes per second). The fields that display
flow rates have an Ellipsis button adjacent to them. Clicking on the Ellipsis button displays a pop-up
containing the real-time value and the last 5 highest values along with their timestamps.
l Counters - A numeric value counting the number of occurrences of an item. Counters do not include an
Ellipsis button.

Managers exchange real-time data in two message formats.

l Single - A single data point such as an OPC Item or single variable.


l Packet - Several data points treated together. For example, a communication frame, OPC group or
recipe.

The dialog shows all managers. Some of the managers have additional functions.

l User interface manager - Responsible for the Graphical User Interface and also SCADA Basic, VBA,
expressions, recipes and Web Services including WebVue.
l OPC server manager - Responsible for C-CURE Building Management System as an OPC server and
also the HDS.

Data acquisition flow regulation behaves differently depending on the source.

l For equipment (native drivers) when flow regulation takes place communication is temporarily sus-
pended and no request for data frames is made.
l For all other sources when flow regulation takes place communication continues but the application
only keeps the most recent values. The number of lost values is counted in the Lost Transitions
counter.

Why is the Flow Regulation group sometimes colored red?

l The background of the Flow Regulation group, at the bottom of the dialog, is colored red whenever
flow regulation is active. This corresponds to a value of 1 for the bit variable Sys-
tem.Audit.<Source>.State.VariableDataChange.ActiveFlowRegulation.

C-CURE Building Management System only exchanges real-time data between managers when it
changes. It does not cyclically send data.

- 56 -
Audit System Variables Naming Rules
The audit system variables are provided to animate mimics, create trends and generally facilitate
troubleshooting. The audit variable names all start with System.Audit and are constructed using the fol-
lowing branches.

<Source>
Indicating the data acquisition source selected from the following.

l All
l Internal
l External
l Equipment
l DDE
l OPCClient
l LON
l BACnet
l IEC61850
l IEC104
l SNMP

<Data type>

l DA - Data acquisition
l DC - Data command

<Counter type>

l Flow
l Instance
l ElapsedTime

<Manager>
The manager concerned.

l UserInterface
l Alarm Historical
l Lan
l OPCServer
l VarManager Toolkit<X> with X in the range of 1 to 8.

- 57 -
Audit System Variables - Data Acquisition Flows
The following variables reflect the data flow in the Variable Manager for variable values being acquired to be
sent to other managers. All the variables are registers. Show picture

System.Audit.<Source>.DA.Flow.ItemDataChange.Input.VarManager
The flow of data items to the Variable Manager from a particular data source. Each data item is attached to a
single variable in the Variables Tree.
Example: System.Audit.ALL.DA.Flow.ItemDataChange.Input.VarManager

System.Audit.<Source>.DA.Flow.PacketItemDataChange.Input.VarManager
The flow of data packets to the Variable Manager from a particular data source. For example, for an OPC
server (Source = OPCClient) it is the number of item arrays per second, for a native driver (Source = Equip-
ment) it is the number of frames per second.

System.Audit.<Source>.DA.Flow.DetectedVariableDataChange.Input.VarManager
The flow of variable changes (after treatment such as deadband) detected by the Variable Manager from a
particular data source.

System.Audit.<Source>.DA.Flow.VariableDataChange.QualityGood.Output.VarManager
The flow of variable changes with good quality sent by the variable manager to all consuming managers.

System.Audit.<Source>.DA.Flow.VariableDataChange.QualityBad.Output.VarManager
The flow of variable changes with bad quality sent by the variable manager to all consuming managers.

System.Audit.<Source>.DA.Flow.VariableDataChange.Input.<Manager>
The flow of variable changes sent to a particular manager.
Example: System.Audit.ALL.DA.Flow.VariableDataChange.Input.Historical

- 58 -
Audit System Variables - Data Acquisition Counters and Flow Regulation
The following variables reflect the number of data changes that are in a pending or waiting state. Show pic-
ture
To notify a data change to a destination manager, the source manager creates a message containing
the data change and posts it to the destination manager mailbox. These messages are counted in the
pending state counter. When there are too many data changes, the flow regulation is activated. In
this state any data changes are not posted immediately, instead they are stored in a FIFO (only the
most recent transition). The data changes in the FIFO are counted in the waiting state counter
All the variables are registers except where indicated otherwise.

System.Audit.<Source>.DA.Number.VariableDataChange.PendingInMailbox.<Manager>
The number of pending data changes for each manager.
Example: System.Audit.Equipment.DA.Number.VariableDataChange.PendingInMailbox.UserInterface

System.Audit.<Source>.DA.Number.SingleItemDataChange.PendingInMailbox.VarManager
The number of pending single data changes in the Variable Manager mailbox.

System.Audit.<Source>.DA.Number.PacketItemDataChange.PendingInMailbox.VarManager
The number of pending packet data changes in the Variable Manager mailbox.

System.Audit.<Source>.DA.Number.VariableDataChange.WaitingInFIFO.VarManager
The number of waiting data changes in the FIFO of the Variable Manager.

System.Audit.<Source>.DA.Number.VariableDataChange.WaitingInFIFO.LAN
The number of waiting data changes in the FIFO of the LAN Manager.

System.Audit.<Source>.DA.Number.VariableDataChange.Waiting.OPCServer
The number of waiting data changes in the list of the OPC server Manager.

System.Audit.<Source>.DA.ElapsedTime.VariableDataChange.ActiveFlowRegulation
The elapsed time, in milliseconds, during which there has been active flow regulation. Reset on return to
passive regulation.

System.Audit.<Source>.DA.Number.VariableDataChange.LostTransitions
The number of lost transitions during active flow regulation. Reset on return to passive regulation.

System.Audit.<Source>.State.VariableDataChange.ActiveFlowRegulation
Variable type: Bit.
Set to 1 if flow regulation is active else 0.
Example: System.Audit.Equipment.State.VariableDataChange.ActiveFlowRegulation

- 59 -
- 60 -
Audit System Variables - Data Command Flows
The following variables reflect the data flows in the Variable Manager for variable values generated by the
other managers. Show picture
The possible managers are:

l UserInterface - Values originate from VBA, Mimic animation, Expression & Recipe
l OPCServer - Values originate from an OPC client connected to C-CURE Building Management System
l Toolkit<X>
l Lan

All the variables are registers.

System.Audit.<Source>.DC.Flow.SingleVariableCommand.Output.<Manager>
The flow of single variable writes to the Variable Manager from another manager.
Example: System.Audit.ALL.DC.Flow.SingleVariableCommand.Output.UserInterface

System.Audit.<Source>.DC.Flow.PacketVariableCommand.Output.<Manager>
The flow of packet writes to the Variable Manager from another manager.

System.Audit.<Source>.DC.Flow.SingleItemCommand.Output.VarManager
The flow of single variable writes from the Variable Manager to the data source.
Example: System.Audit.DC.Flow.OPCClient.SingleItemCommand.Output.VarManager

System.Audit.<Source>.DC.Flow.PacketItemCommand.Output.VarManager
The flow of packet variable writes from the Variable Manager to the data source.

System.Audit.<Source>.DC.Flow.SingleVariableCommand.Input.VarManager
The flow of single variable writes to the Variable Manager from all managers.

System.Audit.<Source>.DC.Flow.PacketVariableCommand.Input.VarManager
The flow of packet writes to the Variable Manager from all managers.

- 61 -
Audit System Variables - Data Command Counters
The following variable reflect the number of data commands in a pending state in the Variable Manager.
Show picture
To send a command from the source manager to the Variable manager, the source manager creates
a message packaging the command and posts it to the Variable Manager's mailbox. These messages
are counted in the pending in mailbox counter. When the command has been sent to the source
device, but is yet to be acknowledged, the command is in the write pending state. These commands
are counted in the write pending counter.
All the variables are registers except where indicated otherwise.

System.Audit.<Source>.DC.Number.SingleVariableCommand.PendingInMailbox.VarManager
The number of pending single variable commands in the Variable Manager's mailbox.

System.Audit.<Source>.DC.Number.PacketVariableCommand.PendingInMailbox.VarManager
The number of pending packet variable commands in the Variable Manager's mailbox.

System.Audit.<Source>.DC.Number.SingleItemCommand.PendingInMailbox
The number of pending single item commands in the source variable's mailbox.

System.Audit.<Source>.DC.Number.PacketItemCommand.PendingInMailbox
The number of pending packet item commands in the source variable's mailbox.

System.Audit.<Source>.DC.Number.SingleItemCommand.WritePending
The number of single item commands in write pending state.

System.Audit.<Source>.DC.Number.PacketItemCommand.WritePending
The number of packet item commands in write pending state.

System.Audit.<Source>.DC.Number.SingleVariableCommand.WritePending.<Manager>
The number of single variable commands in write pending state in the manager that sent the command.

System.Audit.<Source>.DC.Number.PacketVariableCommand.WritePending.<Manager>
The number of packet variable commands in write pending state in the manager that sent the command.

System.Audit.<Source>.DC.Number.SingleItemCommand.Timeout
The number of single command items in timeout.

System.Audit.<Source>.DC.Number.PacketItemCommand.Timeout
The number of packet command items in timeout.

System.Audit.<Source>.DC.ElapsedTime.SingleVariableCommand
The elapsed time to process a single command. The time starts when the command left the Variable Man-
ager mailbox and the ends when the command is acknowledged by the source device.

System.Audit.<Source>.DC.ElapsedTime.PacketVariableCommand
The elapsed time to process a packet command. The time starts when the command left the Variable Man-
ager mailbox and the ends when the command is acknowledged by the source device.

- 62 -
- 63 -
Audit Files
The information displayed in the Counters Tab of the Audit Dialog is periodically recorded in text files to be
available for later analysis. The files are located under C-CURE Building Management System's root folder in
Bin\Log files. The files are generated for each installed copy of C-CURE Building Management System, not
for each project. The number of audit files and the period at which they are generated is configurable.

Counters
The main audit files in which all the counters are dumped. The files are named Audit.Counters.<xxxx>.txt
where <xxxx> is 0000 for the first file that is generated, 0001 for the second file etc. Once the maximum
file number has been used (default 9999) the oldest file is discarded and the sequence starts again. By
default, the files are generated every 30 minutes while the application is running. See the topic Audit set-
tings.

System resource counters


The system resource audit files contain counters connected with diagnosing memory or resource leaks. The
files are named Audit.SpecificCounters.<xxxx>.txt and the mechanism by which they are generated is the
same as for the main audit files. By default, the files are generated every 10 minutes while the application is
running. See the topic Audit settings.

Watchdog counters
The watchdog audit files are only generated when a manager is in watchdog state. The files are named
Audit.Watchdog.<xxxx>.txt and are the same format as the main audit files. The files are created as fol-
lows.

l The first six every 10 seconds


l The next three every 20 seconds
l The next two every 30 seconds
l The next two every 60 seconds
l Then every 5 minutes until the manager is no longer in the watchdog state

Audit.LoadedManagers.txt
Created during startup of the application when all the managers have loaded. Same format as Audit.Coun-
ters.<xxxx>.txt.

Audit.StartedProject.txt
Created during startup of the application when the project has loaded in all the managers. Same format as
Audit.Counters.<xxxx>.txt.

Audit.LastMinute.txt
Updated (overwritten) once a minute while the application is running and then deleted when it is shutdown.
Same format as Audit.Counters.<xxxx>.txt. If this file exists when the application is started (because of a
crash or dirty previous shutdown) its contents is appended to the T file

Audit.StoppedProject.txt
Created during shutdown of the application when the project has un-loaded in all the managers. Same
format as Audit.Counters.<xxxx>.txt.

Audit.DeletedProject.txt
Created during shutdown of the application when the instances of all the managers have been deleted. Same
format as Audit.Counters.<xxxx>.txt.

Audit.UnloadedManagers.txt
Created during shutdown of the application when the managers have un-loaded. Same format as Audit.Coun-
ters.<xxxx>.txt.

- 64 -
Examples of using the audits

- 65 -
Estimating the Bandwidth Used in a Networked Application
The Byte Sent and Byte Received counters in the Flow Counters.LAN flow counters can be used when estim-
ating the bandwidth required by C-CURE Building Management System. The same information can also be
found in the LAN Flow Counter section of the audit file. Show picture (Server side) Show Picture (Client side)

- 66 -
Detecting a Memory Leak
To check if there is a significant memory leak (that is memory allocated and not de-allocated) you can use
the following three counters.

l Free virtual memory


l Private bytes
l Working set

Together, these three counters show the memory consumption of the sv32.exe and Hds.exe processes,
which provide the main process of the C-CURE Building Management System software. Show picture

- 67 -
Sessions Dialog
The Sessions dialog is opened from the Application Explorer by selecting the root (project) node and select-
ing the Sessions task. It displays the list of active sessions managed by the local station. Show picture

Each session is identified by a numeric Id and includes the session Type, the time that it started (Creation
time), and the user Name and Profile. Session Id's are unique - no two sessions can have the same Id at the
same time. The Sessions dialog does not allow you to interact with, or close, a session.
The sessions are categorized as follows.

User interface
Displays the Interactive Session that corresponds to the local C-CURE Building Management System process
and its Workspace. As it must always be running, the Interactive Session is always present, and has an Id of
1, even if it is running as a Windows service. The creation time will be that when C-CURE Building Man-
agement System was started.

Configuration
Displays sessions used by any configuration tools including the Application Explorer, Application Architect,
Smart Generators and any other configuration tools. In the above screen-shot, the Data Exports con-
figuration tool is open. As the Sessions dialog can only be opened via the Application Explorer, there will
always be an Application Explorer session.

Web user interface


Displays sessions created by applications using the Web & Mobile back end. Includes WebVue, TouchVue and
the Web Scheduler.

Other interfaces
Depending on the architecture of your project, and which server interfaces are in use, other types of ses-
sions may appear here including the OPC clients connected to the OPC server (if using OPC Security), Web
Services Toolkit clients and authenticated third-party products.

- 68 -
General

- 69 -
Domain and Nature
Domains and Natures are general-purpose categories or groups. A domain can be thought of as a geo-
graphical or physical area within the process being monitored, and a nature as an indication of the primary
source. In practice, a domain and nature can be used to represent any logical group.

How to Configure a Domain or Nature


The mechanism for configuring a domain or a nature is the same. For the purpose of this explanation, a
domain will be created. Domain and Nature configuration is found under the General node of the Application
Explorer. A maximum of 512 domains and 512 natures can be configured.

1. Select the Domains node and, from the task list, select Add a domain. A dialog to configure the new
domain will open. Show picture

2. Enter the name of a new domain and an optional description. Domain names may contain up to 100
alphanumeric characters.
3. Click the OK button to register the new domain and close the dialog.

Using Domain and Nature with the Variables Tree


Each variable can be assigned to a domain and/or nature. The domain and nature of a variable can be used
in a number of ways:

l To select which alarms are displayed in an Alarm Viewer.


l To filter data that is being recorded as part of the archives or sent to a printer.
l To select which data is displayed in a Log Viewer.
l To select which variables are displayed in the Select Variable dialog.

- 70 -
Labels

- 71 -
Level Labels
What are the level labels?
The level labels are bilingual strings of up to 255 characters that are associated with each level of the fol-
lowing categories.

l Command levels
l Browsing levels
l Alarm acknowledge levels
l Alarm masking levels
l Alarm maintenance levels

If configured, the labels are displayed as an aid to configuration wherever the level appears as a property in
a dialog (instead a level Id). Show picture

Level labels are an aid to configuration only. They do not appear at run time.

How to configure a Level Label


Label configuration is found under the General node of the Application Explorer. Show picture

- 72 -
Associated labels

- 73 -
Associated Label Overview
Associated Labels are configurable sets of strings that are used as representations for a variable's value
when it is displayed and / or logged. For example, the value of a bit variable can be represented by the
labels STOPPED and RUNNING (instead of values 0 and 1). Show picture

Bit, Alarm and Enumerated Associated Labels


The strings provided by theses labels are used in the Application Explorer, the Web Scheduler, the archive
units and in mimics. In mimics, the strings from associated labels can be displayed in the alarm and log
viewers, by the Text-Label and Send-Bit animations. Any number of bit, alarm and enumerated labels can
be configured by the developer.
The following table explains where they can be used.
Usage
Archive
Application Mimic anim- Web Sched- units
Label type Variable type
Explorer ations uler Alarm & Log
viewers
Bit Bit Yes Yes No Yes
Alarm Alarm Yes Yes No Yes
Enumerated Register Yes Yes Yes N/A
Enumerated Text Yes Yes No N/A

Default Associated Labels


If you do not associate a specific associated label with a bit or alarm variable then strings from a default
associated label are used. The strings are predefined and can be customized by the application developer.
There are two default associated labels, one for bits and one for alarms.

User action Associated Labels


The user actions associated labels provide the strings that are displayed in a Log Viewer that has been con-
figured to display user actions. The strings are predefined and can be customized by the application
developer.
There is only one user actions associated label and the strings it contains will be used throughout the
project.

- 74 -
Managing Associated Labels in the Application Explorer

Tasks applicable to Associated Labels


When the Associated Labels folder is selected.
Icon Task Description
Add a bit associated Add a new of associated label for bits.
label
Add an alarm asso- Add a new of associated label for alarms.
ciated label
Add an enumeration Add a set of associated label for enumerations.
label
When a specific associated label is selected.
Icon Task Description
Remove Delete the selected label. Note that the icon depends on the type of label selec-
ted. Not available for the default or user action labels
Properties Display the properties dialog for the selected label. Note that the icon depends
on the type of label selected.

Behavior of cut, copy and paste


You can cut and paste or copy and paste any bit, alarm or enumerated label specific to your application. A
new associated label is created with a default name. You cannot cut, copy or paste the default or user action
labels.

- 75 -
Bit and Alarm Associated Labels
Bit associated labels
Each bit associated label allows you to configure strings representing the zero and one value for each con-
text in which bit associated labels can be used. Show picture

l Value - Displayed in mimics when using the Text-Label animation. In addition to strings for the zero
and one values this label also allows the configuration of a string for display when the bit is invalid
(unavailable).
l Command to - Displayed in the dialog box that is used to confirm the forcing of a bit's state when
using a Send-Bit animation.
l Change to - Recorded in the archive units when a bit variable is configured as logged. Displayed in the
log viewer when the recorded data is displayed.

Labels in dimmed italic font indicate that they have not been customized.

Any field with a gray background is either not applicable or cannot be changed by the application
developer.

Alarm associated labels


Each alarm associated label comprises of strings for each of the possible alarm states plus user actions asso-
ciated with alarms. Show picture

- 76 -
How to configure a bit or alarm associated label

1. Open the Application Explorer and expand the configuration tree to display the node Gen-
eral.Labels.Associated labels.
2. Select the task Add a bit associated label (or Add an alarm associated label). The appropriate asso-
ciated label configuration dialog opens. Show picture

3. Enter a Name for the label (or accept the default one). The Name is used when attaching the label to a
variable and so it is useful to use something meaningful.
4. Enter an optional Description.
5. Select the Labels tab and enter the text strings. If the project has been configured as bilingual, you
can use the Ellipsis button adjacent to each field to enter the second string.
6. Click OK when finished to confirm the configuration and close the dialog.

- 77 -
Enumeration Labels
An enumeration label comprises a list of discrete values and corresponding labels. When an enumeration
label is associated with a variable, in those aspects of C-CURE Building Management System HMI that sup-
port it, the enumerated labels can be displayed instead of the variable's value. Depending on the intended
use of the label, attached to register or text variables, the list of enumeration values can be numbers or
strings. Show picture

For each enumerated value, you can enter:

l A string to be used when the variable value is displayed (Value),


l A string to be used if the value is forced (Command to),
l A string to be used if the value is logged (Change to).

In addition to the configured discrete values, an Enumerated Label has two other values.

l Default - Used when the variable value is valid but not included in the enumerated list of meaningful
values.
l Unavailable - Used when the variable value is unavailable (invalid).

For projects that have the bilingual option selected, strings can be entered for both the languages.

How to configure an Enumeration Label

1. Open the Application Explorer and expand the configuration tree to display the node Gen-
eral.Labels.Associated labels.

- 78 -
2. Select the task Add an enumeration label. The Enumeration Label configuration dialog opens. Show pic-
ture

3. Enter a Name for the label or accept the default one. The Name is used when attaching the label to a
variable and so it is useful to use something meaningful.
4. Enter an optional Description.
5. Select the Labels tab and, using the Add Label Item tool, enter an enumeration value and the cor-
responding text strings. If the project has been configured as bilingual, you can use the Ellipsis button
adjacent to each field to enter the second string. Show picture

6. Repeat step 5 for each of the enumerated values to be configured.


7. Predefined strings are provided for the Default and Unavailable enumerations. These can be changed
if required.
8. Click OK when finished to confirm the configuration and close the dialog.

The Command To label is not relevant for the Unavailable enumeration value and is therefore not
available.

Where can the Enumerated Label be used


Enumerated Labels can be used in Text-Label animations, and in the WebScheduler to display meaningful
labels in place of BACnet Schedule output values.

Tools in the Labels tab


Icon Tool Description
Add a label item Add a new label item including value and strings.

- 79 -
Remove a label item Remove the selected label item.
Move up Move the position of the selected item up within the list. Can be used to reorder
the list when adding items.
Move down Move the position of the selected item down within the list. Can be used to
reorder the list when adding items.

- 80 -
User Actions Associated Labels
The user action associated labels provide the strings that are displayed in a Log Viewer that has been con-
figured to display user actions. Show picture

There is only one user action associated label and the strings it contains will be used throughout the
project.

How to configure the user action associated labels

1. Open the Application Explorer and expand the configuration tree to display the node Gen-
eral.Labels.Associated labels.
2. In the right pane, select the item (User action associated label) and the select the Properties task. The
User Actions Associated Labels configuration dialog opens.
3. Select the Labels tab. Show picture

4. Enter the text strings as required. If the project has been configured as bilingual, you can use the Ellip-
sis button adjacent to each field to enter the second string.
5. Click OK when finished to confirm the configuration and close the dialog. The new strings are dis-
played immediately for existing and new logs in any Log Viewer that is subsequently displayed.

Clicking the Reset button discard any change and set user actions labels to their default value.

- 81 -
Timestamp Quality Labels
What are the timestamp quality labels?
The timestamp quality labels are a set of strings that are used when displaying the timestamp quality of vari-
ables. They are useful if data timestamps are set at the device level. For example from an OPC Server. The
timestamp quality labels appear in the Application Explorer and can be displayed in the Alarm and Log View-
ers by using the #x format character. The labels are pre-defined and can be customized by the application
developer.

How to change a timestamp quality label


The timestamp quality label configuration is found under the General node of the Application Explorer. Show
picture

Labels in dimmed italic font indicate that they have not been customized. Clicking the Reset button discard
any change and set timestamp quality labels to their default value.

- 82 -
File References
File references are used to configure a reference to a third party file that is to be used in C-CURE Building
Management System's project. Creating a reference to a file speeds up access by allowing it to be pre-
loaded, as one of the project's resources, on start-up. It also ensures a uniform way of managing a file
across all the features that have access, including an alias, a unique name shorter name than the actual file-
name.

Where can file references be used


File type Supported formats Available for use in
Microsoft® Excel functions in Expression engine. See Expression functions
XLS, XLSX, XLSM
Excel for Referencing an Excel File for more information.
Xml functions in Expression engine. See Expression functions
Xml
for Referencing an Xml File for more information.

How to configure a File Reference?


File reference configuration is found under the General node of the Application Explorer.

1. Select the File reference node and, from the task list, select Add a file reference. A dialog to configure
the new file reference will open. Show picture

2. Enter the Name for the file reference. The name is the identity by which it will be referenced in C-
CURE Building Management System. You can also enter an optional description.
3. Select the File type, either Microsoft© Excel or Xml.
4. Select or enter the File path. The following syntaxes are supported.
a. File name only. The file is assumed to be in the project's TP folder. For example FILE.XLSX.
b. A path relative to the project. For example ..\..\MyFiles\FILE.XLSX.
c. An absolute path. For example E:\MyFiles\FILE.XLSX.
5. Select the Advanced tab to change any of the other properties.
6. Click OK to confirm the configuration and close the dialog.

When an Xml file is selected in the Application Explorer, the task Xml viewer is available to preview
the Xml file content.
The Xml viewer allows you to visualize the Xml file content and test XPath queries. Show picture

- 83 -
Advanced properties
Show picture

l Data interpretation
l Default substitution characters for empty cells. The characters that are returned by default if a
referenced cell is empty.
l Empty string - Returns "" for any empty cell.
l "Null" string - Returns "NULL" for any empty cell.
l Customized string - Returns the configured string for ant empty cell.
l Output formatting - Excel files only
l Default column separator - The default character used to separate the cells of a column when
using functions such as the GetCol and GetRange in expressions.
l Default row separator - The default character used to separate the cells of a row when using
functions such as the GetRow and GetRange in expressions.
l Allow usage - The feature(s) that are permitted use of the file.
l Expressions - Allow use by the Excel functions in the Expression Engine.
l Time of loading
l At start-up - The file is loaded at startup.
l On call - the file is loaded only when it is used for the first time.
l Time of unloading
l On exit - The file is unloaded only when shutting down.
l After a delay - The file is unloaded, after a delay, after it was last used.

- 84 -
Data connections

- 85 -
Data Connections Overview
The Data Connection feature facilitates the connection of C-CURE Building Management System to third
party systems. In particular, Sql connections are useful to exchange data with Enterprise systems such as:

l MES - For retrieving production parameters and giving feedback on its execution...
l CMMS - For triggering work orders on event and alarms, retrieving work orders' status and accessing
spare parts availability...
l ERP - For exchanging information about production planning, raw material availability and usage...
l Weather data - Either pushing weather data to a central database if weather stations are directly con-
nected or retrieving weather data in a third-party system, for use in C-CURE Building Management Sys-
tem.
l ...

Simply said, Sql connections and the underlying Sql request handler can be used to bridge C-CURE Building
Management System to any external data source provided that a compatible ADO.NET provider is available.
The module behind Sql connection handling helps you connect seamlessly to Sql data sources. It includes:

l Request routing inside the multi-station system - In order to avoid the need to open the access to the
data source to all stations of the network, the configuration allows you to define which station is in
charge of the interface to the DBMS. All other stations will go through this designated station to
execute requests.
l Support for single active server associations - A Sql connection can be produced by an association for
redundant paths to the DBMS.
l Error handling
l Asynchronous command handling
l Centralized connection strings at the project configuration level
l ...

This Sql bridge supports a large variety of database commands including:

l Select, Insert, Update and Delete queries


l Scalar and non-query requests
l Requests on tables, views, stored procedure execution

Data Connections allow the developer to configure a connection to a Data Source, typically a Database Man-
agement System (DMBS) using the ADO.NET technology. The Data Source can be local, on another server on
the local network or cloud based. This version includes support for Microsoft's SQL Server (local, network or
Azure) and Oracle. A generic data source is also included which can be used to connect to any Data Source
that supports the technology.

The Data Connections feature is based on a process running as a Windows service called SV DbCon-
nect.
This service is installed as part of C-CURE Building Management System installation and must be run-
ning for Sql connections and requests to operate properly.
By default, the service SVDbConnect runs with a virtual account. While this is suitable in the most
common situations, you may need to change the selected account depending on the constraints of
the RDBMS and the ADO.NET provider.
Access to Data Sources via Sql connections is possible using SCADA Basic, the SV Manager Toolkit and,
using Sql Read Queries, you can map variables to data returned from RDBMS.

- 86 -
Sql Queries
Pre-defined Sql queries can be added to a configured Sql Connection. See the topic How to Configure a Sql
Read Query. A query can be configured to run cyclically and / or on event. The data produced by a query can
be used in the following ways.

l By mapping to one or more variables. See the topic Mapping a Variable to a Sql Variables Source.

- 87 -
Managing Data Connections in the Application Explorer

Tasks applicable to Data Connections


When the Data Connections folder is selected.
Icon Task Description
Add a Sql connection Add a new Sql data connection.
Settings Display the Data connections settings dialog. See the topic Data Flow Regu-
lation Settings for more information (Custom driver).
When a specific data connection is selected.
Icon Task Description
Test connection Test the selected Sql connection
Properties Display the selected data connection properties dialog.
Remove Remove the selected data connection.
Add Sql read query Add a Sql read query to the selected data connection.
When a specific Sql read query is selected
Icon Task Description
Remove Remove the selected Sql read query.
Properties Display the selected Sql read query properties dialog.
Test read query Test the selected Sql read query. This action execute the query and display the
results.
Trigger read query Trigger the selected Sql read query. This action execute the query and process
the results (update variable values for example).

Behavior of cut, copy and paste


You can cut and paste or copy and paste a data connection. A new data connection is created with a default
name.
You can cut and paste or copy and paste a Sql read query. A new Sql read query is created with a default
name.

- 88 -
Sql Connections Configuration
The required ADO.NET provider must be installed on the computer used for configuration purpose,
and also on runtime computers belonging to the list of Servers of the Sql connection (see Advanced
properties below).

How to create and configure a Sql Connection

1. Open the Application Explorer and expand the configuration tree to select the Data Connections folder.
2. From the task list, select Add a Sql connection. The Sql Connection creation dialog opens. Show pic-
ture

3. Either accept the default or enter the Sql connection Name. The name is used as the Id of the con-
nection throughout the application.
4. Enter the optional Description. The description appears in the Application Explorer whenever the Data
Connections folder is selected.
5. Select the Data Source from either:
a. SQL Server - Creates a connection using the SQL Server ADO.NET provider.
b. Oracle - Creates a connection using the ADO.NET provider.
c. Other - Creates a connection using any other ADO.NET provider.
6. Select the Data Provider. The drop down list is automatically populated with entries appropriate to the
selected data source unless you have selected Other in which case all data providers available on the
local computer are listed.
7. Click Apply.

At this point, the Connection String, used when establishing the connection, is partially completed but you
must then configure the properties in Data Source specific tab before the configuration is complete.

Configuring an SQL Server connection

1. Select the SQL Server tab. This tab is only visible if you selected SQL Server as the Data Source. Show
picture

- 89 -
2. Select or enter the server name. A dialog displaying the list of discovered SQL server instances, both
on the local computer and on the network, can be displayed using the Ellipsis button.
3. Select the Authentication Mode. You may need to ask your System Administrator for this information.
l Windows authentication. The credentials used to connect to the DBMS will be those of the run-
ning SV DbConnect service. A User name and Password are not required.
l SQL server authentication. You must enter a valid SQL Server User name and Password.
l Active directory password authentication. For connecting to a Microsoft Azure database. You
must also enter a User name and Password that are valid on your Azure Active Directory.
l Active directory integrated authentication. The credentials used to connect to the DBMS will be
those of the running SV DbConnect service. This authentication mode can only be used if your
local Active Directory is extended to your Azure Active Directory. A User name and Password
are not required.
4. Select or enter the database name. A dialog displaying a list of discovered databases, from the selec-
ted server instance, can be displayed using the Ellipsis button
5. Click OK to confirm the configuration and close the dialog.

The Server name is the SQL Server instance name, it can take several forms depending on:

l Where the SQL Server instance is located


l SQL Server instance settings
l System level settings

For example it can be:

l (local) or .\ or . (dot) to connect to the default local SQL Server instance or .\MySQLServer-
InstanceName for a named SQL Server instance
l The server IP address such as 192.168.x.y or 192.168.x.y\MySQLServerInstanceName for
named instances
l The server hostname such as MySQLServerHostname
l The fully qualified instance name such as MySQLServerHostName\MySQLServerInstanceName
l MyAzureDomain.database.windows.net for Microsoft Azure database and Microsoft Azure data
warehouse instances

Configuring an Oracle connection

- 90 -
1. Select the Oracle tab. This tab is only visible if you selected Oracle as the Data Source. Show picture

2. Select either TNS (Transparent Network Substrate) or EZ Connect (Easy connect) for the connection
type.
a. If using TNS an Oracle configuration file, tnsnames.ora, provides the connection parameters.
The .Net Service Name drop down list box is populated using the contents of this file and the
appropriate entry must be selected.
b. If using EZ Connect you must manually enter the Server name (or IP address), Port number and
Database service name.
3. Select the Authentication Mode from one of the following. You may need to ask your System Admin-
istrator for this information.
l Windows authentication. The credentials used to connect to the DBMS will be those of the run-
ning SV DbConnect service. A User name and Password are not required.
l SQL authentication. You must also enter a valid User name and Password.
4. Click OK to confirm the configuration and close the dialog.

Configuring other connections


If you select the Data Source as Other, you must manually enter the connection string in the Other tab.
By using a Data Source of type Other, you can take advantage of any third party ADO.NETADO.Net provider.
See the next paragraph for more information on how to manually set connection properties without the need
to manually edit the connection string.
Please note that the behavior and level of support for such third-party ADO.NET providers may vary
depending on the provider you decide to use. In particular, not all ADO.NET providers implement the
necessary features for accessing the list of advanced properties. Refer to the product documentation
of the third-party ADO.NETADO.Net provider for more information.

Manually editing advanced properties of a connection string


Much of the configuration that takes place in the Data Connection dialog is used to generate a connection
string that is then used by C-CURE Building Management System when connecting to the database.
Advanced users can edit the connection string directly in the Sql connection dialog from the server specific
tab. The Ellipsis button adjacent to the Connection String field displays a list of available properties as
exposed by the selected ADO.NET provider.
As an example, here is the list of properties for SQL Server Show picture or Oracle Show picture

- 91 -
Security related fields including the user name and password are hidden and cannot be edited from
the connection string.

Testing the connection


Once it has been configured, the connection can be tested using either the Test Connection button in the Sql
Connection dialog or the Test Connection tool. C-CURE Building Management System will attempt to connect
to the server using the configured Connection String. A dialog is displayed showing success or, should the
connection attempt fail, error information.
The Test Connection tool allows you to test the connection end-to-end:

l If the station from which you run the test is not in the list of Producers, the connection is estab-
lished through the multi-station and therefore the connection will fail if none of the Producer
stations is running.
l If the connection string does not include the database, the test will consist of a connection to
the DBMS instance only. It does not guarantee that all of the hosted databases will be access-
ible.
l If the connection string does include the database, the test will consist of a connection to the
database itself. It guarantees that the configured database is accessible, but it does not guar-
antee that all of the tables (and other database items) will be accessible.

- 92 -
The Advanced Properties tab

l General
l Timeouts
l Command time-out - The wait time before terminating a command, sent by C-CURE Build-
ing Management System using DbConnect, and generating an error. A value of 0 indicates
no limit (an attempt to execute a command will wait indefinitely). The default is 1 minute.
l Servers - Optional Server Station list. Used in multi-station applications. Those stations in the Server
Station List will handle the interface to the DBMS and all other stations will delegate requests to those
stations in the Server Station List. If the list contains an association, it must be of type Single active
server.

The Traces tab


See the Sql Connections Traces topic for more information.

- 93 -
Sql Connections Traces
The Traces tab allows you to enable diagnostic trace messages. Each trace generates specific messages that
are logged in the Trace Files and displayed in the Event Viewer dialog (F7). The following screen shot was
taken with the default configuration. Show picture

l General - Not used.


l Configuration - Information associated with configuration. Useful when trying to diagnose con-
figuration loading issues or if a problem is caused by the configuration or run-time of the SV DbCon-
nect service.
l Sql request - Shows all the requests sent to the SV DbConnect service. The trace includes the Id of the
request, the actual Sql request text, if the request was successful or not, and how long it took.
l Networking - Information about any networking change for a data connection (as available rate) and
when a message is routed to another station

- 94 -
Data Connection System Variables and Audit
System variables
A number of system variables are available. They are created automatically according to the configuration.
If a Data Connection is deleted from the configuration, the corresponding system variables are not deleted
automatically.

SYSTEM.<StationName>.Components.DbConnect.Alive
Indicate the state of the SV DbConnect process, the Windows service in charge of handling Data Con-
nections.
0=Service unreachable (the SV DbConnect service may not be installed or not started)
1=Service available
Variable type – BIT.
Produced by the station <StationName> and consumed by all stations that have a client connection to the
<StationName> server.

SYSTEM.<StationName>.DataConnections.<SqlConnectionName>.On
Indicate the state of the Sql connection corresponding to <SqlConnectionName>, as seen from the station
<StationName>.
0=Not ready to receive request (the Sql connection may not be started)
1=Ready to receive request
Variable type – BIT.
Produced by the station <StationName> and consumed by all stations that have a client connection to the
<StationName> server.

Audit - Flow counters


The following flow counters are available in the category Flow around Historical Manager for DbConnect.
Object Definition
Global Execute command: Total Flow counter for requests sent to remote station and executed loc-
ally
Local Execute command: Total Flow counter for requests executed locally
Local Execute command: TestConnection Flow counter for TestConnection requests executed locally
Local Execute command: DataReader Flow counter for DataReader requests executed locally
Local Execute command: Scalar Flow counter for Scalar requests executed locally
Local Execute command: NonQuery Flow counter for NonQuery requests executed locally
Local Execute command failed: Total Flow counter for requests failed locally
Local Execute command failed: TestCon- Flow counter for TestConnection requests failed locally
nection
Local Execute command failed: Flow counter for DataReader requests failed locally
DataReader
Local Execute command failed: Scalar Flow counter for Scalar requests failed locally
Local Execute command failed: Flow counter for NonQuery requests failed locally
NonQuery

Audit - Instance counters


The following instance counters are available in the category DbConnect:
Object Definition
SqlConnections The number of Sql connections
TestConnectionRequest message The number of TestConnectionRequest messages sent
SqlQuery The number of Sql queries
SendQuery The number of Sql queries sent
SqlVariables The number variables mapped onto a Sql query

- 95 -
How to Configure a Sql Read Query
The information in the topic describes how to configure Sql read queries. Such pre-defined queries are used
to map Sql variables.
See the topic Mapping a Variable to a Sql Variables Source for more information.

How to configure a new query

1. Open the Application Explorer and expand the configuration tree to select an existing Sql Connection in
the Data Connections folder.
2. From the task list, select Add Sql read query. The Sql read query creation dialog opens. Show picture

3. Either accept the default or enter the Sql read query Name. The name is used as the Id of the query
throughout the application.
4. Enter the optional Description. The description appears in the Application Explorer whenever the Data
Connections folder is selected.
5. Select the Scope of the Sql query. The scope is used to control the distribution of the Sql query results
across user sessions.
6. Select the Sql command Kind.
a. Read records - Used when a query is designed to return a set of records comprising one or mul-
tiple fields.
b. Read a scalar value - Used when a query is designed to return a single scalar value.
7. Enter the query. The query must respect standard Sql syntax as supported by the underlying
RDBMS and ADO.Net provider. To insert a parameter anywhere in the query click the ? button. Note
that although the query editor highlights keywords there is no auto-completion. Show picture

8. Click Apply.

It is recommended to use tools such as a query editor and query performance profiler provided with
your RDBMS to design and test your queries. It will help you tune them before you configure the Sql
queries in the Application Explorer. In general, poorly designed Sql requests, and in particular the
time it takes the external source to process it negatively affects the system performances and your
RDMS availability.

- 96 -
A Sql query is able to handle a maximum of 5000 returned values, a value being a field of a record.
For example, a Sql query returning 50 records with 6 fields each corresponds to 300 values.
A Sql request shall be tuned if it returns more than 5000 values.

Configuring parameters
Parameters add flexibility to a Sql Query by allowing the value of one or more fields within the query to be
provided by the C-CURE Building Management System feature where it is being used (for example the vari-
able mapping). Parameters entered in a Sql Query are configured in the Parameters tab. The Parameters
tab is available if the query contains at least one parameter, it is hidden otherwise. The main purpose of the
configuration is to provide constraints to verify the parameter value integrity before it is incorporated in a
query and sent to the external data source. Show picture

l Description - A description of the parameter for future reference.


l Max string length - The maximum number of characters between 1 and 132. The default is 132.
l Is numeric - If selected the parameter is checked to verify that its contents is numeric.
l Escape string - If selected, the escape character will be added to the following characters:
- \r
- \n
-\
-‘
-“
- 0x1a
- 0x00
For example Hello’ qsd becomes Hello\’ qsd in the request.

Configuring when a query is executed

- 97 -
The Execution tab is used to configure when a query is executed. A query can be executed cyclically and / or
on event. Show picture

l Cyclic - Select to enable cyclic execution. The cycle period is configurable from 10 seconds to 1 hour.
Note that there is no synchronization. For example if you configure the period to be 0:10:00 (10
minutes) and the application start-up was at 12:05:15 the execution will be at 12:15:15, 12:25:15 etc.
l Triggering bit - The name of a bit variable used to trigger the execution upon value change.
l Execution repeating - The Sql query can be configured in such a way that the execution is repeated if
the number of received rows is exceeds a maximum you define. It is useful if your query is designed
to retrieve a certain amount of records in nominal mode (with a Select TOP clause for example).
However, in some rare cases such as a restart after a long period of time or an avalanche of new
records, you need the query to be repeated until all records stored during the shutdown are retrieved.
l Repeat query - Tick to activate the execution repeating. This option can be used for both a cyclic
query and a query executed on a triggering bit.
l Max received row count - The threshold, in number of rows received, that will trigger a reit-
eration of the execution. The execution can be repeated more than once if the received row
count is still greater or equal to the defined value.
l Inhibiting bit - The name of a bit variable that may be used to inhibit execution.

A query is executed each time there is a configuration change.

Irrespective of the configuration in the Execution tab, a query is only executed once it has been
mapped to at least one variable.

A query cannot be executed if it is still running from a previous execution.

The Advanced tab


The advanced tab allows the selection of variables to provide information about the status of query.

l Execution status variable - A register variable providing information about operation status.
0 = Successful
1 = Running
2 = Failed
3 = Canceled
l Execution error variable - A text variable providing additional information when status variable indic-
ates failed.

Testing a query
A query can be tested using the Test button in the General tab. The Test dialog allows values for any para-
meters to be entered and displays both the query result and useful information about the execution status.

- 98 -
Show picture

How the scope affects the Sql query design and usage
When configuring a Sql query, the scope of the following variables must match the scope of the query:

l Inhibiting bit variable,


l Triggering bit variable,
l Execution status variable,
l Execution error variable.

In addition, the scope of variables used as input parameters for a given query must match certain criteria to
be valid. See Linking a Variable to a Sql Variables Source for more information.
See Configuration Items Affected by Scope for general information about the concept of scope.

Traces tab
The Traces tab allows you to enable diagnostic trace messages. Each trace generates specific messages that
are logged in the Trace Files and displayed in the Event Viewer dialog (F7). The following screen shot was
taken with the default configuration. Show picture

l Trace 1: General - Enable general traces related to the handling of the Sql query.
l Trace 2: Configuration - Enable traces specific to the configuration handling of the Sql query.

- 99 -
l Trace 3: Runtime (Sql variable driver - General) - Enable general traces related to the Sql variable
driver activity for this query.
l Trace 4: Runtime (Sql variable driver - Triggers) - Enable traces related to the triggering of this query
for the Sql variable driver.
l Trace 5: Runtime (Sql variable driver - Queries) - Enable traces related to the handling of this query
for the Sql variable driver.
l Trace 6: Runtime (Sql variable driver - Queries with details) - Enable detailed traces related to the
handling of this query for the Sql variable driver, including parameter substitutions and value extrac-
tions.
l Trace 7: Runtime (Sql variable driver - Mapping) - Enable traces related to the mapping resolution of
this query for the Sql variable driver.
l Trace 8: Runtime (Sql variable driver - Performances) - Enable traces related to performances of this
query for the Sql variable driver.

- 100 -
Supported Table Formats
The following table formats are supported when using Sql Read Queries as a source for the value of vari-
ables.

A table can be the result of one or more joins or other RDBMS level processing.

The maximum number of values that it is possible to read is limited by the maximum column count
supported by ADO.Net provider, or by the Data Source minus 1.

Narrow table format


The narrow format is a table with one column containing the values and another the metadata of the value.
This is one of the most common formats and is used in C-CURE Building Management System by the HDS for
log and trend data.
col_Ts col_Name col_Value col_Quality
11/01/2019 10h00 Temperature 22,5 192
11/01/2019 10h00 Humidity 63 192
11/01/2019 10h00 Wind 39 192
11/01/2019 10h01 Temperature 22,5 192
11/01/2019 10h01 Humidity 64 192
11/01/2019 10h01 Wind 12 192
11/01/2019 10h02 Humidity 64 192
11/01/2019 10h02 Humidity 64 192
The simplest query for this format is to read the last value of each metric (temperature, humidity and wind),
but this requires one Sql request for each variable and is not very efficient.

SELECT TOP(1)
[col_Ts],
[col_Value],
[col_Name]
FROM [NarrowTable]
WHERE [col_Name] = ‘Temperature’
ORDER BY [col_Ts] DESC

An alternative approach is to use query mutualization obtaining the last value of each metric, and then map-
ping the result to several variables.
The example below is given for Sql Server and may not work with other RDBMS.

;WITH CTE AS
(
SELECT
[col_Ts],
[col_Value],
[col_Name],
ROW_NUMBER() OVER(PARTITION BY [col_Name] ORDER BY [col_Ts] DESC) AS "RowNumber"
FROM [NarrowTable]
WHERE [col_Ts] > DATEADD(DD, -10, GETDATE())
)
SELECT
[col_Ts],
[col_Value],
[col_Name]
FROM CTE WHERE RowNumber=1
ORDER BY [col_Ts] DESC

- 101 -
Using the above sample data the result of this query is as follows.
col_Ts col_Name col_Value col_Quality
11/01/2019 10h00 Wind 39 192
11/01/2019 10h03 Temperature 22,5 192
11/01/2019 10h05 Humidity 64 192
In this example, 3 values and their quality are read with one SQL Query execution, but it could be extended
to many more.

Wide table format with single timestamp


The wide table format is that where each metric appears in a separate column. This format is a snapshot of
several metrics at a particular time.
col_Ts col_Temperature col_Humidity col_Wind …
11/01/2019 10h00 22,5 63 39 …
11/01/2019 10h01 22,5 64 12 …
11/01/2019 10h02 22,5 64 17 …
This is the easier format to use if we are interested in only keeping the latest value of each metric (Tem-
perature, Humidity and Wind).

SELECT TOP(1)
[col_Ts],
[col_Temperature],
[col_Humidity]
[col_Wind]
FROM [WideTable]
ORDER BY [col_Ts] DESC

Using the above sample data the result of this query is as follows.
col_Tem-
col_Ts col_Humidity col_Wind …
perature
11/01/2019 10h02 22,5 64 17 …
In this example, 3 values are read with one Sql Query but it could be extended to many more.

Wide table format with multiple timestamps


Similar to the above but with the timestamp repeated for each metric. This is a format in common use by
SCADA providers.
col_Ts col_Ts Temperature col_ col_Ts col_ …
Temperature Humidity Humidity
11/01/2019 10h00 11/01/2019 10h00 22,5 11/01/2019 10h00 63 …
11/01/2019 10h01 11/01/2019 10h01 23,0 11/01/2019 10h01 64 …
11/01/2019 10h02 11/01/2019 10h02 23,5 11/01/2019 10h01 64 …
This an easy format to use if you are interested in only keeping the latest value of each metric (Tem-
perature, Humidity and Wind).

SELECT TOP(1)
[col_Tstemperature],
[col_Temperature],
[col_TsHumidity]
[col_Humidity]
FROM [WideTable]
ORDER BY [col_Ts] DESC

Using the above sample data the result of this query is as follows.
col_Tem- col_TsHu-
col_TsTemperature col_Humidity …
perature midity

- 102 -
11/01/2019
11/01/2019 10h02 23,5 64 …
10h02
With this example, 2 or more values are read with one Sql Query but it could be extended to many more.

Wide table format without timestamp


col_BatchID col_Failed col_Score col_Operator
4012 0 965 AD
4013 0 1093 AD
4014 0 875 AD
4015 1 15 AD
Again, easy to use if you are interested in only keeping only the n latest values for all the metrics (Failed,
Score, Operator).

SELECT TOP(2)
[col_Failed],
[col_Score],
[col_Operator]
FROM [WideTable]
ORDER BY [col_BatchID] DESC

Using the above sample data the result of this query is as follows.
col_BatchID col_Failed col_Score col_Operator
4014 0 875 AD
4015 1 15 AD
With this example, it is possible to read one or more value sets with one Sql Query.

Fixed table format


A table in which the number of rows and their use is fixed.
col_Day col_Production
Monday 10005
Tuesday 98509
Wednesday 99678
Thursday 10014
Friday 99256
Saturday 73968
Sunday NULL
It is not necessary to filter or order the result.

SELECT
[col_Day],
[col_Production],
[col_Operator]
FROM [FixTable]

Using the above sample data the result of this query is as follows.
col_Day col_Production
Monday 10005
Tuesday 98509
Wednesday 99678
Thursday 10014
Friday 99256
Saturday 73968
Sunday NULL

- 103 -
With this example, it is possible to read one or more value sets with one Sql Query.

Alternatively, the result could be just one scalar value.

SELECT COUNT(*) as Result


FROM [FixTable]

Using the above sample data the result of this query is as follows.
Result
404

- 104 -
Communication

- 105 -
Communication Settings
The communications settings are displayed from the Communications entry in the Application Explorer Main
settings dialog or from the Settings task when the Communications folder is selected in the Application
Explorer configuration tree. The communications settings affect the operation of Data Acquisition, Network
applications, and C-CURE Building Management System server interfaces. Show picture

l Data acquisition - See the topic Data acquisition settings


l Networking - See the topic Networking settings
l Servers - See the topic Servers settings
l Regulation - See the topic Data Flow Regulation Settings.

- 106 -
Data Flow Regulation Settings

Data flow statistics are displayed in the Audit dialog. See the Audit diagnostics book for information.

Data Flow Regulation Before Processing


Before processing refers to raw data waiting to be sent to the Variables Manager (variables tree). Once data
is in the Variables Manager, it is processed and then awaits distribution to C-CURE Building Management Sys-
tem other managers.
Data is queued in a buffer whilst waiting entry to the Variables Manager. The flow control mechanism tests
the condition of the buffer periodically (at the rate specified by Condition check period). If the data in the buf-
fer exceeds the Suspension threshold, the source manager is temporarily suspended until, at a subsequent
test, the data is at or below the Continuation threshold.
Before processing regulation is applied only to the Communication Manager (Equipment) and the Network
Manager (Networking). Data is measured as the number of frames for Equipment and the number of blocks
for Networking.

Data Flow Regulation In Process


In process refers to data in the Variables Manager that is waiting to be distributed to the other managers of
C-CURE Building Management System.
The data waiting to be processed is placed in a buffer. The flow control mechanism tests the condition of this
buffer periodically (at the rate specified by Condition check period). If the data in the buffer exceeds the Sus-
pension threshold, C-CURE Building Management System is stopped from requesting any more data, until at
a subsequent test, the data is at or below the Continuation threshold.
Data is measured as the number of variables.

Data flow regulation properties


The data flow regulation properties appear in the regulation section of the Communications Settings dialog.
Show picture

- 107 -
Data acquisition

- 108 -
Managing Data Acquisition in the Application Explorer

The Data acquisition folder includes BACnet, Equipment, DDE, DNP3, IEC 60870-5, IEC 61850, LonWorks,
OPC and SNMP Manager.

Tasks available when the Data Acquisition folder is selected


Icon Task Description
Display the general data acquisition settings dialog that includes all settings for
Settings
folders subordinate to it.

- 109 -
Data Acquisition Settings
The Data Acquisition Settings dialog is accessed from the Application Explorer by using the Settings task
when the Data Acquisition folder is selected in the Application Explorer's configuration tree. Show picture

Prior to version 10, the overflow tolerance settings were only applied to values with an equipment
source. They now apply to all data acquisition sources.

l All devices - Settings applicable to all data acquisition devices.


l Overflow tolerance - By default, if the source value goes outside of the configured maximum
and minimum the corresponding register value becomes invalid. To prevent this happening it is
possible to add a tolerance to the configured limits using the following options.
l None - There is no overflow tolerance. If the value in the equipment goes outside of the
specified range, the register variable becomes invalid. This is the default setting.
l On physical value - A tolerance is applied to the value of the register. The register value is
allowed to go outside of its range by a percentage specified by the tolerance minimum and
maximum values. Should the register be forced outside of this range it will become
invalid.
For example, the tolerance minimum and maximum are both set to 200 ‰ The range of
the register is 2 (minimum) and 12 (maximum). The tolerance for the maximum will be
200 / 1000 * (12 - 2) = 2. That is the register will be allowed a maximum value of 14. The
tolerance for the minimum will also be 200 / 1000 * (12 - 2) = 2. That is the register will
be allowed a minimum value of 0.
When a register has a deadband applied to it, this is also taken into account. Taking the
above example and using a deadband of 3. The deadband is specified in engineering units.
If the value of the register was 13 and an the value in the equipment changed so that the
register should increase to 15 (change of 2) the register remains valid with a value of 13
due to the deadband even though the theoretical value of 15 should force it to be invalid.
l On physical value with clamping - A tolerance is applied to the value of the register. The
register remains valid within its range plus the value specified by the tolerance. However,
the value of the register is clamped to its maximum or minimum value. For example, the
tolerance minimum and maximum are both set to 10 (percent). The range of the register
is 0 (minimum) and 100 (maximum). The tolerance for the maximum will be 10 / 100 *
(100 - 0) = 10. The register will only display a maximum value of 100. Values in the equip-
ment equivalent to 100 to 110 will result in a register value of 100. A value in the equip-
ment equivalent to greater than 110 will cause the register to become invalid. The same
principle will apply to the minimum value. As with the option On physical value, the
register deadband is also taken into account.
l On device value - A tolerance is applied to the raw value before scaling. The value is
allowed to go outside of its range by a percentage specified by the tolerance minimum and
maximum values. Should the value be forced outside of this range the register will
become invalid.

- 110 -
l On device value with clamping - A tolerance is applied to the raw value before scaling. The
value remains valid within its range plus the value specified by the tolerance. However,
the value is clamped to the range specified by minimum and maximum parameters.
l Minimum - The tolerance for when a value is at the minimum of its range. Specified in
1/1000ths of the range.
l Maximum - The tolerance for when a value is at the maximum of its range. Specified in
1/1000ths of the range.
l File transfer
l Backup file before download - When using file transfer, if this setting is activated, a
backup copy of any file that already exists on the C-CURE Building Management System
machine is made before downloading it again. The existing file is renamed using a .bak
extension.
l Mirroring
l Default destination folder - Defines the default storage folder for the File transfer
feature.
l Default synchronization period - Defines the default synchronization period for the
File transfer feature. Default is 10 minutes.
l BACnet - Settings applicable to the BACnet communication driver. See the Settings topic in the
BACnet book.
l Equipment - Settings applicable to the Equipment communication drivers. See the Setting topic in the
Equipment book.
l DDE - Settings applicable to the DDE client. See the Settings topic in the DDE book.
l DNP3 - Settings applicable to the DNP3 communication driver. See the Settings topic in the DNP3
book.
l IEC 60870-5 - Settings applicable to the IEC 60870-5 communication driver. See the Settings topic in
the IEC 60870-5 book.
l IEC 61850 - Settings applicable to the IEC 61850 communication driver. See the Settings topic in the
IEC 61850 book.
l OPC - Settings applicable to the OPC client. See the Settings topic in the OPC book.
l SNMP - Settings applicable to the SNMP Manager communication driver. See the Settings topic in the
SNMP book.

- 111 -
File Transfer
By file transfer, we mean the transfer of a file from a communication object to the C-CURE Building Man-
agement System machine. At the time of writing, file transfer is supported for the following data acquisition
drivers:

l IEC 61850 - Transfer of files from an IEC 61850 device.

File transfer can be implemented in three ways.

l Mirroring - Automatic, periodic, transfer of files in background (without user interaction).


l File transfer helper - Transfer on demand, by a user, of one or more files and / or folders using the
File Transfer Helper. The user must have the rights to access the Application Explorer.
l SCADA Basic - Transfer of one or more files and / or folders by script. See the FileTransfer instruction
in the SCADA Basic help.

Using mirroring
Mirroring is enabled and configured at the device level using the following advanced properties. Show pic-
ture

l File transfer
l Mirroring
l Use mirroring - Enable automatic, periodic, file transfer from the device to the C-CURE
Building Management System machine in background.
l Source - The name of the folder to monitor on the device's filesystem. Any file in
the folder will be transferred. If empty, the device root folder is monitored.
l Destination - The destination folder for the transferred files on the C-CURE Building
Management System machine's filesystem.
l Default - Use the default folder as configured in Data acquisition settings.
l Custom - Use a folder specific to the device. The folder location can be a full
path like "C:\\MyFiles" or a relative path like "..\\..\\MyFiles". If the folder loc-
ation is empty, the Project's TP folder is used.
l Synchronization period - The period at which the transfer takes place if new files are
available.
l Default - Use the default period as configured in Data acquisition settings.
l Custom - Use a specific period specified in minutes.

Using the File transfer helper


The File transfer helper can be opened from the Application Explorer when a data acquisition device is selec-
ted in the configuration tree. Show picture

- 112 -
On opening the Helper, C-CURE Building Management System will browse for, and display the list of avail-
able files in the device. Show picture

Individual files can be downloaded or deleted using the tools on the toolbar or by clicking the File menu and
selecting the appropriate command. By default, files are downloaded to the project's TP folder but this can
be changed during the download process if required.

- 113 -
BACnet

- 114 -
Overview of BACnet
BACnet is the term commonly used to refer to the ANSI/ASHRAE Standard 135, adopted and supported by
the American National Standards Institute (ANSI) and the American Society of Heating Refrigeration and
Air-Conditioning Engineers (ASHRAE). BACnet stands for Building Automation and Control network. It is a
non-proprietary open protocol communication standard designed to handle data exchange in Building Auto-
mation Systems (BAS).

l The BACnet protocol defines a number of data link / physical layers, including ARCNET, Ethernet,
BACnet/IP, Point-To-Point over RS-232, Master-Slave/Token-Passing over RS-485, and LonTalk.
l A BACnet network contains one or more devices. A device will often correspond to a physical piece of
equipment.
l Each device contains one or more objects. The available objects are defined by the BACnet standard.
l There can be one or more instances of an object in a device.
l A device must always contain at least one instance of the Device object.
l Each object contains one or more properties. The available properties are defined by the BACnet stand-
ard.

You can obtain a copy of the complete BACnet standard The BACnet Standard—Standard 135-2012
from the ASHRAE Organization's book store.
C-CURE Building Management System has been validated as a BACnet Advanced Workstation (B-AWS).
The BACnet driver supports only BACnet/IP using the host PC's network interface card. See the BACnet PICS
for detailed information about BACnet support.
The BACnet convention is to specify functionality by describing the following interoperability areas.

l Network and Device management


l Data sharing
l Alarm and Event notification
l Trending and Event logging
l Scheduling

This book covers these interoperability areas and in particular, what is required when configuring BACnet
connections, network, and devices, data sharing, and the use of the BACnet automation objects specifically
the Alarm Notification Class, Trend Logs, Trend Log Multiple, Event Logs, Schedules and Calendars.
BACnet configuration is accessed using the Application Explorer.
Interoperability area Description Primary help
topics
Network and device man- Connection management and device control including: Adding a BACnet
agement network
l The ability to expose C-CURE Building Management
System BACnet device to other BACnet physical Adding devices to
devices a BACnet net-
l Device and object discovery on a BACnet network work
BACnet device
management
tasks
Data sharing The base monitoring and control features, keeping real time The BACnet Map-
values up-to-date, handling commands and command pri- ping dialog
orities. How to configure
data sharing
Alarm and event notification Features related to alarm notification and acknow- Using BACnet
ledgement, including the handling of Notification Class Notification Class
objects. objects
How to configure
C-CURE Building
Management Sys-
tem to receive

- 115 -
alarm and event
notifications
Trending and event logging Features related to trend and event logging, trend and Using BACnet
logged events retrieval, including the handling of Trend Log, Trend Log
Trend Log Multiple and Event Log objects. objects
How to configure
C-CURE Building
Management Sys-
tem to retrieve
BACnet trend
records
Scheduling Features related to Scheduling, including the handling of Using BACnet
Schedule and Calendar objects. Schedule and Cal-
endar objects
How to configure
C-CURE Building
Management Sys-
tem to use a
BACnet Schedule
How to configure
C-CURE Building
Management Sys-
tem to use a
BACnet Calendar

The BACnet driver is licensed and available to order.

The BACnet driver can be used in trial mode. Communication will automatically stop at the end of
the trial period.
In order to support both the B-OWS and B-AWS requirements, C-CURE Building Management System
BACnet implementation was subject to a major rework in version 11.2. See the topic Using the
BACnet configuration of a project configured with a previous version of C-CURE Building Man-
agement System for information about the migration path.

- 116 -
Managing BACnet in the Application Explorer

Tasks applicable to BACnet


When the BACnet folder is selected.
Icon Task Description
Open the BACNet BBMD configuration dialog from where C-CURE Building Man-
BBMD
agement System BBMD table is configured.
Open the BACnet Settings dialog. The settings affect the general operation of
Settings
the BACnet driver and related data handling.
Add a network Add a connection to a BACnet network.
When a BACnet network is selected.
Icon Task Description
Add a device Add a device to a BACnet network.
Start network Start a connection to a BACnet network.
Stop network Stop a connection to a BACnet network.
Clock syn-
Generate a time synchronization message on the network.
chronization
Open the BACNet Network Interfaces dialog from where C-CURE Building Man-
Network interfaces agement System connection to, and behavior on, the BACnet network is con-
figured.
Remove Permanently remove the configuration of the network.
Properties Open the properties dialog for the network.
Open the mapping dialog used to link C-CURE Building Management System
Mapping
data to BACnet objects and properties.
When a BACnet device is selected.
Icon Task Description
Add a Notification
Add a Notification Class object to the device.
Class
Add a Trend Log Add a Trend Log object to the device.
Add a Trend Log Mul-
Add a Trend Log Multiple object to the device.
tiple
Add an Event Log Add an Event Log object to the device.
Add a Schedule Add a Schedule object to the device.
Add a Calendar Add a Calendar object to the device.
Start device Start the connection to the device.
Stop device Stop the connection to the device.
Cold start* Send a message to a device to instruct it to re-boot.
Warm start* Send a message to a device to instruct it to reset to a predefined state.
Enable com-
Send a message to the device to instruct it to enable communication.
munication*
Disable com-
Send a message to the device to instruct it to stop initiating messages.
munication ini-

- 117 -
tiation*
Disable com- Send a message to the device to instruct it to stop responding to requests and
munication* stop initiating messages.
Send a message to the device to initiate a backup of its programs and con-
Backup*
figuration to a file on the C-CURE Building Management System machine.
Send a message to the device to initiate a restore of its programs and con-
Restore*
figuration from a file on the C-CURE Building Management System machine.
Helpers Open the Helpers dialog.
Displays information about the device itself (to display information about its
Details configuration in C-CURE Building Management System use the Properties
task).
Remove Permanently remove the configuration of the device.
Properties Open the Device Properties dialog.
*Only available if enabled in the BACnet Settings dialog.
When a Notification Class object is selected.
Icon Task Description
Start Notification
Start the Notification Class object.
Class
Stop Notification
Stop the Notification Class object.
Class
Remove Permanently remove the configuration of the Notification Class object.
Properties Open the Notification Class Properties dialog.
When a Trend Log or Trend Log Multiple object is selected.
Icon Task Description
Start Trend Log Start the Trend Log object.
Stop Trend Log Stop the Trend Log object.
Remove Permanently remove the configuration of the Trend Log object.
Properties Open the Trend Log Properties dialog.
When an Event Log object is selected.
Icon Task Description
Start Event Log Start the Event Log object.
Stop Event Log Stop the Event Log object.
Remove Permanently remove the configuration of the Event Log object.
Properties Open the Event Log Properties dialog.
When a Schedule object is selected.
Icon Task Description
Start Schedule Start the Schedule object.
Stop Schedule Stop the Schedule object.
Remove Permanently remove the configuration of the Schedule object.
Properties Open the Schedule Properties dialog.
Add item Add an output item to the selected schedule.
Remove item Remove the selected output from the selected schedule.
When a Calendar object is selected.
Icon Task Description
Start Calendar Start the Calendar object.
Stop Calendar Stop the Calendar object.
Remove Permanently remove the configuration of the Calendar object.
Properties Open the Calendar Properties dialog.

Rules and behavior of cut, copy and paste

- 118 -
The following table describes the rules and behavior, and in particular any restrictions, when using cut and
paste, or copy and paste, on configuration objects in the BACnet folder.
BACnet object Behavior
Network The pasted Network is given a unique name.
Any subordinate Devices and Automation Objects are duplicated using the original
name.
The mapping of any variables is not duplicated.
Device The pasted Device is given a unique name.
Any subordinate Automation Objects are duplicated using the original name.
Notification Class, The pasted Automation Object is given a unique name.
Trend Log, Trend Log
Multiple, Event Log,
Schedule, Calendar

- 119 -
BACnet Settings
The Settings tab contains those settings associated with the general operation of the BACnet driver. The fol-
lowing screenshot was taken with the default configuration. Show picture

l Communication
l Bad devices verification period - The period at which the device will be checked when trying to
re-establish communication after a watchdog error has been detected. The default is 1 minute.
l COV lifetime - The validity period for COV messages from a device. The driver must subscribe to
each device within this period or COV notification are no longer sent. The default is 1 hour.
l Number of APDU retries - The number of service requests retries to perform before returning an
error. The default is 2.
l APDU timeout - The period allowed for a device to respond to a service request. The default is 3
seconds.
l Scan timeout - The period allowed for a reply when executing a network scan. The default is 10
seconds.
l Process identifier - The identity of C-CURE Building Management System, as a BACnet client,
when configuring a notification. The default is 123456.
l Max number of requests per device - The maximum number of concurrent requests that can be
made to a device. The default is 2.
l Alarms
l Acknowledge alarm/event notifications - The mechanism by which C-CURE Building Man-
agement System acknowledges the BACnet alarm and events (To Normal, To OffNormal & To
Fault) generated by Notification Class objects.
l Never - C-CURE Building Management System never acknowledges notifications.
l Automatic upon reception - C-CURE Building Management Systems internal mechanisms
automatically acknowledge all three alarm transitions as they are received.
l Upon user acknowledgement - To OffNormal notifications are acknowledged when the cor-
responding alarms are acknowledged by an operator (typically from an Alarm Viewer). To
Normal and To Fault transitions are automatically acknowledged upon reception by C-
CURE Building Management System's internal mechanisms.
l Clock synchronization of devices - The method used to synchronize the clock of BACnet devices.
l Automatic at start-up - Clock synchronization is performed automatically when either C-CURE
Building Management System or network is (re)started.
l Methods
l By broadcast of the UTC time - Use UTC (Universal Coordinated Time) in the time syn-
chronization broadcast.
l By broadcast of the local time - Use the computers local time in the time synchronization
broadcast.
l Multicast clock synchronization - Distribute time synchronization by a multicast of the
local time.
l Clock synchronization period (min) - The interval, in minutes, at which TimeSyn-
chronization and UTCTimeSynchronization requests are sent. If set to 0, it is

- 120 -
disabled. The default is 0.
lAlign synchronization - If the Clock synchronization period is non 0, and is a factor
of (divides without remainder) an hour or day, then the beginning of the interval is
aligned to the hour or day. Not ticked by default.
l Synchronization offset - The offset, in minutes, from the beginning of the interval
specified for time synchronization until the actual time synchronization requests are
sent. The offset used is the value of Synchronization offset property modulo the
value of Clock synchronization period property. The default is 0.
Example: If Synchronization Offset is 31 and Clock synchronization period is 30, the
offset used is 1. Synchronization offset will have no effect if Align synchronization is
disabled.
l Advanced features
l Enable backup and restore - Enable the backup and restore mechanism (BIBB DM-BR-A).
l Enable communication control - Enable the device communication control mechanism (BIBB DM-
DCC-A).
l Enable device reinitialization - Enable the reinitialize device mechanism (BIBB DM-RD-A).
l Enable objects creation and deletion - Enable the object creation and deletion mechanism (BIBB
DM-OCD-A).

- 121 -
BACnet Traces
The Traces tab enables diagnostic trace messages associated with the BACnet driver. Enabling a trace gen-
erates a corresponding message, which is logged in the Trace Files and displayed in the Event Viewer dialog
(F7) when the condition occurs. The following screenshot was taken with the default configuration. Show pic-
ture

l Trace 1: Error level 1 - Unused.


l Trace 2: Configuration - Enable traces related to the global configuration.
l Trace 3: Binding - Enable traces related to the detection of all devices connected to the BACnet net-
work.
l Trace 4: Full errors - Enable all traces related to errors at the BACnet global level.
l Trace 5: Full details - Enable more detail for traces related to errors at the BACnet global level.
l Trace 6: Reserved
l Trace 7: Data creation
l Trace 8: Clock synchronization - Traces related to time synchronization.

- 122 -
BACnet BBMD Configuration
BACnet device discovery uses services that rely on the use of broadcast messages. As broadcast messages
are normally not forwarded by routers, BBMD (BACnet/IP Broadcast Management Device) is a technology to
enable BACnet broadcast messages to be sent to other subnets with BACnet IP devices. Each BBMD, in this
case C-CURE Building Management System, manages a table that lists any other BBMD's on the network.
In some cases, using static binding can be a good alternative to setting up a BBMD. See BACnet
Device Advanced Properties for more information.

How to configure a BBMD table


C-CURE Building Management System BBMD table(s) are configured from the BBMD task.

1. Open to the BBMD configuration.


a. Navigate the Application Explorer configuration tree and select the BACnet node.
b. Select the BBMD task. The BBMD configuration dialog opens. Show picture

2. Create a new BBMD list.


a. Click the List Creation tool. The BBMD List Configuration dialog opens. Show picture

b. Enter the list Name. A default name for the list is suggested. Accept the name or enter one of
your own.
c. If the application is running in a multi-station environment, select the Server where the list will
be active. Leaving this field blank means it will be active for all stations.
d. Click OK to confirm the configuration.
3. Add the BBMD's to the list.
a. Select the list from the left pane. Click the BBMD configuration tool. The BBMD Configuration dia-
log opens. Show picture

- 123 -
b. Enter the IP address.
c. Change the Port Number if it is different to the default.
d. Enter the Mask.
e. Click Apply to confirm the configuration
f. Repeat steps b to e to add further BBMDs as required.
g. Close the BBMD Configuration dialog.
4. Repeat steps 2 and 3 to configure any further lists.
5. Close the BBMD dialog.

BBMD redundancy is not supported. The list selected in step 2.c must be a station name, a list or
association containing only a single station.

- 124 -
Configuring a BACnet network

- 125 -
Adding a BACnet Network
A BACnet Network object in C-CURE Building Management System configuration represents and provides
access to a physical BACnet network. If configuring a multi-station application there must be a cor-
responding Network Interface for each Network Server List (producer).

How to add a network

1. Select the BACnet node in the Application Explorer and select Add a network from the task list. The
BACnet Network dialog opens. The following screenshot was taken with the default configuration.
Show picture

2. Enter the name of the network in the Name text box. This is the name by which the network will be
known in C-CURE Building Management System. You can accept the suggested default or enter one of
your own.
3. Enter a description of the network. The description appears in the contents pane of the Application
Explorer and can be useful to identify the network later. The description is optional.
4. To activate the network when C-CURE Building Management System is started, tick Activate at start-
up. Alternatively, a SCADA Basic program can be used to activate the network.
5. Click on OK to confirm the configuration and close the dialog.

The EDE files tab


The EDE files tab contains a list of EDE files referenced for one or the other device that will be configured on
the network.
See Using EDE files for configuring BACnet devices for more information.

The Advanced tab

l Networking
l Servers - If the BACnet network is part of a multi-station application, select the name of the
Servers List. The BACnet network will only be started on stations that appear in the servers list.
l Backup and restore
l Storage folder - The storage folder for files used by the Backup and Restore tasks. You can use
either a relative or an absolute path. A relative path will be relative to the default, which is the
project's TP folder.

At runtime, a given C-CURE Building Management System station can manage only one BACnet net-
work interface, so for a given station in the Servers list, only one BACnet network can be active at a
time.
As a consequence, in most cases, only one BACnet network is configured in the project, with the
Servers list containing either one station or an association of stations (for data acquisition redund-
ancy). In some rare cases of distributed applications, you may have to configure more than one
BACnet network, each produced by different stations or associations.
But in all cases, a station cannot be part of the Servers list for more than one of the configured
BACnet network.

- 126 -
Configuring a BACnet/IP Network Interface
The configuration of the BACnet/IP Network Interface determines C-CURE Building Management System con-
nection to, and behavior on, the BACnet network.
It includes the exact list of network interfaces each station will use to access a BACnet network. Pre-defining
this list allows for an easier management of the project configuration in multi-station (network) application.
Each Network Interface includes several BACnet properties, in particular the Device Id that C-CURE Building
Management System uses for the BACnet device object it exposes to the other devices on the network.
You need to configure one or more Network Interfaces if you are configuring a multi-station (networked)
application or require something other than the default connection port properties.
This configuration may need to be changed at deployment time if the IP addresses and Network Interface
Cards are different on the development system to that of the installed system.

The default connection interface


If you do not configure a connection, then, as soon as you configure a BACnet Network, a default connection
is made using the following properties.

l Station name - Local Station.


l IP properties
l IP address - 127.0.0.1 (The IP loopback address).
l Port number - 47808.
l BACnet properties
l Network Id - 0.
l Device Id - 62400.

How to configure a Network Interface

1. Navigate the Application Explorer configuration tree and select the BACnet node.
2. Select the Network Interface task. The Network Interface dialog opens. Show picture

3. Select Add Network interface from the toolbar. The Network interface properties dialog opens. The fol-
lowing screenshot was taken with the default configuration. Show picture

- 127 -
4. Enter the network interface Name. This is the name by which it will be identified in C-CURE Building
Management System. You can accept the proposed name or enter one of your own.
5. Select the Station Name. If configuring a standalone application select Local Station. If configuring a
networked application, select the station on which the network interface will be used.
6. Enter the IP parameters.
a. If configuring a networked application select a node of the chosen networked station, or provide
the IP address of the network interface on the station. Show picture

OR
b. If configuring a standalone application enter the IP address of the local station in the IP address
field. The Node field is not used. Show picture

7. Change the UDP Port number if necessary.


8. Configure the BACnet properties. You can change the Network Id and Device Id if necessary.
9. Select OK to confirm the configuration and close the dialog. You must restart the network before the
configuration takes effect.

Why is my configured Network Interface dimmed?


Configured network interfaces are displayed, one on each line, in the Network Interfaces dialog. Only the
active network interface is displayed in a normal font, all others will be dimmed. If you have just configured
a network interface, it will be dimmed at least until the network is restarted.

Advanced properties
A foreign device can be a full-time node on a foreign subnet that does not have a BBMD, or a part-time par-
ticipant (for example a device accessed via a SLIP or PPP connection). You can configure a foreign device

- 128 -
using the Network interface dialog, Advanced tab. Show picture

l IP address - The IP address of the foreign device.


l Port number - The port number of the foreign device.

- 129 -
Using EDE Files For Configuring BACnet Devices
It is not always practical to scan the BACnet network to discover the available devices. For example, the net-
work might not be complete or you could be developing the application at a different location. As an altern-
ative, you can use the device configuration from one or more EDE (Engineering Data Exchange) files. We
call this offline configuration as opposed to online configuration when scanning the network for devices.
The format of the data in EDE files is defined by the BIG-EU organization. By default, C-CURE Build-
ing Management System expects them to be in csv (comma-separated value) format and with a .csv
file extension. In order to cope with files generated by vendor-specific tools that are not fully com-
pliant with the standard EDE format, C-CURE Building Management System provides the ability to
import a file even if its syntax or format is vendor-customized. See below for more information.
After associating an EDE file with a Network, you also have to configure the devices in which C-CURE
Building Management System is interested before they appear in the mapping dialog. See the topic
Adding devices to the BACnet network.

How to add an EDE file for use when configuring devices

1. Select a BACnet network from the Application Explorer configuration tree and, from the task list,
select Properties. The BACnet Network Properties dialog opens.
2. Select the EDE files tab. Show picture

3. Click the Add button. A File Select dialog opens. By default, it displays files in the project's TP folder
but you can navigate to an alternative location if necessary.
4. Select the file to add and click the Open button. A dialog box opens with which you can define any
format or syntax element specific to your EDE file. See below for more information. Once you val-
idate, the selected EDE file is added to the configuration.
5. Repeat steps 2 and 3 if you have more than one file to import.
6. Close the BACnet Network Properties dialog.

C-CURE Building Management System allows referencing EDE files containing up to 10 000 BACnet objects.
If an EDE file contains more objects, it can be split over multiple files.

About the Keyname property


The Keyname is a property only found in EDE files - it cannot be discovered online from the BACnet network.
It represents a unique combination of an Object and Instance.

Non-standard EDE files


A syntax detection mechanism is available to simplify loading a file that do not fully comply with the EDE
standard. This includes detection of the delimiter, some of the usual alternate field names...
When this automatic syntax detection is not enough, and in particular if the EDE file does not includes a
header row, you can manually customize some of the parsing elements. It is accessible after you have selec-
ted an EDE file (step 4) and allows you to define:

- 130 -
l File format elements: Delimiter and Code page,
l File syntax elements: Name of fields required by C-CURE Building Management System.

Show picture

Example:
An EDE file may be using the semicolon as separator instead of the standard comma. In this case, simply
select Semicolon as the Delimiter when adding the EDE file.
The most common use case is due to vendors using non-standard field names. In this case, open the Content
tab of the dialog box, spot the expected field name (for example 'hi-limit'), and type-in the field name in the
first row called Reference, as it appears in your particular EDE file (for example 'high-limit').
The Content tab can be used to check if the EDE file is interpreted correctly. As soon as you click the Apply
button, the file is loaded using any parsing customization you may have defined, and its content is shown in
the Content tab's grid. Show picture

Despite efforts to cope with files that are not fully compliant with EDE format guideline, the import
will be aborted if a necessary field is missing in the file.

- 131 -
BACnet Network Traces
The Traces tab contains properties that allow you to enable diagnostic trace messages associated with the
BACnet network object. Enabling a trace generates a corresponding message, which is logged in the Trace
Files and displayed in the Event Viewer dialog (F7) when the condition occurs. The following screenshot was
taken with the default configuration. Show picture

l Trace 1: Error level 1 - Unused.


l Trace 2: Error level 2 - Unused.
l Trace 3: Device binding - Traces related to the configuration of detected devices.
l Trace 4: Full errors from the BACnet stack- Traces related to the BACnet driver access.
l Trace 5: Full details - More detail for traces related to errors at the BACnet network level.
l Trace 6: Scan - Traces related to the BACnet network scanner.
l Trace 7: Full errors - All traces related to errors at the BACnet network level.
l Trace 8: Network status - Traces related to the state of BACnet network objects.
l Trace 10: Create devices - Traces related to the creation of device objects.
l Trace 11: Delete step - Traces related to the deletion of BACnet network objects.
l Trace 12: Loading EDE files - Traces related to the loading of EDE files.
l Trace 13: Start and stop BACnet stack- Traces related to start and stop of the BACnet driver.
l Trace 14: Add or modify BACnet items (buffering) - Traces related to the items added in buffering for
mapping.
l Trace 15: Global reporting events - Traces related to BACnet services for alarm summary information
sent by devices.

- 132 -
Managing BACnet devices

- 133 -
Adding Devices to a BACnet Network
A BACnet Device object in C-CURE Building Management System configuration represents and provides
access to, a physical BACnet device. The physical BACnet device is known by its Device Id. In C-CURE Build-
ing Management System, it is known by the Name that you give it during the configuration.
Physical BACnet devices can be discovered online by scanning the network (also known as online con-
figuration). If, at the time of configuration, the developer does not have access to the BACnet network, it is
also possible to input devices’ properties manually.
If the BACnet system engineering process includes the use of EDE files, C-CURE Building Management Sys-
tem is able to discover BACnet devices using those files. This is known as offline configuration. See the topic
Using EDE files for configuring BACnet devices for information about how to use EDE files.

How to add a device

1. Select a BACnet network in the Application Explorer. From the task pane, select Add a device to open
the BACnet Device dialog. The following screenshot was taken with the default configuration. Show pic-
ture

2. Enter the Device Id. You can either type in the Id, or use the Ellipsis button to open the Device List dia-
log from where the Device Id can be selected. The BACnet Device List dialog has two tabs, one con-
taining a list of online devices (scanned), and the other with a list of offline devices (discovered from
EDE files). Show picture

- 134 -
3. Select a device from either the Online or Offline tab as appropriate and click the OK button.
a. If you select an online device. The Name and Device Id fields are populated with information
from the scanned device.
b. If you select an offline device. The Name, Description and Device Id fields are populated with
information from the EDE file and two additional read only fields appear, Keyname and EDE file
name, which indicate that the device was configured offline and are used as a reference to an
EDE file. Show picture

4. Enter a name for the device in the Name text box. This is the name by which the device will be known
in C-CURE Building Management System. You can accept the suggested name or enter one of your
own. If configuring an offline device the name will default to that found in the EDE file.
5. Enter the description of the device in the Description text box. The description appears in the contents
pane of the Application Explorer and can be useful to identify the device. If configuring an offline
device the description will default to that found in the EDE file. The description is optional.
6. Select Activate at startup if the device is to be activated when the network starts. If this property is
not selected then a SCADA BASIC program can be used to activate the device.
7. Click on OK to confirm the configuration and close the dialog.

The Watchdog tab


A watchdog mechanism is provided to monitor the presence of the physical device on the BACnet network.
The selected property is polled at the configured interval and, if there is no reply, it is assumed that the
device is not present. When a device has been detected as not present, the following happens:

l The system variable SYSTEM.BACNET.<NetworkId>.<DeviceId>.STATUS is set to 1 (normally 0).


l A warning icon is displayed in the BACnet configuration.
l The property will continue to be polled, but at the rate set in the Bad devices verification period prop-
erty, until the device is present once again. See the topic BACnet settings.

To configure the watchdog you select an Object type, Instance and Property. Show picture

- 135 -
By default, the watchdog relies on the ability to access the system-status property of the Device object. The
BACnet standard requires one, and only one, instance of the Device object to be exposed by each physical
device and therefore when the Device object is used for the watchdog the Instance property is read only and
always set to that of the device being configured.
However, sometimes you may find a device that is not 100% compliant with the BACnet standard and does
not have a Device object. In that case, you must select another Object, Instance and Property that the
device does support and expose.

The BACnet Device List


The BACnet Device List dialog contains a list of all devices known to C-CURE Building Management System.
It is displayed from the ellipsis button adjacent to the Device Id field in the Device Configuration dialog. The
dialog contains two tabs, one for online devices (discovered on the network) Show picture, and the other for
offline devices (discovered in EDE files) Show picture.

- 136 -
The Online list can be re-generated using the Refresh button.

- 137 -
BACnet Device Advanced Properties
The following screenshot was taken with the default configuration. Show picture

l Binding
l Dynamic - Use the classic BACnet binding mechanism based on UDP broadcast messages to
browse the devices on the BACnet network.
l Static - Use the static device binding mechanism to communicate directly with an IP device
without soliciting the classic BACnet browsing based on UDP broadcast messages.
l MAC address - The device BACnet MAC address, which can be entered in one of two
formats:
l The socket address under the form <IP address:UDP port>. For example
10.59.5.151:47808
l As the actual BACnet MAC address. For example 0A:3B:05:97:BA:C0
Note that the BACnet MAC address format, as defined by the standard, is a con-
version of the socket address as six bytes, and does not match the MAC address as
defined usually.
IP address: 10.59.5.151 > 0A:3B:05:97
Port : 47808 > BA:C0
l Network identifier - The BACnet network number or network Id. By default, 0 is used to
indicate the local network (as defined in the BACnet standard).
l Monitoring
l BACnet objects
l Status flag management - Configure how the BACnet device status flags are interpreted.
l Process FAULT as invalid quality.
l Process OVERRIDDEN as invalid quality.
l Process OUT_OF_SERVICE as invalid quality.
l Accumulator
l Apply scale on instance value - Calculate the value of a variable mapped to the
object by using the PresentValue and the Scale properties.
l Writing
l Update the variable immediately with the written value - For a variable configured with polling,
when a command is sent successfully, setting this property updates the variable value imme-
diately with the written value (otherwise you have to wait for the next poll).
l Synchronize values after writing – Used to synchronize the client and server after a write has
been performed.

- 138 -
l No synchronization – No action taken.
l Synchronize by read – The value in the client is read back from the server cache. This is
the default selection.
l Alarming
l Timestamp
l Use time provided by device - Use the timestamp included in the event notification.

l Device management
l Password - The password for all services that are password protected, such as Rein-
itializeDevice and DeviceCommunicationControl.
l Time duration for communication control (min) - Used for DeviceCommunicationControl to indic-
ate the number of minutes that the remote device shall ignore all APDUs other than DeviceCom-
municationControl and, if supported, ReinitializeDevice APDUs. If the “Time Duration” property
is 0, then the time duration is considered indefinite, meaning that only an explicit DeviceCom-
municationControl or ReinitializeDevice APDU will enable communications.
l Backup and restore
l File transfer max size
l Automatic detection - Automatically detect the file transfer behavior when receiving
backup files or sending restore files.
l Customize - Force the number of bytes, or the record count, according to the access
mode defined by the BACnet File object (stream or record access).
l Stream access (bytes) - The number of bytes if using stream access.
l Record access - The number of records if using record access.
l Timeout - Configure a specific timeout for the backup/restore process. The
backup/restore process can take much longer than other requests.
l Disable - Disable specific timeout.
l Enable - Enable a specific timeout. The value is entered in minutes.
l Interoperability issues
l Monitoring
l Switch automatically to polling mode if COV not supported - Force monitoring by polling if
COV is not supported or if COV subscription limit in the device has been reached.
l On-demand read - Defines which BACnet service shall be used for reading properties on-
demand, for example to fill-in property grids in Helpers and other design and diagnostic
tools.
l Automatic detection - The driver will determine the most adequate service depend-
ing on the BACnet device capabilities. Default selection.
l Use ReadProperty service - The ReadProperty service will be used even if a more
suitable service is supported by the device.
l Use ReadPropertyMultiple service - The ReadPropertyMultiple service will be used,
and the action may fail if the device does not support this service.

In some cases, using static binding can be a good alternative to setting up a BBMD. See BACnet
BBMD Configuration for more information.

- 139 -
BACnet Device Traces
The Traces tab contains properties that allow you to enable diagnostic trace messages associated with the
BACnet device object. Enabling a trace generates a corresponding message, which is logged in the Trace
Files and displayed in the Event Viewer dialog (F7) when the condition occurs. The following screenshot was
taken with the default configuration. Show picture

l Trace 1: Error level 1 - Unused.


l Trace 2: Error level 2 - Unused.
l Trace 3: Binding - Enable traces related to device detection.
l Trace 4: Full errors from BACnet stack - Enable traces to display more details of errors related to the
communication stack.
l Trace 5: Full details - Enable all traces related to the device, not just error messages.
l Trace 6: Full errors - Enable more detail for traces related to errors at the device level.
l Trace 7: Device status - Enable traces related to the state of device objects.
l Trace 8: Add item - Enable traces related to the creation of items.
l Trace 9: Create Notification Class - Enable traces related to the creation of Notification Class objects.
l Trace 10: Delete step - Enable traces related to the deletion of a device.
l Trace 11: OnWrite method - Enable traces related to the writing to a device by C-CURE Building Man-
agement System.
l Trace 12: OnDataChange method - Enable traces related to change of data values.
l Trace 13: Connection - Enable traces related to device connection status.
l Trace 14: Reporting events - Enable traces related to event notifications transmitted by the device.
l Trace 15: Alarm helper - Enable traces related to the helper tool.
l Trace 16: Scan - Enable traces related to the BACnet device browsing.
l Trace 17: Text messages by notification – Enable traces related to notification of text messages from
devices.

- 140 -
Using the BACnet Device Management Tasks
C-CURE Building Management System BACnet interface provides a number of tasks to assist in the man-
agement of devices on your BACnet network.
The BACnet Device Management tasks are available to the developer in the Application Explorer only
if access to advanced features is activated in the BACnet settings dialog. See the topic BACnet set-
tings.

Icon Task Description


Cold start Send a message to a device to instruct it to re-boot.
Warm start Send a message to a device to instruct it to reset to a predefined state.
Enable com-
Send a message to the device to instruct it to enable communication.
munication
Disable com-
Send a message to the device to instruct it to stop initiating messages.
munication initiation
Disable com- Send a message to the device to instruct it to stop responding to requests and
munication stop initiating messages.
Send a message to the device to initiate a backup of its programs and con-
Backup
figuration to a file on the C-CURE Building Management System machine.
Send a message to the device to initiate a restore of its programs and con-
Restore
figuration from a file on the C-CURE Building Management System machine.

The communication related tasks directly affect a device's ability to communicate not only with C-
CURE Building Management System but also with other BACnet devices. Use with caution.

Location of the files used by Backup and Restore


The files used by backup and restore are located in a sub-folder of that configured in the Advanced tab of the
BACnet Network Configuration dialog. See the topic Adding a BACnet network. The files are stored in the
sub-folders \[Network Id]\[Device Id].

- 141 -
Synchronization of Device Clocks
BACnet devices maintain their own clock that is used to timestamp data and for other time-based oper-
ations. C-CURE Building Management System can be used to synchronize the clock of all BACnet devices on
a network by issuing time synchronization commands. A time synchronization command can be initiated in 3
ways.
The time is synchronized according to the method selected in the BACnet Settings dialog (UTC, local
or broadcast).

Automatic synchronization at start-up


If the property Automatically synchronize at startup is selected, a clock synchronization command will be
sent whenever the BACnet network is started.

Using the Clock Synchronization task


The clock synchronization task is available when a BACnet network is selected in the Application Explorer's
configuration tree. It opens the Time Synchronization dialog that contains the following commands. Show
picture

l Refresh - The Refresh button causes C-CURE Building Management System to read and update the dis-
play of the timestamp of all configured devices.
l Synchronize - The Synchronize button causes C-CURE Building Management System to issue a time
synchronization command.

Using a SCADA Basic script


The SCADA Basic instruction BACNET mode TIME_SYNCHRONIZATION can be used to issue a clock syn-
chronization command.

- 142 -
Overview of the BACnet Mapping Dialog
The BACnet Mapping dialog can be used to map automation objects (Notification Class, Trend Log etc.) to C-
CURE Building Management System devices configuration, and to map BACnet objects, properties and event-
s/alarms to C-CURE Building Management System variables and alarms. In addition it has a browsing cap-
ability, displaying the available devices, objects, properties and their values (if available), and some BACnet
network and device management functions.
The Mapping dialog can be used in either Online or Offline mode. You can switch between modes by clicking
the indicator in the Mapping dialog status bar.

l Online - Used to map BACnet objects from devices that are available on the network. See the topic
Adding devices to a BACnet network. Show picture

l Offline - Used to map BACnet objects from devices based on referenced EDE files. See the topic The
BACnet device list. Show picture

Both modes of the dialog allow you to map a variable (or other item) that already exists, or to create a new
one as part of the mapping process.

Changes that you make, including changing the value of properties, as well as adding and deleting
objects using the left panel, directly affect the configuration of the physical BACnet device. Unin-
tentional changes can have an impact on the BACnet system behavior.

Main features of the BACnet Mapping dialog

- 143 -
The BACnet Mapping dialog is opened from the Application Explorer when a BACnet network is selected using
the Mapping task. The dialog contains three panes.

l The left pane - Displays a list of devices and objects types. Right clicking on a network object displays
a context menu from where management tasks can be accessed. If the BACnet Mapping dialog is in
Online, mode the objects are discovered by sending requests to the device, new objects can be cre-
ated and existing ones can be deleted directly in the field device. If the BACnet Mapping dialog is in Off-
line mode, the objects are read from the EDE file(s). Selecting an object type will display the available
instances in the top right pane.
l The upper right pane - Displays available instances of the object type that is selected in the left pane.
If the object instance is mapped to a variable, or an automation object, its name is displayed in the
Variable/Object column. Clicking on an object instance refreshes a list of its properties displayed in
the lower right pane.
Right clicking in the pane displays a context menu from which several tasks are available including:
l Mapping and un-mapping variables for data sharing.
l Mapping and un-mapping automation objects to devices.
l Notification Class objects for alarm/event notification.
l Trend Log and Trend Log Multiple for access to trend logging
l Event Log for access to event logging.
l Schedule and Calendar objects for access to schedules.
l The lower right pane - Displays the list of properties for the object selected in the upper pane. If the
property is mapped to a variable or alarm, its name is displayed in the Variable/Object column.
Right clicking in the pane displays a context menu from which several tasks are available including:
l Mapping and un-mapping BACnet properties to variables for data sharing.
l Mapping and un-mapping BACnet alarm/events to variables for alarm and event notifications.
l The status bar - Displays, and allows selection, of online or offline mode. Also displays the full name
of the currently selected device and object.

Reading property values


The value of a single property can be refreshed by right clicking on it and selecting Read from the context
menu. Show picture

Writing property values


The value of a single property can be forced by right clicking on it and selecting Write from the context
menu. A dialog appears allowing a new value to be entered. The value must conform to the expected syntax

- 144 -
for the property. Clicking Execute sends the value to the physical device. Show picture

Multi-selection allows executing reading and writing of multiple properties at once using the cor-
responding BACnet services (ReadPropertiesMultiple and WritePropertiesMultiple)

Not all physical devices and/or properties will permit their value to be changed from another device
(in this case C-CURE Building Management System), some may be read-only.

- 145 -
BACnet data sharing

- 146 -
Using BACnet Objects and Properties
In a BACnet network, a device is able to expose real time data. By using the Data Sharing related services,
C-CURE Building Management System is able to maintain its variables up-to-date. Variables can be
refreshed thanks to unsolicited messages sent by devices to notify C-CURE Building Management System
when there is a change of value, or by polling if COV is not supported.

It is also possible to send commands to a device.

If a variable is mapped on an object instance, the value of the variable is supplied by the object's Present
Value property and its quality by the Status Flags property. In addition, if using a Binary Input, Binary Out-
put, or Binary Value object, the object's Change Of State Time property supplies the timestamp.

If a variable is mapped on a specific property of an object, the value of the variable is provided by the prop-
erty and the quality and timestamp is provided by the response to the request for the property.

- 147 -
How to Configure Data Sharing Using an Existing Variable and the Mapping Dia-
log
The following process is used to configure Data Sharing between a BACnet object and a variable that already
exists in the Variables Tree. The same process is used for both Online and Offline modes.

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network.
2. From the task pane, select the Mapping task. The Mapping dialog opens.
3. Select an object type (left pane) and an instance (upper right pane).
4. Right click on the selected object in the upper right pane and, from the context menu, select Map an
existing variable. The Variable Selector dialog opens.
5. Select the variable to be mapped. Click the Apply button and the link between the object and the vari-
able is made. Show picture

6. Repeat steps 4 and 5 for each of the variables to be mapped.

The same procedure is used to map a variable to a specific property, or an event/alarm, except that
you use the lower right pane.

How to unmap a variable

1. Open the mapping dialog and select the variable to be un-mapped.


2. Right-click on the selected variable and, from the context menu, select the command Unmap variable.
3. A dialog will appear asking for confirmation. Click OK to confirm the operation.

- 148 -
How to Configure Data Sharing Using a New Variable and the Mapping Dialog
The following process is used to configure Data Sharing between a BACnet object and a new variable. The
same process is used for both Online and Offline modes.

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network.
2. From the task pane, select the Mapping task. The Mapping dialog opens.
3. Select an object type (left pane) and an instance (upper right pane).
4. Right click on the selected object in the upper right pane, and from the context menu select Map a new
variable. The Create Variable dialog is opened. Show picture

5. Configure the properties in the Create Variable dialog (see below) and click OK to close the dialog, cre-
ate, and map the new variable.
6. Repeat steps 3, 4 and 5 for each of the variables to be created.

The same process is used to map a particular property or event/alarm, except that you use the
lower right pane.

Properties in the Create Variable dialog


The properties available in the Create Variable dialog, particularly those that affect variable naming, are
dependent on if you are mapping an object, property or keyname.

l Variable name
l Use the real name as variable name - Applies to objects only. Use the name of the object as the
variable name. For example Temp_SP.
l Use the object type as the variable name - Applies to objects and properties only. Use the object
type and instance as the variable name. For example Analog_Input_1. If you are mapping a
property, the property name is appended to the object type. For example Analog_Input_
1.Present_value.
l Customize the variable name - Applies to objects and properties. Enter your own variable name.
l Use network name as prefix - Applies to objects and properties. Prefix the variable name with
the network name. The network name becomes the first branch.
l Use device name as prefix - Applies to objects and properties. Prefix the variable name with the
device name. The device name becomes the second branch (or first branch if the network name
is not used).
l Monitor type
l Polling - Applies to objects and properties. The value of the variable is obtained by polling the
device. This is the default setting. The poll rate is configured in the variable's advanced prop-
erties.

- 149 -
l Confirmed change of value - Applies to objects and properties. The value of the variable is sent
by the device each time it changes. C-CURE Building Management System confirms it has
received the value.
l Unconfirmed change of value - Applies to objects and properties. The value of the variable is
sent by the device each time it changes. C-CURE Building Management System does not confirm
it has received the value.

- 150 -
BACnet Alarm and Event notifications

- 151 -
Using BACnet Notification Class Objects
In a BACnet network, a device is able to generate an unsolicited message when a pre-configured condition is
met. The mechanism is often referred to as Alarm/Event Notification.
Alarm and event notifications are generated by the Notification Class object within a physical BACnet device.
The Notification Class object's properties define how notifications are controlled.

l The conditions under which the messages are sent.


l The list of recipients, on the BACnet network, to which the message is sent.

C-CURE Building Management System can receive such messages and map the change of state information
therein to an alarm or bit variable.
A Notification Class object's behavior also includes the ability for the sender to expect an acknowledgement
of the notification from recipients. How the acknowledgement is managed depends on the setting Acknow-
ledge alarm/event notifications. See the topic BACnet settings.
A physical BACnet device can have any number of Notification Class instances. Messages from the Noti-
fication Class object are triggered by other, so-called source, objects in the device and are typically a con-
sequence of a change to the Present Value. For example, an Analog Input can trigger a notification if the
Present Value exceeds the High Limit. The notification message always includes information about the
change of state of the event, and the Present Value of the triggering object. It may also contain other prop-
erties depending on the object type. For example, a notification generated by an Analog Input object also
contains the Deadband, High Limit and Low Limit.
A Notification Class object's recipient list declares which devices are to receive the notification message and
hence, if it is to receive such messages, C-CURE Building Management System must be registered in the list.
The BACnet driver is able to register itself with an existing Notification Class object, or to create, and
register with, an entirely new Notification Class object.

- 152 -
How to Configure C-CURE Building Management System to Receive Alarm and
Event Notifications
Adding Notification Class object(s) to the device in C-CURE Building Management System configuration is
necessary to ensure a correct behavior at run-time. C-CURE Building Management System can then ensure
it receives event notifications from that device and you are able to map the ChangeOfState properties to
variables.

The process described below does not create the Notification Class object instance in the physical
device if it does not exist. Notification Class objects can be created within the physical device using
the Alarm helper, or the left pane of the Mapping editor.

Once a Notification Class object has been added to its configuration, C-CURE Building Management
System checks to make sure it is in the Recipient List each time it connects or re-connects to the
device. It also checks the notification conditions and makes sure the device is configured to send the
expected list of transitions during the correct period (time and date). The Notification Class object’s
configuration is changed by C-CURE Building Management System if necessary.

A Notification Class object can be added either from the Application Explorer or from the BACnet Mapping
dialog.

Adding a Notification Class object using the Application Explorer

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network and device.
2. From the task pane, select Add a Notification Class. The Notification Class configuration dialog opens.
Show picture

3. Click the Ellipsis button adjacent to the Instance number field. The Object Selection dialog opens con-
taining a list of discovered Notification Class instances for that device. The list can be updated using

- 153 -
the Refresh button. Show picture

4. Select the Notification Class instance to use. The notification must be the one referenced in the object
that you want to receive event notifications from.
5. Click the OK button to close the Object Selection dialog.
6. Check the configuration and click the OK button to close the Notification Class dialog. The notification
appears in the configuration tree. Show picture

Adding a Notification Class object using the BACnet Mapping dialog

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network.
2. From the task pane, select Mapping. The BACnet Mapping dialog opens.
3. Expand the devices and objects tree in the left pane and select an appropriate Notification Class
object. Notification Class instances appears in the right pane.
4. Right click on the instance to be mapped and select Map Notification Class from the context menu. The
Notification Class configuration dialog opens, populated with information from the selected Noti-
fication Class instance. The Notification Class must be the one referenced in the object that you want

- 154 -
to receive transitions from. Show picture

5. Check the configuration and click OK button to close the Notification Class dialog. A new Notification
Class object appears in the Mapping dialog in the Variable/Object column. Show picture

The Notification Class Configuration dialog - Advanced tab


The following properties are available in the Notification Class Configuration dialog - Advanced tab. Show pic-
ture

l Check recipient-list - The period at which the recipient-list property of the Notification Class object is
checked. The default is 300 seconds (5 minutes).
l Automatic re-subscription - If ticked, C-CURE Building Management System re-subscribes auto-
matically to the Notification Class (for example - after a reset). The default is ticked.

- 155 -
l Notification mode - Use to configure the type of notification.
l Unconfirmed - The notification does not require confirmation.
l Confirmed - The notification requires confirmation. This is the default value.

- 156 -
Mapping Variables to the Events/Alarms
Variables are mapped to the Events/Alarms in the same way that you map any variable used for data shar-
ing. See the topic The BACnet mapping dialog and the book BACnet data sharing.

l The Events/Alarms are those of the object that detect the condition to be notified. Show picture

l The mapped variable will only receive a value if the appropriate Notification Class instance has been
added to the device in C-CURE Building Management System BACnet configuration. See the topic How
to configure C-CURE Building Management System to receive alarm and event notifications
l The BACnet Monitoring and Archive Source properties are not available in the variable configuration's
Advanced tab as they are not applicable.
l The variable is always a bit or an alarm. If an alarm is used then its acknowledgement status can be
sent to the BACnet device. This behavior depends on the Alarms - Remote Acknowledgment Man-
agement setting. See the topic BACnet settings.

The BACnet Alarms helper can be used to visualize, and diagnose problems with, Alarm/Event noti-
fication configuration - in both C-CURE Building Management System and the BACnet device itself.
See the topic Using the BACnet Alarms helper.

BACnet event transitions and the value of the mapped variables


The BACnet standard identifies three event transitions. The following tables illustrate how these are mapped
to variables.
Variable
BACnet transition Value Timestamp Quality
To Normal 0 From the noti- Good
To OffNormal 1 fication Good
To Fault Unchanged Bad

If the BACnet object has an analog value, the behavior is modified, as there is a high threshold and low
threshold to be taken into account. In this case, two of variables are used.
Variables
BACnet transition Value (High) Value (Low) Timestamp Quality

- 157 -
To Normal 0 0 From the noti- Good
To OffNormal (Out of range is high limit) 1 0 fication Good
To OffNormal (Out of range is low limit) 0 1 Good
To Fault Unchanged Unchanged Bad

The following BACnet objects support events. Those in a bold typeface are threshold type (high and low
limit).
analog_input multi_state_input pulse_converter
analog_output multi_state_output global_group
analog_value multi_state_value trend_log_multiple
binary_input trend_log access_door
binary_output life_safety_point access_point
binary_value life_safety_zone access_zone
loop accumulator load_control

Acknowledgement of BACnet Alarms


C-CURE Building Management System can acknowledge each of the three possible alarm transitions, To
Normal, To OffNormal and To Fault, if required. How the acknowledgement is managed depends on the set-
ting Acknowledge alarm/event notifications. See the topic BACnet settings.

- 158 -
BACnet Notification Class traces
The Traces tab contains properties that allow you to enable diagnostic trace messages associated with
BACnet notifications. Enabling a trace generates a corresponding message, which is logged in the Trace Files
and displayed in the Event Viewer dialog (F7) when the condition occurs. The following screenshot was taken
with the default configuration. Show picture

l Trace 1: Error level 1 - Unused.


l Trace 2: Error level 2 - Unused.
l Trace 3: Error level 3 - Unused.
l Trace 5: Full details - Enable more detail for traces related to BACnet notifications.
l Trace 6: Full errors - Enable all traces related to errors related to BACnet notifications.
l Trace 7: Delete step - Enable traces related to the deletion of BACnet Notification Class objects.
l Trace 8: Notification status - Enable traces related to a change in status of the BACnet Notification
Class objects.

- 159 -
BACnet Trending

- 160 -
Using BACnet Trend Log Objects
In a BACnet network, a device is able to record changes in value of a property, locally within the physical
BACnet device. The mechanism is often referred to as Trending.
Trending is managed by the Trend Log and Trend Log Multiple objects within the BACnet physical device. The
object's properties define how trending is controlled.

l Trend recording at the device level. What, and how, properties are recorded.
l The conditions that lead to informing other devices that records are available for retrieval.

Frequently the Present Value property is used. Each value is recorded with a corresponding timestamp.
Recording can be either polled, on change of value or triggered. Recording can behave either as a circular
buffer with the oldest value overwritten if it becomes full, or as a fixed size buffer in which recording stops
when it gets full. The Trend Log object can trigger a notification when the number of records reaches a par-
ticular value.
C-CURE Building Management System is able to retrieve the Trend records (values and timestamps) and
store them in its own archive units. The retrieval can be executed periodically, as the result of a notification,
or on-demand. The property that is recorded in the Trend Log object must also be mapped to a register vari-
able. Once the data is saved in an archive unit it can be accessed in the same way as any other recorded
trend data (displayed in a Trend Viewer, exported using Data Export or accessed using SCADA Basic etc.).
C-CURE Building Management System supports both Trend Log and Trend Log Multiple objects.

- 161 -
How to Configure C-CURE Building Management System to Retrieve BACnet
Trend Records
To configure C-CURE Building Management System so it is able to retrieve a Trend Log object's records, you
add the Trend Log or Trend Log Multiple object to the device in C-CURE Building Management System BACnet
configuration. It is then able to send a read request to the device to retrieve the recorded values.
The application treats BACnet trend records in the same way as records it has generated itself by recording
the real-time value of variables. Records are accessed using the name of a register variable. A Trend Log
object will be used as source for C-CURE Building Management System trending of a given variable if the
BACnet object and property on which the variable is mapped is found in one of the configured Trend Log
object. Otherwise, the real time data source (Data Sharing) is used. See the topic Mapping variables for use
with a Trend Log object.
If you want to read a Trend Log's recorded values using a notification you must also add the instance of the
Notification Class object, as referenced in the Trend Log object, to the device configuration in C-CURE Build-
ing Management System BACnet configuration. See the topic How to configure C-CURE Building Management
System to receive alarm and event notifications.

The following process does not create a Trend Log object, within the physical device, if it does not
already exist. Trend Log objects can be created using the Logs helper, or the left pane of the Map-
ping editor.

Adding a Trend Log object using the Application Explorer

The following explanation applies both to Trend Log and Trend Log Multiple objects.

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network and device.
2. From the task pane, select Add a Trend Log. The Trend Log Creation dialog opens. Show picture

3. Click the Ellipsis button adjacent to the Instance number field. The Object Selection dialog opens con-
taining a list of discovered Trend Log instances for that device. The list can be updated using the

- 162 -
Refresh button. Show picture

4. Select the Trend Log to use.


5. Click the OK button to close the Object Selection dialog.
6. Click the OK button to close the Trend Log Configuration dialog. The Trend Log appears in the con-
figuration tree. Show picture

Adding a Trend Log object using the BACnet Mapping dialog

The following explanation applies both to Trend Log and Trend Log Multiple objects.

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network. From the task pane, select Mapping. The BACnet Mapping dialog opens.
2. Expand the devices and objects tree in the left pane and select an appropriate Trend Log object. Trend
Log instances appears in the right pane.
3. Right click on the instance to be mapped and select Map Trend Log from the context menu. The Trend
Log configuration dialog opens, populated with information from the selected Trend Log instance.

- 163 -
Show picture

4. Check the configuration and click OK button to close the Trend Log dialog. A new Trend Log object
appears in the Mapping dialog in the Variable/Object column. Show picture

The Trend Log Configuration dialog - Advanced tab


The following properties are available in the Trend Log Configuration dialog - Advanced tab. The screenshot
shows the default configuration. Show picture

l Retrieval - The mechanism(s) used by C-CURE Building Management System to retrieve records from
the Trend Log object. The default retrieval mechanism is cyclic every 60 minutes.
l On demand only - A read request is sent to the Trend Log object only when using the Trend Log
helper or a SCADA Basic program.

- 164 -
l By polling - A read request is sent to the Trend Log object periodically. The period range is 0 to
4294967295 minutes with a default of 60 minutes. In this mode, a read request is also sent
when the BACnet communication starts.
l Upon notification reception - Accept notifications from the Notification Class associated with the
Trend Log object and generate a read request as a result.
l Max number of records - The maximum number of records for a read request. Range 1 to
10000.

- 165 -
Mapping Variables For Use With a Trend Log Object
When using a Trend Log object within C-CURE Building Management System you must map the BACnet prop-
erty that is recorded by the Trend Log object in the physical device, to one a variable. For example, you
might map the Present Value property of an Analog Input object that is referenced by the Trend Log object.
In addition, the variable must have Trend Recording behavior configured.
The match between the variable, its trend behavior and the Trend Log is achieved as follow:

l The variable's mapping properties (BACnet object and property) are used to match the Trend Log con-
figured to retrieve records for that given BACnet data.
l The trend behavior configuration defines in which archive unit the Trend Log records are stored.
l The variable's real time value reflects that of the real time value of the BACnet property, which is
used for trend recording if the BACnet Trend Log cannot be found.
l The variable name identifies the records so that they can be retrieved later in a Trend Viewer, expor-
ted using Data Export etc.

The variable is mapped in the same way that you map a variable to any BACnet property or object. See the
topic The BACnet mapping dialog and the book BACnet data sharing.

When a Trend Log is used as source for trends, C-CURE Building Management System does not store
the invalid record upon shutdown. In such a situation the value of the property Do not record invalid
value on shutdown of the trend behavior is ignored.

If you are using a Trend Log Multiple object, you will have to map one variable for each of the prop-
erties recorded in the object.

- 166 -
BACnet Trend Log Traces
The Traces tab contains properties that allow you to enable diagnostic trace messages associated with
BACnet Trend Logs. Enabling a trace generates a corresponding message, which is logged in the Trace Files
and displayed in the Event Viewer dialog (F7) when the condition occurs. The following screenshot was taken
with the default configuration. Show picture

l Trace 5: Full details - More detail for traces related to BACnet Trend Logs.
l Trace 6: Full errors - All traces related to errors related to BACnet Trend Logs.
l Trace 7: Delete step - Traces related to the deletion of BACnet Trend Log objects.
l Trace 8: Log status - Traces related to a change in status of the BACnet Trend Log object.

- 167 -
BACnet Event Logging

- 168 -
Using BACnet Event Log Objects
In a BACnet network, a device is able to record state changes of an object, locally within the physical
BACnet device. The mechanism is often referred to as Event Logging.
Event Logging is managed by the Event Log object within the BACnet physical device. The object's properties
define how logging is controlled.

l Event Logging at the device level. What, and how, properties are recorded.
l The conditions that lead to informing other devices that logs are available for retrieval.

There is no generally accepted way to identify which state change is handled by one or the other
Event Log, and the event log (as per the standard), once retrieved, does not include enough inform-
ation to match a certain C-CURE Building Management System log list.
As a consequence, at the time of writing, C-CURE Building Management System is able to retrieve
Event Logs (state changes and timestamps), but does not push them to its own event logging sub-
system for archiving.

As a consequence, BACnet Event Log can only be retrieved by using the Helpers for testing.

- 169 -
How to Configure C-CURE Building Management System to Retrieve BACnet
Event Records
To configure C-CURE Building Management System so it is able to retrieve an Event Log object's records,
you add the Event Log object to the device in C-CURE Building Management System BACnet configuration. It
is then able to send a read request to the device to retrieve the recorded values.
The following process does not create an Event Log object, within the physical device, if it does not
already exist. Event Log objects can be created using the Logs helper, or the left pane of the Map-
ping editor.

Adding an Event Log object using the Application Explorer

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network and device.
2. From the task pane, select Add an Event Log. The Event Log Creation dialog opens. Show picture

3. Click the Ellipsis button adjacent to the Instance number field. The Object Selection dialog opens con-
taining a list of discovered Event Log instances for that device. The list can be updated using the
Refresh button. Show picture

4. Select the Event Log to use.


5. Click the OK button to close the Object Selection dialog.

- 170 -
6. Click the OK button to close the Event Log Configuration dialog. The Event Log appears in the con-
figuration tree. Show picture

Adding an Event Log object using the BACnet Mapping dialog

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network. From the task pane, select Mapping. The BACnet Mapping dialog opens.
2. Expand the devices and objects tree in the left pane and select an appropriate Event Log object. Event
Log instances appears in the right pane.
3. Right click on the instance to be mapped and select Map Event Log from the context menu. The Event
Log configuration dialog opens, populated with information from the selected Event Log instance.
Show picture

- 171 -
4. Check the configuration and click OK button to close the Event Log dialog. A new Event Log object
appears in the Mapping dialog in the Variable/Object column. Show picture

The Event Log Configuration dialog - Advanced tab


The following properties are available in the Event Log Configuration dialog - Advanced tab. The screenshot
shows the default configuration. Show picture

l Retrieval - The mechanism(s) used to retrieve records from the Event Log object. The default retrieval
mechanism is cyclic every 60 minutes.
l On demand only - A read request is sent to the Event Log object only when using the Event Log
helper or a SCADA Basic program.
l By polling - A read request is sent to the Event Log object periodically. The period range is 0 to
4294967295 minutes with a default of 60 minutes. In this mode, a read request is also sent
when the BACnet communication starts.
l Upon notification reception - Accept notifications from the Notification Class associated with the
Event Log object and generate a read request as a result.
l Max number of records - The maximum number of records for a read request. Range 1 to
10000.

The retrieval mode defaults to On demand only. At the time of writing, the Event Log handling does
not permit storage of the retrieved records in C-CURE Building Management System own archives.
See Using BACnet Event Log Objects for more information.

- 172 -
BACnet Event Log Traces
The Traces tab contains properties that allow you to enable diagnostic trace messages associated with
BACnet Event Logs. Enabling a trace generates a corresponding message, which is logged in the Trace Files
and displayed in the Event Viewer dialog (F7) when the condition occurs. The following screenshot was taken
with the default configuration. Show picture

l Trace 5: Full details - More detail for traces related to BACnet Event Logs.
l Trace 6: Full errors - All traces related to errors related to BACnet Event Logs.
l Trace 7: Delete step - Traces related to the deletion of BACnet Event Log objects.
l Trace 8: Log status - Traces related to a change in status of the BACnet Event Log object.

- 173 -
BACnet Scheduling

- 174 -
Using BACnet Schedule and Calendar Objects
In a BACnet network, a device is able to make time based changes to an object's properties. For example,
you might want to change the Present Value of an AnalogValue object representing a temperature con-
troller's set-point, depending on the time of day and/or the day of the week. The object types that manage
this behavior are the Schedule and Calendar.

l The Schedule object provides a schedule (Weekly Schedule property) for each of the seven days in a
week. The Schedule object can, at the field device level, set the value of properties in other objects
according the schedule. The object in which the property is set can be in the same or different device
to that of the Schedule object. Typically, the property that is set is the Present Value.
l The Calendar object provides a list of dates (Date List property) that are used as exceptions for one or
more Schedule objects. For example annual holidays or weekends.

The main purpose of configuring Schedule and Calendar objects in C-CURE Building Management System is
to make them available to the WebScheduler. You can also map their properties to the variables tree for
Data Sharing in the same way as any other BACnet object.

- 175 -
How to Configure C-CURE Building Management System to use a BACnet Sched-
ule
Adding Schedule object(s) to the device in C-CURE Building Management System configuration is a require-
ment in order to view and change a BACnet schedule in the WebScheduler.

The process described below does not create a Schedule object instance in the physical device if it
does not exist. Schedule objects can be created within the physical device using the Schedules and
Calendars helper, or the left pane of the Mapping editor.

Adding a Schedule object using the Application Explorer

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network and device.
2. From the task pane, select Add a Schedule. The Schedule configuration dialog opens. Show picture

3. Click the Ellipsis button adjacent to the Instance number field. The Object Selection dialog opens con-
taining a list of discovered Schedule instances for that device. The list can be updated using the
Refresh button. Show picture

4. Select the Schedule instance to use and click OK to close the Object Selection dialog.
5. Enter the optional Description. The Description appears in the Application Explorer and can be useful
to identify the object later.
6. Enter or select the optional Branch. The branch can be used to organize calendars and schedules in the
WebScheduler in a hierarchical manner. For example, a branch of XXXX.YYYY would generate a
branch XXXX containing the schedule YYYY.
7. Click the OK button to close the Schedule configuration dialog. The schedule appears in the con-
figuration tree and is available to C-CURE Building Management System and the WebScheduler.

Use of the Ignore default values setting in the Advanced tab


When working with BACnet schedules the Web Scheduler evaluates the value of the schedule-default prop-
erty of the schedule object. As the Web Scheduler ends each defined interval with a transition to NULL, the
schedule-default value becomes active for all the undefined periods on the schedule control. In other words,

- 176 -
undefined time periods in the Web Scheduler’s schedule control represent times when the schedule-default
value is active.
However, BACnet devices from some vendors dynamically change the value of the schedule-default during
runtime. In this case, Ignore default values can be ticked. The user is then able to select the output value,
for all intervals, from the list of available output values except for NULL. For example, for schedules of type
“Enumerated” the possible output values of an interval are 0 and 1.

Displaying the Schedule configuration in the lower pane


The lower right pane of the Application Explorer shows essential information about the selected Schedule.
Show picture

l Schedule outputs - One line for each of the schedule's outputs.


l Name - The object type, instance and property corresponding to the output.
l Device reference
l If empty, the output is on the same device as schedule object.
l The name of the device if the output is not on the same device as the schedule and the
device is configured in C-CURE Building Management System.
l The device id if the output is not on the same device as the schedule and the device is not
configured in C-CURE Building Management System.
l Variable name - The name of the variable that is mapped to the output property.
l Associated label - The name of the associated label used by the variable.
l Schedule associated label - The name of the associated label that will be used by the WebScheduler. It
is taken from the first associated label found in the Scheduled Outputs list.

Adding or deleting an output


The Application Explorer can be used to add an output to, or delete an output from, a schedule object on the
physical device under the following conditions.

l The physical device must be configured to allow such modification.


l The BACnet setting Enable object creation and deletion must be ticked.
l The device/object/property to be used must be already mapped to a variable.

How to add an output:

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet Schedule.
2. From the task bar of the lower right pane, select New item. The Variable Selector dialog opens show-
ing only those variables already mapped to a BACnet property.
3. Select the variable corresponding to the BACnet property to be used for the new output and click OK. A
new Schedule Output is added to the Schedule object.

How to delete an output:

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet Schedule.

- 177 -
2. Select an output in the lower right pane and, from the lower right pane task bar, select Delete item.
The Output is removed from the Schedule object.

Not all physical devices will permit Schedule Output to be changed from another device (in this case
C-CURE Building Management System), some may not support it, or the corresponding property
may be read-only.

- 178 -
How to Configure C-CURE Building Management System to use a BACnet Cal-
endar
Adding Calendar object(s) to the device in C-CURE Building Management System configuration is a require-
ment in order to view and change a BACnet Calendar using the WebScheduler.

The process described below does not create a Calendar object instance in the physical device if it
does not exist. Calendar objects can be created within the physical device using the Schedules and
Calendars helper, or the left pane of the Mapping editor.

Adding a Calendar object using the Application Explorer

1. Open the Application Explorer and expand the configuration tree to display a previously configured
BACnet network and device.
2. From the task pane, select Add a Calendar. The Calendar configuration dialog opens. Show picture

3. Click the Ellipsis button adjacent to the Instance number field. The Object Selection dialog opens con-
taining a list of discovered Calendar instances for that device. The list can be updated using the
Refresh button. Show picture

4. Select the Calendar instance to use and click OK to close the Object Selection dialog.
5. Enter the optional Description. The Description appears in the Application Explorer and can be useful
to identify the object later.
6. Enter or select the optional Branch. The branch can be used to organize calendars and schedules in the
WebScheduler in a hierarchical manner. For example, a branch of XXXX.YYYY would generate a
branch XXXX containing the calendar YYYY.

- 179 -
7. Click the OK button to close the Calendar configuration dialog. The Calendar appears in the con-
figuration tree and is available to the WebScheduler. Show picture

- 180 -
BACnet Schedules and Calendar Traces
Schedule trace
The Schedule Traces tab contains properties that allow you to enable diagnostic trace messages associated
with BACnet Schedules. Enabling a trace generates a corresponding message, which is logged in the Trace
Files and displayed in the Event Viewer dialog (F7) when the condition occurs. The following screenshot was
taken with the default configuration. Show picture

l Trace 5: Full details - More detail for traces related to BACnet Schedule object.
l Trace 6: Full errors - All traces related to errors related to BACnet Schedule object.
l Trace 7: Delete step - Traces related to the deletion of BACnet Schedule objects.
l Trace 8: Schedule status - Traces related to a change in status of the BACnet Schedule object.

Calendar trace
The Calendar Traces tab contains properties that allow you to enable diagnostic trace messages associated
with BACnet calendars. Enabling a trace generates a corresponding message, which is logged in the Trace
Files and displayed in the Event Viewer dialog (F7) when the condition occurs. The following screenshot was
taken with the default configuration. Show picture

- 181 -
l Trace 5: Full details - More detail for traces related to BACnet Calendar object.
l Trace 6: Full errors - All traces related to errors related to BACnet Calendar object.
l Trace 7: Delete step - Traces related to the deletion of BACnet Calendar objects.
l Trace 8: Calendar status - Traces related to a change in status of the BACnet Calendar object.

- 182 -
Using the BACnet helpers

- 183 -
Overview of the BACnet Helpers
The helpers are provided to assist the application developer diagnose and troubleshoot automation objects’
behavior in a BACnet device available on the network:

l Alarms and Event notification using Notification Class objects,


l Trend and Event logging using Trend Log, Trend Log Multiple or Event Log objects,
l Scheduling using Schedule and Calendar objects.

The helpers can also be used to manage C-CURE Building Management System configuration objects, related
to these interoperability areas, at the design stage, during commissioning and even after commissioning for
maintenance. The helpers provide tools to:

l Discover existing objects in the physical BACnet device,


l Create new objects on the fly, including the actual object creation in the end physical device,
l Read and change any of the object's properties,
l Retrieve data associated with those objects - notifications, trend records, logged events.

Changes that you make, including changing the value of properties, as well as adding and deleting
objects using the left panel, directly affect the configuration of the physical BACnet device. Unin-
tentional changes can have an impact on the BACnet system behavior.

Depending on the physical device's capabilities and configuration, it may be necessary to make con-
figuration changes directly in the device itself using the software from the manufacturer. In par-
ticular, not all devices support object creation and deletion, and some properties may not be
changed remotely. See the device manufacturer's documentation for more information.

- 184 -
Using the BACnet Alarms Helper
The Alarms tab of the Helper dialog provides useful information about, and can be used to manage, C-CURE
Building Management System configuration objects related to BACnet Alarms and Event notifications. The
tab includes tools to add and delete Notification Class instances, change properties, and to view notifications
from those Notification Class objects in which C-CURE Building Management System has been configured as
a recipient. Show picture

Changes that you make, including changing the value of properties, as well as adding and deleting
objects using the left panel, directly affect the configuration of the physical BACnet device. Unin-
tentional changes can have an impact on the BACnet system behavior.

The Alarm tab layout

l The Left Pane - A list of variables that have been mapped to alarm/event notifications, and Notification
Class instances, for the selected device. Each item on a list includes an icon that provides an indication
of its status.
l An icon including a green tick indicates a healthy item.
l An icon including a yellow triangle with an exclamation mark indicates an item with a warning.
l An icon with a dimmed font denotes an object in which C-CURE Building Management System is
not included in the Recipient List property.
l An icon including a question mark means that the item properties have yet to be read.
l The right pane - Displays the properties of the selected item.
l If the item selected is a notification it displays the properties of the Notification Class object.
l It the item selected is a variable it displays the properties of the object that generates the
event.
l The lower pane - Displays warning messages associated with the configuration of the selected item.

How to add a Notification Class instance


A new, un-configured, Notification Class instance can be added using the Create Notification tool on the tool-
bar. This only creates the object in the physical device. To use it in C-CURE Building Management System
you must also add the Notification Class instance to the device in C-CURE Building Management System con-
figuration (or map an existing Notification Class to the newly created object). See the topic How to configure
C-CURE Building Management System to receive alarm and event notifications.

How to delete a Notification Class instance


A Notification Class instance can be deleted using the Delete Notification tool on the toolbar.

Changing the properties of an object


Properties of the BACnet object, displayed in the right pane, can be changed using the following procedure.

- 185 -
1. Select the property by clicking on it.
2. Depending on the property type, you can then either directly enter a new value or select a value from
a list. A changed value is displayed in a bold font.
3. Write the value to the physical device using the Write tool in the toolbar.

Properties displayed in a dimmed font are read only and cannot be changed.

Viewing notifications
You can view a list of received notifications by using the View Notifications dialog. The notifications list is
temporary and the action of closing the Notification Viewer clears the contents unless there are variables
mapped to the notified transitions. Show picture

Troubleshooting notifications
The Alarms helper is able to check the following configuration elements related to Alarm and Event noti-
fication.

l At the Notification Class object level:


l Is C-CURE Building Management System in the list of recipients,
l Is the correct list of transitions to be notified is in place,
l Is the correct time period for the notification is in place.
l For bit or alarm variables mapped to a BACnet event for the source object (such as a binary or an ana-
log objects) in the same device as the Notification Class:
l Is the Notification Class correctly referenced in the source object,
l Is the Event Enabled property activated (for binary objects),
l Is the Limit Enabled property activated (for analog objects).

- 186 -
Using the BACnet Logs Helper
The Logs tab of the Helper dialog provides useful information about, and can be used to manage, C-CURE
Building Management System configuration objects that are related to BACnet Trend Log, Trend Log Multiple
and Event Log objects. The tab includes tools to add and delete object instances, change properties, and to
manually retrieve records. Show picture

Changes that you make, including changing the value of properties, as well as adding and deleting
objects using the left panel, directly affect the configuration of the physical BACnet device. Unin-
tentional changes can have an impact on the BACnet system behavior.

The Logs tab layout

l The Left Pane - A list of the available Trend Log, Trend Log Multiple and Event Log objects. Each item
on a list includes an icon that provides an indication of its status.
l An icon including a green tick indicates a healthy item.
l An icon including a yellow triangle with an exclamation mark indicates an item with a warning.
l An icon with a dimmed font indicates an object that is not configured in C-CURE Building Man-
agement System.
l An icon including a question mark means that the item properties have yet to be read.
l The right pane - Displays the properties of the selected item.
l The lower pane - Displays warning messages associated with the configuration of the selected item.

How to add an object instance


A new, un-configured log object instance can be added using the Create tool on the toolbar. This only creates
the object in the physical device. To use it, you must also add the log object instance to the device in C-
CURE Building Management System configuration (or map an existing log to the newly created object). See
the topic How to configure C-CURE Building Management System to retrieve BACnet trend records.

How to delete an object instance


A log object instance can be deleted using the Delete Object tool on the toolbar.

Changing the properties of an object


Properties of the BACnet object, displayed in the right pane, can be changed using the following procedure.

1. Select the property by clicking on it.


2. Depending on the property type, you can then either directly enter a new value or select a value from
a list. A changed value is displayed in a bold font.
3. Write the value to the physical device using the Write tool in the toolbar.

Properties displayed in a dimmed font are read only and cannot be changed.

- 187 -
Manually reading Trend Log records
You can manually retrieve records from a log object using the Retrieve Records dialog. The records are
stored in the archive unit associated with the variable that is mapped to the BACnet object property con-
figured in the log object (if any). Show picture

- 188 -
Using the BACnet Schedules and Calendars Helper
The Schedules tab of the Helper dialog provides useful information about, and can be used to manage, C-
CURE Building Management System configuration objects that are related to BACnet Schedule and Calendar
objects. The tab includes tools to add and delete object instances and to change properties. Show picture

Changes that you make, including changing the value of properties, as well as adding and deleting
objects using the left panel, directly affect the configuration of the physical BACnet device. Unin-
tentional changes can have an impact on the BACnet system behavior.

The Schedules tab layout

l The Left Pane - A list of the available Schedule and Calendar objects. A dimmed font indicates an
object that is not configured in C-CURE Building Management System.
l The right pane - Displays the properties of the selected item.
l The lower pane - Displays warning messages associated with the configuration of the selected item.

How to add an object instance


A new, un-configured schedule or calendar instance can be added using the Create tool on the toolbar. This
only creates the object in the physical device. To use it, you must also add the object instance to the device
in C-CURE Building Management System configuration.

How to delete an object instance


A schedule or calendar object instance can be deleted using the Delete Object tool on the toolbar.

Changing the properties of an object


Properties of the BACnet object, displayed in the right pane, can be changed using the following procedure.

1. Select the property by clicking on it.


2. Depending on the property type, you can then either directly enter a new value or select a value from
a list. A changed value is displayed in a bold font.
3. Write the value to the physical device using the Write tool in the toolbar.

Properties displayed in a dimmed font are read only and cannot be changed.

- 189 -
Using the BACnet Configuration of a Project Configured With a Previous Version
of C-CURE Building Management System
From version 11.2 onwards, C-CURE Building Management System uses new, enhanced, technology for its
BACnet data acquisition driver. The new technology enables many features that were not previously avail-
able, including B-AWS compliance, and provides a way forward for any further developments to the BACnet
standard.
The main difference that the project developer will notice is that the previous technology used an external
service that had to be configured separately (mainly for the BACnet network interface).
Therefore, if you have a project using BACnet that was created using a version earlier than 11.2, and you
want to run it with a newer version, you should first make sure you configure:

l The BACnet/IP Network Interface(s), including the BACnet device exposed by C-CURE Building Man-
agement System,
l BACnet settings such as the APDU timeout, the scan timeout and the process identifier.

See Configuring a BACnet/IP Network Interface and BACnet Settings for more information.
All other configuration items including Variables mapping, Alarm and Event mapping as well as Notification
Class configuration are retained.

- 190 -
BACnet Client PICS (Protocol Implementation Conformance Statement)
1.1. Product Description
C-CURE Building Management System is a SCADA Software that can act as a BACnet Advanced Operator
Workstation (B-AWS). C-CURE Building Management System is able to communicate with BACnet devices
via BACnet/IP.

1.2. BACnet Standardized Device Profile


X BACnet Operator Workstation (B-OWS)
X BACnet Operator Workstation (B-AWS)
o BACnet Operator Display (B-OD)
o BACnet Building Controller (B-BC)
o BACnet Advanced Application Controller (B-AAC)
o BACnet Application Specific Controller (B-ASC)
o BACnet Smart Sensor (B-SS)
o BACnet Smart Actuator (B-SA)

1.3. BACnet Interoperability Building Blocks Supported

ReadProperty-A DS-RP-A
ReadProperty-B DS-RP-B
ReadPropertyMultiple-A DS-RPM-A
WriteProperty-A DS-WP-A
WriteProperty-B DS-WP-B
WritePropertyMultiple-A DS-WPM-A
Data Sharing
View-A DS-V-A
Advanced View-A DS-AV-A
Modify-A DS-M-A
Advanced Modify-A DS-AM-A
COV-A DS-COV-A
COVP-A DS-COVP-A
Dynamic Device Binding-A M-DDB-A
Dynamic Device Binding-B DM-DDB-B
Dynamic Object Binding-B DM-DOB-B
Automatic Network Mapping-A DM-ANM-A
Automatic Device Mapping-A DM-ADM-A
DeviceCommunicationControl-A DM-DCC-A
Object Creation and Deletion-A DM-OCD-A
Device & Network Management ReinitializeDevice-A DM-RD-A
Backup and Restore-A DM-BR-A
List Manipulation-A DM-LM-A
List Manipulation-B DM-LM-B
Time Synchronization-A DM-TS-A
UTC Time Synchronization-A DM-UTC-A
Manual Time Synchronization-A DM-MTS-A
Automatic Time Synchronization-A DM-ATS-A

Event & Alarm Notification-A AE-N-A

- 191 -
ACK-A AE-ACK-A
Alarm Summary-A AE-ASUM-A1
Enrollment Summary-A AE-ESUM-A1
Information-A AE-INFO-A1
Alarm Summary View-A AE-AS-A
View and Modify-A AE-VM-A
Advanced View and Modify-A AE-AVM-A
View Notifications-A AE-VN-A
Advanced View Notifications-A AE-AVN-A
Event Log View-A AE-ELV-A
Event Log View and Modify-A AE-ELVM-A
Scheduling-A SCHED-A2
Scheduling View and Modify-A SCHED-VM-A
Advanced View and Modify-A SCHED-AVM-A

Viewing-A
T-V-A
Viewing and Modifying Trends-A T-VMT-A3
3
Viewing and Modifying Multiple Values-A T-VMMV-A
T-AVM-A
Trending Advanced View and Modify-A
T-ATR-A
Automated Trend Retrieval-A
T-AMVR-A
Automated Multiple Value Retrieval-A
T-A-A
Archival-A
1Deprecated, contained in Alarm Summary View-A (AE-AS-A)
2Deprecated, contained in View and Modify-A (SCHED-VM-A)
3Deprecated

1.4. Segmentation Capability


X Segmented requests supported Window Size: Configurable
X Segmented responses supported Window Size: Configurable

1.5. Standard Object Types Supported

l C-CURE Building Management System as BACnet server:

Dynamically
Object Object Type Sup- Optional Properties Proprietary
Type ported Creatable and
Supported Properties
Deletable
Location
Description
Max_Segments_Accepted
Local_Time
Local_Date
Device Yes No -
UTC_Offset
Daylight_Savings_Status
APDU_Segment_Timeout
Time_Synchronization_Recipients
UTC_Time_Synchronization_Recip-

- 192 -
ients
Time_Synchronization_Interval
Align_Intervals
Interval_Offset

l C-CURE Building Management System as BACnet client:

The following table describes all objects that C-CURE Building Management System is able to read as a
BACnet client. That doesn’t mean these objects may be present in C-CURE Building Management System.

Dynamically Optional Properties Proprietary


Object Type Object Type Supported
Creatable and Deletable Supported Properties

Access-credential Yes Yes All Yes1

Access-door Yes Yes All Yes1

Access-point Yes Yes All Yes1

Access-rights Yes Yes All Yes1

Access-user Yes Yes All Yes1

Access-zone Yes Yes All Yes1

Accumulator Yes Yes All Yes1

Analog-input Yes Yes All Yes1

Analog-output Yes Yes All Yes1

Analog-value Yes Yes All Yes1

Averaging Yes Yes All Yes1

Binary-input Yes Yes All Yes1

Binary-output Yes Yes All Yes1

Binary-value Yes Yes All Yes1

Bitstring-value Yes Yes All Yes1

Calendar Yes Yes All Yes1

Characterstring-value Yes Yes All Yes1

Command Yes Yes All Yes1

Credential-data-input Yes Yes All Yes1

Date-pattern-value Yes Yes All Yes1

Date-value Yes Yes All Yes1

Datetime-pattern-value Yes Yes All Yes1

Datetime-value Yes Yes All Yes1

- 193 -
Device Yes Yes All Yes1

Event-enrollment Yes Yes All Yes1

Event-log Yes Yes All Yes1

File Yes Yes All Yes1

Global-group Yes Yes All Yes1

Group Yes Yes All Yes1

Integer-value Yes Yes All Yes1

Large-analog-value Yes Yes All Yes1

Life-safety-point Yes Yes All Yes1

Life-safety-zone Yes Yes All Yes1

Load-control Yes Yes All Yes1

Loop Yes Yes All Yes1

Multi-state-input Yes Yes All Yes1

Multi-state-output Yes Yes All Yes1

Multi-state-value Yes Yes All Yes1

Network-security Yes Yes All Yes1

Notification-class Yes Yes All Yes1

Octetstring-value Yes Yes All Yes1

Positive-integer-value Yes Yes All Yes1

Program Yes Yes All Yes1

Pulse-converter Yes Yes All Yes1

Schedule Yes Yes All Yes1

Structured-view Yes Yes All Yes1

Trend-log Yes Yes All Yes1

Trend-log-Multiple Yes Yes All Yes1

Time-pattern-value Yes Yes All Yes1

Time-value Yes Yes All Yes1

1Proprietary properties are supported if based on one of the primitive datatypes.

1.6. Data Link layer Options


X BACnet IP, (Annex J)

- 194 -
X BACnet IP, (Annex J), Foreign Device
o ISO 8802-3, Ethernet (Clause 7)
o ANSI/ATA 878.1, 2.5 Mb. ARCNET (Clause 8)
o ANSI/ATA 878.1, RS-485 ARCNET (Clause 8), baud rate(s) ____________
o MS/TP master (Clause 9), baud rate(s):
o MS/TP slave (Clause 9), baud rate(s):
o Point-To-Point, EIA 232 (Clause 10), baud rate(s):
o Point-To-Point, modem, (Clause 10), baud rate(s):
o LonTalk, (Clause 11), medium: __________
o BACnet/Zigbee (Annex O): __________
o Other:

1.7. Device Address Binding


Is static device binding supported? (This is currently necessary for two-way communication with MS/TP
slaves and certain other devices.) Yes

1.8. Networking Options


o Router, Clause 6 - List all routing configurations, e.g., ARCNET-Ethernet, Ethernet-MS/TP, etc.
o Annex H, BACnet Tunneling Router over IP
X BACnet/IP Broadcast Management Device (BBMD)

l Does the BBMD support registrations by Foreign Devices? Yes


l Does the BBMD support network address translation? No

1.9. Character Sets Supported


Indicating support for multiple character sets does not imply that they can all be supported simultaneously.
X ANSI X3.4
X IBM / Microsoft DBCS
X ISO 8859-1
X ISO 10646 (UCS-2)
X ISO 10646 (UCS-4)
X JIS X 0208
X ISO 10646 (UTF-8)

1.10. Network Security Options


X Non-secure Device - is capable of operating without BACnet Network Security
o Secure Device - is capable of using BACnet Network Security (NS-SD BIBB)

l o Multiple Application-Specific Keys


l o Supports encryption (NS-ED BIBB)
l o Key Server (NS-KS BIBB)

- 195 -
Equipment

- 196 -
Overview of data acquisition of type Equipment
Equipment refers to C-CURE Building Management System equipment data acquisition drivers such as Mod-
bus TCP/IP. Currently, you cannot configure the equipment drivers using the Application Explorer, but you
can visualize the configuration (networks, nodes and frames), the communication status, change the gen-
eral settings and map variables to the frames. Show picture

To generate the configuration you have to use the Communication dialog available from the menu using the
command Configure.Communication.Equipment.

C-CURE Building Management System supports a wide range of data acquisition drivers. This is a guide for
setting them up. It is in two parts:

l Configuring the Communication gives a general understanding of how equipment drivers are imple-
mented. It provides information on the architecture and on that part of configuration that is common
across protocols, plus tips on optimization.
l Configuring a Protocol gives details for configuring the most commonly used protocols. It is arranged
by type of protocol.

What this Guide does and does not do


It gives an outline of the connectivity. It does not provide detailed specifications of how the protocols work
beyond the features that are implemented and configurable in C-CURE Building Management System.
For more information, including compatibility and platform support, please refer to our Technical Support,
the corresponding standard, or the supplier's documentation for vendor-specific protocols.

How the licensing affects communication


When you purchase a license to run C-CURE Building Management System, the license specifies the number
of protocols that may be used.
The default number of protocols is 1. You can configure more protocols than the license permits, but at run
time only the licensed number will run.

Disclaimer
The company and product names associated with protocols in this Guide are only shown to identify the pro-
tocols. They are not meant to indicate current ownership, proprietary rights or constraints on usage.
All names and trademarks are the property of their respective owners.

- 197 -
Any links to the web sites of our partners are only included for information. They are not under our control
and we are not responsible for their contents, links, modifications or updates. The inclusion of these links
does not imply approval of the sites or their respective owners.

- 198 -
Managing Equipment in the Application Explorer

A project's equipment configuration is displayed under the Communications node. It includes networks (pro-
tocols), devices, and frames. The Application Explorer can be used to assist with problem finding as it also
displays run-time status information about the configured equipment items.
Creating, deleting and modifying Equipement items - Networks, Devices and Frames - is not avail-
able from within the Application Explorer. Use the menu Configure.Communication.Equipment of the
main process instead.
The terms node and device are used interchangeably to designate a configuration item cor-
responding to an end-device in the automation system.

Tasks applicable to Equipment


When the Equipment folder is selected.
Icon Task Description
Settings Display the Equipment Settings dialog.
When a network is selected.
Icon Task Description
Start network Start the connection to the network.
Stop network Stop the connection to the network.
Mapping Open the mapping dialog used to link variables to equipment items.
When a device (node) is selected.
Icon Task Description
Start device Start the connection to the selected device.
Stop device Stop the connection to the selected device.

Rules and behavior of cut, copy and paste


It is not possible to cut, copy or paste nodes in the Equipment folder. To make change to the equipment con-
figuration you must use the Communication Manager.

Communication status
The communication status for each network, device and frame is displayed when selecting the cor-
responding folder in the configuration tree. The following information is displayed. Show picture

l State - The overall communication state of the item.


l General status - The communication general status (formerly status word).

- 199 -
l Driver status - The communication driver-specific status (formerly complementary status word).
l Failed requests - The number of requests that sent while the device is out of service.
l Errors - The number of request attempts with no valid data returned by the device (typically requests
completed by a time-out or an exception code was received).
l Read requests/sec - The number of read requests per second.
l Write requests/sec - The number of write requests per second.

For more information, see the book Communication Status.

- 200 -
Equipment Settings
The Equipment Settings are accessed from the Application Explorer by selecting <Pro-
ject>.Communication.Data acquisition.Equipment and choosing the Settings command from the task list.
Show picture

l System variables
l Suffix for general status variables(*) - The suffix used for the general status variables (example
MODBUS.NODE1.BITREAD1.STATUS). The default setting is Status.
l Suffix for driver status variables(*) - The suffix used for the driver-specific status variables
(example MODBUS.NODE1.BITREAD1.STATUSCOMP), also known as the Supplementary or Com-
plementary status. The default setting is StatusComp.
l No automatic generation of equipment system variables - Disable the automatic generation of
the standard communication system variables.
l Invalidate variables - Defines if variable status should be set to invalid upon connection failure.
l Never - The variables are never made invalid. This can be used when there is intermittent com-
munication with the equipment.
l Immediately - The variables are made invalid immediately on a communication failure. This is
the default value.
l After a delay - The variables are made invalid after the specified delay.
l Control
l Enable sequencing write - See below.
l Maximum number of pending frames to be written (sequencing write disabled) - The maximum
number of frame writes which will be held in a buffer. If this number is exceeded then requests
will be discarded.

Sequencing write
If the option is on - write requests are serialized (processed one after the other) regardless of the com-
munication configuration. For example if there are two networks configured and a write is requested for
both network it will process one and then the other.
If the option is off - write requests are paralleled (requests are processed without waiting for completion of
a previous one). For serial drivers this takes place at the network level. For TCP/IP drivers it takes place at
the node level.

- 201 -
Using the Equipment Mapping Dialog
The Equipment Mapping dialog is used to map (link) C-CURE Building Management System variables to
items in a communication frame. It is opened from the Application Explorer from the Source tab of a vari-
able's properties dialog when an equipment source has been selected.
The left pane contains a tree display of the configured networks, nodes and frames. The right pane contains
a table with three columns. Show picture

l Address - The actual address in the equipment.


l Variable - The name of the variable linked to the item (if any).
l Index - The item number (relative to the frame).

Right clicking anywhere in the right pane displays a context menu with the following commands.

l Variable selector - Opens the Variable Selector dialog.


l Create variable - Allows you to automatically create a new variable and link it to the item. See below.
l Unmap item - Un-maps (removes the link) between the selected variables and the corresponding
equipment item.

How to map a variable to a communication frame

1. Open the variable's properties dialog and select the Source tab.
2. Select an equipment network using the Source drop down list box.
3. Open the Equipment Mapping dialog by clicking the Mapping command button.
4. Expand the equipment configuration tree in the left pane selecting the network, node and frame that
contains the item to which the variable is to be mapped.
5. Double click on the item. The Equipment Mapping dialog closes and the chosen Node, Frame, and off-
sets appear in the variable's Source tab.
6. Click OK to confirm the configuration and close the variable's properties dialog.

How to create a variable directly from the Equipment Mapping dialog.

1. Open the Equipment Mapping dialog and select the variable to be changed.
2. Expand the configuration tree in the left pane selecting the network, node and frame that contains the
item to which the variable is to be mapped.
3. In the right pane, right click on item to which the new variable is to be mapped and, from the context
menu, select Create variable.
4. The Create Variable dialog is displayed. Click OK to automatically create a variable and link it to the
item.
5. Repeat steps 2 to 4 to create more variables and close the Equipment Mapping dialog when finished.

You can also display the Create Variable dialog by double clicking in the right pane of the Equipment
Mapping dialog.

- 202 -
Options available from the Create Variable dialog
The following options are available from the Create Variable dialog. Show picture

l Use the full hierarchical name as the variable name - Automatically generate the variable name using
the node name, frame name and item index.
l Use network name as prefix - Prefix the automatically generated variable name with the net-
work name.
l Customize the variable name - Do not automatically generate the variable name. Instead, you must
manually enter the name in the field provided.
l Signed data - The data contained within the item will be configured to use a signed data type (as
opposed to an unsigned data having only positive values).
l Hide this window - If selected the dialog is hidden and the variable is generated by selecting Create
variable from the context menu with no further action. The dialog can be displayed again by using shift
key when selecting Create variable.

How to un-map a variable

1. Open the Equipment Mapping dialog and select the variable to be un-mapped.
2. Right click on the selected variables and, from the context menu, select the command Unmap items.
3. A dialog will appear asking for confirmation. Click OK to confirm the operation.

- 203 -
Communication configuration in general

- 204 -
About Configuring Communication with Equipment
Communication between C-CURE Building Management System and process equipment such as PLCs or loop
controllers is handled by the Communication Manager. It uses a set of communication protocols to com-
municate with the process equipment across a network or several networks. The equipment devices are
called nodes of a particular network. The messages that pass the between Communication Manager and the
process equipment are known as frames.
The Communication Manager is able to support up to 16 communication channels simultaneously, each with
its own protocol. Show schematic

This book provides a general overview of how to configure the Communication Manager. Since some of the
options in the configuration dialogs vary according to the protocol being configured, only illustrative
examples are given here. The information needed for configuring C-CURE Building Management System to
use a specific protocol is specified in the next book, Configuring a protocol.
The information in this book is essential for implementing any of the protocols properly. Please read
it first.

- 205 -
Configuring the communication

- 206 -
Overview
C-CURE Building Management System interacts with the Communication Manager as follows.

l The Communication Manager provides a real-time kernel between C-CURE Building Management Sys-
tem and the process equipment. It refreshes the values of variables from values in communication
frames. Show picture

l Each variable that has an equipment source is linked to a specific location in one of the communication
frames. You must link at least one variable to a frame for it to be activated, otherwise the Com-
munication Manager does not poll the frame. How this is done is explained in the book Using the Equip-
ment Mapping Dialog.
l The Communication Manager refreshes its data cache at the rate specified by the frame scan rate.
Variables are refreshed on event, whenever there is a change in the data.

- 207 -
Communication Objects
l Equipment communication is structured as a hierarchy of three communication object types. Show pic-
ture

l Network - This defines both the protocol for data exchange and the physical connection between the
process equipment and the computer. The physical connection can be any of these:
l A serial port.
l An Ethernet port.
l A proprietary card (such as Applicom or SA85).
l Node - The equipment on the network that holds the data to be accessed.
l Frame - A specific area of contiguous data to be accessed in read and/or write modes.

- 208 -
Configuring the Communication Manager in General
The configuration process has three stages:

1. Creating the network and protocol.


2. Creating the nodes attached on the network.
3. Creating the frames for each node.

If you have more than one network you need to repeat steps 1-3 for each network in turn.
The communication configuration is accessed as follows.

l In the main menu of C-CURE Building Management System, select Con-


figure.Communication.Equipment to open the Select Communication Objects dialog. Show picture

The dialog lists any networks, nodes and frames that have been configured. The entry '*CREATION*' in each
column is used to add a network, node or frame.

l To add a communication object, double-click on '*CREATION*' in the respective column (network,


node or frame).
l To modify a communication object, double-click on its name in the list.

To add or modify a node, you must first select its network. To add or modify a frame, you must first
select its node.
The resulting communication configuration is saved in a file called COMM.DAT file that is held in C-CURE
Building Management System project's C folder. This file should never be edited directly unless you are spe-
cifically instructed to do so.

Control buttons
For each type of communication object, the same control buttons appear at the foot of the dialog as follows.
Show picture

Button Effect
Show the settings for the previous item, if any (i.e. network, node or frame according to what
<<
is current).
>> Show the settings for the next item.
Delete Remove the communication object.
Validate Apply the changed settings. If successful, this is confirmed with a message.
Cancel Close the dialog without changing the settings.
Standard Restore the default settings in the dialog.
The << and >> controls follow a fixed sequence through the communication objects.

- 209 -
l All networks.
l All nodes of the selected network.
l All frames of the selected node.

- 210 -
How to Configure the Network and Protocol
When a network is created, the dialog box which first appears displays a list of supported network boards
and protocols. You should select the network board named MULTIPROTOCOL. Other network boards are only
available for compatibility reason and should not be used for new projects. Show picture

The network board and protocol is selected by moving the cursor over the relevant entry and clicking on it.
The OK command button is then selected. The network parameter dialog box will then be displayed into
which the attributes of the network are entered.

Configuring the Network Parameters


The parameters available in the network dialog box will differ slightly, dependent on the chosen network.
The one shown below is for a serial port. If you are in any doubt as to the use of any of the attributes contact
the appropriate authority at your supplier. Show picture

When a network parameter dialog box is displayed, there will be default values pre-entered for many of the
parameters. Only change these if you are sure that those required for your application are different.

Tab Options and Command Buttons

l Network name - Free format name to uniquely identify the network.


l Number - The number or name of the physical port used in the computer to connect to the network.
l Baud Rate - The baud rate of the network. The speeds available depend on the selected equipment.
Conventional serial boards are supported up to 38.4 kBd.
l Stop bits - The number of stop bits (1, 1.5 or 2).
l Data bits - The number of data bits per character.
l Parity - The choice of parity (Odd, Even or None).
l Modem handshaking - Enable the use of modem control lines.
l Time out - The period allowed between the start and end of a message cycle. If it is exceeded, the net-
work is flagged as faulty, and normal communications is replaced with the error recovery mechanism
until the network is restored. (Multiples of 50 ms).
l Activate on start-up - Activate the network on start-up of C-CURE Building Management System. If
this is not ticked then the network must be started by a SCADA BASIC program.

The options available in the Network Parameters dialog box may be different if protocols using a
communication media other than the serial port are selected.

- 211 -
- 212 -
How to Configure the Nodes
Each item of equipment on the network requires a configuration of a node in C-CURE Building Management
System. The node configuration specifies the type of equipment and its operating properties.

How to configure a node

1. Open the Select Communication Object dialog and select the network to which the node is to be
attached.
2. In the Node column double click the *CREATION* entry. An empty node configuration dialog is
opened.
3. Select and enter the properties for the node and click Validate to confirm the configuration. Show pic-
ture

Tab Options and Command Buttons

l Equipment - The name of this node.


l Equipment type - The specific name or model of the equipment on this node. A list box provides a list
of known types that are relevant to the selected protocol. If one of these is chosen, the range of avail-
able data tables is automatically configured. Alternatively, most protocols have a FREE option, which
may be used for equipment conforming to the protocol, but of a type unknown to C-CURE Building Man-
agement System. The data table range is then free format.
l Virtual - Enable the Virtual Equipment option. This is used in conjunction with the SCADA Basic
keyword CIMWAY, to change the node parameters at run time.
l Message time out - The minimum period between a message being received by C-CURE Building Man-
agement System and a new message being issued, in minutes, seconds and milliseconds (in multiples
of 50 ms).
l Timestamping - The options let you enable/disable timestamping, set an error code address, enable
use of the UTC format and apply direct archiving of data. Direct archiving is available for particular
protocols; for details see the topic Direct archiving.
l Network address - The address of this node on the network.
l Node time out - The maximum period allowed for a reply from the node, in minutes, seconds and mil-
liseconds. (Multiple of 50 ms).
l Activate on start-up - Activate the node on start-up.

- 213 -
How to configure the frames
A frame specifies an area of contiguous data to be accessed from a particular node. In the frame con-
figuration you specify the frequency at which the frame is to be accessed, the access mode (read, write or
both), and the starting address and number of data items.

How to configure a frame

1. Open the Select Communication Object dialog and select the network to which the node is to be
attached.
2. In the Node column, select the node to which the frame will be added.
3. In the Frame column, double click the *CREATION* entry. An empty frame configuration dialog is
opened.
4. Select and enter the properties for the frame and click Validate to confirm the configuration. Show pic-
ture

Tab Options and Command Buttons

l Frame - Name of this data frame.


l Frame format - The format of the data in this frame. A drop box provides a list of options that are
dependent on the selected protocol and equipment.
l Access authorization - Data frames may be read, write or both.
l Address - The data table range for this data frame. Clicking on this option will display a list of the avail-
able data tables that will be specific to the type of equipment selected for the node. See the section on
address selection below.
l Cyclic access - Enable the frame to be scanned periodically. If this is selected a scan rate must be
entered. This is the normal mode of operation for most protocols when reading a data frame.
l Priority mode - Enabling the priority mode bypasses the communication request stack queue. See the
topic Optimising the frames for more information.
l Scan rate - The rate at which C-CURE Building Management System will attempt to get the data from
the equipment, in minutes, seconds and milliseconds. (Multiples of 50 ms).

The Priority mode property should only be used with great caution because of the detrimental effect
it has on the processing of other frames. You are advised not to use unless it has been recommended
by technical support.

Address Selection
The address selection dialog box displays the range of available data tables for the protocol and equipment
selected. The required address range is selected by clicking on it in the list. The starting address and num-
ber of data items are then be entered. Show picture

- 214 -
Tab Options and Command Buttons

l Number of items - The number of data items for this frame. The maximum number of data items will
depend on the selected protocol.
l Starting address - The offset within the specified address range from which the frame will start.
l Information in the frame - The format of the data in the frame as sent by the PLC.
l Binary - Binary data format. This is the default and the format used by the majority of com-
munication protocols.
l ASCII - ASCII data format. Used for legacy protocols only. Do not use unless instructed to do so
by your support authority.
l BCD Compact - BCD data format. Used for legacy protocols only. Do not use unless instructed to
do so by your support authority.

- 215 -
How to Start the Communication
Communication between C-CURE Building Management System and the process equipment can be started as
follows:

l Automatically - When C-CURE Building Management System starts, the Communication Manager
starts the communication. The settings are in the menu Configure.Project.Settings. See the topic Sta-
tion startup.
l Manually - You can turn all communication on or off using the buttons at the foot of the Select Com-
munication Objects dialog (Configure.Communication.Equipment). Show picture

l From a SCADA Basic program - A program issues a command that controls the Communication Man-
ager. For details, see the CIMWAY instruction modes START and STOP in the help for SCADA Basic.

Activating a communication object at start-up


For both the automatic or manual ways of starting communication, only the communication objects that
have been configured to be activated at startup are started.

l For the network: Show picture

l For the node: Show picture

- 216 -
l For the frame Show picture

For a frame to be started you must link at least one variable to it, otherwise the frame will not be
scanned.

Further information
For details of other start-up options, see the topic Command line arguments in the main Help (in the book
Deployment).

- 217 -
How to Check a Protocol's Version Number
If you have asked for technical support, you may be asked to check a protocol's version number. The pro-
tocols take the form of .DLL files stored in C-CURE Building Management System sub-folder BIN. There is
one .DLL file for each protocol. Show picture

You can check a protocol's version number using the Event Viewer.

1. Open the Event Viewer (press key F7, or use Alt+Tab to switch windows).
2. Find the entry that contains 'CW, Protocol'. Show picture

3. Each Protocol line identifies a protocol that has been loaded, plus its version number (e.g.
'IPXBUS - Release 4.47').

If the entry 'CW, Protocol' does not appear, communication has not started. You must start it as
described in the topic How to start the communication.

- 218 -
Direct Archiving
You can configure C-CURE Building Management System to archive data directly, without first processing
them as real time or instantaneous data. The instantaneous data are still acquired in parallel via the usual
polling mechanism. However, you can completely isolate the data streams for process monitoring from his-
torical data streams.
This feature is available for the following protocols when timestamping at the device level is enabled:

l XBUS-IP-MASTER,
l IP-ISO-S7,
l IP-SAIA,
l S-BUS,
l IP-SRTP,
l IP-MOXA.

To activate this feature, you configure the property DeltaTS at the node level. At runtime, any data retrieved
and having a timestamp older than Delta TS (compared to current time) is sent for archive recording without
updating the corresponding variable value. Show picture

- 219 -
Optimising the communication

- 220 -
Understanding the Message Timing
There are three periods used when sending and receiving messages.

l Node time-out - The interval while C-CURE Building Management System waits for a reply from the
process equipment.
l Scan period - The interval at which C-CURE Building Management System requests information from
the process equipment
l Message time-out - The minimum interval that C-CURE Building Management System must wait, after
receiving an answer, before sending any other request. This is not used for the majority of protocols
and is set to 0.

The sequence for exchanging messages (not taking into account the message time-out) is as follows:

1. C-CURE Building Management System sends a request message and waits for a reply.
2. If a reply is received, C-CURE Building Management System waits for the scan period and sends the
next request.
3. If the equipment does not reply within the node time-out period, C-CURE Building Management Sys-
tem tries again.
4. A further retry is made (three tries in total) and if there is no reply the node is flagged as failed and C-
CURE Building Management System continues to try at the scan period.
5. When a reply is received, the node is flagged as healthy.

See also the topic How communication errors are managed. Show picture

The node and message time-out periods are set in the Node Parameters dialog. Show picture

- 221 -
Optimizing the Frames
It is necessary that you design the format and tune the handling of messages, to sustain the data flows
required, for C-CURE Building Management System to function effectively. You can use both of these means
of doing so.

l Scan rate - This is set in the Operating Mode section of the Frame Parameters dialog. Show picture

l Frame size - The frame size is the sum of frame overheads (message type, check sum etc.) plus the
data fields specified in the dialog Enter Address and Size. This is opened from the drop-down arrow
beside 'Address: ... From'. Show picture

The importance of correctly configured frames


It is very important to configure the frames correctly. Incorrectly configured frames (bad address, bad size
etc.) will, depending on the equipment and protocol, cause error processing. While errors are being pro-
cessed, communication using correctly configured frames will be delayed with a consequential reduction in
performance.

l When using a serial driver, bad configuration will have an impact on the entire network.
l When using a TCP/IP driver, bad configuration will affect a particular equipment.

Scan Rate
The Communication Manager sends out requests to the process equipment cyclically. The period at which
the requests are sent is specified in the scan rate. The default value is set to 1 second, but you should
change it to a value that reflects the rate of change in your process. If for instance you were monitoring a
temperature setting, a scan rate of 1 second would normally be too frequent. You might set the scan rate to
1 minute or more to reduce the message traffic on the network. Show picture

If you think of a frame on a network as a car on the road, the more cars you have, the busier the
road is. If you have too many cars, the traffic can stop altogether.

Frame size
You should minimize the number of frames transferred between PLCs and the Communication Manager. It is
preferable to use one big frame than several small ones, even if not all frame locations are mapped to vari-
ables. Show picture

- 222 -
However, you must also balance this with the scan rate. For example, if just one variable is required at a 1-
second rate and the others at a 1- minute rate it is better to have two frames, one small frame scanned at
once per seconds and one large frame scanned at once per minute.

Again using the traffic analogy, there is less traffic on the road if you put 50 people in one bus rather
than 1 person per car.

Understanding the read and write queues


C-CURE Building Management System processes frames using a queue mechanism. Frame requests are
added to the top of the queue. Frames requests are processed from the bottom of the queue ensuring
frames are processed in strict order. This is known as a first in first out mechanism.
The frame queues are organized in pairs, one for read frames and one for write frames. The Communication
Manager toggles between the two queues processing a read request and then a write request. If one or other
of the queues is empty, it is omitted from the sequence.

l For a serial protocol there is one read queue and one write queue for each network. The frames for all
equipment on a network are managed by the two queues.
l For a TCP/IP protocol there is one read queue and one write queue per equipment.

Frames that have the Priority mode property ticked go to the front of the queue bypassing the queuing mech-
anism.
The Priority mode property should only be used with great caution because of the detrimental effect
it has on the processing of other frames. You are advised not to use unless it has been recom-
mended by technical support.

- 223 -
Sending Values Using SCADA Basic
This topic outlines the correct way to set an equipment variable from the SCADA BASIC programming lan-
guage.
When you are developing a SCADA Basic program and you want to send several values to equipment
variables you must use the SET and SENDLIST("MULTIPLE") instructions (rather than try to write the
values directly one by one).

Example
You might code these three commands to apply values to three fields:
@VAR1 = 10;
@VAR2 = 11;
@VAR3 = 12;
Three write requests in succession would be sent to the equipment. This is an inefficient way of applying the
values since it slows down the communication.
Instead, you should set the three values:
SET("VAR1",10);
SET("VAR2",11);
SET("VAR3",12);
then issue one SENDLIST command:
SENDLIST("BLOC");
The effect is to send one write request to the equipment.
For the instructions SET and SENDLIST to work efficiently, the variables must be within the same
frame. For details please refer to the topic Optimizing the frames.

For further information


For the full syntax, please refer to the commands SET and SENDLIST in this sub-book:

l Programming Languages.SCADA BASIC.Language Reference.Instruction Reference A to Z.

- 224 -
Communication status

- 225 -
Understanding Communication Status
The status information for exchanges between the Communication Manager and the configured equipment is
displayed at the foot of the Select Communication Objects dialog. The status information are also available
in the Application Explorer.
For each of the configured Networks, Nodes and Frames there are two status words and two counters. Show
picture

l The general status in hexadecimal for the network (0), node (2) and frame (4). The meaning of the
general status is the same for all protocols.
l The driver status in hexadecimal for the network (6), node (8) and frame (10). The meaning of the
driver status is specific to each protocol. Most protocols only provide specific status information for
the frame. See the help for the protocol in use for detailed information.
l The number of failed requests (1, 3, 5).
l The number of errors (7, 9, 11).
l Statistics. The number of read requests and the number of write requests per second.

About the error counters


The error counters display the number of failed frame requests (failures) and the number of sending
attempts (tries). For more information on how failed frame requests are managed see the topic How com-
munication errors are managed.

l The frame counters show the number of failures for each frame.
l The node counters show the number of failures for all frames of that node.
l The network counters show the number of failures for all frames for all nodes on that network.

The counters are only reset when the communication is stopped and restarted, or when the counter value
rolls over.

About the hexadecimal status


Each status is made up of 16 status bits displayed as four hexadecimal characters.
B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
Fourth digit Third digit Second digit First digit

l The network status provides information about the physical connection to the data acquisition network
(network interface, can be serial, IP or based on a transport-specific communication board). With
most networks, diagnosis at the network level is of little help and so, the status mainly indicates con-
figuration correctness and if the network is started or stopped.
l The node status provides information about a specific node on the network. Most networks do not dir-
ectly support node diagnostic messages and so, the status mainly indicates configuration correctness
and if the node is started or stopped. However, if there is an error with a frame associated with a node
this will be reported in the node status.
l The frame status provide more information about the communication status as most the information is
related to the success or failure of frame requests. In the event of abnormal operation, the frame
status is also reported in the Event Viewer (F7).

- 226 -
For a guide to the meaning of each main status click the ellipsis button underneath it. A status dialog is dis-
played with the meaning for each set status bit displayed in bold. Show picture

The driver statuses are specific to each protocol. Most protocols only provide specific status information for
the frame. See the help for the protocol in use for detailed information.

Interpretation of the frame general status


The following table provides help for interpreting the common values of the frame general status.
Bit Reason Interpretation
B0 Fault during the last exchange There was a failure during the last exchange on this frame.
If set frequently without bits B3, B4 or B5 also set, it indicates
that the node time-out has been set too short.
B1 Network out of service The node time-out to one of the network nodes has been
exceeded.
B2 Equipment out of service No correct replies received from the equipment.
B3 Transmission error An error has been detected on the line. Depending on the pro-
tocol, more information may be reported in the driver status.
B4 Protocol error An error has been detected in the protocol. Depending on the
protocol, more information may be reported in the frame driver
status.
B5 Error reported by equipment Depending on the protocol, more information may be reported
in the equipment driver status.
B6 Network error Depending on the protocol, more information may be reported
in the network driver status.
B7 Exchange time out No response received, the frame request timed-out.
B8 Application command queue Too many on-demand exchanges to be executed at a time - the
number of 64 stored commands for a network has been
exceeded. The last command will be lost.
B9 Auto scan command queue full. Too many auto scan exchanges to be executed at a time - the
number of 64 stored commands for a network has been
exceeded. The last exchange command will be lost.
B10 Priority command queue full. Too many priority exchanges to be executed at a time; the num-
ber of 20 stored commands for a network has been exceeded.
The last exchange command will be lost.
B11 Not used
B12 Last command is still being pro- The previous exchange command is still in the queue or is in
cessed. course of execution.
B13 Auto scan active
B14 Auto scan exchange already It is normal for this bit to be set occasionally. If set per-
present in the queue. manently, the scan period for this frame is too small. The
request then remains constantly in the queue and the scan
period may not be maintained.

B15 Refreshed image table This table has been read in the equipment. A value has been
changed since the last scan and the result of the read is stored
in the table.

- 227 -
Commonly Occurring General Status
Network General Status

Code Reasons Comment


0700 Network started OK Normal operating condition.
Possible causes:
Network did not start Error with the physical interface (non-existent port etc.).
0413
properly Incorrect or missing protocol DLL file.
Incorrect or corrupt communication configuration file.

Node General Status

Code Reasons Comment


0700 Node started OK Normal operating condition.
Error with one or
0701 more of the node's Check the frame error codes.
frames

Frame General Status

Code Reason Comment


a000 Frame OK Normal for a read or read/write frame.
e000 Frame OK The frame is being scanned at a slower rate specified in the frame con-
figuration. It is likely that there is too much traffic on the network. Reduce
either the frame scan rates or the number of frames.
ffff The frame is not The communication is stopped or no variables are linked to the frame.
being scanned
8000 Frame OK Normal for a write only frame.
2025 Frame error Check the driver status. If the driver status is 0000 then it is probably an
2085 exchange time out or no reply. Check the following:
6025 That the communication properties configured in C-CURE Building Management
6085 System match those of the equipment.
That the physical connection (cable).

- 228 -
How Communication Errors are Managed
If the Communication Manager fails to get a reply within the time-out period, or receives an invalid reply
from a request, it takes this series of actions. Show picture

1. The request is retried up to three times, in an attempt to get a reply.


2. If, after the third retry, there is still no reply (or an invalid one), the frame is flagged as failed.
3. The corresponding error code is written to the frame status.
4. Subsequent requests for the message are processed at the frame scan rate but only tried once.
5. As soon as a valid reply is received from the equipment, the status are reset.
6. Any subsequent failure will repeat the sequence starting with three retries in an attempt to get a
reply.

The counts of attempted exchanges and failures are only reset when the communication is stopped.

- 229 -
Configuring a protocol

- 230 -
About Configuring a Protocol
The topics in this book specify how to configure C-CURE Building Management System to communicate using
each protocol or family of protocols. It does not provide detailed specifications of the protocols as such.
The contents are arranged in a sub-book for each type of protocol and a sub-book within that for each pro-
tocol.
The topics vary according to the protocol, but the minimum set of information is as follows:

l Overview.
l Network configuration.
l Node / Equipment configuration.
l Frame configuration.
l Address selection.
l Protocol status words.

Categories of protocol
C-CURE Building Management System equipment protocols can be grouped into three categories: Serial, Eth-
ernet and others.
Only the most commonly used protocols are listed. If the protocol you are using does not appear
here, please check the Pdf documents in the distribution media's Addenda folder or contact your tech-
nical support for more information.

- 231 -
Serial protocols

- 232 -
Johnson Controls BUS9100

- 233 -
Johnson Controls BUS9100 - Overview
The BUS9100 protocol is a subset of the Optomux protocol that is used for connection to DX-9100 equipment
from Johnson Controls.
It uses the standard COM port of the PC. In any exchange, C-CURE Building Management System is the mas-
ter and the PLC is slave.
The maximum number of devices per network is 32.
The functions supported by the protocol are:

l Read consecutive items (code 0xac)


l Write a single item (code 0xC4)

- 234 -
Johnson Controls BUS9100 - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the MULTI PROTOCOL environment and the BUS9100 protocol. Show picture

4. Click on OK to open the Network Parameters dialog. Select the COM port to be used.
5. In the drop-down field for Network Name, enter the name by which the network will be known within
C-CURE Building Management System's configuration.
6. Some port properties are fixed (Baud rate 9600, data bits 8, parity No). Set the others as follows:
Show picture

Property Setting
Stop bits 1
Modem Handshake Default value (unticked).
Time-out Default value (1 second).
Activate at start-up Tick to enable starting of the network when the Communication Manager starts.

7. Confirm the dialog to apply the configuration.

- 235 -
Johnson Controls BUS9100 - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the dialog Select Communication Objects,
select the BUS9100 network as previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dia-
log.
3. Apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System.
Choose:
Equipment type l DX9100 Dec for decimal addressing.
l DX9100 Hex for hexadecimal addressing.
Message time-out Leave at default value.
Network address Decimal value representing the equipment’s network address.
Time-out Leave at default value.
Activate at start-up Tick to enable starting of the network when the Communication Manager starts.

4. Click on the Validate button to register the settings, then close the dialogs.

- 236 -
Johnson Controls BUS9100 - Frame Configuration
All the DX9100 equipment items are coded in 1, 2 or 4 bytes. According to the frame you choose to read, the
value read will be interpreted as a BIT, INTEGER or REAL value.

1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-


log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
3. In the Frame Parameter dialog, apply or confirm the settings. Show picture

Type Frame avail- Access Description


able
FREE WORD_ 2 byte value interpreted as 16 bits.
BIT R/W
BIT The frame size MUST be a multiple of 16.
FREE BYTE_ 1 byte value interpreted as 8 bits.
R/W
BIT The frame size MUST be a multiple of 8.
WORD FREE WORD R/W 2 byte value interpreted as a integer.
FREE WORD_ 1 byte value interpreted as an INTEGER.
R/W
BYTE Maximum value = 255.
2 byte value interpreted as a REAL.
REAL FREE REAL R/W Minimum value = –1999.
Maximum value = 10,000.
DWORD FREE DOUBLE R/W 4 byte value interpreted as an INTEGER.

4. Click on the Validate button to register the settings, then close the dialogs.

- 237 -
Johnson Controls BUS9100 - Addressing
The limit on different data types in the DX9100 does not allow them to be specified individually in the con-
figurator. Here the option to leave the configuration free for the user has been chosen. This is to enable the
user to minimize the number of types.
It is best to group together as many consecutive items of the same type as possible (i.e. coded with the
same number of bytes).

BIT coded on 1 byte


To read The 8 DI of DX9100 The 8 DO of DX9100
BIT frame of type FREE BYTE_BIT FREE BYTE_BIT
Starting address 6 5
Amount of data 8 8
However, the best option is to create:
BIT Frame of type FREE BYTE_BIT
Starting address = 5
Amount of data = 16
That way you can read the DI and the DO at the same time.
The rule is that the consecutive data have to be of the same type. In that case the DO (address 5) and DI
(address 6) are consecutive and are both coded on one byte.

BIT coded on 2 bytes


An example could be the logic constant and logic result items. There are four consecutive logic constant and
result items in the DX9100.
To read: The 64 bits coded in LRST1, LRST2, LCOS1 and LCOS2
BIT frame of type FREE WORD_BIT
Starting address 0x8
Amount of data 64

WORD coded on 1 byte


An example is the prescaler DI1 to 8. Eight consecutive items are all coded on a 1 byte (pulse count).
To read: Prescaler DI1 to 8
WORD frame of type FREE WORD_BYTE
Starting address 0x16
Amount of data 8

REAL coded on 2 bytes


An example is the PM1K1 to 32. 32 consecutive items are all coded on 2 bytes to represent a REAL value
(pulse count).
To read: PM1K1 to 32
REAL frame of type FREE REAL
Starting address 0x5a
Amount of data 32

DOUBLE coded on 4 bytes


An example is the pulse count DI1 to 8. Eight consecutive items are all coded on 4 bytes and representing a
double value.
pulse count
To read: Pulse count DI1 to 8
REAL frame of type FREE DOUBLE
Starting address 0x16
Amount of data 8

- 238 -
- 239 -
Johnson Controls BUS9100 - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Driver status Meaning


01 Not an existing command code.
80 Mismatched item function.
81 No existing item or function.
82 Temporarily impossible to access to item.
83 Not a programmable item.
84 Table programmed with illegal items.
85 Trend programmed with illegal items.
86 Invalid functional module.
87 Addressing range exceeded.
ee Frame size is not a multiple of 8 or 16 (according to the frame type).
ff The absolute value to be written was too large.

Status 80 to 87 are generated by the equipment. For more information, see the documentation sup-
plied by Johnson Controls.

- 240 -
Matsushita Mewtocol-Com SR

- 241 -
Matsushita Mewtocol-Com SR - Overview
The Matsushita Mewtocol-Com SR protocol is a master slave protocol for serial communication that enables
data exchange between C-CURE Building Management System and the PLCs. The functions implemented
are:
Command code Description
RCC Read word unit of contact information
WCC Write word unit of contact information
RD Read data area
WD Write data area
RS Read timer and counter set value area
WS Write timer and counter set value area
RK Read timer and counter elapsed value area
WK Read timer and counter elapsed value area

This driver replaces the previous Matsushita driver with the designation MEWTOCOL_COM.

- 242 -
Matsushita Mewtocol-Com SR- Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - MewtocolCom-SR.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following settings. Show picture

Property Settings
Comment A description of the network. Optional.
Time out Not used - leave at the default setting.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.
The network can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to register the settings, then close the dialogs.

- 243 -
Matsushita Mewtocol-Com SR - Node Configuration
1. Select the command Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select a Mewtocol SR network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System.
Equipment type Select FPX.
Message time out Leave this set to default of 0.
Network address The address of the PLC within the network.
Node time out Maximum waiting time between a request and the reply from the equipment.
Tick to enable starting of the equipment when the network is started.
Activate on start-up The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

4. Click on the Validate button to register the settings, then close the dialogs.

- 244 -
Matsushita Mewtocol-Com SR - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are BIT, WORD, REAL and DWORD.
Access grant Specify whether the frame is read only, write only or read/write.
Select the memory area for this frame in the equipment. See the topic Address Selec-
Address tion and the section on Address Selection in the topic Configuring the Communication
Frame Properties.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a Write Only frame, this
Cyclic access
option must be unselected.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 245 -
Matsushita Mewtocol - Address Selection
The Characteristics section of the Frame Parameters dialog configures the data range for each frame, how it
is read from and written to the equipment, and how it is interpreted in C-CURE Building Management Sys-
tem. All numbers are given in decimal.

Before you create a frame, make sure that the PLC you are using complies with the table.

Standard address frames


PLC Table Description Access

BIT table
Ext_InputX External input Read
Ext_Output_Y External output Read / Write
Internal_Relay_R Internal relay Read / Write
Link_Relay_L Link relay Read / Write
Timer_T Timer contact Read
Counter_C Counter contact Read
WordBit_DT Data register like bit Read / Write
WordBit_LT File register like bit Read / Write
WordBit_FL Link register like bit Read / Write

WORD table
Data_Reg_DT Data register Read / Write
Data_Reg_FL File register Read / Write
Data_Reg_LD Link register Read / Write
TC_SV Pre-set value Read / Write
TC_EV Elapsed value Read / Write

REAL table
Data_Reg_DT Data register Read / Write
Data_Reg_FL File register Read / Write
Data_Reg_LD Link register Read / Write
TC_SV Pre-set value Read / Write
TC_EV Elapsed value Read / Write

DWORD table
Data_Reg_DT Data register Read / Write
Data_Reg_FL File register Read / Write
Data_Reg_LD Link register Read / Write
TC_SV Pre-set value Read / Write
TC_EV Elapsed value Read / Write

Real and Dword data uses two word address, e.g.: in a Real Table, the Data_Reg_DT 0 writes on words 0
and 1 of the PLC.

Notes on the use of BIT tables


For Ext_InputX, Ext_Output_Y, Internal_Relay_R and Link_Relay_L: the starting address refers to the word
number not the bit number. For example, an Ext_InputX frame with Quantity of Data of 32 and a Starting
Address of 7 provides access to X70 to 8F.
For Timer_T and Counter_C: timer and contacts are not handled in word units in the PLC. The starting
address refers to the word number not the bit number. For example, a WT frame with Quantity of Data of 32
and Starting Address of 5 provides access to (5*16 = 80) T80 to T112.

- 246 -
Bits are written in word blocks, so any change in one bit produces a block write in which there is a
risk of overwriting any bit (in the same block) that has been updated from within the PLC.

- 247 -
Matsushita Mewtocol - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Error code Meaning
0001 MEWTOCOL_NOT_ANSWER.
0002 MEWTOCOL_NOT_CONNECTION.
0003 MEWTOCOL_NOT_ENOUGH_DATA.
0004 MEWTOCOL_ERROR_BCC.
0006 MEWTOCOL_ERROR_RESPONSE.
0007 MEWTOCOL_ERROR_WRITE.

- 248 -
Modbus II

- 249 -
Modbus II - Overview
The Modbus II data acquisition driver is designed to communicate with Schneider Electric devices of type
T200 series 2, FLAIR200C and G200.
The driver can be used over the following media:

l Permanent serial link,


l Telephone modem link,
l Radio link (non-permanent serial),
l Permanent, semi-permanent or non-permanent TCP/IP link.

The Application layer of the driver is identical for the four types of links, only the behavior differs.
A serial link may be used to directly connect to devices having an RS232 port or to several devices con-
nected to an RS485 network. The driver must be configured with cyclic access.
Modem access may be used to connect equipment via a PSTN or GSM network. The modem must be
installed and configured on the host operating system. The modem must support the Microsoft® TAPI ver-
sion 2.0 interface. The protocol must not be configured for cyclic access (no cyclic frame in this con-
figuration).
A radio link may be used to connect to devices via a radio network. The driver must not be configured for
cyclic access (no cyclic frame in such configuration).
The TCP/IP link is used to connect to devices via an Ethernet network, or GPRS with static or dynamic IP
addresses.
The driver supports the Report By Exception mode of the devices:

l Incoming calls via phone/modem,


l Exchanges initiated by a device with Radio link,
l Connection initiated by a device with TCP/IP link.

The driver does not support commands using the Select Before Execute mode.

Frames structures for Serial, Radio and Modem links


Device address Function code Data address data CRC
1 byte 1 byte 2 bytes X bytes 2 bytes

Frames structures for TCP/IP link


Header modbus TCPIP Frame (frame size*)
Function
Frame Device address Data address Data
Frame Id Version code
size*
X
2 bytes 0x0000 2 bytes 1 octet 1 octet 2 bytes
bytes

Timestamping
The driver supports timestamped data. In the device, a memory zone is available to exchange timestamped
data between C-CURE Building Management System and the equipment. This zone consists of two parts, the
header and a timestamped block area.
The header is a word divided into two bytes. The most significant byte contains an exchange identifier, and
the least significant byte contains the number of blocks to read.
The block space contains timestamped data, it can support up to four of them.
The driver always reads the entire exchange zone containing the header and the block space.
When the driver has interpreted the blocks, it writes to the address of the header, a word containing the
same exchange identifier and a number of blocks equal to 0.
The driver loops on the reading of the timestamped data as long as the number of blocks is different to 0
before reading the other zones.

- 250 -
Bit data can be acquired via timestamped blocks and direct readings from other address spaces (this
depends on the configuration of the equipment: "alarmed" data or not).
In order to avoid duplicated data, the driver waits for the end of a read cycle before transmitting the data to
C-CURE Building Management System Data Manager. This makes it possible to manage the case of the data
retrieved both by the timestamped blocks and by the readings of the other zones, and to transmit the proper
timestamp (device timestamp if it exists) to the data manager of C-CURE Building Management System.
Unlike timestamped bit data, the timestamped words are read and interpreted directly without waiting.

Invalid data
A number of data are interpreted by the protocol before transmission to C-CURE Building Management Sys-
tem data manager:

l The TM words for which the value 0x8000 allows the device to define a word as invalid; this invalidity
is then transmitted to C-CURE Building Management System.
l The TMD double-words for which the value 0x80000000 allows the equipment to define a double-word
as invalid; this invalidity is then transmitted to C-CURE Building Management System.
l The TSD double remote signaling for which the values 00 and 11 are invalid values; this invalidity is
then transmitted to C-CURE Building Management System.

Clock synchronization
The driver automatically synchronizes devices’ clocks in the following cases:

l Modem link, at each connection,


l Radio link, at each connection initiated by the device,
l TCP/IP link, at each connection, only in case of non-permanent connection.

The driver never synchronizes devices’ clocks in the following cases:

l Serial link,
l TCP/IP link, at each connection, in case of permanent and semi-permanent connection.

In addition, it is possible to force a clock synchronization using the COMMAND type frame.

- 251 -
Modbus II – Network configuration
Modem / Serial / Radio access

1. Open the Select Communication Objects dialog.


2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values:
Network board - MULTI PROTOCOL
Protocol - MDB-II-MODEM, MDB-II-SERIAL or MDB-II-RADIO
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration. Show picture

5. In the Network Parameter dialog, apply or confirm the following settings :

Property Setting
Connection port
Number Select the communication port used to access the device. In case of MDB-II-
MODEM protocol, select the communication port configured for the modem in the
operating system.
Characteristics Only used in case of Serial and Radio links.
Baud Rate Select the baud rate.
Data bits Select the number of data bits.
Stop bits Select the number of stop bits.
Parity Select the parity.
Modem handshaking Leave at default value (not ticked).
Operating mode
Time Out Unused, leave the default value.
Activate at start-up Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to save properties, then close the dialogs.

TCP/IP access

1. Open the Select Communication Objects dialog.


2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values:
Network board - MULTI PROTOCOL
Protocol - MDB-II-TCPIP.
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration. Show picture

- 252 -
5. In the Network Parameter dialog, apply or confirm the following settings :

Property Setting
Server port number Select the listening port number.
Disconnection after silence Detection period of communication loss (in seconds).
(sec)
Time Out Unused, leave the default value.
Activate the network at startup Tick to enable starting of the equipment when the network is started. The
equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

6. Click on the Validate button to save properties, then close the dialogs.

- 253 -
Modbus II – Node configuration
Serial / Radio access

1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,


select the Modbus II network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following properties: Show picture

Property Description
Equipment Name for the node within C-CURE Building Management System.
Characteristics
Equipment type Select the type of the node.
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Node
Network address Modbus slave address.
Operating mode
Node time out Maximum waiting time between a request and the reply from the equipment.
Activate at startup Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

4. Click on the Validate button to save properties, then close the dialogs.

Modem access

1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,


select the Modbus II network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.

- 254 -
3. Apply or confirm the following properties: Show picture

Property Description
Equipment Name for the node within C-CURE Building Management System.
Characteristics
Equipment type Select the type of the node.
Virtual Not used. Do not select.
Message time out Must be 0.
Node
Network address Modbus slave address
Phone number Phone number of the node
Use dialing rules This checkbox allows you to take advantage of the operating system's dialing
rules, including configuring full-format phone numbers with region code and coun-
try code.
Country code Country code.
Area code Area code.
Operating mode
Node time out Maximum waiting time between a request and the reply from the equipment.
Activate at startup Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

4. Click on the Validate button to save properties, then close the dialogs.

TCP/IP access

1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,


select the Modbus II network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.

- 255 -
3. 3. Apply or confirm the following properties: Show picture

Property Description
Equipment Name for the node within C-CURE Building Management System.
Characteristics
Equipment type Select the type of the node.
Virtual Not used. Do not select.
Message time out Must be 0.
Node
Network address Must be set to 255, except if using a gateway.
IP address IP address of the equipment. It can be empty in case of dynamic IP address.
Port number The port number of the equipment. The default port number is 502.
Reconnect period (sec) When the equipment is inaccessible, it is the reconnection attempt period.
Equipment ID A word used to uniquely identify a device on the network. It is mandatory when the
IP address is dynamic.
Max connection period Maximum duration of connections in the case of non-permanent connection. When
(sec) this duration is reached, the connection is closed automatically by the driver.
Refresh period (sec) When the equipment is connected, it is the period during which data are refreshed
(In GPRS, the period can be longer).
Connection type This option indicates the connection type :
0 = non-permanent link
1 = permanent link
2 = semi-permanent link
Semi-permanent link enables to reduce the amount of data transmitted and thus
the cost of connections
Dynamic IP address Check to indicate that the IP address of the device is dynamic.
Keep alive period (sec) Period between 2 keep-alive requests. The keep-alive enables to keep a con-
nection active. Only used with Permanent and semi-permanent connections.
Keep alive retry period When a keep-alive request failed, it is the delay before sending another keep-alive
(sec) request.
Keep alive retry nb Number of retry before closing a connection.
Operating mode
Node time out Timeout delay between a request and the response sent by the device (with GPRS,
this delay is typically longer).
Activate at startup Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

- 256 -
4. Click on the Validate button to save the properties, then close the dialogs.

- 257 -
Modbus II – Frame configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame properties dialog. Show picture

3. Apply or confirm the following properties:

Property Description
Frame Name for the frame within C-CURE Building Management Sys-
tem.
Characteristics
Frame format The supported formats are BIT, WORD, REAL and DOUBLE.
Access grant Specify whether the frame is read only, write only or
read/write.
Address Select the range of data to be monitored in the device. See the
topic on Address Selection.
Operating mode
Priority mode In a queue of write requests, the priority frame is processed
first.
Cyclic access Tick to enable a frame to be periodically scanned. For a write
only frame and for Radio, Modem or TCP/IP links this must not
be ticked.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to save the properties, then close the dialogs.

- 258 -
Modbus II – Address selection
The Address and Size dialog is used to configure the data range for each frame, how it is read from and writ-
ten to the equipment, and how it is interpreted in C-CURE Building Management System.
Mnemonic in the Access Address Data
Timestamped Description
device mode range type
VERSION L 1 No Word Version Zone
TM L 1 to 16 Yes Word TM Zone
Double
TMD L 1 to 8 Yes TMD Zone
Word
Identification and con-
STATUS L/E 1 to 16 Yes Bit
figuration Zone
TCD E 1 to 24 No Bit TCD Zone
TSD L 1 to 24 Yes Bit TSD Zone
CR L 0 to 6 Yes Bit CR Zone
TSS L 1 to 128 Yes Bit TSS Zone
COMMAND E 1 to 4 No Bit Command frame of the driver
Timestamped zone. Header
EVENTS L 1 to 4 No Bloc
writing is automatic.
TEST L/E 1 to 144 No Bit Test Zone
TEST L/E 1 to 9 No Word Test Zone
MODEMSTATUS L 1 to 18 No Word Modem Frame Info
MODEMSTATUS L 1 to 6 No Bit Modem Frame Info
RADIOSTATUS L 1 to 11 No Word Radio Frame Info
RADIOSTATUS L 1 to 4 No Bit Radio Frame Info
TCPIPSTATUS L 1 to 7 No Bit TCP/IP Frame Info
TCPIPSTATUS L 1 à 22 No Byte TCP/IP Frame Info
TCPIPSTATUS L 1 à 18 No Word TCP/IP Frame Info

Frame type COMMAND


This table gives the addresses of the data:
Index Description
1 Force clock synchronization
Only the first bit is used. Forcing this bit to 0 or 1 causes the device clock to be synchronized if it is con-
nected.

Frame Info for Modem link - MODEMSTATUS


For modem access, two types of information frame are available, providing access to data related to the
communication and call status.
Word Status
This table gives the addresses of the data:
Index Description
1 Elapsed time of the connection (minute)
2 Elapsed time of the connection (second)
3 Remaining time before automatic disconnection (minute)
4 Remaining time before automatic disconnection (second)
5 Maximum connection duration (second)
6 Timestamp of last connection (year)
7 Timestamp of last connection (month)
8 Timestamp of last connection (day)
9 Timestamp of last connection (hour)
10 Timestamp of last connection (minute)

- 259 -
11 Timestamp of last connection (second)
12 Connection attempts counter
0 = no attempt in progress or last connection completed successfully.
1 = second attempt in progress.
2 = third attempt in progress.
3 = The last attempt failed, the value will only change when another connection is requested.
13 Timestamp of last refresh (year)
14 Timestamp of last refresh (month)
15 Timestamp of last refresh (day)
16 Timestamp of last refresh (hour)
17 Timestamp of last refresh (minute)
18 Timestamp of last refresh (second)
Bit Status
This table provides the data addresses:
Index Description
1 Connection state:
0 if not connected
1 if connected
2 Connection in progress for the equipment (telephony dialing phase can be long):
0 if no connection attempt is in progress
1 if a connection attempt is in progress
3 Read status of the timestamped zone. Set to 1 when there are no more blocks to read.
4 Connection in progress for the network:
0 if no connection attempt is in progress
1 if a connection attempt is in progress on the network the device belongs to.
5 Synchronization status of the equipment. Set to 1 when all data has been read successfully.
6 Status of the equipment time-synchronization, set to 1 when the time has been updated suc-
cessfully.

Frame Info for Radio link – RADIOSTATUS


For radio access, two types of information frames are available, providing access to data related to the com-
munication and call status.
Word Status
This table provides the data addresses:
Index Description
1 Elapsed time of the connection (minute)
2 Elapsed time of the connection (second)
3 Remaining time before automatic disconnection (minute)
4 Remaining time before automatic disconnection (second)
5 Maximum connection duration (second)
6 Timestamp of last connection (year)
7 Timestamp of last connection (month)
8 Timestamp of last connection (day)
9 Timestamp of last connection (hour)
10 Timestamp of last connection (minute)
11 Timestamp of last connection (second)
Bit Status
This table provides the data addresses:
Index Description
1 Connection state:
0 if not connected
1 if connected

- 260 -
2 Read status of the timestamped zone. Set to 1 when there are no more blocks to read.
3 Synchronization status of the equipment. Set to 1 when all data has been read successfully.
4 Status of the equipment time-synchronization, set to 1 when the time has been updated suc-
cessfully.

Frame Info for TCP/IP link - TCPIPSTATUS


For TCP/IP access three types of information frames are available, providing access to data related to the
communication and call status.
Word Status
This table provides the data addresses:
Index Description
1 Elapsed time of the connection (minute)
2 Elapsed time of the connection (second)
3 Remaining time before automatic disconnection (minute)
4 Remaining time before automatic disconnection (second)
5 Maximum connection duration (second)
6 Timestamp of last connection (year)
7 Timestamp of last connection (month)
8 Timestamp of last connection (day)
9 Timestamp of last connection (hour)
10 Timestamp of last connection (minute)
11 Timestamp of last connection (second)
12 Timestamp of last refresh (year)
13 Timestamp of last refresh (month)
14 Timestamp of last refresh (day)
15 Timestamp of last refresh (hour)
16 Timestamp of last refresh (minute)
17 Timestamp of last refresh (second)
18 Always 0
Byte Status
This table gives the addresses of the data:
Index Description
1 à 16 IP Address under the form « xxx.xxx.xxx.xxx\0 »
17 à 22 Local port number local under the form « xxxxx\0 »
Bit Status
This table provides the data addresses:
Index Description
1 Connection state:
0 if not connected
1 if connected
2 Connection in progress for the equipment (telephony dialing phase is long):
0 if no connection attempt is in progress
1 if a connection attempt is in progress
3 Read status of the timestamped zone. Set to 1 when there are no more blocks to read.
4 Synchronization status of the equipment. Set to 1 when all data has been read successfully.
5 Status of the equipment time-synchronization, set to 1 when the time has been updated suc-
cessfully.
6 Connection or identification error. Set to 1 when a connection request cannot be satisfied, or
when a device at the initiative of an incoming connection cannot be identified (configuration
error of the unique Id, the IP address or the remote port).
7 Connection in progress for the network :
0 if no connection attempt is in progress

- 261 -
1 if a connection attempt is in progress on the network the device belongs to.

- 262 -
Modbus II – Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Driver status Description
8001 Unable to write multiple values.
8002 Unknown communication port.
8003 Bad CRC.
8004 Start address outside the addressing space.
8005 No modem found on the configured port.
8006 Connection not established.
8007 Unable to write.
8008 Bad slave address.
8009 Bad response.
800A Incorrect response size.

- 263 -
Modbus II - SCADA Basic
It is possible to modify the behavior of the driver by using SCADA Basic scripts and the CIMWAY instruction.
The syntax is:
iRet = CIMWAY ("SENDMSG", strNodeObject, strCommand[, VariableName]);
where:

Property Meaning
strNodeObject A string composed of the network name and the node name.
For example if the network is called NET and the equipment is called EQT, strNodeOb-
ject is “NET.EQT”.
If the strNodeObject parameter is an empty string, the command is applied to all the
networks
strCommand A command: please refer to the table below.
iRet SCADA BASIC status.
This only indicates that the message has successfully been sent to the driver, not if
the command has been executed successfully.
VariableName The name of a register variable to contain the result of the instruction. Type STR.
Optional.

REFRESH CANCELREFRESH CONNECT DISCONNECT KEEPCONNECT


(1) (2) (3) (4) (5)
Modem link - Net-
Supported Supported
work
Modem link - Node Supported Supported Supported Supported
Radio link - Network Supported Supported
Radio link - Node Supported
TCP/IP link - Net-
Supported Supported
work
TCP/IP link - Node Supported Supported Supported Supported
Serial access does not support any command.
(1) REFRESH: Causes the opening of the communication channel with a device, a reading of all the data, fol-
lowed by closing the communication channel. If this command is sent to a network, the REFRESH is
executed on all the devices of the network.
(2) CANCELREFRESH: Causes the current REFRESH to stop (this message cancels all pending REFRESHs, but
it does not stop a REFRESH that might be running for a device in the case of a Network REFRESH).
(3) CONNECT: Causes the opening of the communication channel with a device. All the data are then read
cyclically until the end of the connection, which occurs at the latest (and automatically) when the maximum
connection time (or exchange time) is reached.
(4) DISCONNECT: Causes the communication channel to close with the equipment. The current reading cycle
is completed before stopping exchanges.
(5) KEEPCONNECT: Causes the extension of exchanges for an additional time period equal to the maximum
connection time (or exchange time). The closing of the communication channel will therefore occur beyond
the maximum time allowed by the configuration.

- 264 -
Modbus/Jbus

- 265 -
Modbus/Jbus - Overview
The protocol enables C-CURE Building Management System to communicate using the Modbus or Jbus pro-
tocol via the serial COM port of your PC.

What is the difference between Modbus and Jbus?


The Modbus and Jbus protocols are identical other than the start address used in the frame configuration.

l Modbus frame addresses start at 1


l Jbus frame addresses start at 0.

Modbus function codes


The following function codes are supported.
Decimal Hex Function
1 0x01 Read coil status
2 0x02 Read input status
3 0x03 Read holding registers
4 0x04 Read input registers
5 0x05 Force Single Coil
6 0x06 Force Single Register
15 0x0F Force Multiple Coils
16 0x10 Force Multiple Registers
In all exchanges, C-CURE Building Management System is the master and the PLC is the slave.
The protocol supports two transmission formats.

l Binary = RTU
l ASCII = ASCII

Timestamped Modbus
In addition to standard Modbus, C-CURE Building Management System supports a variation known as
Timestamped Modbus. In this mode, the data received comprises a value and a timestamp (time that the
value changed in the PLC). The timestamping mode is triggered by a configurable bit in a word of the PLC.
The PLC populates a series of timestamped blocks. You can use one of three block formats (TimeStamped
CEI, 12 bit or 24bit format) to enable transmission to the PC of the value plus the date and time of the vari-
able at the source.

- 266 -
Modbus/Jbus - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values. Show picture
Network board - MULTIPROTOCOL
Protocol - Modbus RTU, Jbus RTU, Modbus ASCII or Jbus ASCII

4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration. Show picture

5. In the Network Parameter dialog, apply or confirm the following settings.

Property Setting
Connection port Select the physical port to be used: COM1, COM2, COM3 or COM4.
Time Out Leave set to default of 800mS.
Activate at start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialogs.

- 267 -
Modbus/Jbus - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the Modbus network previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dialog
showing the settings of the required node.
3. In the Node Parameter dialog, apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System
Select the equipment type from the following.
BROADCAST - To send data to all the equipment on the network
Equipment type
FREE_HEX - Frame address in hexadecimal.
FREE_DEC - Frame address in decimal.
Virtual Not used.
Message time out Leave set to default of 0.
Network address The address of the Modbus slave.
Node time out Leave set to the default of 800mS.
Tick if you want to force the use of function codes 15 and 16 for single bit and single
Use functions 15 and
word rights. Normally functions 5 and 6 are used but they are not supported on some
16 only
devices.
Activate on start-up Tick to enable starting of the equipment when the network is started.

4. Click on the Validate button to register the settings, then close the dialogs.

The Virtual property is used for some protocols when changing the node number using SCADA Basic.
With Modbus serial, it is possible to change the node number by SCADA Basic even if the Virtual prop-
erty is not ticked.

- 268 -
Modbus/Jbus - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the dialog, Select Communication
Objects, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on address
Address
selection.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a write only frame, this is nor-
Cyclic access
mally not set.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 269 -
Modbus/Jbus - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.

Standard frames when using Modbus equipment type


Address Frame Max Function code Modicon
Mnemonic Format Size Read Write Address Description
range
Bit In Bit 2000 02 100001 - Read input status
165535
Bit Out Bit 800 01 05, 15 00001 - Read/write coil (output) status
65535
WordBit In Bit 2000 04 300001 - Read input registers as bits
365535
WordBit Out Bit 1600 03 06, 16 400001 - Read/write holding (output) registers as
465535 bits
Word In Word 125 04 300001 - Read input registers
365535
Word Out Word 100 03 06, 16 400001 - Read/write holding (output) registers
465535
Byte In Byte 250 04 300001 - Read input registers as bytes
365535
Byte Out Byte 200 03 06, 16 400001 - Read/write holding (output) registers as
465535 bytes
Real In Real 62 04 300001 - Read input registers as real
365535
Real Out Real 50 03 16 400001 - Read/write holding (output) registers as
465535 real
Long In Double 62 04 300001 - Read input registers as double (32 bit
365535 word)
Long Out Double 50 03 16 400001 - Read/write holding (output) registers as
465535 long (32 bit word)
If writing a single bit or register, the protocol uses function code 05 or 06 respectively.
If writing multiple bits or registers, the protocol uses function code 15 or 16 respectively.
Function codes 05 and 06 can be disabled in the node configuration if they are not supported by the equip-
ment.

Additional frames when using Free equipment type


Address Frame Max Function code Modicon
Mnemonic Format Size Read Write Address Description
range
Real In MLsb Real 64 04 300001 - Read input registers as IEEE754 real
365535 (Most significant byte first)
Real Out Real 64 03 16 400001 - Read/write output registers as IEEE754
MLsb 465535 real (Most significant byte first)
Real In LMsb Real 64 04 300001 - Read input registers as IEEE754 real
365535 (Least significant byte first)
Real In LMsb Real 64 03 16 400001 - Read/write output registers as IEEE754
465535 real (Least significant byte first)
Long In MLsb Double 64 04 300001 - Read input registers as double (Most sig-
365535 nificant byte first)
Long Out Double 64 03 16 400001 - Read/write output registers as double
MLsb 465535 (Most significant byte first)
Long In LMsb Double 64 04 300001 - Read input registers as double (Least sig-

- 270 -
365535 nificant byte first)
Long Out Double 64 03 16 400001 - Read/write output registers as double
LMsb 465535 (Least significant byte first)

Special frames
The following frames use a modified frame format for special use only. For further information contact tech-
nical support.
Address Frame Max Function code Modicon
Mnemonic Format Size Read Write Address Description
range
ST Stamped Word 20 03 400001 - Timestamped format
465535
Timestamped Word 17 03 400001 - Timestamped format
465535
CEI Stamped Word 15 03 400001 - Timestamped format
465535

Word 32 Word 100 Extended addressing area


Bit 32 Bit 1500 Extended addressing area
Byte 32 Byte 200 Extended addressing area
Real 32 Real 50 Extended addressing area
Long 32 Double 50 Extended addressing area

Audit In Byte 100 001 - 100 No longer used, for backwards com-
parability only.
Audit Out Byte 100 001 - 100 No longer used, for backwards com-
parability only.

Extended addressing makes it possible to read and write data beyond the normal address range of
65535 (FFFF hex). It uses a special function code (13 sub-function 3) and a modified address field of
3 bytes. Extended addressing only works with specific equipment. For further information contact
technical support.

- 271 -
Modbus/Jbus - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Driver status Meaning


0001 Illegal function
0002 Illegal data address in equipment
0003 Illegal data value, wrong size
0004 Slave device failure: the slave cannot reply
0005 Acknowledged: the slave has accepted the request and processing it, but will take a
long time
0006 Slave device is busy: the slave is engaged in long processing of a program command
0007 Negative Acknowledge
0008 Memory parity error

- 272 -
Siemens S7 PPI

- 273 -
S7 PPI - Overview
The PPI protocol enables connection of C-CURE Building Management System to the Siemens S7-200 range
of PLC's using the S7-200 PPI Protocol. The PPI protocol supports up to 32 devices on a single network.
Communication uses either a serial or USB port of the PC and an adapter from Siemens.

l USB port - 6ES7901-3DB30-0XA0 Simatic S7-200 USB/PPI-Cable MM Multimaster


l Serial port - 6ES7901-3CB30-0XA0 Simatic S7-200, RS232/PPI-Cable MM Multimaster

No additional software is required.

- 274 -
Siemens S7 PPI - PC Configuration
Serial RS232 Cable
No PC configuration is required if you are using the Serial RS232 cable.

USB Cable
On Windows Vista, the USB device is detected by the operating system and a dialog will be displayed prompt-
ing the user to select a source location for the new device. Insert the CD supplied with the cable and select it
as the source. When the driver installation is complete, the following dialog will be displayed. Show picture

1. Select the access mode PC/PPI cable(PPI).


2. Click the Properties button. The PPI Properties dialog is displayed. Show picture

3. Select the Local Port tab. Show picture

4. Select the virtual COM-port for the PPI cable device. This is the COM number that will be used in C-
CURE Building Management System's network configuration. Click OK twice to complete the con-
figuration.

- 275 -
Siemens S7 PPI- Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values. Show picture
Network board - MULTIPROTOCOL
Protocol - PPI

4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration. Show picture

5. In the Network Parameter dialog, apply or confirm the following settings.

Property Setting
Connection port Select the port to which the Siemens PPI cable is attached.
Time Out Leave set to default of 1 second.
Activate at start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialog.

- 276 -
Siemens S7 PPI - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the PPI network previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dialog
showing the settings of the required node.
3. In the Node Parameter dialog, apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System
Equipment type The equipment type is always S7 Series
Virtual Not used.
Message time out Not used.
Network address The address of the PPI slave.
Node time out Leave set to the default of 1 second
Activate on start-up Tick to enable starting of the equipment when the network is started.

4. Click on the Validate button to register the settings, then close the dialog.

Network address 0 is reserved for C-CURE Building Management System and must not be used as a
node address.

- 277 -
S7 PPI - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the dialog, Select Communication
Objects, select a previously configured PPI Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Byte, Word, Double word and Real.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on address
Address
selection.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a write only frame, this must
Cyclic access
not be set.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 278 -
S7 PPI - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System. The following ranges can be
configured with this driver but you should check what is supported by the actual PLC you are using.
Mnemonic Format Access CPU210 CPU212 CPU214 CPU215 CPU216
E (Input) Bit R 0.0 - 0.3 0.0 - 7.7 0.0 - 7.7 0.0 - 7.7 0.0 - 7.7
A (Output) Bit R/W 0.0 - 0.3 0.0 - 7.7 0.0 - 7.7 0.0 - 7.7 0.0 - 7.7
M (Marker) Bit R/W 0.0 - 5.7 0.0 - 15.7 0.0 - 31.7 0.0 - 31.7 0.0 - 31.7
V (Virtual) Bit R/W 0.1 - 1023.7 0.0 - 4095.7 0.0 5119.7 0.0 - 5119.7

EB (Input) Byte R 0-7 0-7 0-7 0-7


AB (Output) Byte R/W 0-7 0-7 0-7 0-7
MB (Marker) Byte R/W 0 - 15 0 - 31 0 - 31 0 - 31
VB (Virtual) Byte R/W

E (Input) Word R/W 0-6 0-6 0-6 0-6


A (Output) Word R/W 0-6 0-6 0-6 0-6
M (Marker) Word R/W 0-4 0 - 14 0 - 30 0 - 30 0 - 30
V (Virtual) Word R/W 0 - 122 0 - 4094 0 - 5118 0 - 5118

E (Input) Double R/W 0-4 0-4 0-4 0-4


A (Output) Double R/W 0-4 0-4 0-4 0-4
M (Marker) Double R/W 0 - 12 0 - 28 0 - 28 0 - 28
V (Virtual) Double R/W 0 - 1020 0 - 4092 0 - 5116 0 - 5116

E (Input) Real R/W 0-4 0-4 0-4 0-4


A (Output) Real R/W 0-4 0-4 0-4 0-4
M (Marker) Real R/W 0 - 12 0 - 30 0 - 30 0 - 30
V (Virtual) Real R/W 0 - 1020 0 - 4092 0 - 5116 0 - 5116

Maximum frame size


Type Size
Bit 720
Byte 90
Word 45
Double 22
Real 22

- 279 -
S7 PPI - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Driver status Meaning
0100 Hardware fault
0300 Illegal object address
0500 Invalid address (Incorrect variable address)
0600 Data type not supported
0A00 Object does not exist or length error
1003 Bad parameter
1004 Bad format
1006 Bad reply
8104 Error in packet length or not supported
8404 Fatal error (Service or function aborted)
8500 PDU size error

- 280 -
SAIA SBUS

- 281 -
SAIA SBUS Serial - Overview
This protocol enables C-CURE Building Management System to communicate to all SAIA PCD series PLCs,
over an RS232 or RS485 serial link, using the SBUS PARITY MODE.

Prerequisite
The driver needs the DLL file SCommDll.Dll to work. The DLL is provided by SAIA with its programming
environment (PG5) which must be installed on the host PC. The path to the DLL must be included in the Win-
dows' PATH environment variable. See the topic Setting the DLL path.

- 282 -
SAIA SBUS Serial - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the MULTI PROTOCOL network board and the S-BUS protocol. Show picture

4. Click on OK to open the Network Parameters dialog. Select the COM port to be used.
5. In the drop-down field for Network Name, enter the name by which the network will be known within
C-CURE Building Management System's configuration.
6. The other parameters are configured automatically. Check that the default values are suitable (Baud
rate, parity etc.). Show picture

7. Click Validate to apply the configuration.

- 283 -
SAIA SBUS Serial - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the dialog Select Communication Objects,
select the SAIA S-BUS network as previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dia-
log.
3. Apply or confirm the following settings. Show picture

Property Meaning
Characteristics
Equipment Enter a name for the node within C-CURE Building Management System.
Equipment Type Select the equipment type from the drop-down list: PCD2, PCD4, PCD5 or PCD6.
Message time out Not used.
Timestamping
Tick to enable timestamping mode. The error address must be set to a positive
Enable
number greater than 0.
Error address If timestamping is enabled, the address used to indicate a full stack.
If the timestamp coded in the block exceeds the Delta TS time the blocks stored
Delta TS in the PLC are too old. In that event, the frames selected as timestamped are
scanned cyclically until the timestamp of the block falls within the Delta TS.
UTC timestamp Specify if the PLC timestamp is UTC or local.
Node
CPU CPU number in the range 0 to 6.
S-Bus address S-Bus address of the PLC.
Operating mode
The maximum period allowed for a reply from the node, in minutes, seconds and
Node time out
milliseconds. Default 400 milliseconds.
Tick to enable starting of the equipment when the network is started.
Activate on start-up The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

4. Click on the Validate button to register the settings, then close the dialogs.

- 284 -
SAIA SBUS Serial - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the dialog, Select Communication
Objects, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on
Address
Address Selection.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a write only frame, this
Cyclic access
is normally not set.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialog.

- 285 -
SAIA SBUS Serial - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.
Address Frame Address Max
mnemonic format Access range size
I Bit R 0 to 65535 224
O Bit R/W 0 to 65535 224
F Bit R/W 0 to 65535 224
WordBit R Bit R/W 0 to 4095
R Real R/W 0 to 4095 700
C Real R/W 0 to 1599 32
T Real R/W 0 to 1599 32
R Double R/W 0 to 4095 32
T Double R/W 0 to 1599 32
C Double R/W 0 to 1599 32

- 286 -
SAIA SBUS Serial and IP - Setting the DLL Path
You have to specify the path by which C-CURE Building Management System's driver can find one or other of
the DLL files, SCommDll.Dll or SCommDll52.dll, installed with the SAIA programming environment (PG5).
To do so, you modify the system environment variable PATH as follows.

1. Open the Windows Environment Variables pane. On most versions of Windows, you can easily locate
this by typing Environment in the Search Windows prompt.
2. Select the global PATH environment variable. Show picture

3. Click on Edit to open the Edit System Variable dialog.


4. In the Variable Value field, enter the path to the folder of the SAIA Burgess programming software
(PG5). Show picture

(this path is only illustrative)


5. Restart the PC to apply the changed path value.

If the Variable Value field contains any paths for other programs, keep them by adding a semicolon
(';') to the end, followed by the new path.

- 287 -
SAIA SBUS - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Many of the status come directly from a code library (DLL), supplied by SAIA, that C-CURE Building Man-
agement System uses in its driver. These are the same for both the serial and TCP/IP versions of the pro-
tocol. Some come from C-CURE Building Management System's driver itself, and some other are specific to
the serial version of the protocol.

Statuses from the SAIA DLL


Status Meaning
0 Communications OK
1 NAK response (command not accepted)
3 Invalid BCC or CRC (no other errors)
4 Invalid response
5 Bad connection between P800 and PCD6
6 No response (Request time out)
7 No response after PcdRestart in PcdWrAllocation
8 No Data Carrier Detect
9 Port in use in another mode or baud rate
10 Bad parameter
11 PCD memory write verify error
12 PC out of memory
13 Physically connected to wrong CPU on PCD6
14 CPU not present
15 PCD to flash failed on M170
16 Files & CPU don't compare (see PcdCompare)
17 Cannot open file
18 Error writing to file
19 Error reading file
20 Invalid PCD file
21 PCD file checksum error
22 Invalid header in PCD
23 Not enough space in code segment
24 Not enough space in text segment
25 Extension memory segment too small
26 Header not initialized
27 Can't write EPROM memory
28 Operation canceled by user
29 Block not defined
30 CPU must be in Stop or Halt
31 CPU not programmed
32 (INTERNAL) Special status for debugging.
34 Cannot change size of extension memory
35 COM port is not open or PCDCONN handle is invalid
36 Write to PCD failed
37 Port request timeout
40 Port is in use
44 Fatal internal error
45 Operation not supported by PCD F/W version
46 Station number already defined
47 Not enough space for extended header
48 Invalid password

- 288 -
49 Extended header checksum error
50 Download to wrong S-Bus station ($STN)
51 Download to PCD with wrong firmware ($PCDVER)
52 S-Bus Parity mode is not supported for this COM port
54 RTS/CTS mode is not supported for this COM port
55 Connected PCD's type does not match hardware settings
56 (BUES) Error in Sql Statement
63 Internal data invalid
64 C++ Exception in DLL
65 Ask for password
67 Timeout is not supported for this COM port
68 Driver not available
69 (BUES) Received a BUES CMD_E response
70 (BUES) Received a BUES CMD_A response
71 Cannot Activate SAP

Statuses from C-CURE Building Management System's driver


Status Meaning
DLL initialization problem. Check that the PATH environment variable has been
413
correctly set. See the topic Setting the DLL path.
1000 Bad data type. Check data type.
1001 Bad parameter. Serial only
1002 Bad port number. Serial only
1003 Wrong baud rate. Serial only
1004 Wrong SBUS address. Serial only

- 289 -
Unitelway Slave

- 290 -
Unitelway Slave - Overview
The Unitelway Slave protocol allows C-CURE Building Management System to communicate with a range of
Schneider PLC's using the PC's serial port.
Unitelway is a token passing network. A token is passed to each network device in turn. Only when a device
has the token it is allowed to make requests on the network. The token is controlled by one of the devices on
the network, normally a PLC. The device controlling the token is known as the master, all other devices,
including C-CURE Building Management System, are slaves.

- 291 -
Unitelway Slave - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - Unitelway slave
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration. Show picture

5. In the Network Parameter dialog, apply or confirm the following settings.

Property Setting
Connection port Select the physical port to be used: COM1, COM2, COM3 or COM4.
Address The slave address that C-CURE Building Management System is to be. Range 1 to 98
The number of contiguous addresses that C-CURE Building Management System will
Number
occupy on the network. Range 1 to 7
Set the baud rate, number of data bits, number of stop bits and parity to match the
Characteristics network settings. The default settings are 9600 baud, 7 data bits, 1 stop bit and even
parity.
Modem handshaking Leave at default value of not ticked.
Time Out Leave set to default of 500mS.
Activate at start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialogs.

Understanding the Number property


When using the Unitelway Slave protocol, C-CURE Building Management System is a slave device and only
has the opportunity to make requests on the network when it has the token. This can be a problem it means
it only has access to the network for short periods of time restricting the number frames it can read per
second. To mitigate this problem C-CURE Building Management System can configured to respond to more
than one slave address. For example if you configure C-CURE Building Management System's address to be
10, and the number of contiguous addresses to be 7, it will be able to respond to addresses 10, 11, 12 13,
14, 15, 16 and 17.

- 292 -
Unitelway Slave - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the Unitelway network previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dialog
showing the settings of the required node.
3. In the Node Parameter dialog, apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System
Select the equipment type from the following.
Equipment type FREE_HEX – Frame address in hexadecimal.
FREE_DEC – Frame address in decimal.
Virtual Not used.
Message time out Leave set to default of 0.
The network number that the equipment is connected to. Range 0 to 127. A value of
Network
0 means that the network number is ignored.
Station The number of the station on the network. Range 0 to 63.
The gate number for the equipment. Set to 0 for access to the master PLC system
Gate
objects. Set to 5 for access to slave PLC system objects.
The module number of the equipment. This number is only defined if the gate num-
ber is 5, otherwise it is left set to the default of 0.
Used to define the geographical position of the master coupler of the network.
Module
Module number = ( Rack No. * 16 ) + slot No. in the rack.
Or
255 if the coupler is integrated in the CPU (SCI connector) on TSX 47/67/87/107.
Master coupler channel number of the network. This number is only defined if the
gate number is 5, otherwise its value must be 0.
Used to define the link address of the destination equipment on the network as fol-
lows:
Channel If the bus master is a TSX37/57 PLC, then:
Channel number = Address of the destination equipment network.
Or
If the bus master is a TSX/PMX (TSX 47/67/87/107), then:
Channel number = 100 + address of the destination equipment on the network.
Node time out Leave set to the default of 500mS.
Activate at start-up Tick to enable starting of the equipment when the network is started.

4. Click on the Validate button to register the settings, then close the dialogs.

- 293 -
Unitelway Slave - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the dialog, Select Communication
Objects, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on address
Address
selection.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a write only frame, this is nor-
Cyclic access
mally not set.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 294 -
Unitelway Slave - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.
Mnemonic Format Max size Access Address Range
%M Bit 480 R/W 0 to 65535
%L Bit 480 R/W 0 to 65535
%MW Word 60 R/W 0 to 65535
%SW Word 60 R/W 0 to 65535
%KW Word 60 R/W 0 to 65535
Free Word 64 W 0 to 63
%KD Double 30 R/W 0 to 65535

- 295 -
Unitelway Slave - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Driver status Meaning
8002 Bad CRC
8003 Wrong slave address
8005 Time out
8006 Bad response
8007 Data unknown
8008 Bad number of data (synchro problem)

- 296 -
Unitelway Slave - Using the Free Frame to Send a Unitelway Command
The Free frame can be used to send a Uni-te command ((STOP, RUN, OPEN_DOWNLOAD, CLOSE_
DOWNLOAD, OPEN_UPLOAD, CLOSE_UPLOAD, WRITE_DOWNLOAD...) to a PLC.
To use it, link a single register format to the first location in the frame. To send a command you set the
register value to the command number. For example, to send a RUN command you set the value of the vari-
able to 9223 (0x2407 hexadecimal).
More information on Uni-te commands can be found in the documentation supplied by Schneider.

- 297 -
Ethernet TCP/IP protocols

- 298 -
Citilog

- 299 -
Citilog IP - Overview
The Citilog protocol enables connection to the Citilog server system using Ethernet. Citilog is typically used
to supervise road infrastructure, including bridges and tunnels, using cameras, monitors, information matrix
and advance vision systems. The protocol uses both master and slave mode.
C-CURE Building Management System's Citilog configuration uses generic dialog boxes and some of
the configuration fields are unused.

Some of the configuration must be made by directly editing the communication configuration file
COMM.DAT. See the topic Citilog IP - Modifications to COMM.DAT

In master mode
C-CURE Building Management System polls the Citilog server system heartbeat periodically (every minute is
recommended). C-CURE Building Management System can send commands to the Citilog server to configure
equipment, cameras etc. In the reply, the system sends acknowledgments, statuses and other values to C-
CURE Building Management System.

In slave mode
The Citilog server system generates unsolicited messages with information about the system status. They
can be sent to one or more supervisory systems. C-CURE Building Management System's supports reception
of these unsolicited messages.

- 300 -
Citilog IP - Network Configuration
C-CURE Building Management System's Citilog network configuration uses generic dialog boxes and
some of the configuration fields are unused.

Some of the configuration must be made by directly editing the communication configuration file
COMM.DAT. See the topic Citilog IP - Modifications to COMM.DAT

1. Open the Select Communication Objects dialog.


2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTI-PROTOCOL
Protocol - IP-CITILOG.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following properties. Show picture

Property Settings
Comment A description of the network. Optional.
Connection port Unused.
Characteristics Unused.
Modem handshaking Unused.
Time out Unused.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.
The network can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to register the properties, then close the dialogs.

- 301 -
Citilog IP - Node Configuration
C-CURE Building Management System's Citilog node configuration uses generic dialog boxes and
some of the configuration fields are unused.

Some of the configuration must be made by directly editing the communication configuration file
COMM.DAT. See the topic Citilog IP - Modifications to COMM.DAT

1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,


select a Citilog IP network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following properties. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System.
Equipment type Select IP-CITILOG-DEC.
Virtual Unused.
Message time out Always set to 0.
Network address Unused. Must be configured by directly editing COMM.DAT.
Node time out Maximum waiting time between a request and the reply from the equipment.
Activate on start-up Tick to enable starting of the equipment when the network is started.
The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

4. Click on the Validate button to register the properties, then close the dialogs.

- 302 -
Citilog IP - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following properties.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are BIT, BYTE and WORD.
Access grant Specify whether the frame is read only, write only or read/write.
Address Select the memory area for this frame in the equipment. See the topic
Address Selection and the section on Address Selection in the topic Con-
figuring the Communication Frame Properties.
Priority mode In a queue of write requests, the priority frame is processed first.
Cyclic access Tick to enable a frame to be scanned periodically. For a Heart Beat
frame, this option must be unselected.
Scan rate The rate at which the frame is to be polled. Only select this option for
the Heart Beat Frame.

4. Click on the Validate button to register the properties, then close the dialogs.

- 303 -
Citilog IP - Address Selection
The Characteristics section of the Frame Parameters dialog configures the data range for each frame, how it
is read from and written to the equipment, and how it is interpreted in C-CURE Building Management Sys-
tem. All numbers are given in decimal.

Before you create a frame, make sure that the PLC you are using complies with the table.

Standard address frames


Address name Format Access Cyclic Size Description Function
LanesStatus* BIT R No 65535 Indicate the status of each
Lane. The bits from 0 to 31
indicate:
0 - stopped vehicle in fluid con- B AID 1/A2-A3
dition (motorway)
2 - slow down B AID 1/A2-A3
3 - stopped vehicle in con- B AID 1/A2-A3
gested condition (motorway)
4 - isolated slow vehicle B AID 1/A2-A3
5 - wrong way vehicle B AID 1/A2-A3
6 - pedestrian on emergency B AID 1/A2-A3
lane
7 - debris B AID 1/A2-A3
9 - queue length above B AID 1/A2-A3
threshold
10 - lost of visibility B AID 1/A2-A3
14 - speed vehicle above B AID 1/A2-A3
threshold
15 - isolated stopped vehicle B AID 1/A2-A3
(urban)
16 - stopped vehicle in queue B AID 1/A2-A3
(urban)
26 - VisioPad stop B AID 1/A2-A3
30 - Active Status (1 for Act- B CFG 7-3
ive)
31 - Lane way Status (1 for B CFG 7-6
inversion: 0 initial way )

MatrixStatus** BIT R No 65535 Indicate the status of the mat- A 22


rix.
The bits are from 0 to desired
(max. 65535)
0 - General State of the mat-
rix. (0 means not connected, 1
is OK)
1 - State of Input 1: 0 means
No video 1 means video OK
N - State of Input N: 0 means
No video 1 means video OK

HeartBeat BIT R Yes 1 Test the connection to the Citi-


log server system. This frame
needs to be set with a scan
time of about one minute.

- 304 -
SendMsg*** BYTE W No 32 To write the commands.
Format example: “B SYS 8”

CyclicMsg BYTE RW Yes 32 To write cyclic commands.


Format example: “B SYS 8”
Remember: This command
could interrupt any other.
At creation moment indicate
authorization access Read and
also Write.

CamerasStatus WORD R No 1 Indicate the status of Camera.


The values means:
0 Activate / Deactivate Cam- B SYS 5-6
era (1 for Active)
1 Error Request B SYS 8 /A 4
2 Mask B SYS 9
3 AID Active status (1 for Act- B CFG 13
ive)
4 Start / Stop User Sequence B AID 3-4
(1 for Start)
5 Traffic congestion status (1 A 18
congested, 0 fluid)
6 DAI active for camera status A 20
(1 congested, 0 fluid)

Server**** WORD R No 2 Indicate the status of SERVER


0 AID Server connected / dis- A 5-6
connected (1 for Connected)
1 AID Server error : SrvEr- B SYS 13/ A 17
rType
* B AID 2 for initialize or resynchronize for LaneStatus.
** Make only ONE matrix for each Node (Equipment).
*** The Text Variable associated with the SendMsg address imperiously need to be a length of 32 characters
and not more.
**** Each Server Number need to be unique in the entire network. This make possible send from one server
the commands A 17 and B SYS 13, and find All the servers in the system.
Only One Server by Equipment, to warrant compatibility with A 5 and A 6 command that do not specify
server number.
Maximum value of Camera Numbers recommended is 2147483647 (0x7FFFFFFF).

SendMsg Address Name


In order to send command to the Citilog server you need to use a SendMsg type variable of BYTE format.
The syntax is for example a text like= “B SYS 8” (This is the format to Error request)
The variable state does not indicate if the command has been successful. It only indicates that the message
has successfully been sent to the driver. Please refer to the Address selection.
It is possible to send any command you want, but at the moment only the following answers are processed:
Case message by server type 'A':

IncidentBegin
IncidentEnd
Error

- 305 -
AID Server Connected/Disconnected
Server Error
TraficCongestion
DAI Active for Camera
Matrix State

Case message by client type 'B':

Activate/Deactivate Camera
ErrorRequest
Mask Number
Lanes Active-Way Status
AID active Status
Alarm Request

- 306 -
Citilog IP - Modifications to COMM.DAT
COMM.DAT is found in the project's C folder.

Network configuration
As configured:
NETWORK,0,0,NET1,295,COM 64,9600,8,EVEN,1,0,0,1,0,1,0,0,,,0#0#0#0#0,,,0,0,"",1,0,3,,,0
Change to:
NETWORK,0,0,NET1,295,COM 64,9600,8,EVEN,1,0,0,1,0,1,0,0,,,0#0#0#0#0,,,0,0,"",0,0,3,,,0

Equipment configuration
To configure the IP Address and port it is necessary to add the values to the corresponding attributes. The
attributes are delimited by #. The following example is for the IP address 192.168.10.1 and the port 33000.
As configured:
EQT,0,0,0,EqP1,1,IP-CITILOG-DEC,1,0,0,0,0,1,0,1,0,,0,,0#0#0#0#0,0,,,0,0,""
Change to:
EQT,0,0,0,Eq,1,IP-CITILOG-DEC,1,0,0,0,0,1,0,1,0,,0,,192#168#10#1#33000,0,,,0,0,""

LaneStatus frame
To configure the Camera Number associated to Lanes it is necessary to introduce the corresponding value
into the first attribute. The attributes are delimited by #. In the following example, the camera number is 2.
As configured:
FRAME,0,0,0,1,NameLane2,0,8,64,R,0,LanesStatus ,1,0,0,0,0,0,0#0#0#0#0,0,2,1,,,0,0,""
Change to:
FRAME,0,0,0,1,NameLane2,0,8,64,R,0,LanesStatus ,1,0,0,0,0,0,2#0#0#0#0,0,2,1,,,0,0,""

CameraStatus Frame
To configure the Camera Number associated to each Camera it is necessary to introduce the corresponding
value into the first attribute. The attributes are delimited by #. In the following example, the camera num-
ber is 3.
As configured:
FRAME,0,0,0,4,CameraStatus1,2,18,9,R,0,CamerasStatus,1,0,0,0,0,0,0#0#0#0#0,0,5,1,,,0,0,""
Change to:
FRAME,0,0,0,4,CameraStatus1,2,18,9,R,0,CamerasStatus,1,0,0,0,0,0,3#0#0#0#0,0,5,1,,,0,0,""

ServerStatus Frame
To configure the Server Number associated to each Server it is necessary to introduce the corresponding
value into the first attribute. The attributes are delimited by #. In the following example, the server number
is 1. This number cannot be repeated on the system and only one Server per Equipment is allowed
As configured:
FRAME,0,0,0,6,ServerStatus,2,4,2,R,0,Server ,4,0,0,0,0,0,0#0#0#0#0,0,7,1,,,0,0,""
Change to:
FRAME,0,0,0,6,ServerStatus,2,4,2,R,0,Server ,4,0,0,0,0,0,1#0#0#0#0,0,7,1,,,0,0,""

MatrixStatus, SendMsg and CyclicMsg Frame


No modification is necessary.

- 307 -
GE Fanuc SRTP

- 308 -
GE Fanuc SRTP- Overview
Operation
The protocol enables C-CURE Building Management System to communicate with GE Fanuc 90 Series
devices using an Ethernet connection. The PLCs supported include the 90-70 and 90-30.

Timestamping
The protocol supports timestamped data. In this mode, the data received from the equipment is a value,
date and time.
The PLC populates a series of timestamped blocks. The fixed format of the SRTP_CEI block enables trans-
mission to the PC of the value plus the date and time of the variable at the source.

- 309 -
GE Fanuc SRTP - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol IP-SRTP.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following settings. Show picture

Property Settings
Time Out Not used. Leave at default setting.
Activate the net- Tick to enable the network to start when the Communication Manager starts.
work on start-up

6. Click on the Validate button to register the settings, then close the dialogs.

- 310 -
GE Fanuc SRTP - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the GE Fanuc SRTP network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog. Show picture

3. Apply or confirm the following settings.

Characteristics Description
Equipment Name for the node within C-CURE Building Management System
Equipment type 90-70, 90-30 or Free.
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Timestamping
Select if the timestamped data format is to be used. Timestamped data uses a mod-
Enable ified frame format. To use timestamped data you must have equipment that sup-
ports the modified frame format.
Error address If timestamping is enabled, the address used to indicate a full stack.
If the timestamp coded in the block exceeds the Delta TS time the blocks stored in
Delta TS the PLC are too old. In that event, the frames selected as timestamped are scanned
cyclically until the timestamp of the block falls within the Delta TS.
UTC timestamp Specify if the PLC timestamp is UTC or local.
Connection
Network address The IP address of the equipment.
Password Alphanumerical string of up to 8 characters for a password protected PLC.
Reconnection period The minimum period in seconds between attempts to recover a failed connection.
Operating mode
Maximum waiting time between a request and the reply from the equipment.
Node time out
Normally left set at the default of 1 second.
Activate on start-up Tick to enable starting of the equipment when the network is started.

4. Click on the Validate button to register the settings, then close the dialogs.

Once the timestamped mode is activated by the PLC, the frames selected as timestamped are no
longer scanned cyclically but are refreshed using the block received from the configured TS
Exchange frame.

- 311 -
GE Fanuc SRTP - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following settings.

Characteristics Description
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on address
Address
selection.
Operating mode
Priority mode In a queue of write requests, the priority frame is processed first.
T-stamped frame If ticked, indicates that the frame is to be used for timestamped data.
Tick to enable a frame to be periodically scanned. For a write only frame, this must
Cyclic access
be left blank.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 312 -
GE Fanuc SRTP - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.

Standard address frames


Max frame size
Description Mnemonic Format Access 90-70 90-30 Free
Discrete inputs %I Bit R/W 16384 8192 2048
Discrete outputs %Q Bit R/W 16384 8192 2048
Discrete temporaries %T Bit R/W 16384 8192 2048
Discreet internals %M Bit R/W 16384 8192 2048
Discrete system
%SA Bit R/W 16384 8192 2048
status table A
Discrete system
%SB Bit R/W 16384 8192 2048
status table B
Discrete system
%SC Bit R/W 16384 8192 2048
status table C
Discrete system
%S Bit R 16384 8192 2048
status
Genius global data %G Bit R/W 16384 8192 2048
Wordbit register %R Bit R/W 16384 8192 2048

Register %R Byte R/W 2048 1024 256


Analog input %AI Byte R/W 2048 1024 256
Analog output %AQ Byte R/W 2048 1024 256

Register %R Word R/W 1024 512 128


Analog input %AI Word R/W 1024 512 128
Analog output %AQ Word R/W 1024 512 128
Timestamp exchange TS exchange Word R 127 blocks 63 blocks 15 blocks

Register %R Double R/W 512 256 64


Analog input %AI Double R/W 512 256 64
Analog output %AQ Double R/W 512 256 64

Register %R Float R/W 512 256 64


Analog input %AI Float R/W 512 256 64
Analog output %AQ Float R/W 512 256 64

Bit frames must start with an address multiple of 8+1 i.e. 1, 9, 17 etc.
Wordbit frame size must be multiple of 16.

- 313 -
GE Fanuc SRTP - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Error code Description


Write error. Internal error please contact support.
0x0001
(GE_TCP_CLIENT_ERR_INV_FILE_PATH)
Write error. Internal error please contact support.
0x0002
(GE_TCP_CLIENT_ERR_NOT_AUTHORIZED)
Write error. Internal error please contact support.
0x0003
(GE_TCP_CLIENT_ERR_NOT_INIT)
Write error. Internal error please contact support.
0x0004
(GE_TCP_CLIENT_ERR_DEMO_TIMEOUT)
There was not enough system memory for the API to create an internal resource or object.
0x0005 Shut down any unnecessary programs or add additional system memory.
(GE_TCP_CLIENT_ERR_NO_MEMORY)
The API could not create the client device object since the IP address is invalid or was not in
0x0006 the dotted decimal notation format. (ie. 137.81.3.24).
(GE_TCP_CLIENT_ERR_INV_IP_ADDR)
The starting element must be greater than 0.
0x0007
(GE_TCP_CLIENT_ERR_INV_START_ELEM)
The number of values exceeds the maximum number values that can be read or written for
0x0008 the particular memory type.
(GE_TCP_CLIENT_ERR_INV_NUM_ELEMS)
One of the arguments passed to the API function contained a NULL address/pointer.
0x0009
(GE_TCP_CLIENT_ERR_NULL_PTR)
The client device read/write request had a communication failure. This error code will only be
0x000A returned when the ck_getcp_device_request_cmp() function is called.
(GE_TCP_CLIENT_ERR_REQUEST)
The API was working with a read/write request for the client device but had to abort the oper-
0x0066
ation because the command could not fit in the transmit buffer.
The API was unable to transmit a message to the client device. Make sure that the PLC or net-
work Gateway is configured for the same IP address, is powered on and is attached to the net-
work. Verify network connectivity using the ping utility. It is possible that the device (PLC or
0x0067
network Gateway) has dropped the connection. Normally a dropped connection will re-estab-
lish itself automatically. If the error occurs frequently, review the device configuration to
determine why it is dropping the connection and correct the problem.
The API was unable to receive a message from the client device. It is possible that the device
has dropped the connection. Normally a dropped connection will re-establish itself auto-
0x0068
matically. If the error occurs frequently, review the device configuration to determine why it
is dropping the connection and correct the problem.
The API gave up waiting for a response from the client device. Review the information used
when creating the client device for the PLC or network Gateway. Make sure that the timeout
value is appropriate. If the client device represents a device on a network Gateway, verify
0x006A
that the device’s address matches the sub-network address. Make sure that the PLC or net-
work Gateway is configured for the same IP address, is powered on and is attached to the net-
work. Verify network connectivity using the ping utility.
The API received a response from the client device that had the improper number of bytes.
0x006B
Make sure that the timeout value is appropriate.
The API received a NAK response from the client device. Typical reasons for NAK responses
0x006D are either the memory type is not supported or the number of values the request is trying to
access exceeds the number of elements supported by the device for the memory type.
The API could not transmit the read/write request since the connection and/or session has not
0x0010
been established with the client device. Make sure that the IP address and/or the level 2

- 314 -
access password passed to the create_getcp_device() function are valid for the device.
Bit Frame must start with an address Multiple of 8+1 i.e. 1, 9, 17 etc. Wordbit frame size
0x1001
must be multiple of 16.

- 315 -
GE Fanuc SRTP - SCADA Basic
The GE Fanuc SRTP protocol supports the following special features when used with SCADA Basic.

Changing the equipment address


CIMWAY("CFG", ComObj, "EQT_ADDRESS", Param, [, VarName]);

Argument Meaning
ComObj The name of a node communication object - for example "NET.NODE1".
Parameter field. If the equipment has no redundancy the parameter line is as follows.
Param "1#IPaddr1#IPaddr2#IPaddr3#IPaddr4#ReconnectPeriod#ErrorAddress#UTC#Password"
Where UTC = 8 for True and 0 for False.
VarName The name of a database register that returns the status of the modification. Type STR.

- 316 -
Hilscher NetLINK

- 317 -
Hilscher netLINK - Overview
NetLINK is a protocol converter that takes the form of a cable with an RJ45 Ethernet connector one end and
a Profibus connector the other. The electronics required for the protocol conversion is located in the housing
of the Profibus connector.
The netLINK hardware is available different forms.

l NL-MPI - For use when connecting to a single PLC.


l NL50-MPI - Similar to the NL-MPI but with an RJ45 connector.
l NT40-MPI - For use when connecting to multiple PLC's up to a maximum of 32.

C-CURE Building Management System's netLINK protocol enables it to communicate via Ethernet with a
Siemens S7-300 or S7-400 PLC. The cable can be connected to either the PLC's Profibus or MPI port. In all
exchanges, C-CURE Building Management System is the client and the PLC is the server.
The netLINK cable can also be used for programming the S7 PLC using a driver from the company IBH
Softec.
For installation and configuration of netLINK, please refer to the documentation supplied by Hilscher.

- 318 -
Hilscher netLINK - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - HILSCHER-NL.
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. In the Network Parameter dialog, apply or confirm the following settings. Show picture

Property Settings
netLINK address The IP address of the netLINK device.
Reconnection period The period after which the TCP/IP socket is re-opened if there is a socket error. The
period is given in seconds.
Time out Maximum waiting time between a request and the reply from the equipment. Leave
set to the default value of 1 second.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialogs.

- 319 -
Hilscher netLINK - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the Hilscher netLINK network previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dia-
log.
3. In the Node Parameter dialog, apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System
Equipment type Select S7 Series for either S7-300 or S7-400 PLC's
Virtual Not used.
Message time out Leave set to default of 0.
Address The MPI or Profibus address of the PLC.
Node time out Leave set to the default of 1 second.
Activate on start-up Tick to enable starting of the equipment when the network is started.

4. Click on the Validate button to register the settings, then close the dialogs.

- 320 -
Hilscher netLINK - Frame Configuration
1. In the menu, select Configure.Communication.Equipment.
In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

2. In the Select Communication Objects dialog, select the Network and Node names.
3. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
4. In the Frame Parameter dialog, apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on address
Address
selection.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be periodically scanned.
Cyclic access If the access is not cyclic, all writes from a master notified immediately with no
delay refreshing the variables.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 321 -
Hilscher netLINK - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.
For the DB data type, it is also necessary to enter the DB number.

Standard address frames


Address Frame Address Max
Mnemonic Format Access Range Size Description
DBX Bit R/W 0 to 65535 1728 Word bit in a DB table
M Bit R/W 0 to 65535 1728 Word bit in a memento table
E Bit R 0 to 65535 1728 Word bit in a input table
A Bit R/W 0 to 65535 1728 Word bit in an output table

DBB Byte R/W 0 to 65535 216 Byte in a DB table


MB Byte R/W 0 to 65535 216 Byte in a memento table
EB Byte R/W 0 to 65535 216 Byte in an input table
AB Byte R/W 0 to 65535 216 Byte in an output table

DBW Word R/W 0 to 65534 108 Word in a DB table


MW Word R/W 0 to 65534 108 Word in a memento table
EW Word R/W 0 to 65534 108 Word in an input table
AW Word R/W 0 to 65534 108 Word in an output table
T Word R/W 0 to 65534 108 Word in a timer table
Z Word R/W 0 to 65534 108 Word in a counter table

DBD Real R/W 0 to 65532 54 Real in a DB table


MD Real R/W 0 to 65532 54 Real in a memento table
ED Real R/W 0 to 65532 54 Real in an input table
AD Real R/W 0 to 65532 54 Real in an output table

DBD Double R/W 0 to 65532 54 Double in a DB table


MD Double R/W 0 to 65532 54 Double in a memento table
ED Double R/W 0 to 65532 54 Double in an input table
AD Double R/W 0 to 65532 54 Double in an output table

Memory organization in the PLC.


The PLC variables in the SIMATIC S7 range (S7-400, S7-300) use a byte addressing mode.
S7 messaging with Hilscher netLINK can be used to read a number of words, double or floating words with
byte, word or double word alignments. These alignment modes enable you to obtain words or double words
with even or odd addresses.
The following table gives an example for the word frame.
Byte address Even frame start Odd frame start
0 Word 1
1 Word 1
2 Word 2
3 Word 2
4 Word 3
5 Word 3
6 Word 4
7 Word 4
8

- 322 -
- 323 -
Hilscher netLINK - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Driver status Meaning
200 Network Error - check connection and settings.
201 License Error - netLINK needs to have a SCADA license code in it.
300 Equipment Error - check equipment address and connection
400 Frame Error - check variable addressing

- 324 -
Matsushita Mewtocol-Com IP

- 325 -
Matsushita Mewtocol-Com IP - Overview
The Matsushita Mewtocol-Com IP protocol is a client TCP/IP protocol that enables data exchange between C-
CURE Building Management System and the Matsushita FPX-LAN units. The PC is the client. The functions
implemented are:
Command
Description
code
RCC Read word unit of contact information
WCC Write word unit of contact information
RD Read data area
WD Write data area
RS Read timer and counter set value area
WS Write timer and counter set value area
RK Read timer and counter elapsed value area
WK Read timer and counter elapsed value area

- 326 -
Matsushita Mewtocol-Com IP - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - MEWTOCOLCOM-IP.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following settings. Show picture

Property Settings
Comment A description of the network. Optional.
Time out Not used - leave at the default setting.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.
The network can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to register the settings, then close the dialogs.

- 327 -
Matsushita Mewtocol-Com IP - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select a Mewtocol IP network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System.
Equipment type Select FPX-LAN.
Message time out Leave this set to default of 0.
IP address The IP address of the PLC.
Port number The port number of the PLC, in decimal.
Slave address Slave address of the PLC.
Node time out Maximum waiting time between a request and the reply from the equipment.
Tick to enable starting of the equipment when the network is started.
Activate on start-up
The equipment can also be started by SCADA BASIC program using the CIMWAY verb.
Minimum period between attempts to recover a connection. This period is also used as a
Reconnect period
waiting period after a time-out.

4. Click on the Validate button to register the settings, then close the dialogs.

- 328 -
Matsushita Mewtocol-Com IP - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are BIT, WORD, REAL and DWORD.
Access grant Specify whether the frame is read only, write only or read/write.
Select the memory area for this frame in the equipment. See the topic Address Selec-
Address tion and the section on Address Selection in the topic Configuring the Communication
Frame Properties.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a Write Only frame, this
Cyclic access
option must be unselected.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 329 -
Matsushita Mewtocol - Address Selection
The Characteristics section of the Frame Parameters dialog configures the data range for each frame, how it
is read from and written to the equipment, and how it is interpreted in C-CURE Building Management Sys-
tem. All numbers are given in decimal.

Before you create a frame, make sure that the PLC you are using complies with the table.

Standard address frames


PLC Table Description Access

BIT table
Ext_InputX External input Read
Ext_Output_Y External output Read / Write
Internal_Relay_R Internal relay Read / Write
Link_Relay_L Link relay Read / Write
Timer_T Timer contact Read
Counter_C Counter contact Read
WordBit_DT Data register like bit Read / Write
WordBit_LT File register like bit Read / Write
WordBit_FL Link register like bit Read / Write

WORD table
Data_Reg_DT Data register Read / Write
Data_Reg_FL File register Read / Write
Data_Reg_LD Link register Read / Write
TC_SV Pre-set value Read / Write
TC_EV Elapsed value Read / Write

REAL table
Data_Reg_DT Data register Read / Write
Data_Reg_FL File register Read / Write
Data_Reg_LD Link register Read / Write
TC_SV Pre-set value Read / Write
TC_EV Elapsed value Read / Write

DWORD table
Data_Reg_DT Data register Read / Write
Data_Reg_FL File register Read / Write
Data_Reg_LD Link register Read / Write
TC_SV Pre-set value Read / Write
TC_EV Elapsed value Read / Write

Real and Dword data uses two word address, e.g.: in a Real Table, the Data_Reg_DT 0 writes on words 0
and 1 of the PLC.

Notes on the use of BIT tables


For Ext_InputX, Ext_Output_Y, Internal_Relay_R and Link_Relay_L: the starting address refers to the word
number not the bit number. For example, an Ext_InputX frame with Quantity of Data of 32 and a Starting
Address of 7 provides access to X70 to 8F.
For Timer_T and Counter_C: timer and contacts are not handled in word units in the PLC. The starting
address refers to the word number not the bit number. For example, a WT frame with Quantity of Data of 32
and Starting Address of 5 provides access to (5*16 = 80) T80 to T112.

- 330 -
Bits are written in word blocks, so any change in one bit produces a block write in which there is a
risk of overwriting any bit (in the same block) that has been updated from within the PLC.

- 331 -
Matsushita Mewtocol - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Error code Meaning
0001 MEWTOCOL_NOT_ANSWER.
0002 MEWTOCOL_NOT_CONNECTION.
0003 MEWTOCOL_NOT_ENOUGH_DATA.
0004 MEWTOCOL_ERROR_BCC.
0006 MEWTOCOL_ERROR_RESPONSE.
0007 MEWTOCOL_ERROR_WRITE.

- 332 -
Mitsubishi TCP/IP

- 333 -
Mitsubishi TCP/IP - Overview
This protocol enables you to connect to Mitsubishi Melsec Q Series and A Series PLCs using an Ethernet con-
nection. A Q series PLC must be equipped with one of the following communication processors:

Communication processor type Maximum speed Simultaneous connections


QJ71E71-100 100/10 Mbps 16
QJ71E71 10 Mbps 16
QJ71E71-B2 10 Mbps 16

Memory organization
The PLC uses a word addressing mode. The driver can be used to read a number of words, doubles or float-
ing words with word or double word alignments.

Connection
The protocol uses messaging based on the 3E frame to read and write data to the PLC, so the network has to
be configured on PLC side. In any exchange, the PC is the master and the PLC is a slave. All data transfer is
carried out in binary mode.

Limitations
The maximum number of PLCs that can be connected is 255. All communication operates over the standard
Ethernet network interface of a PC so the driver requires no extra software to communicate with the
devices. For direct communication between a Mitsubishi communication processor and a PC, a crossover
cable is required. The communication speed is limited to a maximum of 100Mbit/second.
This protocol does not support redundancy.
No timestamped data frames are currently supported.

- 334 -
Mitsubishi TCP/IP - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTI-PROTOCOL
Protocol - MITSU TCP/IP.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following settings. Show picture

Property Settings
Comment A description of the network. Optional.
Time out The time-out period for response.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.
The network can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to register the settings, then close the dialogs.

- 335 -
Mitsubishi TCP/IP - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the Q Series network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System
Equipment type Select Melsec Q Series or Melsec A Series as appropriate
Virtual Not used - leave blank.
Message time out Leave set to default of 0.
Network address The IP address of the PLC.
Port number The port number, in decimal.
Enable communication with a bridge, in which case the bridge address and network
Bridge
number must be filled in.
Node time out Maximum waiting time between a request and the reply from the equipment.
Tick to enable starting of the equipment when the network is started.
Activate on start-up The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

4. Click on the Validate button to register the settings, then close the dialogs.

- 336 -
Mitsubishi TCP/IP - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are BIT, WORD, REAL and DWORD.
Access grant Specify whether the frame is read only, write only or read/write.
Select the memory area for this frame in the equipment. See the section on Address Selec-
Address
tion in the topic Configuring the Communication Frame Properties.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a Write Only frame, this option must
Cyclic access
be unselected.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 337 -
Mitsubishi TCP/IP - Q Series Address Selection
The Characteristics section of the Frame Parameters dialog configures the data range for each frame, how it
is read from and written to the equipment, and how it is interpreted in C-CURE Building Management Sys-
tem.

Standard address frames


Frame Maximum
Address name Access Min - max Description
format frame size

BIT/WORDBIT
D WORDBIT R/W 0 to 12287 9440 bits Data Register
M BIT R/W 0 to 8191 8192 bits Internal Relay
X BIT R 0 to 1FFF 8192 bits Input Relay
Y BIT R/W 0 to 1FFF 8192 bits Output Relay
B BIT R/W 0 to 1FFF 8192 bits Link Relay
SB BIT R/W 0 to 7FF 2048 bits Special Link Relay
F BIT R/W 0 to 2047 2048 bits Annunciator
S BIT R/W 0 to 8191 8192 bits
SM BIT R/W 0 to 2047 2048 bits Special Relay
L BIT R/W 0 to 8191 8192 bits Latch Relay
V BIT R/W 0 to 2047 2048 bits Edge Relay
TC BIT R 0 to 2047 2048 bits Timer Coil
TS BIT R 0 to 2047 2048 bits Timer Contact
CC BIT R 0 to 2047 2048 bits Counter Coil
CS BIT R 0 to 2047 2048 bits Counter Contact
SC BIT R 0 to 2047 2048 bits Retentive Timer Coil
SS BIT R 0 to 2047 2048 bits Retentive Timer Contact

WORD
D WORD R/W 0 to 12287 590 words Data Register
SD WORD R 0 to 2047 590 words Special Register
SW WORD R 0 to 1FFF 590 words Special Link Register
W WORD R/W 0 to 71FF 590 words Link Register
TN WORD R 0 to 2047 590 words Timer Current Value
CN WORD R 0 to 2047 590 words Counter Current Value
SN WORD R 0 to 2047 590 words Retentive Timer Current Value

DOUBLE
WORD
D DWORD R/W 0 to 12287 295 dwords Data Register
SD DWORD R 0 to 2047 295 dwords Special Register
W DWORD R/W 0 to 1FFF 295 dwords Link Register
SW DWORD R 0 to 7FF 295 dwords Special Link Register

FLOAT / REAL
D FLOAT R/W 0 to 12287 295 dwords Data Register
SD FLOAT R 0 to 2047 295 dwords Special Register
W FLOAT R/W 0 to 1FFF 295 dwords Link Register
SW FLOAT R 0 to 7FF 295 dwords Special Link Register

- 338 -
Mitsubishi TCP/IP - A Series Address Selection
The Characteristics section of the Frame Parameters dialog configures the data range for each frame, how it
is read from and written to the equipment, and how it is interpreted in C-CURE Building Management Sys-
tem.

Standard address frames


Frame Maximum
Address name Access Min - max Description
format frame size

BIT/WORDBIT
M BIT R/W 0 to 8191 2048 bits Internal Relay
X BIT R 0 to 7FF 2048 bits Input Relay
Y BIT R/W 0 to 7FF 2048 bits Output Relay
TC BIT R 0 to 2047 1024 bits Timer Coil
TS BIT R 0 to 2047 1024 bits Timer Contact
CC BIT R 0 to 2047 1024 bits Counter Coil
CS BIT R 0 to 2047 1024 bits Counter Contact
B BIT R/W 0 to FFF 1024 bits Link Relay
F BIT R/W 0 to 2047 1024 bits Annunciator
Special M BIT R 9000 to 9255 256 bits Internal Relay
WordBit D WORDBIT R/W 0 to 6143 1024 bits Data Register

WORD
D WORD R/W 0 to 6143 64 words Data Register
TN WORD R 0 to 2047 64 words Timer Current Value
CN WORD R 0 to 2047 64 words Counter Current Value
W WORD R/W 0 to FFF 64 words Link Register
Special D WORD R/W 9000 to 9255 64 words

DOUBLE
WORD
D DWORD R/W 0 to 12287 32 dwords Data Register
W DWORD R/W 0 to 1FFF 32 dwords Link Register

FLOAT / REAL
D FLOAT R/W 0 to 12287 32 dwords Data Register
W FLOAT R/W 0 to FFF 32 dwords Link Register

- 339 -
Mitsubishi TCP/IP - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Error code Meaning


0x0100 Network Error - check connection and settings.
0x0101 Time-out.
0x0102 Connection Close - check equipment address and connection
0x0104 Bad Buffer.
0x0108 Bad IP Response.
0x0111 Connection Disables by Program.

- 340 -
Modbus II

- 341 -
Modbus II - Overview
The Modbus II data acquisition driver is designed to communicate with Schneider Electric devices of type
T200 series 2, FLAIR200C and G200.
The driver can be used over the following media:

l Permanent serial link,


l Telephone modem link,
l Radio link (non-permanent serial),
l Permanent, semi-permanent or non-permanent TCP/IP link.

The Application layer of the driver is identical for the four types of links, only the behavior differs.
A serial link may be used to directly connect to devices having an RS232 port or to several devices con-
nected to an RS485 network. The driver must be configured with cyclic access.
Modem access may be used to connect equipment via a PSTN or GSM network. The modem must be
installed and configured on the host operating system. The modem must support the Microsoft® TAPI ver-
sion 2.0 interface. The protocol must not be configured for cyclic access (no cyclic frame in this con-
figuration).
A radio link may be used to connect to devices via a radio network. The driver must not be configured for
cyclic access (no cyclic frame in such configuration).
The TCP/IP link is used to connect to devices via an Ethernet network, or GPRS with static or dynamic IP
addresses.
The driver supports the Report By Exception mode of the devices:

l Incoming calls via phone/modem,


l Exchanges initiated by a device with Radio link,
l Connection initiated by a device with TCP/IP link.

The driver does not support commands using the Select Before Execute mode.

Frames structures for Serial, Radio and Modem links


Device address Function code Data address data CRC
1 byte 1 byte 2 bytes X bytes 2 bytes

Frames structures for TCP/IP link


Header modbus TCPIP Frame (frame size*)
Function
Frame Device address Data address Data
Frame Id Version code
size*
X
2 bytes 0x0000 2 bytes 1 octet 1 octet 2 bytes
bytes

Timestamping
The driver supports timestamped data. In the device, a memory zone is available to exchange timestamped
data between C-CURE Building Management System and the equipment. This zone consists of two parts, the
header and a timestamped block area.
The header is a word divided into two bytes. The most significant byte contains an exchange identifier, and
the least significant byte contains the number of blocks to read.
The block space contains timestamped data, it can support up to four of them.
The driver always reads the entire exchange zone containing the header and the block space.
When the driver has interpreted the blocks, it writes to the address of the header, a word containing the
same exchange identifier and a number of blocks equal to 0.
The driver loops on the reading of the timestamped data as long as the number of blocks is different to 0
before reading the other zones.

- 342 -
Bit data can be acquired via timestamped blocks and direct readings from other address spaces (this
depends on the configuration of the equipment: "alarmed" data or not).
In order to avoid duplicated data, the driver waits for the end of a read cycle before transmitting the data to
C-CURE Building Management System Data Manager. This makes it possible to manage the case of the data
retrieved both by the timestamped blocks and by the readings of the other zones, and to transmit the proper
timestamp (device timestamp if it exists) to the data manager of C-CURE Building Management System.
Unlike timestamped bit data, the timestamped words are read and interpreted directly without waiting.

Invalid data
A number of data are interpreted by the protocol before transmission to C-CURE Building Management Sys-
tem data manager:

l The TM words for which the value 0x8000 allows the device to define a word as invalid; this invalidity
is then transmitted to C-CURE Building Management System.
l The TMD double-words for which the value 0x80000000 allows the equipment to define a double-word
as invalid; this invalidity is then transmitted to C-CURE Building Management System.
l The TSD double remote signaling for which the values 00 and 11 are invalid values; this invalidity is
then transmitted to C-CURE Building Management System.

Clock synchronization
The driver automatically synchronizes devices’ clocks in the following cases:

l Modem link, at each connection,


l Radio link, at each connection initiated by the device,
l TCP/IP link, at each connection, only in case of non-permanent connection.

The driver never synchronizes devices’ clocks in the following cases:

l Serial link,
l TCP/IP link, at each connection, in case of permanent and semi-permanent connection.

In addition, it is possible to force a clock synchronization using the COMMAND type frame.

- 343 -
Modbus II – Network configuration
Modem / Serial / Radio access

1. Open the Select Communication Objects dialog.


2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values:
Network board - MULTI PROTOCOL
Protocol - MDB-II-MODEM, MDB-II-SERIAL or MDB-II-RADIO
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration. Show picture

5. In the Network Parameter dialog, apply or confirm the following settings :

Property Setting
Connection port
Number Select the communication port used to access the device. In case of MDB-II-
MODEM protocol, select the communication port configured for the modem in the
operating system.
Characteristics Only used in case of Serial and Radio links.
Baud Rate Select the baud rate.
Data bits Select the number of data bits.
Stop bits Select the number of stop bits.
Parity Select the parity.
Modem handshaking Leave at default value (not ticked).
Operating mode
Time Out Unused, leave the default value.
Activate at start-up Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to save properties, then close the dialogs.

TCP/IP access

1. Open the Select Communication Objects dialog.


2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values:
Network board - MULTI PROTOCOL
Protocol - MDB-II-TCPIP.
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration. Show picture

- 344 -
5. In the Network Parameter dialog, apply or confirm the following settings :

Property Setting
Server port number Select the listening port number.
Disconnection after silence Detection period of communication loss (in seconds).
(sec)
Time Out Unused, leave the default value.
Activate the network at startup Tick to enable starting of the equipment when the network is started. The
equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

6. Click on the Validate button to save properties, then close the dialogs.

- 345 -
Modbus II – Node configuration
Serial / Radio access

1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,


select the Modbus II network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following properties: Show picture

Property Description
Equipment Name for the node within C-CURE Building Management System.
Characteristics
Equipment type Select the type of the node.
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Node
Network address Modbus slave address.
Operating mode
Node time out Maximum waiting time between a request and the reply from the equipment.
Activate at startup Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

4. Click on the Validate button to save properties, then close the dialogs.

Modem access

1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,


select the Modbus II network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.

- 346 -
3. Apply or confirm the following properties: Show picture

Property Description
Equipment Name for the node within C-CURE Building Management System.
Characteristics
Equipment type Select the type of the node.
Virtual Not used. Do not select.
Message time out Must be 0.
Node
Network address Modbus slave address
Phone number Phone number of the node
Use dialing rules This checkbox allows you to take advantage of the operating system's dialing
rules, including configuring full-format phone numbers with region code and coun-
try code.
Country code Country code.
Area code Area code.
Operating mode
Node time out Maximum waiting time between a request and the reply from the equipment.
Activate at startup Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

4. Click on the Validate button to save properties, then close the dialogs.

TCP/IP access

1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,


select the Modbus II network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.

- 347 -
3. 3. Apply or confirm the following properties: Show picture

Property Description
Equipment Name for the node within C-CURE Building Management System.
Characteristics
Equipment type Select the type of the node.
Virtual Not used. Do not select.
Message time out Must be 0.
Node
Network address Must be set to 255, except if using a gateway.
IP address IP address of the equipment. It can be empty in case of dynamic IP address.
Port number The port number of the equipment. The default port number is 502.
Reconnect period (sec) When the equipment is inaccessible, it is the reconnection attempt period.
Equipment ID A word used to uniquely identify a device on the network. It is mandatory when the
IP address is dynamic.
Max connection period Maximum duration of connections in the case of non-permanent connection. When
(sec) this duration is reached, the connection is closed automatically by the driver.
Refresh period (sec) When the equipment is connected, it is the period during which data are refreshed
(In GPRS, the period can be longer).
Connection type This option indicates the connection type :
0 = non-permanent link
1 = permanent link
2 = semi-permanent link
Semi-permanent link enables to reduce the amount of data transmitted and thus
the cost of connections
Dynamic IP address Check to indicate that the IP address of the device is dynamic.
Keep alive period (sec) Period between 2 keep-alive requests. The keep-alive enables to keep a con-
nection active. Only used with Permanent and semi-permanent connections.
Keep alive retry period When a keep-alive request failed, it is the delay before sending another keep-alive
(sec) request.
Keep alive retry nb Number of retry before closing a connection.
Operating mode
Node time out Timeout delay between a request and the response sent by the device (with GPRS,
this delay is typically longer).
Activate at startup Tick to enable starting of the equipment when the network is started. The equip-
ment can also be started by SCADA BASIC program using the CIMWAY verb.

- 348 -
4. Click on the Validate button to save the properties, then close the dialogs.

- 349 -
Modbus II – Frame configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame properties dialog. Show picture

3. Apply or confirm the following properties:

Property Description
Frame Name for the frame within C-CURE Building Management Sys-
tem.
Characteristics
Frame format The supported formats are BIT, WORD, REAL and DOUBLE.
Access grant Specify whether the frame is read only, write only or
read/write.
Address Select the range of data to be monitored in the device. See the
topic on Address Selection.
Operating mode
Priority mode In a queue of write requests, the priority frame is processed
first.
Cyclic access Tick to enable a frame to be periodically scanned. For a write
only frame and for Radio, Modem or TCP/IP links this must not
be ticked.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to save the properties, then close the dialogs.

- 350 -
Modbus II – Address selection
The Address and Size dialog is used to configure the data range for each frame, how it is read from and writ-
ten to the equipment, and how it is interpreted in C-CURE Building Management System.
Mnemonic in the Access Address Data
Timestamped Description
device mode range type
VERSION L 1 No Word Version Zone
TM L 1 to 16 Yes Word TM Zone
Double
TMD L 1 to 8 Yes TMD Zone
Word
Identification and con-
STATUS L/E 1 to 16 Yes Bit
figuration Zone
TCD E 1 to 24 No Bit TCD Zone
TSD L 1 to 24 Yes Bit TSD Zone
CR L 0 to 6 Yes Bit CR Zone
TSS L 1 to 128 Yes Bit TSS Zone
COMMAND E 1 to 4 No Bit Command frame of the driver
Timestamped zone. Header
EVENTS L 1 to 4 No Bloc
writing is automatic.
TEST L/E 1 to 144 No Bit Test Zone
TEST L/E 1 to 9 No Word Test Zone
MODEMSTATUS L 1 to 18 No Word Modem Frame Info
MODEMSTATUS L 1 to 6 No Bit Modem Frame Info
RADIOSTATUS L 1 to 11 No Word Radio Frame Info
RADIOSTATUS L 1 to 4 No Bit Radio Frame Info
TCPIPSTATUS L 1 to 7 No Bit TCP/IP Frame Info
TCPIPSTATUS L 1 à 22 No Byte TCP/IP Frame Info
TCPIPSTATUS L 1 à 18 No Word TCP/IP Frame Info

Frame type COMMAND


This table gives the addresses of the data:
Index Description
1 Force clock synchronization
Only the first bit is used. Forcing this bit to 0 or 1 causes the device clock to be synchronized if it is con-
nected.

Frame Info for Modem link - MODEMSTATUS


For modem access, two types of information frame are available, providing access to data related to the
communication and call status.
Word Status
This table gives the addresses of the data:
Index Description
1 Elapsed time of the connection (minute)
2 Elapsed time of the connection (second)
3 Remaining time before automatic disconnection (minute)
4 Remaining time before automatic disconnection (second)
5 Maximum connection duration (second)
6 Timestamp of last connection (year)
7 Timestamp of last connection (month)
8 Timestamp of last connection (day)
9 Timestamp of last connection (hour)
10 Timestamp of last connection (minute)

- 351 -
11 Timestamp of last connection (second)
12 Connection attempts counter
0 = no attempt in progress or last connection completed successfully.
1 = second attempt in progress.
2 = third attempt in progress.
3 = The last attempt failed, the value will only change when another connection is requested.
13 Timestamp of last refresh (year)
14 Timestamp of last refresh (month)
15 Timestamp of last refresh (day)
16 Timestamp of last refresh (hour)
17 Timestamp of last refresh (minute)
18 Timestamp of last refresh (second)
Bit Status
This table provides the data addresses:
Index Description
1 Connection state:
0 if not connected
1 if connected
2 Connection in progress for the equipment (telephony dialing phase can be long):
0 if no connection attempt is in progress
1 if a connection attempt is in progress
3 Read status of the timestamped zone. Set to 1 when there are no more blocks to read.
4 Connection in progress for the network:
0 if no connection attempt is in progress
1 if a connection attempt is in progress on the network the device belongs to.
5 Synchronization status of the equipment. Set to 1 when all data has been read successfully.
6 Status of the equipment time-synchronization, set to 1 when the time has been updated suc-
cessfully.

Frame Info for Radio link – RADIOSTATUS


For radio access, two types of information frames are available, providing access to data related to the com-
munication and call status.
Word Status
This table provides the data addresses:
Index Description
1 Elapsed time of the connection (minute)
2 Elapsed time of the connection (second)
3 Remaining time before automatic disconnection (minute)
4 Remaining time before automatic disconnection (second)
5 Maximum connection duration (second)
6 Timestamp of last connection (year)
7 Timestamp of last connection (month)
8 Timestamp of last connection (day)
9 Timestamp of last connection (hour)
10 Timestamp of last connection (minute)
11 Timestamp of last connection (second)
Bit Status
This table provides the data addresses:
Index Description
1 Connection state:
0 if not connected
1 if connected

- 352 -
2 Read status of the timestamped zone. Set to 1 when there are no more blocks to read.
3 Synchronization status of the equipment. Set to 1 when all data has been read successfully.
4 Status of the equipment time-synchronization, set to 1 when the time has been updated suc-
cessfully.

Frame Info for TCP/IP link - TCPIPSTATUS


For TCP/IP access three types of information frames are available, providing access to data related to the
communication and call status.
Word Status
This table provides the data addresses:
Index Description
1 Elapsed time of the connection (minute)
2 Elapsed time of the connection (second)
3 Remaining time before automatic disconnection (minute)
4 Remaining time before automatic disconnection (second)
5 Maximum connection duration (second)
6 Timestamp of last connection (year)
7 Timestamp of last connection (month)
8 Timestamp of last connection (day)
9 Timestamp of last connection (hour)
10 Timestamp of last connection (minute)
11 Timestamp of last connection (second)
12 Timestamp of last refresh (year)
13 Timestamp of last refresh (month)
14 Timestamp of last refresh (day)
15 Timestamp of last refresh (hour)
16 Timestamp of last refresh (minute)
17 Timestamp of last refresh (second)
18 Always 0
Byte Status
This table gives the addresses of the data:
Index Description
1 à 16 IP Address under the form « xxx.xxx.xxx.xxx\0 »
17 à 22 Local port number local under the form « xxxxx\0 »
Bit Status
This table provides the data addresses:
Index Description
1 Connection state:
0 if not connected
1 if connected
2 Connection in progress for the equipment (telephony dialing phase is long):
0 if no connection attempt is in progress
1 if a connection attempt is in progress
3 Read status of the timestamped zone. Set to 1 when there are no more blocks to read.
4 Synchronization status of the equipment. Set to 1 when all data has been read successfully.
5 Status of the equipment time-synchronization, set to 1 when the time has been updated suc-
cessfully.
6 Connection or identification error. Set to 1 when a connection request cannot be satisfied, or
when a device at the initiative of an incoming connection cannot be identified (configuration
error of the unique Id, the IP address or the remote port).
7 Connection in progress for the network :
0 if no connection attempt is in progress

- 353 -
1 if a connection attempt is in progress on the network the device belongs to.

- 354 -
Modbus II – Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Driver status Description
8001 Unable to write multiple values.
8002 Unknown communication port.
8003 Bad CRC.
8004 Start address outside the addressing space.
8005 No modem found on the configured port.
8006 Connection not established.
8007 Unable to write.
8008 Bad slave address.
8009 Bad response.
800A Incorrect response size.

- 355 -
Modbus II - SCADA Basic
It is possible to modify the behavior of the driver by using SCADA Basic scripts and the CIMWAY instruction.
The syntax is:
iRet = CIMWAY ("SENDMSG", strNodeObject, strCommand[, VariableName]);
where:

Property Meaning
strNodeObject A string composed of the network name and the node name.
For example if the network is called NET and the equipment is called EQT, strNodeOb-
ject is “NET.EQT”.
If the strNodeObject parameter is an empty string, the command is applied to all the
networks
strCommand A command: please refer to the table below.
iRet SCADA BASIC status.
This only indicates that the message has successfully been sent to the driver, not if
the command has been executed successfully.
VariableName The name of a register variable to contain the result of the instruction. Type STR.
Optional.

REFRESH CANCELREFRESH CONNECT DISCONNECT KEEPCONNECT


(1) (2) (3) (4) (5)
Modem link - Net-
Supported Supported
work
Modem link - Node Supported Supported Supported Supported
Radio link - Network Supported Supported
Radio link - Node Supported
TCP/IP link - Net-
Supported Supported
work
TCP/IP link - Node Supported Supported Supported Supported
Serial access does not support any command.
(1) REFRESH: Causes the opening of the communication channel with a device, a reading of all the data, fol-
lowed by closing the communication channel. If this command is sent to a network, the REFRESH is
executed on all the devices of the network.
(2) CANCELREFRESH: Causes the current REFRESH to stop (this message cancels all pending REFRESHs, but
it does not stop a REFRESH that might be running for a device in the case of a Network REFRESH).
(3) CONNECT: Causes the opening of the communication channel with a device. All the data are then read
cyclically until the end of the connection, which occurs at the latest (and automatically) when the maximum
connection time (or exchange time) is reached.
(4) DISCONNECT: Causes the communication channel to close with the equipment. The current reading cycle
is completed before stopping exchanges.
(5) KEEPCONNECT: Causes the extension of exchanges for an additional time period equal to the maximum
connection time (or exchange time). The closing of the communication channel will therefore occur beyond
the maximum time allowed by the configuration.

- 356 -
Open Modbus Master

- 357 -
Open Modbus Master - Overview
This protocol enables C-CURE Building Management System to communicate using Open Modbus messaging
over an Ethernet TCP/IP network. Open Modbus is sometimes referred to as Modbus/TCP.
In all exchanges, C-CURE Building Management System is the master and the equipment is the slave.
The protocol supports only the RTU (binary) frame format.
If you need the equipment to be master and C-CURE Building Management System to be slave, you
can use the Open Modbus Slave protocol.

Modbus function codes


The following function codes are supported.
Decimal Hex Function
1 0x01 Read coil status
2 0x02 Read input status
3 0x03 Read holding registers
4 0x04 Read input registers
5 0x05 Force Single Coil
6 0x06 Force Single Register
15 0x0F Force Multiple Coils
16 0x10 Force Multiple Registers
65 0x41 Extended read coil status
66 0x42 Extended read input status
67 0x43 Extended read holding registers
68 0x44 Extended read input registers
69 0x45 Extended force single coil
70 0x46 Extended force single register
79 0x4F Extended force multiple coils
80 0x50 Extended force multiple registers

What is the difference between Modbus and Jbus?


The Modbus and Jbus protocols are identical other than the start address used in the frame configuration.

l Modbus frame addresses start at 1


l Jbus frame addresses start at 0.

Redundancy
The protocol supports node redundancy with up to 3 alternative addresses.
According to the connection’s status, the protocol automatically switches from one node to another sequen-
tially. There is only one connection open at a time, per node. The user can also view and force the active con-
nection.
In the case of a redundant server architecture, you can enable or disable connection for a selected server
station.

Timestamping
The protocol supports timestamped data. In this mode, the data received from the equipment is a value,
date and time.
The equipment populates a series of timestamped blocks. You can use any of three block formats
(TimeStamped CEI, 12 bit or 24 bit format) to enable transmission to the PC of the value plus the date and
time of the variable at the source. The timestamping mode can be stopped by a configurable bit in a word of
the PLC (Timestamping Error address).

- 358 -
Open Modbus Master - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - XBus-IP-Master.
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. In the Network Parameter dialog, apply or confirm the following settings. Show picture

Property Settings
Time Out The Open Modbus protocol does not use the Time out parameter unless using a
bridge in which case the bridge time out period must be less than the network time
out.
Activate at start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialogs.

- 359 -
Open Modbus Master - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the X-Bus IP Master network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Characteristics
Equipment Name for the node within C-CURE Building Management System.
Equipment type Select from JBUS_HEX, JBUS_DEC, MODBUS_HEX or MODBUS_DEC. Jbus frame
addresses start at 0 and Modbus frame addresses start at 1. If HEX is selected then
frame addresses are entered in hexadecimal, if DEC is selected then frame
addresses are entered in decimal.
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Timestamping
Enable Tick to enable timestamping mode. The error address must be set to a positive num-
ber greater than 0.
Error address If timestamping is enabled, the address used to indicate a full stack.
Delta TS If the timestamp coded in the block exceeds the Delta TS time the blocks stored in
the PLC are too old. In that event, the frames selected as timestamped are scanned
cyclically until the timestamp of the block falls within the Delta TS.
UTC timestamp Specify if the PLC timestamp is UTC or local.
Modbus addressing The address coded in the timestamp block is coded as Modbus (otherwise it is Jbus)
Node
Network address The IP address of the equipment primary node.
Port number The port number of the equipment. The standard port number for Open Modbus is
502.
Slave Address The Modbus slave address of the equipment.
Redundancy See the topic on Redundant Node Configuration.
Operating mode
Use write function 15 User Modbus functions 15 and 16 only for write frames. (05 and 06 not to be used.)
and 16 only.
Node time out Maximum waiting time between a request and the reply from the equipment.
Normally left at the default of 1 second.
Activate on start-up Tick to enable starting of the equipment when the network is started.
The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

- 360 -
Advanced options Display the Advanced Options dialog. Show picture

4. Click on the Validate button to register the settings, then close the dialogs.

Advanced options

l Reconnect period - The minimum delay before reconnection is attempted after a connection has failed.
l Close connection on passive station - If ticked, passive stations do not maintain the connection to the
device.
l Time-out handling: See explanation below.
l Standard device - For a standard device (default), C-CURE Building Management System does
not wait for the time-out to declare the equipment unreachable if the system layer indicates that
the connection cannot be open (disconnected network...).
l Device using a fixed time-out - When using a modem for example, connections other than IP in
general, this option ensure that the time-out handling is strictly followed (as configured at the
node level) when establishing the connection and, if need be, before declaring the equipment
unreachable.
l Connection sharing
l Enable connection sharing - If ticked allows the connection with the equipment to be shared. See
explanation below.
l Sharing group - Allows shared connections to be allocated to a specific connection group.
l Site serialization
l Enable site serialization - Tick to activate serialization of connections by site. This option is use-
ful when several devices can be reached via the same network path and that this network path
requires requests to be serialized.
l From connection number - Either 0 (default) or a connection number corresponding to a redund-
ancy equipment Id as defined in Redundant node configuration (1 to 5).
l Site number - The site number to which the equipment belong.

Connection sharing and Site serialization are designed for different purposes and should not be used
together.

Using connection sharing


Connection sharing is normally used when communicating with a Modbus gateway with a single Modbus
TCP/IP connection on one side and several serial Modbus nodes on the other. Show picture
Sharing the connection allows a single TCP/IP address and Port to be used to communicate with several Mod-
bus nodes. If connection sharing is not enabled then each connection requires its own TCP port.

When you use connection sharing, communication is managed serially. That is communication with one node
(send and reply) must be completed before communication with the next node is started. The disadvantage
of this method is that if one node is faulty, the communication is delayed to all the other nodes while the

- 361 -
connection times out. A connection on the TCP/IP side will only be restarted if all shared connections time
out.
By default, shared connections are allocated to a single group. If you allocate shared connections to dif-
ferent groups, the connection on the TCP/IP side is restarted if all shared connections within the group time
out. It is normal practice to configure one group for each physical serial connection on a gateway. (A single
serial connection may be connected to one or more PLC nodes.)

Re-connection timing
The timing when re-establishing a connection to a slave after an error is as follows.

l On the 1st TCP/IP error – The driver waits for the Reconnection period before trying again. The default
value is 10 seconds and can be configured in the Advanced Options dialog.
l On the 2nd TCP/IP error – The driver waits for Time out (default 1 second) before trying again.
l On the 3rd TCP/IP error – The driver waits for Time out (default 1 second) before trying again.

This sequence is strictly followed for nodes configured to ensure Fixed time-out, and can be curtailed for
nodes configured as Standard device if the system layer indicates that the connection cannot be open (dis-
connected network...).

- 362 -
Open Modbus Master - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. Show picture

2. In the Select Communication Objects dialog, select the Network and Node names.
3. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
4. In the Frame Parameter dialog, apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Address Select the range of data in the equipment for this frame. See the topic on address selection.
Priority mode In a queue of write requests, the priority frame is processed first.
T-stamped
If ticked, indicates that the frame is to be used for timestamped data.
frame
Tick to enable a frame to be periodically scanned. For a write only frame, this is normally
Cyclic access
not set.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 363 -
Open Modbus Master - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.

Standard address frames


Address Frame Max Function
code
Mnemonic TS Format Size Read Write Description
Bit I Yes Bit 2048 02 Read input status
Bit I/O Yes Bit 2048 01 05, 15 Read/write coil (output) status
WordBit I LM Yes Bit 2048 04 Read input registers as bits (Least significant byte
first)
WordBit I/O Yes Bit 2048 03 06, 16 Read/write holding (output) registers as bits (Least sig-
LM nificant byte first)
WordBit I ML No Bit 2048 04 Read input registers as bits (Most significant byte first)

WordBit I/O No Bit 2048 03 06, 16 Read/write holding (output) registers as bits (Most sig-
ML nificant byte first)
Byte I No Byte 256 04 Read input registers as bytes
Byte I/O No Byte 256 03 06, 16 Read/write holding (output) registers as bytes
Word I Yes Word 128 04 Read input registers
Word I/O Yes Word 128 03 16 Read/write output (holding) registers
Real I LMsb No Real 64 04 Read input registers as IEEE754 real (Least significant
byte first)
Real I/O LMsb No Real 64 03 16 Read/write holding (output) registers as IEEE754 real
(Least significant byte first)
Real I MLsb No Real 64 04 Read input registers as IEEE754 real (Most significant
byte first)
Real I/O MLsb No Real 64 03 16 Read/write holding (output) registers as IEEE754 real
(Most significant byte first)
DWord I LMsb No Double 64 04 Read input registers as double word (Least significant
byte first)
DWord I/O No Double 64 03 16 Read/write holding (output) registers as double word
LMsb (Least significant byte first)
DWord I MLsb No Double 64 04 Read input registers as double word (Most significant
byte first)
DWord I/O No Double 64 03 16 Read/write holding (output) registers as double word
MLsb (Most significant byte first)
TimeStamped No Block 15 04 Timestamped frame
CEI CEI
TimeStamped No Block 21 04 Timestamped frame
12b 12b
TimeStamped No Block 18 04 Timestamped frame
24b 24b
TS - Support for timestamping.

Extended address frames


The extended addressing frames use modified start address and number of items coding allowing the read-
ing of more locations in one frame than allowed for by standard Modbus. Extended addressing only works
with specific equipment. For further information contact technical support.
Address Frame Max Function
code
Mnemonic TS Format Size Read Write Description

- 364 -
Bi Extd I No Bit 65535 66 Read input status in extended frame
Bi Extd I/O No Bit 65535 65 69, 79 Read/write coil (output) status in extended frame
WB Extd I LM No Bit 65520 68 Read input registers as bits (Least significant byte
first) in extended frame
WB Extd I/O No Bit 65520 67 70, 80 Read/write holding (output) registers as bits (Least sig-
LM nificant byte first) in extended frame
WB Extd I ML No Bit 65520 68 Read input registers as bits (Most significant byte first)
in extended frame
WB Extd I/O No Bit 65520 67 70, 80 Read/write holding (output) registers as bits (Most sig-
ML nificant byte first) in extended frame
By Extd I No Byte 65518 68 Read input registers as bytes in extended frame
By Extd I/O No Byte 65518 67 70, 80 Read/write holding (output) registers as bytes in exten-
ded frame
W Extd I No Word 32759 68 Read input registers in extended frame
W Extd I/O No Word 32759 67 70, 80 Read/write output (holding) registers in extended
frame
Rl Extd I LM No Real 16379 68 Read input registers as IEEE754 real (Least significant
byte first) in extended frame
Rl Extd I/O LM No Real 16379 67 70, 80 Read/write holding (output) registers as IEEE754 real
(Least significant byte first) in extended frame
Rl Extd I ML No Real 16379 68 Read input registers as IEEE754 real (Most significant
byte first) in extended frame
Rl Extd I/O ML No Real 16379 67 70, 80 Read/write holding (output) registers as IEEE754 real
(Most significant byte first) in extended frame
DW Extd I LM No Double 16379 68 Read input registers as double word (Least significant
byte first) in extended frame
DW Extd I/O No Double 16379 67 70, 80 Read/write holding (output) registers as double word
LM (Least significant byte first) in extended frame
DW Extd I ML No Double 16379 68 Read input registers as double word (Most significant
byte first) in extended frame
DW Extd I/O No Double 16379 67 70, 80 Read/write holding (output) registers as double word
ML (Most significant byte first) in extended frame

- 365 -
Open Modbus Master - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Driver status Meaning


0001 Illegal function
0002 Illegal data address in equipment
0003 Illegal data value, wrong size
0004 Slave device failure: the slave cannot reply
0005 Acknowledged: the slave has accepted the request and processing it, but will take a
long time
0006 Slave device is busy: the slave is engaged in long processing of a program command
0007 Negative Acknowledge
0008 Memory parity error
0102 Connection closed because of:

l Bad IP Address
l Bad Port Number
l Equipment disconnected from network
0000 Request time-out
000A Gateway path unavailable
000B Gateway target device failed to respond (timeout)
0108 The response ID does not match the request

- 366 -
Redundant node configuration

- 367 -
Open Modbus Master - Redundant Node Configuration
The Redundancy dialog allows the configuration of up to 5 additional nodes to provide redundant behavior
for an item of equipment. When the application starts, the communication manager communicates with the
primary node. When an error occurs, it switches to the next node in the sequence. Show picture
At any one time, there is only one connection open per item of equipment.

It is also possible to switch connections manually using a special frame and variable or SCADA Basic pro-
gram.

You can configure up to 6 redundant connections.

Changing the number or retries per redundant equipment


The property Number of retries per redundant equipment is used to configure the number of retries before
attempting to connect to the next equipment. On the first connection at start-up, or after a fault on one of
the redundant equipments, the configured number of retries is applied before attempting to connect to the
next equipment. If both fail, only single connection attempts are made to subsequent redundant equip-
ments.

Managing redundant node operation using special frames and variables


See the topic Open Modbus Master - Managing Redundant Node Operation.

Controlling redundant node operation with SCADA Basic.


See the topic Open Modbus Master - SCADA Basic.

Using the Enable Priority Management option


See the topic Priority Management.

- 368 -
Open Modbus Master - Priority Management
The Enable priority management option in the Redundant dialog enables automatic selection of the highest
priority connection. This mechanism has been implemented to support redundant connections that have vary-
ing quality and cost of service. For example, in a situation where three parallel connections are available,
one path over Ethernet TCP, a second one over PSTN and a third one over GSM, the Ethernet TCP network
must be used whenever it is available. Without priority management, if there is a connection failure the
driver automatically selects the next available connection, but there is no mechanism to automatically
return to the failed connection once it is restored.

Configuring priority management


For the purposes of explaining how to configure priority management, we will use an example in which the
master (C-CURE Building Management System) has three alternative connections to a Modbus slave.

1. Configure three nodes EQT1_WD0, EQT1_WD1 and EQT1_WD2, each of them corresponding to one of
the three connections to the slave and supporting a single (watchdog) frame. These nodes are used to
check the availability of each connection.
a. Configure the Node timeout for each node so that it is relevant to the connection. It is these
timeouts that are used to determine if the connection is available and so they must be set cor-
rectly.
b. In the advanced options for each node select Enable connection sharing.
c. On each node, add a single read frame. The configuration of the frame is unimportant as long as
it is reading a least one location in the equipment.
d. Link one variable to each of the frames. These variables are only required to ensure that the
frame is active. (A frame with no variables is not active.)
2. Configure one node EQT1 and all the associated frames required to read the information from the
equipment.
a. Configure the primary connection (same as EQT1_WD0) in the Node Properties dialog and the
alternative connections (same as EQT1_WD1 and EQT1_WD2) in the Redundant Properties dia-
log. The order in which you configure the connections determines the priority. Show picture

- 369 -
b. In the advanced options, select Enable connection sharing.
c. In the Redundant Properties dialog, select Enable priority management.
d. Optionally change the number of retries for each connection using the Number of retries per
redundant equipment property. By default, on failure C-CURE Building Management System
retries each connection three times before it is flagged as failed. (A value of 0 means it is
unchanged from the default of three retries.)
3. Close the dialogs and save the configuration.

- 370 -
Open Modbus Master - Managing Redundant Node Operation
For each node with redundant configuration, you can manage the operation using register variables linked to
two special frames.

The Command frame


The Command frame is a read/write frame of word format.

l Word 0 - Setting the value of a register linked to word 0 in the range 0 to 5 forces a switch to the cor-
responding redundant path (1 to 6). During the connection establishment phase, the value at this
address will be set to the decimal value 10x where x is the ID (0 to 5) of the connection.
l Word 1 - Setting a register linked to word 1, in a bitwise manner, can be used to enable and disable
redundant paths. Bit 0 corresponds to path 1, bit 1 to path 2 etc. Setting a bit to 0 disables a path, set-
ting it to 1 enables it.

The Information frame


The Information frame is a read only frame of word format. A register variable linked to word 0 will contain
the number of the active connection (0 to 5).

- 371 -
Open Modbus Master - SCADA Basic
The Open Modbus Master protocol supports the following special features when used with SCADA Basic.

Changing the connection for a redundant PLC configuration


CIMWAY("SENDMSG", ComObj, "ConnectTo;Num");

Argument Meaning
ComObj The name of a node communication object - for example "NET.NODE1".
Num The number of the connection. Range 0 to 6.
Example: CIMWAY("SENDMSG", "NET.EQT1", "ConnectTo;1");
Will switch the connection of the node EQT1 to the connection 1.
SCADA Basic switching is slower that variable switching, as the command is not sent immediately to the
driver (queues along with other requests), but it is flexible and doesn't require the configuration of an extra
frame and variable.

Enable/Disable connection for a PC redundant server configuration


CIMWAY("SENDMSG", ComObj, "ConnectionDisable;Num");
CIMWAY("SENDMSG", ComObj, "ConnectionEnable;Num");

Argument Meaning
ComObj The name of a node communication object - for example "NET.NODE1".
Num The number of the connection. Range 0 to 6.
ConnectionDisable = Disable the connection number Num. This connection is unavailable for the PLC server
to connect to.
ConnectionEnable = Enable the connection number Num. This connection is available for the PLC server to
connect to.

Enable/Disable timestamping
CIMWAY("SENDMSG", ComObj, "DisableTS;Num");
CIMWAY("SENDMSG", ComObj, "EnableTS;Num");

Argument Meaning
The name of either a network or node communication object - for example "NET.NODE1". If
ComObj
you specify a network communication object, it is applied to all nodes on the network.
Num The number of the connection. Range 0 to 6.

Switch all frames to polling mode


CIMWAY("SENDMSG", ComObj, "SwitchAllToPolling Mode;Num");

Argument Meaning
The name of either a network or node communication object - for example "NET.NODE1". If
ComObj
you specify a network communication object, it is applied to all nodes on the network.
Num The number of the connection. Range 0 to 6.

- 372 -
Using a Wago Dali node

- 373 -
Open Modbus Master - Using a Wago DALI Node
Open Modbus Master for Wago DALI is a specific implementation of Modbus TCP/IP with specially formatted
frames.

About DALI
DALI (Digital Addressable Lighting Interface) is a protocol used for standardized control of electronic bal-
lasts in lighting applications.

About the Wago DALI module


The Wago DALI module (750-641) can control up to 64 DALI slaves (also known as ballasts) connected on a
single line. Each slave can be assigned to 16 individual groups or 16 individual scenes. Addressing, alloc-
ating and parameter changes to the slaves is made using an IEC 61131-3 program running on a Wago pro-
grammable coupler.

About C-CURE Building Management System's DALI implementation


C-CURE Building Management System provides connectivity to the Wago DALI module using a Wago pro-
grammable Ethernet controller (750-851) and the Modbus TCP/IP protocol. The programmable controller
must run a specific program (SVDALIDRV) available from Wago. A single Ethernet controller can be con-
nected to up to five DALI modules.
To configure C-CURE Building Management System for connection to the DALI module you must select the
equipment type, WAGO_DALI, in the Open Modbus Master node configuration. Show picture
All other properties in the node dialog are the same as for a normal Modbus node.

Selecting the WAGO_DALI equipment type provides access to DALI specific frames and corresponding
information and commands.

- 374 -
Open Modbus Master - Wago DALI Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.
Address Frame
Mnemonic Format Access Description
B Group BIT R Read ballast group status.
1 frame per DALI module.
The frame size is fixed at 1028 bits.
The start address corresponds to the Modbus address of the ballast group
buffer for the corresponding module. Refer to the program running in the
programmable coupler to obtain the address.
The data structure is as follows (where xxxx is the base address):
xxxx.0 – Bit Ballast 1 group 1
xxxx.1 – Bit Ballast 1 group 2
xxxx.2 – Bit Ballast 1 group 3

xxxx.14 – Bit Ballast 1 group 15
xxxx.15 – Bit Ballast 1 group 16
(xxxx+1).0 – Bit Ballast 2 group 1
(xxxx+1).1 – Bit Ballast 2 group 2
(xxxx+1).2 – Bit Ballast 2 group 3

Bit value:
0 – not part of the group
1 – part of the group
Read ballast present
B Present BIT status.
R
B Status BIT R Read ballast status bit.
1 frame for up to 5 DALI modules.1 frame for up to 5 DALI modules.
The frame size is fixed at 320 bits.
The frame size is fixed at 320 bits.
The start address corresponds toThethestart
Modbus address
address of the ballast
corresponds present
to the Modbusbuffer. Refer
address to the
of the program
ballast statusrun-
ning in the programmable coupler to obtain the address.
buffer. Refer to the program running in the programmable coupler to obtain
The data structure is as follows (where xxxx is the base address):
the address.
xxxx.0 – DALI module 1 Ballast 1 The data structure is as follows (where xxxx is the base address):
present
xxxx.1 – DALI module 1 Ballast 2 present
xxxx.0 – DALI module 1 Ballast 1 status
xxxx.2 – DALI module 1 Ballast 3 present
xxxx.1 – DALI module 1 Ballast 2 status
… xxxx.2 – DALI module 1 Ballast 3 status
xxxx.62 – DALI module 1 Ballast…63 present
xxxx.63 – DALI module 1 Ballastxxxx.62
64 present
– DALI module 1 Ballast 63 status
xxxx.63
(xxxx+1).0 – DALI module 2 Ballast – DALI module 1 Ballast 64 status
1 present
(xxxx+1).0
(xxxx+1).1 – DALI module 2 Ballast – DALI module 2 Ballast 1 status
2 present
(xxxx+1).1 – DALI module 2 Ballast 2 status
(xxxx+1).2 – DALI module 2 Ballast 2 present
… (xxxx+1).2 – DALI module 2 Ballast 2 status

Bit value:
Bit value
0 – not present
1 – present 0 – not OK
1 – OK
B Fail BIT R Read ballast lamp failure status.
1 frame for up to 5 DALI modules.
The frame size is fixed at 320 bits.
The start address corresponds to the Modbus address of the ballast status
buffer. Refer to the program running in the programmable coupler to obtain
the address.
The data structure is as follows (where xxxx is the base address):

- 375 -
xxxx.0 – DALI module 1 Ballast 1 lamp failure
xxxx.1 – DALI module 1 Ballast 2 lamp failure
xxxx.2 – DALI module 1 Ballast 3 lamp failure

xxxx.62 – DALI module 1 Ballast 63 lamp failure
xxxx.63 – DALI module 1 Ballast 64 lamp failure
(xxxx+1).0 – DALI module 2 Ballast 1 lamp failure
(xxxx+1).1 – DALI module 2 Ballast 2 lamp failure
(xxxx+1).2 – DALI module 2 Ballast 2 lamp failure

Bit value
0 – OK
1 – Lamp failure
B Power BIT R Read ballast power status.
1 frame for up to 5 DALI modules.
The frame size is fixed at 320 bits.
The start address corresponds to the Modbus address of the ballast status
buffer. Refer to the program running in the programmable coupler to obtain
the address.
The data structure is as follows (where xxxx is the base address):
xxxx.0 – DALI module 1 Ballast 1 power
xxxx.1 – DALI module 1 Ballast 2 power
xxxx.2 – DALI module 1 Ballast 3 power

xxxx.62 – DALI module 1 Ballast 63 power
xxxx.63 – DALI module 1 Ballast 64 power
(xxxx+1).0 – DALI module 2 Ballast 1 power
(xxxx+1).1 – DALI module 2 Ballast 2 power
(xxxx+1).2 – DALI module 2 Ballast 2 power

Bit value:
0 – Power off
1 – Power on
Cmd Lx B WORD W Write ballast command.
1 frame per DALI module where Lx corresponds to the number of the DALI.
For example Cmd L3 B.
The size is fixed at 65 words.
The start address corresponds to the Modbus address of the command buf-
fer.
Refer to the program running in the programmable coupler to obtain the
address.
The data structure is as follows (where xxxx is the base address):
xxxx.0 – DALI module x Ballast 1 command
xxxx.1 – DALI module x Ballast 2 command
xxxx.2 – DALI module x Ballast 3 command

xxxx.62 – DALI module x Ballast 63 command
xxxx.63 – DALI module x Ballast 64 command
xxxx.64 – DALI module x All Ballast for DALI module x
Word value:
0 – Off
5 – On
1 – '- -'

- 376 -
2 – '+ +'
For a complete set of commands, please refer to the manual for the Wago
DALI module.
Cmd Lx G WORD W Write group command.
1 frame per DALI module where Lx corresponds to the number of the DALI.
For example Cmd L3 G.
The size is fixed at 16 words.
The start address corresponds to the Modbus address of the command buf-
fer.
Refer to the program running in the programmable coupler to obtain the
address.
The data structure is as follows (where xxxx is the base address):
xxxx.0 – DALI module x Group 1 command
xxxx.1 – DALI module x Group 2 command
xxxx.2 – DALI module x Group 3 command

xxxx.14 – DALI module x Group 15 command
xxxx.15 – DALI module x Group 16 command
Word value:
300 – Off
305 – On
301 – '- -'
302 – '+ +'
For a complete set of commands, please refer to the manual for the Wago
DALI module.
Cmd Lx S WORD W Write scene command.
1 frame per DALI module where Lx corresponds to the number of the DALI.
For example Cmd L3 S.
The size is fixed at 16 words.
The start address corresponds to the Modbus address of the command buf-
fer.
Refer to the program running in the programmable coupler to obtain the
address.
The data structure is as follows (where xxxx is the base address):
xxxx.0 – DALI module x Group 1 command
xxxx.1 – DALI module x Group 2 command
xxxx.2 – DALI module x Group 3 command

xxxx.14 – DALI module x Group 15 command
xxxx.15 – DALI module x Group 16 command
Word value:
1000 – Send scene
1001 – Save scene
For a complete set of commands, please refer to the manual for the Wago
DALI module.
B Value REAL R Ballast real time value.
1 frame per DALI module.
The size is fixed at 64 words.
The start address corresponds to the Modbus address of the real time value
buffer.
Refer to the program running in the programmable coupler to obtain the
address.
The data structure is as follows (where xxxx is the base address):

- 377 -
xxxx.0 – Ballast 1 value
xxxx.1 – Ballast 2 value
xxxx.2 – Ballast 3 value

xxxx.62 – Ballast 63 value
xxxx.63 – Ballast 64 value
The value is expressed as a percentage in the range 0 to 100.

- 378 -
Using Moxa remote I/O

- 379 -
Open Modbus Master - Using Moxa Remote I/O
Open Modbus Master for Moxa remote I/O is a specific implementation of C-CURE Building Management Sys-
tem's Xbus IP Master protocol (Modbus TCP/IP). It implements specific equipment types in the Node dialog
and the corresponding address selections in the Frame dialog. All other configuration is identical to Xbus IP
Master.

Configuring a Moxa remote I/O connection


To configure C-CURE Building Management System for connection to the Moxa I/O modules you must select
the network type IP_MOXA in the Network Selection dialog. Subsequently, when configuring the nodes, the
node dialog will have a list of Moxa specific equipment Show picture

The addresses available in the Frame Properties dialog will be specific to the equipment selected.

- 380 -
Open Modbus Master - Moxa Remote I/O Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System. The options available depend
on the I/O model.
Address mne-
Model I/O Format Size Access
monic
E1210 16DI DI Ctrl Bit 32 I/O
DI Value Bit 16 I
DI Counter Double 16 I
E1211 16DO DO Value/Ctrl Bit 32 I/O
E1212 8DI 8DO DO Value/Ctrl Bit 24 I/O
DI Ctrl Bit 32 I/O
DI Value Bit 16 I
DI Counter Double 8 I
E1214 6DI/6RELAY DO Value/Ctrl Bit 22 I/O
DI Ctrl Bit 22 I/O
DI Value Bit 6 I
DI Counter Double 3 I
E1240 8AI AI Raw Value Word 8 I
AI Scaling Val Real 4 I
E1241 4AO AO Raw Value Word 4 I/0
AO Scaling Val Real 2 I
E1242 4AI/4DI/4DIO DO Value/Ctrl Bit 14 I/O
DI Ctrl Bit 18 I/O
DI Value Bit 8 I
AI Raw Value Word 4 I
AI Scaling Val Real 2 I
E1260 6RTD RTD Value Word 6 I
E1262 8TC TC Value Double 9 I
E2210 12DI/8DO DO Value/Ctrl Bit 32 I/O
DI Ctrl Bit 48 I/O
DI Value Bit 12 I
DI Counter Double 4 I
DO Pulse
Double 8 I/O
Count
E2212 8DI/8DO/4DIO DO Value/Ctrl Bit 72 I/O
DI Ctrl Bit 86 I/O
DI Value Bit 16 I
DO Pulse Data Word 36 I/O
DI Coun-
Word 24 I/O
t/Mode
Register Word 24 I/O
E2214 6DI/6Relay DI Ctrl Bit 32 I/O
DI Value Bit 16 I
DI Counter Double 16 I
AI
E2240 8AI/2AO Bit 16 I/O
Reset/Mn/Mx
AI Led Bit 8 I
AI
Word 18 I
Value/Mn/Mx
AO Value/Ctrl Word 12 I/O
AI Range Val Word 12 I/O

- 381 -
Register Word 24 I/O
E2242 4AI/12DIO DO Value/Ctrl Bit 72 I/O
DI Ctrl/Mode Bit 96 I/O
AI
Bit 8 I/O
Reset/Mn/Mx
DI Value Bit 12 I
AI Led Bit 4 I
AI
Word 12 I
Value/Mn/Mx
DI Coun-
Word 24 I/O
t/Mode
AO Set/Get Word 4 I/O
DO Set/Get Word 72 I/O
DI Set/Get Word 84 I/O
AI Scl Mn/Mx Word 20 I/O
AI range Type Word 4 I/O
Register Word 24 I/O
Information Word 30 I/O
E2260 6RTD/4DO RTD Ctrl Bit 30 I/O
DO Ctrl Bit 24 I/O
RTD Val
Word 24 I
Mn/Mx
DO Mode Word 4 I/O
RTD Cfg Word 48 I/O
DO Status Word 24 I/O
RTD Enable Word 6 I/O
Register Word 24 I/O
DO Pulse Double 6 I/O
E2262 8TC/4DO TC Ctrl Bit 40 I/O
DO Status Bit 18 I/O
DO Mode Word 4 I/O
TC Cfg Word 64 I/O
DO Status Word 24 I/O
TC Enable Word 8 I/O
Register Word 24 I/O
TC Value
Word 24 I/O
Mn/Mx
DO Pulse Double 6 I/O

- 382 -
Open Modbus Slave

- 383 -
Open Modbus Slave - Overview
This protocol enables C-CURE Building Management System to communicate using Open Modbus messaging
over an Ethernet TCP/IP network. Open Modbus is sometimes referred to as Modbus/TCP.
In all exchanges, C-CURE Building Management System is the slave and the equipment is the master.
The protocol supports only the RTU transmission format.
If you need the equipment to be slave and C-CURE Building Management System to be master, you
can use the Open Modbus Master protocol.

C-CURE Building Management System can be a Modbus Master and Modbus slave simultaneously.

Modbus function codes


The following function codes are supported.
Decimal Hex Function
1 0x01 Read coil status
2 0x02 Read input status
3 0x03 Read holding registers
4 0x04 Read input registers
5 0x05 Force Single Coil
6 0x06 Force Single Register
15 0x0F Force Multiple Coils
16 0x10 Force Multiple Registers

What is the difference between Modbus and Jbus?


The Modbus and Jbus protocols are identical other than the start address used in the frame configuration.

l Modbus frame addresses start at 1


l Jbus frame addresses start at 0.

Timestamping
Timestamping is not supported by Open Modbus Slave.

- 384 -
Open Modbus Slave - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - XBus-IP-Slave.
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. In the Network Parameter dialog, apply or confirm the following settings. Show picture

Property Settings
Time Out The Open Modbus protocol does not use the Time out parameter unless using a
bridge in which case the bridge time out period must be less than the network time
out.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialogs.

- 385 -
Open Modbus Slave - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the X-Bus IP Slave network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Characteristics
Equipment Name for the node within C-CURE Building Management System.
Select from JBUS_HEX, JBUS_DEC, MODBUS_HEX or MODBUS_DEC. Jbus frame
addresses start at 0 and Modbus frame addresses start at 1. If HEX is selected then
Equipment type
frame addresses are entered in hexadecimal, if DEC is selected then frame
addresses are entered in decimal.
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Node
The port number of the equipment. The standard port number for Open Modbus is
Port number
502.
Slave Address The Modbus slave address of C-CURE Building Management System's driver.
Memory zone
The number of coil status bits that C-CURE Building Management System makes
Coil status
available to a Modbus master. Default and maximum 65000.
The number of input status bits that C-CURE Building Management System makes
Input status
available to a Modbus master. Default and maximum 65000.
The number of holding register words that C-CURE Building Management System
Holding registers
makes available to a Modbus master. Default and maximum 65000.
The number of input register words that C-CURE Building Management System
Input registers
makes available to a Modbus master. Default and maximum 65000.
The initial value of bits and words in the memory zone. If set to Uninitialized the
frames associated with the memory range will have a supplementary error code of
0x040 in Communication Objects dialog on startup. If set to Saved then the values in
Initial memory state the memory zone are saved when C-CURE Building Management System is stopped
and restored again on restart. The files in which the values are saved are found in
the folder PER\CWIPXBUS\ of the project. The file name is constructed from the
equipment name and memory type.
Operating mode
Disconnect after a The slave will disconnect the TCP/IP connection (socket) if there is no activity
silent interval (requests from the master) for the specified period.
Node time out Not used. Leave at the default of 1 second.

- 386 -
Tick to enable starting of the equipment when the network is started.
Activate on start-up The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

4. Click on the Validate button to register the settings, then close the dialogs.

- 387 -
Open Modbus Slave - Frame Configuration
The frames that are configured here are not communication frames as in a master protocol, but instead they
represent the internal address tables (mapped to variables) that can be requested by a Modbus Master.

1. In the menu, select Configure.Communication.Equipment. Show picture

2. In the Select Communication Objects dialog, select the Network and Node names.
3. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
4. In the Frame Parameter dialog, apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Address Select the range of data in the equipment for this frame. See the topic on address selection.
Priority mode In a queue of write requests, the priority frame is processed first.
Cyclic access Tick to enable a frame to be periodically scanned.
If the access is not cyclic, all writes from a master notified immediately with no delay
refreshing the variables. This is the recommended setting unless the master is exchanging
large amounts of data and swamping the slave.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

The frame length must be a multiple of 16. A return code of 40 indicates that this limit was
exceeded.

- 388 -
Open Modbus Slave - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to,
and how it is interpreted in C-CURE Building Management System.
Address Frame Max Function code

Mnemonic Format Size Read Write Description


Bit I Bit 2048 02 Read input status
Bit I/O Bit 2048 01 05, 15 Read/write coil (output) status
WordBit I Bit 2048 04 Read input registers as bits (Least significant byte first)
LM
WordBit Bit 2048 03 06, 16 Read/write holding (output) registers as bits (Least sig-
I/O LM nificant byte first)
WordBit I Bit 2048 04 Read input registers as bits (Most significant byte first)
ML
WordBit Bit 2048 03 06, 16 Read/write holding (output) registers as bits (Most sig-
I/O ML nificant byte first)
Byte I Byte 256 04 Read input registers as bytes
Byte I/O Byte 256 03 06, 16 Read/write holding (output) registers as bytes
Word I Word 128 04 Read input registers
Word I/O Word 128 03 06, 16 Read/write output (holding) registers
Real I LMsb Real 64 04 Read input registers as IEEE754 real (Least significant byte
first)
Real I/O Real 64 03 06, 16 Read/write holding (output) registers as IEEE754 real
LMsb (Least significant byte first)
Real I MLsb Real 64 04 Read input registers as IEEE754 real (Most significant byte
first)
Real I/O Real 64 03 06, 16 Read/write holding (output) registers as IEEE754 real
MLsb (Most significant byte first)
DWord I Double 64 04 Read input registers as double word (Least significant byte
LMsb first)
DWord I/O Double 64 03 06, 16 Read/write holding (output) registers as double word
LMsb (Least significant byte first)
DWord I Double 64 04 Read input registers as double word (Most significant byte
MLsb first)
DWord I/O Double 64 03 06, 16 Read/write holding (output) registers as double word
MLsb (Most significant byte first)

- 389 -
Open Modbus Slave - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Frame status Driver status Meaning
Error reported by 0001 Illegal function
equipment (B5)
0002 Illegal data address in equipment
0003 Illegal data value, wrong size
0004 Slave device failure: the slave cannot
reply
0005 Acknowledged: the slave has accepted
the request and processing it, but will
take a long time
0006 Slave device is busy: the slave is
engaged in long processing of a pro-
gram command
0007 Negative Acknowledge
0008 Memory parity error
Network error (B6) 0102 Connection closed because of:

l Bad IP Address
l Bad Port Number
l Equipment disconnected from net-
work
Exchange time out 0000 Time-out.
(B7)
0106 Configuration error. Slave equipment already
configured with the same port and slave
address.
0040 Frame size not a multiple of 16 (only for
WordBit frame type) or the memory state is
not initialized.

- 390 -
POSM

- 391 -
POSM - Overview
This help is for version 1.07 of the POSM protocol.
The POSM protocol supports an Ethernet connection to the POSM XPro system. The system is typically used
to supervise bridges and tunnels using cameras, monitors, matrix displays and advanced vision systems.
The protocol operates in both master and slave modes.

In master mode
C-CURE Building Management System polls the system 'heartbeat' at a regular scan rate, about once a
minute is recommended. C-CURE Building Management System can also send a command to the POSM XPro
system (e.g. to switch a camera to a particular monitor).
In return, the XPro system sends an acknowledgement to C-CURE Building Management System.

In slave mode
More than one C-CURE Building Management System can control a POSM XPro system so it must be possible
to receive unsolicited information on the status of the system. The POSM protocol supports that function.

- 392 -
POSM - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - IPPOSM.
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. In the Network Parameter dialog, apply or confirm the following settings. Show picture

Property Settings
Time Out Leave default value. The time-out is not used.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.
The network can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to register the settings, then close the dialogs.

- 393 -
POSM - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the POSM TCP/IP network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Characteristics
Equipment Name for the node within C-CURE Building Management System.
Equipment type Always POSM-DEC.
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Node
IP address The IP address of the POSM XPro PC.
Specify the port number as configured in the POSM XPro software. The default value
Port number
is 50000.
Reconnection Period Minimum period between attempts to reconnect.
Operating mode
Maximum waiting time between a request and the reply from the equipment.
Node time out
Normally left at the default of 1 second.
Tick to enable starting of the equipment when the network is started.
Activate on start-up The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

4. Click on the Validate button to register the settings, then close the dialogs.

- 394 -
POSM - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
3. In the Frame Parameter dialog, apply or confirm the following settings. Show picture

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Characteristics
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Address Select the memory area in the PLC for this frame. See the topic on address selection.
Operating
mode
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to select cyclic reading.
Cyclic access For a write-only frame, this option MUST be unselected.

Frequency at which the frame is to be polled.


Scan rate Only select this option for the Heart Beat Frame. For the other frame(s), leave this
unticked.

4. Click on the Validate button to register the settings, then close the dialogs.

- 395 -
Address selection

- 396 -
POSM - Address Selection
Settings for all frames
In the frame configuration dialogs (Configure.Communication.Equipment: Select Communication Objects,
Frame Parameters and Enter Address & Size): Show picture

Property Settings
Mnemonic The address mnemonic must match the equipment or sub equipment name configured
in the POSM XPro. It is not case sensitive.
Quantity of data The quantity of data must be left at the default value.
Starting address The starting address must be left at the default value.

- 397 -
POSM - Bit Frame Address Selection

See the topic DAI frame addressing for information on the DAI frame

The address mnemonic must match the equipment or sub equipment name configured in the POSM
XPro.
Access
Address R/W Cyclic Size Description
Heart Beat R Yes 1 Test the connection to the POSM XPro system. Set to a scan
period of about one minute.
Camera Stat R No 2 Status of the camera named by the mnemonic.
Offset 0 = Communication status:
0 = OK, 1= NOK
Offset 1 = Loss of video signal:
0 = Video OK, 1= Signal lost
Eqt Com Stat R No 1 Indicate the equipment status of the equipment name given by
the mnemonic.
Offset 0 = Communication status:
0 = OK, 1= NOK
Alm video Stat R No 1 Status of the video alarm named by the mnemonic.
Offset 0 = Alarm status:
0 = Alarm OFF, 1 = Alarm ON
Alm logic R No 1 Status of the logic alarm name given by the mnemonic.
Offset 0 = Alarm status:
0 = Alarm OFF, 1 = Alarm ON
Input R No 1 Status of the input name given by the mnemonic.
Offset 0 = Input status:
0 = Alarm OFF, 1 = Alarm ON
Output R No 1 Status of the output named by the mnemonic.
Offset 0 = Output status:
0 = Activated, 1 = Not activated
Logic Event R No 1 Activation of the logical event named by the mnemonic.
Offset 0 = action when the event is triggered:
Set to 1 then to 0

- 398 -
DAI - Frame Address Selection

Frames using the DAI address mnemonic are bit format.

The address mnemonic must match the equipment or sub equipment name configured in the POSM
XPro.

Access
Address R/W Cyclic Size Description
DAI Status R No 1032 Indicate the DAI alarm status of the name of which is given by the mne-
monic. The offset of the alarm is calculated as follow:
For DAI run time alarm
offset = Type(4bit).Group (4bit).Direction(1Bit) = 0000.0000.0
Example:
Type 1 Group 0 Direction 1 = 0001 . 0000 . 0 = 32 (Dec)
Type 1 Group 0 Direction 2 = 0001 . 0000 . 1 = 33
Type 1 Group 1 Direction 1 = 0001 . 0001 . 0 = 34
Type 1 Group 1 Direction 2 = 0001 . 0001 . 1 = 35
etc...
Type 7 Group 3 Direction 1 = 0111 . 0011 . 0 = 230
etc...
Type 10 Group 8 Direction 1= 1010 . 1000 . 0 = 336
Type 10 Group 8 Direction 2= 1010 . 1000 . 1 = 337

For DAI set-up alarm


For alarm Type <> 7 (VIP configuration modified)
offset = 1000 + Type
For alarm Type == 7 (VIP configuration modified)
offset = 1000 + 4*Type + Value
Example:
Type 1 = 1000 + 1 =1001 (Dec)
etc...
Type 6 = 1000 + 6 = 1006
Type 7 Value 0 = 1000 + 4*7 + 0 = 1028
Type 7 Value 1 = 1000 + 4*7 + 1 = 1029
Type 7 Value 2 = 1000 + 4*7 + 2 = 1030
Type 7 Value 3 = 1000 + 4*7 + 3 = 1031
Type 7 Value 4 = 1000 + 4*7 + 4 = 1032
etc...
Type 13 = 1000 + 13 = 1013

- 399 -
POSM - Magneto Frame Address Selection

Frames using the Magneto address mnemonic are bit format.

The address mnemonic must match the equipment or sub equipment name configured in the POSM
XPro.

Access
Address R/W Cyclic Size Description
Magneto Stat R No 18 Indicates the magneto (VCR) status the name of which is given by the
mnemonic.
Offset Status
0 Eject
1 Stop
2 Play
3 Reverse play
4 Recording
5 Pause
6 Frame advance
7 Reverse frame advance
8 Fast forward
9 Rewind
10 Reset alarm
11 Display alarm menu
12 Display no menu
13 Reset end tape
14 Update date and time
15
16 Tape
0 = Normal
1 = End of tape
17 Presence
0 = Not present
1 = Present
18 Alarm
0 = Normal
1 = Alarm

- 400 -
POSM - Byte Frame Address Selection
The address mnemonic must match the equipment or sub equipment name configured in the POSM
XPro.
Access
Address R/W Cyclic Size Description
Camera R No 32 Name of the monitor connected to the camera named by the
mnemonic.
Offset 0 = Monitor name (32 characters)
Monitor R No 64 Camera and sequence name connected to the monitor named
by the mnemonic.
Offset 0 = Sequence name (32 characters)
Offset 32 = Camera name (32 characters)
DVR R No 128 Indicate the DVR information named by the mnemonic
Offset = 0 First record - format dd/mm/yyyy hh:mm:ss
Offset = 32 Last record - format dd/mm/yyyy hh:mm:ss
Offset = 64 DVR input name
Offset = 96 Start record - format dd/mm/yyyy hh:mm:ss

- 401 -
POSM - Word Frame Address Selection
The address mnemonic must match the equipment or sub equipment name configured in the POSM
XPro.
Access
Address R/W Cyclic Size Description
Monitor R No 1 Indicate the status of the sequence for the monitor named by
the mnemonic.
Offset 0 = Sequence status
0 = Stopped
1 = Start cyclic
2 = Previous (Step by step)
3 = Next (Step by step)
Camera R No 1 Indicate the pre-position number for the camera named by the
mnemonic.
Message R No 2 Indicate the command status sent by the SCADA Basic instruc-
tion CIMWAY mode SENDMSG.
Offset 0 = Command code number
Offset 1 = Command status
0 = Request received and in progress
1 = Command executed without any error
2 = Syntax error - wrong number of parameters
3 = No answer from equipment
4 = Syntax error - name not understood by Tyco system
DVR R No 1 Indicate the command type for the DVR named by the mne-
monic
Offset 0 = Command type
0 = Stop
1 = Read
2 = Fast forward
3 = Fast rewind
4 = Pause
5 = 1 step forward
6 = 1 step backward
7 = Reserved

- 402 -
POSM - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Frame status Driver status Meaning


No information available at time of release.

- 403 -
POSM - SCADA Basic
You can use SCADA Basic to send a command to the POSM XPro PLC.
The syntax is:
iRet = CIMWAY("SENDMSG",strNodeObject,strCommand);
where:

Property Meaning
strNodeObject A string composed of the network name and the node name.
For example if the network is called NET and the equipment is called EQT, strNodeOb-
ject is “NET.EQT”
strCommand A command: please refer to the table below.
iRet SCADA BASIC status.
This only indicates that the message has successfully been sent to the driver, not
whether the command has been successful.
To find out the status of the command you set up a Word frame of type MESSAGE and
map a register to it. Please refer to the Address Selection topic.

Syntax
This table specifies the syntax for each type of command:
Command Syntax for strCommand
Set Clock “1”
Switch Camera “1000;CameraName;MonitorName”
Command a “1100;SequenceName;MonitorName;Value”
sequence for a mon-with value:
itor 0 - Stopped
1 - Start cyclic
2 - Previous (Step by step)
3 - Next (Step by step)
Start/Stop a video “1200;AlarmVideoName;Value”
alarm of a matrix with Value:
0 - Stop
1 – Start
Activate/Deactivate “1300;OutputName;Value”
an output of the IO with Value:
Card 0 - Activate
1 – Deactivate
Trigger a logic
“1500;LogicEventName”
event
Trigger a latched “1501;LogicEventName;PrevValue;CurrentValue”
logic event with
PrevValue: 0 to 4
CurrentValue: 0 to 4
General status
“2007”
request
Equipment com-
“2000”
munication request
Camera com-
“2001”
munication request
Camera video
“2002”
status request
Video alarm status
“2003”
request
Input status “2004”

- 404 -
request
Logical alarm
“2006”
request
DAI detector status
“2009;DAIName”
request
Alarm DAI runtime “2014;DAIName;Group;AlmType;AlmAck”
ack. with
Group = 0 to 8
AlmType = 0 to 10
AlmAck = 0 to 7
Alarm DAI tech “2015;DAIName;AlmType;AlmAck”
ack. with
AlmType = 0 to 12
AlmAck = 0 to 7
Alarm POSM sys- “2016;POSMName;AlmType;AlmAck”
tem ack. with
AlmType = 0 to 7
AlmAck = 0 to 2
Set camera pre-pos-“1002;POSMName;PrepositionNumber”
ition sector with
PrepositionNumber = 1 to 255
Magneto status
“2005”
request
Magneto command “1400;POSMName;Value”
request with
Value = 1 – Eject
Value = 2 – Stop
Value = 3 – Play
Value = 4 – Reverse Play
Value = 5 – Recording
Value = 6 – Pause
Value = 7 – Frame Advance
Value = 8 – Reverse Frame Advance
Value = 9 – Fast forward
Value = 10 – Rewind
Value = 11 – Reset alarm
Value = 12 – Display alarm menu
Value = 13 – Display no menu
Value = 14 – Reset end tape
Value = 15 – Update date and time
DVR historical
“2026;DVRName”
range
DVR command “2025;DVRName;In-
putName;MatrixInputName;MonitorName;Date;RecordName;Value”
with
Date = Format “dd/mm/yyyy hh:mn:ss”
RecordName = Up to 64 characters
Value = 0 – Stop
Value = 1 – Read
Value = 2 – Fast forward
Value = 3 – Fast rewind
Value = 4 – Pause
Value = 5 – 1 step forward
Value = 6 – 1 step backward
Value = 7 – Reserved

- 405 -
SAIA SBUS TCP/IP

- 406 -
SAIA SBUS IP - Overview
This protocol enables C-CURE Building Management System to communicate with all SAIA PCD series PLCs,
over an Ethernet TCP/UDP network.

Prerequisite
The driver needs the DLL file SCOMMDLL.DLL to work. The DLL is provided by SAIA with its programming
environment (PG5) which must be installed on the host PC. The path to the DLL must be included in the Win-
dows PATH environment variable. See the topic Setting the DLL path.

From version 10.0 SP1 of C-CURE Building Management System, PG5 version 2.0 is supported.

- 407 -
SAIA SBUS IP - Network Configuration
1. Select the menu Configure.Communication.Equipment to open the Select Communication Objects dia-
log.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values. Show picture

Property Settings
Network MULTIPROTOCOL
board
Protocol IP-SAIA
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. In the Network Parameter dialog, apply or confirm the following settings. Show picture

Property Settings
Time Out Time-out period.
Activate at Tick to enable the network to start when the Communication Manager starts.
start-up
6. Click on the Validate button to register the settings, then close the dialogs.

- 408 -
SAIA SBUS IP - Node Configuration
1. Select the menu Configure.Communication.Equipment to open the Select Communication Objects dia-
log.
2. In the Network column, select the SAIA NET network previously configured.
3. In the Node column, double-click on *CREATION* to open the Node Parameters dialog.
4. Apply or confirm the following settings. Show picture

Property Meaning
Characteristics
Equipment Enter a name for the node within C-CURE Building Management System.
Equipment Type Select PCD Serie.
Node time out Leave at the default, as this is not used.
Timestamping
Tick to enable timestamping mode. The error address must be set to a positive num-
Enable
ber greater than 0.
Error address If timestamping is enabled, the address used to indicate a full stack.
If the timestamp coded in the block exceeds the Delta TS time the blocks stored in
Delta TS the PLC are too old. In that event, the frames selected as timestamped are scanned
cyclically until the timestamp of the block falls within the Delta TS.
UTC timestamp Specify if the PLC timestamp is UTC or local.
Node
Network address IP Address of the connected PLC.
Port number TCP connection port number.
CPU CPU number in the range 0 to 6.
S-Bus address S-Bus address of the PLC.
Operating mode
Tick to enable starting of the equipment when the network is started.
Activate on start-up
The equipment can also be started by SCADA BASIC program using the CIMWAY verb.

4. Click on the Validate button to register the settings, then close the dialogs.

- 409 -
SAIA SBUS IP - Frame Configuration
1. In the menu, select Configure.Communication.Equipment to open the Select Communication Objects
dialog.
2. Select the Network and Node names for SAIA NET.
3. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
4. Apply or confirm the following settings. Show picture

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on Address
Address
Selection.

Operating mode
Meaning
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be periodically scanned. For a Write Only frame, this MUST
Cyclic access
be unselected.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialog.

- 410 -
SAIA SBUS IP - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.
Address Frame Address Max
Access
mnemonic format range size
I Bit R 0 to 65535 22400
O Bit R/W 0 to 65535 22400
F Bit R/W 0 to 65535 22400
WordBit R Bit R/W 0 to 65535 65520
R Real R/W 0 to 65532 700
R Double R/W 0 to 65532 700
T Double R/W 0 to 65532 700
C Double R/W 0 to 65532 700

- 411 -
SAIA SBUS Serial and IP - Setting the DLL Path
You have to specify the path by which C-CURE Building Management System's driver can find one or other of
the DLL files, SCommDll.Dll or SCommDll52.dll, installed with the SAIA programming environment (PG5).
To do so, you modify the system environment variable PATH as follows.

1. Open the Windows Environment Variables pane. On most versions of Windows, you can easily locate
this by typing Environment in the Search Windows prompt.
2. Select the global PATH environment variable. Show picture

3. Click on Edit to open the Edit System Variable dialog.


4. In the Variable Value field, enter the path to the folder of the SAIA Burgess programming software
(PG5). Show picture

(this path is only illustrative)


5. Restart the PC to apply the changed path value.

If the Variable Value field contains any paths for other programs, keep them by adding a semicolon
(';') to the end, followed by the new path.

- 412 -
SAIA SBUS - Driver Status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Many of the status come directly from a code library (DLL), supplied by SAIA, that C-CURE Building Man-
agement System uses in its driver. These are the same for both the serial and TCP/IP versions of the pro-
tocol. Some come from C-CURE Building Management System's driver itself, and some other are specific to
the serial version of the protocol.

Statuses from the SAIA DLL


Status Meaning
0 Communications OK
1 NAK response (command not accepted)
3 Invalid BCC or CRC (no other errors)
4 Invalid response
5 Bad connection between P800 and PCD6
6 No response (Request time out)
7 No response after PcdRestart in PcdWrAllocation
8 No Data Carrier Detect
9 Port in use in another mode or baud rate
10 Bad parameter
11 PCD memory write verify error
12 PC out of memory
13 Physically connected to wrong CPU on PCD6
14 CPU not present
15 PCD to flash failed on M170
16 Files & CPU don't compare (see PcdCompare)
17 Cannot open file
18 Error writing to file
19 Error reading file
20 Invalid PCD file
21 PCD file checksum error
22 Invalid header in PCD
23 Not enough space in code segment
24 Not enough space in text segment
25 Extension memory segment too small
26 Header not initialized
27 Can't write EPROM memory
28 Operation canceled by user
29 Block not defined
30 CPU must be in Stop or Halt
31 CPU not programmed
32 (INTERNAL) Special status for debugging.
34 Cannot change size of extension memory
35 COM port is not open or PCDCONN handle is invalid
36 Write to PCD failed
37 Port request timeout
40 Port is in use
44 Fatal internal error
45 Operation not supported by PCD F/W version
46 Station number already defined
47 Not enough space for extended header
48 Invalid password

- 413 -
49 Extended header checksum error
50 Download to wrong S-Bus station ($STN)
51 Download to PCD with wrong firmware ($PCDVER)
52 S-Bus Parity mode is not supported for this COM port
54 RTS/CTS mode is not supported for this COM port
55 Connected PCD's type does not match hardware settings
56 (BUES) Error in Sql Statement
63 Internal data invalid
64 C++ Exception in DLL
65 Ask for password
67 Timeout is not supported for this COM port
68 Driver not available
69 (BUES) Received a BUES CMD_E response
70 (BUES) Received a BUES CMD_A response
71 Cannot Activate SAP

Statuses from C-CURE Building Management System's driver


Status Meaning
DLL initialization problem. Check that the PATH environment variable has been
413
correctly set. See the topic Setting the DLL path.
1000 Bad data type. Check data type.
1001 Bad parameter. Serial only
1002 Bad port number. Serial only
1003 Wrong baud rate. Serial only
1004 Wrong SBUS address. Serial only

- 414 -
Siemens IP-ISO S7

- 415 -
Siemens IP-ISO S7 - Overview
Operation
The protocol enables C-CURE Building Management System to communicate with S7 Series devices using an
Ethernet connection. The supported PLCs are:
Standard packet Protocol large frame sup-
Series Type Part number
size (bytes) port (bytes)
S7-200 CP243-1 6GK7243-1EX00-0XE0 240 8192
S7-300 CP343-1 6GK7343-1EX21-0XE0 240 8192
S7-400 CP443-1 6GK7443-1EX11-0XE0 480 8192
S7-31x PN Built-in 240 8192
S7-1200 Built-in
S7-1500 Built-in
The protocol uses ISO messaging to read and write data to/from the PLC.
You must configure the network on the PLC side to support this protocol.

In any exchange, the PC is the master and the PLC is a slave.


The maximum quantity of data that can be read per frame is 8192 bytes. Since the approximate amount of
data exchanged per TCP/IP packet is 700 Words, if the frame size is greater than 700 words the frame is
transmitted in a set of TCP/IP packets. This multiple packet transmission is transparent to the user.
A maximum of 255 PLCs can be connected via the S7-ISO protocol. The driver needs no extra software to
communicate with the devices. All communication is run over the standard Ethernet network interface of a
PC. A crossover cable is required for direct communication between a Siemens communication processor
and a PC. The communication speed is limited to 100MBit.

Redundancy
The protocol supports node redundancy with up to three alternative addresses. According to the connection's
status and optionally the PLC mode switch, the protocol switches sequentially from one node to the next. The
user can also view and force the active connection.
Redundancy is not available for the S7-200 series of PLC.

Timestamping
The protocol supports timestamped data. In this mode, the data receives its value, date and time from the
equipment. Timestamping mode is triggered by a configurable bit in a DB word of the PLC.
The PLC populates a series of timestamped blocks. The format of the S7_CEI block is a predefined structure
that enables transmission to the PC of the value plus the date and time of the variable at the source.

- 416 -
Siemens IP-ISO S7 - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - IP-ISO-S7.
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. In the Network Parameter dialog, apply or confirm the following settings. Show picture

Property Settings
Time Out Unused. Leave at default value.
Activate the net- Tick to enable the network to start when the Communication Manager starts. The net-
work on startup work can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to register the settings, then close the dialogs.

- 417 -
Siemens IP ISO S7 - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the Siemens IP-ISO S7 network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog. Show picture

3. Apply or confirm the following settings.

Property Meaning
Characteristics
Equipment Name for the node within C-CURE Building Management System
Equipment type Either S7-200, S7-300/400 or S7-1200/1500.
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Timestamping
Tick to enable timestamping mode. The error address must be set to a positive num-
Enable ber greater than 0. The PLC trigger is bit 0 of the word specified in the error address.
You also need to configure a S7_CEI frame for this equipment.
Error address If timestamping is enabled, the address used to indicate a full stack.
If the timestamp coded in the block exceeds the Delta TS time the blocks stored in
Delta TS the PLC are too old. In that event, the frames selected as timestamped are scanned
cyclically until the timestamp of the block falls within the Delta TS.
Node
Network address The IP address of the equipment.
Rack number The number of the rack in which the PLC CPU is located.
Slot number The slot in which the PLC CPU is located.
Opens the Redundancy Configuration dialog. See the topic Redundant Node Con-
Redundancy
figuration.
Operating mode
Operating mode
Node time out Maximum waiting time between a request and the reply from the equipment.
Tick to enable starting of the equipment when the network is started. The equipment
Activate on start-up
can also be started by SCADA BASIC program using the CIMWAY verb.

4. Click on the Validate button to register the settings, then close the dialogs.

Once the timestamped mode is activated by the PLC, the frames selected as timestamped are no
longer scanned cyclically but are refreshed using the Block S7_CEI frame.

Advanced options
Click on the Advanced options button in the Node dialog to access the advanced options.
Property Meaning

- 418 -
Reconnect
Minimum period between attempts to re-establish a lost connection.
Period

- 419 -
Siemens IP-ISO S7 - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are BIT, WORD, REAL and DOUBLE.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data to be monitored in the device. See the topic on Address
Address
Selection.
Priority mode In a queue of write requests, the priority frame is processed first.
T-stamped frame If this is ticked, the S7_CEI frame refreshes the value of this frame.
Tick to enable a frame to be periodically scanned. For a write only frame, this must
Cyclic access
not be ticked.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to apply the settings, then close the dialogs.

- 420 -
Siemens IP-ISO S7 - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.
For the DBW data type, it is also necessary to enter a DB number. Only DB1 to 32767 are accessible.
DBs above this range are not accessible with this driver. The S7-200 series has only DB1.

Standard address frames


Address Time Frame Access Address range Max. size Description
mnemonic stamping format
DBW Yes BIT R/W 0.0 to 65535.7 65528 bits Word bit in a DB
MW Yes BIT R/W 0.0 to 65535.7 65528 bits Word bit in MW
EW Yes BIT R/W 0.0 to 65535.7 1024 bits Word bit in EW
AW Yes BIT R/W 0.0 to 65535.7 1024 bits Word bit in AW

DBW Yes BYTE R/W 0 to 65535 65534 bytes Byte data in a DB


MW Yes BYTE R/W 0 to 65535 65534 bytes Byte in MW
EW Yes BYTE R/W 0 to 65535 128 bytes Byte in EW
AW Yes BYTE R/W 0 to 65535 128 bytes Byte in AW

DBW Yes WORD R/W 0 to 65534 32767 words Word in a DB


MW Yes WORD R/W 0 to 65534 32767 words Word in MW
EW Yes WORD R/W 0 to 65534 64 words Word in EW
AW Yes WORD R/W 0 to 65534 64 words Word in AW
TW No WORD R 0 to 65535 128 words Word in TW

DBW Yes REAL R/W 0 to 65532 16383 reals Real in a DB


MW Yes REAL R/W 0 to 65532 16383 reals Real in MW
EW Yes REAL R 0 to 65532 32 reals Real in EW
AW Yes REAL R/W 0 to 65532 32 reals Real in AW

DBW Yes DWORD R/W 0 to 65532 16383 dwords Double in a DB


MW Yes DWORD R/W 0 to 65532 16383 dwords Double in MW
EW Yes DWORD R/W 0 to 65532 32 dwords Double in EW
AW Yes DWORD R/W 0 to 65532 32 dwords Double in AW
ZW No DWORD R 0 to 65532 64 dwords Double in ZW
TW No DWORD R 0 to 65532 64 dwords Double in TW

TS - Support for timestamping.

Special frame
Address Timestamping Frame Access Address Max. Description
mnemonic format range size
S7_CEI No Word R 0 to 65535 4095 Timestamped frame. The amount of data
blocks is the number of timestamped blocks
read.
Information No Word R Gives the active connection number.*
Command No Word W Sets the active connection number.*
* Please refer to the topic on Redundant Node Configuration.

Memory organization in the PLC


The PLC variables in the SIMATIC S7 use a byte addressing mode.

- 421 -
The driver can be used to read a series of words, double or floating words with byte, word or double word
alignments. These alignment modes enable you to obtain words or double words with even or odd
addresses.
The following gives an example for the word frame.
Byte Even Odd
address start start
0 Word 1
1 Word 1
2 Word 2
3 Word 2
4 Word 3
5 Word 3
6 Word 4
7 Word 4
8

- 422 -
Siemens IP-ISO S7 - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Error code Description


0x0007 Device not open
0X5000 No queue
0X5001 Invalid packet
0X5002* Not connected (equivalent to 102 in Modbus IP)
0X5003 Connection closed
0X5004 Timeout
0X5005 Wrong context
0X5006 PLC memory error
0X5007 Wrong op state
0X5008* Wrong address
0X5009 Invalid mode error
0X500A No data error
0X500B PLC priority class error
0X500C Empty block list
0X500D PLC block size error
0X500E Invalid block number
0X500F Protect error
0X5010 Unknown SZL ID
0X5011 Unknown SZL index
0X5012 No information
0X5013 Unknown PLC error
0X5014 Hardware error
0X5015 Object access not allowed
0X5016 Context not supported
0X5017 Type not supported
0X5018 PDU error
0X5019 No PLC start
0X501A No PLC resume
0X501B Disconnect request
0X501C PLC not found
* These are the most common errors.

- 423 -
Siemens IP-ISO S7 - Redundant Node Configuration
The Redundancy dialog allows the configuration of up to three additional nodes, numbered 1 to 3, to provide
redundant behavior for an item of equipment. It tries to connect to 0 then 1 then 2 and finally 3. Switching
between connections is carried out automatically by the driver as soon as an error occurs on the active con-
nection or if the option Enable switch on CPU stop is selected and the PLC is switched to Stop mode. (Stop
mode is when the PLC CPU is still running but the PLC program has been stopped.)

l Open the dialog by selecting the Redundancy button in the Node Parameters dialog. Show picture

Using the Enable Switch on CPU Stop option


This option allows you to maintain one PLC on a redundant PLC configuration while the other is supporting
data supply to C-CURE Building Management System. As soon as the PLC holding the active connection is
switched to Stop mode, the driver will change to a redundant PLC that is in Run mode. If no PLC's are in Run
mode, the driver continues to switch the connection until it finds one.

Property Meaning
Enable switch on
Enables automatic change of connection when CPU operation mode is no longer Run.
CPU stop
Watchdog Period Time interval when the CPU operation mode is changed.

Switching a connection manually


You can switch from one connection to another manually either by using a variable switch or a SCADA Basic
switch.
Variable-based switching
This consists of setting a register value to 0, 1, 2 or 3 according to the connection number you wish to use.
This requires the configuration of a Command frame along with an equipment register variable for sending
the command.
SCADA Basic switching
This uses the CIMWAY command as shown in the topic on use of SCADA Basic for IP-ISO S7.
Each method has an advantage and a drawback. Variable switching is faster since it is a CIMWAY write com-
mand (with high priority) but it requires the configuration of an extra frame and a variable. Switching by
SCADA Basic is slower (the command is not sent immediately to the driver) but it requires neither variable
nor extra frame configuration.

Displaying the connection


You can visualize which connection is used by creating a register variable and linking it to the information
frame. The variable contains the connection number used.

- 424 -
Siemens IP-ISO S7 - SCADA Basic
The IP-ISO S7 protocol supports the following special feature when used with SCADA Basic.

Changing the equipment address


CIMWAY("CFG", ComObj, "EQT_ADDRESS", Param, [, VarName]);

Argument Meaning
ComObj The name of a node communication object - for example "NET.NODE1".
Param Parameter field structure as follows.
"slot#ip1#ip2#ip3#ip4#rack#ts_word#ts_db#0#reconnect_period#0"
VarName The name of a database register that returns the status of the modification. Type STR.
0 = REQUEST
1 = ACK
2 = NACK

Changing a frame's address


CIMWAY("CFG", ComObj, "MEMORY_ADDRESS",Param);

Argument Meaning
ComObj The name of a frame communication object - for example "IPISOS7.PLCSIM1.DBXX".
Param Parameter field structure as follows.
"start_address#DBnumber"
Example
CIMWAY("CFG", "IPISOS7.PLCSIM1.DBX", "MEMORY_ADDRESS","2#127");
Will change the address of the frame DBXX to data block (DB) 127 with a start address of 2.

Switching the connection for a redundant PLC configuration


Syntax: CIMWAY("SENDMSG", ComObj, "ConnectTo;num");

Argument Meaning
ComObj The name of a node communication object, for example NET.EQT1.
Num The number of the connection. Range 0 to 3.
The string ConnectTo is not case sensitive.
Example:
CIMWAY("SENDMSG", "NET.EQT1","ConnectTo;1");
will switch the node EQT1 to connection 1.

- 425 -
Siemens IP-ISO S7 - PLC Configuration
For configuration of the network, connections and stations, the Siemens NetPRO package is required. This
can be ordered as standalone software or within the Step7 package. (Part number: 6ES7810-5CC10-0YA6
SIMATIC STEP7 PROF ED2006) Please refer to your local Siemens dealer for further information.
The following steps should only be performed by authorized personnel.

This explanation is only intended as an example. Since applications may differ in many ways, it should not
be treated as definitive.

1. In your S7 project, open NetPRO and add a network or configure an already existing network to meet
your requirements. Then add a new station, here called Other Station>. You will see a new station rep-
resented like this. Show picture

2. Double-click on the station to open its Properties dialog. Select the General tab and enter the station
name, author and any comment. Show picture

3. Click on the Interface tab to display the network connections. Show picture

4. The result should look like this. Show picture

5. You must now configure the communications processor to allow for messages longer than 240 bytes.

- 426 -
1. Double-click on the symbol representing the CP343 communications processor. The con-
figuration dialog will open. Select the Options tab.
2. In the SEND/RECEIVE section, tick the option Data length > 240.
3. Click the OK button to save the changes and close the dialog.
6. Compile the program and transfer it to the PLC.

No extra function blocks or function calls are needed on the communication processor to run the com-
munication.

- 427 -
Siemens S7 Master

- 428 -
Siemens S7 Master - Overview
If you update the driver from CWIPS7.DLL version 1.x to 2.0, you must reconfigure the PLC Coupler
using the Step7 utility. In Step7, the partner IP address and port number field must be left blank.

Operation
The protocol enables C-CURE Building Management System to communicate with S7 Series devices using an
Ethernet connection.
The PLCs supported are S7-300 and S7-400 equipped with an Ethernet coupler.
The protocol uses Fetch/Write messaging to read and write data to/from the PLC.
Check that the PLC Ethernet card you are using supports this messaging. You must configure both
contract Fetch Passive and contract Write Passive in the PLC.
In any exchange, the PC is the master and the PLC is a slave.
The maximum quantity of data that can be read per frame is 32Kb Words. Since the approximate amount of
data exchanged per TCP/IP packet is 700 Words, if the frame size is greater than 700 words, the frame is
transmitted in a series of TCP/IP packets. This multiple packet transmission is transparent to the user.

Redundancy
The protocol supports redundancy of nodes with up to 3 alternate addresses.
According to the connection’s status, the protocol automatically switches from one node to another sequen-
tially. There is only one connection open at time per node. The user can also view and force the active con-
nection.
In the case of a redundant server architecture, you can enable or disable connection for a selected server
station.

Timestamping
The protocol supports timestamped data. In this mode, the data received from the equipment is a value,
date and time.
The PLC populates a series of timestamped blocks. The fixed format of the S7_CEI block enables trans-
mission to the PC of the value plus the date and time of the variable at the source. The timestamping mode
can be stopped by a configurable bit in a word of the PLC (Timestamping Error address).

PLC (equipment) configuration


The PLC Ethernet coupler is configured using the Siemens Step7 software. For the protocol to work, you
need to configure at least two contracts.

l Fetch Passive.
l Write Passive.

The Write Passive port must be equal to Fetch Passive port + 1. The partner IP address and port number
field must be left blank.
You should reset the PLC after modifying any TCP/IP parameters using the S7 programming software. That
enables the coupler to re-initialize itself. Failure to do so may cause the new configuration to be ignored.

- 429 -
Siemens S7 Master - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on *CREATION* to open the dialog Network Board and Protocol
Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - S7-IP-Master.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following settings. Show picture

Property Settings
Time Out The Siemens S7 Master protocol does not use the Time out parameter unless using a
bridge in which case the bridge time out period must be less than the network time
out.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialogs.

- 430 -
Siemens S7 Master - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the Siemens S7 Master network previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dia-
log. Show picture

3. Apply or confirm the following settings.

Property Meaning
Equipment Name for the node within C-CURE Building Management System
Equipment type S7 Series includes S7-300 and S7-400 PLC. (The S7-200 is not supported.)
Virtual Not used. Do not select.
Message time out Leave set to default of 0.
Tick if the timestamped data format is to be used. Timestamped data uses a mod-
Timestamped ified frame format. To use timestamped data you must have equipment that sup-
ports the modified frame format.
Network address The IP address of the equipment.
The Fetch passive port as configured in the PLC using Siemens Step7 software.
Fetch port number The Write port configured using Step7 must be equal to the Fetch port number + 1.
For example if the Fetch port is 2000 then the Write port must be configured to 2001.
Maximum waiting time between a request and the reply from the equipment.
Node time out
Normally left set at the default of 1 second.
Activate on start-up Tick to enable starting of the equipment when the network is started.

4. Click on the Validate button to register the settings, then close the dialogs.

Advanced options
The advanced options are accessed by clicking the Advanced options command property in the Node dialog.
Property Meaning
Reconnect
Minimum period between attempts to re-establish a lost connection.
Period
Enable shared If ticked, allows all S7 slaves to share the same connection. If used, a connection is only
connection deemed to be in error if all the slaves using it have timed out.
Sharing group Not used.

- 431 -
Siemens S7 Master - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog. Show pic-
ture

3. Apply or confirm the following settings.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the range of data in the equipment for this frame. See the topic on address
Address
selection.
Priority mode In a queue of write requests, the priority frame is processed first.
T-stamped frame If ticked, indicates that the frame is to be used for timestamped data.
Tick to enable a frame to be periodically scanned. For a write only frame, this must
Cyclic access
be left blank.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

- 432 -
Siemens S7 Master - Address Selection
The Address and Size dialog configures the data range for each frame, how it is read from and written to the
equipment, and how it is interpreted in C-CURE Building Management System.
For the DBW data type, it is necessary to enter a DB number. Only DB1 to 255 are accessible using this
driver.

Standard address frames


Address Frame Address Max
Mnemonic TS Format Access Range Size Description
DBW Yes Bit R/W 0 to 65535 65528 Word bit in a DB
table
MW Yes Bit R/W 0 to 255 2048 Word bit in a MW
table
EW Yes Bit R 0 to 127 1024 Word bit in a EW
table
AW Yes Bit R/W 0 to 127 1024 Word bit in a AW
table
PW No Bit R 0 to 255 2048 Word bit in a PW
table
ZW No Bit R 0 to 255 2048 Word bit in a ZW
table
TW No Bit R 0 to 255 2048 Word bit in a TW
table

DBW Yes Byte R/W 0 to 65535 65535 Byte in a DB table


MW Yes Byte R/W 0 to 255 255 Byte in a MW table
EW Yes Byte R 0 to 127 127 Byte in a EW table
AW Yes Byte R/W 0 to 127 127 Byte in a AW table
PW No Byte R 0 to 255 255 Byte in a PW table
ZW No Byte R 0 to 255 255 Byte in a ZW table
TW No Byte R 0 to 255 255 Byte in a TW table

DBW Yes Word R/W 0 to 65535 32767 Word in a DB table


MW Yes Word R/W 0 to 255 128 Word in a MW table
EW Yes Word R 0 to 127 64 Word in a EW table
AW Yes Word R/W 0 to 127 64 Word in a AW table
PW No Word R 0 to 255 128 Word in a PW table
ZW No Word R 0 to 255 128 Word in a ZW table
TW No Word R 0 to 255 128 Word in a TW table

DBW Yes Real R/W 0 to 65535 16383 Real in a DB table


MW Yes Real R/W 0 to 255 64 Real in a MW table
EW Yes Real R 0 to 127 32 Real in a EW table
AW Yes Real R/W 0 to 127 32 Real in a AW table
PW No Real R 0 to 255 64 Real in a PW table
ZW No Real R 0 to 255 64 Real in a ZW table
TW No Real R 0 to 255 64 Real in a TW table

DBW Yes Double R/W 0 to 65535 16383 Double in a DB table


MW Yes Double R/W 0 to 277 64 Double in a MW table
EW Yes Double R 0 to 127 32 Double in a EW table
AW Yes Double R/W 0 to 127 32 Double in a AW table

- 433 -
PW No Double R 0 to 255 64 Double in a PW table
ZW No Double R 0 to 255 64 Double in a ZW table
TW No Double R 0 to 255 64 Double in a TW table

TS - Support for timestamping.

Special address frames


Address Frame Address Max
mnemonic TS Format Access Range Size Description
S7 CEI No Word R 0 to 65535 4095 Timestamped frame.
The quantity of data
is the number of
timestamped blocks
read.
Information No Word R Supplies the active
connection number.
Command No Word W Sets the active con-
nection number

Memory organization in the PLC.


The PLC variables in the SIMATIC S7 range (S7-400, S7-300) use a byte addressing mode.
S7_IP_MASTER can be used to read a number of words, double or floating words with byte, word or double
word alignments. These alignment modes enable you to obtain words or double words with even or odd
addresses.
The following table gives an example for the word frame.
Byte Even Odd
address start start
0
Word 1
1
Word 1
2
Word 2
3
Word 2
4
Word 3
5
Word 3
6
Word 4
7
Word 4
8

- 434 -
Siemens S7 Master - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Frame status Driver status Meaning


Error reported by equipment (B5) 0002 Invalid memory area
0003 Illegal data address in equipment
Network error (B6) 0102 Connection closed because of:

l Bad IP Address
l Bad Port Number
l Equipment disconnected from
network

- 435 -
Siemens S7 Master - Redundant Node Configuration
The Redundancy dialog allows the configuration of up to 3 additional nodes to provide redundant behavior
for an item of equipment. When the application starts, the communication manager communicates with the
primary node. When an error occurs, it switches to the next node in the sequence. Show picture
At any one time, there is only one connection open per item of equipment.

It is also possible to switch connections manually using a special frame and variable or SCADA Basic pro-
gram.

Managing redundant node operation using special frames and variables


For each node with redundant configuration, you can manage the operation using two special frames.

l A word format frame with the Information mnemonic. This frame should be configured for cyclic read
and linked to a single register variable. The register variable will contain the number of the active con-
nection (0, 1, 2, or 3).
l A word format frame with the Command mnemonic. This frame should be configured for write only
and linked to a register variable with the control attribute set. The value of the register selects the act-
ive connection (0, 1, 2 or 3).

Variable switching is fast since it is uses a write command (high priority) but it requires the configuration of
an extra frame and variable.

Controlling redundant node operation with SCADA Basic.


The SENDMSG mode of the SCADA Basic instruction CIMWAY can be used to select the active connection
using the following syntax.
CIMWAY("SENDMSG", ComObj, "ConnectTo;num");
Where ComObj is the name of the communication node, for example NET1.NODE1 and num is the connection
number (0, 1, 2 or 3).
For example:
CIMWAY("SENDMSG", "NET1.EQT1", "ConnectTo;2");
SCADA Basic switching is slower that variable switching, as the command is not sent immediately to the
driver (queues along with other requests), but it is flexible and does not require the configuration of an extra
frame and variable.

- 436 -
Siemens S7 Master - SCADA Basic
The S7 Master protocol supports the following special features when used with SCADA Basic.

Changing the equipment address


CIMWAY("CFG", ComObj, "EQT_ADDRESS", Param, [, VarName]);

Argu-
Meaning
ment
ComObj The name of a node communication object - for example "NET.NODE1".
Param Parameter field.
If the equipment has no redundancy the parameter line is as follows.
"1#IPad-
dr1#IPad-
dr2#IPaddr3#IPaddr4#PortFetch#ErrorWord#ErrorDB#ShareConnection#ReconnectPeriod"
ShareConnection is 1 for true or 0 for false.
If the equipment has redundancy then the following additional parameters must be appended to
the parameter line.
"#Num-
ber-
ofRed#SharingGroup#RedNumber#IPaddr1#IPaddr2#IPaddr3#IPaddr4#PortFetch#TypeFlag"
NumberOfRed = the number of redundant nodes. For each redundant node you must repeat the
parameters
RedNumber#IPaddr1#IPaddr2#IPaddr3#IPaddr4#PortFetch#TypeFlag
SharingGroup = 0 by default
RedNumber = Offset of the redundant node.
TypeFlag = Reserved.
VarName The name of a database register that returns the status of the modification. Type STR.
0 = REQUEST
1 = ACK
2 = NACK

Changing the connection for a redundant PLC configuration


CIMWAY("SENDMSG", ComObj, "ConnectTo;num");

Argument Meaning
ComObj The name of a node communication object - for example "NET.NODE1".
Num The number of the connection. Range 0 to 3.
Example: CIMWAY("SENDMSG", "NET.EQT1", "ConnectTo;1");
Will switch the connection of the node EQT1 to the connection 1.

Enable/Disable connection for a PC redundant server configuration


CIMWAY("SENDMSG", ComObj, "ConnectionDisable;Num");
CIMWAY("SENDMSG", ComObj, "ConnectionEnable;"Num");

Argument Meaning
ComObj The name of a node communication object - for example "NET.NODE1".
Num The number of the connection. Range 0 to 3.
ConnectionDisable = Disable the connection number Num. This connection is unavailable for the PC server
to connect to.

- 437 -
ConnectionEnable = Enable the connection number Num. This connection is available for the PC server to
connect to.
By default, the connection is available if no ConnectionDisable instruction has been made on a given con-
nection. Therefore, in a redundant server configuration you must specify which connection to the PLC is to
be used on each server.

- 438 -
TwinCAT

- 439 -
TwinCAT - Overview
This protocol enables C-CURE Building Management System to communicate with TwinCAT PLCs over an Eth-
ernet TCP/IP network.

Architecture
The Beckhoff software for the TwinCAT (The Windows Control and Automation Technology) system turns any
compatible PC into a real-time controller with a multi-PLC system, Numerical Control (NC) axis control, pro-
gramming environment and operating station. TwinCAT replaces conventional PLC and NC/CNC controllers
as well as operating devices.
The TwinCAT software devices can be distributed since TwinCAT PLC programs can run on PCs or on Beck-
hoff Bus Terminal Controllers. The TwinCAT protocol enables connection to any TwinCAT system whether
local or distributed over a TCP/IP network. It uses the AMS Router (message router) provided by Beckhoff to
manage and distribute all of the messages, both within the system and via TCP/IP connections.
In a distributed architecture, all communication is run over the standard Ethernet network interface of a PC.

Beckhoff AMS Router


The message router has to be installed on the system that is running C-CURE Building Management System.
It comes free of charge with any TwinCAT software pack. The earliest version to use is 2.9.
If you do not need a TwinCAT system, install TwinCAT-CP instead. Once the installation is done you should
see the following icon on your Windows Toolbar: .

AMS router configuration


In a distributed configuration, each PC on the network has to have a unique AMS Net Id. To allow two PCs to
communicate you need to add the AMS router definition on the remote PC as follows.

1. Right-click on the TwinCAT icon and select Properties to open the TwinCAT System Properties dialog.
Show picture

2. Select the AMS Router tab. Show picture

3. Enter the AMS Net Id of your PC in the Local computer field.


4. Select Add to open the Add Remote Connection dialog and then enter the parameter for the remote
computer. Show picture

- 440 -
5. Repeat the previous step for each PC that will be communicating.
6. Apply the same steps on the remote computer.

AMS Router start-up


The message router needs to be started for the communication to work. You can do so either manually or
automatically.

l Manually: in the TwinCAT icon's context menu, select System.Start. Show picture

l Automatically: in the System Properties dialog, select Properties, select the System Tab and then
select Enable, Show picture

Configuration files
You may need to edit these configuration files manually as specified in the other topics of this Help book.

l COMM.DAT
l TwinCAT Variable Definition file
l VAREXP.DAT,

- 441 -
TwinCAT - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTI-PROTOCOL
Protocol - TWINCAT.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following settings. Show picture

Property Settings
Comment A description of the network. Optional.
Time out The time-out period for response.
Activate on start-up Tick to enable the network to start when the Communication Manager starts.
The network can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to register the settings, then close the dialogs.

- 442 -
TwinCAT - Node Configuration
1. Select the menu Configure.Communication.Equipment to open the Select Communication Objects dia-
log.
2. In the Network column, select the TwinCAT network previously configured.
3. In the Node column, double-click on *CREATION* to open the Node Parameters dialog.
4. Apply or confirm the following settings. Show picture

Property Meaning
Equipment Enter a name for the node within C-CURE Building Management System.
Characteristics
Equipment Type Not used - leave the default value
Message timeout Always set to 0.
Node
AMS Net Id See below.
Port number See below.
Operating mode
Node timeout Maximum waiting time between a request and the reply from the equipment.
Activate on start-up Tick to enable starting of the equipment when the network is started.
The equipment can also be started by SCADA BASIC program using the CIMWAY
verb.

4. Click on the Validate button to register the settings, then close the dialogs.

AMS Net Id
Enter the six digit AMS ID for the remote PC. For example:
192 168 0 12 1 1

Port
By default, the driver will access the PLC port of the remote PC. If you wish to specify another port, change
the port property as follows.
Port Value
Port for PLC 801
Port for PLC (Runtime system 2) 811
Port for PLC (Runtime system 3) 821
Port for PLC (Runtime system 4) 831
Port for logger 100
Port for IO 300
Port for SPS 400
Port for NC 500
Port for ISG 550
Port for PCS 600

- 443 -
TwinCAT - Frame Configuration
1. In the menu, select Configure.Communication.Equipment to open the Select Communication Objects
dialog.
2. Select the Network and Node names for TwinCAT.
3. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
4. Apply or confirm the following settings. Show picture

Property Meaning
Frame Name for the frame within C-CURE Building Management System.
Frame format The frame format is not used other than being taken into account in the frame size
calculation. See the topic on Address Selection.
Access grant Specify whether the frame is read only, write only or read/write.
Address Used to determine the frame size in conjunction with the Frame Format property.
See the topic on Address Selection.

Operating mode Meaning


Priority mode In a queue of write requests, the priority frame is processed first.
Cyclic access Tick this to enable a frame to be periodically scanned. For a Write Only frame, this
MUST be unselected.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialog.

- 444 -
TwinCAT - Address Selection and Variable Mapping
Defining the variables
The TwinCAT variable definition for a frame is specified in an ASCII formatted file. The file must be located
in the C folder of the project. Its name is made up of the network name, node (equipment) name and frame
name.
For example if you have a network called NET, a node called EQT and a frame called T1, the file name is
NET_EQT_T1.DAT.
The format of the file's content is
Variable Name,Size
where

l Variable Name is the name of the variable in the TwinCAT program.


l Size is the size of the variable in bytes.

For example, the content of a file named NET_EQT_T1.DAT is:


MAIN.MYWORD1,2
MAIN.MYWORD2,2
MAIN.MYBIT1,1
MAIN.MYBIT2,1
MAIN.MYBIT3,1
MAIN.MYBIT4,1
MAIN.MYFLOAT,4
MAIN.MYDOUBLE,4
The order in which the TwinCAT variables are listed is significant as that is the sequence used for mapping
variables onto the frame.

Address selection
The start address of the frames and the data type are not used by the drive; only the size is important. The
quantity of data must correspond to the total size of all of the variables you wish to access. For the example
above the total size is 16 (2+2+1+1+1+1+4+4), so the size of T1 must be 16 bytes = 8 words.

Variable link
Since the variables you wish to access in the TwinCAT program may be of various kinds, the variable map-
ping needs to be done manually in the configuration file VAREXP.DAT that is stored in the C folder of C-CURE
Building Management System's project. Show table
No. Description T L Value
30 – AD Reserved N 2
31 – AE Network name C 8
32 – AF Node name C 12
33 – AG Frame name C 20
34 – AH Variable format C 1 B - Bit
U - 16 bit unsigned integer
I - 16 bit signed integer
L - 32 bit unsigned integer
1 - 32 bit singed integer
F -32 bit real
C - 8 bit unsigned byte
c - 8 bit signed byte
S - string ending with ‘\0’
T -fixed string
35 – AI Variable byte offset in the frame N 2
Bit offset in the byte specified in the byte
36 – AJ N 2
offset field
37 – AK Variable size expressed as a number of N 2

- 445 -
bits
For example, the file VAREXP.DAT might contain the following.
CTV,57,PLC1,FLOW1,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,U,0,0,16,…
CTV,58,PLC1,FLOW2,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,U,2,0,16,…
CMD,53,PLC1,CMD1,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,B,4,0,1,…
CMD,54,PLC1,OPEN1,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,B,5,0,1,…
CMD,55,PLC1,CMD2,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,B,6,0,1,…
CMD,56,PLC1,OPEN2,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,B,7,0,1,…
CTV,60,PLC1,SP1,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,F,8,0,32,,…
CTV,59,PLC1,CPT,,,,,,"","",,,,,,E,…,1,NET,EQT,T1,L,12,0,32,,…

The name of the Variables Tree variable does not need to match the name given in the TwinCAT Vari-
able Definition file. It is the byte offset that identifies each variable.
In the example above:
PLC1.FLOW1 corresponds to the TwinCAT variable MAIN.MYWORD1
PLC1.FLOW2 corresponds to the TwinCAT variable MAIN.MYWORD2
PLC1.CMD1 corresponds to the TwinCAT variable MAIN.MYBIT1 etc.

The Word variable byte offset MUST be a multiple of 2.

Double and Float variable byte offsets MUST be a multiple of 4.

There is no restriction for Bit and Text variables.

- 446 -
TwinCAT Limits
Version of the target ADS device
In the communication, ADS is the transport layer but the requested TwinCAT device has to support the ADS
commands. These are supported by TwinCAT PLCs with version numbers from 2.7 B511, from 2.8 B718 and
2.9 ff all)

Number of TwinCAT variables per frame


The PLC processes each request before it starts the next PLC cycle. For example, a request with 200,000
TwinCAT variables would cause the PLC to collect and copy 200,000 variables into a single ADS response
before starting the next PLC cycle. Such a large number of ADS sub-commands would disrupt the running of
the PLCs.

We highly recommend that you do not specify more than 500 TwinCAT variables per frame.

Frame size
The size of the WORD frame defined in C-CURE Building Management System must be greater than or equal
to twice the total size of all of the variables defined in the Variable Definition file.

Failing to do so will prevent you from linking all the variable you wish to access.

- 447 -
TwinCAT - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.

Commonly occurring error codes


Cod- Description
e
0 Equipment (Remote computer) not configured in the AMS Router.
x
0007
0 AMS Router not started.
x
0012

0 Cannot open the Variable Definition file. Please check that its name is that of a valid frame name
x
1000
0 Error in allocating the driver's buffer memory
x
1001
0 No variable found in the Write request.
x
1002
0 The total size of the TwinCAT variable definition exceeds 2,097,152 bytes.
x
Each variable has an additional 4 bytes for error handling.
1003

0 TCP/IP cable disconnected


x
2751

0 Variable not found in the equipment.


x
3yyy
xxx is the index (in hexadecimal) of the variable in TwinCAT Variable Definition file.
0 Size of variable mismatched.
x
6yyy
yyy is the index (in hexadecimal) of the variable in the TwinCAT Variable Definition file.
0 Write request error
x
6000
The size of one of the variables written via the variable link differs from the size specified in the
TwinCAT Variable Definition file.

Write each variable in turn to find out which one is faulty.

Less usual error codes


Show table

Error code Meaning


0x0001 Internal error.
0x0002 No Rtime.
0x0003 Allocation locked memory error.

- 448 -
0x0004 Insert mailbox error.
0x0005 Wrong receive HMSG.
0x0006 Target port not found.

0x0008 Unknown command ID.


0x0009 Bad task ID.
0x000A No I/O.
0x000B Unknown AMS command.
0x000C Win32 error.
0x000D Port not connected.
0x000E Invalid AMS length
0x000F Invalid AMS Net ID.
0x0010 Low installation level.
0x0011 No debug available.

0x0013 Port already connected.


0x0014 AMS Sync - Win32 error.
0x0015 AMS Sync - Timeout.
0x0016 AMS Sync - AMS error.
0x0017 AMS Sync - no index map.
0x0018 Invalid AMS port.
0x0019 No memory.
0x001A TCP send error.
0x001B Host unreachable.

0x0500 Router: no locked memory.


0x0502 Router: mailbox full.

0x0700 Error class <device error>.


0x0701 Service is not supported by server.
0x0702 Invalid index - group.
0x0703 Invalid index - offset.
0x0704 Reading/writing not permitted.
0x0705 Parameter size is incorrect.
0x0706 Invalid parameter value(s).
0x0707 Device is not in a ready state.
0x0708 Device is busy.
0x0709 Invalid context (must be in Windows).
0x070A Out of memory.
0x070B Invalid parameter value(s).
0x070C Not found (files...).
0x070D Syntax error in command or file.
0x070E Objects do not match.
0x070F Object already exists.
0x0710 Symbol not found.
0x0711 Symbol version invalid.
0x0712 Server is in an invalid state.
0x0713 AdsTransMode not supported.
0x0714 Notification handle is invalid.
0x0715 Notification client not registered.
0x0716 No more notification handles.
0x0717 Size for watch too big.
0x0718 Device not initialized.

- 449 -
0x0719 Device has a timeout.
0x071A Query interface failed.
0x071B Wrong interface required.
0x071C Class ID is invalid.
0x071D Object ID is invalid.
0x071E Request is pending.
0x071F Request is aborted.
0x0720 Signal warning.
0x0721 Invalid array index
0x0740 Error class <client error>.
0x0741 Invalid parameter at service.
0x0742 Polling list is empty.
0x0743 Var connection already in use.
0x0744 Invoke ID in use.
0x0745 Timeout elapsed.
0x0746 Error in Win32 subsystem.
0x0748 ADS-port not opened.
0x0750 Internal error in ADS sync.
0x0751 Hash table overflow.
0x0752 Key not found in hash.
0x0753 No more symbols in cache.

- 450 -
Yokogawa

- 451 -
Yokogawa IP - Overview
The Yokogawa protocol allows the exchange of data between C-CURE Building Management System and
Yokogawa FA – M3 family PLCs. Communication is via the Ethernet interface module (F3SP05, F3SP21,
F3SP25 and F3SP35).
The functions implemented by the protocol are:

l Read/ Write multiple bits (1 to 256 bits)


l Read/ Write multiple words (1 to 64 words)

Ethernet module configuration


FA-M3 series
The configuration of the module is done by switch setting.
Communication parameters
Switch Settings Items Position
01 Data code ON
02 Write protect OFF
03 – 06 Always set OFF OFF
07 TCP connection on timeout error OFF
08 Loopback test OFF

l 01 : Data code is Binary. The supported mode is binary


l 02 : Conducts writing from the remote node when the PC CPU is running
l 07 : Closes the line on timeout error
l 08 : Normal mode

IP address
To set the equipment IP address, configure the hexadecimal switches.
Please refer to chapter Node configuration for the choice of the address.
Example:

IP Address
Hexadecimal 85 8C 0B 39
Decimal 133 140 11 57

- 452 -
Yokogawa IP - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTI PROTOCOL
Protocol - YOKOGAWA TCP/IP.
4. Click on OK to open the Network Parameter dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. Apply or confirm the following properties. Show picture

Property Settings
Comment A description of the network. Optional.
Time out Not used - leave at the default value.
Activate the network at Tick to enable the network to start when the Communication Manager starts.
start-up The network can also be started by SCADA BASIC program using the CIMWAY verb.

6. Click on the Validate button to save the properties, then close the dialogs.

- 453 -
Yokogawa - Node Configuration
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select a Yokogawa IP network previously configured.
2. In the Node column, double-click on a node name (or on *CREATION* for a new node) to open the
Node Parameters dialog.
3. Apply or confirm the following properties. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System.
Equipment type Select FA-M3.
Message time out Leave this property set to default (0).
Network address The IP address of the PLC.
CPU number CPU number in the range 0 to 4.
Bridge
Address
Network
Node time out Maximum waiting time between a request and the reply from the equipment.
Tick to enable starting of the equipment when the network is started.
Activate on start-up
The equipment can also be started by SCADA BASIC program using the CIMWAY verb.

4. Click on the Validate button to save the properties, then close the dialogs.

- 454 -
Yokogawa IP - Frame Configuration
1. In the menu, select Configure.Communication.Equipment. In the Select Communication Objects dia-
log, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame properties dialog. Show picture

3. Apply or confirm the following properties.

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are BIT and WORD.
Access grant Specify whether the frame is read only, write only or read/write.
Select the memory area for this frame in the equipment. See the topic Address Selec-
Address tion and the section on Address Selection in the topic Configuring the Communication
Frame Properties.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a Write Only frame, this
Cyclic access
option must be unselected.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to save the properties, then close the dialogs.

- 455 -
Yokogawa - Address Selection
The Characteristics section of the Frame Parameters dialog configures the data range for each frame, how it
is read from and written to the equipment, and how it is interpreted in C-CURE Building Management Sys-
tem. All numbers are given in decimal.

Before you create a frame, make sure that the PLC you are using complies with the table.

Standard address frames


PLC Table Range
BIT table
*Inputs relay X01~64
*Output relay Y01~Y64
Internal relays I0001~I16384
Shared relay E0001~E4096
Counter relay C001~C3072
*Link relays L0001~L1024
Special relay M00001~M9984
Timer relay T001~T3072

WORD table
Data register D0001~D8192
File register B00001~B32768
Shared register R1025~R4096
Index register V01~V064
Special register Z001 ~ Z512
*Link register W0001 ~ W1024

* Special addressing - See below.

Accessing X, Y, W and L devices


X and Y devices
Show picture

l Slot number = imm


l The slot number is composed of a unit number and a slot location.
l i : unit number = 0 : main unit ; = 1 to 7 : sub-units
l mm : slot location (01-13) (from the right end of the power supply module to the right end
of the base module)
l Starting address = Terminal number (1-64)

Example:
To access the Terminal number 12 of the X device on the main unit:

- 456 -
l Slot number = 02 (i=0, mm=2)
l Starting address = 12

W and L devices
Show picture

FA-link module number = FA link module number (0-7)


Starting address = link relay Number (1-1024)
Example:
To access the FA-link module 1 at the address 12:

l FA-link module number = 1


l Starting address = 12

- 457 -
Yokogawa IP - Driver status
The driver status provides driver specific information to supplement the frame general status. For more
information on status in general, see the topic Understanding communication status.
Error Meaning Corrective Action
code
0x03 Connection close Check the equipment IP address
0x04 Time out Check the cable and CPU number
0x05 Cannot open the con- Check the equipment IP Address
nection
0x06 CPU processing error Check if the device type exist in the PLC, Check if the switch No 2 (Write
protection) is set to OFF, Check the Slot number for X,Y devices and the
module number for W and L devices.

- 458 -
Support for timestamped data

- 459 -
Timestamped Data - Overview
Timestamped data is data where the timestamp (time at which the data changed) is supplied by the source
(i.e. the PLC) rather than C-CURE Building Management System.
To accommodate timestamped data, C-CURE Building Management System supports modified frame
formats and behavior for certain protocols.

l Open Modbus Master


l Siemens S7 Master
l Siemens IP-ISO S7
l SAIA SBUS (TCP/IP and serial)
l *Modbus (serial)
l *Modbus+
l *Applicom

*The block structures for Modbus (serial), Modbus+ and Applicom are not included in this doc-
umentation.
Support for timestamped data is not standard in most equipment and must normally be added using spe-
cialized program code. Description of the program code is beyond the scope of this Help.

- 460 -
Timestamped Data - Principles of Operation

Configuration in C-CURE Building Management System


To use timestamped data the communication must be configured as follows.

l For each node supporting timestamped frames, the Enable (Timestamping) property must be ticked
and a location entered for the error address. Show picture

l Each frame to be used for timestamped data must have the T-Stamped property ticked. Show picture
These frames are known as timestamp enabled frames.

l A single frame, with a timestamped address mnemonic, must be created for each node managing
timestamped data. The Starting address property specifies the location of first word of the
timestamped data stack within the equipment data table. The Quantity of data property specifies the
maximum number of timestamped blocks to be read. This frame is known as the Timestamped Man-
agement frame. For information on the structure of the data in the Timestamp Management frame,
see the Block Structures book.

The Timestamped Management frame must be linked to at least one variable or the communication
manager will not activate it. The variable has no other use and will not have a real time value.

Configuration in the equipment

- 461 -
The program in the equipment must be modified to create and manage the timestamped data stack used for
exchange of data between the equipment and C-CURE Building Management System. The structure of the
data stack must match that of the Timestamped Management frame.
The program in the equipment must save the timestamped data in the stack and manage the exchange as
explained in the section Operation of the Equipment below.

Operation of C-CURE Building Management System


The timestamp-enabled frames are not read cyclically from the equipment. Instead, they are used by the
Timestamped Management frame to match data table addresses with C-CURE Building Management
System's variables.
The Timestamped Management frame polls the equipment regularly. The number of words read depends on
the number of timestamped blocks and the type of timestamp. After each poll, a frame containing a single
word is written back to the equipment, with the block number set to 0 and a copy of the exchange number,
as a confirmation of the read.
Each poll of the Timestamped Management frame retrieves one or more values each with its own
timestamp, type and address. The type and address are matched with the configuration of the timestamp-
enabled frames to select the variables that are updated with the value and timestamp.
Frames with the same type of data, that have the T-stamped property ticked, must not have over-
lapping address ranges as only the first frame will be refreshed with the value and timestamp.

Operation of the equipment


The program in the equipment must place data in the data table that is being used as the timestamped data
stack (according to the configuration of the Timestamped Management frame). The program must monitor
the field representing the number of blocks and, when it is set to 0 (by C-CURE Building Management Sys-
tem), move the next block of data into the data table. Each time a new block of data is placed in the data
table, the exchange number is incremented.

Using the error address


The error address allow the PLC to manage communication in the event of a problem, for example that its
storage buffer is full.
If the PLC sets a timestamp block with the error address, as configured in the device configuration in C-
CURE Building Management System, the driver will trigger a single shot read for all the timestamp-enabled
frames configured for the equipment. This allow the variables to be refreshed with the most recent values.
Once the single shot is complete, the frames are no longer polled and the refresh using the timestamp mech-
anism resumes.
When one of the addresses in the Timestamped Management frame corresponds to the error
address, the data field has no meaning.
When using S7, the trigger to cease timestamp operation is bit 0 of the word you specified at the
equipment configuration, for example bit 0 of DB5.DBW8.

- 462 -
Using Timestamped Data with Redundant Servers
When using timestamped data and redundant servers you can either use one or two timestamped data
stacks in the equipment.

Using a single timestamped data stack in the equipment


With this configuration, only the active server acquires data from the timestamped data table in the equip-
ment. If the active server fails, it is essential to force synchronization of the data on the new active server.
To do this all the time data frames configured as timestamped must be temporarily forced to use the normal
polling mechanism. You can do this using the SCADA Basic instruction CIMWAY, mode SENDMSG.
CIMWAY("SENDMSG","MyNetwork","SwitchAllToPollingMode");
When all of the frames have been read once, the timestamp mechanism is automatically restarted.

Using two timestamped data stacks in the equipment


Using two timestamped data stacks (tables) in the equipment helps ensure that timestamped data is not lost
during the changeover from one server to another.

In this example, Station 1 is the active server. At startup, Station 1 initially polls all the frames to get the
current values. Once this initialization phase is complete, the data exchanges revert to the timestamped
method. The Communications Manager (CimWay) copies the variable values, and their timestamps, from its
cache to the Variable Manager (VAR). The Variable Manager in Station 2 is also provided with these values
via the local and remote Network Managers (LAN)
Station 2 is the passive server. At startup, it behaves in the same way as the active server except that the
values and timestamps in the cache of the Communication Manager are not copied to the Variable Manager.
The same values and timestamps will be present in both tables on the equipment and hence will be the same
in both Communication Manager caches.
Changeover from Station 1 to Station 2 as the active server takes place as follows.
Initially there is a changeover phase when:

l The two stations are no longer synchronized.


l Each station updates its own Variable Manager.

When Station 2 is fully active and Station 1 is passive.

l Both stations are visible on the local area network.


l Station 1 updates its Communication Manager cache exchanging data with the equipment.
l Station 1's Variable Manager is updated from Station 2 via the local and remote Network Managers.

- 463 -
Block Structures

- 464 -
Timestamped Data - Data Table and Block Structures for Open Modbus
The timestamped data stack must be located in the holding (output) register table. The table is read using
function code 3 and the single word reply is written using function code 6.

Timestamped data table structure


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W Exchange number Fbit Cbit Number of blocks (N)
Word W+1 Start of first block

Word W+1 Start of last block


+(N-1)*T
T = size of timestamped block
N = Number of blocks as specified by the timestamp frame's Quantity of data property.
W = The starting address as specified by the timestamp frame's Starting address property. Show picture

Change in behavior caused by the Cbit (Bit 6 of the first word)


If set to 1 then the driver transfers the timestamp block directly to C-CURE Building Management System’s
archived data. While it is set the driver also refreshes the real time value by polling of the timestamp
enabled frame, thus keeping the real time variable up-to-date.

Change in behavior caused by the Fbit (Bit 7 of the first word)


If set to 1 then the driver expects that the exchange number is incremented by the PLC. In that case, the
driver only processes the block if the exchange number changes from one poll to the next. Otherwise, trans-
mitted data are ignored.

Timestamped block with short (12 bit) address (T = 6)


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W+1 Type Address
Word W+2 Value1**
Word W+3 Value0*
Word W+4 Year Month Day
Word W+5 Hour Minute
Word W+6 Millisecond

Timestamped block with long (24 bit) address (T = 7)


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W+1 Reserved Type Address (bits 23 - 16)
Word W+2 Address (bits 15 - 0)
Word W+3 Value1**
Word W+4 Value0*

- 465 -
Word W+5 Year Month Day
Word W+6 Hour Minute
Word W+7 Millisecond

Timestamped block with C.E.I. (T = 8)


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W+1 Reserved Type Reserved
Word W+2 Address (bits 15 - 0)
Word W+3 Value1**
Word W+4 Value0*
Word W+5 Reserved 0 Year
Word W+6 0 0 0 0 Month 0 0 0 Day
Word W+7 Hour Minute
Word W+8 Millisecond
* Value0 is the least significant word when reading a 32 bit value (real and double word) and the only sig-
nificant word when reading 16 bit frames (word, byte and bit).
** Value1 is the most significant word when reading 32 bit value (real and double word)) and the offset
when reading bits.

Coding of the Type field


Type Data type
0 Input status
1 Not used
2 Input registers
3 Not used
4 Not used
5 Input registers as bits (Obsolete)
6 Input registers as bits (See rule below)
7 Real or Double Word input
8 Coil status
9 Not used
10 Holding registers
11 Not used
12 Not used
13 Holding registers as bits (Obsolete)
14 Holding registers as bits (See rule below)
15 Real or Double Word Input/Output

Rules for coding the address field for accessing a bit within a word

l The Word address is coded in the field Address.


l The offset of the bit is coded in the field Value1.
l Example - Wordbit 5 of Word 7220 will be coded as: Address = 7220 and Value1 = 5.

Coding of the date and time fields


Field Coding
Year 0 to 99 (The number of years since 1980)
Month 1 to 12
Day 1 to 31
Hour 0 to 23
Minute 0 to 59
Millisecond 0 to 59999

- 466 -
There is no field for seconds. Instead, the seconds are included with the milliseconds.

- 467 -
Timestamped Data - Block Structures for SAIA SBUS TCP/IP and Serial
Interchange stack
The interchange stack for timestamped data is stored in table R.

where:

T = size of timestamped block


N = Number of blocks as specified by the timestamp frame's Quantity of Data property.
W = The starting address as specified by the timestamp frame's Starting address property.

Timestamped block structure with C.E.I. (T = 4)

* Value0 corresponds to the low-order part of a 32-bit value (real or double word) and to the only significant
word when data are read as 16-bit values from a frame (word, byte or bit).
** Value1 corresponds to the high-order part of a 32-bit value (real or double word) and to the bit offset in
the byte of bit-type data.

Field type data


Code for field type data
Code Data Type
0 Bit in F.
1 Bit in I
2 Bit in O.
3 Bit in R.
27 Real in R.
33 Double in T.
34 Double in C.
35 Double in R.

Value ranges of the other


fields
Year 0 to 99 (number of years since 1980).
Month 1 to 12.
Day 1 to 31.
Hour 0 to 23.
Minute 0 to 59.
Millisecond 0 to 59999.

- 468 -
Timestamped Data - Data Table and Block Structures for Siemens S7
This topic describes how to exchange timestamped data between the PLC and C-CURE Building Management
System. Switching between cyclic and event mode for the frame ticked as T_stamped is automatically
triggered by a bit in the PLC. The trigger is the bit (offset 0) of the word you specified when configuring the
equipment. In the example below it is bit 0 of DB5.DBW8. Show picture

To start or stop the timestamping mechanism, you need to set this bit in a S7_CEI block in the timestamped
table. The timestamped table is a held in a dedicated DB. The DB number can be different to the one for the
Error Address.

Functionality
Timestamped data is exchanged between slave and master using the S7_CEI frame.
Master Network Slave
—> Reading of the timestamped data table —>
<— Response to Read request <—
If the number of block is greater than zero, the protocol reads all of the blocks set in the PLC and then does
the following.
Master Network Slave
—> Set the number of blocks to 0 and send the exchange number —>
<— Acknowledge the Write <—
If the exchange number returned by the PC is wrong, the PLC has to send the same exchange as
before. (The number could be wrong because the slave received an incorrect acknowledgement.)

Timestamped data table structure


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W Exchange number Number of blocks
Word W+1 First block (size 8)

Word W+1 Nth block (size 8)


+(N-1)*8
N = The number of blocks as specified by the timestamp frame's Quantity of data property.
W = The starting address as specified by the timestamp frame's Starting Address property. Show picture

In the picture above:

l The exchange number and number of blocks are in word 0 of DB1.


l The actual size of the frame is 1 + (8 * 15) = 121 words.
l At each poll, a maximum of 15 data blocks can be handled.

- 469 -
In the case of IP-ISO S7, there is no limit to the size of the frame (unlike Modbus IP). However, in order for
the frame to be contained within a single IP packet, it is recommended that the number of blocks does not
exceed 30.

S7_CEI block structures


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W+1 Data Type DB Number
Word W+2 Address
Word W+3 Value1**
Word W+4 Value0*
Word W+5 Reserved 0 Year
Word W+6 0 0 0 0 Month 0 0 0 Day
Word W+7 0 0 0 Hour 0 0 Minute
Word W+8 Millisecond
* Value0 is the least significant word when reading a 32 bit value (Real and Double Word).
** Value1 is the most significant word when reading a 32 bit value (Real and Double Word).

Coding of the data Type field

Coding of the data Type field

Type Data Type Type Data type


1 Bit in DB 24 Real in DB
2 Bit in MW 25 Real in MW
3 Bit in EW 26 Real in EW
4 Bit in AW 27 Real in AW

8 Byte in DB 32 Double in DB
9 Byte in MW 33 Double in MW
10 Byte in EW 34 Double in EW
11 Byte in AW 35 Double in AW

16 Word in DB
17 Word in MW
18 Word in EW
19 Word in AW

Coding of the date and time fields


Field Coding
Year 0 to 99 (The number of years since 1980.)
Month 1 to 12
Day 1 to 31
Hour 0 to 23
Minute 0 to 59
Millisecond 0 to 59999

There is no field for seconds. Instead, the seconds are included with the milliseconds.

- 470 -
Timestamped Data - Data Table and Block Structures for GE Fanuc SRTP
This topic describes how to exchange timestamped data between the PLC and C-CURE Building Management
System.

Functionality
Timestamped data is exchanged between slave and master using the TS_Exchange frame.
Master Network Slave
—> Reading of the timestamped data table —>
<— Response to Read request <—
If the number of block is greater than zero, the protocol reads all of the blocks set in the PLC and then does
the following.
Master Network Slave
—> Set the number of blocks to 0 and send —>
the exchange number
<— Acknowledge the Write <—
If the exchange number returned by the PC is wrong, the PLC has to send the same exchange as
before. (The number could be wrong because the slave received an incorrect acknowledgement.)

Timestamped data table structure


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W Exchange number Number of blocks
Word W+1 First block (size 8)

Word W+1 Nth block (size 8)


+(N-1)*8

TS_Exchange block structures


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word W+1 Unused Data Type
Word W+2 Address
Word W+3 Value1
Word W+4 Value0
Word W+5 Reserved 0 Year
Word W+6 0 0 0 0 Month 0 0 0 Day
Word W+7 0 0 0 Hour 0 0 Minute
Word W+8 Millisecond

Data Type field

Type Data Type Type Data type


1 33 Double in R
2 Bit in M 37 Double in AI
3 Bit in S 38 Double in AQ
4 Bit in T
5 Bit in I
6 Bit in Q
7 Bit in SA

17 Word in R 25 Float in R
21 Word in AI 29 Float in AI
22 Word in AQ 30 Float in AQ

- 471 -
Address field specifies the address of the timestamped data. In the case of bits, the offset is specified in the
field Value1.

Value1 is the highest word of a 32 bit value (float or double). For a Wordbit, Value1 represents the bit offset
within the word with the address of Address.
Value0 is the lowest word of a 32 bit value (float or double) and all other values (bit and word).

- 472 -
Applicom

- 473 -
About Applicom

- 474 -
What is Applicom?
Applicom is a range of intelligent industrial communication servers manufactured by Molex. Each server
comprises an intelligent PC card, a software suite for configuration and testing, and the application inter-
face. The available application interfaces include OPC, DDE and an API (Application Programmers Interface)
The Applicom driver in C-CURE Building Management System uses the API.
The Applicom application interface is generic and independent of the protocol and card used. The card and
its firmware translates the generic messages from the application interface to those specific to the protocol
used allowing developers to configure their application without specific knowledge of the protocol and net-
work used.
Applicom cards are intelligent and run their own real-time operating system. Once a card is configured all
communication with the industrial network is handled autonomously, requiring no resources from the host
PC, and the resulting information is placed in a memory area from where it is retrieved by the application
interface.

The advantage of using an Applicom card


The advantage of using an Applicom card for communication can be summarized as follows.

l The card provides a generic interface, independent of the industrial network or protocol used. As new
networks and protocols are added, the application will automatically support them.
l The card handles all communication autonomously without using any resources from the host PC

Applicom card range and supported protocols


The following list was correct as of January 2006. Please check with the manufacturer for the latest inform-
ation.
Card Supported networks
PCu1000 1x serial RS232 or RS485
PCi1000 1x serial RS232 or RS485
PCi2000 2x serial RS232 or RS485
PCi4000 4x serial RS232 or RS485
PCi1500PFB 1x Profibus 1.5Mbps
PCu1500PFB 1x Profibus 1.5Mbps
PCi1500S7 1x Profibus 1.5 Mbps (S7 protocol only)
PCu1500S7 1x Profibus 1.5 Mbps (S7 protocol only)
PCu2000ETH 1x Ethernet + 1 x serial RS232 or RS485 or 1 x Profibus 1.5Mbps
PCi2000FIP 1x FIP
PCi2000MBP 1x Modbus plus + 1 x serial RS232 or RS485
PCi2000PFB 1x Profibus 12 Mbps + 1 x serial RS232 or RS485

Network Supported protocols


Serial 3964/3964R, AS511, Datalink, DF1, Modbus, PPI, PPI+, S-Bus, SNP-X, SUCOMA,
SYSMAC-WAY, TI-Dir & Uni-Telway
Ethernet Siemens Industrial Ethernet ISO & Schneider Ethway
Ethernet TCP/IP Alnet II, Alstom SRTP, Allen-Bradley EtherNet/IP, GE Fanuc SRTP, Mitsubishi Melsec,
Omron Fins, Send/Receive on UDP, Siemens Industrial Ethernet, Schneider Modbus
TCP & Schneider Uni-TE
FIP Fipway
Profibus FDL for S5, Send/Receive on FDL, FMS, MPI, DP & S7
Modbus Plus Modbus Plus

- 475 -
How does Applicom Work with C-CURE Building Management System?
Before C-CURE Building Management System is able to use an Applicom card, the card must first be con-
figured and initialized using the Applicom configuration software (known as the Console). This configuration
identifies the card type, the network and protocol, and the equipment on the network. The card configuration
is volatile and the card must be initialized each time the PC is restarted.

What happens during configuration?


Communication with the Applicom card is configured in the same way as any other equipment com-
munication driver. During configuration, you create a network, nodes, and frames.

l The configuration of the network selects Applicom driver.


l The configuration of the nodes selects:
l The number of the Applicom card to use (You can have more than one in a PC).
l The channel on the card.
l The logical equipment number.
l The configuration of the frames creates corresponding cyclic functions in the Applicom server and
selects the area in the Applicom database where the data from those frames is to be placed.

One Applicom card can have a maximum of 255 cyclic functions.

What happens at run time?


Once the Applicom card has been configured (first using the Applicom Console and then by C-CURE Building
Management System) it automatically polls the equipment using the cyclic functions created by frame con-
figuration. The resulting information is placed in the internal Applicom database. This process is entirely
autonomous and required no intervention from the operating system or C-CURE Building Management Sys-
tem.
When there is a change in the data in the Applicom database, a message is sent to the Communication Man-
ager, which then reads the data and updates the values of the corresponding variables. C-CURE Building Man-
agement System does not poll the Applicom database periodically.

What happens if I stop the communication in C-CURE Building Management System?


If you stop the communication, the Communication Manager sends a message to the Applicom Server to
temporarily suspend the cyclic functions.

- 476 -
Installing and Configuring an Applicom Server
Please refer to the documentation supplied with the Applicom software for full information on installing and
configuring the product. Briefly, the steps are as follows.

1. Install the Applicom software suite. It is available on the Molex web site and includes drivers for the
selected operating system, the configuration Console, protocols, application interfaces and test tools.
The installation process creates a folder of shortcuts on the Windows' desktop.
2. Install the card in the PC. The cards are plug and play and so the operating system should auto-
matically detect the card and load the correct driver.
3. Configure the card using the Applicom Console. Show picture

4. Download the configuration to the card.


5. Test the communication using one of the test tools supplied by Applicom.

The Applicom card configuration is volatile and must be reloaded each time the PC is restarted. For
information on how to automate this process, see the Applicom documentation.

Summary of main Applicom tools


Icon Description
Configuration console. The main tool for configuring, initializing and testing an Applicom card
Initialization tool. Used to download the configuration to the card.
VisuCyc tool. Used to display the cyclic functions that are running on the card.
ReadWait tool. Used to do a simple read from the equipment. Very useful for testing basic com-
munication is operating.
WriteWait tool. Used to do a simple write to the equipment. Very useful for testing basic com-
munication is operating.
Diagnostic tools - various. Applicom supply a number of different diagnostic tools for the different
network types.

At the time of writing, the most recent Applicom software suite was version 4.3.

- 477 -
Configuring C-CURE Building Management System for Applicom

- 478 -
Applicom - Network Configuration
1. Open the Select Communication Objects dialog.
2. In the Network column, double-click on an existing network name or on *CREATION* to open the dia-
log Network Board and Protocol Selection.
3. Select the following values.
Network board - MULTIPROTOCOL
Protocol - Applicom Access
4. Click on OK to open the Network Parameters dialog. In the drop-down field for Network Name, enter
the name by which the network will be known within C-CURE Building Management System's con-
figuration.
5. In the Network Parameter dialog, apply or confirm the following settings. Show picture

Property Settings
Enable reserved zone access Allow C-CURE Building Management System access to the reserved area of
the Applicom database. The reserved area starts at 32000 and is used intern-
ally by the Applicom card.
Last address used The highest address used by C-CURE Building Management System to store
the cyclic function status words. Normally set to 31999 (immediately below
the reserved area).
Activate on start-up Tick to enable the network to start when the Communication Manager starts.

6. Click on the Validate button to register the settings, then close the dialogs.

You configure only one Applicom access network even if your PC has more than one Applicom board.

- 479 -
Node configuration

- 480 -
Applicom - Node Configuration in General
1. Select the menu Configure.Communication.Equipment. In the Select Communication Objects dialog,
select the Applicom network previously configured.
2. In the Node column, double-click on *CREATION* for a new node) to open the Node Parameters dialog
showing the settings of the required node.
3. In the Node Parameter dialog, apply or confirm the following settings. Show picture

Property Meaning
Equipment Name for the node within C-CURE Building Management System
Equipment type Select the equipment type. See the topic Selecting the equipment type.
Virtual Not used.
The number of the Applicom card. If there is one card in the PC this is set to 1. Range 1
Card number
to 4.
The number of the physical channel on the Applicom card to which the equipment is con-
Channel number nected. Applicom cards have up to four channels (depending on the card type). Range 0
to 3.
Logical equipment
The logical number assigned to the equipment when the Applicom card was configured.
number
Node time-out Leave set to the default of 1 second.
Activate on start-up Tick to enable starting of the equipment when the network is started.

4. Click on the Validate button to register the settings, then close the dialogs.

- 481 -
Applicom - Equipment Type
C-CURE Building Management System supports the following equipment types for Applicom.

LOCAL ACCESS
Provides access to the Applicom database only and does not create any cyclic functions. Used only when the
Applicom card has been configured as a slave, or access is required to the Applicom watchdog facility. When
using LOCAL_ACCESS the node properties Channel number and Logical equipment number are not used.

DISTANT ACCESS
Included for backwards compatibility only. Superseded by type FREE and FREE_DEC

FREE and FREE_DEC


Provides access to all protocols and equipment supported by Applicom using generic addressing.
Equipment type FREE uses hexadecimal addressing, equipment type FREE_DEC uses decimal addressing.

Protocol specific
C-CURE Building Management System supports the following pre-configured equipment (protocol) types for
Applicom.

l X-Bus - For equipment supporting the Modbus or Jbus protocol.


l Simatic S5 - For equipment supporting the Sinec_L2 protocol.
l Simatic S7 - For equipment supporting MPI or Simatic_S7 protocols.
l Sinec H1 - For Siemens equipment supporting the H1 protocol.
l Texas H1 - For Texas Instruments equipment supporting the H1 protocol.
l TSX 17/47-20 & TSX 47/107-40 - For equipment supporting the Unitelway protocol

- 482 -
Frame configuration

- 483 -
Applicom - Frame Configuration in General
1. In the menu, select Configure.Communication.Equipment. In the dialog, Select Communication
Objects, select the Network and Node names.
2. In the Frame column, double-click on *CREATION* to open the Frame Parameters dialog.
3. Apply or confirm the following settings. Show picture

Property Meaning
Frame Name for the frame within C-CURE Building Management System
Frame format The supported formats are Bit, Byte, Word, Real and Double.
Access grant Specify whether the frame is read only, write only or read/write.
Select the first location in the Applicom database in which the result of the cyclic
Local address function created by the frame is placed. The local address must be different for each
frame. The end location is automatically set when the Distant Address is configured.
Select the range of data in the equipment for this frame. See the book on address
Distant Address
selection.
Priority mode In a queue of write requests, the priority frame is processed first.
Tick to enable a frame to be scanned periodically. For a write only frame, this is nor-
Cyclic access
mally not set.
Scan rate The rate at which the frame is to be polled.

4. Click on the Validate button to register the settings, then close the dialogs.

The Distant Access properties are not required for the LOCAL ACCESS equipment type.

Each frame that you configure creates one cyclic function on the Applicom card. One Applicom card
can have a maximum of 255 cyclic functions.

- 484 -
Address selection

- 485 -
Applicom - Understanding Applicom Addressing
The Applicom application interface is generic and independent of the protocol and card used. The protocol
that is in use on the Applicom card translates the generic addressing into addressing specific to the equip-
ment.
When you use Applicom with C-CURE Building Management System, you can use either the FREE equipment
type or one of the pre-configured equipment types if there is one that matches your equipment and protocol.
The limitations on address range can be found in the protocol specific help supplied with the
Applicom card.

Using the FREE equipment type


If you use the FREE equipment type then, when configuring a frame, you must select the appropriate generic
address mnemonic and calculate the starting address for each frame. The address mnemonic determines
the Applicom function that will be used, and the address start and range determines the range of data that
will be read.
The conversion from the generic Applicom functions to those specific to each protocol, and the algorithm for
calculating the address, can be found in the protocol specific help supplied with the Applicom card.
Using the FREE equipment type means that you can access ANY of the protocols and corresponding equip-
ment supported by Applicom.
C-CURE Building Management System supports two types of Free equipment. FREE (addressing in
hexadecimal) and FREE_DEC (Addressing in decimal).

Using one of the specific equipment types


Some of the common protocols supported by Applicom have a corresponding equipment type in the node con-
figuration. If you select a specific equipment type then when you configure the frames the conversion from
the generic Applicom functions to those specific to the protocol, and the calculation of the address is done
automatically by C-CURE Building Management System. Show picture

- 486 -
Applicom - Address Selection when Using the FREE Equipment Type
The following table lists C-CURE Building Management System's address mnemonics and the corresponding
Applicom functions when using the FREE equipment type. The address mnemonic determines the Applicom
function that will be used, and the address start and range determines the range of data that will be read.
The conversion from the generic Applicom functions to those specific to each protocol, and the algorithm for
calculating the address, can be found in the protocol specific help supplied with the Applicom card.
Address Frame Access
Mnemonic Format Read Write Description
BIT Bit READPACKBIT WRITEPACKBIT Internal bits
IBIT Bit READPACKIBIT Input bits
QBIT Bit READPACKQBIT WRITEPACKQBIT Output bits
WORD-BIT Bit READWORD WRITEWORD Internal words
IWORD-BIT Bit READIWORD Input words
QWORD-BIT Bit READQWORD WRITEQWORD Output words
BYTE Byte READBYTE WRITEBYTE Internal bytes
IBYTE Byte READIBYTE Input bytes
QBYTE Byte READQBYTE WRITEQBYTE Output bytes
WORD-BYTE Byte READWORD WRITEWORD Internal words
WORD Word READWORD WRITEWORD Internal words
IWORD Word READIWORD Input words
QWORD Word READQWORD WRITEQWORD Output words
FWORD Float READFWORD WRITEFWORD Internal floats
DWORD Double READDWORD WRITEDWORD Internal double words
For example, if you used the FREE equipment type for Simatic S7 to read bits from data block 10 starting
from byte 8, you would use the BIT mnemonic with a starting address of 5242944. Show picture
See the topic Example of generic addressing when using Simatic S7 for how the starting address was cal-
culated.

Using the Free equipment type means that you can access ANY of the protocols and corresponding equip-
ment supported by Applicom.

Options when using Float or Double frame formats

l Coding of the address in the frame - Selection of the type addressing used in the frame.
Byte - the address of the frame is interpreted as a byte offset. For example, a start address of 5 would

- 487 -
read data starting at byte 5.
Word - the address of the frame is interpreted as a word offset. For example, a start address of 5
would read data starting at byte 10.
Double - the address of the frame is interpreted as a double offset. For example, a start address of 5
would read data starting at byte 20.
l Inversion least/most - Inverts the most and least significant word. If un-ticked then Intel format is
used (Most significant word first, least significant word second).

- 488 -
Applicom - Example of the use of Generic Addressing when using Simatic S7
The following example shows the use of generic addressing when using the Simatic S7 (Siemens) protocol.
The same principle applies at all protocols supported by Applicom, although the conversion from the
Applicom generic functions to those specific to the protocol will be different for each protocol.
The following table has been generated using information taken from the Applicom help for Simatic S7.
C-CURE
Building Man-
agement Sys-
tem
S7 Address Frame Address Applicom func-
tion
Table Calculation Format Mnemonic Read Write
DB X*524288+Y*8+Z Bit BIT READPACKBIT WRITEPACKBIT
M Y*8+Z Bit BIT READPACKBIT WRITEPACKBIT
E Y*8+Z Bit IBIT READPACKIBIT
A Y*8+Z Bit QBIT READPACKQBIT WRITEPACKQBIT
DB X*65536+Y Byte BYTE READBYTE WRITEBYTE
M Y Byte BYTE READBYTE WRITEBYTE
E Y Byte IBYTE READIBYTE
A Y Byte QBYTE READQBYTE WRITEQBYTE
DB X*65536+Y Word WORD READWORD WRITEWORD
M Y Word WORD READWORD WRITEWORD
E Y Word IWORD READIWORD
A Y Word QWORD READQWORD WRITEQWORD
DB X*65536+Y Float FWORD READFWORD WRITEFWORD
M Y Float FWORD READFWORD WRITEFWORD
DB X*65536+Y Double DWORD READDWORD WRITEWORD
M Y Double DWORD READDWORD WRITEDWORD
X = DB (data block) number
Y = Byte number
Z = Index of the bit within the byte
The Simatic S7 protocol uses byte addressing.

Examples

l Read 32 bits from DB2 starting at byte 0.


The address mnemonic is BIT.
The starting address is 2*524288 = 1048576.
In the Distant Address configuration dialog of C-CURE Building Management System you enter:
Address mnemonic - Bit
Quantity of data - 32
Starting address - 1048576
l Read 128 bits from DB10 starting at byte 8.
The address mnemonic is BIT.
The starting address is 10*524288 + 8*8 = 5242944.
In the Distant Address configuration dialog of C-CURE Building Management System you enter:
Address mnemonic - Bit
Quantity of data - 128
Starting address - 5242944
l Read 12 words from DB6 starting at bye 32.
The address mnemonic is WORD.
The starting address is 6*65536 + 32 = 393248.
In the Distant Address configuration dialog of C-CURE Building Management System you enter:

- 489 -
Address mnemonic - Word
Quantity of data - 12
Starting address - 393248

- 490 -
Applicom - Example of the use of Generic Addressing when using Allen Bradley
DF1
The following example shows the use of generic addressing when using the Allen Bradley DF1 protocol. The
same principle applies at all protocols supported by Applicom, although the conversion from the Applicom
generic functions to those specific to the protocol will be different for each protocol.
The following table has generated using information taken from the Applicom help for Allen Bradley DF1.
C-CURE
Building Man-
agement Sys-
tem
PLC Address Frame Address Applicom
function
Table Calculation Format Mnemonic Read Write
B X*16384+W Bit BIT READPACKBIT WRITEPACKBIT
B X*16384+Y*16+Z Bit BIT READPACKBIT WRITEPACKBIT
N X*16384+Y Word WORD READWORD WRITEWORD
N X*16384+Y Double DOUBLE READDWORD WRITEDWORD
F X*16384+Y Float FLOAT READFWORD WRITEFWORD
W = Bit number
X = Table number
Y = Word in table
Z = Bit in word

Examples

l Read bits from B2 starting at word 0


The address mnemonic is BIT
The starting address is 2*16384 = 32768
l Read bits from B10 starting at word 8, bit 4
The address mnemonic is BIT
The starting address is 10*16384 + 8*16 + 4 = 163972
l Read words from N6 starting at word 32
The address mnemonic is WORD
The starting address is 6*16384 + 32 = 98335

- 491 -
Applicom - Address Selection when Using the LOCAL ACCESS Equipment Type
The LOCAL ACCESS equipment type provides access to the Applicom database without creating any cyclic
functions and is used primarily when the Applicom card has been configured as a slave, but can also be used
to manage the Applicom card.
Address Frame Access

Mnemonic Format Read Write Description


S Bit Yes Yes Database bits
S Byte Yes Yes Database words as bytes
PRM Byte No Yes Parameter command
S Word Yes Yes Database words
INFO Word Yes Yes Status information
WATCHDOG Word No Yes Applicom watchdog
S LMsb Float Yes Yes Database words as float. Word format - least.-
most.
S MLsb Float Yes Yes Database words as float. Word format -
most.least.
S LMsb Double Yes Yes Database words as double. Word format - least.-
most.
S MLsb Double Yes Yes Database words as double. Word format -
most.least.

Using the WATCHDOG address


All Applicom cards include a single volt free contact that is accessible from the rear of the card. The con-
tact's primary use is as a watchdog providing an indication to the outside world of the health of the com-
munications. However, as it is programmable, it also has other uses such as driving an audible alarm.
The watchdog feature is accessed using a write only word frame of size 1 with the WATCHDOG address mne-
monic. The frame must be linked to a single register variable with a range -1 to 65535. The functionality is
as follows.

l Writing a value of 0 forces the contact to open.


l Writing the value -1 forces the contact to close.
l The writing of value X forces the contact to close for X seconds.

Using the INFO address


A word frame using the INFO address mnemonic provides status information about the card.

l Word 1 - Event stack full counter. Increments by 1 if the event stack reaches 4096.
l Word 2 - Counter for the number of events received by the protocol.
l Word 3 - Number of words available in the Applicom FIFO.

Using the PRM address


You should only use this feature if advised to do so by Technical Support.

A byte frame using the PRM address mnemonic allows C-CURE Building Management System's application to
send a command to its Communication Manager to modify the number of permitted events in 100 ms.

1. Configure a byte format frame using the PRM address mnemonic with write access.
2. Create a text variable with a size of 30 characters and link it to the first byte of the frame.
3. Force the text using a SCADA Basic program to CW,NBEVEN,X where x is a number between 20 and
400 in multiples of 20.

The default value for the number of permitted events in 100 ms is 60.

- 492 -
Applicom - Driver status
Any errors returned by C-CURE Building Management System's Applicom driver appear in the driver status
associated with each frame. An exhaustive list of the errors generated by Applicom is provided in the help
files supplied with the Applicom card.
The driver status values are presented in hexadecimal in C-CURE Building Management System but
in decimal in the Applicom Help.

- 493 -
Legacy Protocols
The following data acquisition drivers were inherited from earlier versions of C-CURE Building Management
System and are now legacy.

l The binary files required to use them may no longer be delivered as part of the product.
l Their use may depend on the availability of a manufacturer-specific library that may no longer be sup-
ported.
l They may not have been validated for use with the current C-CURE Building Management System ver-
sion but may still be in use on legacy systems.

The documentation for the following drivers is not available in this online help, but technical
resources exist.
Please contact Technical Support to check for availability and validation before using any of these.

Protocol Manufacturer
3964R Siemens
Elinet Eliop
ESP Alstom
FA2J/FA3S Idec
Fins Omron
FX Mitsubishi
K Klockner Moeller
Micro3 Idec
MelsecA Mitsubishi
Modbus Plus Schneider Electric
Ness Jumo
Perax Perax
Pupp Matrix Control
RSLinx Rockwell Automation
Sofbus Sofrel
SucomA Klockner Moeller
Sysmacway Omron
Ethway Schneider Electric

- 494 -
DDE

- 495 -
Overview of DDE
Dynamic Data Exchange (DDE) is a method used by Windows to enable two applications to communicate
with each other, that is to exchange data. The two applications can be on the same computer or on different
computers connected using a Local Area Network (LAN).
The two applications using DDE to exchange data are said to be involved in a DDE conversation. The applic-
ation that initiates the conversation is called a DDE client. The application that replies to a DDE client is
called the DDE server. In the context of this explanation C-CURE Building Management System is the client.
The disadvantage is that DDE was not designed to exchange large amounts of information and as a con-
sequence the performance of communications using DDE can be poor.
In general DDE has been superseded by OPC which, unlike DDE, was designed specifically for the
industrial arena. However DDE is still supported, its only use now being for communication with leg-
acy devices.
DDE configuration is accessed from the Application Explorer - <Project>.Communication.Data acquis-
ition.DDE

- 496 -
Managing DDE in the Application Explorer

Tasks applicable to DDE


When the DDE folder is selected.
Icon Task Description
Settings Display the general DDE settings dialog.
New DDE con-
Create a new DDE conversation.
versation
When a DDE conversation is selected.
Icon Task Description
Remove Remove a DDE conversation.
Properties Display the DDE conversation properties dialog

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior, and in particular any restrictions, when using cut and
paste, or copy and paste, on configuration objects in the DDE folder.
DDE object Behavior
Conversation The pasted Conversation is given a unique name.
The mapping of any variables is not duplicated.

- 497 -
DDE Settings
The DDE settings are accessed from the Application Explorer by selecting <Project>.Communication.Data
acquisition.DDE and choosing the Settings command from the task list. Show picture

l System variables
l No automatic generation of system variables - The DDE system variables, which reflect the
status of any DDE conversations, are not created automatically whenever a new DDE con-
versation is created.

- 498 -
How to Create a DDE Conversation
Each DDE conversation is defined by a DDE server and a topic within that server.

1. Select the DDE folder in the Application Explorer configuration tree and, from the task list, select New
DDE conversation. The DDE Conversation dialog opens. Show picture

2. In the Alias text box, enter an alias for the DDE conversation.
3. Enter a description of the conversation. The description appears in the contents pane of the Application
Explorer and can be useful to identify the conversation later. The description is optional.
4. Enter the name of the DDE server in the Application name field. This is the name by which the server
is known to the operating system.
5. Enter the name of the topic. See the documentation supplied with the DDE server for information
about topic naming.
6. Select the name of the activation bit. The activation bit is optional and may be used to start and stop
the conversation by the application.
7. To start the conversation automatically at startup, tick Activate at start-up.
8. Click OK to create the conversation and close the dialog or Apply to create the conversation leaving
the dialog open with access to the advanced properties.

- 499 -
DDE Conversation Advanced Options
The following options are all found in the Advanced tab of the DDE Conversation dialog. The default settings
are suitable for most DDE servers.

l Characteristics
l Server type - The type of DDE protocol supported by the specified server.
l Standard DDE. Standard DDE as specified by Microsoft. This is the default setting.
l Block DDE. Modified DDE specific to C-CURE Building Management System. Contact the
appropriate authority at your supplier for details.
l Block Alstom. Modified DDE specific to servers supplied by Alstom.
l Decimal separator - The decimal separator used by the DDE server for floating point variables.
l Read DDE conversation database - Read a dedicated file containing a list of pairs of aliases and
DDE items. If using this option the alias is used in the configuration instead of the DDE item. No
longer used and included for backwards compatibility only.
l Operating mode
l Wait for server busy - The delay before a repeat request is sent to a busy DDE server. After
three attempts, the request is abandoned until the reconnection period has expired. The default
is 3 seconds.
l Reconnection scan rate - The delay before an attempt to reconnect to the server is made. The
default is 30 seconds.
l Write time out - The maximum delay allowed for the server to acknowledge a write command.
The default is 15 seconds.
l Timeout synchronization of the variables on start-up - The period to wait for a valid value for
each of its DDE variables at start-up. If no valid value is received within this period, the variable
status is set to NS-COM. The default is 0 seconds.
l Read item on advise - If ticked, a read operation is performed on each of the DDE variables
after advising. Advising is the process that informs the DDE server that C-CURE Building Man-
agement System is interested in the variable. If the DDE server automatically provides a value
after an advise this option may be un-ticked.
l Networking
l Servers - The name of a server station list. For multi-station applications, the DDE conversation
will only be activated if the particular instance of the project is running on a station in the list.

- 500 -
DNP3

- 501 -
Overview of DNP3
DNP3 is a communication standard used mainly by the electricity and water utilities. DNP3 is a client/server
protocol operating over a number of different communication media. It supports both polling and unsolicited
data exchange.
A DNP3 network has Devices, Object Groups and Variations.

l A Device is physical field device such as an RTU (Remote Telemetry Unit) or IED (Intelligent Electronic
Device). A Device is identified on a network by its IP Address and its Link Address.
l Each Device has one or more Object Groups. An Object Group (also referred to as a Group or Object)
is an array of data points of similar types, for example analog inputs. The Group types are listed in the
DNP3 specification. Each Group is referenced by a unique group number that is specific to the data
type. For example, Group 1 is Binary Inputs (BI).
l Variations are a specific range of formats in which the data can be presented in each Group. For
example, analog inputs can be a 32 bit integer with flag, a 16 bit integer with no flags, etc.

C-CURE Building Management System's DNP3 configuration is accessed from the Application Explorer -
<Project>.Communication.Data acquisition.DNP3.
C-CURE Building Management System communicates with a DNP3 network using TCP/IP. It is the client and
the field devices are servers. By default, polling is used only to collect the initial state of servers, and for a
background integrity check. Normal data collection uses unsolicited data exchange.
The supported Groups and Variations are listed in the topic DNP3 implementation table.

Additional support for DNP3 is provided in SCADA Basic with the instruction MDNP3. The instruction
supports some of the more complex features of DNP3 such as Select Before Operate (SBO).

- 502 -
Managing DNP3 in the Application Explorer

Tasks applicable to DNP3


When the DNP3 folder is selected.
Icon Task Description
Settings Display the general DNP3 settings dialog.
New network Configure a connection to a DNP3 network.
When a DNP3 network is selected.
Icon Task Description
New device Add a device to the network.
Start network Start the connection to the network.
Stop network Stop the connection to the network.
Remove Permanently remove the configuration of the connection to the network.
Mapping Open the mapping dialog used to link variables to DNP3 items.
Properties Open the properties dialog for the network connection.
When a DNP3 device is selected.
Icon Task Description
Start device Start the connection to the selected device.
Stop device Stop the connection to the selected device.
Send a Ping to the device to check its status. A command dialog opens during
Ping
the Ping process displaying the results.
Synchro command Send a DNP3 Time Synchronize command to the selected device.
Reset command Send a Cold Reset command to the selected device.
Remove Permanently remove the configuration of the selected device.
Details Displays the device manufacturer's details in a dialog. Show picture
Properties Open the properties dialog for the selected device.
Activate the device. Only of use when a main and standby device have been con-
Activate device
figured.

- 503 -
You must check that there are no process or safety issues before sending a Cold Reset or Time Syn-
chronize command to a device.

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior, and in particular any restrictions, when using cut or
copy and paste on configuration objects in the DNP3 folder.
DNP3 object Behavior
Network The pasted Network is given a unique name.
Any subordinate Devices are duplicated using the original name.
The mapping of any variables is not duplicated.
Device The pasted Device is given a unique name.

- 504 -
DNP3 General Settings
The DNP3 General Settings are accessed from the Application Explorer by selecting <Pro-
ject>.Communication.Data acquisition.DNP3 and choosing the Settings command from the task list. Show
picture

l Monitoring
l Use the local timestamp upon device reconnection - Use C-CURE Building Management System’s
timestamp for the first value received after a device is re-connected.
l Binary Input, Counter, Analog Input, Analog Output
l Status for... - Define how the status of variables should be set in the event that certain
flags are associated to the values received from devices. You can choose either that the
quality remains unchanged or be set to invalid. The configuration set here affects all vari-
ables that have a DNP3 source. It is not possible to change the configuration of individual
variables.
l Time tagging - The default setting for the time tagging of all variables with a DNP3 source. The
default setting is applied when a variable is created but can be changed from each variable's
advanced properties.
l Not time tagged - Use C-CURE Building Management System's time for the timestamp of
variables.
l Time tagged - Use the time tag from the DNP3 event for the timestamp of variables.
l Control
l Control relay output block (CROB)
l Default method - The default method, either Direct operate, Direct operate no ack or
Select before operate, used for CROB commands.
l Analog output control block (AOB)
l Default method - The default method, either Direct operate, Direct operate no ack or
Select before operate, used for AOB commands.

- 505 -
Configuring a DNP3 Network
A DNP3 Network object in C-CURE Building Management System configuration represents and provides
access to, the physical connection to a DNP3 network. The configuration is accessed from the Application
Explorer - <Project>.Communication.Data acquisition.DNP3.

Adding a network

1. Select the DNP3 folder in the Application Explorer and, from the task list, select New Network. The
DNP3 Network dialog opens. Show picture

2. In the Name text box, enter the name of the network. You can accept the suggested default or enter
one of your own.
3. Enter a description of the network. The description appears in the contents pane of the Application
Explorer and can be useful to identify the network later. The description is optional.
4. To activate the network connection at startup, tick Activate at start-up.
5. If you are configuring a multi-station application, select the Advanced tab and select the Servers list.
The network will only be activated on those stations named in that list.
6. Click on OK to confirm the configuration and close the dialog.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the network. Only use
this if advised to do so by your support agency.

- 506 -
Adding Devices to a DNP3 Network
A DNP3 device object in C-CURE Building Management System configuration represents, and provides
access to, a DNP3 device.
A DNP3 device is identified by its IP Address and its Link address. In C-CURE Building Management System,
it is known by the Name that you give it during the configuration.

Adding a Device

1. Select a DNP3 network in the Application Explorer. From the task pane, select New Device to open the
Device dialog. Show picture

2. In the Name box, enter a name for the DNP3 device. You can either accept the default or enter one of
your own.
3. Enter the optional descriptive text in the Description box. The description is only used in the Applic-
ation Explorer.
4. In the IP Address box, enter the device's unique IP address.
5. In the Link address box, enter the device's unique link address.
6. Click on OK to confirm the configuration and close the dialog.

The Advanced tab


See the topic DNP3 Device advanced properties.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the device. Only use
this if advised to do so by your support agency.

- 507 -
DNP3 Device Advanced Properties
The DNP3 Device advanced properties are accessed for the DNP3 Device configuration dialog, Advanced tab.
Show picture

In the following explanation, C-CURE Building Management System is the master.

l Connection parameters
l TCP/IP parameters
l Local port - The port number for communication with the device. Default 20000.
l Remote port - The port number used by the device. Default 20001.
l TCP Mode
l Initiating end mode - Only the master can initiate the connection. This mode is sup-
ported by all devices and is the default.
l Dual end mode - The master or the slave (device) can initiate connection. This mode
is not supported by all devices.
l DNP3 parameters
l Local link address - The link address for the master.
l Link confirmation mode - The link confirmation mode required by the device. The default
is Never.
l Link offline retry period - The period at which the master will attempt to reestablish com-
munication if the device goes off-line. This includes attempting to open/reopen a channel
and/or issuing request status messages as appropriate for the current configuration.
Default 10 seconds.
l Application layer
l Response timeout - The period for which the master will wait for an answer from the
device before generating a timeout. Default 3 seconds.
l Enable unsolicited messages - Enable unsolicited messages from the device. This is the
normal mode of operation and ticked by default.

- 508 -
l Data exchange mechanisms - The response of the master to certain device conditions. IIN is an
acronym for Internal INdication.
l Upon reception of NEED TIME IIN (IIN1.4)
l Request a time synchronization - The master sends a Request Time Synchronization mes-
sage.
l Upon reception of LOCAL IIN on-then-off (IIN1.5)
l Integrity poll - The master sends an integrity poll.
l Upon reception of RESTART IIN (IIN1.7)
l Integrity poll - The master sends an integrity poll.
l Upon reception of BUFFER OVERFLOW IIN (IIN2.3)
l Integrity poll - The master sends an integrity poll.
l When a device comes online
l Execute an integrity poll - The master sends an integrity poll.
l Execute a time synchronization - The master sends a Request Time Synchronization mes-
sage.
l Clear RESTART IIN (IIN1.7) - The master sends a request to clear IIN1.7
l Refresh Attributes - The master sends a request to refresh the value of all Device attrib-
utes.
l Periodic requests
l Integrity poll - Enable a periodic integrity poll. The default is ticked.
l Polling period - The polling period in milliseconds. Default 60000. (Every minute)
l Interrogation of classes - Enable the periodic polling of the device items according to their class.
l Class 0 - Enable class 0 polling.
l Polling period - The polling period in milliseconds.
l Class 1 - Enable class 1 polling.
l Polling period - The polling period in milliseconds.
l Class 2 - Enable class 2 polling.
l Polling period - The polling period in milliseconds.
l Class 3 - Enable class 3 polling.
l Polling period - The polling period in milliseconds.
l Time synchronization - Enable a periodic Request Time Synchronization message.
l Polling period - The polling period in milliseconds. Default 3600000. (Every hour)
l Synchronization type - Defines if time synch messages should be formatted as defined in
the DNP3 Serial base specification, or as defined in the DNP3 LAN specification.

- 509 -
DNP3 Inputs and Outputs, Object Groups and Variations
The following table lists the DNP3 input and output types that are supported by C-CURE Building Man-
agement System. An input or output can correspond to a physical input or output or it can be calculated by
the device. In addition to the inputs and outputs, there two other data types known as Internal Indications
and Device Attributes that provide information about the device itself.
The Object Groups define how the inputs and outputs are read and written. The actual messaging in DNP3 is
quite complex but a highly simplified explanation of the groups is that, for each input and output type there
are two groups, one that is used for polled messages and the other for event (exception driven) messages.
For binary and analog outputs there is an additional group used for the write process.
Type Group Description Variables tree
Binary input 1 A two state value such as a simple on off switch. Bit
Binary input (event) 2
Binary output 10 A two state output such as the open and close control for Bit
Binary output (event) 11 a circuit breaker.
Binary output (CROB) Control Relay Output Block. The mechanism used to
12
write a binary output.
Running counters 20 A value that counts the number of occurrences of an Register
Running counters event. For example the number of times a circuit
22
(event) breaker has tripped.
Frozen counters 21 A value that counts the number of occurrences of an Register
Frozen counters (event) 23 event at a particular point in time.
Analog input 30 A single analog input such as a phase voltage. Register
Analog input (event) 32
Analog output 40 A single analog output such as a set-point. Register
Analog output (event) 42
Analog output (AOB) Analog Output Block. The mechanism used to write an
41
analog output.
Internal indications A two state value that indicate the operational status of Bit
80
the device.
Device attributes 0 String values representing static properties, and analog Register or text as
values representing configuration attributes, of the appropriate
device. For example the manufacturer's name or the
quantity of analog inputs.

The double bit binary input is not currently supported.

Variations
Variations are a specific range of formats in which the data can be presented in each Group. For example,
analog inputs can be a 32 bit integer with flag, a 16 bit integer with no flags, etc. For a full list of the sup-
ported variations, see the topic DNP3 implementation table.

- 510 -
DNP3 Inputs and Outputs to Variable Mapping
The DNP3 Mapping dialog is used to map (link) DNP3 inputs and outputs to C-CURE Building Management Sys-
tem variables. It can be opened from the Application Explorer when a DNP3 network is selected by using the
Mapping task.
The left pane contains a tree display of the devices of the selected network. Under each device is a list of all
input and output groups supported by C-CURE Building Management System. The right pane contains a table
of all inputs or outputs for the selected device and group, together with any variables to which they are
linked. An icon adjacent to each address indicates the type of variable with which it corresponds. Show pic-
ture

Right clicking anywhere in the right pane displays a context menu with the following commands.

l Variable selector - Opens the Variable Selector dialog.


l Create variable - See below.
l Unmap item - Un-maps (removes the link) between the selected variables and the corresponding
information object.

How to map an information object to a variable

1. Right click in the right pane of the DNP3 Mapping dialog and, from the pop-up menu, select the Vari-
able Selector command. The Variable Selector dialog opens. Drag it to a convenient location so you
can see both it and the DNP3 Mapping dialog. Show picture

- 511 -
2. Click in the DNP3 Mapping dialog and select the input or output to be mapped.
3. Click in the Variable Selector dialog and select the variable to be mapped. Click the Apply button and
the link between the input or output and variable is made.
4. Repeat steps 2 and 3 for all the variables to be mapped.

You can also open the Variable Selector by double clicking on an input or output.

How to un-map a variable

1. Open the DNP3 Mapping dialog and select the variable to be un-mapped.
2. Right click on the selected variables and, from the context menu, select the command Unmap item.
3. A dialog will appear asking for confirmation. Click OK to confirm the operation.

How to automatically create a variable


You can automatically create a variable and simultaneously link it to an input or output using the following
method.

l Right click on any un-mapped input or output and, from the context menu, select Create variable. A
variable with default properties and the correct type to match the item is automatically created and
linked to the item. The variable name is constructed using the following syntax. <Net-
work>.<Device>.<Type>.<Address> Show picture

- 512 -
- 513 -
DNP3 Device Profile
This document is intended to be used for several purposes, including:

l Identifying the capabilities of a DNP3 device (Master Station or Outstation)


l Recording the settings of a specific instance of a device (parameter settings for a specific instance of
the device in the user's total DNP3 estate)
l Matching user requirements to product capabilities when procuring a DNP3 device

The document is therefore structured to show, for each technical feature, the capabilities of the device (or
capabilities required by the device when procuring).
It is also structured to show the current value (or setting) of each of the parameters that describe a specific
instance of the device. This "current value" may also show a functional limitation of the device. For example
when implementing secure authentication it is not required that all DNP3 devices accept aggressive mode
requests during critical exchanges (see Device Profile 1.12.4), in which case a vendor would mark this cur-
rent value as "No - does not accept aggressive mode requests".
Additionally, the current value may sometimes be used to show a value that a device can achieve because of
hardware or software dependencies. An example of this is in section 1.6.8 of the Device Profile (Maximum
error in the time that the Master issues freeze requests) where the value may well depend upon tolerances
of hardware components and interactions between software tasks. When the Device Profile current value is
used in this way the corresponding entry in the capabilities column is grayed-out. Users should note that if
an entry in the capabilities column of the Device Profile is grayed-out then there may be information in the
current value column that is pertinent to the device's capabilities.
Unless otherwise noted, multiple boxes in the second column below are selected for each parameter to indic-
ate all capabilities supported or required. Parameters without checkboxes in the second column do not have
capabilities and are included so that the current value may be shown in the third column.
The items listed in the capabilities column below may be configurable to any of the options selected, or set
to a fixed value when the device was designed. Item 1.1.10 contains a list of abbreviations for the possible
ways in which the configurable parameters may be set. Since some parameters may not be accessible by
each of these methods supported, an abbreviation for the configuration method supported by each para-
meter is shown in the fourth column of the tables below.
If this document is used to show the current values, the third column should be filled in even if a fixed para-
meter is selected in the capabilities section ("NA" may be entered for parameters that are Not Applicable).
If the document is used to show the current values of parameters, then column 3 applies to a single con-
nection between a master and an outstation.

If con-
1.1. Device Identification Capabilities Current Value figurable list
methods
1.1.1. Device Function:
Masters send DNP requests,
while Outstations send DNP
responses. If a single phys-
ical device can perform - Master - Master
both functions a separate
Device Profile Document
must be provided for each
function.
1.1.3. Device Name:
The model and name of the
device, sufficient to dis- CimWay
tinguish it from any other
device from the same
organization.

- 514 -
Note: The current value of
this outstation parameter is
available remotely using
protocol object Group 0
Variation 250.
1.1.6. Device Profile Docu-
ment Version Number:
Version of the Device Pro-
file Document is indicated
by a whole number incre- 1.3
mented with each new
release. This should match
the latest version shown in
the Revision History at the
start of this document.

Outstations Only
1.1.7. DNP Levels Sup- Requests and Responses
ported for:
Yes None
Indicate each DNP3 Level to Level 2
Yes Level 1
which the device conforms
Yes Level 2
fully. For Masters, requests
and responses can be indic- Level 3
ated independently. Level 4

Self Address Reservation


Data Sets
File Transfer
Virtual Terminal
1.1.8. Supported Function Mapping to IEC 61850 Object Models
Blocks: defined in a DNP3 XML file
Function code 31, activate con-
figuration
Secure Authentication (if checked
then see 1.12)
Level 3: Device Attributes
Level 3 and 4: Binary Input
Level 3 and 4: Binary Output
1.1.9. Notable Additions: Level 4: Binary Output Event
A brief description intended Level 3 and 4: Counter
to quickly identify (for the Level 3 and 4: Counter Event
reader) the most obvious Level 3 and 4: Frozen Counter
features the device sup- Level 3 and 4: Frozen Counter Event
ports in addition to the Level 3 and 4: Analog Input
Highest DNP Level Sup- Level 3 and 4: Analog Input Event
ported. The complete list of Level 3 and 4: Analog Output Status
features is described in the Level 3 and 4: Analog Output Block
Implementation Table. Level 3 and 4: Analog Output Event
Level 3: Internal Indications Packed
Format

XML - Loaded via DNP3 File Transfer Software


1.1.10. Methods to set Con- XML - Loaded via other transport
Vendor software named
figurable Parameters: mechanism

- 515 -
Terminal - ASCII Terminal Command
Line
Software - Vendor software named
Proprietary file loaded via DNP3 File
Transfer
Proprietary file loaded via other trans-
port mechanism
Direct - Keypad on device front panel
Factory - Specified when device is
ordered
Protocol - Set via DNP3 (e.g. assign
class)
Other - explain:
1.1.11. DNP3 XML files
available On-line:
XML configuration file
names that can be read or
Description of
written through DNP3 File Rd Wr Filename
Contents
Transfer to a device.
Complete Rd Wr Filename
A device's currently running dnpDP.xml
Device Profile dnpDP.xml
configuration is returned by
Device Profile dnpDPCap.xml
DNP3 on-line XML file read dnpDPCap.xml
Capabilities dnpDPCfg.xml
from the device.
Device Profile
DNP3 on-line XML file write dnpDPCfg.xml
config values
to a device will update the
device's configuration when
the Activate Configuration
(function code 31) is
received.
1.1.12. External DNP3 XML
files available Off-line:
XML configuration file
names that can be read or Description
Rd Wr Filename
written from an external of Contents
system, typically from a Complete
system that maintains the Yes dnpDP.xml Device Pro- Rd Wr Filename
outstation configuration. file
Yes dnpDP.xml
External off-line XML file Device Pro-
dnpDPCap.xml
read permits an XML defin- dnpDPCap.xml file Cap-
ition of a new configuration abilities dnpDPCfg.xml
to be supplied from off-line Device Pro-
configuration tools. dnpDPCfg.xml file config
External off-line XML file values
write permits an XML defin-
ition of a new configuration
to be supplied to off-line
configuration tools.
Proprietary
File via
Serial (complete section 1.2)
1.1.13. Connections Sup- IP Networking Other Mech-
IP Networking (complete section 1.3)
ported: anism
Other, explain:
--------------
--

- 516 -
If con-
Current
1.3. IP Networking Capabilities figurable list
Value
methods
1.3.1. Port Name:
Name used to reference the communications port defined in
this section.
TCP Initiating
(Master Only) Proprietary
TCP Listening File via
TCP Ini-
(Outstation Only) Other Mech-
tiating
1.3.2. Type of End Point: TCP Dual anism
UDP Data-
(required for --------------
gram
Masters) --
UDP Datagram
(required)
Proprietary
File via
Other Mech-
1.3.3. IP Address of this Device: 127.0.0.1 anism
--------------
--

1.3.4. Subnet Mask:


1.3.5. Gateway IP Address:
Allows all (show
as *.*.*.* in
1.3.7)
Limits based on
IP address
Limits based on
list of IP
addresses Allows all
1.3.6. Accepts TCP Connections or UDP Datagrams from:
Limits based on a
wildcard IP
address
Limits based on
list of wildcard IP
addresses
Other validation,
explain:
1.3.7. IP Address(es) from which TCP Connections or UDP *.*.*.*
Datagrams are accepted:
Not Applicable
Proprietary
(Master w/o dual
1.3.8. TCP Listen Port Number: File via
end point)
If Outstation or dual end point Master, port number on which Other Mech-
Fixed at 20,000
to listen for incoming TCP connect requests. Required to be 20000 anism
Configurable,
configureable for Masters and recommended to be con- --------------
range 0 to
figurable for Outstations. --
2147483647
Configurable,

- 517 -
selectable from
Other, explain:
Not Applicable
(Outstation w/o
Proprietary
1.3.9. TCP Listen Port Number of remote device: dual end point)
File via
Fixed at 20,000
If Master or dual end point Outstation, port number on remote Configurable, Other Mech-
device with which to initiate connection. Required to be con- 20000 anism
range 0 to
figurable for Masters and recommended to be configurable for 2147483647 --------------
Outstations. --
Configurable,
selectable from
Other, explain:
Fixed at ms
Proprietary
Configurable,
File via
1.3.10. TCP Keep-alive timer: range 0 to
Other Mech-
2147483647ms
The time period for the keep-alive timer on active TCP con- 3000 ms anism
Configurable,
nections. --------------
selectable from
--
ms
Other, explain:
Fixed at 20,000
Configurable,
range 0 to Proprietary
1.3.11. Local UDP port: 2147483647 File via
Configurable, Other Mech-
Local UDP port for sending and/or receiving UDP datagrams. selectable from 20000 anism
Masters may let system choose an available port. Outstations Other, explain: --------------
must use one that is known by the Master. --
Let system
choose (Master
only)
Fixed at 20,000 Proprietary
Configurable, File via
range 0 to Other Mech-
1.3.12. Destination UDP port for DNP3 Requests (Master
2147483647 20000 anism
Only):
Configurable, --------------
selectable from --
Other, explain:
None Proprietary
1.3.13. Destination UDP port for initial unsolicited null Fixed at 20,000 File via
responses (UDP only Outstations): Configurable, Other Mech-
range to anism
For a UDP only Outstation, the destination UDP port for send- Configurable, --------------
ing initial unsolicited Null response. selectable from --
Other, explain:
None
Proprietary
Fixed at 20,000
1.3.14. Destination UDP port for responses: File via
Configurable,
Other Mech-
For a UDP only Outstation, the destination UDP port for send- range to
anism
ing all responses other than the initial unsolicited Null Configurable,
--------------
response. selectable from
--
Other, explain:

- 518 -
Use source port
number
1.3.15. Multiple outstation connections (Masters only): Supports mul-
Master only. Indicates whether multiple outstation con- tiple outstations True
nections are supported. (Masters only)

Supports mul-
tiple masters
(Outstations
only)
If supported, the
following meth-
ods may be
1.3.16. Multiple master connections (Outstations only): used:
Outstations only. Indicates whether multiple master con- Method 1 (based
nections are supported and the method that can be used to on IP address) -
establish connections. required
Method 2 (based
on IP port num-
ber) - recom-
mended
Method 3 (brows-
ing for static
data) - optional
DNP3 LAN pro-
cedure (function
Proprietary
code 24)
File via
DNP3 Write Time
Other Mech-
(not recom- Write
1.3.17. Time synchronization support: anism
mended over Time
--------------
LAN)
--
Other, explain:

Not Supported

If con-
Current
1.4. Link Layer Capabilities figurable list
Value
methods
Proprietary
1.4.1. Data Link Address: Fixed at
File via
Configurable, range
Indicates if the link address is configurable over the entire Other Mech-
0 to 65519
valid range of 0 to 65,519. Data link addresses 0xFFF0 1 anism
Configurable, select-
through 0xFFFF are reserved for broadcast or other special --------------
able from
purposes. --
Other, explain:

Never
Always, one address
allowed (shown in
1.4.2. DNP3 Source Address Validation:
1.4.3)
Indicates whether the Outstation will filter out requests not Always, any one of
from a specific source address. multiple addresses
allowed
(each selectable as

- 519 -
shown in 1.4.3)
Sometimes,
explain:
Configurable to any
16 bit DNP Data Link
1.4.3. DNP3 Source Address(es) expected when Validation Address value
is Enabled: Configurable, range
to
Selects the allowed source address(es) Configurable, select-
able from
Other, explain:
1.4.4. Self Address Support using address 0xFFFC:
If an Outstation receives a message with a destination Yes (only allowed if
address of 0xFFFC it shall respond normally with its own configurable)
source address. It must be possible to diasble this feature if No
supported.
Never
1.4.5. Sends Confirmed User Data Frames: Always
A list of conditions under which the device transmits con- Sometimes,
Never
firmed link layer services (TEST_LINK_STATES, RESET_ explain:Only for mul-
LINK_STATES, CONFIRMED_USER_DATA). tiframe message
fragments
None
Fixed at ms Proprietary
1.4.6. Data Link Layer Confirmation Timeout: Configurable, range File via
0 to 2147483647ms Other Mech-
This timeout applies to any secondary data link message Configurable, select- 10000ms anism
that requires a confirm or response (link reset, link status, able from ms --------------
user data, etc). Other, explain: --

Variable, explain:
None Proprietary
Fixed at File via
1.4.7. Maximum Data Link Retries: Configurable, range Other Mech-
The number of times the device will retransmit a frame that to 3 anism
requests Link Layer confirmation. Configurable, select- --------------
able from --
Other, explain:
Proprietary
Fixed at
1.4.8. Maximum number of octets Transmitted in a Data File via
Configurable, range
Link Frame: Other Mech-
to
292 anism
This number includes the CRCs. With a length field of 255, Configurable, select-
--------------
the maximum size would be 292. able from
--
Other, explain:

Proprietary
1.4.9. Maximum number of octets that can be Received in a Fixed at File via
Data Link Frame: Configurable, range
Other Mech-
to
This number includes the CRCs. With a field length of 255, 292 anism
Configurable, select-
the maximum size would be 292. The device must be able --------------
able from
to receive 292 octets to be compliant. --
Other, explain:

- 520 -
If con-
Current
1.5. Application Layer Capabilities figurable list
Value
methods
1.5.1. Maximum number of octets Transmitted in an Application
Layer Fragment other than File Transfer: Fixed at Proprietary
Configurable, File via Other
This size does not include any transport or frame octets.
range to Mechanism
- Masters must provide a setting less than or equal to 249. 2048
Configurable, --------------
- Outstations must provide a setting less than or equal to 2048.
selectable from --
Note: The current value of this outstation parameter is avail- Other, explain:
able remotely using protocol object Group 0 Variation 240.
Fixed at Proprietary
Configurable, File via Other
1.5.2. Maximum number of octets Transmitted in an Application range to Mechanism
2048
Layer Fragment containing File Transfer: Configurable, --------------
selectable from --
Other, explain:
1.5.3. Maximum number of octets that can be received in an
Application Layer Fragment: Fixed at Proprietary
This size does not include any transport or frame octets. Configurable, File via Other
- Masters must provide a setting greater than or equal to 2048. range to Mechanism
2048
- Outstations must provide a setting greater than or equal to Configurable, --------------
249. selectable from --
Note: The current value of this outstation parameter is avail- Other, explain:
able remotely using protocol object Group 0 Variation 241.
None
Fixed at ms
1.5.4. Timeout waiting for Complete Application Layer Frag- Configurable,
ment: range to ms
Configurable,
Timeout if all frames of a message fragment are not received None
selectable from
in the specified time. Measured from time first frame of a frag- ms
ment is received until the last frame is received. Other, explain:

Variable, explain:
Fixed at 1(enter 0
if controls are not
supported)
1.5.5. Maximum number of objects allowed in a single control Configurable,
request for CROB (Group 12): range to
Note: The current value of this outstation parameter is avail- Configurable,
able remotely using protocol object Group 0 Variation 216. selectable from
Other, explain:

Variable, explain:
Fixed at 1 (enter
0 if controls are
not supported)
1.5.6. Maximum number of objects allowed in a single control
Configurable,
request for Analog Outputs (Group 41):
range to
Configurable,
selectable from

- 521 -
Other, explain:

Variable, explain:
Fixed at (enter 0
if controls are not
supported)
Configurable,
1.5.7. Maximum number of objects allowed in a single control range to
request for Data Sets (Groups 85, 86, 87): Configurable,
selectable from
Other, explain:

Variable, explain:
Not applicable -
controls are not
1.5.8. Supports mixed object groups (AOBs, CROBs and Data
supported
Sets) in the same control request:
Yes
No

If con-
Current
1.6. Fill Out The Following Items For Masters Only Capabilities figurable list
Value
methods
None
Fixed at ms
Configurable,
range 0 to
1.6.1. Timeout waiting for Complete Application Layer 2147483647ms
Responses (ms): Configurable,
3000ms
Timeout on Master if all fragments of a response message are selectable from
not received in the specified time. ms
Other, explain:

Variable,
explain:
None
Fixed at
1.6.2. Maximum Application Layer Retries for Request Mes- Configurable,
sages: range to
The number of times a Master will retransmit an application Configurable,
None
layer request message if a response is not received. This para- selectable from
meter must never cause a Master to retransmit time sync mes- Other, explain:
sages.
Variable,
explain:
None
Fixed at ms
Configurable,
range to ms
1.6.3. Incremental Timeout waiting for First or Next Fragment of
Configurable, 10000ms
an Application Layer Response:
selectable from
ms
Other, explain:

- 522 -
Variable,
explain:

1.6.4 Issuing controls to off-line devices: Not applicable -


controls are not
Indicates if the Master issues control requests to devices that supported No
are thought to be off-line (i.e. the Master has not seen responses Yes
to previous Master requests). No

1.6.5 Issuing controls to off-scan devices: Not applicable -


controls are not
Indicates if the Master issues control requests to devices that supported Yes
are currently off-scan (i.e. the Master has been configured not to Yes
issue poll requests to the device). No
None
(required)
Fixed at
1.6.6 Maximum Application Layer Retries for Control Select Mes- Configurable,
sages (same sequence number): range to
Indicates the number of times a Master will retransmit an applic- Configurable, None
ation layer control select request message if a response is not selectable from
received - using the same message sequence number. Other, explain:

Variable,
explain:
None
(required)
Fixed at
1.6.7 Maximum Application Layer Retries for Control Select Mes- Configurable,
sages (new sequence number): range to
Indicates the number of times a Master will retransmit an applic- Configurable, None
ation layer control select request message if a response is not selectable from
received - using a new message sequence number. Other, explain:

Variable,
explain:
1.6.8 Maximum error in the time that the Master issues freeze
requests:
100 ms
If the Master is scheduled to issue freeze requests at a specific
time, what is the maximum error in the time that the Master
may actually issue a request?
1.6.9 Maximum error in the time that the Master schedules repet-
itive freeze requests:
If the Master is scheduled to issue freeze requests at a regular 100 ms
interval, what is the maximum error in the time interval that the
Master may actually issue a request? (i.e. how early / late could
the request actually be issued)?
Freeze time
1.6.10 Scheduled actions that may affect the accuracy of freeze may be Poll
requests: affected by Poll Requests
Indicates if the Master's accuracy of issuing freeze requests may requests Control
be affected by other scheduled operations such as poll requests Freeze time Requests
or control requests. may be
affected by Con-

- 523 -
trol requests
1.6.11 Master's algorithm for scheduling request operations:
Describe the Master's algorithm for determination of which activ-
ity is performed when more than one is due at the same
moment. Discuss precedence and priorities for activities such as
time synchronization, poll requests, control requests and freeze
requests.

3. Capabilities and Current Settings for Device Database (Outstation only)


The following tables identify the capabilities and current settings for each DNP3 data type. Details defining
the data points available in the device are shown in part 5 of this Device Profile.

4. Implementation Table
The following implementation table identifies which object groups and variations,
function codes and qualifiers the device supports in both requests and responses. The
Request columns identify all requests that may be sent by a Master, or all requests
that must be parsed by an Outstation. The Response columns identify all responses
that must be parsed by a Master, or all responses that may be sent by an Outstation.

REQUEST RESPONSE
DNP OBJECT GROUP & VARIATION Master may issue Master must parse
Outstation must parse Outstation may issue
Object Function Qualifier Qualifier
Variation Function
Group Description Codes Codes Codes
Number Codes (dec)
Number (dec) (hex) (hex)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Identification of 06 (no 129 stop),
0 211 1(read)
support for user-specific attributes range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of mas- 06 (no 129 stop),
0 212 1(read)
ter-defined data set prototypes range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start- 00 (start-
Device Attributes - Number of out- stop), 129 stop),
0 213 1(read)
station-defined data set prototypes 01 (start- (Response) 01 (start-

- 524 -
stop),
06 (no stop),
range, or 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of mas- 06 (no 129 stop),
0 214 1(read)
ter-defined data sets range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of out- 06 (no 129 stop),
0 215 1(read)
station-defined data sets range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum number 06 (no 129 stop),
0 216 1(read)
of binary output objects per request range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Local timing 06 (no 129 stop),
0 217 1(read)
accuracy range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start- 00 (start-
stop), stop),
01 (start- 01 (start-
Device Attributes - Duration of time 129
0 218 1(read) stop), stop),
accuracy (Response)
06 (no 17
range, or (index),
all), 27,

- 525 -
07,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for ana- 06 (no 129 stop),
0 219 1(read)
log output events range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum analog 06 (no 129 stop),
0 220 1(read)
output index range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of analog 06 (no 129 stop),
0 221 1(read)
outputs range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for bin- 06 (no 129 stop),
0 222 1(read)
ary output events range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum binary 06 (no 129 stop),
0 223 1(read)
output index range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)

- 526 -
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of binary 06 (no 129 stop),
0 224 1(read)
outputs range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for 06 (no 129 stop),
0 225 1(read)
frozen counter events range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for 06 (no 129 stop),
0 226 1(read)
frozen counters range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for 06 (no 129 stop),
0 227 1(read)
counter events range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum counter 06 (no 129 stop),
0 228 1(read)
index range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
00 (start-
Device Attributes - Number of 129 stop),
0 229 1(read) stop),
counter points 01 (start- (Response) 01 (start-
stop),

- 527 -
stop),
06 (no
17
range, or
(index),
all),
27,
07,
28 (index)
08 (lim-
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for 06 (no 129 stop),
0 230 1(read)
frozen analog inputs range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for ana- 06 (no 129 stop),
0 231 1(read)
log input events range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum analog 06 (no 129 stop),
0 232 1(read)
input index range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of analog 06 (no 129 stop),
0 233 1(read)
input points range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start- 00 (start-
stop), stop),
01 (start- 01 (start-
Device Attributes - Support for 129
0 234 1(read) stop), stop),
double-bit binary input events (Response)
06 (no 17
range, or (index),
all), 27,

- 528 -
07,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum double- 06 (no 129 stop),
0 235 1(read)
bit binary index range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of 06 (no 129 stop),
0 236 1(read)
double-bit binary input points range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Support for bin- 06 (no 129 stop),
0 237 1(read)
ary input events range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum binary 06 (no 129 stop),
0 238 1(read)
input index range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Number of binary 06 (no 129 stop),
0 239 1(read)
input points range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)

- 529 -
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum trans- 06 (no 129 stop),
0 240 1(read)
mit fragment size range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Maximum receive 06 (no 129 stop),
0 241 1(read)
fragment size range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Device man- 06 (no 129 stop),
0 242 1(read)
ufacturer's software version range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Device man- 06 (no 129 stop),
0 243 1(read)
ufacturer's hardware version range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - User assigned ID 06 (no 129 stop),
0 246 1(read)
code/number range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
00 (start-
Device Attributes - User-assigned 129 stop),
0 247 1(read) stop),
device name 01 (start- (Response) 01 (start-
stop),

- 530 -
stop),
06 (no
17
range, or
(index),
all),
27,
07,
28 (index)
08 (lim-
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Device serial num- 06 (no 129 stop),
0 248 1(read)
ber range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - DNP subset and 06 (no 129 stop),
0 249 1(read)
conformance range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Device man- 06 (no 129 stop),
0 250 1(read)
ufacturer's product name and model range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop), 00 (start-
01 (start- stop),
stop), 01 (start-
Device Attributes - Device man- 06 (no 129 stop),
0 252 1(read)
ufacturer's name range, or (Response) 17
all), (index),
07, 27,
08 (lim- 28 (index)
ited qty)
00 (start-
stop),
Device Attributes - Non-specific all
0 254 1(read) 06 (no
attributes request
range, or
all)

0 255 Device Attributes - List of attribute 1(read) 00 (start- 129 00 (start-

- 531 -
stop),
01 (start-
stop), stop),
06 (no 01 (start-
variations range, or (Response) stop),
all), 5B (free
07, format)
08 (lim-
ited qty)
00, 01
(start-
stop),
06 (no
1 0 Binary Input - any variation 1(read) range, or
all),
07, 08
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
1 1 Binary Input - Single-bit packed 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
1 2 Binary Input - Single-bit with flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
06 (no
range, or
Binary Input Change Event - any vari- all),
2 0 1(read)
ation 07, 08
(limited
qty)
06 (no
range, or
Binary Input Change Event - without all), 129 17, 28
2 1 1(read)
time 07, 08 (Response) (index)
(limited
qty)
Binary Input Change Event - without 130 (Unsol. 17, 28
2 1
time Resp.) (index)
06 (no
Binary Input Change Event - with 129 17, 28
2 2 1(read) range, or
absolute time (Response) (index)
all),

- 532 -
07, 08
(limited
qty)
Binary Input Change Event - with 130 (Unsol. 17, 28
2 2
absolute time Resp.) (index)
06 (no
range, or
Binary Input Change Event - with rel- all), 129 17, 28
2 3 1(read)
ative time 07, 08 (Response) (index)
(limited
qty)
Binary Input Change Event - with rel- 130 (Unsol. 17, 28
2 3
ative time Resp.) (index)
00, 01
(start-
stop),
06 (no
10 0 Binary Output - any variation 1(read) range, or
all),
07, 08
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
Continuous Control - output status 129
10 2 1(read) range, or stop),
with flags (Response)
all), 17, 28
07, 08 (index)
(limited
qty)
06 (no
range, or
Binary Output Change Event - any all),
11 0 1(read)
variation 07, 08
(limited
qty)
06 (no
range, or
Binary Output Change Event - status all), 129 17, 28
11 1 1(read)
without time 07, 08 (Response) (index)
(limited
qty)
Binary Output Change Event - status 130 (Unsol. 17, 28
11 1
without time Resp.) (index)
06 (no
range, or
Binary Output Change Event - status all), 129 17, 28
11 2 1(read)
with time 07, 08 (Response) (index)
(limited
qty)
11 2 Binary Output Change Event - status 130 (Unsol. 17, 28

- 533 -
with time Resp.) (index)
Binary Output Command (CROB) - 17, 28 129 echo of
12 1 3(select)
control relay output block (index) (Response) request
Binary Output Command (CROB) - 17, 28 129 echo of
12 1 4(operate)
control relay output block (index) (Response) request
Binary Output Command (CROB) - 5(direct 17, 28 129 echo of
12 1
control relay output block op.) (index) (Response) request
6(direct
Binary Output Command (CROB) - 17, 28 129 echo of
12 1 op, no
control relay output block (index) (Response) request
ack)
00, 01
(start-
stop),
06 (no
20 0 Counter - any variation 1(read) range, or
all),
07, 08
(limited
qty)
06 (no
20 0 Counter - any variation 7(freeze) range, or
all)
06 (no
8(freeze,
20 0 Counter - any variation range, or
no ack)
all)
06 (no
9(freeze &
20 0 Counter - any variation range, or
clear )
all)
10(frz & 06 (no
20 0 Counter - any variation clr, no range, or
ack) all)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
20 1 Counter - 32-bit with flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
20 2 Counter - 16-bit with flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01 129 00, 01
20 5 Counter - 32-bit without flag 1(read) (start- (Response) (start-

- 534 -
stop),
06 (no
range, or stop),
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
20 6 Counter - 16-bit without flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop),
06 (no
range, or
21 0 Frozen Counter - any variation 1(read) all),
07, 08
(limited
qty),

17 (index)
00, 01
(start-
stop),
06 (no 00, 01
129
21 1 Frozen Counter - 32-bit with flag 1(read) range, or (start-
(Response)
all), stop)
07, 08
(limited
qty)
00, 01
(start-
stop),
06 (no 00, 01
129
21 2 Frozen Counter - 16-bit with flag 1(read) range, or (start-
(Response)
all), stop)
07, 08
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
Frozen Counter - 32-bit with flag and 129
21 5 1(read) range, or stop),
time (Response)
all), 17, 28
07, 08 (index)
(limited
qty)

- 535 -
00, 01
(start-
stop), 00, 01
06 (no (start-
Frozen Counter - 16-bit with flag and 129
21 6 1(read) range, or stop),
time (Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
21 9 Frozen Counter - 32-bit without flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
21 10 Frozen Counter - 16-bit without flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
06 (no
range, or
all),
22 0 Counter Change Event - any variation 1(read)
07, 08
(limited
qty)
06 (no
range, or
Counter Change Event - 32-bit with all), 129 17, 28
22 1 1(read)
flag 07, 08 (Response) (index)
(limited
qty)
Counter Change Event - 32-bit with 130 (Unsol. 17, 28
22 1
flag Resp.) (index)
06 (no
range, or
Counter Change Event - 16-bit with all), 129 17, 28
22 2 1(read)
flag 07, 08 (Response) (index)
(limited
qty)
Counter Change Event - 16-bit with 130 (Unsol. 17, 28
22 2
flag Resp.) (index)
06 (no
Counter Change Event - 32-bit with range, or 129 17, 28
22 5 1(read)
flag and time all), (Response) (index)
07, 08

- 536 -
(limited
qty)
Counter Change Event - 32-bit with 130 (Unsol. 17, 28
22 5
flag and time Resp.) (index)
06 (no
range, or
Counter Change Event - 16-bit with all), 129 17, 28
22 6 1(read)
flag and time 07, 08 (Response) (index)
(limited
qty)
Counter Change Event - 16-bit with 130 (Unsol. 17, 28
22 6
flag and time Resp.) (index)
06 (no
range, or
Frozen Counter Change Event - any all),
23 0 1(read)
variation 07, 08
(limited
qty)
06 (no
range, or
Frozen Counter Change Event - 32-bit all), 129 17, 28
23 1 1(read)
with flag 07, 08 (Response) (index)
(limited
qty)
Frozen Counter Change Event - 32-bit 130 (Unsol. 17, 28
23 1
with flag Resp.) (index)
06 (no
range, or
Frozen Counter Change Event - 16-bit all), 129 17, 28
23 2 1(read)
with flag 07, 08 (Response) (index)
(limited
qty)
Frozen Counter Change Event - 16-bit 130 (Unsol. 17, 28
23 2
with flag Resp.) (index)
06 (no
range, or
Frozen Counter Change Event - 32-bit all), 129 17, 28
23 5 1(read)
with flag and time 07, 08 (Response) (index)
(limited
qty)
Frozen Counter Change Event - 32-bit 130 (Unsol. 17, 28
23 5
with flag and time Resp.) (index)
06 (no
range, or
Frozen Counter Change Event - 16-bit all), 129 17, 28
23 6 1(read)
with flag and time 07, 08 (Response) (index)
(limited
qty)
Frozen Counter Change Event - 16-bit 130 (Unsol. 17, 28
23 6
with flag and time Resp.) (index)

- 537 -
00, 01
(start-
stop),
30 0 Analog Input - any variation 1(read)
06 (no
range, or
all)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
30 1 Analog Input - 32-bit with flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
30 2 Analog Input - 16-bit with flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
30 3 Analog Input - 32-bit without flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
129
30 4 Analog Input - 16-bit without flag 1(read) range, or stop),
(Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
Analog Input - single-precision, float- 129
30 5 1(read) range, or stop),
ing-point with flag (Response)
all), 17, 28
07, 08 (index)
(limited
qty)

Analog Input - double-precision, float- 00, 01 129 00, 01


30 6 1(read) (start-
ing-point with flag (Response) (start-

- 538 -
stop),
06 (no
range, or stop),
all), 17, 28
07, 08 (index)
(limited
qty)
06 (no
range, or
Analog Input Change Event - any vari- all),
32 0 1(read)
ation 07, 08
(limited
qty)
06 (no
range, or
Analog Input Change Event - 32-bit all), 129 17, 28
32 1 1(read)
without time 07, 08 (Response) (index)
(limited
qty)
Analog Input Event – 32-bit without 130 (Unsol. 17, 28
32 1
time Resp.) (index)
06 (no
range, or
Analog Input Change Event - 16-bit all), 129 17, 28
32 2 1(read)
without time 07, 08 (Response) (index)
(limited
qty)
Analog Input Change Event - 16-bit 130 (Unsol. 17, 28
32 2
without time Resp.) (index)
06 (no
range, or
Analog Input Change Event - 32-bit all), 129 17, 28
32 3 1(read)
with time 07, 08 (Response) (index)
(limited
qty)
Analog Input Change Event - 32-bit 130 (Unsol. 17, 28
32 3
with time Resp.) (index)
06 (no
range, or
Analog Input Change Event - 16-bit all), 129 17, 28
32 4 1(read)
with time 07, 08 (Response) (index)
(limited
qty)
Analog Input Change Event - 16-bit 130 (Unsol. 17, 28
32 4
with time Resp.) (index)
06 (no
range, or
Analog Input Change Event - single- all), 129 17, 28
32 5 1(read)
precision, floating-point without time 07, 08 (Response) (index)
(limited
qty)

- 539 -
Analog Input Change Event - single- 130 (Unsol. 17, 28
32 5
precision, floating-point without time Resp.) (index)
06 (no
range, or
Analog Input Change Event - double- all), 129 17, 28
32 6 1(read)
precision, floating-point without time 07, 08 (Response) (index)
(limited
qty)
Analog Input Change Event - double- 130 (Unsol. 17, 28
32 6
precision, floating-point without time Resp.) (index)
06 (no
range, or
Analog Input Change Event - single- all), 129 17, 28
32 7 1(read)
precision, floating-point with time 07, 08 (Response) (index)
(limited
qty)
Analog Input Change Event - single- 130 (Unsol. 17, 28
32 7
precision, floating-point with time Resp.) (index)
06 (no
range, or
Analog Input Change Event - double- all), 129 17, 28
32 8 1(read)
precision, floating-point with time 07, 08 (Response) (index)
(limited
qty)
Analog Input Change Event - double- 130 (Unsol. 17, 28
32 8
precision, floating-point with time Resp.) (index)
00, 01
(start-
stop),
06 (no
40 0 Analog Output Status - any variation 1(read) range, or
all),
07, 08
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
Analog Output Status - 32-bit with 129
40 1 1(read) range, or stop),
flag (Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
00, 01
stop),
(start-
Analog Output Status - 16-bit with 06 (no 129
40 2 1(read) stop),
flag range, or (Response)
17, 28
all),
(index)
07, 08
(limited

- 540 -
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
Analog Output Status - single-pre- 129
40 3 1(read) range, or stop),
cision, floating-point with flag (Response)
all), 17, 28
07, 08 (index)
(limited
qty)
00, 01
(start-
stop), 00, 01
06 (no (start-
Analog Output Status - double-pre- 129
40 4 1(read) range, or stop),
cision, floating-point with flag (Response)
all), 17, 28
07, 08 (index)
(limited
qty)
17, 28 129 echo of
41 1 Analog Output Block - 32-bit 3(select)
(index) (Response) request
17, 28 129 echo of
41 1 Analog Output Block - 32-bit 4(operate)
(index) (Response) request
5(direct 17, 28 129 echo of
41 1 Analog Output Block - 32-bit
op.) (index) (Response) request
6(direct
17, 28 129 echo of
41 1 Analog Output Block - 32-bit op, no
(index) (Response) request
ack)
17, 28 129 echo of
41 2 Analog Output Block - 16-bit 3(select)
(index) (Response) request
17, 28 129 echo of
41 2 Analog Output Block - 16-bit 4(operate)
(index) (Response) request
5(direct 17, 28 129 echo of
41 2 Analog Output Block - 16-bit
op.) (index) (Response) request
6(direct
17, 28 129 echo of
41 2 Analog Output Block - 16-bit op, no
(index) (Response) request
ack)
Analog Output Block - single-pre- 17, 28 129 echo of
41 3 3(select)
cision, floating-point (index) (Response) request
Analog Output Block - single-pre- 17, 28 129 echo of
41 3 4(operate)
cision, floating-point (index) (Response) request
Analog Output Block - single-pre- 5(direct 17, 28 129 echo of
41 3
cision, floating-point op.) (index) (Response) request
6(direct
Analog Output Block - single-pre- 17, 28 129 echo of
41 3 op, no
cision, floating-point (index) (Response) request
ack)
Analog Output Block - double-pre- 17, 28 129 echo of
41 4 3(select)
cision, floating-point (index) (Response) request
Analog Output Block - double-pre- 17, 28 129 echo of
41 4 4(operate)
cision, floating-point (index) (Response) request

- 541 -
Analog Output Block - double-pre- 5(direct 17, 28 129 echo of
41 4
cision, floating-point op.) (index) (Response) request
6(direct
Analog Output Block - double-pre- 17, 28 129 echo of
41 4 op, no
cision, floating-point (index) (Response) request
ack)
06 (no
range, or
Analog Output Change Event - any all),
42 0 1(read)
variation 07, 08
(limited
qty)
06 (no
range, or
Analog Output Change Event - 32-bit all), 129 17, 28
42 1 1(read)
without time 07, 08 (Response) (index)
(limited
qty)
Analog Output Change Event - 32-bit 130 (Unsol. 17, 28
42 1
without time Resp.) (index)
06 (no
range, or
Analog Output Change Event - 16-bit all), 129 17, 28
42 2 1(read)
without time 07, 08 (Response) (index)
(limited
qty)
Analog Output Change Event - 16-bit 130 (Unsol. 17, 28
42 2
without time Resp.) (index)
06 (no
range, or
Analog Output Change Event - 32-bit all), 129 17, 28
42 3 1(read)
with time 07, 08 (Response) (index)
(limited
qty)
Analog Output Change Event - 32-bit 130 (Unsol. 17, 28
42 3
with time Resp.) (index)
06 (no
range, or
Analog Output Change Event - 16-bit all), 129 17, 28
42 4 1(read)
with time 07, 08 (Response) (index)
(limited
qty)
Analog Output Change Event - 16-bit 130 (Unsol. 17, 28
42 4
with time Resp.) (index)
06 (no
range, or
Analog Output Change Event - single- all), 129 17, 28
42 5 1(read)
precision, floating-point without time 07, 08 (Response) (index)
(limited
qty)
Analog Output Change Event - single- 130 (Unsol. 17, 28
42 5
precision, floating-point without time Resp.) (index)

- 542 -
06 (no
range, or
Analog Output Change Event -
all), 129 17, 28
42 6 double-precision, floating-point 1(read)
07, 08 (Response) (index)
without time
(limited
qty)
Analog Output Change Event -
130 (Unsol. 17, 28
42 6 double-precision, floating-point
Resp.) (index)
without time
06 (no
range, or
Analog Output Change Event - single- all), 129 17, 28
42 7 1(read)
precision, floating-point with time 07, 08 (Response) (index)
(limited
qty)
Analog Output Change Event - single- 130 (Unsol. 17, 28
42 7
precision, floating-point with time Resp.) (index)
06 (no
range, or
Analog Output Change Event -
all), 129 17, 28
42 8 double-precision, floating-point with 1(read)
07, 08 (Response) (index)
time
(limited
qty)
Analog Output Change Event -
130 (Unsol. 17, 28
42 8 double-precision, floating-point with
Resp.) (index)
time
07 (lim-
129
50 1 Time and Date - absolute time ited qty =
(Response)
1)

07 (lim-
50 1 Time and Date - absolute time 2(write)
ited qty =
1)
07 (lim-
129
52 1 Time Delay - coarse ited qty =
(Response)
1)
07 (lim-
129
52 2 Time Delay - fine ited qty =
(Response)
1)
06 (no
60 1 Class Objects - class 0 data 1(read) range, or
all)
06 (no
range, or
all),
60 2 Class Objects - class 1 data 1(read)
07, 08
(limited
qty)
06 (no
60 3 Class Objects - class 2 data 1(read) range, or
all),

- 543 -
07, 08
(limited
qty)
06 (no
range, or
all),
60 4 Class Objects - class 3 data 1(read)
07, 08
(limited
qty)
00, 01 00, 01
129
80 1 Internal Indications - packed format 1(read) (start- (start-
(Response)
stop) stop)

- 544 -
IEC 60870-5

- 545 -
Overview of IEC 60870-5
IEC 60870-5 is a communication standard designed for telecontrol in the power generation and distribution
systems. C-CURE Building Management System operates has a client (master) and the field devices are serv-
ers (slaves). Both polling and unsolicited data exchange are supported. In practice, a general interrogation
is used at startup to collect the initial state of servers, and then a mix of polling and unsollicited data
exchanges are used to refresh data.
The IEC 60870-5 driver in C-CURE Building Management System supports the IEC 60870-5-104 protocol,
designed to operate over TCP/IP.
It also supports a variant of the IEC 60870-5-101 protocol (originally defined to operate over serial trans-
mission channels) that operates in unbalanced mode over TCP or UDP. While this flavor of the IEC 101 over
IP does not correspond to the original standard, it is used nowadays in a variety of systems where legacy
IEC 101 devices are accessed through serial-to-IP gateways.

l An IEC 60870-5 network has Devices,


l A device is comprised of one or more Sectors,
l A Sector hosts and exposes a predefined set of Information Objects.
l Support for Devices compliant with either the IEC 60870-5-101 (via a serial-IP gateway) or the
IEC 60870-5-104 standard.
l A Device can either be a data concentrator, collecting together several discrete Sectors, or it can have
integrated Sectors. Often a Device will only have one Sector making the Device and Sector syn-
onymous. Each Device is identified on the network by its IP address.
l A Sector is typically a piece of control equipment with one or more Information Objects - for example
a circuit breaker.
l Information Objects represent the physical inputs and outputs. The types of Information Object that
are available is as defined by the IEC 60870-5 standard. Each type has a corresponding ASDU (Applic-
ation Service Data Unit) which defines the structure, type and format of messages.

The IEC 60870-5 configuration is accessed from the Application Explorer - Communication.Data acquis-
ition.IEC 60870-5.

- 546 -
Managing IEC 60870-5 in the Application Explorer

Tasks applicable to IEC 60870-5


When the IEC 60870-5 folder is selected.
Icon Task Description
Settings Display the general IEC 60870-5 settings dialog.
Add a network Configure a new IEC 60870-5 network.
When an IEC 60870-5 network is selected.
Icon Task Description
Add an IEC 104
Add an IEC 104 device to the network.
device
Add an IEC 101
Add an IEC 101 device to the network.
device
Start network Start the network.
Stop network Stop the network.
Remove Permanently remove the configuration of the network.
Open the mapping dialog used to link variables to IEC 60870-5 information
Mapping
objects.
Properties Open the properties dialog for the network.
When an IEC 60870-5 device is selected.
Icon Task Description
Add a sector Add a new sector to the selected device. Not available for standby devices.
Start device Start the connection to the selected device.
Stop device Stop the connection to the selected device.
Remove Permanently remove the configuration of the selected device.
Send a Ping to the device to check its status. A command dialog opens during
Ping
the Ping process displaying the results.
Properties Open the properties dialog for the selected device.
Activate the device. Only of use when a main and standby device have been con-
Activate device
figured.
When an IEC 60870-5 sector is selected.
Icon Task Description
Start sector Start the sector.
Stop sector Stop the sector.
General interrogation Send a General interrogation command for the selected sector.
Counter interrogation Send a Counter interrogation command for the selected sector.
Clock syn-
Send a Clock Synchronization command to the selected sector.
chronization
Test Send a test command to the selected sector.
Reset process Send a Reset process command to the selected sector.
Remove Permanently remove the selected sector.
Properties Open the properties dialog for the selected sector.

- 547 -
Rules and behavior of cut, copy and paste
The following table describes the rules and behavior, and in particular any restrictions, when using cut or
copy and paste on configuration objects in the 60870-5 folder.
60870-5 object Behavior
Network The pasted Network is given a unique name.
Any subordinate Devices and Sectors are duplicated using the original name.
The mapping of any variables is not duplicated.
Device The pasted Device is given a unique name.
Any subordinate Sectors are duplicated using the original name.
Sector The pasted Sector is given a unique name.

- 548 -
IEC 60870-5 Client General Settings
IEC 60870-5 settings are accessed from the Application Explorer by selecting <Pro-
ject>.Communication.Data acquisition.IEC 60870-5 and choosing the Settings command from the task list.
Show picture

l Invalidate variables - Defines if variable status should be set to invalid upon connection failure.
l Never - The variables are never made invalid. This can be used when there is intermittent com-
munication with the equipment.
l Immediately - The variables are made invalid immediately on a communication failure. This is
the default value.
l After a delay - The variables are made invalid after the specified delay.
l Monitoring
l Use the local timestamp upon device reconnection - Use C-CURE Building Management System’s
timestamp for the first value received after a device is re-connected.
l Double-point
l Intermediate state - Defines how Intermediate state value should be interpreted.
l Time before invalidating bit variable - The delay of the intermediate state (0,0 or
1,1) before the object is considered to be in error.
l Off – Defines how Off value should be interpreted.
l On – Defines how On value should be interpreted.
l Indeterminate – Defines how Indeterminate value should be interpreted.
l Time before invalidating bit variable - The delay of the indeterminate state (0,0 or
1,1) before the object is considered to be in error.
l Register/Text mapping
l Apply the invalidating rules as for bit variables - If enabled, settings driving invalid-
ity for bit variables are applied to register and text variables mapped on double-
points.
l Control
l Update the variable immediately with the written value - If enabled, the variable value is
updated immediately after the write rather than waiting for the device to acknowledge the com-
mand execution.

- 549 -
l Single command
l Default qualifier - The default qualifier sent with a Single command.
l Default method - The default method, either Direct Execute or Select Before Execute,
used for a Single command.
l Time tagged - If enabled, a time-tagged command will be sent.
l Double command, Regulating step, Bitstring, Set-point-command - See Single command.
l Quality descriptor management - Selects which of the quality flags from the device are considered as
invalid quality in C-CURE Building Management System. By default, only substituted (SB) is not selec-
ted.
l Attributes and properties - Defines how relevant variable properties shall be mapped on IEC 60870-5
built-in mechanisms.
l Deadband property
l Control direction - Overwrite threshold parameters - If enabled, the deadband value of the
variable is sent to devices to overwrite the threshold parameters.
l Networking
l Switchover turnaround delay - The guaranteed interval of silence during data acquisition server
switchover. During this time, no request is sent to devices by the IEC 60870-5 driver. Required
by some devices as part of their connection management. Default 200 ms.

- 550 -
Configuring an IEC 60870-5 Network
An IEC 60870-5 Network object in C-CURE Building Management System configuration, represents and
provides access to the physical connection to an IEC 60870-5 network. The configuration is accessed from
the Application Explorer - <Project>.Communication.Data acquisition.IEC 60870-5.

Adding a network

1. Select the IEC 60870-5 folder in the Application Explorer and, from the task list, select Add a network.
The IEC 60870-5 Network dialog opens. Show picture

2. In the Name field, enter the name of the network. You can accept the suggested default or enter one
of your own.
3. Enter a description of the network. The description appears in the contents pane of the Application
Explorer and can be useful to identify the network later. The description is optional.
4. To activate the network connection at startup, tick Activate at start-up.
5. If you are configuring a multi-station application, select the list of List of producers in the Advanced
tab. The network will only be activated and data acquisition performed on those stations named in that
list.
6. Click on OK to confirm the configuration and close the dialog.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the network. Only use
this if advised to do so by your support agency.

- 551 -
Adding Devices to an IEC 60870-5 Network
An IEC 60870-5 device object in C-CURE Building Management System configuration represents, and
provides access to, an IEC 101 or an IEC 104 device. In practice, a device may be a data concentrator col-
lecting together several discrete sectors corresponding to underlying devices, or it may have sectors for
data it handles directly. You can choose from either an IEC 101 or an IEC 104 compatible device depending
on your network architecture.
In C-CURE Building Management System, an IEC 60870-5 device is identified by the Name that you give it
during the configuration.

Adding a Device

1. Select an IEC 60870-5 network in the Application Explorer. From the task pane, select Add an IEC 101
device or Add an IEC 104 device to open the Device dialog. The general configuration is the same for
either. Show picture

2. In the Name field, enter a name for the device.


3. Enter the optional descriptive text in the Description field. The description is only used in the Applic-
ation Explorer.
4. In the IP Address field, enter the device's unique IP address.
5. Click on OK to confirm the configuration and close the dialog.

The Advanced tab


The Advanced tab contains several device properties pre-set to recommended defaults and in most cases
will not need to be changed. A different set of properties is available for the IEC 101 and IEC 104 devices.
Please refer to the documentation provided by the device manufacturer for properties that must match the
device configuration. Show pictures

- 552 -
The following properties are available for IEC 104 devices:

l Connection parameters
l TCP/IP parameters
l Remote port - The TCP port used to communicate with the device. Default 2404.
l Originator address - The address to be used by the driver to identify the C-CURE Building Man-
agement System IEC 104 client. Default 0.
l Link layer properties
l T0 - Timeout of connection establishment. Default 30 sec.
l T1 - Timeout of send or test APDUs. Default 15 sec.
l T2 - Timeout for acknowledges in case of no data messages. T2 < T1. Default 10 sec.
l T3 - Timeout for sending test frames in case of a long idle state. Default 20 sec.
l APDU sequence control parameters - Maximum number of outstanding I format APDUs
l k - Maximum difference between the receive and send sequence numbers. Default 12.
l w - Latest acknowledge after receiving w I format APDUs. w should not exceed 2/3 of k.
Default 8.
l Application layer properties
l Response timeout - Timeout for Application layer response messages. Default 10 sec.

The following properties are available for IEC 101 devices:

l Connection parameters
l Connection type
l TCP/IP - If enabled, communication over TCP will be used with the device.
l Remote port - The TCP port used to communicate with the device. Default 2404.
l UDP/IP - If enabled, communication over UDP will be used with the device.
l Listening port - The UDP port used to listen to incoming messages. Default 2405.
The listening port must be unique for all IEC 101 devices over UDP produced by the
same server list.
l Remote port - The UDP port used to send messages to the device. Default 2404.
l Link layer properties
l Link address - The Link layer address of the device. Default 0.
l Link address size - The size of the link address. Either 1 or 2 bytes. Default 2.
l Link mode - Unbalanced. Fixed value.
l T0 - Timeout of connection establishment. Default 30 sec.

- 553 -
l Session layer
l Common address of ASDU size - Size of the common address of ASDU. Either 1 or 2 3
bytes. Default 2.
l Cause of transmission (COT) size - Size of the cause of transmission. Either 1 or 2 bytes.
Default 2.
l Information object address (IOA) size - Size of the Information object address. Either 1, 2
or 3 bytes. Default 3.
l Application layer properties
l Response timeout - Timeout for Application layer response messages.
l Classes polling
l Class 1 polling delay - Polling interval for class 1 data. Default 0 means a new poll request is
sent as soon as the previous one is completed.
l Class 2 polling delay - Polling interval for class 2 data. Default 500 ms.
l Class 1 polling delay when an application layer response is pending - Polling interval for class 1
data when a request is pending. Default 0 means a new poll request is sent as soon as the pre-
vious one is completed.
l Class 2 polling delay when an application layer response is pending - Polling interval for class 2
data when a request is pending. Default 0 means a new poll request is sent as soon as the pre-
vious one is completed.
l Field devices redundancy
l Link status watchdog for standby devices - The interval at which the link status is checked for
standby devices. Default 1 sec.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the device. Only use
this if advised to do so by your support agency.

- 554 -
Adding Sectors to an IEC 60870-5 Device
A sector object in C-CURE Building Management System configuration represents, and provides access to, a
physical IEC 60870-5 sector. A sector normally represents a piece of discrete control equipment (for
example a circuit breaker) and is connected to the network via a device.
On an IEC 60870-5 network, a sector is identified by the Common address of ASDU. In C-CURE Building Man-
agement System, it is identified by the Name that you give it during the configuration.

Adding a Sector

1. Select an IEC 60870-5 device in the Application Explorer. From the task pane, select Add a sector to
open the Sector dialog. Show picture

2. In the Name field, enter a name for the IEC 60870-5 Sector.
3. Enter the optional descriptive text in the Description field. The description is only used in the Applic-
ation Explorer.
4. In the Common address of ADSU filed, enter the Sector's address. This is the identity of the Sector
within the Device through which it is connected.
5. Tick Activate at start-up if the sector is to be activated when the device is started.
6. Click on OK to confirm the configuration and close the dialog.

The Advanced tab


The Advanced tab contains the many sector properties, pre-set to recommended defaults and in most cases
will not need to be changed. Please refer to the documentation provided by the device manufacturer for prop-
erties that must match the device configuration. Show picture

- 555 -
The following properties are those that are most commonly changed.

l Communication properties
l Support activation termination (C_SE_ACTTERM) - If enabled, C-CURE Building Management Sys-
tem expects to receive a C_SE_ACTTERM message upon command termination. If such a mes-
sage is not received, the command is processed as failed. If disabled, the C_SE_
ACTTERM message is not expected and is not used to handle command failure.
l Address format - The format of the address of Information Objects. See the topic IEC 60870-5
variable mapping.
The IEC 101 prescribes formats structured or unstructured on 1, 2 or 3 bytes (MSB first), the
IEC 104 prescribes formats structured or unstructured on 3 bytes (MSB first). Other address
formats are provided for convenience to support communication with devices requiring such
interop provisions.
l Data exchange mechanisms
l Upon reception of end of init (EOI) - The list of initialization requests to send upon receiving the
EOI message.
l When a device comes online - The list of initialization requests to send when a device comes
online.
l When a device comes online (after a short offline period) - The list of initialization requests to
send when a device comes online after a short period offline.
l Short offline period definition - The maximum duration to consider an offline period as
short and apply the corresponding initialization sequence.
l Support spontaneous transmission - If enabled, C-CURE Building Management System listen for
spontaneous transmission and process them to refresh variables. If disabled, only periodic
requests are used to keep variables updated.
l Periodic requests
l General Interrogation (GI)
l Polling period - The time interval at which general interrogation requests are sent. Default
1 min.
l Interrogation of groups
l Group 1 to 16 - The time interval at which group interrogation requests are sent for each
group number. Not activated by default.
l General Counter Interrogation
l Polling period - The time interval at which general counter interrogation requests are sent.
Not activated by default.

- 556 -
l Interrogation of counter groups
l Group 1 to 4 - The time interval at which counter group interrogation requests are sent for
each group number. Not activated by default.
l Clock synchronization
l Execution period - The time interval at which clock synch requests are sent. Not activated
by default.
l Monitoring
l Double-point
l Overwrite default values - If enabled, overwrite the settings related to Double-point raw
value interpretation for all variables mapped on a double-point information object from
the selected sector.
l Data
l Timestamp
l UTC - If enabled, all timestamps received from the selected sector are interpreted as
expressed in UTC.
l Local - If enabled, all timestamps received from the selected sector are interpreted as
expressed in the Local time zone.

The property Overwriting threshold parameters can only be enabled if the setting Deadband property
- Control direction - Overwrite threshold parameters is activated.
Because sending threshold parameters can take a significant amount of time, in the case of the ini-
tialization when a device comes online after a short period offline, you have the choice to restart the
procedure, or resume the procedure if not completed. If you choose to resume, note that the
thresholds parameters will not be sent at all if the procedure went to completion during an earlier ini-
tialization sequence and you are just facing short communication interruptions.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the Sector. Only use
this if advised to do so by your support agency.

- 557 -
Adding a Standby Device
What is a standby device?
A standby device provides a redundant network path to the field device or a path to an alternate redundant
field device (another IP address). Should the main device fail, communication is automatically switched to
the standby device thereby providing continuous service.
Sectors and variable mapping is not necessary for the standby device as it is assumed to be the same as the
primary device.

Adding a standby device

1. Select an existing IEC 60870-5 network and device in the Application Explorer. In the lower right pane
task bar, select Add a standby Device. Show picture

2. The Device Creation dialog opens with default properties.


3. A device Name is generated automatically. You can either accept it or enter a name more appropriate
to a standby device.
4. Enter the IP Address for the standby device.
5. Configure the other properties, including those in the Advanced tab. It is probable that they will need
to be the same as the main device. See Adding Devices to an IEC 60870-5 network for more inform-
ation.
6. Click on OK to confirm the configuration and close the dialog.

Standby device operation


When C-CURE Building Management System starts, it will attempt to communicate with the main and
standby devices to check their presence. If the primary device is available, it will retrieve the value of any
mapped variables from it.
If the primary device is not available at startup, or if it fails later, value retrieval for the mapped variables
automatically switches to a standby device.
C-CURE Building Management System will continue to try and establish communication with the failed
primary device, but it will not automatically switch back when communication is re-established.
You can force a switch back to the primary device using the following methods.

l Restarting C-CURE Building Management System.


l Manually, using the Activate Device task in the Application Explorer.
l Using a SCADA Basic script incorporating the M60870_5 instruction, SWITCHOVER mode.

You can create more than one standby device for a single main device. In the case of failure of the
main device, the first standby device is selected. If that standby device also fails, the second
standby device is selected, etc.

System status variables

- 558 -
Specific system status variables are provided for standby device management. See the IEC 60870-5 status
variables book for information.

- 559 -
Mapping IEC 60870-5 information objects to variables
The IEC 60870-5 Mapping dialog is used to map (link) IEC 60870-5 information objects to C-CURE Building
Management System variables. It can be opened from the Application Explorer when an IEC 60870-5 net-
work is selected by using the Mapping task.
The left pane contains a tree display of the devices, sectors and information object types of the selected IEC
60870-5 network. The right pane contains a list of all addresses for the selected information object type,
together with any variables to which they are linked. An icon adjacent to each address indicates the type of
variable with which it corresponds. Show picture

The format of the address depends on the Address format property as defined for the sector.

Right clicking in an empty area in the right pane displays a context menu allowing you to choose the columns
to display:

l Name - The Information Object Address.


l Variable - The name of the variable mapped on the IOA if any.
l Flags - The status flags of the Information Object (valid or not).
l Timestamp - The timestamp when the Information Object was last refreshed.
l Cause of transmission - The Cause of transmission corresponding to the last refresh of the Inform-
ation Object.

Right clicking on a row corresponding to an IOA in the right pane displays a context menu with the following
commands:

l Map a new variable - Creates a new variable and map it on the selected IOA.
l Map existing variable - Opens the Variable Selector dialog to select an existing variable and map it on
the selected IOA.
l Unmap variable - Un-maps (removes the link) the selected variable from the corresponding inform-
ation object.
l Variable properties - Opens the properties of the variable mapped to the IOA.
l Read - Forces a read request for the IOA. If successful, the Value, Flags, Timestamp and Cause of
transmission columns are refreshed.
l Select columns - To choose the columns to display.

How to map an information object to an existing variable

1. Right click in the right pane of the IEC 60870-5 Mapping dialog on the row corresponding to the
IOA you want the variable to be mapped to.
2. From the pop-up menu, select the Map existing variable command. The Variable Selector dialog
opens. Show picture

- 560 -
3. Select the variable to be mapped. Click the Apply button, the link between the information object
address and the variable is made.

In this context, the variable selector is not modal. Once the variable selector is open and you have mapped
a first variable, you can select another IOA in the mapping dialog and then select another variable to be
mapped on it without having to close and re-open the variable selector.

How to un-map a variable

1. Open the IEC 60870-5 Mapping dialog and select the IOA corresponding to the variable to be un-
mapped.
2. Right click on the selected variable and, from the context menu, select the command Unmap variable.

How to map a new variable


You can automatically create a variable and map it to an information object address using the following
method:

l Right click on the information object address (that is not yet mapped to any variable) and, from the
context menu, select Map new variable. A variable with default properties and the correct type to
match the item is automatically created and linked to it. By default, the variable name is constructed
using the following syntax. <Network>.<Device>.<Sector>.<Type>.<Address>, and you can cus-
tomize it if need be. Show picture

Double clicking on an information object address that is not yet mapped to any variable proposes
you to map a new variable.
Double clicking on an information object address that is already mapped to a variable opens the vari-
able properties.

- 561 -
IEC 60870-5-104 Master PICS (Protocol Implementation Conformance State-
ment)
1 Introduction
This document describes the specific implementation of the IEC 60870-5-104 master driver in C-CURE Build-
ing Management System.
It is based on the IEC 60870-5-104 edition 2 standard document, starting on page 93.
Selected parameters are marked as follows:

Function or ASDU is not used

X Function or ASDU is used as standardized (default)

R Function or ASDU is used in reverse mode

B Function or ASDU is used in standard and reverse mode

The possible selection (blank, X, R, or B) is specified for each specific clause or parameter.
A black check box indicates that the option cannot be selected in this standard.

2 System or device
(system-specific parameter, indicate the station’s function by marking one of the following with ‘X’)

System definition

X Controlling station definition (Master)

Controlled station definition (Slave)

3 Network configuration
(network-specific parameter, all configurations that are used are to be marked ‘X’)

Point-to-point Multipoint

Multiple point-to-point Multipoint-star

4 Physical layer
(network-specific parameter, all interfaces and data rates that are used are to be marked ‘X’)
Transmission speed (control direction)

Unbalanced interchange Unbalanced interchange


Balanced interchange
Circuit V.24/V.28 Circuit V.24/V.28
Circuit X.24/X.27
Standard Recommended if >1 200bit/s
100 bit/s 2 400 bit/s 2 400 bit/s 56 000 bit/s

200 bit/s 4 800 bit/s 4 800 bit/s 64 000 bit/s

- 562 -
300 bit/s 9 600 bit/s 9 600 bit/s

600 bit/s 19 200 bit/s

1 200 bit/s 38 400 bit/s

Transmission speed (monitor direction)

Unbalanced interchange Unbalanced interchange


Balanced interchange
Circuit V.24/V.28 Circuit V.24/V.28
Circuit X.24/X.27
Standard Recommended if >1 200bit/s
100 bit/s 2 400 bit/s 2 400 bit/s 56 000 bit/s

200 bit/s 4 800 bit/s 4 800 bit/s 64 000 bit/s

300 bit/s 9 600 bit/s 9 600 bit/s

600 bit/s 19 200 bit/s

1 200 bit/s 38 400 bit/s

5 Link layer
(network-specific parameter, all options that are used are to be marked ‘X’. Specify the maximum frame
length. If a non-standard assignment of class 2 messages is implemented for unbalanced transmission, indic-
ate the Type ID and COT of all messages assigned to class 2.)
Frame format FT 1.2, single character 1 and the fixed time out interval are used exclusively in this com-
panion standard.

Link transmission Address field of the link

Balanced transmission not present (balanced transmission only)

Unbalanced transmission One octet

Frame length Two octets

Structured
Maximum length L
(number of octets)
Unstructured

When using an unbalanced link layer, the following ASDU types are returned in class 2 messages (low pri-
ority) with the indicated causes of transmission:

The standard assignment of ASDUs to class 2 messages is used as follows:

- 563 -
Type identification Cause of transmission
9, 11, 13, 21 <1>

A special assignment of ASDUs to class 2 messages is used as follows:

Type identification Cause of transmission

Note: (In response to a class 2 poll, a controlled station may respond with class 1 data when there is no
class 2 data available).

6 Application layer
Transmission mode for application data
Mode 1 (Least significant octet first), as defined in clause 4.10 of IEC 60870-5-4, is used exclusively in this
companion standard.
Common address of ASDU
(system-specific parameter, all configurations that are used are to be marked ‘X’)

One octet X Two octets

Information object address


(system-specific parameter, all configurations that are used are to be marked ‘X’)

One octet X Structured

Two octets X Unstructured

X Three octets

Cause of transmission
(system-specific parameter, all configurations that are used are to be marked ‘X’)

One
X Two octets (with originator address) Originator address is set to zero if
octet
not used

Length of APDU
(system-specific parameter, specify the maximum length of the APDU per system)
The maximum length of APDU for both directions is 253. It is a fixed system parameter.

Maximum length of APDU per system in control direction

Maximum length of APDU per system in monitor direction

- 564 -
Selection of standard ASDUs
Process information in monitor direction
(station-specific parameter, mark each Type ID ‘X’ if it is only used in the standard direction, ‘R’ if only used
in the reverse direction, and ‘B’ if used in both directions)

X <1>:=Single-point information M_SP_NA_1

<2>:=Single-point information with time tag M_SP_TA_1

X <3>:=Double-point information M_DP_NA_1

<4>:=Double-point information with time tag M_DP_TA_1

X <5>:=Step position information M_ST_NA_1

<6>:=Step position information with time tag M_ST_TA_1

X <7>:=Bitstring of 32 bit M_BO_NA_1

<8>:=Bitstring of 32 bit with time tag M_BO_TA_1

X <9>:=Measured value, normalized value M_ME_NA_1

<10>:=Measured value, normalized value with time tag M_ME_TA_1

X <11>:=Measured value, scaled value M_ME_NB_1

<12>:=Measured value, scaled value with time tag M_ME_TB_1

X <13>:=Measured value, short floating point value M_ME_NC_1

<14>:=Measured value, short floating point value with time tag M_ME_TC_1

X <15>:=Integrated totals M_IT_NA_1

<16>:=Integrated totals with time tag M_IT_TA_1

<17>:=Event of protection equipment with time tag M_EP_TA_1

<18>:=Packed start events of protection equipment with time tag M_EP_TB_1

<19>:=Packed output circuit information of protection equipment with time tag M_EP_TC_1

- 565 -
<20>:=Packed single-point information with status change detection M_SP_NA_1

X <21>:=Measured value, normalized value without quality descriptor M_ME_ND_1

X <30>:=Single-point information with time tag CP56Time2a M_SP_TB_1

X <31>:=Double-point information with time tag CP56Time2a M_DP_TB_1

X <32>:=Step position information with time tag CP56Time2a M_ST_TB_1

X <33>:=Bitstring of 32 bit with time tag CP56Time2a M_BO_TB_1

X <34>:=Measured value, normalized value with time tag CP56Time2a M_ME_TD_1

X <35>:=Measured value, scaled value with time tag CP56Time2a M_ME_TE_1

X <36>:=Measured value, short floating point value with time tag CP56Time2a M_ME_TF_1

X <37>:=Integrated totals with time tag CP56Time2a M_IT_TB_1

<38>:=Event of protection equipment with time tag CP56Time2a M_EP_TD_1

<39>:=Packed start events of protection equipment with time tag CP56Time2a M_EP_TE_1

<40>:=Packed output circuit information of protection equipment with time tag CP56Time2a
M_EP_TF_1

In this companion standard only the use of the set <30> – <40> for ASDUs with time tag is permitted.
Process information in control direction
(station-specific parameter, mark each Type ID ‘X’ if it is only used in the standard direction, ‘R’ if only used
in the reverse direction, and ‘B’ if used in both directions)

X <45>:=Single command C_SC_NA_1

X <46>:=Double command C_DC_NA_1

X <47>:=Regulating step command C_RC_NA_1

X <48>:=Set point command, normalized value C_SE_NA_1

X <49>:=Set point command, scaled value C_SE_NB_1

X <50>:=Set point command, short floating point value C_SE_NC_1

- 566 -
X <51>:=Bitstring of 32 bit C_BO_NA_1

X <58>:=Single command with time tag CP56Time 2a C_SC_TA_1

X <59>:=Double command with time tag CP56Time 2a C_DC_TA_1

X <60>:=Regulating step command with time tag CP56Time 2a C_RC_TA_1

X <61>:=Set point command, normalized value with time tag CP56Time 2a C_SE_TA_1

X <62>:=Set point command, scaled value with time tag CP56Time 2a C_SE_TB_1

X <63>:=Set point command, short floating point value with time tag CP56Time 2a C_SE_TC_1

X <64>:=Bitstring of 32 bit with time tag CP56Time 2a C_BO_TA_1

Either the ASDUs of the set <45> – <51> or of the set <58> – <64> are used.
System information in monitor direction
(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <70>:=End of initialization M_EI_NA_1

System information in control direction


(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <100>:=Interrogation command C_IC_NA_1

X <101>:=Counter interrogation command C_CI_NA_1

X <102>:=Read command C_RD_NA_1

X <103>:=Clock synchronization command (option see 7.6) C_CS_NA_1

X <104>:=Test command C_TS_NA_1

X <105>:=Reset process command C_RP_NA_1

<106>:=Delay acquisition command C_CD_NA_1

X <107>:=Test command with time tag CP56time2a C_TS_TA_1

- 567 -
Parameter in control direction
(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <110>:=Parameter of measured value, normalized value P_ME_NA_1

X <111>:=Parameter of measured value, scaled value P_ME_NB_1

X <112>:=Parameter of measured value, short floating point value P_ME_NC_1

<113>:=Parameter activation P_AC_NA_1

File Transfer
(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

<120>:=File ready F_FR_NA_1

<121>:=Section ready F_SR_NA_1

<123>:=Last section, last segment F_LS_NA_1

<122>:=Call directory, select file, call file, call section F_SC_NA_1

<124>:=Ack file, ack section F_AF_NA_1

<125>:=Segment F_SG_NA_1

<126>:=Directory {blank or X, only available in monitor (standard) direction} F_DR_TA_1

<127>:=Query Log – Request archive file F_SC_NB_1

Type identifier and cause of transmission assignments


(station-specific parameters)
Shaded boxes are not required.
Black boxes are not permitted in this companion standard
Blank: functions or ASDU not used.
Mark Type Identification/Cause of transmission combinations:
‘X’ if only used in the standard direction
‘R’ if only used in the reverse direction
‘B’ if used in both directions

Type
iden-
Cause of transmission
tific-
ation

per- bac- spon- ini- req- acti- activ- deac- deac- acti- re- re- fil- inter- re- unkn- unkn- un- unk-
iod- kgro- tane- tial- ues- vati- ation tiv- -tiv-
568 - vati-
tu- tu- e rog- qu-
own own kn- now-
ic, und ous ize- t or on con- atio- ation on tra- type caus-
rn es-
rn
inf- t
inf- ow-
o by
o n
ca- gr-
ca- co- n
us- ated ou-
us- m- info-
ed by p
ter- ed e of mo- rma-
req- con- by grou- <- iden-
cyc- firm- min- by nsf- tran- n tion
scan d ues- n firm- a p n> tific-
lic ation atio- a er smis- ad- obje-
ted ation re- <nu- co- ation
n lo- sion dre- ct
m- mbe- un-
ca- ss addr-
ot- r> ter
l of ess
e re-
c- AS-
c- qu-
m- DU
m- es-
d
d t
20 37
1 2 3 4 5 6 7 8 9 10 11 12 13 to to 44 45 46 47
36 41
M-
_
S-
<- P-
1- _ X X X X X X
> N-
A-
_
1
M-
_
S-
<- P-
2- _
> T-
A-
_
1
M-
_
D-
<- P-
3- _ X X X X X X
> N-
A-
_
1
M-
_
D-
<-
P-
4-
_
>
T-
A-
_

- 569 -
1
M-
_
S-
<- T-
5- _ X X X X X X
> N-
A-
_
1
M-
_
S-
<- T-
6- _
> T-
A-
_
1
M-
_
B-
<- O-
7- _ X X X X
> N-
A-
_
1
M-
_
B-
<- O-
8- _
> T-
A-
_
1
M-
_
M-
<- E-
9- _ X X X X X
> N-
A-
_
1
M-
_
<-
M-
1-
E-
0-
_
>
T-
A-

- 570 -
_
1
M-
_
M-
<-
E-
1-
_ X X X X X
1-
N-
>
B-
_
1
M-
_
M-
<-
E-
1-
_
2-
T-
>
B-
_
1
M-
_
M-
<-
E-
1-
_ X X X X X
3-
N-
>
C-
_
1
M-
_
M-
<-
E-
1-
_
4-
T-
>
C-
_
1
M-
_
I-
<-
T-
1-
_ X X
5-
N-
>
A-
_
1
M-
<- _
1- I-
6- T-
> _
T-

- 571 -
A-
_
1
M-
_
E-
<-
P-
1-
_
7-
T-
>
A-
_
1
M-
_
E-
<-
P-
1-
_
8-
T-
>
B-
_
1
M-
_
E-
<-
P-
1-
_
9-
T-
>
C-
_
1
M-
_
P-
<-
S-
2-
_
0-
N-
>
A-
_
1
M-
_
M-
<-
E-
2-
_ X X X X X
1-
N-
>
D-
_
1
M-
<-
_
3-
S- X X X X
0-
P-
>
_

- 572 -
T-
B-
_
1
M-
_
D-
<-
P-
3-
_ X X X X
1-
T-
>
B-
_
1
M-
_
S-
<-
T-
3-
_ X X X X
2-
T-
>
B-
_
1
M-
_
B-
<-
O-
3-
_ X X
3-
T-
>
B-
_
1
M-
_
M-
<-
E-
3-
_ X X
4-
T-
>
D-
_
1
M-
_
M-
<-
E-
3-
_ X X
5-
T-
>
E-
_
1

<- M-
3- _
M- X X
6-
> E-

- 573 -
_
T-
F-
_
1
M-
_
I-
<-
T-
3-
_ X X
7-
T-
>
B-
_
1
M-
_
E-
<-
P-
3-
_
8-
T-
>
D-
_
1
M-
_
E-
<-
P-
3-
_
9-
T-
>
E-
_
1
M-
_
E-
<-
P-
4-
_
0-
T-
>
F-
_
1
C-
_
S-
<-
C-
4-
_ X X X X X X X X X
5-
N-
>
A-
_
1

<- C-
4- _ X X X X X X X X X
6- D-

- 574 -
C-
_
N-
>
A-
_
1
C-
_
R-
<-
C-
4-
_ X X X X X X X X X
7-
N-
>
A-
_
1
C-
_
S-
<-
E-
4-
_ X X X X X X X X X
8-
N-
>
A-
_
1
C-
_
S-
<-
E-
4-
_ X X X X X X X X X
9-
N-
>
B-
_
1
C-
_
S-
<-
E-
5-
_ X X X X X X X X X
0-
N-
>
C-
_
1
C-
_
B-
<-
O-
5-
_ X X X X X
1-
N-
>
A-
_
1

<- C-
X X X X X X X X X
5- _

- 575 -
S-
C-
_
8-
T-
>
A-
_
1
C-
_
D-
<-
C-
5-
_ X X X X X X X X X
9-
T-
>
A-
_
1
C-
_
R-
<-
C-
6-
_ X X X X X X X X X
0-
T-
>
A-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
1-
T-
>
A-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
2-
T-
>
B-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
3-
T-
>
C-
_
1

<- C- X X X X X X X

- 576 -
_
B-
O-
6-
_
4-
T-
>
A-
_
1
M-
_
E-
<-
I_
7-
N- X
0-
A-
>
_
1-
*
C-
_
I-
<-
C-
10-
_ X X X X X X X X X
0-
N-
>
A-
_
1
C-
_
<- C-
10- I_
X X X X X X X
1- N-
> A-
_
1
C-
_
R-
<-
D-
10-
_
2-
N-
>
A-
_
1
C-
_
C-
<-
S-
10-
_ X X X X
3-
N-
>
A-
_
1

<- C-

- 577 -
_
T-
S-
10-
_
4-
N-
>
A-
_
1
C-
_
R-
<-
P-
10-
_ X X X
5-
N-
>
A-
_
1
C-
_
C-
<-
D-
10-
_
6-
N-
>
A-
_
1
C-
_
T-
<-
S-
10-
_ X X X
7-
T-
>
A-
_
1
P-
_
M-
<-
E-
11-
_
0-
N-
>
A-
_
1
P-
_
M-
<-
E-
11-
_
1-
N-
>
B-
_
1

- 578 -
P-
_
M-
<-
E-
11-
_
2-
N-
>
C-
_
1
P-
_
A-
<-
C-
11-
_
3-
N-
>
A-
_
1
F-
_
F-
<-
R-
12-
_
0-
N-
>
A-
_
1
F-
_
S-
<-
R-
12-
_
1-
N-
>
A-
_
1
F-
_
S-
<-
C-
12-
_
2-
N-
>
A-
_
1
F-
_
L-
<-
S-
12-
_
3-
N-
>
A-
_
1

- 579 -
F-
_
A-
<-
F-
12-
_
4-
N-
>
A-
_
1
F-
_
S-
<-
G-
12-
_
5-
N-
>
A-
_
1
F-
_
D-
<- R-
12- _
6- T-
> A-
_
1-
*
F-
_
S-
<- C-
12- _
7- N-
> B-
_
1-
*
* Blank or X only

7 Basic application functions


Station initialization
(station-specific parameter, mark ‘X’ if function is used)

X Remote

Cyclic data transmission


(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Cyclic data transmission

Read procedure

- 580 -
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Read procedure

Spontaneous transmission
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Spontaneous

Double transmission of information objects with cause of transmission spontaneous


(station-specific parameter, mark each information type ‘X’ where both a Type ID without time and cor-
responding Type ID with time are issued in response to a single spontaneous change of a monitored object)
The following type identifications may be transmitted in succession caused by a single status change of an
information object. The particular information object addresses for which double transmission is enabled
are defined in a project-specific list.

Single-point information M_SP_NA_1, M_SP_TA_1, M_SP_TB_1 and M_PS_NA_1

Double-point information M_DP_NA_1, M_DP_TA_1 and M_DP_TB_1

Step position information M_ST_NA_1, M_ST_TA_1 and M_ST_TB_1

Bitstring of 32 bit M_BO_NA_1, M_BO_TA_1 and M_BO_TB_1 (if defined for a specific project)

Measured value, normalized value M_ME_NA_1, M_ME_TA_1, M_ME_ND_1 and M_ME_TD_1

Measured value, scaled value M_ME_NB_1, M_ME_TB_1 and M_ME_TE_1

Measured value, short floating point number M_ME_NC_1, M_ME_TC_1 and M_ME_TF_1

Station interrogation
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X global

X group 1 X group 7 X group 13

X group 2 X group 8 X group 14

X group 3 X group 9 X group 15

X group 4 X group 10 X group 16

- 581 -
X group 5 X group 11

X group 6 X group 12

Information Object Addresses assigned to each group must be shown in a separate table.
Clock synchronization
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Clock synchronization

Day of week used

RES1, GEN (time tag substituted/ not substituted) used

SU-bit (summertime) used

Command transmission
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Direct command transmission

X Direct set point command transmission

X Select and execute command

X Select and execute set point command

X C_SE ACTTERM used

X No additional definition

X Short pulse duration (duration determined by a system parameter in the outstation)

X Long pulse duration (duration determined by a system parameter in the outstation)

X Persistent output

X Supervision of maximum delay in command direction of commands and set point commands

Maximum allowable delay of commands and


Configurable
set point commands

- 582 -
Transmission of integrated totals
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Mode A: Local freeze with spontaneous transmission

X Mode B: Local freeze with counter interrogation

X Mode C: Freeze by counter-interrogation commands

X Mode D: Freeze by counter-interrogation command, frozen values reported spontaneously

X Counter read

Counter freeze without reset

Counter freeze with reset

Counter reset

X General request counter

X Request counter group 1

X Request counter group 2

X Request counter group 3

X Request counter group 4

Parameter loading
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Threshold value

X Smoothing factor

X Low limit for transmission of measured values

X High limit for transmission of measured values

Parameter activation

- 583 -
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Act/deact of persistent cyclic or periodic transmission of the addressed object

Test procedure
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Test

File transfer
(station-specific parameter, mark ‘X’ if function is used)
File transfer in monitor direction

Transparent file

Transmission of disturbance data of protection equipment

Transmission of sequences of events

Transmission of sequences of recorded analog values

File transfer in control direction

Transparent file

Background scan
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Background scan

Acquisition of transmission delay


(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Acquisition of transmission delay

Definition of time outs

Parameter Default value Remarks Selected value


t0 30s Time-out of connection establishment Configurable
t1 15s Time-out of send or test APDUs Configurable
t2 10s Time-out for acknowledges in case of no data messages t2 < t1 Configurable
t3 20s Time-out for sending test frames in case of a long idle state Configurable

Maximum range of values for all time outs: 1 to 255 s, accuracy 1 s

- 584 -
Maximum number of outstanding I format APDUs k and latest acknowledge APDUs (w)

Default Selected
Parameter Remarks
value value
Maximum difference receive sequence number to send state vari-
k 12 APDUs Configurable
able
w 8 APDUs Latest acknowledge after receiving w I-format APDUs Configurable

Maximum range of values k: 1 to 32767 (215-1) APDUs, accuracy 1 APDU


Maximum range of values w: 1 to 32767 APDUs, accuracy 1 APDU (Recommendation: w should not exceed
two-thirds of k).
Port number

Parameter Value Remarks


Port number 2404 Configurable

Redundant connections

N* Number N of redundancy group connections used


* CimWay uses 1 group per device and its associated standby devices.

RFC 2200 suite


RFC 2200 is an official Internet Standard which describes the state of standardization of protocols used in
the Internet as determined by the Internet Architecture Board (IAB). It offers a broad spectrum of actual
standards used in the Internet. The suitable selection of documents from RFC 2200 defined in this standard
for given projects has to be chosen by the user of this standard.

X Ethernet 802.3

Serial X.21 interface

Other selection from RFC 2200:

List of valid documents from RFC 2200


1. ……………………………………………..
2. ……………………………………………..
3. ……………………………………………..
4. ……………………………………………..
5. ……………………………………………..
etc.

- 585 -
IEC 60870-5-101 Master PICS (Protocol Implementation Conformance State-
ment)
1 Introduction
This document describes the specific implementation of the IEC 60870-5-101 master driver in C-CURE Build-
ing Management System.
It is based on the IEC 60870-5-101 edition 2 standard document, starting on page 93 but only operates in
unbalanced mode over TCP or UDP. While this flavor of the IEC 101 over IP does not correspond to the ori-
ginal standard, it is used in a variety of systems where legacy IEC 101 devices are accessed through serial-
to-IP gateways.
Selected parameters are marked as follows:

Function or ASDU is not used

X Function or ASDU is used as standardized (default)

R Function or ASDU is used in reverse mode

B Function or ASDU is used in standard and reverse mode

The possible selection (blank, X, R, or B) is specified for each specific clause or parameter.

2 System or device
(system-specific parameter, indicate the station’s function by marking one of the following with ‘X’)

System definition

X Controlling station definition (Master)

Controlled station definition (Slave)

3 Network configuration
(network-specific parameter, all configurations that are used are to be marked ‘X’)

Point-to-point Multipoint

Multiple point-to-point Multipoint-star

4 Physical layer
(network-specific parameter, all interfaces and data rates that are used are to be marked ‘X’)
Transmission speed (control direction)

Unbalanced interchange Unbalanced interchange


Balanced interchange
Circuit V.24/V.28 Circuit V.24/V.28
Circuit X.24/X.27
Standard Recommended if >1 200bit/s
100 bit/s 2 400 bit/s 2 400 bit/s 56 000 bit/s

- 586 -
200 bit/s 4 800 bit/s 4 800 bit/s 64 000 bit/s

300 bit/s 9 600 bit/s 9 600 bit/s

600 bit/s 19 200 bit/s

1 200 bit/s 38 400 bit/s

Transmission speed (monitor direction)

Unbalanced interchange Unbalanced interchange


Balanced interchange
Circuit V.24/V.28 Circuit V.24/V.28
Circuit X.24/X.27
Standard Recommended if >1 200bit/s
100 bit/s 2 400 bit/s 2 400 bit/s 56 000 bit/s

200 bit/s 4 800 bit/s 4 800 bit/s 64 000 bit/s

300 bit/s 9 600 bit/s 9 600 bit/s

600 bit/s 19 200 bit/s

1 200 bit/s 38 400 bit/s

5 Link layer
(network-specific parameter, all options that are used are to be marked ‘X’. Specify the maximum frame
length. If a non-standard assignment of class 2 messages is implemented for unbalanced transmission, indic-
ate the Type ID and COT of all messages assigned to class 2.)
Frame format FT 1.2, single character 1 and the fixed time out interval are used exclusively in this com-
panion standard.

Link transmission Address field of the link

Balanced transmission not present (balanced transmission only)

X Unbalanced transmission X One octet

Frame length X Two octets

Maximum length L
Structured
(control direction)

Maximum length L
X Unstructured
(monitor direction)

- 587 -
Time during which repetitions are permitted (Trp) or number of repetitions

When using an unbalanced link layer, the following ASDU types are returned in class 2 messages (low pri-
ority) with the indicated causes of transmission:

X The standard assignment of ASDUs to class 2 messages is used as follows:

Type identification Cause of transmission


9, 11, 13, 21 <1>

A special assignment of ASDUs to class 2 messages is used as follows:

Type identification Cause of transmission

Note: (In response to a class 2 poll, a controlled station may respond with class 1 data when there is no
class 2 data available).

6 Application layer
Transmission mode for application data
Mode 1 (Least significant octet first), as defined in clause 4.10 of IEC 60870-5-4, is used exclusively in this
companion standard.
Common address of ASDU
(system-specific parameter, all configurations that are used are to be marked ‘X’)

X One octet X Two octets

Information object address


(system-specific parameter, all configurations that are used are to be marked ‘X’)

X One octet X Structured

X Two octets X Unstructured

X Three octets

Cause of transmission
(system-specific parameter, all configurations that are used are to be marked ‘X’)

X One octet X Two octets (with originator address)


Originator address is set to zero if not used

- 588 -
Length of APDU
(system-specific parameter, specify the maximum length of the APDU per system)
The maximum length of APDU for both directions is 253. It is a fixed system parameter.

253 Maximum length of APDU per system in control direction

253 Maximum length of APDU per system in monitor direction

Selection of standard ASDUs


Process information in monitor direction
(station-specific parameter, mark each Type ID ‘X’ if it is only used in the standard direction, ‘R’ if only used
in the reverse direction, and ‘B’ if used in both directions)

X <1>:=Single-point information M_SP_NA_1

X <2>:=Single-point information with time tag M_SP_TA_1

X <3>:=Double-point information M_DP_NA_1

X <4>:=Double-point information with time tag M_DP_TA_1

X <5>:=Step position information M_ST_NA_1

X <6>:=Step position information with time tag M_ST_TA_1

X <7>:=Bitstring of 32 bit M_BO_NA_1

X <8>:=Bitstring of 32 bit with time tag M_BO_TA_1

X <9>:=Measured value, normalized value M_ME_NA_1

X <10>:=Measured value, normalized value with time tag M_ME_TA_1

X <11>:=Measured value, scaled value M_ME_NB_1

X <12>:=Measured value, scaled value with time tag M_ME_TB_1

X <13>:=Measured value, short floating point value M_ME_NC_1

X <14>:=Measured value, short floating point value with time tag M_ME_TC_1

X <15>:=Integrated totals M_IT_NA_1

X <16>:=Integrated totals with time tag M_IT_TA_1

- 589 -
<17>:=Event of protection equipment with time tag M_EP_TA_1

<18>:=Packed start events of protection equipment with time tag M_EP_TB_1

<19>:=Packed output circuit information of protection equipment with time tag M_EP_TC_1

<20>:=Packed single-point information with status change detection M_SP_NA_1

X <21>:=Measured value, normalized value without quality descriptor M_ME_ND_1

X <30>:=Single-point information with time tag CP56Time2a M_SP_TB_1

X <31>:=Double-point information with time tag CP56Time2a M_DP_TB_1

X <32>:=Step position information with time tag CP56Time2a M_ST_TB_1

X <33>:=Bitstring of 32 bit with time tag CP56Time2a M_BO_TB_1

X <34>:=Measured value, normalized value with time tag CP56Time2a M_ME_TD_1

X <35>:=Measured value, scaled value with time tag CP56Time2a M_ME_TE_1

X <36>:=Measured value, short floating point value with time tag CP56Time2a M_ME_TF_1

X <37>:=Integrated totals with time tag CP56Time2a M_IT_TB_1

<38>:=Event of protection equipment with time tag CP56Time2a M_EP_TD_1

<39>:=Packed start events of protection equipment with time tag CP56Time2a M_EP_TE_1

<40>:=Packed output circuit information of protection equipment with time tag CP56Time2a
M_EP_TF_1

In this companion standard only the use of the set <30> – <40> for ASDUs with time tag is permitted.
Process information in control direction
(station-specific parameter, mark each Type ID ‘X’ if it is only used in the standard direction, ‘R’ if only used
in the reverse direction, and ‘B’ if used in both directions)

X <45>:=Single command C_SC_NA_1

X <46>:=Double command C_DC_NA_1

- 590 -
X <47>:=Regulating step command C_RC_NA_1

X <48>:=Set point command, normalized value C_SE_NA_1

X <49>:=Set point command, scaled value C_SE_NB_1

X <50>:=Set point command, short floating point value C_SE_NC_1

X <51>:=Bitstring of 32 bit C_BO_NA_1

X <58>:=Single command with time tag CP56Time 2a C_SC_TA_1

X <59>:=Double command with time tag CP56Time 2a C_DC_TA_1

X <60>:=Regulating step command with time tag CP56Time 2a C_RC_TA_1

X <61>:=Set point command, normalized value with time tag CP56Time 2a C_SE_TA_1

X <62>:=Set point command, scaled value with time tag CP56Time 2a C_SE_TB_1

X <63>:=Set point command, short floating point value with time tag CP56Time 2a C_SE_TC_1

X <64>:=Bitstring of 32 bit with time tag CP56Time 2a C_BO_TA_1

Either the ASDUs of the set <45> – <51> or of the set <58> – <64> are used.
System information in monitor direction
(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <70>:=End of initialization M_EI_NA_1

System information in control direction


(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <100>:=Interrogation command C_IC_NA_1

X <101>:=Counter interrogation command C_CI_NA_1

X <102>:=Read command C_RD_NA_1

X <103>:=Clock synchronization command (option see 7.6) C_CS_NA_1

X <104>:=Test command C_TS_NA_1

- 591 -
X <105>:=Reset process command C_RP_NA_1

<106>:=Delay acquisition command C_CD_NA_1

X <107>:=Test command with time tag CP56time2a C_TS_TA_1

Parameter in control direction


(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <110>:=Parameter of measured value, normalized value P_ME_NA_1

X <111>:=Parameter of measured value, scaled value P_ME_NB_1

X <112>:=Parameter of measured value, short floating point value P_ME_NC_1

<113>:=Parameter activation P_AC_NA_1

File Transfer
(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

<120>:=File ready F_FR_NA_1

<121>:=Section ready F_SR_NA_1

<123>:=Last section, last segment F_LS_NA_1

<122>:=Call directory, select file, call file, call section F_SC_NA_1

<124>:=Ack file, ack section F_AF_NA_1

<125>:=Segment F_SG_NA_1

<126>:=Directory {blank or X, only available in monitor (standard) direction} F_DR_TA_1

<127>:=Query Log – Request archive file F_SC_NB_1

Type identifier and cause of transmission assignments


(station-specific parameters)
Shaded boxes are not required.
Black boxes are not permitted in this companion standard
Blank: functions or ASDU not used.
Mark Type Identification/Cause of transmission combinations:
‘X’ if only used in the standard direction

- 592 -
‘R’ if only used in the reverse direction
‘B’ if used in both directions

Type
iden-
Cause of transmission
tific-
ation
re- re-
re-
tu- qu-
tu- un-
rn es-
rn kn-
inf- t
inf- ow- unk-
o inter- by
o n now-
acti- ca- rog- gr- unkn-
req- deac- ca- unkn- co- n
per- activ- vati- us- fil- ated ou- own
bac- ini- ues- deac- tiv- us- own m- info-
iod- spon- acti- ation on ed e by p caus-
kgro- tial- t or tiv- ation ed type mo- rma-
ic, tane- vati- con- ter- by tra- grou- <- e of
und ize- req- atio- con- by iden- n tion
cyc- ous on firm- min- a nsf- p n> tran-
scan d ues- n firm- a tific- ad- obje-
lic ation atio- re- er <nu- co- smis-
ted ation lo- ation dre- ct
n m- mbe- un- sion
ca- ss addr-
ot- r> ter
l of ess
e re-
c- AS-
c- qu-
m- DU
m- es-
d
d t
20 37
1 2 3 4 5 6 7 8 9 10 11 12 13 to to 44 45 46 47
36 41
M-
_
S-
<- P-
1- _ X X X X X X
> N-
A-
_
1
M-
_
S-
<- P-
2- _ X X X X X X
> T-
A-
_
1
M-
_
D-
<- P-
3- _ X X X X X X
> N-
A-
_
1

- 593 -
M-
_
D-
<- P-
4- _ X X X X X X
> T-
A-
_
1
M-
_
S-
<- T-
5- _ X X X X X X
> N-
A-
_
1
M-
_
S-
<- T-
6- _ X X X X X X
> T-
A-
_
1
M-
_
B-
<- O-
7- _ X X X X
> N-
A-
_
1
M-
_
B-
<- O-
8- _ X X X X
> T-
A-
_
1
M-
_
M-
<- E-
9- _ X X X X X
> N-
A-
_
1

- 594 -
M-
_
M-
<-
E-
1-
_ X X X X
0-
T-
>
A-
_
1
M-
_
M-
<-
E-
1-
_ X X X X X
1-
N-
>
B-
_
1
M-
_
M-
<-
E-
1-
_ X X X X
2-
T-
>
B-
_
1
M-
_
M-
<-
E-
1-
_ X X X X X
3-
N-
>
C-
_
1
M-
_
M-
<-
E-
1-
_ X X X X
4-
T-
>
C-
_
1
M-
_
I-
<-
T-
1-
_ X X X
5-
N-
>
A-
_
1

- 595 -
M-
_
I-
<-
T-
1-
_ X X X
6-
T-
>
A-
_
1
M-
_
E-
<-
P-
1-
_
7-
T-
>
A-
_
1
M-
_
E-
<-
P-
1-
_
8-
T-
>
B-
_
1
M-
_
E-
<-
P-
1-
_
9-
T-
>
C-
_
1
M-
_
P-
<-
S-
2-
_
0-
N-
>
A-
_
1
M-
_
M-
<-
E-
2-
_ X X X X X
1-
N-
>
D-
_
1

- 596 -
M-
_
S-
<-
P-
3-
_ X X X X
0-
T-
>
B-
_
1
M-
_
D-
<-
P-
3-
_ X X X X
1-
T-
>
B-
_
1
M-
_
S-
<-
T-
3-
_ X X X X
2-
T-
>
B-
_
1
M-
_
B-
<-
O-
3-
_ X X
3-
T-
>
B-
_
1
M-
_
M-
<-
E-
3-
_ X X
4-
T-
>
D-
_
1
M-
_
M-
<-
E-
3-
_ X X
5-
T-
>
E-
_
1

- 597 -
M-
_
M-
<-
E-
3-
_ X X
6-
T-
>
F-
_
1
M-
_
I-
<-
T-
3-
_ X X
7-
T-
>
B-
_
1
M-
_
E-
<-
P-
3-
_
8-
T-
>
D-
_
1
M-
_
E-
<-
P-
3-
_
9-
T-
>
E-
_
1
M-
_
E-
<-
P-
4-
_
0-
T-
>
F-
_
1
C-
_
S-
<-
C-
4-
_ X X X X X X X X X
5-
N-
>
A-
_
1

- 598 -
C-
_
D-
<-
C-
4-
_ X X X X X X X X X
6-
N-
>
A-
_
1
C-
_
R-
<-
C-
4-
_ X X X X X X X X X
7-
N-
>
A-
_
1
C-
_
S-
<-
E-
4-
_ X X X X X X X X X
8-
N-
>
A-
_
1
C-
_
S-
<-
E-
4-
_ X X X X X X X X X
9-
N-
>
B-
_
1
C-
_
S-
<-
E-
5-
_ X X X X X X X X X
0-
N-
>
C-
_
1
C-
_
B-
<-
O-
5-
_ X X X X X X X X X
1-
N-
>
A-
_
1

- 599 -
C-
_
S-
<-
C-
5-
_ X X X X X X X X X
8-
T-
>
A-
_
1
C-
_
D-
<-
C-
5-
_ X X X X X X X X X
9-
T-
>
A-
_
1
C-
_
R-
<-
C-
6-
_ X X X X X X X X X
0-
T-
>
A-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
1-
T-
>
A-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
2-
T-
>
B-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
3-
T-
>
C-
_
1

- 600 -
C-
_
B-
<-
O-
6-
_ X X X X X X X X X
4-
T-
>
A-
_
1
M-
_
E-
<-
I_
7-
N- X
0-
A-
>
_
1-
*
C-
_
I-
<-
C-
10-
_ X X X X X X X X X
0-
N-
>
A-
_
1
C-
_
<- C-
10- I_
X X X X X X X
1- N-
> A-
_
1
C-
_
R-
<-
D-
10-
_
2-
N-
>
A-
_
1
C-
_
C-
<-
S-
10-
_ X X X
3-
N-
>
A-
_
1

- 601 -
C-
_
T-
<-
S-
10-
_ X X
4-
N-
>
A-
_
1
C-
_
R-
<-
P-
10-
_ X X
5-
N-
>
A-
_
1
C-
_
C-
<-
D-
10-
_ X X
6-
N-
>
A-
_
1
C-
_
T-
<-
S-
10-
_ X X
7-
T-
>
A-
_
1
P-
_
M-
<-
E-
11-
_ X X
0-
N-
>
A-
_
1
P-
_
M-
<-
E-
11-
_ X X
1-
N-
>
B-
_
1

- 602 -
P-
_
M-
<-
E-
11-
_ X X
2-
N-
>
C-
_
1
P-
_
A-
<-
C-
11-
_
3-
N-
>
A-
_
1
F-
_
F-
<-
R-
12-
_
0-
N-
>
A-
_
1
F-
_
S-
<-
R-
12-
_
1-
N-
>
A-
_
1
F-
_
S-
<-
C-
12-
_
2-
N-
>
A-
_
1
F-
_
L-
<-
S-
12-
_
3-
N-
>
A-
_
1

- 603 -
F-
_
A-
<-
F-
12-
_
4-
N-
>
A-
_
1
F-
_
S-
<-
G-
12-
_
5-
N-
>
A-
_
1
F-
_
D-
<- R-
12- _
6- T-
> A-
_
1-
*
F-
_
S-
<- C-
12- _
7- N-
> B-
_
1-
*
* Blank or X only

7 Basic application functions


Station initialization
(station-specific parameter, mark ‘X’ if function is used)

X Remote

Cyclic data transmission


(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Cyclic data transmission

Read procedure

- 604 -
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Read procedure

Spontaneous transmission
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Spontaneous

Double transmission of information objects with cause of transmission spontaneous


(station-specific parameter, mark each information type ‘X’ where both a Type ID without time and cor-
responding Type ID with time are issued in response to a single spontaneous change of a monitored object)
The following type identifications may be transmitted in succession caused by a single status change of an
information object. The particular information object addresses for which double transmission is enabled
are defined in a project-specific list.

Single-point information M_SP_NA_1, M_SP_TA_1, M_SP_TB_1 and M_PS_NA_1

Double-point information M_DP_NA_1, M_DP_TA_1 and M_DP_TB_1

Step position information M_ST_NA_1, M_ST_TA_1 and M_ST_TB_1

Bitstring of 32 bit M_BO_NA_1, M_BO_TA_1 and M_BO_TB_1 (if defined for a specific project)

Measured value, normalized value M_ME_NA_1, M_ME_TA_1, M_ME_ND_1 and M_ME_TD_1

Measured value, scaled value M_ME_NB_1, M_ME_TB_1 and M_ME_TE_1

Measured value, short floating point number M_ME_NC_1, M_ME_TC_1 and M_ME_TF_1

Station interrogation
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X global

X group 1 X group 7 X group 13

X group 2 X group 8 X group 14

X group 3 X group 9 X group 15

X group 4 X group 10 X group 16

- 605 -
X group 5 X group 11

X group 6 X group 12

Clock synchronization
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Clock synchronization

Day of week used

RES1, GEN (time tag substituted/ not substituted) used

SU-bit (summertime) used

Command transmission
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Direct command transmission

X Direct set point command transmission

X Select and execute command

X Select and execute set point command

X C_SE ACTTERM used

X No additional definition

X Short pulse duration (duration determined by a system parameter in the outstation)

X Long pulse duration (duration determined by a system parameter in the outstation)

X Persistent output

X Supervision of maximum delay in command direction of commands and set point commands

Maximum allowable delay of commands and


Configurable
set point commands

- 606 -
Transmission of integrated totals
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Mode A: Local freeze with spontaneous transmission

X Mode B: Local freeze with counter interrogation

X Mode C: Freeze by counter-interrogation commands

X Mode D: Freeze by counter-interrogation command, frozen values reported spontaneously

X Counter read

Counter freeze without reset

Counter freeze with reset

Counter reset

X General request counter

X Request counter group 1

X Request counter group 2

X Request counter group 3

X Request counter group 4

Parameter loading
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Threshold value

X Smoothing factor

X Low limit for transmission of measured values

X High limit for transmission of measured values

Parameter activation

- 607 -
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Act/deact of persistent cyclic or periodic transmission of the addressed object

Test procedure
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Test

File transfer
(station-specific parameter, mark ‘X’ if function is used)
File transfer in monitor direction

Transparent file

Transmission of disturbance data of protection equipment

Transmission of sequences of events

Transmission of sequences of recorded analog values

File transfer in control direction

Transparent file

Background scan
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Background scan

Acquisition of transmission delay


(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Acquisition of transmission delay

Definition of time outs

Parameter Default value Remarks Selected value


t0 30s Time-out of connection establishment Configurable
t1 15s Time-out of send or test APDUs Configurable
t2 10s Time-out for acknowledges in case of no data messages t2 < t1 Configurable
t3 20s Time-out for sending test frames in case of a long idle state Configurable

Maximum range of values for all time outs: 1 to 255 s, accuracy 1 s

- 608 -
Port number

Parameter Value Remarks


TCP Remote Port number 2404 Configurable
UDP Listening Port number 2405 Configurable
UDP Remote Port number 2404 Configurable

Redundant connections

N* Number N of redundancy group connections used


* CimWay uses 1 group per device and its associated standby devices.

RFC 2200 suite


RFC 2200 is an official Internet Standard which describes the state of standardization of protocols used in
the Internet as determined by the Internet Architecture Board (IAB). It offers a broad spectrum of actual
standards used in the Internet. The suitable selection of documents from RFC 2200 defined in this standard
for given projects has to be chosen by the user of this standard.

X Ethernet 802.3

Serial X.21 interface

Other selection from RFC 2200:

List of valid documents from RFC 2200


1. ……………………………………………..
2. ……………………………………………..
3. ……………………………………………..
4. ……………………………………………..
5. ……………………………………………..
etc.

- 609 -
IEC 61850

- 610 -
Overview of IEC 61850
IEC 61850 is a communication standard developed for the power substation market. A derivative of it is
used in wind farm generation where it is known by the standard IEC 61400-25. The full IEC 61850 standard,
comprising of some 20 documents, is available from the IEC website (chargeable).
IEC 61850 defines a standardized method for describing power system devices that enables all IED's (Intel-
ligent Electronic Devices - the microprocessor-based controllers of power system equipment) to present
data using identical structures directly related to their function. The abstract data model defined in IEC
61850 can be mapped to a number of protocols. Current mappings in the standard include MMS (Man-
ufacturing Message Specification), GOOSE and SMV. For Supervisory purpose, MMS over TCP/IP is used and
it is C-CURE Building Management System's interface to this that is described in this help book.

IEC 61850 modeling


The IEC 61850 data model begins with a physical device that connects to the network. The physical device is
defined by its network address. Within each physical device may be one or more logical devices. The IEC
61850 logical device model allows a single physical device to behave as a proxy or gateway for multiple
devices thereby behaving as a data concentrator.
Each logical device contains one or more logical nodes. A logical node is a named grouping of data and ser-
vices that is logically related to some power system function. The following table represents the XCBR class.
XCBR Class Logical Node
Common
Data name data class Description Mandatory Optional
LNName Secure Inherited from Logical-Node class
DATA
Common logical node data
LN inherits all Mandatory Data from Com-
Mandatory
mon Logical Node class
Loc SPS Local operation Mandatory
EEHealth INS External equipment health Optional
EEName DPL External equipment name plate Optional
OpCtl INS Operation counter Mandatory
Controls
Pos DPC Switch position Mandatory
BlkOpn SPC Block opening Mandatory
BlkCl SPC Block closing Mandatory
ChaMotEna SPC Charger motor enabled Optional
Metered values
SumSwaRs BCR Sum of switched Amperes, resetable Optional
Status information
CBOpCap INS Circuit breaker operating capability Mandatory
POWCap INS Point On Wave switching capability Optional
Circuit breaker operational capability
MaxOpCap INS Optional
when fully charged
Each logical node has an instance Id as a suffix to the logical node name. For example, a device has two
measurement inputs to measure two 3-phase feeders. The standard name of a logical node for meas-
urements in 3-phase is MMXU and so the two logical nodes would be MMXU1 and MMXU2. Each logical node
may also have an optional application specific prefix to provide further identification of its purpose. A list of
compatible logical nodes can be found in the document IEC61850 part 7-4.
Each logical node contains one or more data elements. Each data element has a unique name determined by
the standard and related to its purpose. For example, a circuit breaker is modeled as an XCBR node. It con-
tains a variety of data including Loc (local or remote mode), OpCnt (operations count), Pos (position),
BlkOpn (block breaker open command), BlkCls (block breaker close command) and CBOpCap (operating cap-
ability).

- 611 -
Each data element conforms to the specification of a Common Data Class (CDC). The CDC determines the
type and structure of the data. For example, there are CDCs for status information, measured information,
controllable status information etc. Each CDC has a defined name and set of attributes, also each with a
defined name, type and purpose. Each attribute also belongs to a set of functional constraints (FC) that
groups the attributes into categories. For example, ST for status attributes. In the following table, rep-
resenting the SPS class, the status attributes consist of a status value (stVal), a quality flag (q) and a
timestamp (t). The list of function restraints can be found in the document IEC 61850-7-2. The list of com-
patible substation logical nodes can be found in the document IEC 61850-7-3.
SPS Class
Attribute Functional Value or
Attribute type Mandatory
name constraint range
DataName Inherited from Data Class
DATA ATTRIBUTE
Status
stVal Boolean ST True/False Mandatory
q Quality ST Mandatory
t Timestamp ST Mandatory
Substitution
subEna Boolean SV True/False PICS_SUBST
subVal Boolean SV True/False PICS_SUBST
subQ Quality SV PICS_SUBST
subID VisibleString64 SV PICS_SUBST
Configuration, description and extension
d VisibleString255 DC Text Optional
dU UnicodeString255 DC Unicode text Optional
cdcNs VisibleString255 EX Text AC_SLNDA_M
cdcName VisibleString255 EX Text AC_SLNDA_M
dataNs VisibleString255 EX Text AC_SLNDA_M
The IEC 61850 model of a device is a virtualized model that begins with an abstract view of the device and
its objects. This abstract model is mapped to a specific protocol stack based on MMS, TCP/IP and Ethernet.
The method of transforming the model into an MMS data in a unique and unambiguous reference for each ele-
ment of data in the model. For example a logical device named "Relay1" consisting of a single circuit
breaker logical node XCBR1 for which you want to read the mode of operation (Loc). The object name will be
Relay1/XCBR1$ST$Loc$stVal

- 612 -
Data Sets, Data Reports and Data Groups
C-CURE Building Management System can collect data from an IEC 61850 device by three mechanisms.

l Using a Data Set. A Data Set is created as part of the physical device configuration (using the
IED configuration tool) and is normally a group of data objects. You can configure C-CURE Building
Management System so that it polls a Data Set at regular intervals. A single poll will return all attrib-
utes of the Data Set making it a very efficient mechanism
l Using a Data Report. A Data Report or Report Control Block is created as part of the physical device
configuration (using the IED configuration tool) and is a set of conditions applied to data belonging to a
Data Set. When the conditions are met, the data is sent as an unsolicited report to C-CURE Building
Management System. There are two forms of Data Report.
l Buffered. If C-CURE Building Management System is unavailable, Buffered Data Reports are
stored locally in the device and then sent once C-CURE Building Management System becomes
available.
l Un-buffered. Un-buffered reports are not stored locally in the device if C-CURE Building Man-
agement System is unavailable and any data sent will be lost.
l Using a Data Group. A Data Group is configured in C-CURE Building Management System and defines
only a poll rate. The IEC 61850 objects and attributes, mapped to variables allocated to the group, are
polled at that rate. As each attribute is polled individually this is a very inefficient method and should
only be used if the data cannot be obtained by one of the other mechanisms.

- 613 -
Managing IEC 61850 in the Application Explorer

Tasks applicable to IEC 61850


When the IEC 61850 folder is selected.
Icon Task Description
Settings Display the general IEC 61850 settings dialog.
Add a network Configure a connection to an IEC 61850 network.
When an IEC 61850 network is selected.
Icon Task Description
Add an IEC 61850
Add a device to the network.
device
Start network Start the connection to the network.
Stop network Stop the connection to the network.
Remove Permanently remove the configuration of the connection to the network.
Mapping Open the mapping dialog used to link variables to IEC 61850 objects.
Properties Open the properties dialog for the network connection.
When an IEC 61850 device is selected.
Icon Task Description
Add a dataset Add a dataset to C-CURE Building Management System configuration.
Add an un-buffered or buffered report to C-CURE Building Management Sys-
Add a data report
tem configuration.
Create a new data group to C-CURE Building Management System con-
Add a data group
figuration.
Start physical device Start the connection to the selected device.
Stop physical device Stop the connection to the selected device.
Send a Ping to the device to check its status. A command dialog opens during
Ping
the Ping process displaying the results.
Remove Permanently remove the configuration of the selected device.
Properties Open the properties dialog for the selected device.
File transfer
Open the dialog to handle ad-hoc file transfer.
Helper...
When a data set, data report or data group is selected.
Icon Task Description
Start Start communication with the data set, data report or data group.
Stop Stop communication with the data set, data report or data group.
Remove Permanently remove the selected data set, data report or data group.
Properties Open the properties dialog for the data set, data report or data group.
Send a global interrogation command to the selected report group. Refreshes
Send GI
all variables associated with the group.

Rules and behavior of cut, copy and paste

- 614 -
The following table describes the rules and behavior, and in particular any restrictions, when using cut or
copy and paste on configuration objects in the 61850 folder.
61850 object Behavior
Network The pasted Network is given a unique name.
Any subordinate Devices, Data sets, Data Reports and Data Groups are duplicated
using the original name.
The mapping of any variables is not duplicated.
Device The pasted Device is given a unique name.
Any subordinate Data sets, Data Reports and Data Groups are duplicated using the ori-
ginal name.
Data set The pasted Data set is given a unique name within the context of the Device.
Data Report The pasted Data Report is given a unique name within the context of the Device.
Data Group The pasted Data Group is given a unique name within the context of the Device.

- 615 -
IEC 61850 Settings
IEC 61850 settings are accessed from the Application Explorer by selecting <Project>.Communication.Data
acquisition.IEC 61850 and choosing the Settings command from the task list. Show picture

l Invalidate variables – Defines if variable status should be set to invalid upon connection failure.
l Never - The variables are never made invalid. This can be used when there is intermittent com-
munication with the server.
l Immediately - The variables are made invalid immediately on a communication failure. This is
the default value.
l After a delay - The variables are made invalid after the specified delay.
l Invalidate variables (while producer switchover) – Defines if variable status should be set to invalid
upon producer switchover.
l Monitoring
l Double point
l Off – Defines how Off value should be interpreted by C-CURE Building Management Sys-
tem.
l On – Defines how On value should be interpreted by C-CURE Building Management
System.
l MMS layer configuration
l Maximum size of an assembled MMS message
l Max PDU size – Defines the maximum size of PDUs. Depending on the devices you are
communicating with, this setting may need to be changed.
l Data
l Use timestamp quality – If not enabled, the quality of timestamp associated to data will be
ignored.
l Default originator category for select/operate of controls – Defines the value used for the OrCat
parameter when sending Controls – Default to station-control.
l Default originator identifier for select/operate of controls – Defines the value used for the
OrIdent parameter when sending Controls.
l Default Test for select/operate of controls – If ticked, all controls sent will be by default flagged
as ‘Test’.
l Default Check bitstring for select/operate of controls
l Synchrocheck – If ticked, all controls sent will be by default flagged for synchro-check.
l Interlock-check – If ticked, all controls sent will be by default flagged for interlock-check.
l Interoperability issues
l Enable discovery services. If disabled, the IEC 61850 driver will not attempt to check if the con-
figuration of the physical devices fit the C-CURE Building Management System configuration.
This setting only applies to devices configured to use SCL-based offline configuration, it is
ignored for the others.

- 616 -
Disabling the use of discovery services affects elements such as browsing and checking the exist-
ence of Logical devices, Logical nodes, Data objects, Data attributes, Datasets, Dataset members...
If disabled, it is the responsibility of the application designer to make sure that the configuration is
consistent system-wide to ensure proper operations of the IEC 61850 driver and data mapping.

If in addition to disabling the use of discovery services, you wish to fully disable the use of
IEC 61850 services that lead to changes of the configuration of physical devices, you must make
sure that none of the following Data report advanced properties are activated:

l Send buffer time to the device,


l Send dataset configuration to the device,
l Send integrity period to the device,
l Send optional fields to the device,
l Send report identifier to the device,
l Send trigger option to the device.

- 617 -
Configuring an IEC 61850 network

- 618 -
Configuring an IEC 61850 Network
An IEC 61850 Network object in C-CURE Building Management System configuration represents and
provides access to the physical connection to an IEC 61850 network. The configuration is accessed from the
Application Explorer - <Project>.Communication.Data acquisition.IEC 61850.

Adding a network

1. Select the IEC 61850 folder in the Application Explorer and, from the task list, select New network.
The IEC 61850 Network dialog opens. Show picture

2. In the Name text box, enter the name of the network. This is the name by which the network will be
known in C-CURE Building Management System. You can accept the suggested default or enter one of
your own.
3. Select Activate at start-up if the network is to automatically start.

The SCL Files tab


See the topic IEC 61850 Network - SCL Files.

The Advanced tab


See the topic IEC 61850 Network - Advanced Properties.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the network. Only use
this if advised to do so by your support agency.

- 619 -
IEC 61850 Network - SCL Files
An SCL file is an Xml file whose content is based on the Substation Configuration Language format as defined
in the IEC 61850-6 standard.
SCL files are a basic brick of IEC 61850 system engineering and come in a variety of forms: Scd, Cid, Ssd,
Sed, Iid...
Although all may contain information about IED's that C-CURE Building Management System is able to
extract, each file type has a particular purpose and the use of Scd files is recommended.
In C-CURE Building Management System, you can use SCL files to define a variety of configuration ele-
ments:

l Data acquisition: Devices, dataset groups, data report groups and data groups,
l Variable mapping: On Data Objects and Data Attributes.

SCL files can be added to an IEC 61850 network configuration in C-CURE Building Management System using
the SCL Files tab of the IEC 61850 Network Properties dialog. Show picture

How to add an SCL file

1. Open the IEC 61850 Network properties dialog and select the SCL Files tab.
2. Click the Add tool. A file browser dialog opens. By default, the contents of the project TP folder is dis-
played but you can navigate anywhere visible to the host PC.
3. Select the SCL file to be added and click Open. The IEC 61850 SCL file creation dialog opens. Show pic-
ture

4. The reference Name under which the file will be added to the network configuration defaults to that of
the SCL file but you can edit it to choose one of your own.
5. Click Apply to read the SCL file and extract the information pertinent to C-CURE Building Management
System. This can take a few seconds if the file is large. The information that is extracted is displayed

- 620 -
in the Content tab. Show picture

6. Click OK to complete the process of adding the SCL file to the network.
7. Repeat steps 2 to 6 to reference additional SCL files (if using Cid files for example).

- 621 -
IEC 61850 Network - Advanced Properties
IEC 61850 network advanced properties are found in the Advanced tab of the Network properties dialog.
Show picture

l Command parameters
l Max parallel requests - The maximum number of requests (all requests sent to the device -
read, write etc…) that can be processed at the same time. Default 50.
l Networking
l Servers - For a multi-station application the list of stations that are to behave as producers. If
the application is run on any station not in the list, the IEC 61850 network will not be started.
l Redundancy mode
l Cold mode – If selected, the network is stopped on data acquisition servers in passive state.
l Warm mode – If selected, the network is not stopped on passive servers.

- 622 -
Adding a Physical Device to a IEC 61850 network

- 623 -
Adding a Physical Device to an IEC 61850 Network
An IEC 61850 device object in C-CURE Building Management System configuration represents, and provides
access to, an IEC 61850 physical device. Within each physical device, may be one or more logical devices.
On the network, an IEC 61850 device is identified by its IP Address. In C-CURE Building Management
System, it is known by the Name that you give it during the configuration.
A device can be configured manually, or based on information available in an SCL file referenced on the
IEC 61850 network.

Adding a device

1. Select an IEC 61850 network in the Application Explorer. From the task pane, select Add an IEC 61850
device to open the Device dialog. Show picture

2. In the Name field, enter a name for the IEC 61850 device. This is the name by which it will be known
in C-CURE Building Management System.
3. Enter the optional descriptive text in the Description field (optional).
4. In the IP address field, enter the device's unique IP address.
5. Select Activate at start-up if the device is to automatically start.
6. Select the Device Profile. C-CURE Building Management System is provided with a number of device
profiles. Further profiles can be added by editing the device profile catalog. See the topic IEC 61850
device profile catalog.
7. Click on OK to confirm the configuration and close the dialog or Apply to do the same but leave the dia-
log open.

Adding a device using an SCL file


If you have added one or more SCL files to the Network configuration, you can select the device con-
figuration as an alternative to configuring the device properties manually.

1. Follow steps 1 to 3 as above.


2. Select Use SCL file. You can then select the IED from the SCL File List, using the ellipses button adja-
cent to the SCL file property. Show picture

- 624 -
3. The information from the SCL file auto-completes the device configuration: iedName, apName and IP
address. Show picture

4. You cannot change properties of a device configured in this way other than using Override IP address
to change that supplied by the SCL file. Click OK to confirm the configuration.

The Advanced tab


See the topic IEC 61850 device - advanced properties.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the device. Only use
this if advised to do so by your support agency.

- 625 -
IEC 61850 Physical Device - Advanced Properties
The Physical Device advanced properties are found in the Advanced tab of the Physical Device properties dia-
log. The majority of the properties are directly related to the configuration of the Physical Device and should
only be changed if you fully understand their use and the consequences of changing them. The default set-
tings will be adequate for most applications. Show picture

l Connection type - Connection type. Either Short, Full, Fastbyte or None.


l Authentication
l Enabled - Enable or disable the use of ACSE authentication.
l Mechanism - The name of the mechanism for ACSE authentication.
l Password - The password to be used for ACSE authentication.
l Remote configuration – The TCP remote port and MMS parameters that should be used to connect to
the physical device. See the manufacturer’s documentation if specific values are to be used.
l Local configuration - The set of MMS parameters that should be used to connect to the physical device.
See the manufacturer’s documentation if specific values are to be used.
l Watchdog options - See below.
l Miscellaneous
l Timeout (ms) - Request timeout. Default 3 sec.
l Reconnection period (ms) - Wait time before attempting to reconnect after a connection failure.
Default 5 sec.
l Monitoring
l Double point - Customize the way C-CURE Building Management System interprets the double
point data type.
l File transfer - See the File Transfer topic.
l Interoperability issues
l Discovery services
l Override global default value - Override the default setting for discovery services as set in
the IEC 61850 settings.

Watchdog options
IEC 61850 communication can be entirely event driven. That is C-CURE Building Management System does
not poll a device, it just waits for the device to send it any changes. This is the most efficient way of com-
municating. However if communication to the device fails C-CURE Building Management System may be
unaware.

- 626 -
To overcome this problem a watchdog is polled periodically. If the device responds then it is considered
healthy. If the device does not respond then it is considered to be failed. The Polling Period should be set a
value applicable to the local conditions. The default is 10 min.

- 627 -
IEC 61850 Device Profile Catalog
The Device Profile catalog contains the list of Common Data Classes that are recognized by C-CURE Building
Management System, organized as one or more profiles. For example IEC 61850 (Substation) and
IEC 61400-25 (Wind Power Plants). The data in the catalog is used to make the link between the value, qual-
ity and timestamp attributes of IEC 61850 data objects and the corresponding properties of variables.
The catalog is defined by an XML file named 61850Catalog.Xml. The file can be located in the Bin folder
and/or the project's C folder. Device Profiles from both files will appear in the Device Configuration dialog.
Show picture

The following CDC's were defined in the catalog, and are therefore recognized by C-CURE Building Man-
agement System, at the time of writing this help.
Profile 61850 Profile 61400-25
SPS SPS
DPS DPS
INS INS
ACD BCR
SEC MV
BCR CMV
MV SPC
CMV DPC
SAV INC
DPC APC
INC SPV
BSC STV
ISC ALM
APC CTE
LPL TMS

Editing the Device Profile Catalog


Do NOT attempt to edit this file unless you are familiar with XML, data structures of IEC 61850 and
C-CURE Building Management System variable properties.
The Device Profile Catalog can be edited to add new Common Data Classes or to add custom profiles. The
file can be edited with any suitable XML editor.

- 628 -
Adding a Data Set or Data Group to an IEC 61850 device
Adding a data group
A data group provides polled access to all data objects and data attributes of an IEC 61850 device. It is the
least efficient way of collecting data from the network as each variable that you map using a data group will
be serviced using a separate poll. Data groups should only be used to access data objects or data attributes
that are not available from a data set or report.
To add a data group.

1. From the Application Explorer select an IEC 61850 network and device.
2. Select the Add a data group task. The Data Group configuration dialog opens. Show picture

3. Accept the default Name or enter one of your own choice. The Name is the identity of the data group
within C-CURE Building Management System.
4. Enter an optional Description (optional).
5. Enter a Polling period or accept the default.
6. Tick Activate at start-up if the data group is to start polling automatically at start-up.
7. Click OK to confirm the settings and close the dialog.

Adding a dataset
A dataset provides polled access to all data objects and data attributes of an IEC 61850 device dataset. It is
more efficient than a data group, as a single poll will return all data objects and data attributes that belong
to the dataset.
To add a dataset.

1. From the Application Explorer select an IEC 61850 network and device.
2. Select the Add a dataset task. The Dataset configuration dialog opens. Show picture

3. Accept the default Name or enter one of your own choice. The Name is the identity of the dataset
within C-CURE Building Management System.
4. Enter an optional Description (optional).

- 629 -
5. Select the Original data set name. This is the name as exposed by the physical device. Depending on
the device configuration, C-CURE Building Management System obtains a list of the available datasets
by browsing the connected physical device or by listing datasets defined in the SCL file associated to
the device.
6. Enter a Polling period or accept the default.
7. Tick Activate at start-up if the dataset is to start polling automatically at start-up.
8. Click OK to confirm the settings and close the dialog.

- 630 -
Adding a Data Report to an IEC 61850 device

- 631 -
Adding a Data Report to an IEC 61850 Device
A data report provides access to all data objects and attributes of the linked dataset. It is the most efficient
method to access data as data changes are sent automatically by the device each time the specified trigger
conditions are met. No polling by C-CURE Building Management System is required.
To add a data report:

1. From the Application Explorer select an IEC 61850 network and device.
2. Select the Add a data report task. The Data Report configuration dialog opens. Show picture

3. Accept the default Name or enter one of your own choice. The Name is the identity of the data report
within C-CURE Building Management System.
4. Enter an optional Description (optional).
5. Select the Reporting type as buffered or unbuffered. For an explanation of the difference, see the topic
About Data Sets, Data Groups and Data Reports.
6. Select the Original report name. This is the name of the Report Control Block as exposed by the phys-
ical device. Depending on the device configuration, C-CURE Building Management System obtains a
list of the available data reports by browsing the connected physical device or by listing report control
blocks defined in the SCL file associated to the device. See below for more information on how to con-
figure the Original report name in redundant data acquisition architectures.
7. Tick Activate at start-up if the data group is to start automatically at start-up.
8. Click OK to confirm the settings and close the dialog or Apply to leave the dialog open.

The Advanced tab


See the topic IEC 61850 Data Report - Advanced tab. Note that the properties in the advanced tab are import-
ant as they determine how the Report Control Block is handled.

Configuration for data acquisition redundancy


As specified by the IEC 61850 standard, handling reporting requires exclusive access to a Report Control
Block. If 2 clients access the same RCB, correct reporting cannot be guaranteed and data may be lost.
To cope with this constraint, when 2 or more redundant stations are in charge of data acquisition for a given
Data Report, one need to define one RCB (Original report name) per redundant data acquisition server. In
practice, you have to define one redundant RCB per station in the association producing the IEC 61850 net-
work:

1. Set the property Original report name to (Network-dependent configuration) on the Data report item.
2. Select the data report in the data report list (top panel of the Application Explorer), go to the behavior
panel (bottom panel) and click the Add button.
3. Select the first data acquisition in the Server station list, and select the Original report name this sta-
tion will be in charge of.
4. Repeat steps 2 and 3 for each data acquisition server in the list, each time selecting another report
name.

Data acquisition redundancy for reporting requires each IEC 61850 device to expose as many Report
Control Block as there are redundant data acquisition servers in the association producing the network.

- 632 -
Refer to the device manufacturer documentation for more information about support and configuration
of report control blocks, support for multiple client connections and report control block reservation.
It is strongly recommended that such 'redundant' report control blocks be attached to the same data-
set, which C-CURE Building Management System is able to enforce if the data report is configured to
send the dataset configuration at start-up (see IEC 61850 Data Report - Advanced tab).

- 633 -
IEC 61850 Data Report - Advanced Tab
The Data Report advanced properties are found in the Advanced tab of the Data Report properties dialog.
The majority of the properties are directly related to the operation of the Data Report and should only be
changed if you fully understand their use and the consequences of changing them. The default values will be
adequate for most applications. Show picture

l Report properties
l Buffer time (BufTm)
l Send buffer time to the device - Tick to enable writing the buffer time parameter to the
physical device.
l Buffer time (ms) - Specifies the time interval for the buffering of changes at the physical
device level, for inclusion into a single report. See the document IEC61850-7-2 for more
information.
l DataSet (DatSet)
l Send dataset configuration to the device - Tick to enable writing the dataset parameter to
the device.
l DataSet name - Specifies the dataset to be associated with the Report Control Block at the
physical device level.
l General Interrogation (GI)
l Send GI after enable report - Tick to enable sending a GI after the enable report com-
mand.
l Integrity period (IntgPd)
l Send integrity period to device - Tick to enable writing the integrity period to the physical
device.
l Integrity period - An interval at which a report will be sent independent of the trigger con-
ditions. Used to maintain a keep-alive with C-CURE Building Management System even if
no data is to be reported (the trigger conditions are not met). If set to 0 then it is disabled.
l Optional fields (OptFlds) - The default settings should not be changed unless advised to do so by
the technical support team. Changing them can affect the identification of data and may lead to
incorrect variable updates if the configuration of the physical device does not match that of C-
CURE Building Management System (including referenced SCL files not matching physical device
configuration).

- 634 -
l Send optional fields to device - Tick to enable writing the optional fields to the device.
l Optional fields
l sequence-number - If ticked, the property SqNum is included in the report.
l report-timestamp - Not used.
l reason-for inclusion - If ticked, the property ReasonCode is included in the report.
l data-set-name - If ticked, the property Data-set-name is included in the report.
l data-reference - If ticked, the property DatSet is included in the report.
l conf-revision - If ticked, the property ConfRev is included in the report
l Report identifier (RptID)
l Send report identifier to the device - Tick to enable writing the buffer time parameters to
the physical device. The attribute RptID is the client-specified report identifier of the
report that has caused the generation of the report.
l Reserve URCB (Resv)
l Use the reservation function - If enabled, C-CURE Building Management System takes an
exclusive access to the Report Control Block. This property only applies to un-buffered
RCB. For buffered RCB, reservation is used if the device supports it.
l Trigger options (TrgOps) - The conditions under which the report is sent to C-CURE Building Man-
agement System. The default setting will be adequate for most applications.
l Send trigger options to the device - Tick to enable writing the trigger options parameters
to the physical device.
l Trigger options
l data-change - Generate a report when a data value changes.
l quality-change - Generate a report when a data quality changes.
l data-update - Generate a report on a data update (timestamp change).
l integrity-period - Generate the report periodically using the Integrity period.
l general-interrogation - Generate the report whenever C-CURE Building Management
System sends a GI (General Interrogation) request. Used by C-CURE Building Man-
agement System when starting the network or device to get the initial value of all
variables.
l Miscellaneous
l Reconnection polling period - The client response when a URCB/BRCB is already reserved.
Default 5 sec. Upon connection, the URCB initialization phase includes an attempt to write the
RptEna attribute to False and then to True. If the URCB is already reserved, the attempt fails,
and the Client tries to set the RptEna attribute to False on a timer, by default every 5 seconds
(configurable). Upon the first error during this phase, variables are set invalid (NSCOM) imme-
diately.
l General interrogation polling period - The period at which the general interrogation request is
made. Default 0 sec (no GI except for initialization).

- 635 -
Mapping IEC 61850 objects to variables

- 636 -
IEC 61850 Data Types and the Corresponding Variables Tree Data Types
The following table lists the IEC 61850 basic data types and C-CURE Building Management System variable
type to which they must be mapped.

Data type Range Variable type Remark


BOOLEAN Bit
INT8 -128 to 127 Register
INT16 -32768 to 32767 Register
INT24 -8388608 to 8388607 Register
INT32 -2147483648 to 2147483647 Register
INT8U 0 to 255 Register
INT16U 0 to 65535 Register
INT24U 0 to 16177215 Register
INT32U 0 to 4294967295 Register
IEEE 754 single precision floating
FLOAT32 Register
point
IEEE 754 double precision floating
FLOAT64 Register
point
ENUMERATED Ordered set of values Register Custom extensions allowed
CODED ENUM Ordered set of values Register Custom extensions not allowed
OCTET STRING Text Max length defined where used
VISIBLE STRING Text Max length defined where used
UNICODE STRING Text Max length defined where used

- 637 -
IEC 61850 Functional Constraints
The IEC 61850 Functional Constraints appear as a node in C-CURE Building Management System's IEC 61850
mapping dialog and so it is useful to understand their meaning. Those most likely to be relevant have been
highlighted. A full explanation can be found in the document IEC 61850 part 7-2.

ID Semantic Description
ST Status information Binary information whose value can be read, substituted, reported, and logged
but not written.
MX Measureand Analog information whose value can be read, substituted, reported, and
logged but not written.
CO Control Binary information whose value can be operated (set) and read.
SP Setpoint Analog information whose value can be controlled (set) and read.
SV Substitution Substitution information whose value can be written to substitute the value
attribute and read.
CF Configuration Configuration information whose value can be written and read.
DC Description Description information whose value can be written and read.
SG Setting group Logical devices that implement the SGCB class maintain multiple grouped val-
ues of all instances of Data Attributes with functional constraint SG. Each
group contains one value for each Data Attribute with functional constraint SG
that shall be the current active value.
SE Setting group edit- Data Attribute which can be edited by SGCB services.
able
EX Extended definition Extension information providing a reference to a name space.
BR Buffered report Report control information of a BRCB whose value can be written and read.
RP Unbuffered report Report control information of a URCB whose value can be written and read.
LG Logging Log control information of a LCB whose value can be written and read.
GO GOOSE control Goose control information of a GoCB whose value can be written and read.
GS GSSE control Goose control information of a GsCB whose value can be written and read.
MS Multicast sampled Sampled value control information of a MSVCB whose value can be written and
value control read.
US Unicast sampled Sampled value control information of an instance of a UNICAST-SVC whose
value control value can be written and read.

- 638 -
How IEC 61850 Data are Represented in the Mapping Dialog
The Mapping dialog is open by clicking the Mapping task when an IEC 61850 network is selected.
IEC 61850 data are displayed in hierarchical trees in the mapping dialog. Under the nodes that represent
each physical device, you will find three folders:

l Data - All objects.


l Datasets - Any configured datasets and their associated data known as dataset members.
l Report - Any configured buffered or un-buffered Report Control Blocks and dataset members of the
associated dataset.

The Mapping Dialog can be used display either online or offline:

l To use it online, C-CURE Building Management System must be connected to the actual network, phys-
ical devices must be operational, and the discovery services must be enabled.
l To use it offline, SCL files must have been added to the network and used as part of the C-CURE Build-
ing Management System configuration.

You switch from one mode to the other by clicking the Online/Offline button available in the status bar.

The Data node


Under the Data node, you will find all IEC 61850 data found on the network and known to C-CURE Building
Management System. Show picture

The hierarchy of the Full item ID is as follows:

l Logical device (LD)


l Logical node (LN)
l Data object (DO)
l Data attribute (DA)

For example, A1_MEASMeasurements/dmdmmxu1.A.phsA.cVal.mag.f

l The lowest level of the hierarchy (the leaf) is known as a data attribute and represents a single item of
data. For example, real-time value or quality.
l A data object can contain both data attributes and sub data objects.

The Dataset node


Under the Datasets node, you will find all configured datasets by their name in the physical device (or
SCL file). The name by which it is known in C-CURE Building Management System is in square brackets.
Datasets are greyed if not mapped. The display of objects under the dataset is shows only the members
(top-level objects) and their attributes. Show picture

- 639 -
The hierarchy of the Name is as follows:

l Logical device (LD)


l Logical node (LN)
l Functional constraint (FC)
l Data object (DO)
l Data attribute (DA)

Objects are identified by a structured name using the following syntax: LD/LN$FC$DO$DA

The Reports node


Under the Reports node, you will find all configured report control block by their name in the physical device
(or SCL file). The name by which it is known in C-CURE Building Management System is in square brackets.
Reports are greyed if not mapped.

- 640 -
Mapping IEC 61850 Data Objects and Data Attributes
The procedures required to map data objects or data attributes are very similar. Any differences are noted
in the text.

Behavior and requirements when mapping data objects and data attributes
When mapping a variable to a data object, the value, timestamp and quality are all supplied by the object.
Therefore, the data object must support these attributes. C-CURE Building Management System uses the
object's Common Data Class (CDC) to identify which of its attributes to use. The supported CDC's are
defined in the profile that was selected when the Physical Device was configured. See the topics Adding a
Physical Device to an IEC 61850 network and IEC 61850 device profile catalog for further information. You
can only map data objects that match a CDC C-CURE Building Management System supports.
When mapping a variable to a data attribute, only the value is supplied by the attribute. The timestamp and
quality are provided by C-CURE Building Management System. All data attributes can be mapped.

How to map IEC 61850 data to a variable


This paragraph explains the basic mapping procedure. Some details may vary depending on if mapping an
attribute or an object and if you map from the node Data, Datasets or Reports.

1. Open the Application Explorer and expand the configuration tree to select an IEC 61850 network node.
2. Select the Mapping task. The IEC 61850 Mapping dialog opens. For help on how IEC 61850 objects are
represented in the mapping dialog see the topic How IEC 61850 objects are represented in the map-
ping dialog.
3. Expand the configuration tree in the left pane until the object or attribute to be mapped appears in the
upper or lower right pane. Where it appears will depend on the level of nesting used in the device.
4. Right click on the line containing the object or attribute and, from the context menu, select either Map
new variable or Map existing variable. Show picture

a. If you choose Map existing variable, the Variable Selector dialog opens from where a variable
can be selected.
b. If you choose map new variable the Create IEC 61850 Variable dialog opens. The name is auto-
matically generated using the name of the IEC 61850 object or attribute. You can either accept
this name or enter one of your own. Show picture

- 641 -
5. The mapping properties are automatically filled-in.
a. If creating a new variable you must select the variable type.
b. If mapping objects or attributes from the Data category, you must select the Data group.
6. Click OK to confirm the configuration and close the dialog.

If the data you have mapped is controllable, you may want to open the variable's properties dialog and con-
firm the Control model. By default, Automatic detection is selected. See the topic Linking a variable to an
IEC 61850 data object or data attribute for further information.

How the default variable name is generated


The default name that is generated depends on the location of the data object or attribute.

l From the Data node- Network name + Device name + MMS variable name
l From the DataSet node- Network name + Device name + Dataset Name +MMS variable name
l From the Report node - Network name + Device name + DataReport Name + MMS variable name

Additional features of the Mapping dialog when used in Online mode


When in online mode, the context menu, displayed when right clicking on a dataset or dataset member
node, has an additional command Read, which allows you to force a read of the data objects.

- 642 -
IEC 61850 PICS (Protocol Implementation Conformance Statement)
1 General
The following ACSI conformance statements are used to provide an overview and details about the built-in
driver for IEC 61850, further referred to as “the Client”:

l ACSI basic conformance statement,


l ACSI models conformance statement,
l ACSI service conformance statement.

The statements specify the communication features mapped to IEC 61850-8-1.


Together with the PIXIT, MICS and TICS, the PICS forms the basis for conformance testing according to IEC
61850-10.
The following documents are available separately:

l The Protocol Implementation Conformance Statement (PICS),


l The Protocol Implementation eXtra Information for Testing (PIXIT),
l The Model Implementation Conformance Statement (MICS),
l The Tissues Implementation Conformance Statement (TICS).

2 ACSI basic conformance statement


The basic conformance statement is defined in Table A.1.
Table A.1 – Basic conformance statement

Client/ Server/ Value/ Com-


Subscriber Publisher ments

Client-Server roles

Server side (of TWO-PARTY-


B11 - No
APPLICATION-ASSOCIATION)

Client side of (TWO-PARTY-


B12 Yes -
APPLICATION-ASSOCIATION)

SCSMs supported

B21 SCSM:IEC 6185-8-1 used Yes

Deprecated
B22 SCSM:IEC 6185-9-1 used
Ed2

B23 SCSM:IEC 6185-9-2 used

B24 SCSM:other

Generic substation event model (GSE)

B31 Publisher side - No

B32 Subscriber side No -

Transmission of sampled value model (SVC)

B41 Publisher side - No

B42 Subscriber side No -

– = not applicable

- 643 -
Yes = service is supported
No or empty = service is not supported

3 ACSI models conformance statement


The ACSI models conformance statement is defined in Table A.2.
Table A.2 – ACSI models conformance statement

Client/ Server/
Value/ Comments
Subscriber Publisher
If Server side (B11) and/or Client side
(B12) supported
M1 Logical device Yes
M2 Logical node Yes
M3 Data Yes
M4 Data set Yes
M5 Substitution No
Setting group con-
M6 No
trol
Reporting
Buffered report
M7 Yes
control
M7-1 sequence-number Yes
M7-2 report-timestamp Yes
reason-for-inclu-
M7-3 Yes
sion
M7-4 data-set-name Yes
M7-5 data-reference Yes
M7-6 buffer-overflow Yes
M7-7 entryID Yes
M7-8 BufTm Yes
M7-9 IntgPd Yes
M7-10 GI Yes
M7-11 conf-revision Yes
Unbuffered report
M8 Yes
control
M8-1 sequence-number Yes
M8-2 report-timestamp Yes
reason-for-inclu-
M8-3 Yes
sion
M8-4 data-set-name Yes
M8-5 data-reference Yes
M8-6 BufTm Yes
M8-7 IntgPd Yes

- 644 -
M8-8 GI Yes
M8-9 conf-revision Yes
Logging No
M9 Log control No
M9-1 IntgPd No
M10 Log No
M11 Control Yes

If GSE (B31/32) is supported

M12 GOOSE
M13 GSSE

If SVC (41/42) is supported

M14 Multicast SVC


M15 Unicast SVC
If Server or Client side (B11/12) sup-
ported
Time source with required accuracy shall
be available.
Only Time Master are SNTP (Mode 4
M16 Time Yes
response) time server.
All other Client / Server devices require
SNTP (Mode 3 request) clients
M17 File Transfer Yes
Application asso-
M18 Yes
ciation
GOOSE Control
M19 No
Block
Sampled Value Con-
M20 No
trol Block
Yes = service is supported
No or empty = service is not supported

4 ACSI service conformance statement


The ACSI service conformance statement is defined in Table A.3 (depending on the statements in Table A.1).
Table A.3 – ACSI service conformance statement

Client Server
Services AA:TP/MC Comments
(C) (S)
Server: if B11=Y or B12=Y
S1 GetServerDirectory TP Yes

Application association: if B11=Y or B12=Y


S2 Associate Yes
S3 Abort No
S4 Release Yes

- 645 -
Logical device: if M1=Y
S5 GetLogicalDeviceDirectory TP Yes

Logical node: if M2=Y


S6 GetLogicalNodeDirectory TP Yes
S7 GetAllDataValues TP No

Data: if M3=Y
S8 GetDataValues TP Yes
S9 SetDataValues TP Yes
S10 GetDataDirectory TP No
S11 GetDataDefinition TP Yes

Data set: if M4=Y


S12 GetDataSetValues TP Yes
S13 SetDataSetValues TP No
S14 CreateDataSet TP No
S15 DeleteDataSet TP No
S16 GetDataSetDirectory TP Yes

Substitution: if M5=Y
S17 SetDataValues TP No

Setting group control: if M6=Y


S18 SelectActiveSG TP No
S19 SelectEditSG TP No
S20 SetSGValues TP No
S21 ConfirmEditSGValues TP No
S22 GetSGValues TP No
S23 GetSGCBValues TP No

Reporting: If M7=Y or M8=Y


Buffered report control block (BRCB): If M7=Y
S24 Report TP Yes
S24-1 data-change (dchg) Yes
S24-2 quality-change (qchg) Yes
S24-3 data-update (dupd) Yes
S25 GetBRCBValues TP Yes
S26 SetBRCBValues TP Yes

- 646 -
Unbuffered report control block (URCB): If M8=Y
S27 Report TP Yes
S27-1 data-change (dchg) Yes
S27-2 quality-change (qchg) Yes
S27-3 data-update (dupd) Yes
S28 GetURCBValues TP Yes
S29 SetURCBValues TP Yes

Logging: If M9=Y or M10=Y


Log control block: If M9=Y
S30 GetLCBValues TP No
S31 SetLCBValues TP No
Log: If M10=Y
S32 QueryLogByTime TP No
S33 QueryLogAfter TP No
S34 GetLogStatusValues TP No

Generic substation event model (GSE): If M19=Y


GOOSE-CONTROL-BLOCK
S35 SendGOOSEMessage MC No
S36 GetGoReference TP No
S37 GetGOOSEElementNumber TP No
S38 GetGoCBValues TP No
S39 SetGoCBValues TP No
GSSE-CONTROL-BLOCK
S40 SendGSSEMessage MC No
S41 GetGsReference TP No
S42 GetGSSEDataOffset TP No
S43 GetGsCBValues TP No
S44 SetGsCBValues TP No

Transmission of sampled value model (SVC): If M20=Y


Multicast SVC
S45 SendMSVMessage MC No
Multicast Sampled Value Control Block
S46 GetMSVCBValues TP No
S47 SetMSVCBValues TP No
Unicast SVC
S48 SendUSVMessage TP No
Unicast Sampled Value Control Block

- 647 -
S49 GetUSVCBValues TP No
S50 SetUSVCBValues TP No

Control: If M11=Y
S51 Select Yes
S52 SelectWithValue TP Yes
S53 Cancel TP Yes
S54 Operate TP Yes
S55 CommandTermination TP Yes
S56 TimeActivatedOperate TP No

File transfer: If M17=Y


S57 GetFile TP Yes
S58 SetFile TP No
S59 DeleteFile TP Yes
S60 GetFileAttributeValues TP Yes

Time
Time resolution of internal
T1 1 µs nearest negative power of 2 in seconds
clock
1 µs time accuracy requires suitable hard-
Time accuracy of internal T5 (1 ware and software.
T2
clock µs) T0 (10ms)T1 (1ms) T2(100µs)
T3 (25µs) T4 (4µs) T5 (1µs)
Supported Timestamp res-
T3 100 ns nearest negative power of 2 in seconds
olution

- 648 -
LonWorks

- 649 -
Overview of LonWorks
The interface between C-CURE Building Management System and the LonWorks network uses an ActiveX con-
trol (software component), provided by Echelon, known as the LonWorks LCA Object Server (or LonWorks
Server). Information about the configuration of the network is provided by the LonWorks Database (LonDB)
which must be first created using a 3rd party configuration tool.
C-CURE Building Management System LonWorks interface supports the following features.

l Compatible with LNS 3.2 and OpenLNS.


l Supports network variables and configuration properties IP (SNVT's, UNVT's, SCPT's and UCPT's).
l Supports LonMark Object and Equipment Plugins.

The LonWorks configuration is accessed from the Application Explorer <Project>.Communication.Data


acquisition.LonWorks.
Whilst you are configuring the LonWorks within C-CURE Building Management System there may be periods
from a few seconds to several minutes whilst the application requests the LCA Object Server. During this
time, a message dialog is displayed. You can close the dialog and cancel an operation by pressing the
escape (Esc) key.

The LNS data acquisition driver is only supported on the following operating systems:

l Windows 7 SP1 (x64),


l Windows 8.1 (x64),
l Windows Server 2008 R2 SP1 (x64),
l Windows Server 2012 (x64).

- 650 -
Managing LonWorks in the Application Explorer

Tasks applicable to LonWorks


When the LonWorks folder is selected.
Icon Task Description
Add network Add a connection to a LonWorks network.
Start networks Start the connection to all LonWorks networks.
Stop networks Stop the connection to all LonWorks networks.
Details Display the LonWorks details dialog.
Settings Display the general LonWorks settings dialog.
When a LonWorks network is selected.
Icon Task Description
Start network Start the connection to a specific LonWorks network.
Stop network Stop the connection to a specific LonWorks network.
Permanently remove the configuration of the connection to a LonWorks net-
Remove
work.
Properties Open the properties dialog for a LonWorks network connection.
When the Nodes folder is selected.
Icon Task Description
Add a node Add a node to the selected LonWorks network.
When a node is selected.
Icon Task Description
Start a node Star communication with a node.
Stop a node Stop communication with a node.
Remove Permanently remove the node from the LonWorks network.
Properties Display the node properties dialog.

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior, and in particular any restrictions, when using cut or
copy and paste on configuration objects in the LonWorks folder.
LonWorks object Behavior
Network The pasted Network is given a unique name.
Any subordinate Nodes are duplicated using the original name.
The mapping of any variables is not duplicated.
Node The pasted Node is given a unique name within the context of the Network.

- 651 -
LonWorks Server Settings

LonWorks settings are not available from the global Communications Settings dialog.

The LonWorks Server general settings are accessed from the Application Explorer by selecting
<Project>.Communication.Data acquisition.LonWorksand choosing the Settings command from the task list.
Show picture

You can only make changes to the LonWorks Server properties if the network is stopped. The network is
automatically started again when the dialog is closed. If you choose not to stop the network, you can still
open the dialog, but not save any changes.

l User mode
l Single – The network can only be opened by one application. If C-CURE Building Management
System is running, any attempt to access this network by other applications will fail.
l Multi-user – This is the default option. It allows 1 or more applications to access the same net-
work at the same time. For example, you could run C-CURE Building Management System and
the LonWorks network configuration tool at the same time.
l Access mode
l Local – The database (LonDB) containing the network is located on the same computer as C-
CURE Building Management System.
l Remote – No longer used. Included for backwards compatibility only.

- 652 -
Configuring a LonWorks Network
A LonWorks Network object in C-CURE Building Management System configuration represents and provides
access to a LonWorks network. The configuration is accessed from the Application Explorer -
<Project>.Communication.Data acquisition.LonWorks.
If you use version 3.24 of LNS, a trace is displayed in the Event Viewer. This version of LNS is known
to be unstable and should not be used.

Adding a network

1. Select the LonWorks folder in the Application Explorer and, from the task list, select Add a network.
The LonWorks Network dialog opens. Show picture

2. Enter the name of the network in the Network alias text box. You can accept the suggested default or
enter one of your own. The network alias cannot be changed once it has been configured.
3. Enter a description of the network. The description appears in the contents pane of the Application
Explorer and can be useful to identify the network later. The description is optional.
4. Select the Network Name using the drop down list box. The list box will display a list of networks that
have been created by the LonWorks configuration software (LonMaker).
5. Select the System Name using the drop-down list box. Normally the system name is the same as the
network name.
6. Tick the Activate at startup property so that the network is activated at startup. If this property is not
selected then a SCADA BASIC program may be used to activate the network.
7. Click the OK button to close the dialog and save the configuration.

The Advanced Parameters tab

- 653 -
Show picture

l Monitoring parameters.
l Allow C-CURE Building Management System to bind variables to the host - Allows the developer
to configure the binding of variables to the LNS host using the property Bind the variable in each
variable's configuration. This property is for backwards compatibility for projects created with
earlier versions of C-CURE Building Management System where its use was commonplace. Its
use is no longer recommended. Instead, the driver uses any binding configured in the Network
Management Tool (NL220 or LonMaker) which is more flexible and efficient.
l Delayed monitoring stop when nodes become off-net - The delay (in seconds) before the node
monitoring is stopped in the event that the node is detected as being off-net. This is to prevent
the monitoring of a node from stopping if the node is expected to go temporarily off-net from
time to time.
l Default monitoring options for variables. The configuration of the following three properties only
affects the default settings of variables. The settings can still be changed for individual variables when
they are configured.
l Use default parameters - Use the monitoring configuration (binding and polling) that is con-
figured in the LonWorks network management tool.
l Poll interval - The default polling interval in seconds. The range of this value is from 1 to
3355443 seconds in steps of 0.1. The maximum value is equivalent to approximately 39 days. It
is recommended that you use a minimum value of 60 seconds.
l Background ping configuration.
l Update the network configuration - check this to configure the classes of ping in C-CURE Building
Management System or leave it unchecked to do so outside of C-CURE Building Management Sys-
tem.
l Ping intervals - set the ping interval for each class, in seconds.
l Mobile class.
l Temporary class.
l Stationary class.
l Permanent class.
l Device configuration - select one of the following:
l Do not change - C-CURE Building Management System does not modify the configuration.
l Set to mobile class.
l Set to temporary class.
l Set to stationary class.
l Set to permanent class.

- 654 -
l Router configuration - select one of the following:
l Do not change - C-CURE Building Management System does not modify the configuration.
l Set to mobile class.
l Set to temporary class.
l Set to stationary class.
l Set to permanent class.
l Networking.
l Primary server station - The name of the station (or list) on which the link with the LonWorks
Server is active. For the other stations, the configuration of this network will be accessible, but
C-CURE Building Management System does not connect with the LonWorks Server.
l Secondary server station - Not used in this version.

- 655 -
Configuring a LonWorks Node
How to add a LonWorks node

1. Select the Nodes folder of a previously configured LonWorks network in the Application Explorer and,
from the task list, select Add a node. The Node configuration dialog opens.
2. Enter an alias for the node in the Node alias field. The node alias cannot be changed once it has been
configured. Show picture

3. Enter subsystem through which the node will be accessed. The ellipsis button adjacent to the Sub-
system field allows you to browse and select the available subsystems. Show picture
When subsystems are nested, each subsystem must be separated by a ‘#’ character. For example, if
the node is located in the subsystem ‘sub_1_1’ of the subsystem ‘sub_1’, the field must contain ‘sub_
1#sub_1_1’.

4. Select the physical node to which the configuration refers using the Node name drop down list box.
5. Select Activate at startup if the node is to be activated when the network starts. If this property is not
selected then a SCADA BASIC program can be used to activate the node.
6. Click the OK button to close the dialog and save the configuration.

How to configure a watchdog


The watchdog mechanism has been replaced by a system using network "pings" in version 9.0 and later. No
configuration is required. For information about backwards compatibility with projects created with earlier
versions, please contact your support agency.

The Advanced tab


Show picture

- 656 -
l Start-up
l Synchronous read when start monitoring - Only selected when using power line transmission.
The default is not selected.
l Variable browsing
l Browse LonMark object - Browse LonWorks variables compliant with the LonMark standard. The
default is selected.
l Use device template - Use the node template rather than the node itself. Browsing uses the XIF
file. If the node uses plug-ins this option must be de-selected as plug-ins modify the node prop-
erties, not the template to which the node is linked.

- 657 -
LonWorks Network Tips and Tuning
For more information about LonWorks tips and tuning, please see the Knowledge base articles KB781
and KB456.

Reading and modifying the catalog


The fields displayed in C-CURE Building Management System are taken directly from the catalog recorded in
the LonDB. For variable types UNVT and UCPT, it is necessary to use the program LDRFCAT.EXE to insert
new variables in the catalog.

LCA object server error messages


All errors from the LCA Object Server are reported in the event viewer (F7). The error codes refer to the
code and descriptions in the help file LNSOBJRF.HLP.

Additional error tracing


You can enable additional error tracing by starting C-CURE Building Management System with the flag, -
LNSDEBUG, in the command line. The additional trace is reported in the file, Lns_catalog_reseau.dump in
the Bin\Log Files directory.

Additional traces should only be used if requested by your support agency.

Optimum LonWorks network bandwidth figures


Condition Bandwidth
No traffic (IP pings only) 2%
Normal traffic 10%
Peak traffic 70%
It is estimated that with a 50% usage of network bandwidth, 50% of the exchanges are lost.

Status values
The status values for LonWorks node and network are as follows.
Status value Meaning
0 No error detected for the network or the node.
1 Cannot load the LCA Object Server. Check the software installation on the computer.
2 The network configured cannot be found in the LonDB.
3 The system configured cannot be found in the LonDB.
4 An error occurred when starting the network.
5 The sub-system configured cannot be found in the LonDB
6 The node configured cannot be found in the LonDB
7 An error occurred when starting the node.
8 Node startup failed.
9 Node startup not activated.
10 Network startup not activated
11 Network start failed - The station is not a producer for this network.
12 Communication with the node is faulty (watchdog error).
13 Network start failed - Another network already started and only one network can be
used at a time.
14 The node is not present at startup.
15 No network interface when configured in remote NSI.
16 The node is detached.
17 The node's status is uncertain, the watchdog is pending.
18 The node is not commissioned.
19 LNS Turbo Edition is required, older versions are no more supported.
20 No network interface is declared on the network.
21 The network is offnet.

- 658 -
- 659 -
OPC

- 660 -
Overview of OPC
This sub-book describes the use of C-CURE Building Management System as an OPC-DA client, and how to
configure the OPC servers it will connect to.
OPC is an acronym for Open Platform Communications (formerly OLE for Process Control).
OPC is a communication standard based on OLE / COM technology and is the method recommended by
Microsoft for the exchange of information between MS-Windows applications.
The OPC concept is based on client/server architecture. C-CURE Building Management System is normally
used as an OPC client although it may also be used as an OPC server. It can be simultaneously connected to
several OPC servers and/or clients either on the local computer or on remote computer (using DCOM – Dis-
tributed COM).
Many manufacturers of industrial controllers now supply an OPC server with their equipment. The OPC
server communicates directly with the equipment using the manufacturer’s proprietary protocol. C-CURE
Building Management System communicates in turn with the server using OPC.
After connecting to an OPC server, the OPC client can define groups of data in the server. A group is to allow
the client to organize the data it requires. In the case of C-CURE Building Management System, it is used to
allocate a rate at which the data will be requested from the field device.

OPC XML-DA
OPC XML is a technology that makes plant floor data available using SOAP/XML. OPC XML-DA allows the cli-
ent and server to communicate using HTTP over an intranet or internet connection.

Configuring Windows when using DCOM


If you are using a remote OPC server (DCOM), it is likely that you will have to make some configuration
changes to Windows before communication can be established. As the callback mechanism used by OPC
essentially turns the OPC client into a DCOM server and the OPC server into a DCOM client, the configuration
changes must be made on all computers that contain an OPC server or OPC client.

Configuring OPC
C-CURE Building Management System has both OPC client and server capability. To use C-CURE Building
Management System as an OPC client you must configure a connection to an OPC server using the tasks
available in the Application Explorer.

- 661 -
Managing OPC in the Application Explorer

Tasks applicable to OPC


When the OPC folder is selected.
Icon Task Description
Add an OPC server Add a connection to an OPC-DA classic server.
Add an OPC XML-DA
Add a connection to an OPC XML-DA server.
server
When an OPC server is selected.
Icon Task Description
Add an OPC group Add a group to an OPC server.
Start OPC server Manually start the connection to an OPC server.
Stop OPC server Manually stop the connection to an OPC server.
Remove Permanently remove the configuration of the OPC server connection.
Mapping Open the OPC Mapping dialog used to link variables to OPC items.
Properties Open the properties dialog for an OPC server connection.
When an OPC group is selected.
Icon Task Description
Start group Manually start the group.
Stop group Manually stop the group.
Remove Permanently remove the configuration of the group.
Properties Open the properties dialog for the group.

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior, and in particular any restrictions, when using cut or
copy and paste on configuration objects in the OPC folder.
OPC object Behavior
OPC server The pasted OPC Server must be given a unique name.
Any subordinate OPC Groups are duplicated with the original name.
The mapping of any variables is not duplicated.
OPC group The pasted OPC Group must be given a unique name within the context of the OPC
Server.

- 662 -
OPC Settings
The OPC Settings are accessed from the Application Explorer by selecting <Project>.Communication.Data
acquisition.OPC and choosing the Settings command from the task list. Show picture

l Variable status
l Consider bad quality as - How C-CURE Building Management System treats OPC items with any
of the bad quality flags set.
l Unavailable (NS) - The quality of a linked variable is set to NS.
l Non accessible (NS COM) - The quality of a linked variable is set to NS COM.
l Invalidate variables - Defines if variable status should be set to invalid upon connection failure.
l Never - The variables are never made invalid. This can be used when there is intermittent com-
munication with the server.
l Immediately - The variables are made invalid immediately on a communication failure. This is
the default value.
l After a delay - The variables are made invalid after the specified delay.
l Monitoring
l Use the local timestamp upon device reconnection - Use C-CURE Building Management System’s
timestamp for the first value received after a device is re-connected.

- 663 -
Configuring a connection to an OPC server

- 664 -
How to Configure a Connection to an OPC-DA Server
An OPC Server object in C-CURE Building Management System configuration, represents and provides
access to an OPC-DA classic server either located on the local PC or on another PC connected by a local area
network. The configuration is accessed from the Application Explorer: <Project>.Communication.Data
acquisition.OPC.

Configuring a connection to an OPC server on the same PC

1. Select the OPC folder in the Application Explorer configuration tree and, from the task list, select Add
an OPC server. The OPC Server properties dialog opens. Show picture

2. Enter an alias for the server. This is the name by which the server will be known to the project. You
can accept the suggested default or enter one of your own.
3. Enter a description of the server. The description appears in the contents pane of the Application
Explorer and can be useful to identify the server later. The description is optional.
4. Select the server using the Server ProgID drop down list box. The list displays all registered servers
on the host PC. Show picture

5. Tick the Activate at start-up property if the connection is to be automatically established at startup.
You can also activate the connection using a SCADA Basic program.
6. Click OK to confirm the configuration.

If the Activate at start property was selected and the OPC servers' configuration allows it, the OPC server
will now start.

Configuring a connection to an OPC server on another PC over a local area network

1. Repeat steps 1 to 3 above. The OPC Server properties dialog opens.


2. Use the browse button adjacent to the Network node field to select the name of the computer on which
the OPC server is located. Show picture

- 665 -
3. Select the server using the Server ProgID drop down list box. The list displays all registered servers
on the host PC. Depending on the network architecture, it may take several seconds for the list of
registered servers to appear.
4. Tick the Start at launch property if the connection is to be established at startup. You can also activate
an OPC server connection using a SCADA Basic program.
5. Click OK to confirm the configuration.

If the Start at launch property was selected and the OPC servers' configuration allows it, the OPC server will
now start.
With some network configurations, the Network Browser dialog may not show the available com-
puters. You must then type the name directly in the Network node field.

- 666 -
How to Configure a Connection to an OPC XML-DA Server
An OPC XML-DA Server object in C-CURE Building Management System configuration represents and
provides access to an OPC server either located on the local PC or on another PC connected by a local area
network. The configuration is accessed from the Application Explorer - <Project>.Communication.Data
acquisition.OPC.

Configuring a connection to an OPC XML-DA server

1. Select the OPC folder in the Application Explorer configuration tree (Project.Communication.Data
acquisition.OPC) and, from the task list, select Add an OPC XML-DA server. The OPC Server properties
dialog opens. Show picture

2. Enter a server alias name. This is the name by which the server will be known to the project.
3. Enter the server Url.
4. Tick the Activate at start-up property if the connection is to be established at startup. You can also
activate an OPC server connection using a SCADA Basic program.
5. Click OK to confirm the configuration.

If the Activate at start-up property was selected and the OPC servers' configuration allows it, a connection
to the OPC server will now be established.

- 667 -
The OPC Server Advanced Tab
The Advanced tab in the OPC Server properties box is for tuning the OPC Server connection.
With the majority of OPC servers, the default settings provide the best connection. Before changing
any of the properties, check that the option is supported by the server.
The properties prefixed with * are only available when using OPC-DA Classic.
The properties prefixed with ** are only available when using OPC-XML.
Show picture

l *Server type
l *Automatic detection - The driver will attempt to detect if the OPC server is 1.0a or 2.0 com-
pliant and make the connection accordingly. This is the default setting.
l *OPC 1.0A compliant server - Force the driver to use OPC 1.0A for connection to the server.
l *OPC 2.0 compliant server - Force the driver to use OPC 2.0 for connection to the server.
l *Browse server address space
l *Item properties browsing
l *No browsing - No browsing of item properties.
l *Browse standard properties - The driver attempts to get the status of read/write access
and the data type of an OPC itemID by using the IOPCItemMgt::ValidateItems method.
l *Browse additional properties - The driver attempts to get the read/write access, the data
type, and the description of an OPC itemID by using the IOPCItemProperties interface or
IOPCBrowse interface.
l *Default filter criteria. A string used by the client when browsing the address space in the server
with no filter. Information on which of the options is required will normally be found in the
server documentation.
l *Null filter – A filter string of "" is used. This is the default setting.
l *'*' filter – A filter string of "*" is used.
l Connection/Reconnection
l Check server status period – The period at which C-CURE Building Management System checks
the status of the OPC server. The status is reported in system variables in the database. See the
topic OPC Status Variables in the Database book for further information. Range 500 to 60 000
ms. The default is 10 000 ms.
l Try to reconnect if connection fails – If ticked, C-CURE Building Management System will peri-
odically try to re-establish a failed connection with the OPC server.

- 668 -
l Reconnection period – The period at which C-CURE Building Management System will
attempt to re-establish a failed connection. Range 1 000 to 60 000 ms. The default is 60
000 ms.
l *Use the advanced reconnection strategy - Used to clean up resources upon reconnection
to a server. This is not compliant with the OPC foundation standard, which is why it is an
option. The OPC foundation standard is that the OPC server should correctly manage dis-
connection but this does not always happen.
l *Waiting period before group creation - The wait period after establishing a connection and
before trying to create groups in the OPC server. The default is 0 ms.
l Frozen context detection - The status of each OPC server is monitored by a program that peri-
odically checks the OPC server's response. If the server does not respond, it is said to have a
frozen context.
l Level 1 time limit - If the OPC server does not respond to requests for this period or
greater a warning message is displayed in the Event Viewer and the OPC system variable
<SYSTEM.OPC.ServerAlias>.ERROR is set to 10.
l Level 2 time limit - If the OPC server does not respond to requests for this period or
greater a warning message is displayed in the Event Viewer and the OPC system variable
<SYSTEM.OPC.ServerAlias>.ERROR is set to 11.
l Interoperability issues
l **Browsing
l **Use null string instead of empty string - Activate this property if the OPC server only
accepts a null string where the OPC standard specifies the use of an empty string in brows-
ing requests.
l Data interpretation - Configure how C-CURE Building Management System interprets value with uncer-
tain or bad quality. See note below.
l Use new values even when the quality is bad - Use new values from the OPC server even if the
quality flag is set to bad.
l Quality - Configure how C-CURE Building Management System interprets the uncertain quality
flag from the OPC server.
l As good quality - Uncertain quality is treated as good quality.
l As bad quality - Uncertain quality is treated as bad quality.
l **Http Basic Authentication - Tick to activate the use of Http Basic Authentication.
l **Username - The user name to send to the OPC server. Max length is 255 characters. The User-
name cannot include the double-quote character (").
l **Password - The password to send to the OPC server. Max length is 255 characters. The Pass-
word cannot include the double-quote character (").
l Servers - A drop down list box used in multi-station applications to start the OPC server only on a spe-
cific station or list of stations. For standalone applications, the list box will be empty.

About OPC quality


An OPC server provides a minimum of three properties for each of its variables, Value, Quality and
Timestamp. The Quality provides information about the status of the value and is a 16-bit word. The higher
8-bits are vendor specific and the lower 8-bits follow a standard format, QQSSSSLL, where QQ provides the
most basic quality information and SSSS is the sub-status.

l 00SSSSLL - The value is bad for the reason indicated by the sub-status.
l 01SSSSLL - The value is uncertain for reasons indicated by the sub-status.
l 10SSSSLL - Not used.
l 11SSSSLL - The value is good.

- 669 -
The Traces Tab
The Traces tab in the OPC Server properties box allows the communication between the OPC server and C-
CURE Building Management System to be monitored (traced) in the event of a problem.
Show picture

The result of any traces that are enabled is displayed in the event viewer. You should only change the selec-
tion of properties in this tab if advised to do so by your support agency.

- 670 -
Configuring an OPC group

- 671 -
How to Configure an OPC Group
Once you have configured an OPC server you must configure one or more groups before you can link the
OPC server to the variables. An OPC group allows the client to specify options about how the real time data
is to be exchanged with the server. In many cases, you may only need to create one group.

1. Open the Application Explorer. Expand the configuration tree and select a previously configured OPC
server.
2. From the task pane, select the task Add an OPC group. The OPC Group properties dialog is displayed.
Show picture

3. Enter a meaningful name for the group. The group name is limited to 10 alphanumeric characters. The
group name is used for reference when linking a variable to an item in that group.
4. Enter an update rate for the group. Any variables linked to an item in the group will be refreshed at
this rate.
5. Click OK to confirm the configuration.

When specifying the update rate check the documentation supplied with the OPC server. Specifying
a rate that is not achievable will only add unnecessary load to the system.

- 672 -
The OPC Group Advanced Tab
The Advanced tab in the OPC Group properties box is for tuning the OPC Server connection. Under normal cir-
cumstances, these properties will not need to be changed.
Show picture

Many of the properties that are configured here are sent directly to the OPC server. The resultant
behavior will depend on the OPC server in use.
The properties marked with * are only available when using OPC-DA Classic.
The properties marked with ** are only available when using OPC-XML.

l Deadband
l Use deadband – A dead-band that is applied by the server to any analogue variables in the
group. The variables must change by a value greater than the dead-band before they are sent to
the client. The behavior of the dead-band depends on how it was implemented in the server. See
the documentation supplied with the server for further information. The default is not ticked.
l Deadband value - The deadband value in percent. The default is 0.
l Timestamp
l Use timestamp provided by the server - The timestamp for each change in value of an item is
supplied by the OPC server. The default is not ticked.
l *Localization of timestamp provided by the server - The following properties decide how the
timestamp is generated. The server refers to the PC where the OPC server is located. The client
refers to the PC where C-CURE Building Management System is located. TimeBias is the dif-
ference between GMT0 and the time zone selected in the Windows Date/Time Properties dialog.
l *UTC (or GMT) - Timestamp = (server local time - server TimeBias) + client TimeBias.
This is the default.
l *Local (Current time zone) - Timestamp = server local time - server TimeBias.
l *Customized - Timestamp = (Server Local Time - Server Time Bias) - TimeBias value.
l TimeBias value* – A time offset in minutes that may be applied to the timestamp of
data from an OPC server on another PC. (When using DCOM).
l Adjust with DST if required
l Connection parameters
l Without flow regulation - If ticked allows a disconnected server to record value changes locally
and then send them in a block when communication is re-established. The default is not ticked.

- 673 -
l *Size of exchange block – The maximum number of items that can be contained in a message
between the server and client. This is sometimes limited by the OPC server. See the doc-
umentation supplied with the server for further information.
l *Data update parameters
l Update data by notification - The server sends information to the client when it changes. This is
normal operation and is the default selection.
l *Update data by cyclic read - The client periodically polls the server for server for information.
This is only used for old servers or servers that do not work correctly.
l *Update data by user program - Normal update of data is stopped and update only occurs when
requested by a SCADA Basic program using the OPC instruction.
l *Item advising
l *Inactive group while connecting items – If ticked, the group ceases to be refreshed whilst new
items are added. This can be advantageous where the data is being read in frames from the
filed device and the server must re-optimize the frame configuration each time a new item is
added. The default is ticked.
l *Synchronize database – These properties define how data is sent from the server to the client
when the connection is first established. See the documentation supplied with the server for
which options are supported.
l *No synchronization – This should be selected if the server automatically refreshes all
items after connection.
l *Preserve saved values if quality is bad - If the variable is saved, preserve the
saved value on start-up if the OPC item quality is bad.
l *Synchronize by cache refresh - The client database is refreshed from the OPC server
cache. All the items are refreshed even those that already have known values.
l *Synchronize by device refresh - The client database is refreshed after the field devices
have been polled. All the items are refreshed even those that already have known values.
l *Synchronize by cache read – The client database is refreshed from the OPC server cache.
Only items with unknown values are read. This is the default selection.
l *Synchronize by device read – The client database is refreshed after the field devices
have been polled. Only items with unknown values are read.
l *Read
l *Read mode
l *Automatic detection – The client attempts to use Asynchronous mode. If this is not sup-
ported by the server then it switches to Synchronous mode. This is the default selection.
l *Synchronous mode – The client makes a request for data and then waits for the answer
from the server. This mode should be avoided if possible as whilst the client is waiting no
other activity takes place.
l *Asynchronous mode – The client makes a request for data and the server informs the cli-
ent when the data is Available.
l Write
l *Write mode
l *Automatic detection – See above.
l *Synchronous mode – See above.
l *Asynchronous mode – See above.
l Synchronize values after writing – Used to synchronize the client and server after a write has
been performed.
l No synchronization – No action taken. This is the default selection.
l Synchronize by cache read – The value in the client is read back from the server cache.
l Synchronize by device read – The value in the client is read back from the field device.
l Update the variable immediately with the written value - The variable value is updated imme-
diately after the write rather than waiting for it to be read from the OPC server.
l *Asynchronous write timeout
l *Warning timeout - If the server has not confirmed the write after this period a warning
message is generated.
l *Error timeout - If the server has not confirmed the write after this period it is treated as
an error.
l Data interpretation

- 674 -
l Value
l Byte swapping for word array as a string - Used for servers that send strings as a word
array. If selected it swaps the bytes in each word so that the string arrives in the correct
sequence. The default is ticked.
l Data type conversion
l Done by the SCADA software - Any data type conversion necessary to accommodate
the real time value in variables is done by C-CURE Building Management System.
l Done by the OPC server - Any data type conversion necessary to accommodate the
real time value in variables is done by the OPC server.
l Quality
l Invalidate variables - The action to take with the variables when there is a failure of com-
munication to the OPC server.
l Never - The variables are never made invalid. This can be used when there is intermittent
communication with the server.
l Immediately - The variables are made invalid immediately on a communication failure.
This is the default value.
l After a delay - The variables are made invalid after the specified delay.
l Interoperability issues
l *Group name imposed by the server - Use this property to designate the corresponding
OPC group if the OPC server imposes a non-compliant group name (imposed name too long or
comprising characters that are not allowed).
l **Wait time
l Use wait time - Tick to activate the use of the OPC parameter Wait time. This is required
by some OPC servers even if the hold time parameter is not used.
l Servers - A drop down list box used in multi-station applications to start the OPC group only on a spe-
cific station or list of stations. For standalone applications, the list box will be empty.

- 675 -
The OPC Group Traces Activation tab
The Traces tab in the OPC Group properties box allows the communication between the OPC server and C-
CURE Building Management System to be monitored (traced) in the event of a problem. Show picture

The result of any traces that are enabled is displayed in the event viewer. You should only change the selec-
tion of properties in this tab if advised to do so by your support agency.

- 676 -
Using the OPC Mapping Dialog
The OPC Mapping dialog is used to map (link) OPC items to C-CURE Building Management System variables.
It can be opened from the Application Explorer either when an OPC server is selected by using the Mapping
task, or directly from the Source tab of a variable's properties dialog when an OPC source has been selec-
ted.
The left pane contains a tree display of the configured OPC server(s) and any folders they contain. The right
pane contains a table of the OPC items for the selected folder, together with any of variables to which they
are linked and the corresponding OPC group. Show picture

Right clicking anywhere in the right-hand pane displays a context menu with the following commands.

l Select columns - Allows selection of which columns are displayed in the dialog.
l Name - The name of the variable within the OPC server. This column is mandatory.
l Variable - The name of the variable to which the OPC variable is mapped.
l Group - The OPC group that the variable is a member of.
l ItemID - The identity of the OPC item.
l Original description - The description of the OPC item (if any) as configured in the OPC server.
l Detail - Detailed information about the OPC item including its type, access and range.
l Variable selector - Opens the Variable Selector dialog.
l Create variable - See below.
l Default OPC group - Sets the OPC group that is used as default when mapping an OPC item to a vari-
able. Only displayed if more than one OPC group has been configured.
l Set OPC group - Changes the OPC group for the selected variable. Only displayed if more than one OPC
group has been configured.
l Unmap item - Un-maps (removes the link) between the selected variables and the corresponding OPC
item.

How to map OPC items and variables when opening the OPC mapping dialog from the OPC
server configuration

1. Right-click in the right hand pane of the OPC Mapping dialog and, from the pop-up menu, select the
Variable Selector command. The Variable Selector dialog opens. Drag it to a convenient location so
you can see both it and the OPC Mapping dialog. Show picture

- 677 -
2. Click in the OPC Mapping dialog and select the OPC item to be mapped.
3. Click in the Variable Selector dialog and select the variable to be mapped. Click the Apply button and
the link between the OPC item and variable is made using the default OPC group.
4. Repeat steps 2 and 3 for all the variables to be mapped.

You can also open the Variable Selector by double clicking on an OPC item.

How to map an OPC item to a variable when opening the mapping dialog from a variable's
Source tab

1. Open the variable's properties dialog and select the Source tab.
2. Select the OPC server using the Source drop down list box.
3. Select the OPC group using the Group name drop down list box.
4. Open the OPC Mapping dialog by clicking the ellipsis button adjacent to the Item Id field.
5. Expand the OPC configuration tree in the left pane so that the OPC item to which the variable is to be
mapped is displayed in the table in the right pane.
6. Double click on the OPC item. The OPC Mapping dialog closes and the chosen OPC item appears in the
variable's Item Id.
7. Click OK to confirm the configuration and close the variable's properties dialog.

How to change the OPC group for a mapped variable

1. Open the OPC Mapping dialog and select the variable to be changed.
2. Right-click on the variables and, from the context menu, select the command Set OPC group and then
the name of the new OPC group.
3. A dialog will appear asking for confirmation. Click OK to confirm the operation.

How to un-map a variable

1. Open the OPC Mapping dialog and select the variable to be un-mapped.
2. Right-click on the selected variables and, from the context menu, select the command Unmap items.
3. A dialog will appear asking for confirmation. Click OK to confirm the operation.

How to automatically create a variable


You can automatically create a variable and simultaneously link it to an OPC item using two methods.

l Click in the Variable field for any un-mapped item. The field becomes a text box into which you can dir-
ectly type a new variable name. A variable with default properties and the correct type to match the
item is automatically created and linked to the item.

- 678 -
l Right-click on any un-mapped OPC item and, from the context menu, select Create variable. A vari-
able with default properties and the correct type to match the item is automatically created and linked
to the item. The variable name is constructed using the following syntax. <Server alias>.<OPC
item>. Show picture

Mapping dissimilar data types


When mapping OPC items to variables you normally map like to like, so you map an analog item to a
register, a boolean item to a bit or a string item to a text. However, it is possible to map the following dis-
similar data types.
Data type
C-CURE
Building Man-
OPC server Behavior
agement Sys-
tem
Analog Bit The bit is set to 0 if the analog value is 0, else it is set to 1.
String Register C-CURE Building Management System will attempt to convert the string to a
number. For example, if the string is "10" the register will be 10. If C-CURE
Building Management System is unable to convert the string the register is set
to invalid with the status NS FMT.
If you map any other combinations, the value of the variable will be invalid with a status of NS FMT.
You can use an expression for more specialized mapping but it must be manually entered in the vari-
able tree's configuration file. See the book on the Variables Tree for more information.

- 679 -
Configuring Windows when using a remote OPC server (DCOM)
If you are using a remote OPC server (DCOM), it is likely that you will have to make some configuration
changes to Windows before communication can be established. As the callback mechanism used by OPC
essentially turns the OPC client into a DCOM server and the OPC server into a DCOM client, the configuration
changes must be made on all computers that contain an OPC server or OPC client.
The information contained in this book is only applicable to a Workgroup based network. Inform-
ation about using DCOM on a Domain based network may be found on the OPC Foundation's web-
site.

- 680 -
SNMP

- 681 -
Overview of SNMP
SNMP is an acronym for Simple Network Management Protocol. Its primary use is the management of
devices on an IP network. Devices that typically support SNMP include routers, switches, servers, printers
etc.
SNMP exposes device management data as a number of variables. These variables can be read, and some-
times written, by managing applications.
An SNMP managed network has three key components.

l The managed device - The physical hardware and software/firmware that together make the device.
l Agent - The software/firmware on the device that is responsible for exposing the managed data as
variables.
l Network management station - The hardware and software used to manage the network. For the pur-
pose of this help, a PC running MS Windows and C-CURE Building Management System.

Management Information Base (MIB)


SNMP itself does not define the variables that a device should provide. Instead, SNMP uses an extensible
design where the available information is defined by management information bases (MIBs). MIBs describe
the data available from a device using a hierarchical structure containing object identifiers (OID) and similar
to that of variables .
Each OID is unique. The format that defines it is a sequence of numbers separated with full stops. There are
two roots (starting points), iso (which is .1) and ccit (which is .0). In practice, most OIDs start with .1.3.6.1
(where 1 = iso, 3 = org, 6 = dod, 1 = Internet). Below Internet, there are several branches, the most com-
monly used being mgmt (.2) and private (.4). All standard OIDs (those that have been approved by the Inter-
net Activities Board (IAB)) reside under mgmt. OIDs defined by equipment and software vendors reside
under private. In fact, they are found under a sub-tree of private, called enterprises (.1).
A branch, within the private.enterprises sub-tree, is allocated to each vendor that registers for an enter-
prises object identifier. For example Wago has the enterprise OID .13576. So all the variables we define for
an application using a Wago device would fall under .1.3.6.1.4.1.13576 (.iso.or-
g.dod.internet.private.enterprise.wago). Up unto the enterprise number, the uniqueness is maintained by
the committee, after this, the uniqueness is maintained by each enterprise. Show picture

MIB files
SNMP provides a mechanism by which the management station can query the device for its supported OID's.
However, this is seldom convenient as only the most basic information is provided (numerical identifier and
data type) and it means you can only obtain the information if the device is on-line. Instead, it is normal to
make use of MIB files, which describe the OIDs in more detail and can be loaded by the management station
to provide information about a device even if it is off-line. There are several MIB files that describe the
standard OIDs, plus each device manufacturer supplies an MIB file specific to the device.

- 682 -
One of the most useful pieces of information that the MIB files provide is the symbolic name. Instead of a
management station referring to an OID using numerical notation, it can use symbolic notation that is much
easier for a user to understand. For example, when using a Wago PLC:
.1.3.6.1.4.1.13576.1.1
becomes
.iso.org.dod.internet.private.enterprises.wago.wagoCompany.wagoName

Scalar and Tabular Objects


An object that always has a single instance is called a scalar object. An object that has multiple instances is
called a tabular object. When referencing an instance, the instance number is appended to the OID.
With scalar objects, the instance number is always 0. For example:
.iso.org.dod.internet.private.enterprises.wago.wagoCompany.wagoName.0
With tabular objects, you append the instance of the object.
.iso.or-
g.dod.in-
ter-
net.private.en-
terprises.wag-
o.wagoIOProducts.wioCommon.wioPlcData.wioPlcDataTable.wioPlcDataEntry.wioPlcDataReadArea.101
Only the types of objects on the managed device are specified by the MIB, not the actual instances.

Trap notifications
In addition to supplying information about a device as a result of a request from a management station,
agents also send unsolicited messages when they detect some significant event. An unsolicited message of
this sort is called a trap notification.
There are just five standard traps (ColdStart, WarmStart, LinkUp, LinkDown, AuthenticationFalure and
egpNeighborLoss), plus a sixth that is enterprise specific.

SNMP Versions
There are three SNMP versions.

l V1: This is the first protocol version defined by RFC1157. The security level of this version is very
basic as the only check is based on the community string.
l V2c (RFC 1441): This version is known as community string based SNMPv2. Its key advantage is the
support of GETBULK function, which supports a multiple item read in one request speeding up the read-
ing process. It also support the Inform command that unlike a trap notification, requires the manager
to positively acknowledge with a response message.
l V3 (RFC 3411): This version enhances exchange security by implementing the following features.
l Authentication is used to ensure that traps are read by only the intended recipient.
l Privacy encrypts the payload of the SNMP message to ensure that it cannot be read by unau-
thorized users.

Support for Unmanaged Devices


SNMP provides no support for unmanaged devices. However, the C-CURE Building Management System
SNMP driver also supports unmanaged devices by making use of the PING request.

- 683 -
Managing SNMP in the Application Explorer

Tasks applicable to SNMP


When the SNMP folder is selected.
Icon Task Description
Settings Display the general SNMP settings dialog.
When the Networks folder is selected.
Icon Task Description
Add a network Add and configure a new a SNMP network.
When an SNMP network is selected.
Icon Task Description
Add an unmanaged
Add an unmanaged device to the network.
device
Add an SNMP device Add an SNMP device to the network.
Start network Start the connection to the network.
Stop network Stop the connection to the network.
Remove Permanently remove the configuration of the network.
Open the mapping dialog used to link variables to SNMP OIDs. All devices on
Mapping
the selected network are displayed.
Properties Open the properties dialog for the network connection.
When a device is selected.
Icon Task Description
Start device Start the connection to the selected device.
Stop device Stop the connection to the selected device.
Send a Ping to the device to check its status. A command dialog opens during
Ping
the Ping process displaying the results.
Remove Permanently remove the configuration of the selected device.
Properties Open the properties dialog for the selected device.
When the Polling Groups folder is selected.
Icon Task Description
Add polling group Add a new polling group.
When a Polling Group is selected.
Icon Task Description
Remove Permanently remove the selected polling group.
Properties Open the properties dialog for the selected polling group.

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior, and in particular any restrictions, when using cut or
copy and paste on configuration objects in the DNP3 folder.
SNMP object Behavior

- 684 -
Device The pasted Device is given a unique name.

- 685 -
Managing MIB Files
MIB is an acronym for Management Information Base. The MIB files describe the data available from a
device using a hierarchical structure containing object identifiers (OID) and similar to that of C-CURE Build-
ing Management System variables.
The installation package includes a set of standard MIB files that describe the OIDs approved by the Internet
Activities Board. These are installed in a sub-folder called SNMP\MIBs.
Additional, manufacturer specific MIB files can be located in any of the following folders.

l Local to the project in the sub-folder MIBs.


l Local to the project, in any of the Project Libraries, in the library sub-folder MIBs.
l In the Common Library in the folder MIBs,
l In any of the Shared Libraries in the sub-folder MIBs.

MIB files are only loaded when the application starts. If you add more files to any of the folders,
then C-CURE Building Management System must be re-started before they are taken into account.
Any errors resulting from the loading of manufacturer specific MIB files are reported in the Event
Viewer (F7).

Offline and online browsing


Configuration of an SNMP device is possible whether it is online or not. In either case, data extracted from
the MIB files is used to translate the numerical OID to a symbolic OID subject to the following limitations.

l Offline browsing and configuration based on MIB files may not be 100% accurate as it's not possible to
check if the OID selected from a MIB file is actually available on the device.
l Online browsing, that is get OIDs using OID discovery and display the symbolic OID from the MIB
files, may not always be possible if the MIB files are missing or do not correspond exactly to the
installed devices. In that case, the numerical OID is used.

Only OID's that can be polled are displayed. Not those that can only be refreshed by trap.

- 686 -
SNMP and Ping Data Types
SNMP Variable type Notes
data type
Integer Register Range = -2e31 to 2e31 - 1. Allows enumerations.
Integer32 Register Range = -2e31 to 2e31 - 1.
Byte string Text Can be used to specify bytes of binary or textual information. Length 0
to 65535 bytes
Object identifier Text
IpAddress Text Used to specify an IPv4 address in the format x.x.x.x. Example
192.168.99.10.
Counter Register Used to represent a count. Range 0 to 4294967295.
Counter32 Register Used to represent a count. Range 0 to 4294967295.
Gauge Register Non-negative integer which holds the maximum or minimum value spe-
cified in a range when the actual value goes over or below the range.
Gauge32 Register Non-negative integer which holds the maximum or minimum value spe-
cified in a range when the actual value goes over or below the range.
Unsigned32 Register Range = 0 to 2e31 - 1
TimeTicks Register Elapsed time in units of hundredth of a second. Range is 0 to 2e32 - 1.
C-CURE Building Management System automatically converts to mil-
liseconds.
Counter64 Register Used to represent a count. Range 0 to 2e64 -1.
UInteger32 Register
Trap#0 Bit Cold start. See the topic Mapping traps #0, #1, #4, #5 and #6.
Trap#1 Bit Warm start. See the topic Mapping traps #0, #1, #4, #5 and #6.
Trap#2#3 Bit Link status. See the topic Mapping traps #2 and #3.
Trap#4 Bit Authentication failure. See the topic Mapping traps #0, #1, #4, #5 and
#6.
Trap#5 Bit Neighbor loss. See the topic Mapping traps #0, #1, #4, #5 and #6.
Trap#6 Bit Enterprise specific. See the topics Mapping traps #0, #1, #4, #5 and
#6 and Mapping the Enterprise Trap supplementary OIDs.

Ping Variable type Notes


data type
Status Bit 1 if the device is on-line, else 0.
StatusCode Register Status code returned from the ping action.
RoundTripTime Register Ping round trip time in milliseconds.

- 687 -
SNMP General Settings
The SNMP General Settings are accessed from the Application Explorer by selecting <Pro-
ject>.Communication.Data acquisition.SNMP and choosing the Settings command from the task list. Show
picture

l Communication
l Maximum number of concurrent requests - The maximum permitted number of pending
requests, across all the configured networks, at any given time. Default 150, maximum 500.
l Data
l Convert timetick values to milliseconds - The SNMP timetick unit is 100 milliseconds. Ticking
this box converts any timetick values to milliseconds, which is C-CURE Building Management
System's standard time unit. The default is ticked.
l Configuration
l Use numerical OID in variable configuration - If ticked use the numerical OID format in the OID
property of the Variable Configuration dialog (source tab) and in the trace. If un-ticked the sym-
bolic OID used. Changes to this property are only taken into account after network or equipment
start. The default value is ticked.
l MIB browser sorting
l Using the symbolic OID - If selected, the MIB browser displays data sorting according to
their symbolic OIDs.
l Using the numerical OID - If selected, the MIB browser displays data sorting according to
their numerical OIDs.
l Maximum number of port displayed - The number of link status displayed in the mapping.

SNMP Traces tab


The SNMP Traces tab contains properties to enable additional error messages that can be useful when dia-
gnosing errors. The errors appear in the Event Viewer (F7). You should only select properties in this tab if
advised to do so by your support authority.

- 688 -
Adding a Polling Group to the SNMP Configuration
Polling Groups are used to define the period at which C-CURE Building Management System requests data
from either managed or unmanaged devices. A polling group can be used for one or more SNMP networks.
When you map a Variables Tree variable to an OID or Ping you specify a Polling Group - C-CURE Building
Management System will then use the period defined in the group as the scan rate.
By default, the driver creates one request, per Polling Group, per device. If you are reading a large number
of variables from a device, using a single polling group, there is the possibility of exceeding the maximum
number of OID's per request. In that case, a number of requests are created all at the same rate.

Adding a Polling Group

1. Using the Application Explorer, select the Polling folder sub-ordinate to SNMP. From the task pane,
select Add polling group. The Polling Group dialog opens. Show picture

2. In the Name box, enter a name for the Polling Group. You can either accept the default or enter one of
your own.
3. Enter the optional descriptive text in the Description box. The description is only used in the Applic-
ation Explorer.
4. Enter the Update Rate in milliseconds. Range 1000 (1 second) to 86400000 (24 hours). The default is
60000 (1 minute).
5. Click on OK to confirm the configuration and close the dialog.

Using multiple Polling Groups to segregate OIDs in a single device


In some devices, particularly those supporting SNMP V1, if one OID in a request is bad the device reports all
OIDs in the same request as bad. You can improve this situation by using more than one polling group, and
hence more than one request, for a device. Consider the following simple example.
You want to read OIDs 10, 20, 30 and 40 from a device with the above characteristic.

l If you use a single polling group then, if the event OID 10 is bad, all the other OIDs also become bad.
l If you use two polling groups, one for OIDs 10 and 20 and the other for OIDs 30 and 40, if OID 10 is
bad then OID 20 will also be bad but OIDs 30 and 40 will be OK.

- 689 -
Adding an SNMP network

- 690 -
Adding an SNMP Network
A SNMP Network Object in C-CURE Building Management System configuration is used to configure network
wide properties. If required, you can create several Network objects, each with different properties. When
you add a Device, it will be sub-ordinate to a particular Network Object, inheriting properties from that
object. The configuration is accessed from the Application Explorer - <Project>.Communication.Data acquis-
ition.SNMP.Networks.

Adding a network

1. Select the Networks folder (sub-ordinate to the SNMP folder) in the Application Explorer and, from the
task list, select Add a Network. The SNMP Network dialog opens. Show picture

2. In the Name text box, enter the name of the network. You can accept the suggested default or enter
one of your own.
3. Enter a description of the network. The description appears in the contents pane of the Application
Explorer and can be useful to identify the network later. The description is optional.
4. To activate the network connection at startup, tick Activate at start-up.
5. If you are configuring a multi-station application, select the Advanced tab and select the Servers list.
The network will only be activated on those stations named in that list.
6. Click on OK to confirm the configuration and close the dialog.

The Advanced tab


See the topic SNMP network advanced properties.

- 691 -
SNMP Network Advanced Properties
The SNMP Network advanced properties are accessed from the SNMP Network configuration dialog,
Advanced tab. The majority of properties in this tab are defaults that are propagated to sub-ordinate
devices. Show picture.

l Trap/inform
l Listening port - The port number on which devices must send any traps. Default 162.
l Device default properties - The properties to be used for each sub-ordinate device unless configured
otherwise in the device configuration Advanced tab.
l SNMP port - The port used by the device to communicate using SNMP.
l Number of retries - The number of retries after a timeout. Default 2.
l Number of OID's per request - The maximum number of OIDs that the device supports in one
SNMP request. Default value is 25.
l Timeout (ms) - Device timeout in milliseconds. Default 1000.
l Host name resolution mechanism
l Resolution period (ms) - When devices are addressed based on their host name, resolved
names may be reset at runtime due to external actions. Setting a resolution period forces
host name resolution to be executed periodically. Default to 1 hour.
l Enable dynamic resolution upon reconnection - In addition, enabling this setting forces a
device's host name to be resolved upon reconnection to avoid failure if the resolved name
was reset during the disconnection.
l SNMP V1 and V2/2c
l Community - The read community string. If the manager does not have the same string as
the device, any request times out.
l SNMP V3
l User name - The V3 User Name string. The default is null.
l Authentication properties
l Type - The Type when using AuthNoPriv. Either MD5 or SHA. The default is MD5.
l Key - The password string when using AuthNoPriv. Default is empty.
l Privacy properties
l Type - The Type when using AuthPriv. Either AES or DES. The default is DES.
l Key - The password string when using AuthPriv. Default is empty.
l Interoperability issues
l Reset persistent Engine Time upon reconnection - Because many SNMP Agent
devices do not persist the Engine Boots counter correctly, the SNMP v3 hand check

- 692 -
may fail upon reconnection. Enabling this setting allows for working around the
issue by resetting the Engine Time upon reconnection.
l Networking
l Servers - The name of the Servers List when configuring a multi-station application. The net-
work will only be activated on those stations named in that list.

- 693 -
Adding a device to an SNMP network

- 694 -
Adding a Device to an SNMP Network
The process to add a managed (SNMP) or unmanaged device (PING only) to an SNMP network is broadly sim-
ilar.
A device is identified by its IP Address. In C-CURE Building Management System, it is known by the Name
that you give it during the configuration.

Adding a Device

1. Select an SNMP network in the Application Explorer. From the task pane, select either Add unmanaged
device or Add SNMP device as appropriate. The Device dialog opens. Show picture

2. In the Name box, enter a name for the device. You can either accept the default or enter one of your
own.
3. Enter the optional descriptive text in the Description box. The description is only used in the Applic-
ation Explorer.
4. Select either By IP or By host name and enter either the IP address or the Host Name properties as
appropriate. The Ellipsis button adjacent to the Host Name field opens a dialog that allows you to
browse the local network.
5. For SNMP devices, select the appropriate SNMP version. This property is not available for unmanaged
devices.
6. Click on OK to confirm the configuration and close the dialog.

The Advanced tab


See the topic SNMP Device advanced properties.

The Traces tab


The Traces tab is used to enable debugging traces in the event of any problems with the device. Only use
this if advised to do so by your support agency.

- 695 -
Device Advanced Properties
The Device advanced properties are accessed from the Device configuration dialog, Advanced tab. Show pic-
ture.

The Device advanced tab allows you to override the network default settings for individual devices as
required. See the SNMP network advanced properties topic for an explanation of the properties.
Note that the SNMP Port, Number of OIDs per request and Community properties are not available for
unmanaged devices.

Optimizing Number of OIDs per request


For optimum performance, it is important to correctly configure the property Number of OIDs per request.
The default value for all devices is inherited from the property of the same name in the SNMP Network
Advanced Properties tab, but it is important to set it for each device. If the information is not supplied by the
device manufacturer, you can find it by trial and error (most devices time out if you make a request con-
taining too many OIDs).
The Maximum number of OID's per request affects both Polling and Browsing (Getbulk) requests and it is
very important to set it correctly. The default value of 25 is for an average device and should be increased if
the actual device supports it.

- 696 -
SNMP Device Properties Dialog Trace Tab
The SNMP Device Properties dialog contains a Trace tab that can be used to enable additional messages for
the Event Viewer (F7). Show picture

l Error level 1 to Error level 4 - Internal use only. Only enable if asked to do so by your support author-
ity.
l Full details - Adds additional information to any trace messages.
l Polling (Get) - Display a trace message for each device poll. (SNMP Get message)
l Polling (Ping/ICMP) - Display a trace message for each ICMP poll.
l Writing (Set) - Display a trace message for each write message. (SNMP Set message)
l OIDs browsing (GetBulk) - Display a trace message when browsing OIDs. (SNMP GetBulk message)
l EngineID discovery - Display a trace message when discovering the EngineID of the SNMP agent.
l Trap / Inform - Display a trace message each time a Trap / Inform message is received. In particular
can be used in conjunction with Full details to discover the OIDs associated with Trap#6.
l Save - Saves the trace configuration so that the same configuration will be used even after C-CURE
Building Management System has been restarted.
l OK - Starts the trace and closes the dialog. The trace configuration is temporary and is not
remembered when C-CURE Building Management System is restarted.

- 697 -
Mapping SNMP items to the Variables Tree

- 698 -
The SNMP Mapping Dialog
The SNMP Mapping dialog is opened from the Application Explorer by using the Mapping task whenever an
SNMP Network or Device is selected. It contains four display panes plus a status line. Show picture

[A] Device Tree


See the topic Understanding the SNMP device tree.

[B] Variable mapping


The Variable Mapping pane displays the OID's belonging to the selected branch of the Device Tree. Right
clicking in the pane displays a context menu with the following commands.

l Variable selector - Opens the Variable Selector from where you can map an existing variable to the
selected OID.
l Create variable - Creates a new variable and maps it to the selected OID. See the topic Mapping an
OID, Trap or PING.
l Unmap item - Removes the variable mapping from the select OID.
l View variable - Open the properties dialog for the variable mapped to the selected OID.
l Select columns - Select the columns displayed in the Variable Mapping pane from the following.
l Name - The symbolic name of the OID (or numeric identifier if the symbolic name is not avail-
able). This column is mandatory.
l Mapped variable - The name of the variable that is mapped to the OID.
l Native type - The SNMP native data type.
l Access - Access type.
l Read only - for read-only OIDs.
l Read-write - for read-write OIDs.
l Accessible-for-notify - For OIDs that cannot be read but can be sent in a trap
l Full numeric OID.
l Snapshot value - The value of the OID when it came on-line.

[C] Enumerated variable mapping


List of the mapped variables for the selected enumerated OID. Empty if the selected OID is not enumerated.
See the topic Mapping an enumerated OID.

[D] OID information


Detailed OID information from the MIB file including the description, range, access and data type.

[E] Status bar


Displays the branch that is currently selected in the Device Tree and allows you to change the browsing
method from Offline to Online (and vice versa).

- 699 -
Understanding the SNMP Device Tree
The Device Tree displays the configured devices and the known OID's. All SNMP devices follow a similar tree
structure. Show picture

l iso.org.dod.internet - All OID's, standard and manufacturer specific, are located here. Only the fol-
lowing are likely to be of interest to C-CURE Building Management System.
l mgmt - Standard OID's as approved by the IAB. The configuration of the standard OIDs is
defined by the standard MIB files installed with C-CURE Building Management System.
l private - Manufacturer specific OID's. The configuration of the manufacturer specific OIDs is
defined by MIB files supplied by the manufacturer and which have been copied to the project.
See the topic Managing MIB files.
l Trap/inform - Trap notifications.
l Unmanaged - Data resulting from a Ping command. This is the only data available from an unmanaged
device.

Selecting offline or online modes


You can toggle the Device Tree between offline and online modes by clicking in the status bar. The mode is
remembered even when the Application Explorer has been closed, but it is reset to the default (offline) if C-
CURE Building Management System is shut down. Show picture

When changing between modes, the device tree is only refreshed when expanding the iso.or-
g.dod.internet node. If the node is already expanded, it must be collapsed and expanded again.

Using the Device Tree in offline mode


In offline mode all OIDs, both standard and those from any manufacturer's MIBs that the project has loaded,
are available to all devices. It is up to the developer to know which are relevant and which are not. In the fol-
lowing screen shot, you can see both Wago and Moxa specific OIDs appear under the Moxa node. Show pic-
ture

- 700 -
Using the Device Tree in online mode
You can only use online mode for a particular device if its status is Connected. For a device to have
the Connected status, it must be online and have at least one variable mapped to it.
In online mode, C-CURE Building Management System discovers the OID's for each device by issuing a
GetBulk request. The GetBulk request is only available for devices that support SNMP V2 or V3.
The request is made the first time that you expand the iso.org.dod.internet node of a device. The dis-
covered OIDs are remembered until C-CURE Building Management System is shut down even if you return
to offline mode. The request can take between a few seconds and several minutes during which time
the cursor will show a busy icon.
The discovery process returns the numeric OIDs. In online mode, only those symbolic OIDs for which a cor-
responding numeric OID has been found, are displayed. Discovered OID nodes are displayed in green. Show
picture

- 701 -
Mapping a Variable to SNMP Using the Mapping Dialog
Using the following procedure, you can generate a variable and map it to an OID, Trap or PING (unmanaged
device) in one operation.

1. Open the Application Explorer and expand the configuration tree to select either an SNMP network or
device. Using the task bar, open the Mapping dialog.
2. Expand the Device Tree until the OID, Trap name, or PING is visible in the top right pane. Show pic-
ture

3. In the top right pane, right click on the row containing the OID name, and select Create Variable. The
Create Variable dialog opens. Show picture

4. Select the Polling Group using the drop down list box. This property is not required for a Trap.
5. The variable name is generated automatically.
6. Click OK to close the dialog and confirm the mapping.

The variable type that is generated will depend on the data type. See the topic SNMP variable data types.

How the variable name is generated if Use full hierarchical name as variable name is selected

l For scalar variables - The variable name = Network Alias + Device Alias + Symbolic OID
l For tabular variables - The variable name = Network Alias + Device Alias + Numerical OID

Because of the structure used by OID names it is possible that the calculated variable name will
exceed either the number of characters (255) or branches (12) allowed by C-CURE Building Man-
agement System naming convention.

l If the number of branches is exceeded C-CURE Building Management System automatically


merges the rightmost branches by replacing the separators (full stop) with underscores.
l In the number of characters is exceeded you must select Customize the variable name and
manually edit the variable name.

How the OID property in the variable configuration is generated

- 702 -
l If the property Use numerical OID in the SNMP Settings dialog is set, then the OID will be in the
numeric format. Show picture

l If the property Use numerical OID in the SNMP Settings dialog is not set, then the OID will be in the
symbolic format. Show picture

In either case:

l For a scalar variable, the OID is appended with a 0 (instance zero).


l For a tabular variable, the OID is appended with the instance number.

Other variable properties that are generated

l The Min and Max of a register variable will be taken from the OID supplementary information if avail-
able.
l The Command property will be set if the OID is read/write.
l The Maximum size (maximum number of characters) of a text variable will be taken from the OID sup-
plementary information if available.

How does the polling option Trap only and ad-hoc synchronization affect the polling
In addition to any Polling Groups you have configured the Polling Group list box also contains an entry called
Trap only and ad-hoc synchronization. If you choose this then the variable will only be updated when C-
CURE Building Management System receives a trap from the device, or on ad-hoc synchronization (project
start-up or communication recovery).

Limitations of mapping if the device is offline


If the device is offline, you cannot map tabular variables using the mapping dialog. This is because the MIB
file does not contain information about the available instances.

- 703 -
Mapping to an SNMP trap

- 704 -
SNMP Trap Variable Behavior
SNMP trap messages behave differently to the normal master slave communication messages that C-CURE
Building Management System deals with.

l They are unsolicited. That is they can occur at any time triggered by an event in the device. They do
not occur as a result of a request from C-CURE Building Management System.
l They do not supply a state or value that can be usefully translated into a variable value. For example,
Trap#0 occurs at a cold start up. Receiving a Trap#0 just means that the device has made a cold start
but there is no particular variable or value involved. Because of this, the mapped variable behaves in
a special way and may require particular configuration.

There are seven traps in total denoted trap#0 to trap#6.


Trap#0, #1 , #4, #5 and #6 are treated as bits. See the topic Mapping traps #0, #1, #4, #5 and #6.
Trap#2 and #3 are combined and mapped to a single bit. See the topic Mapping traps #2 and #3.
Trap#6, known as the enterprise trap, can be customized by the device manufacturer and the message it
generates is accompanied by one or more supplementary OIDs. See the topic Mapping the Enterprise Trap
supplementary OIDs.

- 705 -
Mapping Traps #0, #1, #4, #5 and #6
Trap messages #0, #1, #4, #5 & #6 can each be mapped to one bit variables. C-CURE Building Man-
agement System generates the value of the bit itself using the following mechanism.

l Under quiescent conditions, the bit value is set to 0.


l When a trap is received, the mapped variable value is immediately set to 1.
l 1 millisecond later, variable value is reset to 0, ready for the next trap.

As the bit is only set to 1 for a very brief period, it is not suitable for animating a mimic other than it could
be logged and displayed in a Log Viewer. The solution is to configure the bit as an alarm and set the Latch
Behavior (until acknowledged) property. Show picture

That way any of the Alarm animations (Color on alarm, symbol on alarm etc.) can be used to animate a
mimic.

- 706 -
Mapping Traps #2 and #3
Instead of dealing with the LinkUp(#3) and LinkDown(#2) traps separately, both traps are merged into one
logical item called Trap#2#3. When a bit variable is linked to a link status trap, its behavior is as follows.
At start-up, or on device synchronization, C-CURE Building Management System reads the port status and ini-
tializes the bit linked to Trap#2#3 accordingly.

l 1 - A connection is active on the port


l 0 - No connection is active on the port.

After the initialization sequence, the bit status is updated by trap and set to 1 when a LinkUp(#3) is received
and 0 when a LinkDown(#2) is received.

- 707 -
Mapping The Enterprise Trap Supplementary OIDs
Trap#6 is the enterprise specific trap. The conditions under which it is generated are customized by the man-
ufacturer and will be specific to a particular device type. Typically, a Trap#6 will be generated under a num-
ber of different conditions. To differentiate between them, when a Trap#6 message is sent it includes one or
more supplementary OIDs providing more information about the condition.

Finding the supplementary OID's sent with Trap#6 using the Event Viewer
If you are able to reproduce the condition(s) under which Trap#6 is generated you can use the Event
Viewer, to discover the supplementary OIDs that have been sent with the trap, using the following pro-
cedure. The following example is from a Moxa Industrial Ethernet Switch.

1. In the Device dialog Trace tab enable Trace 5: Full details and Trace 11: Trap/Inform.
2. Reproduce the conditions that are known to generate the trap.
3. Examine the trace in the Event Viewer. In it, you will see something similar to the following.

a. The up-time of the device (SysUpTime).


b. A generic OID that specifies the identity of the trap.
c. The specific trap OID.
d. The supplementary OIDs, their data types and values. Only one in this example.

How to map the supplementary OIDs so they can be logged


The following method allows the values supplied by the supplementary OID's to be logged, which is the most
common requirement when receiving a trap. Once the data is logged, it can be played back through the Log
Viewer in the normal manner.

1. Map the specific trap OID to a bit variable, for example MOXA.TRAP.POWER1. Set the Updated By prop-
erty to Trap and ad-hoc synchronization. The Log property should be selected if it is to be logged.
2. Map the supplementary OID to a register variable. For example MOXA.TRAP.POWER1_VAL1. Set the
Updated By property to Trap and ad-hoc synchronization.
3. Enter the name of the register variable in one of the extended text attributes (say TATT#3) of the bit
variable.
4. Configure the Log List through which the bit variable is to be logged so that it records the deferred
extended attribute TATT#3. Recording the deferred extended attribute means that the value of the
variable named in the text attribute is recorded.

It is not essential to know the complete OID configuration for a device if you use this method. However if
you open the OID Selector, from the Source tab of the Variable Configuration dialog, after the configuration

- 708 -
is complete it will automatically navigate to the location of the OID. Show picture

- 709 -
Mapping an Enumerated SNMP OID
An enumerated OID can be mapped to several bit variables, one for each of its enumerations. Each bit vari-
able is set to 1 when its configured enumerated value is present in the OID (else it is 0). In the Mapping dia-
log, an enumerated IOD is indicated by a special icon. The first mapped variable is displayed normally in the
upper right pane. Further variables are displayed in the central pane. Show picture

Generating and mapping a variable to an Enumerated OID in one operation

1. Open the Application Explorer and expand the configuration tree to select either an SNMP network or
device. Using the task bar, open the Mapping dialog.
2. Expand the Device Tree until the enumerated OID name is visible in the top right pane. Select the OID
by left clicking on it.
3. In the center right pane, click the Enumeration tool in the tool bar and select which of the enu-
merations is to be represented by the mapping. Show picture

4. The Create Variable dialog opens. Complete the process as explained in the topic Mapping an OID.

What is different about the configuration of the mapped variable?

- 710 -
A variable mapped to an Enumerated OID has the SNMP Extraction field property configured to specify the
appropriate enumerated value. Show picture

- 711 -
SNMP Redundancy Management
Redundancy is managed at the Network level with the Network configuration including the option of a Server
List. Show picture.

All the devices configured under a given network effectively inherit the server list defined for the network.
This allows for all redundancy architecture (both single active server and multi active servers).

The same device cannot be configured on more than one network.

Polled data
The variables belonging to a given device are only produced on the server listed in the Server List selected
in the Network's advanced properties.

l Single active server association - The variables for a given device are polled only by the active server
of the association. Passive servers and clients are updated in the normal manner.
l Multiple active server association - The variables for a given device are polled by all servers belonging
to the association. Clients are updated in the normal manner by the LAN manager.

Trap data
Variables mapped to traps or OIDs refreshed by Trap only and ad-hoc synchronization are updated when the
active server(s) receive a trap message. However, traps are not broadcast by the agent across the entire
network, they are sent to a specific machine or machines. Therefore, it is up to the agent's capability if it
can send a trap to more than one machine.
If an agent can only send to one machine that means that in a redundant architecture only one of the redund-
ant machines will be able to receive traps. Therefore, redundancy cannot be managed correctly by C-CURE
Building Management System.
If an agent can send a trap to more than one machine there are two possibilities.

l Single active server association - The trap is received on both servers and only the active one pro-
duces its value. There is a theoretical possibility of losing an event if a trap occurs when a server
switches from passive to active.
l Multiple active server association - The trap is received by all servers. Clients are updated in the nor-
mal manner. In the event of a server failure, there is a theoretical possibility of losing an event on a
client that was still subscribed to that server.

To prevent event loss the SNMP driver uses a list mechanism.

- 712 -
l Each trap has a unique time identifier. Both machines receive the trap and acknowledge reception to
the agent.
l For each trap it receives, the active server sends a trap notification to the passive server and the pass-
ive server removes the relevant trap from its list.
l When the passive server switches to active, it empties its list processing the traps that have not been
already processed by the active server. In a controlled changeover, the passive server list should be
empty but in case of a failure, the mechanism minimizes the chance of losing trap information.

- 713 -
SNMP Driver Further Information
The following information is not essential to use C-CURE Building Management System SNMP driver but is
provided for those users that want to know a little more and as an aid to diagnosing any problems you may
encounter.

Polling mechanism
The polling mechanism used by the driver uses separate processes to send and receive a message. This
allows the driver to make multiple concurrent requests. The limitation is set by the property Maximum num-
ber of concurrent requests in the SNMP General Settings (default 150, maximum 500), and also that only
one request can be sent to one device at a given time. The polling mechanism can be thought of as parallel
across all devices but serial within one.
Polling is supported for managed (SNMP) and unmanaged (PING) devices.

About the SNMP protocol


SNMP uses the UDP protocol. Port 161 is used by the SNMP agent to receive the request sent by the Network
Management Station (SNMP manager). Port 162 is reserved for the manager to receive traps. The following
messages are used by the driver:

l GET - to obtain information from the agent about an attribute of a managed object.
l GETBULK - to obtain information about a group of data from the agent. SNMP V1 does not support
GETBULK.
l SET - to set the value of an attribute of a managed object.
l TRAP - An unsolicited message from the agent to C-CURE Building Management System telling it about
some event on the managed device.

About the PING (ICMP) protocol


The ICMP (Internet Control Message Protocol), more commonly known as PING, is used by network devices
to send error messages. For example, that a host or router could not be reached. ICMP differs from pro-
tocols such as TCP and UDP in that it is not typically used to exchange data between systems. The PING func-
tion, within the SNMP driver, is implemented using the ICMP "Echo request" and "Echo reply" messages.

SNMP driver licensing


The SNMP driver is a chargeable option and its use is protected by the license. The number of running
devices is limited to 1000.
As for any driver, the user can test the SNMP Manager in demo mode (without any license) with a time lim-
itation fixed to one hour and a number of communication variables limited to 25.

- 714 -
Networked applications

- 715 -
Overview of Networked Applications
C-CURE Building Management System's network capability allows two or more stations to be connected
together using a network supporting either TCP/IP or NetBios. When stations are connected in this way, the
real time properties (value, status etc.) of identically named variables in the stations can be shared.
The most usual reasons for using networked configurations are:

l Operation. An installation requires several operating stations.


l Application size. The application is simply too large or requires too much processing power to be
accommodated on one PC.
l Redundancy. C-CURE Building Management System supports types of multi-station configurations
(known as associations) to provide redundancy, that may be used in situations where high availability
is essential for ensuring continuous operation.

Stations exchange information by maintaining connections over the network. The station that initiates the
connection is known as the client. The station that responds is known as the server. In practice, it is possible
for a station to be both client and server, communicating with one or more other stations.
The flow of data between client and server stations is bidirectional. That is to say, a change in the value of a
variable in one station will always be reflected by its equivalent variables in all other stations. For example,
the server may have a variable with Equipment source linked to a process controller. The variable has been
given control attributes, so that a User may change its value and send it to the process controller. The equi-
valent variable in the client also has the control attribute set. When a User changes the value at the client,
the change will be reflected at the server and the value sent to the process controller.
TCP/IP is the recommended connection method. NetBios is now only supported for compatibility with
projects created with older versions of C-CURE Building Management System.
The network architecture is configured from the Networking folder of the Application Explorer. Using the
Application Explorer you:

l Define the stations of which the project comprises.


l Define the network connection (known as nodes) for each station.
l Define server associations for redundant application.
l Create the client and server lists used to control the behavior of a number of aspects of C-CURE Build-
ing Management System's so that the same project can be used on all stations in a multi-station applic-
ation.

The maximum number of stations in a single networked application is 254.

More information about deployment on a Remote Desktop Session Host (RDS) can be found in the top-level
book Deployment.

- 716 -
Client-Server Terminology
The terms Client and Server can have several different meanings depending on the context. Before con-
figuring any aspect of C-CURE Building Management System's networking, it is essential to understand each
meaning and the aspect of configuration to which it applies.

Client and server licenses


C-CURE Building Management System's license is determined by the software protection key (dongle) that is
in use on a given station.

l A client license implies that the software has no communication capability with field controllers (data
acquisition), but is designed to communicate with other C-CURE Building Management System stations
having the role of data acquisition server. Data acquisition (native communication, OPC client, DDE,
BACnet, IEC 60870-5...) is disabled.
l A server license implies that the software does not have any mimic display capabilities. It is designed
for data acquisition or archive servers for example.

A station with a SCADA license is able to communicate with other C-CURE Building Management Sys-
tem stations and has none of the above functional limitations (unless otherwise stated). You could
consider it a combined client and server license.

Client and server stations


A station's client and server capability is determined by the project's configuration.

l A station of C-CURE Building Management System configured as a server can send changes in value of
one or more of its variables to other (client) stations. A server station is said to produce the value of
variables. In general, the value of a particular variable is produced on one server station at any one
time.
l A station of C-CURE Building Management System configured as a client can obtain the value of one or
more of its variables from another (server) station. A client station is said to consume the value of
variables. The value of the same variable can be consumed on many client stations.

By default, a station is configured as both a client and a server station. It is normal to leave it configured in
this way although it might only be required to produce the value of variables OR consume the value of vari-
ables (depending on the configuration and use of the client and server lists). Application designer can tune
such configuration to minimize network exposure.

Client and server lists


Client and server lists are created as part of the project configuration and are used to control the behavior of
certain aspects of C-CURE Building Management System's project according to the station on which it is
loaded.

l A server list contains the name of one or more server stations or associations.
l A client list contains the name of one or more client stations.

The most frequent use of the client and server lists is to control on which station the real-time value of a
variable is produced and on which station(s) it is consumed. They can also be used to control on which sta-
tion an archive unit is an archive server (recording real-time data and producing historical data) and on
which station it is an archive client (consuming historical data).

- 717 -
Networked Applications - Frequently Asked Questions
What is a station?
A station is an instance of the C-CURE Building Management System software main process running on a
given computer.

What is a node?
A node defines the network access of a station. The node defines the connection type (TCP/IP or NetBios),
the connection properties and if the station is to behave as a client or server or both.

Can I configure more than one node per station?


It is possible to configure up to four nodes for each station. Additional nodes can be used for network redund-
ancy or if a station requires access various sub-networks.

What protocol can I use?


C-CURE Building Management System's networking can use either NetBios or TCP/IP (recommended).

Can I mix NetBios and TCP/IP nodes on the same station?


Yes, it is possible to mix NetBios and TCP/IP nodes on the same station.

How is a station identified?


Each station is identified by a unique station name and number.
If you are using TCP/IP a station's name and number is linked to its TCP/IP address or Computer Name.
If you are using NetBios a station’s name and number is linked to a LANA number.

What is a server station?


A server station is a station that sends changes in value of one or more of its variables to other (client) sta-
tions. The origin of the value could be one of C-CURE Building Management System's Data Acquisition
sources or internally generated (Expression, SCADA Basic etc.)
The mechanism of sending changes in value is known as producing. In general, the value of a variable can
only be produced on one station at any one time.

What is a client station?


A client station is a station where the value of one or more of its variables is obtained from another (server)
station. The mechanism of obtaining values in this way is known as consuming. The value of a variable can
be consumed on many stations.

Can a station be both client and server?


A station can be both client and server producing some variable values and consuming others.

Can the value of a variable be changed on a client station?


The value of a variable can be changed on a client station if the variable's control attribute is enabled. The
value can be changed by either a send type animation or a program. The client station sends the server sta-
tion a request to change the value. The server station changes the value in its variables tree and then dis-
tributes it as it would any other value change. The client station does not change the value directly.

How is a link between a server station and a client station established?


The client is responsible for establishing the link to the server. The server has no knowledge of the client
until it makes a request for connection.

How does a station know that it is to produce or consume the value of a particular variable?
When a variable is created, it is allocated to a client list and a server list.

l If the name of the local station appears in a variable's server list, the variable's value is to be pro-
duced on that station.

- 718 -
l If the name of the local station appears in a variable's client list, the variable's value is to be con-
sumed on that station.
l If the name of the local station does not appear in either the variable's client or server list, the vari-
able is not loaded and is not available on that station.
l If the server list and the client list of a variable are not empty (not defined), this variable will pro-
duced and consumed locally on every station. Its value will not be shared among stations.

What is an Association?
An Association is a group of two or more servers operating together to provide redundant operation. As far
as the client is concerned, an Association is treated in the same way as if it were just a single server station.

What are the station lists?


A station list contains the name of one or more stations. Station lists may contain the names of only server
stations, only client stations or both.
It is essential to understand the use of the station lists as they are used to control the behavior of a
number of aspects of C-CURE Building Management System's so that the same project can be used
on all stations in a multi-station application.

How do I develop the projects for each station?


Projects are developed in the normal way. Careful use of the client and server station lists will allow an
identical project to be used for all stations in the majority of cases.

Does the network configuration have to be the same on all stations in the network?
Yes, the network configuration should be the same on each station, except in some very specific cases.

- 719 -
Understanding IP Addressing
This topic provides useful background information for someone intending to configure a networked applic-
ation using TCP/IP.
Each connection point (node) on an IP network has a unique IP address. For example, a PC with two network
cards would have two connection points and hence two IP addresses.
IP addresses can either be static, allocated by a configuration tool on the equipment in which the node
resides, or dynamic and allocated by a network administration tool each time the node connects to the net-
work. For a PC running Microsoft Windows, static addresses are entered as part of Windows network con-
figuration. If you are using a dynamic address then it is allocated by a device on the network known as
DHCP (Dynamic Host Configuration Protocol) server. For use with C-CURE Building Management System’s
networking, it is recommended that you use static addressing.

The IP address structure


32
IP currently uses a 32 bit address allowing for a theoretical maximum of 2 addresses (approximately 4.3
billion). The address is represented as four bytes written as four decimal values separated by full stops, for
example 192.168.2.2. The address is divided into two parts, the network number (often known as the sub-
net) and the host (or machine) number. All hosts on the same IP network must share the same network num-
ber but have a unique host number. The address split can be done in one of three ways resulting in what is
known as the A, B and C address classes.
st nd rd th
Class Mask 1 byte 2 byte 3 byte 4 byte
A 255.0.0.0 Subnet number Host number Host number Host number
1 to 127 0 to 255 0 to 255 0 to 255
B 255.255.0.0 Subnet number Subnet number Host number Host number
128 to 191 0 to 255 0 to 255 0 to 255
C 255.255.255.0 Subnet number Subnet number Subnet number Host number
192 to 223 0 to 255 0 to 255 0 to 255

Allocating IP addresses
Blocks of IP addresses are allocated by an international organization known as the NIC. This ensures that
each node has a unique address worldwide thereby eliminating problems that would occur with two identical
addresses on the same network. All class A addresses and most class B addresses are already allocated.
The exception to this is a range of IP addresses known as Private Addresses. These can be used for any
nodes that are NOT exposed to the outside world, for example the Local Area Network (LAN) in a factory.
There are three private address ranges, one in each of the address classes. For small LANs of under 255
machines the Class C range is generally used. The table below illustrates the three private address ranges.
Class Start of range End of range Mask
A 10.0.0.0 10.255.255.255 255.0.0.0
B 172.16.0.0 171.31.255.255 255.255.0.0
C 192.168.0.0 192.168.255.255 255.355.255.0

.0 and .255 host addresses have special use and are not used by normal nodes hence the practical
limit to the number of addresses is 254.

Examples of class C IP addressing


Computer IP address Subnet mask Network num- Machine num-
ber ber
Pippin 192.168.2.3 255.255.255.0 192.168.2 3
Frodo 192.168.2.4 255.255.255.0 192.168.2 4
Gandalf 192.168.22.3 255.255.255.0 192.168.22 3
Aragorn 192.168.22.4 255.255.255.0 192.168.22 4

- 720 -
In the above example, Pippin and Frodo are on one subnet whilst Gandalf and Aragorn are on another. There-
fore, Pippin and Frodo will be able to exchange information with one another but not with Gandalf and
Aragorn.

Important note about using more than one node on a computer running Windows
If you use more than one node on a computer running Windows, for example to make use of C-CURE Build-
ing Management System’s dual network capability, then each node must match a different subnet.

- 721 -
Checking the Network Setup when Using TCP/IP
If using NetBios see the topic Checking the network setup when using NetBios.

Windows 7

1. Using the Start menu open the Control Panel and select View network status and tasks. The Network
and Sharing Centre dialog opens.
2. From the task list in the left pane select Change adapter settings. The Network Connections dialog
opens displaying the connections available on your PC. Show picture

3. Right click the icon representing the network connection that you will be using and, from the pop-up
menu, select the Properties command. The Network Properties dialog is displayed. Show picture

4. Select the Internet Protocol (TCP/IP) from the item list and click the Properties button.
5. Make a note of the TCP/IP address for use in C-CURE Building Management System's configuration.

What if the IP address grayed out?


If the option Obtain IP address automatically is selected then the network card is configured to obtain its IP
address dynamically from a DHCP server and the IP address field will be grayed out. If this is the case,
there are two options if you want to use the TCP/IP protocol.

l Change the configuration so that the TCP/IP address is not obtained automatically, that is it is con-
figured in the Internet Protocol Properties dialog.
l Use the host name instead of the TCP/IP address in C-CURE Building Management System's network
configuration. If you use the host name, you are limited to one node per station.

Checking the host name

1. Right click on the My Computer icon on the desktop and, from the displayed pop-up menu, select Prop-
erties. The System Properties dialog is displayed.
2. The host name is displayed in the Full computer name field.

- 722 -
Checking the Network Setup When Using NetBios

This section explains how to check the network set-up on your PC. If you need to add or change set-
tings, you should refer to the Windows on-line help.

Using TCP/IP is recommended instead of NetBios. Support for NetBios is provided only for com-
patibility.
When using NetBios, C-CURE Building Management System sends and receives information on the LAN using
the NetBIOS interface. NetBIOS communicates on the network using the NetBEUI, TCP/IP or SPX/IPX trans-
port protocols. You must have at least one of these protocols installed and the same protocol must be selec-
ted on all stations in the network.
A PC may have more than one network interface card (NIC) and protocol installed. C-CURE Building Man-
agement System uses the NetBios LANA number to identify the combination of the protocol and network
interface card that will be used to send and receive NetBios messages. The LANA number is entered in the
Network Stations configuration.
When using NetBios you must use the AiLANA tool provided via the technical resources web site to display
and change LANA numbers.

How to install the AiLANA tool

1. Download the AiLANA zip file from the technical resources web site.
2. Extract the files from the zip into a temporary location using an unzip program such as PKZIP25 sup-
plied with C-CURE Building Management System. The following files will be produced.
AiLana.cab
Setup.exe
Setup.lst
3. Install the software by running Setup.exe and following the installation wizard.

Using the AiLANA Tool


The AiLANA tool can be started from the shortcut placed on the Start menu during installation. Click the Read
command on the menu to display a list showing the available LANA numbers. Show picture

Menu and Command options

1. Read - Read the LANA number information from the Operating System and display them on the list.
2. Write - Write the LANA number information on the list to the Operating System.
3. Backup - Save a copy of the LANA number information on the list.
4. Restore - Restore a copy of the LANA information previously made using the Backup command.
5. Language - Select the display language for the AiLANA tool.

Explanation of the fields in the display list

l #Lana - The LANA number referencing the combination of a protocol and network card.
l Export - The type of network. 1 indicates a local area network connection. 0 indicates a network con-
nection using RAS (Remote Access Services).
l Path - The protocol in use.
\Device\Nbf = NetBEUI
\Device\NetBT = TCP/IP

- 723 -
l Device - The name of the network card if available. Sometimes this information is not available and
the field is left blank.

Changing a LANA number

1. Take a copy of the current configuration using the Backup command. The current configuration may
then be restored using the Restore command in the event of erroneous operation.
2. Select the line containing the LANA number to be changed.
3. Click the LANA number field and enter the new number. Note that LANA numbers must be unique.
4. Click the Write command to write the new LANA number to the Operating System.
5. Click the read command to refresh the list and check that the write was successful.

- 724 -
Using the Application Explorer to configure the network architecture

- 725 -
Managing Networking in the Application Explorer

A project's networking configuration is displayed under the Communication.Networking node. It includes Sta-
tions, Nodes, Lists and Associations. The Application Explorer is used for network configuration and dia-
gnostics. It displays run-time status information and offers commands for the configured network items
which can be useful for troubleshooting.
State information is "as-seen" by the local station, that is the one on which the Application explorer
is running:

l All information about the local station are retrieved locally, independently of any connection to
other stations.
l All information about remote stations are retrieved through the Networking exchanges, and
may or may not be available depending on the connection state with the selected remote sta-
tion.

In particular, state information is for the connection between the local station, that is the one on
which the Application explorer is running, and the selected station or node.

The maximum number of stations in a single networked application is 254.

Configuration tasks when the Networking folder is selected


Icon Task Description
Settings Display the general Network Settings dialog.
Remove all configuration Remove all network configuration.
Networking wizard Run the networking wizard.

Configuration tasks and run-time status information when the Stations folder is selected
Icon Task Description
Add a station Add a network station and the first connection node.
Paste Paste a station. Only available after a cut or copy.
For each configured station, the following run-time information is displayed:

l State - The state of the connection between the selected station and the local station. See the table
below for more information.
l License number - The Id of the license used on the selected station, or 'Trial' if the station is running in
trial mode.

- 726 -
l License role - The role of the station with regards to licensing. For example, the station can have the
role of handling a local license, be a license owner, a license renter...
l Project version - When using Central Project Management, the version of the project.
l Library version - When using Central Project Management, the version of the library.
l Product version - The product software version.

Icon State
Connected or
Local station
Disconnected
Disabled or
No connection due to license
Not linked

Configuration and run-time tasks, and run-time status information when a station is selected
Icon Task Description
Add a node Add a connection node to a station.
If the local station has a link configured with a node of the selected station, it
Open and enable con-
connects to that station. Equivalent to the SCADA Basic instruction LAN mode
nections
START_CONNECTIONS.
If the local station has a link configured with a node of the selected station, it
Close and disable con-
disconnects from that station. Equivalent to the SCADA Basic instruction LAN
nections
mode STOP_CONNECTIONS.
Opens a test dialog from where the path to the station can be checked using
Ping
ping. Only available if the selected station has a single node configured.
Remove Remove the selected station.
Properties Display the Station Properties dialog.
Copy Copy the selected station.
Cut Cut the selected station.
Paste Paste a node. Only available after a cut or copy.
When a station is selected, the following run-time information is displayed about its configured nodes:

l Client connection state - The state of the client connection (if any). See the table below for more
information.
l Server connection state - The state of the server connection (if any). See the table below for more
information.

Server con-
nection
state
C- N-
li- o
e- c-
L-o-
n-
C-Di- N- o-
t D- n-
o-sc- o-c-n-
c- i-
n-o- t a-e-
o- s-
n-n- l-l c-
n- a-
e-n- i-s-ti-
n- b-
c-e- n-t-o-
e- l-
t- ct- k-a-n
c- e-
e-e- e-t-d-
ti- d
d d di-u-
o-
o-e
n
nt-
s-
t- o

- 727 -
li-
c-
e-
n-
s-
e
C-
o-
n-
n- N-N-
e- AA
ct-
e-
d
D-
is-
c-
o-
n- N-N-
n- AA
e-
ct-
e-
d
D-
is-
a-a- N-N-
t- bl- AA
e e-
d
N-
ot
li-
N-N-
n-
AA
k-
e-
d
L-
o-
c-
al N-N-N-
N- N-
st-A A AA A
at-
io-
n
N-
o
c-
o-
n- N-N-N-
N-N-
n- A A AAA
e-
ct-
io-
n

- 728 -
d-
u-
e
to
li-
c-
e-
n-
s-
e

Configuration and run-time tasks when a Node is selected


Icon Task Description
Open client con- Connect the local station to the server connection of the selected node. Equi-
nection valent to the SCADA Basic instruction LAN mode START_CONNECTION.
Close client con- Disconnect the local station from the server connection of the selected node.
nection Equivalent to the SCADA Basic instruction LAN mode STOP_CONNECTION.
Open server con- The local station accepts connection from the selected node. Equivalent to the
nection SCADA Basic instruction LAN mode START_CONNECTION.
Close server con- The local station closes its connection with the selected node. Equivalent to the
nection SCADA Basic instruction LAN mode STOP_CONNECTION.
Ping Opens a test dialog from where the path to the node can be checked using ping.
Remove Remove the selected node.
Properties Display the Node Properties dialog.
Copy Copy the selected node.
Cut Cut the selected node.

Configuration tasks when the Lists folder is selected


Icon Task Description
Add a client list Add a list of client stations (data consumers).
Add a server list Add a list of server stations (data producers).
Add a modification
Add a list of client stations that will be used to propagate modifications.
client list
Paste Paste a list. Only available after a cut or copy.

Configuration tasks when a List is selected


Icon Task Description
Add a station Add a station to the selected list.
Add an association For server and client lists only, add an association to the selected list.
Remove Remove the selected list.
Properties Display the List Properties dialog.
Copy Copy the selected list.
Cut Cut the selected list.

Configuration tasks when a station of a List is selected


Icon Task Description
Remove Remove the selected station from the list.
Properties Display the Station Properties dialog for the selected station.

Configuration tasks and run-time status information when the Associations folder is selected
Icon Task Description
Add an association. Associations are used for high availability architectures
Add an association
(clusters).
For each configured association, the following run-time status information is displayed:

- 729 -
l State - The state of the connection between the association and the local station. See the table below
for more information.

Real-time Historic State


Connected. At least one sever of the association is connected
Disconnected. No server of the association is connected
Disabled
Not linked
Local station
No connection due to license

Configuration tasks and run-time status information when an Association is selected


Icon Task Description
Remove Remove the selected association.
Properties Display the Association Properties dialog.
Copy Copy the selected association.
Cut Cut the selected association.
When an association is selected, an additional pane is displayed with configuration tasks and run-time status
information about the stations that make up the association. The following tasks and run-time status inform-
ation is available when one of the stations, in the association, is selected.
Icon Task Description
Force passive Force the selected station to passive for the given association.
Force active Force the selected station to active for the given association.
Availability rate Change the selected station's Availability Rate.
For each configured station, the following run-time status information is displayed:

l State - The state of the station within the association as seen from the local station (where the Applic-
ation Explorer is running). See the table below for more information.
l Subscription mode - The subscription mode with each of the stations within the association with
respect to the local station.
l Main
l Standby active - See explanation below
l Standby passive - See explanation below
l Local station
l Disconnected
l Disabled
l No connection due to license

Icon State
Passive
Active
Disconnected

About the Standby Active and Standby Passive subscription modes


Consider the following architecture:

l DAS01, DAS02 and DAS03 are Data Acquisition Servers,


l DAS_ASSOC01 is a single active Data Acquisition Association including DAS01, DAS02 and DAS03,
l Client01 is a client of the association.

If DAS01, DAS02, DAS03 are running, and the Availability Rates within the association DAS_ASSOC01 are
DAS01 = 100, DAS02 = 80, DAS03 = 60, then, in the Application Explorer running on the client station the
following subscription modes are seen.

l The subscription mode with the station DAS01 = Main


l The subscription mode with the station DAS02 = Standby active
l The subscription mode with the station DAS02 = Standby passive

- 730 -
If DAS01, DAS02, DAS03 are running, and the Availability Rates within the association DAS_ASSOC01 are
DAS01 = 70, DAS02 = 80, DAS03 = 60, then, in the Application Explorer running on the client station the fol-
lowing subscription modes are seen.

l The subscription mode with the station DAS01 = Standby active


l The subscription mode with the station DAS02 = Main
l The subscription mode with the station DAS02 = Standby passive

- 731 -
Networking Settings
The networking settings can be displayed from the Communication folder of the Application Explorer's Main
Settings dialog or by using the Settings task when the Networking folder is selected in the Application
Explorer's configuration tree. Show picture

l Invalidate variables - The time in seconds after failure of communication to another C-CURE Building
Management System station before any associated variables become invalid.
l Never - An infinite time-out, which can be useful for example, when using dial-up networking.
l Immediately - Invalidate variable immediately.
l Delay value - Invalidate variables after the given period.
l Configuration defaults - Defaults used when creating the network configuration either manually or
using the wizard.
l Wizard - Networking wizard configuration defaults.
l First server station number - The first server station number to be used when generating
the network configuration.
l First association number - The first association number to be used when generating the
network configuration.
l First client station number - The first client station number to be used when generating the
network configuration.
l Base IP address - The IP address pre-configured in the Node Configuration dialog. The default is
10.0.0.1.
l Port number - The Port Number pre-configured in the Node Configuration dialog. The default is
1981.
l Create all links - If ticked, automatically create all possible links between clients and servers.
The default is ticked.

- 732 -
Configuring stations

- 733 -
How to Configure a Station
Adding the station definitions, one for each station on the network, is the first stage in network con-
figuration. After you have added a station, the Node dialog is automatically displayed prompting you to con-
figure the connection node.

1. Open the Application Explorer and expand the configuration tree to select the Networking folder.
2. Select the Stations folder and from the task list select Add a station. The Station Configuration dialog
opens. Show picture

3. Configure the station.


a. Enter the Name for the station. This is the name by which it will be known to the project and is
also used in the construct of the name of some of the associated system variables. You can
accept the suggested default or enter one of your own.
b. Enter a Number for the station. This is identity of the station within C-CURE Building Man-
agement System network and is also used in the construct of the name of some of the asso-
ciated system variables. You can accept the suggested default or enter one of your own. The
allowable range of network numbers is 1 to 255.
c. Enter a Description for the station. The description appears in the contents pane of the Applic-
ation Explorer and can be useful to identify the station later. The description is optional.
d. If the station is to behave as a historical server tick the corresponding property. See the book
Using client-server archive units in the main Archives book.
4. Click OK to confirm the configuration and close the Station Configuration dialog. The Node Con-
figuration dialog automatically opens. Configure the connection node. See the topic How to configure a
node.

As the station name is used in the name of some of the network status variables, its length and char-
acters are limited to those of a variable branch.
Once you have created a station you cannot change its name or station number.

The maximum number of stations in a single networked application is 254.

- 734 -
How to Configure a Node
The Node Configuration dialog is opened automatically after you add a station using the Application
Explorer. Alternatively, it can be opened manually by selecting a station that has already been configured
and using the Add a node task.
When creating a node, the Name property is automatically generated. The name can be edited if required,
although it is recommended that the generated name be used as it refers to the station name. Show picture

As the node name is used in the name of some of the network status variables, the permissible char-
acters are limited to those of a variable branch.

How to configure a node for TCP/IP

1. Using the Application Explorer open the Node Configuration dialog. See above.
2. Select the TCP/IP access option button.
3. Select the connection parameters. You can define the connection using either the host name or the
TCP/IP address.
a. If you select By host name, you must enter the name by which the host PC is known on the net-
work. The ellipsis button adjacent to the host name field displays a dialog from where network
computers known by Windows can be browsed and selected. If you use the host name you can
only specify a single connection for a station.
Or
b. If you select By IP address, you must enter the four number IP address of the network card to
be used for the physical connection.
4. Click OK to apply the configuration and close the dialog. All client-server links are automatically gen-
erated.

By default, the TCP/IP port is set to 1981. This can be changed if this port is already used by another
application.

How to configure a node for NetBios


Using TCP/IP is recommended instead of NetBios. Support for NetBios is provided only for com-
patibility.

1. Using the Application Explorer open the Node Configuration dialog. See above.
2. Select the NetBios access option button.
3. The connection parameters Server name and Client name are generated automatically. They can be
edited but it is recommended that generated names be used as they refer to the station name.
4. If you are using a Lana number other than 0, open the Advanced tab from where the Lana number can
be changed.

- 735 -
5. Click OK to apply the configuration and close the dialog. All client-server links are automatically gen-
erated.

- 736 -
The Station Advanced Tab
The Station Advanced tab contains properties that, for most applications, will not need to be changed from
the default. Show picture

l Availability rate - Determines how the server behaves when it is part of a Real-time or Historical Asso-
ciation. For more information, see the book Using client-server archive units.
l Gateway - Must be selected on any station that is both client and server. That is, it can behave as a
gateway. Only required when using three level network architecture.
l Route log- The station routes log and event messages to the client stations. These messages are
needed for the station that records log and event information. Only required when using three
level network architecture.
l Configuration backup files - The number of previous versions of configuration files that are kept for
this station. Previous versions are stored in the project folder CTEMP\BAK.
l Remote Desktop Session Host Server - See the book on Deploying C-CURE Building Management Sys-
tem on a RDS host in the Deployment book for information.
l Run only in a Remote Desktop Session - If ticked then C-CURE Building Management System will
only run this station in a Remote Desktop Session. When starting, if the software detects that it
is not in a Remote Desktop Session and that this option is selected, it will display an error mes-
sage and start-up will abort.
l Workspace behavior
l Use the same working folder for all Remote Desktop Session hosted clients - The
same working (project) folder is used for all Remote Desktop sessions. This is the
same behavior as with versions prior to 10.0 SP1.
l Use a different working folder for each Remote Desktop Session hosted client - The
project folder is duplicated at startup to ensure a different working folder is used for
each Remote Desktop session.
l Network dongle - The configuration required if using a network dongle. A network dongle is one that
has several licenses in the same dongle. Typically used where C-CURE Building Management System
is running on Windows Server using Remote Desktop Services.
l Network dongle role - Tick if the station is to use a network dongle.
l Owner or renter - Selection of the station role as a dongle owner or renter.
l Owner - The station is a network dongle owner. That is the dongle is physically connected
to the host PC running C-CURE Building Management System locally.
l Renter - The station is a network dongle renter. That is C-CURE Building Management Sys-
tem on this station will retrieve its license from another station configured as a dongle
owner.
l Network dongle location - The location of the network dongle license.
l Slot number - The slot number (either 1 or 2).
l Owner's station name or Association name - The name of the station, or asso-
ciation to which the dongle is physically connected. In the case of an asso-
ciation, two dongles are required with the active server having the role of
dongle owner.

- 737 -
The Node Advanced Tab
The Node Advanced tab contains properties that, for most applications, will not need to be changed from the
default. Show picture

l LanA number - The network LanA number. Only required for a NetBios network.
l Enable watchdog - The watchdog period is the interval in seconds at which a 'keep alive' message is
sent from the client to the server. The purpose of this message is to check if the server is still avail-
able on the network (some network drivers do not provide this information directly). If you do not
want to use the watchdog (for example if you are using an RAS network connection) it can be disabled.
l Reconnect period - This is the period at which a client will attempt to re-establish connection with a dis-
connected server. The default value can be reduced where re-establishing a broken connection is a
high priority.
l Send timeout - When a message is sent from one station to another the sending station expects an
acknowledge from the recipient. If acknowledgment is not received within the send timeout period,
the connection is assumed to have failed.
l Connection timeout - On startup the client attempts to connect to its server(s). If there is no reply
after the call timeout period, the connection is assumed to have failed.
l Buffer size and Wait time - A message is sent between stations when either the number of bytes
exceeds the message size, or the message is older than the wait time. The default values are 30 KB
and 100 ms. For example, a single value change generates about 100 bytes of data. If there were only
one value change in a 100 ms period, it would be transmitted at the end of that period. If there were
many value changes in a sub 100 ms period, the data would be sent as soon as the buffer reached 30
KB.

- 738 -
How to Manually Configure Client Server Links
By default, all clients are automatically linked to all servers. If your application requires something different
you must un-tick the Create all links property, in the Networking Settings dialog, before configuring any
nodes and then manually configure the links between the clients and servers.

How to manually configure client server links

1. Open the Application Explorer and expand the configuration tree to select the Networking folder.
2. From the task list, select Settings. The Network Settings dialog opens.
3. Un-tick the Create all links property and close the dialog.
4. Using the configuration tree select a station and then its node.
5. Use the Properties task to open the Node Properties dialog. Select the Links tab.
6. Expand the configuration tree to display the available server nodes.
7. Tick the server node(s) to which the client will be linked. Show picture

8. Click the OK button to confirm the configuration and close the dialog.

- 739 -
How the Station Number and Name is Allocated to a Physical PC
Why is the Station Number and Name important?
The station number (and name) is the identity of the station within a C-CURE Building Management System
network. The station number and name are also used in the construct of the names of the many system vari-
ables that provide status information about the station. For example SYSTEM.<StationName>.OK_NUMBER.
The station number must be in the range 1 to 255.

Allocating the station number and name automatically


If you are using TCP/IP for your inter-station communication, the station number is allocated automatically
by the network configuration. When C-CURE Building Management System starts, it searches the project's
network configuration for either the Name or IP address (depending on which you have used) of the host PC
and allocates the corresponding station number. In the following picture if C-CURE Building Management Sys-
tem finds that the host PC has the IP address 192.168.2.3 the station number is set to 3 and the station
name to STATION3. Show picture

The station number allocated using the IP address takes priority over the default in INI.DAT.

Alternative method 1 - allocating the station number using Using INI.DAT


This method is used if using a NetBios-based connection. The station number is defined by a parameter in
the file INI.DAT that is located in the ETC folder. You can edit this text file with an editor such as Notepad. C-
CURE Building Management System must be shut down before you edit this file.
The parameter that must be changed is the first after the keyword PINI. By default, it is set to 1. In the
extract below, it has been set to 7.
PINI,7,,1,1,256000,1,0,0x0,21,0,0,0
POS,64,80,580,360

Alternative method 2 - allocating the station number using the -station_number command line
argument
The station number can be allocated by editing the command line used to start C-CURE Building Management
System to include the -station_number switch. For example, the following command line would allocate a
station address of 99.
C:\Program Files\SCADA\SV 8.2\bin\sv32.exe -s -station_number 99
The station number allocated using the command line argument takes priority over that allocated
automatically using the host PC's IP address and over the default in INI.DAT.

- 740 -
How to Configure Station Lists
A station list contains the name of one or more stations. There are three main types of station list.

l Client list - Containing the names of one or more stations configured as real-time clients and/or the
names of one or more stations where the archive units are to behave as clients.
l Server list - Which, depending on the option selected can be:
l A real-time server list - Containing the name of one or more real-time servers or real-time asso-
ciations.
Or
l A historical server list - Containing the name of one or more historical servers or historical asso-
ciations.
l Modification list - Containing the name of stations to that are to receive configuration changes

Station lists are used to control the behavior of the following aspects of C-CURE Building Management Sys-
tem configuration so that the same project can be used on all stations in a multi-station application.

l Variables - Controlling on what stations a variable is to be loaded and on what stations its real-time
value is to be produced and consumed. Mandatory.
l Data acquisition - Enabling and disabling data acquisition with built-in drivers such as OPC, IEC 60870-
5, IEC 61850, BACnet... Optional depending on the communication architecture.
l LonWorks - Controlling primary and secondary server stations. Mandatory if you are using LonWorks
communication.
l Actions - Enabling and disabling each cyclic and event action. Optional.
l Alarm synthesis - Enabling and disabling any Alarm Syntheses that have been configured. Optional.
l Client/Server archive units - Controlling if each archive unit is to be a client or server or both. Man-
datory if you are using client/server archiving.
l User accounts - Controlling the availability of each user account on each station. Optional - only neces-
sary if different User accounts are required at each station.
l Configuration - Distribution of variables configuration changes. Optional.

How to configure a client list


A client list can contain the names of one or more stations configured as real-time clients and/or the names
of one or more stations where the archive units are to behave as clients.

1. Open the Application Explorer and expand the configuration tree to select the Networking folder.
2. Select the Lists folder and from the task list select Add clients list. The Client List dialog is displayed.
Show picture

3. Configure the list.


a. Enter the Name for the list. You can accept the suggested default or enter one of your own.
b. Enter a Description for the list. The description appears in the contents pane of the Application
Explorer and can be useful to identify the list later. The description is optional.
c. Click the OK button to confirm the configuration and the close the dialog.
4. Add stations to the list.
a. Select the list you have just created and from the task list select Add a station. A dialog is
opened displaying a list of stations that are configured as clients.
b. Select the client(s) to add. You can select more than one by holding down the Ctrl button while
you click.
5. Click the OK button to confirm the configuration and close the dialog.

How to configure a real-time server list


A real-time server list can contain the name of one or more real-time servers or real-time associations.

- 741 -
1. Open the Application Explorer and expand the configuration tree to select the Networking folder.
2. Select the Lists folder and from the task list select Add servers list. The Servers List dialog is dis-
played.
3. Configure the list.
a. Enter the Name for the list. You can accept the suggested default or enter one of your own.
b. Enter a Description for the list. The description appears in the contents pane of the Application
Explorer and can be useful to identify the list later. The description is optional.
c. Select the Real-time server list option button.
d. Click the OK button to confirm the configuration and the close the dialog.
4. Add stations or an association to the list.
a. Select the list you have just created and from the task list select Add a station or Add an asso-
ciation. A dialog is opened displaying a list of stations or associations.
b. Select the stations or association to add. You can select more than one by holding down the Ctrl
button while you click.
5. Click the OK button to confirm the configuration and close the dialog.

How to configure a historical server list


A historical server list can contain the name of one or more historical servers or historical associations. The
process is similar as for creating a real-time server list except that you must select the Historical server list
option button.

How to create a modification list


Modification lists are used to control the distribution of configuration changes and can contain the name of
any station. Any number of modification lists can be created but only one can be active at any time.

1. Open the Application Explorer and expand the configuration tree to select the Networking folder.
2. Select the Lists folder and from the task list select Add modification client list. The Modification List dia-
log is displayed.
3. Configure the list.
a. Enter the Name for the list. You can accept the suggested default or enter one of your own.
b. Enter a Description for the list. The description appears in the contents pane of the Application
Explorer and can be useful to identify the list later. The description is optional.
c. Tick the Activated tick box if the list is to be active. Only one list can be active at any one time.
d. Click the OK button to confirm the configuration and the close the dialog.
4. Add stations to the list.
a. Select the list you have just created and from the task list select Add a station. A dialog is
opened displaying a list of stations.
b. Select the stations to add. You can select more than one by holding down the Ctrl button while
you click.
5. Click the OK button to confirm the configuration and close the dialog.

- 742 -
How to Configure an Association
An Association is a group of servers operating together to provide redundant operation. As far as a client is
concerned, an association is treated in the same way as if it were just a single server station. There are two
types of association.

l Real-time association - For when redundant operation of real-time data is required. A real-time asso-
ciation can have two or more servers.
l Historical association - For when redundant operation of historical data (client server archive units) is
required. A historical association can have two or more servers.

How to configure an association

1. Open the Application Explorer and expand the configuration tree to display the Networking folder.
2. Select the Associations folder and from the task list select Add association. The Association dialog is
displayed. Show picture

3. Configure the association.


a. Enter the Name for the association. You can accept the suggested default or enter one of your
own.
b. Enter a Description for the association. The description appears in the contents pane of the
Application Explorer and can be useful to identify the association later. The description is
optional.
c. Select either Real time association or Historical association as appropriate.
d. Select the redundancy mode. For information about the available modes, see the book on
Redundant Configurations.
e. If the you have selected Real time association and Single active server then tick or un-tick
Without internal variables switching as required. See the topic Behavior of variables on a pass-
ive server for more information on this property.
f. Click the Apply button to confirm the configuration. If the configuration is valid, a new tab - Serv-
ers - is now displayed in the dialog.
4. Select the servers that form the association.
a. Select the Servers tab.
b. Expand the configuration tree to display the available server nodes and tick the servers that are
to form the association.
5. Click the OK button to confirm the configuration and close the dialog.

What stations can be used in an association?


In a real-time association, only a station that has been configured with a server node can be used.
In a historical association any station, real-time server or real-time client, can be used.

- 743 -
Distributing the Network Configuration File
If you are using different projects on each station of a networked application, you can avoid making the net-
work configuration on every station by manually copying the network configuration file to each station. The
file containing the network configuration is STATION.DAT and is found in the C folder of your project.
Before copying the file, you must shut down C-CURE Building Management System on the source
and destination stations.

- 744 -
Using the Network Wizard to configure the network architecture

- 745 -
Starting the Network Wizard
The Network Wizard guides you through the process of configuring your network architecture. There are two
distinct paths through the Network Wizard depending if you are using conventional PC architecture or Win-
dows server configured with Remote Desktop Services.
In the topics that follow, step numbers are included in the topic titles as aid to understanding the
sequence in which the configuration takes place. The step numbers do not appear in the actual wiz-
ard.

1. To start the Network Wizard, open the Application Explorer and expand the configuration tree to select
the Networks folder. Form the task list select Network Wizard. Show picture
2. Select Without Remote Desktop Session Host server or With Remote Desktop Session Host server as
appropriate.
3. Click the Next button to enter Step 1 - Clients and servers creation, or Step RDS1 - Configuring the
remote desktop session host servers.

The network wizard generates a basic network configuration. If you want to make any changes once
you have finished using the Network Wizard, the network configuration can be edited in the normal
way.
The Network Wizard can only be started when the network configuration is empty. You can delete
the entire network configuration using the Remove all configuration task that is available when the
Networking folder is selected in the Application Explorer configuration tree.

- 746 -
Without remote desktop session host server

- 747 -
Step 1 - Clients and Servers Creation
The Clients/Servers Creation dialog displays a list of stations created by the wizard and provides command
buttons to add, edit and delete stations. Show picture
The wizard automatically generates all possible client/server station links. If for any reason there is a cli-
ent/server link that you do not want, you can delete it later using the Application Explorer (not the wizard).

When you have finished configuring the stations, click Next to enter step 2 - configuring associations.

How to add a station

1. Click the Add button. The Station Properties dialog is displayed. Show picture

2. The Station Name is automatically generated using the convention shown below. You can accept the
name or enter your own.
3. Select either Real-time client or Real-time Server behavior. This setting only affects the behavior of
the wizard, it does not affect the client and server behavior of the station. (When using the wizard all
stations are configured as both client and server.) If you select Real-time server the station will be
available for selection in a real-time association.
4. If the station is to be used as a historical server, tick the Historical Server box.
5. Select and enter the TCP/IP properties. You can choose to refer to a station either by its host name or
by IP address.
6. Click OK to confirm the configuration.

The station number is allocated in the order in which you create the stations starting at the number
configured in the Network Settings. (Default is 1 for server stations, 50 for associations and 100 for
client stations.)

The Station Name is automatically generated using the following convention.

l DATACLIENT<n> - For a station configured as a real-time data client.


l DATASERVER<n> - For a station configured as a real-time data server.
l HISSERVER<n> - For a station configured as a real-time data client and a historical data server.
l HISDATASERVER<n> - For a station configured as a real-time data server and a historical data
server.

- 748 -
Where <n> is a number reflecting the order in which the stations were configured. (Not necessarily the
same as the station number.)

How to delete a station

1. Select the station to be deleted.


2. Click the Remove button.

How to edit a station

1. Select the station to be edited.


2. Click the Edit button.

- 749 -
Step 2 - Real-time Data Acquisition Server Association Configuration
The Real-time Data Acquisition Server Association dialog displays a list of real-time data acquisition server
associations created by the wizard and provides command buttons to add, edit and delete associations.
Show picture

When you have finished configuring the associations click Next to enter step 3 - configuring historical server
associations.

How to add an association

1. Click the Add button. The Association Properties dialog is displayed. Show picture

2. The Association Name is automatically generated using the convention shown below. You can accept
the name or enter your own.
3. Select the servers to make up the association. An association must contain at least two servers.
4. Click OK to confirm the configuration.

The association number is allocated in the order in which you create the associations starting at the
number configured in the Network Settings (default is 1 for server stations, 50 for associations and
100 for client stations).
The Association Name is automatically generated using the following convention.

l DAS_ASSOC<n> - For a real-time data server association.

Where <n> is a number reflecting the order in which the associations were configured (not necessarily the
same as the association number).

How to delete an association

1. Select the association to be deleted.


2. Click the Remove button.

How to edit a station

- 750 -
1. Select the association to be edited.
2. Click the Edit button.

- 751 -
Step 3 - Historical Data Server Association Configuration
The Historical Data Server Association dialog displays a list of historical server associations created by the
wizard and provides command buttons to add, edit and delete associations. Show picture

When you have finished configuring the associations click Next to enter step 4 - configuring station lists.

How to add an association

1. Click the Add button. The Association Properties dialog is displayed. Show picture

2. The Association Name is automatically generated using the convention shown below. You can accept
the name or enter your own.
3. Select the servers to make up the association. A historical association must contain two servers. Only
servers that have the Historical server property enabled are displayed.
4. Click OK to confirm the configuration.

The association number is allocated in the order in which you create the associations starting at the
number configured in the Network Settings (default is 1 for server stations, 50 for associations and
100 for client stations).
The Association Name is automatically generated using the following convention.

l HDS_ASSOC<n> - For a real-time data server association.

Where <n> is a number reflecting the order in which the associations were configured (not necessarily the
same as the association number).

How to delete an association

1. Select the association to be deleted.


2. Click the Remove button.

How to edit a station

1. Select the association to be edited.


2. Click the Edit button.

- 752 -
Step 4 - Client and Server List Generation
The final step generates the client and server lists for the client and server stations you have created using
the wizard. The following lists are created.

l One list for each station, with a name based on the station's name
l One list for each association, with a name based on the association's name.
l One list of the names of all the stations, with a default name LCALL.
l One list of the names of any client stations, with a default name of LCCLIENTS.

Click on Finish to complete the Network Wizard and return to the Application Explorer. Show picture

- 753 -
With remote desktop session host server

- 754 -
Step RDS1 – Remote Desktop Session Host Servers Configuration
This is the first step when using the Network Wizard for network configuration using an RDS host server. It
is used to enter the host server's configuration. It does not generate any network configuration directly, but
the properties entered here are used in later steps of the wizard. Show picture

You must enter at least one RDS Host server before using the Next button to continue to the next step -
Server creation.

How to add a host server

1. Click the Add button. The RDS Host Server Properties dialog is displayed. Show picture

2. The RDS Host server Name is automatically generated using the convention shown below. You can
accept the name or enter your own.
3. Enter an optional Description.
4. Select and enter the TCP/IP properties. You can choose to refer to a station either by its host name or
by IP address.
5. Click OK to confirm the configuration.

The RDS Host server Name is automatically generated using the following convention.

l RDSHOST<n>

Where <n> is a number reflecting the order in which the RDS Host servers are configured.
To edit or delete a configured RDS Host server use the Edit or Delete buttons respectively.

- 755 -
Step RDS2 - Server Creation
This step is used to create the servers in the network configuration. A server can have one or more beha-
viors selected from License Server, Real-time Data Acquisition Server (DAS) and Historical Data Server
(HDS). Show picture

You must enter at least one Server before using the Next button to continue to the next step - Real-time data
acquisition server association configuration.
HDS in the network context refers to the use of a station to provide historical data to other stations,
regardless of the type of archive unit (proprietary, ODBC, database...).

How to add a server

1. Click the Add button. The Server Properties dialog is displayed. Show picture

2. Select the behavior using the License server (LS), Real-time data acquisition server and Historical
data server tick boxes. The server must have at least one of the behaviors selected. See Server Con-
figurations table below.
3. The Name is automatically completed depending on the behavior selected in step 2. You can accept
the default or enter one of your own.
4. Enter an optional Description.
5. Select how the server is to be hosted.
a. If the server is to be stand-alone, select the IP properties. (IP address or Host name)
b. If the server is to run in the same PC as the RDS Host server, select the Session host.
6. Click OK to confirm the configuration.

Server configurations
The following server configurations are possible.
Default name if not hos- Default name if hosted by
HDS DAS LS ted by a RDS Host a RDS Host

- 756 -
Not permitted Not permitted
Yes LSVR RDLSVR
Yes DASVR RDSASVR
Yes Yes LDASVR RDLDASVR
Yes HDSVR RDHDSVR
Yes Yes LHDSVR RDLHSVR
Yes Yes DAHDSVR RDDAHDSVR
Yes Yes Yes LDAHDSVR RDLDAHDSVR

- 757 -
Step RDS3 - Real-time Data Acquisition Server Association Configuration
Identical to Step 2 - Real-time data acquisition server association configuration.

- 758 -
Step RDS4 - Historical Data Server Association Configuration
Identical to Step 3 - Historical data server association configuration.

- 759 -
Step RDS5 - Client Creation
This step is used to create the clients in the network configuration. A client can either be stand-alone (a PC
with its own IP configuration) or hosted by the RDS Host server. Show picture

You must enter at least one client before using the Next button to continue to the next step - RDS hosted cli-
ents network dongle renter assignment.

How to add a client

1. Click the Add button. The Client Properties dialog is displayed. Show picture

2. The client Name is automatically generated using the convention shown below. You can accept the
name or enter your own.
3. Enter an optional Description.
4. Select how the client is to be hosted.
a. If the client is to be stand-alone, select the IP properties. (IP address or Host name).
b. If the server is to run in an RDS session, select the Session host.
5. Click OK to confirm the configuration.

The client Name is automatically generated using the following convention.

l DATACLIENT<n> - For a stand-alone client


l RDSCLIENT<n> - For a client hosted on a RDS Session Server.

Where <n> is a number reflecting the order in which the clients are configured.
To edit or delete a configured client use the Edit or Delete buttons respectively.

- 760 -
Step RDS6 - RDS Hosted Client as Network Dongle Renter
This step is used to confirm the dongle configuration for each of the RDS hosted clients. It displays a list of
the clients and their dongle configuration (Dongle owner and slot number). By default, all RDS hosted clients
are set to slot 1 of the first dongle owner. Show picture

When the dongle assignment is correct click the Next button to continue to the next step - Client and server
network dongle renter assignment.

How to change the dongle assignment

1. Select one of the stations and click the Edit button. The Network Dongle Role Properties dialog is dis-
played. Show picture

2. Configure the Slot number and Owner's station name properties as required.
3. Click OK to close the dialog and save the configuration.

Note that the Renter property is always ticked as an RDS hosted client is always a dongle renter.

- 761 -
Step RDS7 - Client and Server Network Dongle Renter Assignment
This step is not displayed if there are no clients or servers that are not hosted on an RDS Host
server.
This step is used to confirm the dongle configuration for any standalone (not hosted on an RDS host server)
clients and servers. Although clients and servers of this type are configured to use their own individual
dongles by default, they can alternatively use a network dongle. This dialog allows you to make the network
dongle assignment if required. Show picture

When the dongle assignment is correct click the Next button to continue to the next step - IP conflict and net-
work architecture preview.

How to change the dongle assignment

1. Select one of the stations and click the Edit button. The Network Dongle Role Properties dialog is dis-
played. Show picture

2. Tick the Renter property.


3. Configure the Slot number and Owner's station name properties as required.
4. Click OK to close the dialog and save the configuration.

- 762 -
Step RDS8 - IP Conflict and Network Architecture Preview
This step is used to check that there are no IP conflicts and also to provide a final visual preview of the net-
work architecture. The table displays the RDS Host servers plus any standalone stations that have their own
IP address, that is any station not hosted on an RDS Host server. Show picture

When any IP conflicts have been resolved you can click the Architecture preview button to display a visual
preview or the Next button to continue to the final step - Client and server list generation.

How to change IP properties

1. Select one of the stations and click the Edit button. The TCP/IP Properties dialog is displayed. Show pic-
ture

2. Configure the IP address or Host name properties as required.


3. Click OK to close the dialog and save the configuration.

The Architecture Preview dialog


The Architecture Preview dialog provides a visual preview of all the RDS Host servers, Real-time data serv-
ers, Historical data servers, RD Session hosted clients and Data clients that have been configured. Clicking
on a particular item will display a pop-up containing the configured properties permitting a final check to be

- 763 -
made before proceeding to the final step when the network configuration is generated. Show picture

- 764 -
Step RDS9 - Client and Server List Generation
This is the final step of the Network Wizard. Show picture

When the Finish button is clicked, the complete network configuration is generated including the client, RDS
hosted client and server lists. When the generation is complete, you are prompted to enable Central Project
Management, which is mandatory when using an RD Session Host server.

What station lists are generated?


The following station lists are generated. Show picture

l Client lists for each of the clients, RDS clients and servers.
l A client list, LCALL, containing the names of all stations.
l A client list, LCCLIENTS, containing the names of all stations configured as real-time clients.
l One or more client lists, LCRDS_<name of RDS host>_CLIENTS containing the names of the RDS cli-
ents hosted by that RD Session Host server.

- 765 -
How to Configure the Variables for Networked Applications
In the majority of networked applications, careful use of the client and server station lists to control the vari-
able's behavior will allow the same reference project to be deployed identically on all stations.

Using the client and server lists to control the behavior of variables
On each station in the network, the behavior of variables is modified as follows.

l If the name of the local station appears in a variable's server list, the variable is loaded and behaves
normally. That is the station produces the value of the variable.
l If the name of the local station appears in a variable's client list, the variable is loaded and its beha-
vior is modified so that the station consumes the value of the variable.
l If the name of the local station does not appear in either the variable's client or server list, the vari-
able is not loaded.
l If the server list and the client list of a variable are not empty (not defined), this variable will pro-
duced and consumed locally on every station. Its value will not be shared among stations.

For examples of the use of client and server lists see the book Architecture examples.
For the precise behavior of a variable when it becomes a consumer, see the topic Behavior of variables on a
client station.

Allocating client and server lists to variables


When configuring variables for a networked application, each variable is allocated to a client station list and
a server station list. These lists determine the behavior of each variable according to the station on which it
is used.

1. Open the Application Explorer and expand the configuration tree to select the Variables tree folder.
2. Expand the Variables tree and select a variable. From the task list, select Properties. The Variable
Properties dialog opens.
3. Select the Advanced tab. Show picture

4. From the Servers drop down list box, select the list corresponding to the server stations where the
variable will appear.
5. From the Clients drop down list box, select the list corresponding to the client stations where the vari-
able will appear.
6. Click OK to confirm the selection and close the advanced options dialog.

Behavior of variables on a consumer station (client)


The behavior of variables, loaded on a station that appears in the variable's client list, is modified so that
the station consumes the value of the variable. The real time value and status of variables is produced from
the equivalent variable on the active server.
Variable Behavior as a consumer

- 766 -
Bit Becomes a consumer bit. If the bit has command attributes, any command issued by a client is
re-directed to the active server to be processed.
Threshold Behaves as a bit. The threshold is only calculated on the active server.
Alarm Becomes a consumer alarm. The result of acknowledgment and masking operations issued by a
client are re-directed to the active server to be processed.
Register Becomes a consumer register. If the register has control attributes, any control value issued by
a client is re-directed to the active server to be processed.
Counter Behaves as a register. The value of the counter is only calculated on the active server.
Timer Behaves as a register. The value of the timer is only calculated on the active server.

- 767 -
Using redundant configurations - Associations

- 768 -
Overview of Redundant Configurations
Redundant server operation is available for applications where system availability is of prime importance.
You can configure redundant operation for either or both real-time and historic data.
There are two types of redundant configurations available for real-time data - the one most suitable for your
application will largely depend on the type of industrial network you are using.

l Single Active Server: suitable for all networks.


l Multiple Active Server: only suitable for multi-master or dual path networks.

Simplified principle of operation when using a redundant configuration for real-time data
Two or more stations are configured as real-time servers. Their configuration is identical. All servers are
connected to the industrial network and the local area network. At any time, one of the servers will be active
and the others passive.
In the network configuration, the server stations are included in a real-time association. Clients are con-
figured so that they are linked to the association, not directly to one or other of the actual servers. The asso-
ciation automatically routes real time information from the active server to the clients.
Although C-CURE Building Management System configuration is identical, the stations are allocated
different station numbers, as this is dependent on the IP address.

Simplified principle of operation when using a redundant configuration and multiple active
servers for historical data
Two stations are configured as historical servers. Their configuration is identical*. Historical data is recor-
ded on both stations.
In the network configuration, both stations are included in a historical association. Stations, where the
archive units are to behave as clients, are configured so that they are linked to the historical association.
When processing a request (for example for Trend data), the station on which the client archive unit is loc-
ated checks to see which of the servers in the association is available. If both are available, it sends the
request to the server with the larger Available rate. If the rates are identical then the request is sent to the
server with the lowest station number.

Simplified principle of operation when using a redundant configuration and a single active
server for historical data
Two stations are configured as historical servers. Their configuration is identical*. They both record data in
the same SQL Server database. Only one station is active at any given time.
In the network configuration, both stations are included in a historical association. Stations, where the
archive units are to behave as clients, are configured so that they are linked to the historical association.
Requests for historic data are routed to the active server.

- 769 -
Using redundant configurations for real-time data

- 770 -
Single Active Server Architecture
With Single Active Server Architecture only one of the servers communicates with the industrial equipment
at any one time, although the other server(s) remain(s) permanently connected to the industrial network.
The server communicating with the industrial network is known as the active server. The other server(s) are
known as passive. This architecture is applicable under the following circumstances.

l When using a single master network such as Modbus.


l When using a timestamped protocol.
l When it is important to minimize the traffic on the industrial network.

The entire application will be identical on all servers.


To configure this type of architecture you must select the option Single active server when configuring the
association.

Normal operation
The active server communicates with the industrial network and sends, on event, any change in data to the
passive servers and any clients.
The passive servers initialize their communications but do not process any communication requests and do
not produce any values. Passive servers effectively become clients registered with the active server. The
source of variables on the passive server (See the topic Behavior of variables on a passive Server) is auto-
matically changed to External and their values come from the active server.

Server failure
When the active server fails, the passive server automatically switches to active. The industrial com-
munications become active and the new architecture is broadcast to all stations on the network. Any clients
receive changes in real time values from the new active server.

Server restart
When a server starts, there are 3 possible scenarios:

l No other servers running. The new server starts communication on the industrial network to refresh
its variable values and switches to active mode. Any clients on the network are automatically
registered with it and receive changes in real time values.
l One active server already running and the new server has a lower or the same availability rate than
the active server already running. The new server automatically switches to passive. Its variables
switch to external mode and it registers with the active server as a client. Any clients on the network
are automatically registered with it. Any changes in real-time value, received by the clients, from the
passive server are kept in a temporary cache.
l One active server already running and the new server has a higher available rate than the active
server already running. The new server automatically switches to active and any clients on the net-
work are registered with it. The server with the lower available rate that was already running switches
to passive. Its variables switch to external mode and it subscribes with the newly active server as a cli-
ent. Any changes in real-time value, received by the clients, from the passive server are kept in a tem-
porary cache.

Network failure
As part of an association, server stations exchange information about their status and current operation. If a
server detects that it cannot get such information (network connection to the other server(s) lost), then it
will automatically switch to active. This is a desired behavior to make sure clients stations always have the
most options to be kept updated. It also explain why it can happen to have more than one server station act-
ive, even with single active server associations.

- 771 -
Multiple Active Server Architecture
Within Multiple Active Server Architecture, all servers communicate simultaneously with the industrial equip-
ment. This architecture requires the use of either a multi-master industrial network or the capability of mul-
tiple porting the industrial equipment. Normally this architecture will use two servers, but three or more
servers can be used. The entire application will be identical on all servers.
To configure this type of architecture you must select the option Multiple active servers when configuring the
association.

Normal operation
Under normal operation, all servers communicate with the industrial equipment. Each client connects to the
first server that answers. (As each client connects to the first server that answers, it is possible that dif-
ferent clients will connect to different servers.) The server to which a client is connected can also be con-
trolled using a SCADA Basic program by using the LAN instruction.

Server failure
Clients registered on a server that fails will automatically switch to the next working server of the asso-
ciation.

Server restart
A server automatically restarts in the active state. Client stations will only subscribe to it if they are not
already subscribed to an operational server.

- 772 -
One for Many Architecture
One for Many architecture uses a single server station to provide redundant operation for two or more asso-
ciations. For example using three stations, Station1, Station2 and Station3.

l Station3 is included in an association with Station1 to provide redundant operation for Station1.
l Station3 is ALSO included in an association with Station2 to provide redundant operation for Station2.

This architecture is a way to minimize the number of stations to deploy and maintain, while ensuring a cer-
tain level of redundancy.
Instead of the entire variables tree in Station3 being active (producing the value of variables) or passive
(consuming the value of variables) some variables can be passive and others can be active depending on
which association produces them.
For an example of this type of architecture and more information, see the topic 1 for many redundant serv-
ers and 2 clients in the Architecture Examples book.

- 773 -
Behavior of Variables on a Passive Server
When a server is passive, it effectively becomes a client of the active server. Any variables are auto-
matically changed to External and subscribed with the active server. The variable’s behavior is then as fol-
lows.
Variable Behavior on passive server
Bit Becomes an external bit. If the bit has command attributes, the command is re-directed to the
active server to be processed.
Threshold Becomes external and behaves as a bit. The threshold is only calculated on the active server.
Alarm Becomes an external alarm. Acknowledgment and masking operations are re-directed to the act-
ive server to be processed.
Register Becomes an external register. If the register has control attributes, the control value is re-dir-
ected to the active server to be processed.
Counter Becomes an external and behaves as a register. The counter is only calculated on the active
server.
Timer Becomes an external and behaves as a register. The timer is only calculated on the active
server.

If the option Single active server without internal variable switching is selected, then internal vari-
ables on the passive server do not automatically change to external.

- 774 -
Using Redundant Configurations for Historical Data
Redundant operation for historical data uses historical associations together with client-server archiving.

l For information on configuring historical associations, see the topic How to configure an association.
l For information on using client-server archive units, see the book Using client-server archive units in
the help for Archives.

How is the active historic server selected when both servers of a single active server archi-
tecture are reconnected?
After a network failure, when both servers of a single active historical data association are reconnected, the
following rule is applied to determine which of them is to be active.

l First, the availability rate is examined. The one with the highest availability rate is selected to be act-
ive.
l If both servers have the same availability rate them the system variable
SYSTEM.<AssocName>.<StationName>.INVALIDTRENDCOUNT
is used as selection criteria. The station with the lowest value (least number of invalid trends) is pro-
moted to active.

- 775 -
Controlling and Managing Redundant Operation Using SCADA Basic
Under normal conditions, redundant operation is managed automatically by C-CURE Building Management
System and requires no further configuration other than the creation of associations.
However, for maximum flexibility, C-CURE Building Management System allows the operation of redundant
servers to be controlled by the SCADA Basic language. Programs written in this language may be run manu-
ally and/or automatically by change of the status variables.
The main instruction to be used when controlling stations is LAN. This allows stations to be forced to either
active or passive state and to connect clients to a specific server.

- 776 -
Network status variables

- 777 -
Using the Network Status Variables
C-CURE Building Management System provides a large number of network status variables provided and it
may appear at first that the information provided by some of them is duplicated.

Connection Status and Connection Activity Variables


The connection activity variables indicate if a connection is active. That is a node of C-CURE Building Man-
agement System is using the connection for exchange of information with another node. A connection can
only become active if it is already available
The connection status variables indicate if a connection is available. That is the physical network connection
is available to the corresponding C-CURE Building Management System node.
On a system with just one network, the connection status variables and the connection activity variables will
have the same values.
On a system with dual networks, one of the networks may have an active server connection whilst the other
has an active client connection, or both client and server connections might use the same network with the
other network having no active connections. In either case, should a connection become unavailable all activ-
ity automatically transfers to the other. The following picture shows the status of a simple client server sys-
tem with dual networks. Both networks are available. The client and server connections both using one
network whilst the other is available but inactive. Show picture

The corresponding values of the status variables are: Show picture

OK_NUMBER and ACTIVE_NUMBER variables


The ACTIVE_NUMBER variables indicate the number of remote nodes with which a local node is actively
exchanging information.
The OK_NUMBER variables indicate the number of remote nodes available to a local node.
On a system with one network, the ACTIVE_NUMBER and OK_NUMBER variables will have the same values.
On a system with dual networks, only one of the connections to a remote node may be active at one time
and the ACTIVE_NUMBER and OK_NUMBER variables may have different values.

- 778 -
In the picture above, both the client and server connections are using node 0. Therefore, the OK_NUMBER
and ACTIVE_NUMBER variables for node 0 have the same values, whereas node 1 has a value of 1 for its
OK_NUMBER variables but the ACTIVE_NUMBER variables are 0.

- 779 -
Network Status Variables Naming Rules
C-CURE Building Management System provides several variables containing status information for stations
in a networked application. The variables are generated automatically with names related to the network
configuration. The variables can be used to animate a network status mimic that should be considered essen-
tial for any networked application.
The names of the network status variables are generated automatically by C-CURE Building Management
System with branches constructed using the following rules.

Naming rules when using TCP/IP prior to version 10.0 SP1


Mnemonic Description
<StationName> The name of the station as entered in the network configuration. (Not the
name by which the host PC is known on the Windows network.)
<StationNumber> The number of the station corresponding to <StationName>. For information
on how the station number is configured see the topic How the station number
is allocated to a physical PC.
<NodeNumber> The number of a node within a station. The nodes are configured in the net-
work configuration with each node corresponding to a physical network card
in the host PC. Node numbers start at 0.
<NodeName> The identity of the node. = <StationName>_<NodeNumber>
<ServerConnectionName> The identity of server connection. = <StationName>_<NodeNumber>S
<ClientConnectionName> The identity of client connection. = <StationName>_<NodeNumber>C
<AssociationName> The name of an association as entered in the network configuration. Asso-
ciations are used in redundant configurations.

Naming rules when using TCP/IP for version 10.0 SP1 and later
Version 10.0 SP1 and later have a minor difference in the way the <ServerConnectionName> and <Cli-
entConnectionName> are constructed. If you open a project created with a version prior to 10.0 SP1, vari-
ables constructed using the old scheme will still work as expected. However, if you create any new stations
in the network configuration, the new naming scheme will be used when the new status variables are gen-
erated.
Mnemonic Description
<ServerConnectionName> The identity of server connection. = <StationName><NodeNumber>S
<ClientConnectionName> The identity of client connection. = <StationName><NodeNumber>C

Naming rules when using NetBios


NetBios is no longer in common use although it is still supported. The naming scheme, if using Netbios, is
modified as follows. Please note that these names can be changed manually in the station properties.
Mnemonic Description
<ServerConnectionName> The identity of server connection. = <StationName>S<NodeNumber>
<ClientConnectionName> The identity of client connection. = <StationName>C<NodeNumber>

Example for TCP/IP illustrating the status variable naming rules


Mnemonic Example
<StationName> PIPPIN
<StationNumber> 1
<NodeNumber> 0
<ServerConnectionName> PIPPIN_0S (Earlier than 10.0 SP1)
PIPPIN0S (10.0 SP1 and later)
<ClientConnectionName> PIPPIN_0C (Earlier than 10.0 SP1)
PIPPIN0C (10.0 SP1 and later)

An important note

- 780 -
The information provided by some of the variables is different when <StationName> is the local station and
when <StationName> is the name of another (remote) station on the network.

- 781 -
Availability of network system variables per version
For information on the mnemonics within the triangular brackets, see the topic Network variable naming
rules.
All variable names are preceded by SYSTEM. For example SYSTEM.STATION_NAME

Variable name Available from version


STATION_NAME 6.00
STATION_NUMBER 6.00
<StationName> 6.00
<NodeName> 8.00 SP3, 8.10
<ServerConnection> 6.10
<ClientConnection> 6.10
<NodeName>.ACTIVECTX 8.00 SP3, 8.10
<ServerConnection>.ACTIVECTX 7.20d, 8.00 SP3, 8.10
<ClientConnection>.ACTIVECTX 7.20d, 8.00 SP3, 8.10
<NodeName>.ACTIVE_NUMBER 8.00 SP3, 8.10
<ServerConnection>.ACTIVE_NUMBER 8.00 SP3, 8.10
<ClientConnection>.ACTIVE_NUMBER 8.00 SP3, 8.10
<AssociationName>.<StationName> 6.10
< 7.20d, 8.00 SP3, 8.10
AssociationNumber
>.<StationNumber>.SWITCH.PASSIVE_COMPLETED
<AssociationName>.<StationName>.MAIN 7.20d, 8.00 SP3, 8.10
<AssociationNumber>.<StationNumber>.ACTIVE_ 7.20d, 8.00 SP3, 8.10
NUMBER
<AssociationName>.USER_STATION 6.10
<StationName>.OK_NUMBER 6.10
<NodeName>.OK_NUMBER 7.20d, 8.00 SP3, 8.10
<StationName>C.OK_NUMBER 7.20d, 8.00 SP3, 8.10
<StationName>S.OK_NUMBER 7.20d, 8.00 SP3, 8.10
<ServerConnection>.OK_NUMBER 7.20d, 8.00 SP3, 8.10
<ClientConnection>.OK_NUMBER 7.20d, 8.00 SP3, 8.10
<ServerConnection>.WATCHDOG.COUNT 7.20c, 8.00
<ClientConnection>.WATCHDOG.COUNT 7.20c, 8.00
<AssocNumber>.<StationNumber>.AVAILABLERATE 8.10

- 782 -
Variable Providing Station Id
SYSTEM.STATION_NAME
Variable type - TEXT.
Value - the name of the local station.
Produced by all stations.

SYSTEM.STATION_NUMBER
Variable type – REGISTER.
Value - the number of the local station.
Produced by all stations.

- 783 -
Variables Providing the Connection Status Between Two Stations
SYSTEM.<StationName>
Variable type – BIT.
Where <StationName> refers to a remote station, set to 1 if the remote station is connected to the local sta-
tion, else 0.
Where <StationName> refers to the local station, set to 1 if the local station is connected to at least one
remote station, else 0.
Produced by <StationName> and all stations that have a connection with <StationName>.
Example: SYSTEM.PIPPIN

SYSTEM.<NodeName>
Variable type – BIT.
Where <NodeName> refers to a remote station, set to 1 if the remote station is connected to the local sta-
tion, else 0.
Where <NodeName> refers to a local station, set to 1 if the local station is connected to at least one remote
station, else 0.
Produced by the <StationName> referred to in the <NodeName> and on all stations that have a connection
with <StationName>.
Example: SYSTEM.PIPPIN_0

SYSTEM.<ServerConnectionName>
Variable type – BIT.
Where <ServerConnectionName> refers to a remote station, set to 1 if the local client has established a con-
nection, else 0.
Where <ServerConnectionName> refers to the local station, set to 1 if one or more remote station have
established a client connection with the local server, else 0.
Produced by the station <StationName> and all stations that have a client connection the <Server-
ConnectionName> server.
Example: SYSTEM.PIPPIN_0S

SYSTEM.<ClientConnectionName>
Variable type – BIT
Where <ClientConnectionName> refers to a remote station, set to 1 if the local server has established a con-
nection, else 0.
Where <ClientConnectionName> refers to the local station, set to 1 if one or more remote station have
established a server connection with the local client, else 0.
Produced by the station <StationName> and all stations that have a server connection the <Cli-
entConnectionName> client.
Example: SYSTEM.PIPPIN_0C

- 784 -
Variables Related to an Association
SYSTEM.<AssocName>.<StationName>
Variable type – BIT.
Set to 1 if the station <StationName> of association <AssocName> is active or set to 0 if the station is pass-
ive.
Produced by the station <StationName> and all stations linked to the association.
Example: SYSTEM.ASSOC.PIPPIN

SYSTEM.<AssocNumber>.<StationNumber>.SWITCH.PASSIVE_COMPLETED
Variable type – BIT.
Follows the status of variables in the station <StationNumber> when switching from active to passive. Set
to 0 when the change is initiated and set to 1 when all changed variables are refreshed.
Produced only by the station <StationNumber>.
Example: SYSTEM.10.1.SWITCH.PASSIVE_COMPLETED

SYSTEM.<AssociationName>.<StationName>.MAIN
Variable type - BIT.
Set to 1 when the station <StationName> in association <AssociationName> is Main, else 0.
Produced by the station <StationName> and all the stations which are linked to the association or directly to
the station.
Example: SYSTEM.ASSOC.PIPPIN.MAIN

SYSTEM.<AssocNumber>.<StationNumber>.ACTIVE_NUMBER
Variable type - REGISTER.
The number of remote stations that are using the station <StationNumber> as the active station of asso-
ciation <AssocNumber>.
This variable is produced only by the station <StationNumber>.
Example: SYSTEM.10.1.ACTIVE_NUMBER

SYSTEM.<AssocName>.USER_STATION
Variable type – TEXT.
The name of the remote server station of the association <AssocName> that refreshed the local station. It
is the active server with respect to the local station.
Produced only by the stations that have a link with the association <AssocName>.
Example: SYSTEM.ASSOC.USER_STATION
Example: PIPPIN and FRODO are the names of two stations belonging to the association with the name
ASSOC. ARAGORN is the name of a station connected to association ASSOC. If ARAGORN is refreshed by sta-
tion PIPPIN then on station ARAGORN the variable SYSTEM.ASSOC.USER_STATION will contain the string
PIPPIN.

SYSTEM.<AssocNumber>.<StationNumber>.AVAILABLERATE
Variable type - REGISTER.
The available rate of the station <StationNumber> in the association <AssocNumber>.
In a historical association, the available rate is used to select which server will respond to a request for his-
toric data from a client when both servers are healthy.
In a real-time association with a single active server, the available rate is used to select the server that is
active when both servers are healthy.
Produced by the station <StationName> and all the stations which are linked to the association or directly to
the station.
Example: SYSTEM.20.1.AVAILABLERATE

- 785 -
SYSTEM.<AssociationName>.LOCALHOST
Variable type - BIT.
Set to 1 if the local station within the association <AssociationName> is active and set to 0 if the station is
passive.
Produced by all stations. If the station does not belong to the association <AssociationName> the variable
value is NS.
Example: SYSTEM.ASSOC.LOCALHOST

SYSTEM.<AssocName>.<StationName>.INVALIDTRENDCOUNT
Variable type - REGISTER.
The invalid trend count for the station <StationName> produced by the historical association
<AssocName>.
This variable is produced by the station <StationName> and all stations linked to the association or directly
to the station.
Example: SYSTEM.HASSOCIATION1.HISERVER1. INVALIDTRENDCOUNT
Only for historic associations.

- 786 -
Variables Related to the Number of Established Connections
SYSTEM.<StationName>.OK_NUMBER
Variable type - REGISTER.
The total number of remote stations with which the entire station <StationName> has a connection.
Produced only by the station <StationName>.
Example: SYSTEM.PIPPIN.OK_NUMBER

SYSTEM.<NodeName>.OK_NUMBER
Variable type - REGISTER.
The number of remote nodes connected to the station <StationName> using the node <NodeName>.
Produced only by the station <StationName> containing the node <NodeName>.
Example: SYSTEM.PIPPIN_0.OK_NUMBER

SYSTEM.<StationName>C.OK_NUMBER
Variable type - REGISTER.
The total number of remote server nodes with which the local station <StationName> has a connection.
Produced only by the station <StationName>.
Example: SYSTEM.PIPPINC.OK_NUMBER

SYSTEM.<StationName>S.OK_NUMBER
Variable type – REGISTER.
The total number of remote client nodes with which the local station <StationName> has a connection.
Produced only by the station <StationName>.
Example: SYSTEM.PIPPINS.OK_NUMBER

SYSTEM.<ClientConnectionName>.OK_NUMBER
Variable type - REGISTER.
The number of remote server nodes with which the local node <ClientConnectionName> has a connection.
Produced only by the station <StationName> containing the node <ClientConnectionName>.
Example: SYSTEM.PIPPIN_0C.OK_NUMBER

SYSTEM.<ServerConnectionName>.OK_NUMBER
Variable type - REGISTER.
The number of remote client nodes with which the local node <ServerConnectionName> has a connection.
Produced only by the station <StationName> containing the node <ServerConnectionName>.
Example: SYSTEM.PIPPIN_0S.OK_NUMBER

- 787 -
Variables Related to Connection Activity
SYSTEM.<NodeName>.ACTIVECXT
Variable type – BIT.
Where <NodeName> refers to a remote station, set to 1 when there is an active connection between the
remote node and a node on the local station (client or server), else 0.
Where <NodeName> refers to a node of the local station, set to 1 when there is an active connection
between the local node and any node on a remote station (client or server), else 0.
Produced by the station <StationName> and all the stations are linked to the node <NodeName>.
Example: SYSTEM.PIPPIN_0.ACTIVECTX

SYSTEM.<ClientConnectionName>.ACTIVECXT
Variable type – BIT.
Where <ClientConnectionName> refers to a remote station, set to 1 when there is an active connection
between the remote node and a server node on the local station, else 0.
Where <ClientConnectionName> refers to a node of the local station, set to 1 when there is an active con-
nection between the local node and at least one server node on a remote station, else 0.
Produced by the station <StationName> and all stations that have a link to the remote client <Cli-
entConnectionName>.
Example: SYSTEM.PIPPIN_0C.ACTIVECTX

SYSTEM.<ServerConnectionName>.ACTIVECXT
Variable type – BIT.
Where <ServerConnectionName> refers to a remote station, set to 1 when there is an active connection
between the remote node and a client node on the local station, else 0.
Where <ServerConnectionName> refers to a node of the local station, set to 1 when there is an active con-
nection between the local node and at least one client node on a remote station, else 0.
Produced by the station <StationName> and all stations that have a link to the remote server <Server-
ConnectionName>.
Example: SYSTEM.PIPPIN_0S.ACTIVECTX

SYSTEM.<NodeName>.ACTIVE_NUMBER
Variable type - REGISTER.
The number of remote nodes with which the local node <NodeName> has an active connection.
Produced only by the station <StationName> containing the node <NodeName>.
Example: SYSTEM.PIPPIN_0.ACTIVE_NUMBER

SYSTEM.<ClientConnectionName>.ACTIVE_NUMBER
Variable type - REGISTER.
The number of remote server nodes with which the local node <ClientConnectionName> has an active con-
nection.
Produced only by the station <StationName> containing the node <ClientConnectionName>.
Example: SYSTEM.PIPPIN_0C.ACTIVE_NUMBER

SYSTEM.<ServerConnectionName>.ACTIVE_NUMBER
Variable type - REGISTER.
The number of remote client nodes with which the local node <ServerConnectionName> has an active con-
nection.
Produced only by the station <StationName> containing the node <ServerConnectionName>.
Example: SYSTEM.PIPPIN_0S.ACTIVE_NUMBER

- 788 -
Variables used to Monitor Connections (Watchdogs)
Watchdog messages are produced by client nodes so that the corresponding server nodes are able to verify
their presence.

SYSTEM.<ServerConnectionName>.WATCHDOG.COUNT
Variable type - REGISTER.
Where <ServerConnectionName> refers to a node of a local station, the variable counts all watchdog mes-
sages received by that connection. Modulus 1000.
Where <ServerConnectionName> refers to a node of a remote station, the variable counts the number of
watchdog messages sent from the local station to that node. The value is reset to 0 if the connection is
broken.
Produced by the station <StationName> and all the stations which have a connection with the remote node
<ServerConnectionName>.
Example: SYSTEM.PIPPIN_0S.WATCHDOG.COUNT

SYSTEM.<ClientConnectionName>.WATCHDOG.COUNT
Variable type – REGISTER
Where <ClientConnectionName> refers to a node of the local station, the variable counts the watchdog mes-
sages sent by that connection. Modulus 1000.
Where <ClientConnectionName> refers to a node of a remote station, the variable counts the number of
watchdog messages received from that node. The value is reset to 0 if the connection is broken.
It is produced by the station <StationName> and all the stations that have a connection with the remote
node <ClientConnectionName>.
Example: SYSTEM.PIPPIN_0S.WATCHDOG.COUNT

- 789 -
Architecture examples

- 790 -
Architecture Examples - 1 Server Station and 2 Client Station

Project requirements

l Station1 communicates with equipment and produces the value of variables.


l Station2 consumes the value of all variables and displays mimics.
l Station3 consumes the value of all variables and displays mimics.

The project configuration is identical on all stations.

License requirements

l Station1 requires a server license.


l Station2 requires a client license.
l Station3 requires a client license.

Network configuration

l The default network configuration is used with all stations configured as both client and server and
with all links between all stations made.
l Two station lists are required.
A server list LSERVER containing the name Station1.
A client list LCLIENT containing the names Station2 and Station3.

Variables tree configuration

l All user defined variables are attached to the server list LSERVER and the client list LCLIENT.

- 791 -
Architecture Examples - 2 SCADA Station and 1 Client Station

Project requirements

l Station1 communicates with equipment and produces the value of variables. It also consumes the
value of variables from Station2 and displays mimics.
l Station2 communicates with equipment and produces the value of variables. It also consumes the
value of variables from Station1 and displays mimics.
l Station3 consumes the value of variables from both Station1 and Station2 and displays mimics.

The project configuration is identical on all stations.

License requirements

l Station1 requires a SCADA license. (It produces and consumes variables and displays mimics).
l Station2 requires a SCADA license. (It produces and consumes variables and displays mimics).
l Station3 requires a client license.

Network configuration

l The default network configuration is used with all stations configured as both client and server and
with all links between all stations made.
l Four station lists are required.
LSERVER1, a server list containing the name Station1.
LSERVER2, a server list containing the name Station2.
LCLIENT1_3 a client list containing the name Station1 and Station3.
LCLIENT2_3 a client list containing the name Station2 and Station3.

Variables tree configuration

l Variables with values produced by Station1 and consumed by Station2 and Station3 are allocated to
server list LSERVER1 and client list LCLIENT2_3.
l Variables with values produced by Station2 and consumed by Station1 and Station3 are allocated to
server list LSERVER2 and client list LCLIENT1_3.

- 792 -
Architecture Examples - 2 Redundant Server Stations and 1 Client Station

Project requirements

l Station1 communicates with equipment and produces the value of variables.


l Station2 communicates with equipment and produces the value of the same variables as Station1.
l Station1 and Station2 are to behave as redundant servers.
l Station3 consumes the value of variables from Association1 and displays mimics.

The project configuration is identical on all stations.

License requirements

l Station1 requires a server license.


l Station2 requires a server license.
l Station3 requires a client license.

Network configuration

l The default network configuration is used with all stations configured as both client and server and
with all links between all stations made.
l A single association, called Association11, which contains Station1 and Station2 is configured.
l Two station lists are required.
LASSOC11, a server list containing the name Association11.
LCLIENT3, a client list containing the name Station3.

Variables tree configuration

l Variables with values produced by Station1 and Station2 are allocated to server list LASSOC11 and cli-
ent list LCLIENT3.

- 793 -
Architecture Examples - 1 for Many Redundant Servers and 2 Clients

Project requirements

l Station1 can communicate with PLCA and produce the value of variables.
l Station2 can communicate with PLCB and produce the value of variables.
l Station3 can communicate with both PLCA and PLCB and produce the value of variables.
l Station3 is in two separate associations, one with Station1 and the other with Station2, providing
redundancy for both stations.
l Station4 consumes the value of variables from Association10 and Association20 and displays mimics.
l Station5 consumes the value of variables from Association10 and Association20 and displays mimics.

The project configuration is identical on all stations.

License requirements

l Station1 requires a server license.


l Station2 requires a server license.
l Station3 requires a server license.
l Station4 requires a client license.
l Station5 requires a client license.

Network configuration

l The default network configuration is used with all stations, configured as both client and server and
with all links between all stations made.
l An association, Association10, containing Station1 and Station3 is configured.
l An association, Association20, containing Station2 and Station3 is configured.
l Three station lists are required.
LASSOC10 – a server list containing the name Association10
LASSOC20 – a server list containing the name Association20
LCLIENT45 – a client list containing the names Station4 and Station5.

Variables tree configuration

l Variables produced by Station1 or Station3 and consumed by Station4 and Station5 are allocated to
the server list LASSOC10 and the client list LCLIENT45.
l Variables produced by Station2 or Station3 and consumed by Station4 and Station5 are allocated to
the server list LASSOC20 and the client list LCLIENT45.

How do the stations behave?


For the purpose of this explanation, it is assumed that Station1 and Station2 were started before Station3.

l Station1 is active and produces the value of variables for Association10.


Station2 is active and produces the value of variables for Association20.
Station4 and Station5 consume the value of variables from both Association10 and Association20.

- 794 -
l Station3 is entirely passive.
Station3 variables that are attached to server list LASSOC10 will consume values.
Station3 variables that are attached to server list LASSOC20 will consume values.
l One of the active stations, for example Station1, fails. The variables in Station3 that are attached to
LASSOC10 become active and produce values. The variables that are attached to LASSSOC20 remain
passive and continue to consume values. Station3 is then the active partner in Association10 but
remains the passive partner in Association20. When Station1 is restarted, it is passive, its variables
consuming values. Station1 remains passive unless forced to active (by SCADA Basic for example), or
Station3 fails.

Further notes about the single station used to provide redundancy

l A single station can be used to provide redundancy in any number of associations as long as the
license can accommodate the number of variables and the PC itself has sufficient resources (memory,
CPU speed, network capacity, etc.) to manage the load.
l The status of the station within each association is managed separately. The station can be active in
some associations and passive in others, or active in all associations or passive in all associations.
l The physical connection to the equipment must be taken into account. That is, two different asso-
ciations cannot use the same physical connection (for example COM1) as the station can be active in
both associations at the same time and there would be a conflict.

- 795 -
Servers

- 796 -
Managing the Servers in the Application Explorer

Tasks applicable to the servers


When the Servers folder is selected.
Icon Task Description
Settings Display C-CURE Building Management System Server interfaces Settings dialog.

When the Web & Mobile back ends folder is selected.


Icon Task Description
Settings Display the Web & Mobile back end Settings dialog.
Add a core back end Add and configure a new Core back end.
Add a geolocation
Add and configure a new Geolocation back end.
back end
Add an instant mes-
Add and configure a new Instant messaging back end.
saging back end

When the IEC 60870-5-104 Server folder is selected.


Icon Task Description
Settings Display the IEC 60870-5-104 Server Settings dialog.
Add an outstation Add and configure a new IEC 60870-5-104 outstation.

When The OPC folder is selected in the right hand side panel.
Icon Task Description
Settings Display C-CURE Building Management System OPC Server Settings dialog.

When the Mobile server folder is selected in the right hand side panel.
Icon Task Description
Settings Display the Mobile server Settings dialog.

- 797 -
Servers Settings
The settings for all server types can be displayed by using the Settings task when the Servers folder is selec-
ted in the Application Explorer's configuration tree. Show picture

l Windows Remote Desktop Session Host server


l Check NTFS folders permissions for C-CURE Building Management System's folder, the project
folder using -b and the project versions central folder - If ticked C-CURE Building Management
System checks that the client users have the correct NTFS permissions (Full Control) for the
folders before starting an RDS session. If the permissions are found to be incorrect, an error
message is displayed and the session is not started.
l Windows Remote Desktop session starting timeout - This timeout is only used if the property
Use same working folder for all Remote Desktop sessions is selected in a client's network con-
figuration. As only one RDS client is able to start at a time in a host server, the next client must
wait either until the previous client has completed its startup, or this delay, before it can start.
The default is 10 minutes.
l Web & Mobile back ends - See the Settings topic in the Web & mobile back ends book.
l OPC - See the Settings topic in the OPC Server book.
l Mobile server - See the Alarms and Properties settings topics in the Mobile Server book.
l IEC 61870-5-104 - See the Settings topic in the IEC 104 Server book.

When basing the architecture on a RDS Host Server, only one C-CURE Building Management System
instance can act as a Web & Mobile back end, and such an architecture is not recommended.

- 798 -
Web & Mobile back ends

- 799 -
Overview of the Web & Mobile Back Ends
The topics in this book explain how to configure web back ends, which provides the services and data
required by C-CURE Building Management System Web & Mobile client applications, and instant messaging.

l Core back end: Required to take advantage of any Web & Mobile client applications, including
WebVue, Touchvue, SnapVue, the WebScheduler and Web Services Toolkit clients. It exposes the inter-
face for core services such as authentication.
l Geolocation back end: Required to take advantage of the geolocation and tracking features with
SnapVue. It hosts the geolocation server.
l Instant messaging back end: Required to take advantage of the Instant Messaging feature with
SnapVue and the Messaging control in mimics. It hosts the Instant Messaging server.

Depending on your network architecture and the level of segmentation in place, back ends can be on
the same computer as the IIS web server, or be hosted on another server.
For more information on how to deploy the Web Server, see the Deployment help book.
For more information on how to configure and use WebVue, see the WebVue help book.
For more information on how to configure and use the TouchVue mobile app, see the TouchVue help book.
For more information on how to configure and use the SnapVue mobile app, see the SnapVue help book.

Why do I need to configure a Core back end


The Core back end exposes the interface used by the IIS web server for the core services including authen-
tication, real time data, alarms, historical data and graphic rendering.
A Core back end must be configured to use any of the Web & Mobile client applications.
When deploying the IIS web server with the Web Deployment Console, you will configure the endpoint of the
Core back end so that the deployed web services can connect to the main C-CURE Building Management Sys-
tem process.

Why do I need to configure a Geolocation back end


The Geolocation back end exposes the interface used by the IIS web server and the main C-CURE Building
Management System process for the geolocation and tracking services.
A Geolocation back end must be configured to use the geolocation and tracking features in SnapVue and in
C-CURE Building Management System.
If a Geolocation back end is configured, the Geolocation server is launched at start-up on the station con-
figured as producer. It runs as a child process of the main C-CURE Building Management System executable.
When deploying the IIS web server with the Web Deployment Console, you will configure the endpoint of the
Geolocation back end so that the deployed geolocation and tracking web services can connect to the Geoloca-
tion server process.

Why do I need to configure an Instant Messaging back end


The Instant Messaging back end exposes the interface used by the IIS web server and the main C-CURE
Building Management System process for the Instant Messaging services.
An Instant Messaging back end must be configured to use the instant messaging feature in SnapVue and in
C-CURE Building Management System mimics.
If an Instant Messaging back end is configured, the Instant Messaging server is launched at start-up on the
station configured as producer. It runs as a child process of the main C-CURE Building Management System
executable.
When deploying the IIS web server with the Web Deployment Console, you will configure the endpoint of the
Instant Messaging back end so that the deployed instant messaging web service can connect to the Instant
Messaging server process.
While the Core and Geolocation back ends are only required if using Web & Mobile client applic-
ations, configuring an Instant Messaging back end is also required even if users only take advantage
of the Instant Messaging via mimics in the desktop application.

- 800 -
Characteristics and file formats:

l Text messages can have a maximum of 500 characters.


l Attachments, irrespective of type, can be a maximum of 200 Mb.
l Video recording (mobile apps only) is limited to a maximum of 30 seconds. Pre-recorded videos can
be longer as long as they are less than 200 Mb.
l Attached files are managed as follows.
l .3gp, .aac, .wav, .mp3, .aiff are treated as audio (voice) messages.
l .png, .jpg, .jpeg, .gif, .bmp are treated as images.
l .mp4, .mov are treated as video.
l Any other file extension has no special treatment and is downloaded.

The Instant Messaging is licensed. If it has not been license-enabled, it operates as if in trial mode.

- 801 -
Web & Mobile back ends Settings
The Web and Mobile back ends settings can be displayed from the Communication folder of the Application
Explorer's Main Settings dialog or by using the Settings task when the Web & Mobile back ends node is selec-
ted in the Application Explorer's configuration tree. Show picture

These settings apply to all core back ends that are configured. They can be overridden using the
Advanced Properties tab in each configured core back end.

l Default core back end connection properties. The default connection properties for each configured
core back end.
l Channel port - The TCP port used for communication between the IIS Web Server and C-CURE
Building Management System core back end. If a firewall is operating, it may be necessary to
add an exception for C-CURE Building Management System and the incoming port that it is
using. The default is 8090.
l Client session timeout - If there is no request from the client (IIS Web Server) after this period
has elapsed, the core back end assumes that the client is disconnected, removes the client's con-
text and releases any server resources allocated to the client. The default is 1 minute.

- 802 -
How to Add a Core Back End
1. Select the Web & Mobile back ends node in the Application Explorer and select Add a core back end
from the task list. The Core back end creation dialog opens. Show picture

2. Enter the name for the back end in the Name text box. You can accept the suggested default or enter
one of your own.
3. Select the First Window. This is the mimic and branch that are displayed on a WebVue client when it
first connects to C-CURE Building Management System via this back end. This is ignored if a mimic
and branch are defined in configuration of the user that is logging in.
4. Select the Project Language. The Project Language is the language in which the WebVue mimics will
appear. This setting can be overridden at the user profile level.
5. Click Apply to confirm the configuration.

Advanced properties
Advanced properties are configured in the Advanced tab. Show picture

l Connection
l Override default channel port - Override the default channel port configured in Web & Mobile
back ends settings.
l Override default client session timeout - Override the default client session timeout configured
in Web & Mobile back ends settings.
l Logon / Logout script - Enable the user logon / logout script to be run.
l Behavior
l Immediate release of WebVue authentication subscription - Release the authentication sub-
scription immediately after the last web browser tab, that is running a particular WebVue ses-
sion, is closed. Activated by default for WebVue but may be deactivated, if required, for custom
web applications.

- 803 -
l Enable automatic logoff (advanced security strategy for user rights) - Enable automatic logging
off after a period of inactivity. The period is defined in the user's profile.
l Associated Action on left click - In an Alarm Viewer, enable the action associated with an alarm
to be directly executed when the user left-clicks on the alarm. This property affects the behavior
when using a desktop browser; actions on left click are not supported in mobile browsers.
l Fit rendering to web browser viewport - The mimic's graphic rendering is adjusted to the avail-
able area within the web browser. See note below.
l Graphical properties
l Image quality - Images are normally displayed at 100% quality - that is no reduction in quality.
However, should the application be using very large images, or the connection to the web client
has limited bandwidth, you can reduce the image quality to improve performance.
l Enable WebGL™ graphic acceleration - WebGL™ is a technology used to accelerate graphic per-
formance supported by the majority of web browsers. However, if the web browser in use does
not support it, or you are using a custom web application, you can disable it. WebGL™ is used
for the graphic rendering of the trend viewer in WebVue. If disabled, a fallback to HTML5 Canvas
is used for rendering.
l Networking
l Servers - Select the server list, which determines on which server(s) station(s) the core back
end will be active. If no list is selected it will be activated on all stations.

Using the property Fit rendering to the web browser viewport


The property Fit rendering to the web browser viewport drives how mimic rendering is adjusted with
regards to the available space in the web browser (the viewport).

l What if this property is disabled (default and recommended)?


Graphics are rendered at scale 1:1 compared to the size of your mimics as they have been designed
with the C-CURE Building Management System desktop application. If the viewport of your web
browser is small, you will be able to visualize the top-left part of your mimic at scale 1:1 (with scroll-
bars on desktop browsers), and you can easily maximize the web browser to visualize the whole
mimic.
When your web browser is maximized, you will most probably be able to visualize the whole mimic.

l What if this property is enabled?


Graphics are scaled automatically, so that you can visualize the whole mimic whatever the size of
your web browser viewport. While this seems an interesting feature, it will quickly prove to be painful
for users because any change in the size of the web browser window causes a different scaling to be
applied and therefore requires user's eyes to adapt.

It is important to note that this property's value is ignored when WebVue is open in a mobile web
browser - The graphic rendering is always fitted to the viewport on mobile web browsers.

Because the main window of a web browser is always full screen on a mobile device, it is important
that the user get an overview of its mimic at first sight. Moreover, because zooming and panning are
much easier and usual on a mobile device - with 2-finger gestures compared to desktop mouse ges-
tures - it is straight and painless for the user to zoom and pan to get mimic details.

If necessary, a client-side setting allows the WebVue user to change this forced behavior. It is avail-
able in the WebVue client settings and is named Do not fit rendering to the web browser viewport.

Proper calculation of rendering scales and ratios requires that the web back end is able to guess the
size, in pixels, needed to render a typical full screen mimic (or typical full screen arrangement of
mimics).
This typical size is calculated when creating the project, based on your C-CURE Building Management
System workspace size. However, it may become inaccurate once you have set up your final mimic
layout, reviewed the workspace size...
If this size is inaccurate, WebVue users face a degraded experience, being displayed useless scroll

- 804 -
bars, or not being able to visualize parts of their mimics (grey or inaccessible stripes on the right-
hand side or bottom side for example).
You can adjust the width and height used as inputs to calculate WebVue rendering scales and ratios
by manually changing the file Properties.xml located in the \Web folder of your project. The closer
these values are to the overall size of your mimic layout in the C-CURE Building Management System
desktop application, the better will be the fitting of WebVue rendering in the web browser.

Example:
<?xml version="1.0"?>
<!---->
<properties>
<workspace width="1920" height="984"/>
</properties>
You must restart the web back end station for the changes to take effect.

- 805 -
How to Add a Geolocation Back End
1. Select the Web & Mobile Back Ends node in the Application Explorer and select Add a geolocation back
end from the task list. The Geolocation back end creation dialog opens. Show picture

2. Enter the name for the back end in the Name text box. You can accept the suggested default or enter
one of your own.
3. Enter the optional Description.
4. Click Apply to confirm the configuration.

Advanced properties
Advanced properties are configured in the Advanced tab. Show picture

l Connection
l Override default channel port - Allow customization of the default TCP port (8811).
l Networking
l Servers - Select the server list, which determines on which server(s) station(s) the geolocation
back end will be active. If no list is selected it will be activated on all stations.

The SV Mobile Services Host service runs as a child process of the main C-CURE Building Man-
agement System executable, SV Core Application. It is launched on all stations from the selected list
of servers.
You must restart C-CURE Building Management System for configuration changes to take effect.

- 806 -
How to Add an Instant Messaging Back End
1. Select the Web & Mobile Back Ends node in the Application Explorer and select Add an instant mes-
saging back end from the task list. The Instant messaging back end creation dialog opens. Show pic-
ture

2. Enter the name for the back end in the Name text box. You can accept the suggested default or enter
one of your own.
3. Enter the optional Description.
3. Configure the server endpoint. This informs C-CURE Building Management System where to reach the
Instant Messaging server and can be one of the following.
a. Station - The C-CURE Building Management System Station name and Node in the case of a
multi-station project.
b. IP address - The IP Address of the computer on which the C-CURE Building Management System
station hosting the Instant Messaging server is located. If more than one IP address is available
on that computer, the IP address you enter must be the one by which other stations will be able
to reach it.
c. Hostname - The hostname of the computer on which the C-CURE Building Management System
station hosting the Instant Messaging server, and by which it can be reached over the network.
3. Configure the TCP port number or use the suggested default (8810).
4. Click Apply to confirm the configuration.

A single instance of the Instant Messaging server must run in a multistation system. It is started under any
of the following conditions.

l The Station name matches the local station name.


l The IP address matches a local IP address, even if this address is not used as part of the multistation
configuration.
l The IP address is 127.0.0.1.
l The Hostname matches that of the local computer, even if the hostname is not used as part of the
multistation configuration.
l The Hostname is localhost.

The use of the IP address 127.0.0.1 or the hostname 'localhost' is only provided as a convenience for
testing in a setup with a single computer. Such a configuration is ineffective in a multistation system
and should not be used as-is in production.

The SV Instant Messaging Host runs as a child process of the main C-CURE Building Management Sys-
tem executable, SV Core Application. It is launched on the computer matching the Server endpoint
configuration that you have defined here.
You must restart C-CURE Building Management System for configuration changes to take effect.

- 807 -
IEC 60870-5-104 Server

- 808 -
Overview of Using C-CURE Building Management System as an IEC 60870-5-104
Server
IEC 60870-5-104 is a communication standard for telecontrol particularly for the power generation and dis-
tribution market. It is a master slave protocol operating over TCP/IP. In the case of the IEC 60870-5-104
Server, C-CURE Building Management System is a slave supporting both polling and unsolicited data
exchange. In general, the client only uses polling at startup to collect the initial data values. Subsequent val-
ues are collected only when they are sent by the server using unsolicited messaging (also known as spon-
taneous messaging in the IEC 60870-5-104 standard).

l The IEC 60870-5-104 Server configuration comprises Outstations, Sectors and Information Objects
(IO).
l The Outstation item identifies and defines one and only one IEC 104 interface exposed by C-CURE
Building Management System in a Networking architecture. Each outstation is identified on the net-
work by its Server list. Only those station(s) in the list expose a configured outstation. Those stations
also have to have a corresponding Network Interface defined.
l A sector is typically a piece of control equipment with one or more information objects - for example a
circuit breaker. In C-CURE Building Management System, the sector is only used as a logical data
organization.
l Information Objects represent the physical inputs and outputs. The types of information object that
are available is strictly controlled by the IEC 60870-5-104 standard. Each type has a corresponding
ASDU (Application Service Data Unit) which defines the structure, type and format of messages. In C-
CURE Building Management System, each information object is mapped to a variable providing the
real-time value, timestamp and quality. Information objects are often referred to as data points.
l The IEC 104 Server exposes I/O and internal variables (scope Shared and Local station).

C-CURE Building Management System IEC 60870-5-104 Server configuration is accessed from the Applic-
ation Explorer - <Project>.Communication.Servers.IEC 60870-5-104.

- 809 -
Managing the IEC 60870-5-104 Server in the Application Explorer

Tasks applicable to the IEC 60870-5-104 server


When the IEC 60870-5-104 server node is selected.
Icon Task Description
Settings Display the IEC 60870-5-104 Server Settings dialog.
Add an outstation Display the Outstation Creation dialog.

When the Outstation node is selected.


Icon Task Description
Add a sector Display the Sector Creation dialog.
Remove Remove the outstation from the configuration.
Network interfaces Display the outstation's Network Interfaces dialog.
Properties Display the outstation's Properties dialog.

When a Sector is selected.


Icon Task Description
Remove Remove the sector from the configuration.
Properties Display the sector's Properties dialog.
Add point Display the Point Creation dialog.

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior, and in particular any restrictions, when using cut or
copy and paste on configuration objects in the IEC 60870-5-104 node.
IEC 60870-5-
Description
104 Server
The pasted outstation shall have a unique name. Sectors and points are duplicated
Outstation
with their original names.
The pasted sector shall have a unique name. Points are duplicated with their original
Sector
names.
Point The pasted point shall have a unique name.

- 810 -
IEC 60870-5-104 Server Settings
The IEC 60870-5-104 Server settings can be displayed by using the Settings task when the IEC 60870-5-104
Server node is selected in the Application Explorer's configuration tree .Show picture

l Client connections
l Max number of connections - The maximum number of concurrent connections the IEC 60870-5-
104 server will accept from clients. The default is five.
l Spontaneous event queue - The behavior of the queue in C-CURE Building Management System that is
used to buffer spontaneous (unsolicited) events before they are sent to a client.
l When the event queue if full
l Delete the oldest
l Keep the oldest and ignore new events
l Default values - The following setting are used by default. They can be overridden by the prop-
erties of specific sectors or information objects.
l Max number of spontaneous events queued - The default is 100.
l For a given point if the value changes
l Buffer all changes
l Keep only the last value change
l Timestamp format
l No timestamp
l 24 bit format
l 54 bit format
l Select Before Operate - Settings that affect the server behavior when receiving a select before oper-
ate command from a client.
l Select command timeout - The SBO command timeout. Default 5 seconds.
l IOA definition - Settings that affect the way in which the IO are addressed.
l Address format
l Unstructured
l Structured 3 bytes (MSB first)
l Starting addresses - The start address for each of the supported Information Object type.

- 811 -
Adding an outstation to the IEC 60870-5-104 Server

- 812 -
Adding an Outstation to the IEC 60870-5-104 Server
An Outstation item represents C-CURE Building Management System presence on the network as an IEC
60870-5-104 device. Outstation configuration is accessed from the Application Explorer using the Add an out-
station task when Servers.IEC 60870-5-104 is selected in the configuration tree.
After you have completed an outstation's configuration, you must then configure its Network Interface.
An outstation is identified on an IEC 60870-5-104 network by its IP address. Most of the time, a PC
has only one active IP address and therefore the IEC 60870-5-104 server must be configured in such
a way that only one outstation is active on a particular PC. In the case of a gateway, the PC will most
probably have more than one NIC, in which case you will need to carefully configure the Network
Interface to make sure the correct NIC is used by the outstation.

How to add an outstation

1. Select the IEC 60870-5-104 node in the Application Explorer and select Add an outstation from the task
list. The Outstation creation dialog opens. The following screenshot was taken with the default con-
figuration. Show picture

2. Enter the name of the outstation in the Name text box. This is the name by which the outstation will be
known in C-CURE Building Management System. You can accept the suggested default or enter one of
your own.
3. Enter a description of the outstation (optional).
4. Click Apply to confirm the configuration.

Configuring allowed clients


The Allowed Clients tab allows you to choose those clients to which C-CURE Building Management System
outstation will respond. Configuring the allowed clients is highly recommended for security purposes.

- 813 -
1. Select the Allowed Clients tab and select Accept only connections from these clients.
2. Add the list of clients.
a. Select the Add Client tool at the top of the list. The Authorized client dialog opens. Show picture

b. Enter the name for the client in the Name text box. You can accept the suggested default or
enter one of your own.
c. Enter a description (optional).
d. Identify the client using either its IP Address or its Host name. You can open a network browsing
dialog using the Ellipsis button adjacent to the Host name field.
e. Click OK to confirm the configuration.
f. Repeat steps a to f for any further clients.
3. Click Apply to confirm the configuration.

The Network browsing dialog can take several seconds to open during which time further access to
the Application Explorer is suspended.

Advanced options
If you are configuring a multi-station application, select the Advanced tab and select the Servers list. The
outstation will only be activated on those stations named in that list.

- 814 -
Configuring an IEC 60870-5-104 Outstation's Network Interface
The Network Interface configuration defines on which of a project's stations an outstation is started and
exposed on the network. You must configure a Network Interface for each configured outstation. The Net-
work Interface configuration is accessed from the Application Explorer, when an outstation node is selected
in the configuration tree, using the Network Interfaces task.
There are two methods by which an outstation's availability can be defined. With both methods, the out-
station IP address is that of the host PC.

l Specific IP address - Used when the project has a standalone configuration (no multi-station net-
working). The outstation is started and available when the IP address in its configuration matches that
of the host PC.
l IP address dependent on a server station's node name - Used when the project configuration includes
multi-station networking. The outstation is started and available when the Data Server and Node
Name in its configuration matches that of the host PC (as taken from C-CURE Building Management
System's Networking configuration).

How to configure a specific IP address

1. Open the Network Interfaces dialog.


2. Select the Add Network Interface tool. The Network Interface creation dialog opens. Show picture

3. Enter a Name for the connection or leave it at its default. Enter a name for the connection in the Name
text box. This is the name by which the connection will be known in C-CURE Building Management Sys-
tem. You can accept the suggested default or enter one of your own.
4. Enter a description of the connection (optional).
5. Leave Data Server set to (Local station) and enter the IP address of the host PC (By IP property). Note
that the By Node property is dimmed.
6. For the majority of projects the Port can be left at the default value of 2404. Only change it if you are
aware of a specific conflict or policy in your organization.
7. Click OK to close the Network Interface creation dialog.
8. Click OK to close the Network Interfaces dialog.

Configuring an IP address dependent on a server station's node name


The following configuration is dependent of the project's Networking configuration so this must be
completed first.

1. Open the Network Interfaces dialog.


2. Select the Add Network Interface tool. The Network Interface creation dialog opens.
3. Enter a Name for the connection or leave it at its default. Enter a name for the connection in the Name
text box. This is the name by which the connection will be known in C-CURE Building Management Sys-
tem. You can accept the suggested default or enter one of your own.
4. Enter a description of the connection (optional).

- 815 -
5. Using the Data server drop down list box select the data server, from the project's Networking con-
figuration, on which the outstation is to be started and available. Show picture

6. The By Node property is automatically completed with the first node name from the selected data
server. You only need to consider changing this if the server has multiple NICs, in which case it will
have more than one node. Note that the By IP property is dimmed.
7. Click OK to close the Network Interface creation dialog.
8. Repeat steps 2 to 7 for any further servers on which the outstation is to be started and available.
9. When finished click OK to close the Network Interfaces dialog.

Configuring the Network Interface for a redundant association of real-time data servers
There is no specific configuration for redundant servers, however, you could consider the following scenario.
A multi-station project with comprises a redundant association of two real-time data servers, DataServer1
and DataServer2, and a real-time client DataClient1. A single outstation is configured with its Network inter-
face configured so the Network Access is via DataClient1. The outstation is started and available using the IP
address of DataClient1. It is not available on either DataServer1 or DataServer2.
A third-party IEC 60870-5-104 client is configured so it communicates with the outstation of DataClient1.
Real-time data will automatically come from either ServerA or ServerB depending on which is active within
the association.

Advanced properties
The Network Interface configuration dialog, Advanced tab, contains network and IEC 104 related outstation
properties. The properties are pre-set to recommended defaults and in most cases will not need to be
changed. Show picture

For information about any changes required from the default, see the documentation provided by the client
manufacturer or the IEC 60870-5-104 standard.

- 816 -
Adding a sector to an IEC 60870-5-104 outstation

- 817 -
Adding a Sector to an IEC 60870-5-104 Outstation
The sector item is used for the logical grouping of data points and, if required, to change the behavior of its
sub-ordinate data points from the default. Sector configuration is accessed from the Application Explorer
using the Add a sector task when an IEC 60870-5-104 outstation is selected in the configuration tree.

How to add a sector to an outstation.

1. Select a previously configured IEC 60870-5-104 outstation in the Application Explorer and select Add a
sector from the task list. The Sector creation dialog opens. The following screenshot was taken with
the default configuration. Show picture

2. Enter the name of the sector in the Name text box. This is the name by which the sector will be known
in C-CURE Building Management System. You can accept the suggested default or enter one of your
own.
3. Enter a description of the sector (optional).
4. Enter the common address of ASDU. This is the identifier of the sector within the outstation and must
be unique. You can accept the suggested default or enter one of your own.
5. Click OK to confirm the configuration and close the dialog.

Advanced options
The following properties are available in the Sector configuration dialog, Advanced tab. The following screen-
shot was taken with the default settings. Show picture

l Enable period transmission


l Background - Enable and configure the background transmission of all data points attached to
the sector. The period is in milliseconds.

- 818 -
l Cyclic - Enable and configure the cyclic transmission of all data points attached to the sector.
The period is in milliseconds.
l Override defaults for - Override the defaults, as set in the IEC 60870-5-104 Server Settings dialog, for
the behavior of the spontaneous event queues and timestamping of the various data point types in the
sector.

- 819 -
Adding Data Points to an IEC 60870-5-104 Sector
In a conventional IEC 60870-5-104 device, a sector's data points represent the physical inputs and outputs.
In C-CURE Building Management System IEC 60870-5-104 server, a sector's data points represents vari-
ables from the variable tree. Each data point represents a single variable.
Data points are created and linked to variables using the Point Creation dialog. The dialog can be opened
either from the IEC 60870-5-104 Server configuration tree Show picture, or directly from the variable's
tree. Show picture

How to add a data point to an IEC 60870-5-104 outstation sector

1. Select a previously configured IEC 60870-5-104 outstation sector and click the Data Point Creation
tool. The Point Creation dialog opens.
2. In the Read group.
a. Select the Object Type. A list of the supported object types is shown below.
b. The Information Object Address is automatically generated using the sector's default settings.
You can either accept it or enter one of your own.
3. Enter the variable name. The ellipsis button adjacent to the Variable field opens the Variable Selector
dialog. The variable type that you can use is dependent on the Object Type.
4. If the variable has the Command property set in its configuration, the Write group is displayed. The
configuration here allows the client to force the value of the variable.
a. Select the Mode. You can choose from None, Direct Execute or Select Before Operate. None
means that IEC 104 clients will not be able to force the value. Show picture

- 820 -
b. The Information Object Address is automatically generated using the sector's default settings.
You can either accept it or enter one of your own.
5. Click OK to confirm the configuration and close the dialog.

To open the Point Creation dialog directly from a variable, navigate to the variables tree, select the
variable, and then select Publish as IEC 104 point in the variable behavior (lower right pane).

Advanced properties
The properties in Advanced tab of the Data Point dialog all affect the way in which C-CURE Building Man-
agement System will transmit variable's value. The following screenshot shows the default properties. Show
picture

l Refresh modes
l Enable spontaneous transmission - The variable value is transmitted spontaneously (unsolicited)
each time the value changes.
l Groups
l Global - The variable value is transmitted whenever a global request is received.
l Group 1 to 16 - The variable value is transmitted whenever a request for the particular
group (1 to 16) is received.

Supported IEC 60870-5-104 object type


The behavior of each data point is defined by an object type strictly controlled by the IEC 60870-5-104 stand-
ard. The following are supported by C-CURE Building Management System IEC 60870-5-104 server.
IEC 60870-5-104 object type Variable type
Single point Bit
Double point Bit or Register
Step position Register
Measured value, normalized Register
Measured value, scaled Register
Measured value, short gloating point Register
Integrated total Register

- 821 -
IEC 60870-5-104 Outstation PICS (Protocol Implementation Conformance State-
ment)
1 Introduction
This document describes the specific implementation of the IEC 60870-5-104 outstation driver in C-CURE
Building Management System.
It is based on the IEC 60870-5-104 edition 2 standard document, starting on page 93.
Selected parameters are marked as follows:

Function or ASDU is not used

X Function or ASDU is used as standardized (default)

R Function or ASDU is used in reverse mode

B Function or ASDU is used in standard and reverse mode

The possible selection (blank, X, R, or B) is specified for each specific clause or parameter.
A black check box indicates that the option cannot be selected in this standard.

2 System or device
(system-specific parameter, indicate the station’s function by marking one of the following with ‘X’)

System definition

Controlling station definition (Master)

X Controlled station definition (Slave)

3 Network configuration
(network-specific parameter, all configurations that are used are to be marked ‘X’)

Point-to-point Multipoint

Multiple point-to-point Multipoint-star

4 Physical layer
(network-specific parameter, all interfaces and data rates that are used are to be marked ‘X’)
Transmission speed (control direction)

Unbalanced interchange Unbalanced interchange


Balanced interchange
Circuit V.24/V.28 Circuit V.24/V.28
Circuit X.24/X.27
Standard Recommended if >1 200bit/s
100 bit/s 2 400 bit/s 2 400 bit/s 56 000 bit/s

200 bit/s 4 800 bit/s 4 800 bit/s 64 000 bit/s

- 822 -
300 bit/s 9 600 bit/s 9 600 bit/s

600 bit/s 19 200 bit/s

1 200 bit/s 38 400 bit/s

Transmission speed (monitor direction)

Unbalanced interchange Unbalanced interchange


Balanced interchange
Circuit V.24/V.28 Circuit V.24/V.28
Circuit X.24/X.27
Standard Recommended if >1 200bit/s
100 bit/s 2 400 bit/s 2 400 bit/s 56 000 bit/s

200 bit/s 4 800 bit/s 4 800 bit/s 64 000 bit/s

300 bit/s 9 600 bit/s 9 600 bit/s

600 bit/s 19 200 bit/s

1 200 bit/s 38 400 bit/s

5 Link layer
(network-specific parameter, all options that are used are to be marked ‘X’. Specify the maximum frame
length. If a non-standard assignment of class 2 messages is implemented for unbalanced transmission, indic-
ate the Type ID and COT of all messages assigned to class 2.)
Frame format FT 1.2, single character 1 and the fixed time out interval are used exclusively in this com-
panion standard.

Link transmission Address field of the link

Balanced transmission not present (balanced transmission only)

Unbalanced transmission One octet

Frame length Two octets

Structured
Maximum length L
(number of octets)
Unstructured

When using an unbalanced link layer, the following ASDU types are returned in class 2 messages (low pri-
ority) with the indicated causes of transmission:

The standard assignment of ASDUs to class 2 messages is used as follows:

- 823 -
Type identification Cause of transmission
9, 11, 13, 21 <1>

A special assignment of ASDUs to class 2 messages is used as follows:

Type identification Cause of transmission

Note: (In response to a class 2 poll, a controlled station may respond with class 1 data when there is no
class 2 data available).

6 Application layer
Transmission mode for application data
Mode 1 (Least significant octet first), as defined in clause 4.10 of IEC 60870-5-4, is used exclusively in this
companion standard.
Common address of ASDU
(system-specific parameter, all configurations that are used are to be marked ‘X’)

One octet X Two octets

Information object address


(system-specific parameter, all configurations that are used are to be marked ‘X’)

One octet X Structured

Two octets X Unstructured

X Three octets

Cause of transmission
(system-specific parameter, all configurations that are used are to be marked ‘X’)

Two octets (with originator


One octet X
address) Originator address is
set to zero if not used

Length of APDU
(system-specific parameter, specify the maximum length of the APDU per system)
The maximum length of APDU for both directions is 253. It is a fixed system parameter.

Maximum length of APDU per system in control direction

Maximum length of APDU per system in monitor direction

- 824 -
Selection of standard ASDUs
Process information in monitor direction
(station-specific parameter, mark each Type ID ‘X’ if it is only used in the standard direction, ‘R’ if only used
in the reverse direction, and ‘B’ if used in both directions)

X <1>:=Single-point information M_SP_NA_1

X <2>:=Single-point information with time tag M_SP_TA_1

X <3>:=Double-point information M_DP_NA_1

X <4>:=Double-point information with time tag M_DP_TA_1

X <5>:=Step position information M_ST_NA_1

X <6>:=Step position information with time tag M_ST_TA_1

<7>:=Bitstring of 32 bit M_BO_NA_1

<8>:=Bitstring of 32 bit with time tag M_BO_TA_1

X <9>:=Measured value, normalized value M_ME_NA_1

X <10>:=Measured value, normalized value with time tag M_ME_TA_1

X <11>:=Measured value, scaled value M_ME_NB_1

X <12>:=Measured value, scaled value with time tag M_ME_TB_1

X <13>:=Measured value, short floating point value M_ME_NC_1

X <14>:=Measured value, short floating point value with time tag M_ME_TC_1

X <15>:=Integrated totals M_IT_NA_1

X <16>:=Integrated totals with time tag M_IT_TA_1

<17>:=Event of protection equipment with time tag M_EP_TA_1

<18>:=Packed start events of protection equipment with time tag M_EP_TB_1

<19>:=Packed output circuit information of protection equipment with time tag M_EP_TC_1

- 825 -
<20>:=Packed single-point information with status change detection M_SP_NA_1

X <21>:=Measured value, normalized value without quality descriptor M_ME_ND_1

X <30>:=Single-point information with time tag CP56Time2a M_SP_TB_1

X <31>:=Double-point information with time tag CP56Time2a M_DP_TB_1

X <32>:=Step position information with time tag CP56Time2a M_ST_TB_1

<33>:=Bitstring of 32 bit with time tag CP56Time2a M_BO_TB_1

X <34>:=Measured value, normalized value with time tag CP56Time2a M_ME_TD_1

X <35>:=Measured value, scaled value with time tag CP56Time2a M_ME_TE_1

X <36>:=Measured value, short floating point value with time tag CP56Time2a M_ME_TF_1

X <37>:=Integrated totals with time tag CP56Time2a M_IT_TB_1

<38>:=Event of protection equipment with time tag CP56Time2a M_EP_TD_1

<39>:=Packed start events of protection equipment with time tag CP56Time2a M_EP_TE_1

<40>:=Packed output circuit information of protection equipment with time tag CP56Time2a
M_EP_TF_1

Process information in control direction


(station-specific parameter, mark each Type ID ‘X’ if it is only used in the standard direction, ‘R’ if only used
in the reverse direction, and ‘B’ if used in both directions)

X <45>:=Single command C_SC_NA_1

X <46>:=Double command C_DC_NA_1

X <47>:=Regulating step command C_RC_NA_1

X <48>:=Set point command, normalized value C_SE_NA_1

X <49>:=Set point command, scaled value C_SE_NB_1

X <50>:=Set point command, short floating point value C_SE_NC_1

- 826 -
<51>:=Bitstring of 32 bit C_BO_NA_1

X <58>:=Single command with time tag CP56Time 2a C_SC_TA_1

X <59>:=Double command with time tag CP56Time 2a C_DC_TA_1

X <60>:=Regulating step command with time tag CP56Time 2a C_RC_TA_1

<61>:=Set point command, normalized value with time tag CP56Time 2a C_SE_TA_
X
1

X <62>:=Set point command, scaled value with time tag CP56Time 2a C_SE_TB_1

<63>:=Set point command, short floating point value with time tag CP56Time 2a C_
X
SE_TC_1

<64>:=Bitstring of 32 bit with time tag CP56Time 2a C_BO_TA_1

Either the ASDUs of the set <45> – <51> or of the set <58> – <64> are used.
System information in monitor direction
(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <70>:=End of initialization M_EI_NA_1

System information in control direction


(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

X <100>:=Interrogation command C_IC_NA_1

<101>:=Counter interrogation command C_CI_NA_1

<102>:=Read command C_RD_NA_1

<103>:=Clock synchronization command (option see 7.6) C_CS_NA_1

<104>:=Test command C_TS_NA_1

<105>:=Reset process command C_RP_NA_1

<106>:=Delay acquisition command C_CD_NA_1

- 827 -
<107>:=Test command with time tag CP56time2a C_TS_TA_1

Parameter in control direction


(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

<110>:=Parameter of measured value, normalized value P_ME_NA_1

<111>:=Parameter of measured value, scaled value P_ME_NB_1

<112>:=Parameter of measured value, short floating point value P_ME_NC_1

<113>:=Parameter activation P_AC_NA_1

File Transfer
(station-specific parameter, mark with an “X” if it is only used in the standard direction, “R” if only used in
the reverse direction, and “B” if used in both directions)

<120>:=File ready F_FR_NA_1

<121>:=Section ready F_SR_NA_1

<123>:=Last section, last segment F_LS_NA_1

<122>:=Call directory, select file, call file, call section F_SC_NA_1

<124>:=Ack file, ack section F_AF_NA_1

<125>:=Segment F_SG_NA_1

<126>:=Directory {blank or X, only available in monitor (standard) direction} F_


DR_TA_1

<127>:=Query Log – Request archive file F_SC_NB_1

Type identifier and cause of transmission assignments


(station-specific parameters)
Shaded boxes are not required.
Black boxes are not permitted in this companion standard
Blank: functions or ASDU not used.
Mark Type Identification/Cause of transmission combinations:
‘X’ if only used in the standard direction
‘R’ if only used in the reverse direction
‘B’ if used in both directions

Type
Cause of transmission
iden-

- 828 -
tific-
ation
re- re-
re-
tu- qu-
tu- un-
rn es-
rn kn-
inf- t
inf- ow- unk-
o inter- by
o n now-
acti- ca- rog- gr- unkn-
req- deac- ca- unkn- co- n
per- activ- vati- us- fil- ated ou- own
bac- ini- ues- deac- tiv- us- own m- info-
iod- spon- acti- ation on ed e by p caus-
kgro- tial- t or tiv- ation ed type mo- rma-
ic, tane- vati- con- ter- by tra- grou- <- e of
und ize- req- atio- con- by iden- n tion
cyc- ous on firm- min- a nsf- p n> tran-
scan d ues- n firm- a tific- ad- obje-
lic ation atio- re- er <nu- co- smis-
ted ation lo- ation dre- ct
n m- mbe- un- sion
ca- ss addr-
ot- r> ter
l of ess
e re-
c- AS-
c- qu-
m- DU
m- es-
d
d t
20 37
1 2 3 4 5 6 7 8 9 10 11 12 13 to to 44 45 46 47
36 41
M-
_
S-
<- P-
1- _ X X X X X X X
> N-
A-
_
1
M-
_
S-
<- P-
2- _ X X X X X X X
> T-
A-
_
1
M-
_
D-
<- P-
3- _ X X X X X X X
> N-
A-
_
1
M-
<- _
4- D- X X X X X X X
> P-

- 829 -
_
T-
A-
_
1
M-
_
S-
<- T-
5- _ X X X X X X X
> N-
A-
_
1
M-
_
S-
<- T-
6- _ X X X X X X X
> T-
A-
_
1
M-
_
B-
<- O-
7- _
> N-
A-
_
1
M-
_
B-
<- O-
8- _
> T-
A-
_
1
M-
_
M-
<- E-
9- _ X X X X X X X
> N-
A-
_
1

<- M-
1- _ X X X X X X X
0- M-

- 830 -
E-
_
T-
>
A-
_
1
M-
_
M-
<-
E-
1-
_ X X X X X X X
1-
N-
>
B-
_
1
M-
_
M-
<-
E-
1-
_ X X X X X X X
2-
T-
>
B-
_
1
M-
_
M-
<-
E-
1-
_ X X X X X X X
3-
N-
>
C-
_
1
M-
_
M-
<-
E-
1-
_ X X X X X X X
4-
T-
>
C-
_
1
M-
_
I-
<-
T-
1-
_ X X X X X X X
5-
N-
>
A-
_
1

<- M-
X X X X X X X
1- _

- 831 -
I-
T-
_
6-
T-
>
A-
_
1
M-
_
E-
<-
P-
1-
_
7-
T-
>
A-
_
1
M-
_
E-
<-
P-
1-
_
8-
T-
>
B-
_
1
M-
_
E-
<-
P-
1-
_
9-
T-
>
C-
_
1
M-
_
P-
<-
S-
2-
_
0-
N-
>
A-
_
1
M-
_
M-
<-
E-
2-
_ X X X X X
1-
N-
>
D-
_
1

<- M- X X X X

- 832 -
_
S-
P-
3-
_
0-
T-
>
B-
_
1
M-
_
D-
<-
P-
3-
_ X X X X
1-
T-
>
B-
_
1
M-
_
S-
<-
T-
3-
_ X X X X
2-
T-
>
B-
_
1
M-
_
B-
<-
O-
3-
_
3-
T-
>
B-
_
1
M-
_
M-
<-
E-
3-
_ X X
4-
T-
>
D-
_
1
M-
_
M-
<-
E-
3-
_ X X
5-
T-
>
E-
_
1

- 833 -
M-
_
M-
<-
E-
3-
_ X X
6-
T-
>
F-
_
1
M-
_
I-
<-
T-
3-
_ X
7-
T-
>
B-
_
1
M-
_
E-
<-
P-
3-
_
8-
T-
>
D-
_
1
M-
_
E-
<-
P-
3-
_
9-
T-
>
E-
_
1
M-
_
E-
<-
P-
4-
_
0-
T-
>
F-
_
1
C-
_
S-
<-
C-
4-
_ X X X X X X X X X
5-
N-
>
A-
_
1

- 834 -
C-
_
D-
<-
C-
4-
_ X X X X X X X X X
6-
N-
>
A-
_
1
C-
_
R-
<-
C-
4-
_ X X X X X X X X X
7-
N-
>
A-
_
1
C-
_
S-
<-
E-
4-
_ X X X X X X X X X
8-
N-
>
A-
_
1
C-
_
S-
<-
E-
4-
_ X X X X X X X X X
9-
N-
>
B-
_
1
C-
_
S-
<-
E-
5-
_ X X X X X X X X X
0-
N-
>
C-
_
1
C-
_
B-
<-
O-
5-
_
1-
N-
>
A-
_
1

- 835 -
C-
_
S-
<-
C-
5-
_ X X X X X X X X X
8-
T-
>
A-
_
1
C-
_
D-
<-
C-
5-
_ X X X X X X X X X
9-
T-
>
A-
_
1
C-
_
R-
<-
C-
6-
_ X X X X X X X X X
0-
T-
>
A-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
1-
T-
>
A-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
2-
T-
>
B-
_
1
C-
_
S-
<-
E-
6-
_ X X X X X X X X X
3-
T-
>
C-
_
1

- 836 -
C-
_
B-
<-
O-
6-
_
4-
T-
>
A-
_
1
M-
_
E-
<-
I_
7-
N- X
0-
A-
>
_
1-
*
C-
_
I-
<-
C-
10-
_ X X X X X X X X X
0-
N-
>
A-
_
1
C-
_
<- C-
10- I_
1- N-
> A-
_
1
C-
_
R-
<-
D-
10-
_
2-
N-
>
A-
_
1
C-
_
C-
<-
S-
10-
_
3-
N-
>
A-
_
1

- 837 -
C-
_
T-
<-
S-
10-
_
4-
N-
>
A-
_
1
C-
_
R-
<-
P-
10-
_
5-
N-
>
A-
_
1
C-
_
C-
<-
D-
10-
_
6-
N-
>
A-
_
1
C-
_
T-
<-
S-
10-
_
7-
T-
>
A-
_
1
P-
_
M-
<-
E-
11-
_
0-
N-
>
A-
_
1
P-
_
M-
<-
E-
11-
_
1-
N-
>
B-
_
1

- 838 -
P-
_
M-
<-
E-
11-
_
2-
N-
>
C-
_
1
P-
_
A-
<-
C-
11-
_
3-
N-
>
A-
_
1
F-
_
F-
<-
R-
12-
_
0-
N-
>
A-
_
1
F-
_
S-
<-
R-
12-
_
1-
N-
>
A-
_
1
F-
_
S-
<-
C-
12-
_
2-
N-
>
A-
_
1
F-
_
L-
<-
S-
12-
_
3-
N-
>
A-
_
1

- 839 -
F-
_
A-
<-
F-
12-
_
4-
N-
>
A-
_
1
F-
_
S-
<-
G-
12-
_
5-
N-
>
A-
_
1
F-
_
D-
<- R-
12- _
6- T-
> A-
_
1-
*
F-
_
S-
<- C-
12- _
7- N-
> B-
_
1-
*
* Blank or X only

7 Basic application functions


Station initialization
(station-specific parameter, mark ‘X’ if function is used)

X Remote

Cyclic data transmission


(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Cyclic data transmission

Read procedure

- 840 -
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Read procedure

Spontaneous transmission
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Spontaneous

Double transmission of information objects with cause of transmission spontaneous


(station-specific parameter, mark each information type ‘X’ where both a Type ID without time and cor-
responding Type ID with time are issued in response to a single spontaneous change of a monitored object)
The following type identifications may be transmitted in succession caused by a single status change of an
information object. The particular information object addresses for which double transmission is enabled
are defined in a project-specific list.

X Single-point information M_SP_NA_1, M_SP_TA_1, M_SP_TB_1 and M_PS_NA_1

X Double-point information M_DP_NA_1, M_DP_TA_1 and M_DP_TB_1

X Step position information M_ST_NA_1, M_ST_TA_1 and M_ST_TB_1

Bitstring of 32 bit M_BO_NA_1, M_BO_TA_1 and M_BO_TB_1 (if defined for a specific project)

X Measured value, normalized value M_ME_NA_1, M_ME_TA_1, M_ME_ND_1 and M_ME_TD_1

X Measured value, scaled value M_ME_NB_1, M_ME_TB_1 and M_ME_TE_1

X Measured value, short floating point number M_ME_NC_1, M_ME_TC_1 and M_ME_TF_1

Station interrogation
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X global

X group 1 X group 7 X group 13

X group 2 X group 8 X group 14

X group 3 X group 9 X group 15

X group 4 X group 10 X group 16

- 841 -
X group 5 X group 11

X group 6 X group 12

Information Object Addresses assigned to each group must be shown in a separate table.
Clock synchronization
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Clock synchronization

Day of week used

RES1, GEN (time tag substituted/ not substituted) used

SU-bit (summertime) used

Command transmission
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Direct command transmission

X Direct set point command transmission

X Select and execute command

X Select and execute set point command

X C_SE ACTTERM used

X No additional definition

Short pulse duration (duration determined by a system parameter in the outstation)

Long pulse duration (duration determined by a system parameter in the outstation)

X Persistent output

Supervision of maximum delay in command direction of commands and set point com-
X
mands

Maximum allowable delay of commands


Configurable
and set point commands

- 842 -
Transmission of integrated totals
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Mode A: Local freeze with spontaneous transmission

Mode B: Local freeze with counter interrogation

Mode C: Freeze by counter-interrogation commands

Mode D: Freeze by counter-interrogation command, frozen values reported spontaneously

Counter read

Counter freeze without reset

Counter freeze with reset

Counter reset

General request counter

Request counter group 1

Request counter group 2

Request counter group 3

Request counter group 4

Parameter loading
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Threshold value

Smoothing factor

Low limit for transmission of measured values

High limit for transmission of measured values

Parameter activation

- 843 -
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Act/deact of persistent cyclic or periodic transmission of the addressed object

Test procedure
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Test

File transfer
(station-specific parameter, mark ‘X’ if function is used)
File transfer in monitor direction

Transparent file

Transmission of disturbance data of protection equipment

Transmission of sequences of events

Transmission of sequences of recorded analog values

File transfer in control direction

Transparent file

Background scan
(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

X Background scan

Acquisition of transmission delay


(station-specific parameter, mark ‘X’ if function is only used in the standard direction, ‘R’ if only used in the
reverse direction, and ‘B’ if used in both directions)

Acquisition of transmission delay

Definition of time outs

Parameter Default value Remarks Selected value


t0 30s Time-out of connection establishment Configurable
t1 15s Time-out of send or test APDUs Configurable
t2 10s Time-out for acknowledges in case of no data messages t2 < t1 Configurable
t3 20s Time-out for sending test frames in case of a long idle state Configurable

Maximum range of values for all time outs: 1 to 255 s, accuracy 1 s

- 844 -
Maximum number of outstanding I format APDUs k and latest acknowledge APDUs (w)

Default Selected
Parameter Remarks
value value
Maximum difference receive sequence number to send state vari-
k 12 APDUs Configurable
able
w 8 APDUs Latest acknowledge after receiving w I-format APDUs Configurable

Maximum range of values k: 1 to 32767 (215-1) APDUs, accuracy 1 APDU


Maximum range of values w: 1 to 32767 APDUs, accuracy 1 APDU (Recommendation: w should not exceed
two-thirds of k).
Port number

Parameter Value Remarks


Port number 2404 Configurable

Redundant connections

Configurable Number N of redundancy group connections used

RFC 2200 suite


RFC 2200 is an official Internet Standard which describes the state of standardization of protocols used in
the Internet as determined by the Internet Architecture Board (IAB). It offers a broad spectrum of actual
standards used in the Internet. The suitable selection of documents from RFC 2200 defined in this standard
for given projects has to be chosen by the user of this standard.

X Ethernet 802.3

Serial X.21 interface

Other selection from RFC 2200:

List of valid documents from RFC 2200


1. ……………………………………………..
2. ……………………………………………..
3. ……………………………………………..
4. ……………………………………………..
5. ……………………………………………..
6. etc.

- 845 -
OPC Server

- 846 -
OPC Server Overview

This help book concerns the use of C-CURE Building Management System as an OPC server.

As an OPC server, C-CURE Building Management System exposes the real-time value and other properties
of I/O and internal variables (scope Shared and Local station) to OPC clients. It is registered as a COM
server with the Id SV.OPCDAServer.1
The following picture shows the OPC Server connected to the Matrikon OPC Explorer. Show picture

OPC Server options


There are several configuration options that affect the operation of C-CURE Building Management System's
OPC server. See the topic OPC Server Settings.

Available properties of variables


In addition to the real-time value, C-CURE Building Management System exposes the following item prop-
erties for each of its variables. Those properties marked as R are read only, whilst those marked as R/W are
read and write.
Property Text Bit Alm Reg R/W Comment
AlarmLevel Yes
AlarmState Yes Binary weighted values - use in conjunction with a
mask
AlarmStateLabels Yes Binary weighted values - use in conjunction with a
mask
BinAttr Yes Yes Yes Yes R/W Binary attribute
CloseLabel Yes Yes R From the Associated Label
Description Yes Yes Yes Yes R
Domain Yes Yes Yes Yes R
ForceOffLabel Yes R From the Associated Label
ForceOnLabel Yes R From the Associated Label
Format Yes R
HiControlLimit Yes R Only if register has the Control property set
HiRange Yes R
HiRangeLimit Yes R Only if register has scaling enabled
HiValueLimit Yes R
InvalidLabel Yes Yes Yes Yes R Only if register has the Control property set
LOControlLimit Yes R
LoRange Yes R
LoRangeLimit Yes R Only if register has scaling enabled
LoValueLimit Yes R

- 847 -
Property Text Bit Alm Reg R/W Comment
Nature Yes Yes Yes Yes R
OpenLabel Yes Yes R From the Associated Label
SecurityLevel Yes Yes Yes Yes R
Simulated Yes Yes Yes Yes R/W
TextAttr03 - 16 Yes Yes Yes Yes R/W Text attributes 3 to 16
ThresholdHiValue Yes R/W *
ThresholdHiHiValue Yes R/W *
ThresholdHiHiHiValue Yes R/W *
ThresholdHiHiHiHiValue Yes R/W *
ThresholdLoValue Yes R/W *
ThresholdLoLoValue Yes R/W *
ThresholdLoLoLoValue Yes R/W *
ThresholdLoLoLoLoValue Yes R/W *
Units Yes R

* Register threshold levels. The properties that are available for each variable will depend on the con-
figuration of its threshold system.
Permission to write the value of item properties is dependent on other configuration settings. See
the Settings topic in the Variables help book.

Changing the OPC server permissions


If you are using C-CURE Building Management System as a remote OPC server, you must change its per-
missions as you would with any other OPC server (Component Services\Computers\My Computer\DCOM Con-
fig). It appears in the DCOM configuration as SV Application. Show picture

For further details, see the Help book on Configuring Windows when Using a Remote OPC Server.

- 848 -
OPC Server Settings
The OPC server settings are displayed from the Settings task when OPC folder is selected in the Application
Explorer's configuration tree. Show picture

l Address space browsing.


l Display properties - Enables display of a variable's properties (Description, Domain, Nature
etc.) in the address space (in addition to the variables themselves).
l Security
l Disable the server - Disables C-CURE Building Management System's OPC server.
l Use authentication - Enable OPC authentication in C-CURE Building Management System's OPC
server. OPC authentication allows an OPC client to log-on to a server using a name and pass-
word. See the topic Using the Authentication Option for more information.
l Turn off security - Turns off OPC authentication in C-CURE Building Management System's OPC
server. OPC clients do not need to log-on.
l Writes are allowed - Allows an OPC client to write values in C-CURE Building Management
System's OPC server.
l Browsing is allowed - Allows an OPC client to browse C-CURE Building Management Sys-
tem's address space.
l Log user actions - When using authentication, commands from the OPC client can be logged as if they
were commands from a user logged onto C-CURE Building Management System.
l Writes - Log all write requests to C-CURE Building Management System from an OPC client.
l Logon/logoff - Log the action of an OPC client logging on or off.
l Interoperability issues
l Process callback failed results - Sets the action to be taken when the OPC server notifies an OPC
client that a function call has failed.
If un-ticked, the result code is treated as a communication failure and the OPC connection is
reset. The client then has to terminate the current connection and make a new one.
If ticked, the result code is ignored and the communication continues with the current con-
nection.
l Purge pending OnDataChange - If ticked, the OPC Server will purge data buffers if the sub-
scribed OPC client failed to consume the data.

- 849 -
Using the Use Authentication Option
When using OPC authentication, the OPC client logs on to the OPC server using an account (username and
password). Using this mechanism provides additional security and also an opportunity to modify the
server's behavior depending on which account is used to log on. The implementation is based on the OPC-
Security specification.

How to configure C-CURE Building Management System to use authentication

1. Enable OPC authentication by selecting the option Use authentication in the OPC Server Settings dia-
log.
2. Configure one or more accounts to be used for authentication using the normal User Accounts con-
figuration. The only properties that are significant are the Name and Password of the User account and
the 30 levels in the Profile's Browsing tab.
3. Select a browsing level that fit for each variable using the Advanced dialog in the variable's con-
figuration.

A browsing level can also be assigned to a variable's extended attributes and the simulation prop-
erty. The browsing level assigned to a particular extended attribute is global - that is it affects that
attribute for all variables.

What effect does authentication have?

l Only variables with a browsing level corresponding to those selected in the account used to log on are
visible to the OPC client.
l When the OPC client attempts to write the value of a variable, the command rights of the account used
to log on are checked against the command level of the variable. If the account has insufficient rights,
the write will fail.
l The OPC client's actions, logon & logoff and writes to variables can be logged in the same way as if
they were commands from a user logged onto C-CURE Building Management System.

If authentication is enabled and the OPC client does not log on, the browsing and command levels
are those configured in the default profile DEFPROFILE.

- 850 -
Using the AlarmState and AlarmStateLabels Properties
This topic describes how to use the AlarmState and AlarmStateLabel OPC item properties when using C-
CURE Building Management System as an OPC server.

AlarmState property
This property is a combination of all the alarm states generated using binary weighting. To extract the value
of a particular state you must AND the value with a mask.
Hexadecimal
Alarm state Comment
value
Label number 0x000000FF Index in the array of AlarmStateLabels (See below)
Enable 0x00000100 Alarm enabled or not (100 enabled, 0 disabled)
Active 0x00000200 Alarm active or not (200 on, 0 off)
Acknowledge 0x00000400 Alarm acknowledged or not (400 Ack, 0 NoAck)
Masked 01 0x00010000 Alarm masked by program (level 1)
Masked 02 0x00020000 Alarm masked by program (level 2)
Masked 03 0x00040000 Alarm masked by program (level 3)
Masked 04 0x00080000 Alarm masked by program (level 4)
Masked 05 0x00100000 Alarm masked by operator
Masked 06 0x00200000 Alarm masked by variable
Masked 07 0x00400000 Reserved
Masked 08 0x00800000 Alarm masked by expression
Masked 09 0x01000000 Reserved
Masked 10 0x02000000 Reserved
Masked 11 0x04000000 Reserved
Masked 12 0x08000000 Reserved
Masked 13 0x10000000 Reserved
Masked 14 0x20000000 Reserved
Masked 15 0x40000000 Reserved

AlarmStateLabels property
The value of AlarmStateLabels is an array that contains the labels associated with an alarm state.
This is an example of what you may find in this array. The order of the labels is not guaranteed.
0 Alarm off
1 Alarm on - not ack
2 Alarm on - ack
3 Alarm off - not ack
4 Alarm off - ack
5 Alarm program masked 01
6 Alarm program masked 02
7 Alarm program masked 03
8 Alarm program masked 04
9 Alarm operator masked
10 Alarm variable masked
11 Alarm expression masked
The recommended method to get the correct label is as follows.

1. Enable the alarm (AlarmState AND 0x100 == 0x100)


2. Mask the alarm using 0xFF. The result is an index into this array.

- 851 -
Mobile Server

- 852 -
Mobile Server Overview
The topics in this Help book explain how to configure C-CURE Building Management System Mobile Server.
For detailed information on how to configure and use TouchVue, see the main TouchVue help book.
For detailed information on how to deploy the Mobile Server and Mobile Apps, see the main Deployment help
book.

- 853 -
Mobile Server Settings - Alarms Tab
The Mobile Server advanced settings can be displayed from the Communication folder of the Application
Explorer's Main Settings dialog or by using the Settings task when the Mobile Server folder is selected in the
Application Explorer's configuration tree. The settings are divided into Alarms and Properties. This topic is
for Alarms. Show picture

The Alarms' properties are divided into two main categories.

l Alarm notification - Configuration of the filter for alarm notifications sent to mobile devices.
l Alarm list - Default configuration for the TouchVue Alarms List.

The properties are the same for both categories except that you can enable/disable Alarm Notifications and
configure the refresh rate.

Alarms tab properties

l Alarm notification - Configuration of the alarm notification.


l Enabled - Enable notification of eligible alarms to connected devices.
l Refresh period - The period at which notifications are send.
l Alarm priority - The minimum and maximum priority for alarms to be eligible for notification.
l Allow filtering - Allow the TouchVue user to change the alarm filter.
l Notification events - Selection of the alarm transitions eligible for notification.
l Alarm list - Configuration of the Alarms List. The configuration properties are identical to those for
Alarm Notification except that Enabled and Refresh are not available. It defines a default filter,
imposed by the server, and applied by mobile devices when accessing the Alarm view.

- 854 -
Mobile Server Settings - Properties Tab
The Mobile Server advanced settings can be displayed from the Communication folder of the Application
Explorer's Main Settings dialog or by using the Settings task when the Mobile Server folder is selected in the
Application Explorer's configuration tree. The settings are divided into Alarms and Properties. This topic is
for Properties. Show picture

Variable properties
The Properties tab configures which properties are displayed when a TouchVue user opens the details area
for a variable (bit, alarm, register or text), or for an individual logged event.
For a property to be displayed in the TouchVue Variable Details screen, the application designer must tick
the corresponding property in the Mobile Server Settings dialog.
The following properties can be selected for display in TouchVue.
Property Bit Alarm Register Text Log
Domain (Attribute 1) Yes Yes Yes Yes Yes
Nature (Attribute 2) Yes Yes Yes Yes Yes
Variable name Yes Yes Yes Yes Yes
Maximum value No No Yes No No
Minimum value No No Yes No No
Maximum control value No No Yes No No
Minimum control value No No Yes No No
Maximum variable name No No Yes No No
Minimum variable name No No Yes No No
Maximum control variable No No Yes No No
Minimum control variable No No Yes No No
Units No No Yes No No
Format No No Yes No No
Comment No No No No Yes
Alarm level No Yes No No No
Binary attribute Yes Yes Yes Yes Yes
Text attributes 2 - 16 Yes Yes Yes Yes Yes
Deferred attributes 3 - 16 Yes Yes Yes Yes Yes

Configuring a text attribute to have special meaning


You can configure the content of a variable's text attribute, or deferred text attribute, to have a special
meaning in the context of TouchVue. The following options are available.

- 855 -
Content Icon Attribute Action in TouchVue when touching the attribute value
No action - The attribute is used as a raw piece of text inform-
None
ation.
Email Email address Generate an email. Subject is the variable description. Con-
tents is the variable value.
Web address Web Url Open a Web Browser using the supplied Url.
Phone num-
Phone number Call the phone number
ber
SMS SMS (phone) number Send an SMS to the phone number
SMS number, phone
SMS/Phone Send an SMS to the SMS number and call the phone number
number

- 856 -
How to Add a Log List to the Mobile Server
To enable the viewing of logged data in TouchVue you must add one or more Log Lists to the Mobile Server.
The contents of the Log List (or a subset thereof) is then available to the TouchVue user.

How to add a Log List to the Mobile Server

1. Open the Application Explorer and select the Mobile Server.


a. Open the Application Explorer, in the configuration tree, expand the Communication node.
b. Select the Servers node, and in the right pane, select the Mobile server.
2. Select and configure the Log List
a. Display the available Log Lists by clicking the Log List tool in the toolbar of the lower pane. Show
picture

b. Select the appropriate Log List.


c. A dialog will open displaying the Log List's configuration. If required, you can select a sub-set of
the Log Lists' configuration.
d. Select or de-select as appropriate, the property Allow modification of filter on the client side.
Selection of this property allows the TouchVue user to change the Log filter at run-time when
using the TouchVue app.
e. Click OK to confirm the configuration and close the Log Filter dialog.
3. Repeat step 2 to add further Log Lists. The Log List in use at run-time can be selected by the user of
the TouchVue app.

- 857 -
Variables

- 858 -
Managing variables using the Application Explorer

- 859 -
Managing Variables Using the Application Explorer

The Variables folder includes the Variables Tree, Domain and Nature, Expressions and Alarm Synthesis.
Also associated with variables are Formulae, Recipes and Vartreat (specialist variable treatment). Although
these are not currently configurable via the Application Explorer, they are included in this help book for com-
pleteness.
When used to manage the Variables Tree, the appearance of the Application Explorer is modified to include a
third pane that is used to associate behaviors with variables. Behaviors include such functionality as Trend,
Thresholds, Events and Alarm Actions. Show picture

The Variables Tree was known as the Variables Database in previous versions of C-CURE Building
Management System. The name has been changed to avoid confusion with Relational Database Sys-
tems (also known as Databases) which are increasingly used in conjunction with C-CURE Building
Management System for recording historical data.

Tasks applicable to variables, Variables Tree, domain and nature, expressions and alarm syn-
thesis
When the Variables folder is selected.
Icon Task Description
Settings Display the general variables settings dialog.
When the Variables tree or a branch is selected
Icon Task Description
Add a branch Add a new branch to the Variables Tree.
Add a bit Add a new bit variable to the Variables Tree.
Add a register Add a new register variable to the Variables Tree.
Add a text Add a new text variable to the Variables Tree.
Add an HMI bit Add a new bit HMI variable to the Variables Tree.
Add an HMI register Add a new register HMI variable to the Variables Tree.
Add an HMI text Add a new text HMI variable to the Variables Tree.
Copy Copy the selected branch.

- 860 -
Cut Cut the selected branch.
Paste Paste a branch or variable. Only available after a cut or copy.
When a variable is selected.
Icon Task Description
Add a threshold Add threshold behavior to a register.
Add an alarm action Displays the alarm action tools.
Add an ack trace Add alarm acknowledgment trace using a bit.
Add a program
Add an action to run a program from an alarm in the alarm viewer.
action
Add a window action Add an action to open a window from an alarm in the alarm viewer.
Add masking Add alarm masking by a variable.
Add masking by
Add alarm masking by an expression template.
expression
Add an event action Display the event action tools.
Add a message
Add an event to trigger a message to a bit, register or text.
event
Add a program
Add an event to trigger a program to a bit, register or text.
event
Add a trend Add trending to a bit or register.
Add discrepancy Add discrepancy checking to a bit.
Add chrono Add chronometer behavior to a register.
Add counter Add counter behavior to a register.
Copy Copy the selected variable.
Cut Cut the selected variable.
When the Domain folder is selected.
Icon Task Description
Add a domain Add a domain.
When the Nature folder is selected.
Icon Task Description
Add a nature Add a nature.
When the Expressions folder is selected.
Icon Task Description
Add an expression
Add an expression as a template.
template
Add an expression
Add an expression to a variable.
on a variable
When the Alarm Synthesis folder is selected.
Icon Task Description
Add an alarm syn-
Add an alarm synthesis.
thesis

A note about the Removal and Properties tasks


The configuration objects created by the above tasks all have corresponding remove and properties tasks.
The icons corresponding to these tasks are similar to those used to add the object except that, for a remove
task the icon includes a red X, and for properties a magnifying glass.
For example the icons to add, remove, and display the properties of a nature are , and respectively.

- 861 -
Using Cut, Copy and Paste with Variables and Branches
The cut, copy and paste tasks can be used on a single variable or an entire branch of the variables tree.

l If used on a single variable then any behaviors attached to the variable are included in the operation.
l If used on a branch, all sub-branches, variables and behaviors are included in the operation.

The combination of copy and paste allows you to rapidly develop the variables tree, particularly if it has a
uniform structure.
The combination of cut and paste can be used to move or rename a variable or branch.
See the topic Using cut, copy and paste of variables with behaviors for important information about
pasting variables with behaviors.

Reminder about the difference between copy and cut?

l Copy makes a copy of the selected variable or branch. It can be pasted any number of times.
l Cut makes a copy of the selected variable or branch. It can only be pasted once. After the paste, the
variable or branch that was cut is deleted.

If you use cut and close the Application Explorer before using paste, the variable or branch that you
have cut is not deleted.

What happens when I cut or copy and paste a variable?


When you cut or copy a single variable, the entire variable name including the branch appears in paste task
in the task pane. Show picture

When you paste the variable, only the variable name is used - the branch is not included. A dialog will open
suggesting a name for the duplicated variable. Show picture

What happens when I cut or copy and paste a branch?

- 862 -
When you cut or copy a branch, only the branch name appears in paste task in the task pane. Show picture

When you paste the branch, a dialog will open suggesting a name for the branch. Show picture

The paste task can take several seconds to complete if you are pasting complex branch with many
sub-branches and variables.

- 863 -
Using Cut, Copy and Paste of Variables with Behaviors
When you copy and paste a variable with one or more behaviors, the behaviors are included in the paste and
a duplicate behavior is created for the duplicate variable.
Should the behavior be one that includes one or more variables in its configuration (threshold, chronometer,
etc.) then those variables will also be duplicated as long as they are only used in a behavior of one variable.
If several behaviors use the same variables in their configuration (for example a common reset variable for
several chronometers), then those variables common to the behaviors will not be duplicated.
The Application Explorer will determine the strategy to apply for a copy paste by analyzing both the name of
the variable and the names of the variables involved in the behavior. It will duplicate the behavior variables
as long as their names conform to the following rule.

l The full name (that is branch and leaf) of any variable included in a behavior that is to be copied and
pasted should contain the name of the leaf of the variable to which the behavior is attached.

This example of a register with chronometer behavior, that follows this rule, illustrates this.
Copy to new variable name Copy same variable name
Original variables under the same branch to new branch Branch02
Register Branch01.Register01 Branch01.Register02 Branch02.Register01
Trigger
Branch01.Register01.Trigger Branch01.Register02.Trigger Branch02.Register01.Trigger
bit
Init bit Branch01.Register01.Reset Branch01.Register02.Reset Branch02.Register01.Reset

Register Branch01.Register01 Branch01.Register02 Branch02.Register01


Trigger
Branch01.Register01_Trigger Branch01.Register02_Trigger Branch02.Register01_Trigger
bit
Init bit Branch01.Register01_Reset Branch01.Register02_Reset Branch02.Register01_Reset
If the names used for the included variables do not follow this rule, the variables included in the behavior of
the newly pasted variable will keep the original names.
Copy to new variable name Copy same variable name
Original variables under the same branch to new branch Branch02
Register Branch01.Register01 Branch01.Register02 Branch02.Register01
Trigger bit Branch01.Trigger Branch01.Trigger Branch01.Trigger
Init bit Branch01.Reset Branch01.Reset Branch01.Reset

Copy and paste of a register with threshold behavior


If you add a threshold behavior to a register, the names of the threshold variables that it automatically gen-
erates do not follow the above rule. The threshold variable name contains a modified copy of the register
name including the threshold type. The copy paste behavior is modified to accommodate this. The following
table illustrates this.
Copied variable name Pasted variable name
Register Branch01.Register01 Branch01.Register02
Hi hi threshold Branch01.Register01_HiHi Branch01.Register02_HiHi
High threshold Branch01.Register01_High Branch01.Register02_High
Low threshold Branch01.Register01_Low Branch01.Register02_Low
Lo lo threshold Branch01.Register01_LoLo Branch01.Register02_LoLo

If the Variables Tree contains threshold behavior using a non-standard naming scheme you should
avoid copy and paste of those particular variables as the paste will not work and may destroy the
link between the original variable and its thresholds.

- 864 -
Using Cut, Copy and Paste with Mapping
If you cut and paste, or copy and paste, any variable where the source is mapped to one of C-CURE Building
Management System data acquisition objects then the mapping is duplicated in the new variable. The map-
ping of more than one variable to the some data acquisition objects is not recommended therefore, after
using copy and paste, the mapping of either the original variable, or the duplicate, must be edited.
Data acquisition object Mapping of more than one variable permitted
OPC Yes
Equipment (Native drivers) Yes
IEC 60870-5 Yes
DNP3 Yes
IEC 61850 Yes
LonWorks Yes
BACnet Yes
SNMP Yes
DDE No

- 865 -
Important Note About Linking or Mapping a Variable to its Source
There are two methods to link (also known as mapping) a variable to the source of its value. It is important
to understand the difference.

From the Source tab of the variable's configuration dialog


The Source tab, in the configuration of each variable, allows you to link a variable to its source one variable
at a time. This is generally considered the more time consuming method to link variables. However, this
method gives you direct access to the advanced properties sometimes required when linking variables.
The help topics for this method are found in the Variables help book.

From the mapping dialog for each data acquisition object


Each data acquisition object (OPC, Equipment, DNP3 etc) has its own mapping dialog. The mapping dialogs
allow you to link many variables to their source at the same time and even allow you to create the variables
automatically. This is generally considered the quickest method to link variables. However, it does not give
you direct access to the advanced properties sometimes required when linking variables.
The help topics for this method are found in Data Acquisition help book.

- 866 -
Variables Settings
The variables settings can be displayed from the Variables entry in the Application Explorer's Main settings
dialog or from the Settings task when the Variables folder is selected in the Application Explorer's con-
figuration tree. Show picture

l Persistence
l Save period for variables - The period at which variables with the Saved property enabled are
persisted on hard disk. The default is 1 minute.
l Internal variables
l Internal variable initialization - Defines the default initial value for internal bit and alarm vari-
ables. Can be overridden on a per variable basis.
l Initial value for internal bits
l Invalid - Internal bits are by default set to invalid.
l To 0 - Internal bits are by default set to 0.
l To 1 - Internal bits by default all set to 1.

- 867 -
l Initial value for internal alarms
l Invalid - Alarms are by default set to invalid.
l Alarm off - Alarms are by default set to off.
l Alarm on - Alarms are by default set to on.
l Behavior
l No producer list assigned behavior - The following two options only affect variables that
have not been assigned to a producer list.
l Local association - The saved value behaves normally.
l User context - The saved (and restored) value is dependent on the User that is
logged on. See the book Deploying C-CURE Building Management System on a
Remote Desktop Session (RDS) Host for more information.
l Permanent scan
l Permanent scan for all variables – Causes C-CURE Building Management System to permanently
scan all communication frames linked to one or more variables. If this property is not selected
then the scanning can be disabled if none of the variables linked to it are displayed in a window.
l Invalidate variable if no scan for mimic – When a communication frame is not scanned because
none of the linked variables are displayed in a mimic, all the linked variables are set to invalid.
l Attributes and properties
l Extended attributes – Enable the extended attributes for all inventory variables.
l Binary attribute
l Behavior
l Static - The attribute value can only be changed using the variable configuration dia-
log.
l Dynamic - The attribute can be changed at run-time using the SCADA Basic instruc-
tion VARIABLE.
l Distributed - When used in a multi-station project, changes in the value of the attrib-
ute are propagated to all interested stations.
l Commandable - The value of an attribute can be changed by any of C-CURE Building Man-
agement System sub-systems that have access to it.
l Command level - The command level that the User must have in order to write the
attribute value.
l Browsing level -The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Persistent - The value of the attribute is saved when C-CURE Building Management Sys-
tem is shut down and restored when it is restarted. The variable itself must be configured
to be Saved for this setting to take effect.
l Text attribute 3 (to 16)
l Behavior
l Static - The attribute value can only be changed using the variable configuration dia-
log.
l Dynamic - The attribute can be changed at run-time using the SCADA Basic instruc-
tion VARIABLE.
l Distributed - When used in a multi-station project, changes in the value of the attrib-
ute are propagated to all interested stations.
l Commandable - The value of an attribute can be changed by any of C-CURE Building Man-
agement System sub-systems that have access to it.
l Command level - The command level that the User must have in order to write the
attribute value.
l Browsing level -The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Persistent - The value of the attribute is saved when C-CURE Building Management Sys-
tem is shut down and restored when it is restarted. The variable itself must be Saved for
this setting to take effect.
l Simulated property
l Behavior
l Distributed - When used in a multi-station project, changes in the value of the prop-
erty are propagated to all interested stations.

- 868 -
l Commandable - The value of the simulated property can be changed by any of C-CURE
Building Management System sub-systems that have access to it.
l Command level - The command level that the User must have in order to change
this property.
l Browsing level -The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Persistent - The value of the property is saved when C-CURE Building Management Sys-
tem is shut down and restored when it is restarted. The variable itself must be Saved for
this setting to take effect.
l Thresholds
l Behavior
l Trigger on strict going beyond of the threshold - The threshold bit is only set if the
register value exceeds that of the threshold. Else the threshold bit is set if the value
exceeds OR equals the threshold.
l Commandable - The value of a threshold can be changed by any of C-CURE Building Man-
agement System sub-systems that have access to it.
l Command level - The command level that the User must have in order to write the
threshold value.
l Browsing level - The browsing level that the User Account must have in order to see the
variable when using a browsing service of C-CURE Building Management System.
l Expressions
l Do not make expression result invalid when a member is invalid - Do not make expression res-
ult invalid when a member is invalid. The invalid member is assumed to be 0.
l Alarms
l Alarm acknowledge of both ON and OFF status change - If selected an alarm must be acknow-
ledged on the transition to both the on state and the off state. Show picture

l Enable the end of maintenance when alarm is On Ack - Allows an alarm to be taken out of main-
tenance even if it is on and acknowledged. By default, an alarm can only be taken out of main-
tenance when it is off.
l Enable alarm timestamp modification on its acknowledgement - Enable the timestamp of an
alarm to be modified to that of when it was acknowledged. By default, it is the time at which it
came on or went off.
l Domain/nature separator for alarm counter - The character used to separate domain and nature
in the name of a variable used as an alarm counter. By default, the separator is _ (underscore).
l Alarm priority
l Behavior
l Static - The property value can only be changed using the variable configuration dia-
log.
l Dynamic - The property can be changed at run-time using the SCADA Basic instruc-
tion ALARM.
l Distributed - When used in a multi-station project, changes in the value of the prop-
erty are propagated to all interested stations.
l Commandable
l Use alarm priority as command level - For alarms with the Command attribute set, use
the alarm level as the command level.

- 869 -
l Write
l Send write request even if the value to write is the same as the current value - If enabled, a
write request is made when the variable value is forced, even if the variable already has that
value.
l Status
l Display value even if out of range - Allows a register variable's value to be displayed even if its
quality is flagged as out of range (NS L< or NS L>). Applies to animations that display the
register value, the Trend Viewer when in real time mode, and the Trend Viewer in historical
mode if the historical data source is the HDS.

Settings named Browsing level define the browsing level that the User Account must have in order to
see the variable (items) when using a browsing service of C-CURE Building Management System.
See the topic Properties that affect access by 3rd party applications for further information about
interfaces for which this privilege is enforced.
See the topic Using the Authentication Option for further information about OPC Security.

- 870 -
The Variables Tree

- 871 -
Overview

- 872 -
About the Variables Tree
Before starting to build the Variables Tree, it is necessary to understand what it does and how it is struc-
tured.
To the User, the Variables Tree is seen as a number of discreet variables. Physically, it is a collection of data
structures, each one describing the behavior of a variable, together with real-time information including the
value and timestamp.
There are 4 main kinds of variables:

l Variables - Comprises variables mapped to I/O (data acquisition) and internal variables that can be
distributed across stations or isolated in user sessions (according to their scope). They are managed
by the Real Time Data module.
l HMI variables - Are variables dedicated to displaying simple information linked to user mimic nav-
igation or for handling user inputs in complex forms at runtime (requiring some form of memory per-
sistence). They are managed by the User Interface modules and cannot be linked to I/O nor
distributed across stations.
l Percent variables or Mimic variables - Legacy kind of temporary variables managed by the User Inter-
face modules. They cannot be pre-configured nor being used in SCADA Basic scripting. HMI variables
supersedes them.
l Temporary variables - Legacy kind of temporary variables managed by the Real Time data modules.
They cannot be pre-configured and require scripting for creation with the instruction TEMPORARY_DB.
HMI variables supersedes them.

The term "working variable" is used to designate variables declared with the keyword Dim in
SCADA Basic scripts. See the SCADA Basic book for more information.

Starting with version 12 and the introduction of HMI variables, temporary variables created with the
instruction TEMPORARY_DB are obsolete. The TEMPORARY_DB instruction is only kept for com-
patibility with existing projects and should not be used in new projects. When migrating a project,
we recommend you to replace the use of temporary variables by HMI variables. To make it easier,
you can create HMI variables by script using the instruction VARIABLE.
Variables are further classified by the format of the data they represent.

l Bit - Logical or two state data.


l Alarm - A sub-type of bit with additional properties. Not available for HMI variables.
l Register - All analogue data (byte, word, double word, float etc.)
l Text - String data.

The majority of the topics in this book concern I/O and internal variables. The much simpler HMI variables
and Temporary variables are covered by a single topic.
Prior to the availability of HMI variables, the only kind of variable in the variables tree was I/O and
internal variables. Because of this, in most topics including this one, I/O and internal variables are
referred to as just variables or variables tree variables.
I/O and internal variables are stored in a comma delimited ASCII file called Varexp.Dat, and HMI variables
in a comma delimited ASCII file called HMIVariables.Dat. Both are located in the project's "C" directory.
These files are generated automatically as part of the process of creating variables with the Application
Explorer, Application Architect or Smart Generator. The Variables Tree may also be imported and exported
in a form suitable for manipulation by a spreadsheet such as Excel. For speed of access, the Variables Tree
is loaded from disk into memory at start-up.
The Variables Tree can be thought of as the engine in your project. Without it, there would be no live data to
display in the mimics, record on disk or send to printers. The functionality it provides can be summarized as
follows.

l Receive and send real-time values to and from other sources. The source may be any one of the fol-
lowing.

- 873 -
l Internal (for example from an expression)
l One of the native communication drivers. Mainly used to communicate with PLC's and I/O mod-
ules. (Modbus etc.)
l OPC server - A third party supplied OPC server.
l LonWorks - A specialized communication network normally associated with building man-
agement systems.
l BACnet - A specialized communication network normally associated with building management
systems.
l IEC 60870-5 - A specialized communication network normally associated with power generation
and distribution.
l IEC 61850 - A specialized communication network normally associated with power generation
and distribution.
l DDE server - A third party supplied DDE server. The predecessor to OPC and included mainly for
backwards compatibility. Sometimes used for communication with MS Office products such as
Excel.
l SNMP - A specialized communication network normally associate with IT devices and infra-
structure.
l Sql queries - To take advantage of the built-in Sql bridge (Sql connections and Sql query hand-
ling).
l Convert raw data into meaningful values according to defined behavior.
l Generate values using expressions and formulae.
l Compare analogue values with alarm limits and generate alarms.
l Make discrepancy checks on digital values.
l Make the value of variables available for recording and later retrieval by C-CURE Building Man-
agement System or a third party product.

- 874 -
How the Variables Tree is Structured
The Variables Tree is designed so that variables are grouped together in a similar manner to the real world.
The groups are similar in concept to a Windows' folder. For example, four variables _INFO, ON, TEMP and
SETPOINT could be grouped together in a folder called AC_01.
The folders containing the variables are nested thereby generating the structure of the tree. The complete
folder structure that contains a variable is known as its branch. In practice, the term branch can be used to
refer to all or part of a branch structure. (Similar to a tree where a branch is made up of many smaller
branches.)

Simple example of Variables Tree structure


A building has two floors. Each floor has an air conditioner and a light. Each air conditioner has a running
indication (ON) a temperature indication (TEMP) and a temperature set-point (SETPOINT). The light has an
on indication (ON), a brightness control (LUM) and a control to turn it on and off CMD). The air conditioner
has an additional variable used as a container for management information (_INFO). The 14 variables that
are required would produce a Variables Tree as follows.

The same tree viewed in C-CURE Building Management System Application Explorer would look like this.
Show picture

Note the SYSTEM branch in the Application Explorer picture. This branch contains system variables.
See About System Variables for more information.

Referencing branches and variables


When referring to branches and variables in the following conventions are used.

l Branch - A full stop is used as a separator between the parts of a branch. In the above diagram, the
branch nearest the top is BUILDING.FLOOR_01.AC_01.

- 875 -
l Variable - There are two ways to reference a variable.
l You can use its complete name including the branch. In the above diagram, the variable nearest
the top is BUILDING.FLOOR_01.AC_01._INFO.
l You can use just the variable name, for example _INFO. In this case, the branch that uniquely
identifies the variable must be supplied by some other part of the configuration. This method is
used throughout C-CURE Building Management System when creating and using re-usable con-
figuration elements. (For example graphic symbols).

- 876 -
Rules for Branch and Variable Naming
The following rules must be followed when creating branches and variables.

l A variable name, including its branch, can have between 1 and 255 characters.
l A full branch, including any full stops used to separate sub-branches, can have between 1 and 253
characters.
l A branch can have between 1 and 11 sub-branches.
l A branch must contain at least one variable. (Any branch that you configure that does not include at
least one variable will not be saved.)
l The characters that may be used are limited to alphanumeric plus the underscore.
l Variable names may contain upper and lower case characters but they are not case sensitive.
(BUILDING.FLOOR_01.AC_01._INFO is the same as Building.Floor_01.AC_01._Info)
l The names of variables to be used in SCADA Basic must not start with a number.

If you disable syntax checking, variable names can include any printable character. However, this is
not recommended as it may result in impaired functionality and is normally only used for com-
patibility with projects developed with older versions of C-CURE Building Management System.

- 877 -
Using the Variables Tree with Graphic Symbols
A symbol is a collection of drawing elements and associated animations that have been grouped together
and stored in a library. From the library, a symbol may be instantiated in any mimic as many times as it is
needed. A symbol may represent anything from a simple close button for a mimic, to a very complex piece
of equipment with many animations.
When you create an animation for a symbol, you have the choice of using the complete variable name includ-
ing the branch or just the variable name without any branch. If you choose to use just the variable name,
the branch must be supplied when an instance of the symbol is inserted into a mimic. The reference to the
variable in the Variables Tree is calculated by concatenating the branch and the variable name in the sym-
bol.
Returning to a previous example, we could create a symbol representing an air conditioner. The symbol is to
indicate if the air conditioner is on and the ambient temperature. When animating the symbol's drawing ele-
ments the variable names are used without a branch. For example, TEMP is used instead of
BUILDING.FLOOR_01.AC_01.TEMP. A branch is supplied when symbol is inserted into a mimic. Show picture

This technique has a number of benefits.

l Repetitious drawing is avoided considerably reducing development time.


l The Developer may create his own reusable symbol library specific to field in which he works.
l When a symbol is inserted into a mimic, it is done as a reference. If a modification is to be made to
the operation of a symbol, the changes need only be made to the symbol in the library, all instances of
it will be automatically modified.

- 878 -
Understanding how to use the scope
The concept of configuration item scope, referred to as scope, mainly addresses the increasing use of web
based applications. The scope of an item defines to whom its value is accessible (among users or 3rd party
applications), and how its dynamic properties are shared (distributed) between stations. The scope covers
the following requirements:

l The ability to share I/O variables among stations according to the client and server lists,
l The ability to isolate the value of a variable to a given user context so that it cannot be accessible to
other users; and the ability for a given variable to have different values in different user contexts at
the same time.

A property, named Scope, is used to define the behavior of configuration items that this affects: Variables,
events, cyclics...
By application, we mean C-CURE Building Management System or any of its client applications such
as WebVue, TouchVue, the Application Explorer, an authenticated OPC client, 3rd party application
etc.
In all cases, user rights apply and a configuration item may not be accessible due to the user having
insufficient privileges.

Available scopes
The following table lists the available scopes and behaviors. The pictures illustrate the behavior using a vari-
able as an example.
Scope Life cycle Accessibility Value
Shared C-CURE An item's value is available to all sessions on all stations (and applic-Same value in
Show pic-Building Man-ations) as controlled by the client and server station lists. This was all contexts and
ture agement Sys-the behavior of variables configured with a server list and a client distributed
tem instance list up to version 12 (and still is). across stations.
start / stop
Local C-CURE An item’s value is managed locally on each C-CURE Building Man- Same value in
station Building Man-agement System instance and is persistent even after a user log off. all contexts but
Show pic-agement Sys-Available locally to all user sessions but not distributed across sta- not distributed
ture tem instance tions. This was the behavior of an internal variable with no server across stations.
start / stop list and no client list up to version 12.
Session Session open An item’s value only exists in the current session. These items are Different values
context / close (user created when a user session is opened and deleted when it is closed. for each ses-
Show pic-log in / log For example, the @USER system variable is of scope Session con- sions.
ture out) text and its value is different in each session.
Client Client con- An item’s value exists in the current client context (attached to a ses-Different values
context text open / sion). These items are created when a client context is created and for each client
Show pic-close deleted when the client context is deleted. For example, each tab in contexts even if
ture a web browser may have its own client context, all tabs of a given they belong to
web browser instance being handled within a single session. the same ses-
sion.

- 879 -
See the topic Configuration items affected by scope for more information and the list of item types affected
by the scope.

- 880 -
Configuration Items Affected by Scope
The majority of configuration items affected by scope are either variables, or associated with variables.
Some have a Scope property, others inherit the scope from the variable with which they are associated.

Variables
The scope of both variables is defined by its Scope property. The scope affects how a variable's value,
timestamp and quality (VTQ) are distributed.

l If the scope is Shared, then the VTQ will be the same for all sessions opened on that station and it is
distributed across stations according to the variable's server and client lists.
l If the scope is Local Station, then the VTQ exists on each running station and is managed locally. The
VTQ will be the same for all sessions opened on a given station, and the same variable may have
another VTQ on another station.
l If the scope is Session Context, then the VTQ exists inside a Session. The VTQ will be different in dif-
ferent sessions on a given station.
l If the scope is Client Context, then the VTQ exists inside a Client Context. The VTQ will be different in
different client contexts, even if attached to the same session.

Variables support all four scopes. HMI variables cannot be distributed across stations, they only support Ses-
sion Context, Client Context and Local Station scopes.
For information about how scope affects other variable properties and behaviors, see the topic Properties
common to all variable types.

Alarm synthesis
The scope of an alarm synthesis is automatically defined using the following rule:

l If the property Take the applied population into account is ticked, then the scope is set to Session Con-
text because the currently applied population can be different from one session to the other.
l If one or more alarms in the synthesis are of scope Session Context, then the scope is set to Session
Context.
l Else, the scope is set to Shared.

The scope of all result variables are inherited from the alarm syntheses.
If a population is modified in a session then alarm syntheses with the scope Session Context automatically
take this into account.

Events
The scope of an event is inherited from the triggering variable.

l If the scope of the triggering variable is Shared, then the event triggers an action in all sessions of all
stations defined in server list of the variable on which it is triggered.
l If the scope of the triggering variable is Local Station, then the event triggers an action in all sessions
of the station where the condition is true.
l If the scope of the triggering variable is Session Context, then the event triggers an action only inside
the session handling the event, on the station handling the session.
l If the scope of the triggering variable is Client Context, then the event triggers an action only inside
the client context handling the event, on the station handling the session corresponding to the client
context.

The scope of an event action created by SCADA Basic is inherited from the execution context.
It is not possible to delete a session context or client context event from a different session.

Cyclic actions
The scope a cyclic action created by configuration is defined by its Scope property.
The scope of a cyclic action created by SCADA Basic is inherited from the execution context.
It is not possible to delete a session context or client context cyclic from a different session.

SCADA Basic functions

- 881 -
The scope of a SCADA Basic function is inherited from the context it is called from. It can have Session Con-
text, Client Context or Local Station context.

l When a function is run from an animation, its context is inherited from the mimic context (Client Con-
text or Local Station).
l When a function is run from an event, its context is inherited from the scope of the variable from
which the event is triggered.
l When a function is run from a cyclic action, its context is inherited from the cyclic action scope.
l When a function is run from the SCADA Basic program manager, Timetable or Function key, its con-
text is Local Station.

Working variables declared in the SCADA Basic global program have a Local Station scope. Be care-
ful using this type of variable with WebVue as the value will be the same for C-CURE Building Man-
agement System station that is the web back end and all connected WebVue instances.

Expressions on variable
The scope of an expression is inherited from the result variable. If one or more variables in an expression
are of scope Session context or Client context, the scope of the result variable must match.

Sql queries
The scope of a Sql query is used to control the distribution of the Sql query results across user sessions,
allowing shared data to be processed in any user context and preventing user-specific data to be accessible
to other user sessions.
When using Sql variable mapping, the scope of the Sql query and the scope of the mapped variables must
match. The scope of the Sql query also constrains the scope of variables that can be used as input para-
meters.

Mimics
The scope of a mimic is always inherited. It can be either Client Context or Local Station.

l When a mimic is opened from C-CURE Building Management System, its context is Local Station.
l When a mimic is opened from WebVue, its context is Client Context.
l When a mimic is opened from another mimic, its context is the same as the one calling it.
l When a mimic is open by SCADA Basic, its context is that of the calling SCADA Basic function.

- 882 -
Configuring variables

- 883 -
Configuring variables in general

- 884 -
Before You Start to Configure Variables
Before you start configuring variables there are a number of factors that should be taken into consideration.
The application will be much easier to build and maintain, and provide greater usability, if these factors are
designed in rather than just being allowed to happen.

Branch structure
Designing the branch structure is the first and most important step of variable configuration. The branch
structure will be influenced by your design specification, the real life hardware of your application, and how
it is to be represented in the HMI's mimics and symbols. It is difficult to provide specific guidelines because
every application is different but the following branch structure is a good starting point.
App Name Major Area Minor Area Major Equipment Minor Equipment Signal Type
A typical variable name (including the branch) following this structure might be:
PCV_FACTORY.UTILITIES.SEWAGE.TANK1.STIRMOTOR1.RUNNING
This example uses only five of the possible eleven branches. How many your application uses is entirely up
to its design.

Domain and Nature


Domain and Nature are two general-purpose properties that can be applied to every variable. They are
mainly used in the Log and Alarm Viewers as a way to filter data. For example, you could use Domain and
Nature to filter an Alarm Viewer to show only alarms from the UTILITIES domain that are of an ELECTRICAL
nature.

Trending and logging


Bit and register variables can be trend recorded and bit variables can also be log recorded. Recording can
use a proprietary format database or one of the databases supported by the Historic Data Server. It is
expedient to be selective in what you record and when you record it. Modern PC's can support very large
databases but they still fill up and the more data you record the slower it is to search for what you want.
Trend recording records data in a format suitable for replay through the Trend Viewer, Log recording
records data in a format suitable for replay through the Log Viewer.

Alarms levels
C-CURE Building Management System can manage alarms based on both bit and register variables. You
need to design a scheme that specifies what alarm levels are to be used and to decide what process values
are to be alarmed.

Expressions
Expressions are useful to calculate values that the process equipment does not provide. For example, you
might want the sum of three flows.

Networking (Multi-station applications)


On a multi-station application, The Station Lists determine on which station the value of a variable is pro-
duced and on which stations it is consumed.

- 885 -
Configuring the Variable Branches
The variable branches are configured in the Application Explorer. The way in which the branches are nested
defines the structure of the Variables Tree. The root of the variable branches is the Variables Tree folder.
Show picture

The Project, Variables and Variables Tree folders are not included when referencing a variable and
its branch.

How to add branches to the Variable Tree

1. Open the Application Explorer and select the Variables Tree folder in the configuration tree.
2. Expand the configuration tree and select the parent for the new branch. For example, using the picture
above, you could select FLOOR_01.
3. From the task list, select the task Add a new branch. The branch creation dialog is displayed.
4. Enter the branch Name and an optional Description. Click the OK button to confirm the creation of the
new branch. For example AC_01.

If you are using TouchVue, the branch Description is essential as it appears in Installations (variable
lists) as an identifier.

- 886 -
Adding Variables to a Branch
Adding variables to each branch and configuring their properties and associated behaviors is the final stage
of configuring the Variables Tree. The configuration of each variable defines its behavior and the source of
its real-time value. Much of the configuration is common to all variables and is covered by this help book.
Configuration specific to each type of variable has its own help book and topics as does adding associated
behavior.

How to add a variable to a branch

1. In the Application Explorer expand the configuration tree and select the branch to which the variable is
to be added.
2. From the task list, select the Add a bit, Add a register, Add a text, Add an HMI bit, Add an HMI register
or Add an HMI text task. The bit, register or text creation dialog opens as appropriate. Show picture

3. Enter the name for the variable. See the Rules for variable naming topic.
4. Configure the variable properties. See the topic Properties common to all variables types and the
books specific to each variable type, or the HMI variables topic.
5. Select the OK command button to validate the configuration and close the dialog.

Changes to the Variables Tree can be saved to disk using the Application Explorer menu command
File.Save.

- 887 -
Properties Common to all Variable types
The following properties are common to all variable types (bit, alarm, register and text). Some are found in
the General tab, the others in the Advanced tab.

l Name - The name for the variable. See the Rules for variable naming topic.
l Description - A description for the variable up to 255 characters in length. This string is bilingual. A
variable's description and has a number of uses.
l It is displayed when the variable is selected in the Select Variable dialog box.
l It appears as a prompt in the dialog box seen by a User when changing a variable's value.
l It appears in the Alarm Viewer, and when an Alarm is printed.
l It appears in the Log Viewer, and when a log is printed.
l It may be displayed by certain animation types.
l Domain - The Domain to which the variable is allocated (optional).
l Nature - The Nature to which the variable is allocated (optional).
l Associated label - An associated label is used to display a variable's value as text strings instead of a
boolean value or number. See the topic Using Associated Labels with variables.
l Command - Enable the value of the variable to be set internally from a command type animation, a
Recipe or a SCADA BASIC program.
l Scope - Defines the scope of the variable, i.e. its distribution across stations and its accessibility
across user sessions. For more information, see below and topics Understanding how to use the scope
and Configuration items affected by scope.

The following properties are in the variable's Advanced configuration tab.

l Command
l Command level - The command level that must be enabled in the User Account in order for a
User to change the value of the variable. Only visible when the Command property, in the Gen-
eral tab, is set.
l Miscellaneous
l Browsing level - The browsing level that the User Account must have in order to see the variable
when using a browsing service of C-CURE Building Management System.
See the topic Properties that affect access by 3rd party applications for further information
about interfaces for which this privilege is enforced.
See the topic Using the Authentication Option for further information about OPC Security.
l Inhibited - Temporarily disable the variable and all functions associated with it. The variable
remains in the inventory but is not active.
l Simulated - Temporarily breaks the link between a variable's value and its data source. The
value of the variable may then be manually entered.
l Saved - Save the variable so that the value of its properties modified at run-time are persisted
whilst C-CURE Building Management System is shutdown and restored at start-up.
l VCR - Record the value of the variable for replay through a mimic using a special VCR project.
See the topic on the VCR Facility for further information.
l Remote access - The variable is flagged as being available for access by a third party software.
l No context window - If selected the ability use a context window with the variable is disabled.
l Monitoring
l Permanent scan for mimics - See the topic Using the permanent scan for mimic option.
l Networking.
l Servers – The name of a server station list. Used on multi-station applications to define on
which station the variable will be available. See the topic, Configuring and Managing the Invent-
ory, in the Networking book for further information.
l Clients – The name of a client station list. Used on multi-station applications to define on which
station the variable will be available. See the topic, Configuring and Managing the Inventory, in
the Networking book for further information.
l Internal
l Broadcast - (Internal variables only) Broadcast the value of the variable on the local area net-
work each time it changes. This is used to keep internal variables in step when C-CURE Building
Management System is used in redundant operation using two or more Stations with identical
projects running in parallel.

- 888 -
Because the Application Explorer only displays variables that the running station produce or con-
sume, remember to always configure first the list that contains the running station when you create
a new variable or modify networking lists of an existing variable. Failing to do so can lead to situ-
ations where the variable is configured but is not displayed in the Application Explorer.

Because it is a configuration modification (as opposed to a runtime change), changing the value of
the Inhibited property here is not archived as part of a log list.
The modes ENABLE and DISABLE of the instruction VARIABLE are the only way to change the inhib-
ition status of an alarm. As for any other type of variable, such changes done by script will be logged
if the alarm is archived and the log list is configured appropriately.

Understanding the behavior of the Saved property


When the Saved property is activated, C-CURE Building Management System periodically saves the value of
properties that are modified at run-time, so that they can be restored at start-up. The list of properties that
are saved depends on the type of the variable, its source, and a number of settings related to variable prop-
erties. In details:

l General rule - Only variables mapped to I/O (data acquisition) and internal variables can be saved.
HMI variables, as well as percent and temporary variables cannot be saved.
l The Saved property is ignored on system variables created automatically by C-CURE Building Man-
agement System.
l Saving Binary attributes, Text extended attributes or the Simulated property - If such run-time prop-
erty is configured to be persistent (see the Variables settings), it will be for any variable configured to
be saved.
l Saving alarms - Alarms can be saved, in which case only the alarm status is saved (acknowledged or
not, masked or not...).
l Saving internal variables - If an internal variable is saved, its value, timestamp and status is saved,
as well as any saved attribute or run-time property configured to be persistent (see the Variables set-
tings). If this variable is an alarm, its alarm status is also saved.
l Saving variables mapped to I/O - Such a variable mapped to I/O can be saved for 2 purposes:
l Saving Binary attributes, Text extended attributes or the Simulated property - As for internal
variables.
l Saving the alarm status - In which case the alarm status is saved.
l In all cases, the value, timestamp and status of the variable itself is not saved.

The frequency at which variables are saved is configured in Variables settings.


To save Binary attributes, Text extended attributes or the Simulated property, you must configure
them as persistent in the Variables settings. These settings only apply to variables for which you
have activated the property Saved.

Properties related to variables are stored in the file \Per\VariablesSaved.dat of the project. This
includes the VTQ of internal variables, attributes and other run-time properties.
Properties related to alarms are stored in the file \Per\AlarmSaved.dat of the project. This includes
the status of alarms.

How a variable's properties and behaviors are affected by scope


Because of the change in how a variable's value is distributed when the scope is either Client Context or Ses-
sion Context, some variable properties and behaviors are not applicable and cannot be configured in the vari-
able's configuration.
In general:

l A variable of scope Session context cannot be logged nor trended,


l A variable of scope Client context cannot be used as alarm, logged nor trended.
l A variable is exposed via server interfaces such as the OPC Server, the IEC 104 outstation or the Web
Services Toolkit only if its scope is Shared or Local station.

- 889 -
If you attempt to change the scope of a variable, with one of these properties or behaviors already con-
figured, to Client Context or Session Context an error message is generated and the change in scope is can-
celed.
The use of the following properties is affected by the variable's scope:
Tab Property Shared Local station Session context Client context
General Alarm Yes Yes Yes Not applicable
General Log Yes Yes Not applicable Not applicable
Advanced Archiving.Log on.Positive transition Yes Yes Not applicable Not applicable
Advanced Archiving.Log on.Negative transition Yes Yes Not applicable Not applicable
Advanced Miscellaneous.Saved Yes Yes Not applicable Not applicable
Advanced Miscellaneous.Recorder Yes Yes Not applicable Not applicable
Advanced Miscellaneous.Remote access Yes Yes Not applicable Not applicable
Advanced Miscellaneous.No context window Yes Yes Not applicable Not applicable
Advanced Networking.Servers Yes Yes Not applicable Not applicable
Advanced Networking.Clients Yes Yes Not applicable Not applicable
Advanced Internal.Broadcast Yes Yes Not applicable Not applicable
General Maximum value (by variable) Yes Yes Not applicable Not applicable
General Minimum value (by variable) Yes Yes Not applicable Not applicable
Advanced Command.Maximum value (by variable) Yes Yes Not applicable Not applicable
Advanced Command.Minimum value (by variable) Yes Yes Not applicable Not applicable

The use of the following behaviors is affected by the variable's scope:


Behavior Shared Local station Session context Client context
Trend Yes Yes Not applicable Not applicable
Discrepancy Yes Yes Not applicable Not applicable
Alarm.Acknowledgment transmission Yes Yes Yes Not applicable
Alarm.Program action Yes Yes Yes Not applicable
Alarm.Window action Yes Yes Yes Not applicable
Alarm.Masking by variable Yes Yes Yes Not applicable
Alarm.Masking by expression template Yes Yes Yes Not applicable
Threshold behavior is unaffected other than the scope of the threshold variables follow that of the source
variable.

- 890 -
Tuning the Permanent Scan for Mimic property
The Permanent scan for mimics property is found in the Advanced tab of the Variables configuration dialog.
This property deserves special attention because of its considerable effect on the performance and behavior
of a project. The following values are available.

l None - The variable's real time properties (including value, timestamp, quality and other distributed
properties if any) are only updated when a mimic using them in an animation is open.
l Server station - The variable's real-time properties are permanently updated on the station where it is
produced. On all other stations, it behaves as None. This is the default setting.
l All stations - The variable's real-time properties are permanently updated on all stations.

The more variables that have their Permanent scan for mimics property set to None, the better overall per-
formance you get. But configuring a variable so that its real-time properties are only updated when a mimic
using it is open has a number of effects both positive and negative.

l The workload on the host PC is reduced when the mimic is not displayed. Although the amount of work
required to update one variable is very small, on a large system with thousands of variables the sav-
ing is significant.
l The workload on whatever is providing the source of the value (for example communication with a
PLC) is reduced when no mimic using the variable is displayed.
l When a mimic using the variable is displayed, depending on the source of the value, it may take a few
seconds before the value is updated.

Before these properties are taken into account for individual variables, the property Permanent scan for all
variables, in the main variable's Settings, must also be de-selected.
l If the variable has an equipment source, the communication frame will only stop being reques-
ted (and hence the load on the communications reduced) if all variables linked to it are not on
scan.
l The same applies to OPC (at group and server levels), LonWorks (node and network levels,
BACnet (device and network levels) and all other data acquisition drivers.
l The load on host platforms is also reduced for internal variables in a networked application.
No client/server traffic takes place for a particular variable when no consumer is subscribed to
the variable’s producer.
Register variables corresponding to process parameters or set-points are usually good candidates
for having their property Permanent scan for mimics set to None, because:

l They generate a large amount of traffic if polled.


l Their changes are not archived based on log list.
l Logging of operator actions related to set-point commands are not affected.
l They are only ever used when a mimic is open (as opposed to server-side background pro-
cessing).
l Discrepancy checking behavior does not apply to register variables.

Criteria for determining how to set the Permanent scan for mimics property value

- 891 -
Show picture

You can and should set the Permanent scan for mimics property to None:

l If the variable or alarm is not logged (archiving)


l And it is not used in SCADA Basic scripts (a script reading one or the other real time distributed prop-
erty)
l And it is not used in a discrepancy checking behavior

You must set the Permanent scan for mimics property to All stations:

l If the variable or alarm is used in SCADA Basic scripts on a variable’s consumer station (a script read-
ing one or the other real time distributed property).
Otherwise, the consumer station may not have the real time value of distributed properties when the
script is executed.

In all other cases, the default value Server stations is fine and can be left as is.
The configured value of the property Permanent scan for mimics is overridden according to the requirement
to scan and keep real time properties updated in the background for all other potential C-CURE Building Man-
agement System features: Alarming, Trending, Expressions, Alarm synthesis…
When a variable is produced by an association of servers, the variable's distributed properties in a
passive server comes from the active server and we say that the passive server behaves as a vari-
able consumer.
However, for the purpose of the Permanent Scan for mimics option, a passive server is considered a
Server station and all features affected by this property will work correctly for variables having this
property set to Server stations.

- 892 -
Configuring and Using Extended Attributes
Extended attributes provide the opportunity to associate a number of binary and text attributes with each
variable. The single binary attribute takes the form of a 32 bit integer than can be entered either as a num-
ber or as 32 individual bits. The text attributes are entered as a string or as the name of another variable. If
you use the name of another variable, when that text attribute is referenced, the value of that variable is
used. There are 16 text attributes with the first two reserved for Domain and Nature.
Extended attributes are configured using the Extended Attributes tab of the variable configuration dialog.
Show picture

Using Extended Attributes


Extended attributes can be used as follows.

l In an animation by appending the attribute reference to the variable name. See the topic Animation
Basics for further information.
l Changed using the SCADA Basic instruction VARIABLE, or directly from an animation.
l Used in the Attributes Filter when recording Trend and Log data.
l Recorded in the Archive units when recording Trend and Log Data.
l Displayed in the Alarm Viewer.
l Displayed in the Log Viewer.

Entering binary attributes


You can enter the binary attributes either directly into the Value field as a binary weighted number or by
clicking the adjacent ellipsis button and selecting the individual bits from the displayed dialog. Show picture

Entering a text attribute


You can enter a text attribute either directly into the Value field or by clicking the adjacent ellipsis button,
which opens the Variable Selector from where the name of another variable can be selected. Text attributes
are limited to 100 characters.

Attribute behavior

- 893 -
Using the in the main variable's Settings you can select whether each attribute is Static, Dynamic or Dis-
tributed.

l Static - A static attribute can only have its value changed by a User with configuration rights using the
variable configuration dialog.
l Dynamic - A dynamic attribute can have its value changed at run-time using the SCADA Basic instruc-
tion VARIABLE.
l Distributed - When used in a multi-station project, changes in the value of the attribute are propag-
ated to all interested stations.

See Properties common to all variable types and Variables settings for more information about attribute per-
sistence when shutting down C-CURE Building Management System.

- 894 -
Using Associated Labels with Variables
An associated label can be used when displaying a variable in the HMI to substitute the raw value with a
string that is more meaningful to the User. For example instead of displaying a register as 10, 20 or 30 you
could display it HEALTHY, SUSPECT and FAILED. Associated labels are bilingual so, for an application using
this feature, the displayed string can be different depending on which language is selected.
There are three types of associated label.

l Bit - For use with bit variables.


l Alarm - For use with bit variables that have the alarm property selected.
l Enumerated - For use with either register or text variables.

See the book Associated Labels for information on how to create associated labels.

Using a bit associated label


The labels of a bit associated label can be substituted for three possible states of a bit, that is 1, 0 and
invalid. There are three groups of labels, Value, Command to and Change to, used as follows.

l Value - In the Text-Label, animations. For example, RUNNING and STOPPED.


l Command to - In the Send-Bit and Send-Double bit animations. For example, CONFIRM START and
CONFIRM STOP.
l Change to - When logged. Displayed in the Log viewer and when printing. For example, HAS STOPPED
and HAS STARTED.

Using an alarm associated label


The labels of an alarm associated label can be substituted for all possible states of an alarm (the four actual
alarm states plus the various invalid states) plus the user actions associated with an alarm (Acknowledge,
masking, maintenance etc.). They are used as follows.

l In the Text-Label animations.


l In the Send-Bit animations.
l In the Alarm Viewer.
l When logged. Displayed in the Log Viewer and when printing.

Using an enumerated associated label


The labels on an enumerated associated label can be substituted for discrete values of either a register or
text variable. They are used as follows.

l In the Text-Label animations.

- 895 -
Text Variables
A Text Variable is used to store an ASCII string. Text variables are used to display data that does not con-
form to normal numeric formats, such as date and time, to provide messages to the User, and to allow the
User to enter textual information.
Show picture

Configuring Range and Display Formats


Text strings are normally displayed unformatted. However, in the special case of displaying the time you
can select the display format by specifying a format string.

l Maximum size - The maximum number of characters that may be stored in the variable. Range 1 to
32000.
l Format - Format specification for the Text variables TIME and DATE. Two formats may be specified,
one for each of the two languages, separated by the pipe "|" character. The format string
#D/#M/###Y|#M/#D/#Y would display the 29th of September 1995 as 29/09/1995 for the first lan-
guage and 09/29/95 for the alternative language.

Format characters which may be used for TIME


Character Meaning
#h Hours (00 to 23)
#m Minutes (00 to 59)
#s Seconds (00 to 59)
#kNNN Insert a special character represented by the ASCII code NNN

Format characters which may be used for DATE


Character Meaning
###Y Year as 4 characters (example 1995)
#Y Year as 2 characters (example 95)
#M Month (01 to 12)
#D Day (01 to 31)
#kNNN Insert a special character represented by the ASCII code NNN

- 896 -
Features Specific to Register Variables
Configuring the display range
The range for a register variable is determined by the Maximum Value and Minimum Value properties in the
General tab. The register range can be entered either directly as numbers or as the names of other register
variables. If a variable name is entered, the value of the variable is used and the range can be changed
dynamically at run-time. If entering a value directly, it can either be in decimal notation (for example
1.234) or for numbers greater than 1E+15 or less than -1E+15, in exponential notation (for example
3E+18). Show picture

Configuring the command range


The command range is the range within which a register variable can be forced. The command range must
fall within the display range. The command range properties are entered in the Advanced tab and are only
available when the Command option is set. The command range can be entered either directly as a number
or as the names of other register variables. If a variable name is entered, the value of the variable is used
and the range can be changed dynamically at run-time. Show picture

Configuring the format string

- 897 -
The format in which a variable is displayed is configured either by the animation displaying it, or by a format
string. The format string can be entered in the Format property of the General tab or, when it is displayed in
a mimic, the string of the animation’s support drawing element.
The form of the format string is ##.##, where the number of #'s specify the number of significant figures
before and after the decimal point. The displayed value is automatically rounded up or down as necessary.
Other characters may also be used in the format string to signify special options.
Character Meaning
#u Display the register's units text with the value.
#h Display the Register in the format Hour.Minute.Second. The value of the variable rep-
resents the number of seconds.
#b Display a null field when the value of the Register is zero. This may be used in con-
junction with #u.
#d Display the Register in the format Day.Hour.Minute.Second. The value of the variable rep-
resents the number of seconds.
#t Display the register in the format xxdxxhxxmxxsxxxms. The value of the register rep-
resents the number of milliseconds.
#t1 Display the register in the format xxdxxhxxmxxs. The value of the register represents
the number of milliseconds. (The milliseconds are not displayed.)
#t2 Display the register in the format xxdxxhxxm. The value of the register represents the
number of milliseconds. (The milliseconds and seconds are not displayed.)
#t3 Display the register in the format xxdxxh. The value of the register represents the num-
ber of milliseconds. (The milliseconds, seconds and minutes are not displayed.)
#t4 Display the register in the format xxd. The value of the register represents the number of
milliseconds. (The milliseconds, seconds, minutes and hours are not displayed.)
When the format string is to be provided by the animation’s support drawing element it must be preceded by
the @ character. This will ensure that, in the case of the variable definition already containing a format
string, the one in the drawing element takes precedence.
If the value of a variable exceeds that supported by its display format, any display of the variable
will be replaced by a row of asterisks.

Initializing a register with an internal source


A register variable with an internal source can be provided by an initial value using the property Intern-
al.Intialisation.Value. The value must be within the variable's range and is used to initialize the variable's
value when the project is started.

- 898 -
Features Specific to Bit Variables
Recording Bit Changes of State
Bit changes of state may be recorded using two separate mechanisms.

l Using the trend recording mechanism. Changes of bit state recorded in this way can be replayed
through a Trend Viewer or exported to an external program. This subject is covered in the book about
Archive Units.
l Using the event logging mechanism. Changes of bit state recorded in this way can be replayed through
the Log Viewer, or printed on a line printer.

To record a bit using the event logging mechanism you select the Log property in the General tab. By default
both 1>0 and 0<1 transitions are logged but this can be changed by the properties Log positive transitions
and Log negative transitions in the Advanced tab of the bit variable's properties dialog.
Selecting the log properties only enables a bit for event logging. Where and how it is logged is
determined by the Log Filters. See the book on Archive Units for information about the Log Filters.

- 899 -
Features specific to alarm variables

- 900 -
Alarm Variables Overview
An alarm variable is a variation of the bit variable. To configure a bit as an alarm you select the Alarm prop-
erty in the General tab of the bit variables's configuration dialog. Once configured as an alarm, the behavior
of the variable is modified so that the real time value visible to the user has 5 possible states (instead of 3
for a bit). Its state depends not only on the value of the underlying bit variable, but also on the action of the
user.
State Cause
Off The alarm is off.
Off - not acknowledged The alarm is off, but it has previously been on and not acknowledged by a User.
On - not acknowledged The alarm is on and but has yet to not been acknowledged by a User.
On - acknowledged The alarm is on and has been acknowledged by a User.
The alarm is masked by the condition of another Alarm or Bit, or inhibited by a
Unavailable
User.
Alarms variables may be:

l Displayed as a real time list in an Alarm Viewer.


l Displayed individually using certain animations, for example Color on Alarm.
l Acknowledged, inhibited and set to maintenance by the User.
l Recorded in the archive files and played back through a Log Viewer.
l Printed in real time as they occur.
l Counted in special register variables according to the alarm state, alarm level, Domain and Nature.
l Used to generate an external sensory alert, such as a sound, to attract the User's attention.

Properties specific to Alarm variables


The following properties are found in the Advanced tab of the variable's configuration dialog.

l Activation
l Positive transition - The alarm is activated (On - not acknowledged) when the value of its under-
lying bit changes from 0 to 1.
l Negative transition - The alarm is activated (On - not acknowledged) when the value of its under-
lying bit changes from 1 to 0.
l Priority - The priority of the alarm in the range 0 to 29. An alarm's priority defines its color and its
behavior in the Alarm Viewer.
l Levels - see the topic Using different levels for acknowledge, masking and maintenance.
l Temporization - A period in seconds between the source changing to the active state and the bit state
following it (and hence the alarm activating). Should the source return to the inactive state before the
temporization period is over the alarm will not activate. A value of 0 disables temporization and the
alarm activates immediately the source changes to active.
l Latch behavior - See the topic Using the Latch Behavior property.

- 901 -
Using the Latch Behavior Property
The Latch Behavior property (formerly called Message type) is found in an alarm variable's Advanced tab
and can be used to modify the behavior of alarm variables that have either an Internal or SNMP source. It
cannot be used with any other source.
The behavior is best explained using diagrams. Note that for an internal variable alarm activation depends
on which of the properties Positive (bit value is 1) or Negative (bit value is 0), also found in the Advanced
tab, is selected. The default is Positive (bit value is 1).
In a multi-station application, Latch Behavior is only active where the variable is produced (on the
server).

Default behavior of alarm variables with an internal source

Behavior of alarm variables with an internal source and Latch behavior selected

Behavior of alarm variables with an SNMP source and Latch behavior selected

- 902 -
Using Different Levels for Alarm Acknowledgement, Masking and Maintenance
Prior to version 9.0, alarm acknowledge level, masking level and maintenance level were linked to the
alarm priority. Also, the ability set an alarm to maintenance was dependent on the user's alarm acknow-
ledgement rights. That is, if an alarm was configured as priority 7, it required a user with level 7 acknow-
ledgement rights to acknowledge or set it to maintenance, and a User with level 7 masking rights to mask it.
Version 9 and later has the option for the priority, acknowledge level, masking level and maintenance level
to be independent. The options are all found in the Advanced tab of the variable's configuration dialog. Show
picture

By default and for backwards compatibility, the acknowledge level is set to the priority, and the mask and
maintenance levels to the acknowledge level. In this case, if the priority is changed the other levels follow
automatically.

- 903 -
Associating behavior with a variable

- 904 -
What is Associated Behavior?
Associated behavior adds functionality to a variable in addition to that provided by its main properties. The
following associated behaviors are available.
Behavior Description Reg Text Bit Alarm
Threshold Set up to four bits when the value rises above or falls
below specified values. See the topic Configuring a Yes
threshold.
Chronometer Measure the period for which a bit has been set. See the
Yes
topic Configuring a chronometer.
Counter Count how many times a bit has been set. See the topic
Yes
Configuring a counter.
Discrepancy Compare the status of one bit with another. See the topic
Yes
Configuring discrepancy checking.
Alarm - Ack. trace Set a trace bit when an alarm is acknowledged. See the
Yes
topic Configuring an alarm acknowledge trace.
Alarm - Action Associate a program or mimic with an alarm. See the
Yes
topic Configuring an associated action.
Alarm - Masking Mask an alarm with either a bit or an expression. See the
Yes
topic Configuring alarm masking.
Event - Program Run a program on change of value. See the topic Con-
Yes Yes Yes Yes
figuring an event.
Event - Message Send a message on change of value. See the topic Con-
Yes Yes Yes Yes
figuring an event.
Trend Record the variable in an archive unit for future replay
through a Trend Viewer. See the topic Configuring trend Yes Yes Yes
recording.
Overflow processing Set a bit when the value of a register variable, with an
equipment source, exceeds its range. See the topic Con- Yes
figuring overflow processing.
Configuring and managing associated behaviors takes place in the Associated Behavior pane. The Associated
Behaviors pane is displayed whenever the Variables Tree is selected in the configuration tree. The behavior
associated with a particular variable is displayed when that variable is selected. Show picture The names of
any other variables used in the Associated Behavior are also displayed. To display or edit the Associated
Behavior, select its entry and then click the appropriate tool in the Associated Behavior toolbar.

- 905 -
Only one of each type of behavior can be added to a variable with the exception of an alarm's associated
action. (You can add two associated actions to an alarm.) Some behaviors are exclusive - for example, a
register cannot have both chronometer and counter behaviors. In addition, certain variable properties may
need to be set or cleared for a behavior to be available. For example, to add discrepancy behavior to a bit
its Command property must be set.

The Associated Behavior toolbar


The Associated Behavior toolbar provides all the tools used to manage Associated Behaviors.
Behavior Tool
Threshold
Chronometer
Counter
Discrepancy
Alarm acknowledge trace
Alarm action - program
Alarm action - window
Alarm mask - variable
Alarm mask - expression
Event - Program
Event - Message
Trend
Overflow processing
Each tool's appearance is modified by overlaying a symbol depending on what actions are available.

l A green plus sign indicates that you can add the behavior.
l A red cross indicates that you can delete the behavior.
l A magnifying glass indicates that you can display the behavior's properties.

- 906 -
Configuring a Threshold
A threshold is used to set a bit variable to 1 when a register rises above, or falls below, a specified value.
The bit that is set would most commonly be used as an alarm, but there are other uses such simple on-off
control.
The threshold system is configured individually for each variable from one of the following combinations.
ppphigh / pphigh / hihi / high 4x above
ppHigh / hihi / high / low 3x above and 1 x below
hihi / high / low / lolo 2x above and 2 x below
high / low / lolo / pplow 1x above and 3 x below
low / lolo / pplow / ppplow 4x below
Thresholds are configured and managed using the Associated Behaviors pane displayed whenever the Vari-
ables Tree is selected in the Application Explorer.
The exact behavior of thresholds is affected by the property Trigger on strict going beyond threshold
found in the Variables Tree Settings dialog.

How to create a threshold

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
register variable to which the threshold is to be added.
2. Select the Add a threshold tool from the Associated Behaviors toolbar. The Thresholds Configuration
dialog opens.
3. Select the Thresholds type using the drop down list box of the same name.
4. Enable the required threshold(s) by selecting the corresponding tick box(es). The name of the asso-
ciated bit variable is automatically generated. You can accept the default name, type in an alternative
name, or select an existing bit variable using the Variable Select dialog, which can be opened using
the Ellipsis button adjacent to the field. Unless there is good reason not to do so, it is recommended
that you accept the default name.
5. Enter a value for the threshold and the hysteresis (if required). Both values are in engineering units.
Show picture
6. Click OK to confirm the configuration and close the dialog.

- 907 -
Configuring a Counter
A register can be configured to count the number of changes of a bit. A typical use of a counter is to count
the number of times a contactor has tripped or a motor has started.
Counters are configured and managed using the Associated Behaviors pane displayed whenever the Vari-
ables Tree is selected in the Application Explorer.

Counter behavior is not available if a register has the command option set.

How to create a counter

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
register variable to which the counter is to be added.
2. Select the Add counter tool from the Associated Behaviors toolbar. The Counter dialog opens.
3. Select the Counter type using the drop down list box of the same name. A counter can be incremental
(counting up) or decremental (counting down).
4. Enter the Step Value. This is the value that will be added or subtracted from the counter each time the
counted bit changes. The default is 1.
5. In the Associated bit field, enter or select the name of the bit to be counted. You must also choose the
transition that is to be counted.
6. In the Initialization bit field, enter or select the name of the bit that will reset the counter. You must
also choose the transition on which the reset will be made. This initialization bit is optional.
7. Click the OK button to confirm the configuration and close the dialog.

- 908 -
Configuring a Chronometer
A register can be configured to time how long a bit has been set. This is known as a chronometer or chrono.
A typical use of a chronometer is as an hours-run meter for a motor.
Chronometers are configured and managed using the Associated Behaviors pane displayed whenever the
Variables Tree is selected in the Application Explorer.

Chronometer behavior is not available if a register has the command option set.

How to create a chronometer

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
register variable to which the chronometer is to be added.
2. Select the Add chronometer tool from the Associated Behaviors toolbar. The Chronometer dialog
opens.
3. Enter the Period in seconds. For each Period the chronometer is incremented by 1. For example, if you
wanted to count tenths of seconds the period would be set to 0.1.
4. Select the chronometer type. A chronometer can be incremental (counting up) or decremental (count-
ing down).
5. In the Triggering bit field, enter or select the name of the bit to be which causes the chronometer to
run. You must also choose the bit state.
6. In the Initialization bit field, enter or select the name of the bit that will reset the chronometer. You
must also choose the transition on which the reset will be made. This initialization bit is mandatory for
the chronometer to work.
7. Click the OK button to confirm the configuration and close the dialog.

- 909 -
Configuring Discrepancy Checking on Bits
Discrepancy checking compares the state of one bit variable against the state of another. For example, you
could check the bit representing the open limit switch on a valve against the command bit that causes it to
open. After a pre-defined delay if the check fails a further bit, normally configured as an alarm, is set. Dis-
crepancy checking may be made on either or both the 0 to 1 and the 1 to 0 transitions, against the same or
different Bits.

Discrepancy checking is only available for bits that have the command option set.

How to configure a discrepancy check

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
bit variable to which the discrepancy check is to be added.
2. Select the Add discrepancy tool from the Associated Behaviors toolbar. The Discrepancy dialog opens.
3. Using the Bit to test fields, enter or select the name of the bit variable(s) against which the bit to be
checked will be compared.
4. Select the transition(s) of the Bit to test variables that are to be used by the check.
5. Using the Set bit field, select or enter the name of the bit variable that will be set if a discrepancy is
detected.
6. Select if the Set bit is to be forced to 1 or 0.
7. Enter a Delay in seconds. The discrepancy check is allowed to fail for this period before the Set bit is
set.
8. Click the OK button to confirm the configuration and close the dialog.

- 910 -
Configuring an Associated Action
You can associate up to two actions with each bit that is configured as an alarm. Each action can open a win-
dow (mimic) or run a SCADA Basic program. The actions can only be invoked from the Alarm Viewer. (For
more information on how invoking the action works, see the help book on the Alarm Viewer)
Associated Actions are configured and managed using the Associated Behaviors pane.

How to configure an associated action to open a window

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
alarm (bit) variable to which the associated action is to be added.
2. Select the Add alarm behavior.Add alarm window action tool from the Associated Behaviors toolbar.
The Alarm window action dialog opens.
3. Enter the Title string. The Title is a bilingual string that appears when selecting the action in an Alarm
Viewer. The ellipsis button adjacent to the Title field is used to enter the second string.
4. Using the Mimic field select or enter the name of the mimic to be opened.
5. Select or enter an optional branch for the mimic in Branch field.
6. Click OK to confirm the configuration and close the dialog.

How to configure an associated action to run a SCADA Basic program

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
alarm (bit) variable to which the associated action is to be added.
2. Select the Add alarm behavior.Add alarm program action tool from the Associated Behaviors toolbar.
The Alarm program action dialog opens.
3. Enter the Title string. The Title is a bilingual string that appears when selecting the action in an Alarm
Viewer. The ellipsis button adjacent to the Title field is used to enter the second string.
4. Using the Program field select or enter the name of the program to run.
5. Using the Function field select or enter the name of the function to run. If no function is selected the
Main function will run.
6. Using the Arguments field enter a comma separated string for any arguments that are to be passed to
the program.
7. Select or enter an optional branch for the program in Branch field.
8. Click OK to confirm the configuration and close the dialog.

- 911 -
Configuring Alarm Masking
An alarm can be masked (disabled) by either or both another variable (bit or alarm) or by an expression
template.

How to mask an alarm by another variable

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
alarm (bit) variable to which the mask is to be added.
2. Select the Add alarm behavior.Add alarm masking tool from the Associated Behaviors toolbar. The
Alarm masking dialog opens.
3. Enter or select the name of variable to be used as the mask. Either a bit or alarm can be used. The
ellipsis button adjacent to the field displays the Variable Selector.
4. Click OK to confirm the configuration and close the dialog.

You cannot configure which state of the masking variable activates masking. Masking always occurs
when the masking variable is set to 1.

How to mask an alarm with an expression template

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
alarm (bit) variable to which the associated action is to be added.
2. Select the Add alarm behavior.Add alarm masking by expression template tool from the Associated
Behaviors toolbar. The Alarm masking by template expression dialog opens.
3. Select the expression template using the Expression template drop down list box.
4. Select or enter an optional branch for the expression template using Branch field.
5. Click OK to confirm the configuration and close the dialog.

The expression template must be configured before configuring the alarm mask that uses it. See the
topic How to add a template expression.

- 912 -
Configuring an Alarm Acknowledge Trace Bit
The action of acknowledging an alarm can be used to set another (bit) variable that can then be used to
trace the acknowledge process. It could be used, for example, to cancel an audible alarm.

How to configure an alarm acknowledge trace bit

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
alarm (bit) variable to which the mask is to be added.
2. Select the Add alarm behavior.Add acknowledgement transmission tool from the Associated Behaviors
toolbar. The Alarm acknowledgement transmission dialog opens.
3. Enter or select the name of the bit variable to be used. The ellipsis button adjacent to the field displays
the Variable Selector.
4. Using the To 0 or To 1 option buttons select the state to which the bit will be set
5. Click OK to confirm the configuration and close the dialog.

You must arrange for another mechanism to clear the trace bit the alarm system only sets it.

- 913 -
Configuring an Event
An event runs a SCADA Basic program or sends a message (Email or SMS) on the change of a variable's
value. The change in value that is required to trigger the event is defined by an expression. For example for
a register it could be => 50 (Equal to or greater than 50).
You configure a variable to trigger an event either from the variable's associated behaviors, or from the
Actions configuration. The same configuration dialogs are used for both methods. For detailed information
about the dialogs, see the book Event Actions in the help about Actions.

How to open the event configuration dialog from a variable associated behavior pane

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
variable to which the event is to be added.
2. Select the Add event tool from the Associated Behaviors toolbar. Then select either Add an event to
trigger a program or Add an event to trigger a message as appropriate.
3. Configure the event properties and click OK to confirm the configuration and close the dialog.

- 914 -
Configuring Trend Recording
Trend data is primarily recorded for display with C-CURE Building Management System's trend viewer. You
can record changes in value of bit and register variables.
You configure a variable for trend recording either from the variable configuration by adding trend recording
to the variable's associated behaviors, or from the archives configuration by adding the variable's name to
the trends folder. The same configuration dialogs are used for both methods.
Trend recording can take place in either proprietary or HDS archive units. The configuration dialogs that are
used are different depending on which is chosen. For detailed information about each dialog, see either the
book Configuring trend data recording in the help for the HDS or the book Configuring trend data recording
in the help for native data recording.
The same variable can be recorded multiple times if you have multiple archive units configured. There are
several reasons why you might want to do this. For example:

l To record the variable at two different rates.


l To record the variable both for replaying through a Trend Viewer and in a format more suited for
access by a third party product.

However, one of the recordings must be selected as primary and this will be used by default for replay
through the Trend Viewer. If you want to select a recording that was not designated as primary for replay
through a Trend Viewer, you must use a SCADA Basic script.

How to open the trend configuration dialog from a variable's associated behavior pane

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
variable to which trending is to be added.
2. Select the Add trend tool from the Associated Behaviors toolbar. A list of available archive units is dis-
played.
3. Select the archive unit in which the variable is to be recorded. A dialog appropriate to the archive unit
type opens. Configure the trend properties and click OK to confirm the configuration and close the dia-
log.

- 915 -
Configuring Overflow Processing
If the value of a register with an equipment source goes outside of its range, an overflow occurs and the
register value is flagged as invalid. This will happen if the value from the equipment goes outside of its nor-
mal limits. A good example of when this might happen is if a transducer becomes faulty or gets dis-
connected. The Overflow Processing behavior allows you to configure what happens in the event of an
overflow.

How to configure overflow processing

1. Open the Application Explorer and use the configuration tree to select the Variables Tree and then the
register variable to which the overflow processing is to be added.
2. Select the Add overflow processing tool from the Associated Behaviors toolbar. The Overfow pro-
cessing dialog opens.
3. Enter or select the bit variables and their states. See below for an explanation of the behavior.
4. Click OK to apply the processing and close the dialog.

Overflow processing behavior

l Alarm to set - A bit or alarm, and the value to which it is to be set, in the event of an overflow.
l Simulation stop bit - If this bit is configured, when the value of the register reaches the limit of its
range, it will become isolated from the communication frame, and its value will remain at the last
valid value (the maximum or minimum of its range). At this time, the value of the bit will be peri-
odically tested. When it is found to be equal to the selected value (either 0 or 1) the link to the com-
munication frame is re-established. To use the Simulation stop bit option the Alarm to set option must
also be configured.

- 916 -
Linking a variable to its source

- 917 -
Linking a Variable to its Source Overview
The source of a variable defines where its real-time value comes from. The selection of a variable's source,
and the properties that define how it is linked to that source, are found in the Source tab of the variable's
configuration dialog. The available sources are listed in the Source drop down list box. Show picture

The following sources are always available.

l Internal - The value is generated by C-CURE Building Management System itself. The value can be gen-
erated by the application - an expression, a program (SCADA Basic or VBA), a threshold, a chro-
nometer or a counter - or by the internal processes of the software - alarm counters, network status
etc. The name of variables generated by the internal processes generally start with the branch
SYSTEM.
l External - The value comes from another C-CURE Building Management System station. Included for
backward compatibility only. Used in multi-station projects prior to version 7.0.

The following sources depend on the configuration of the project's data acquisition. The name that appears
in the Source list box is the Alias that was given to the communication media when it was configured in C-
CURE Building Management System.

l Equipment - One of the native drivers.


l OPC - A third party OPC server.
l LonWorks - A LonWorks network.
l BACnet - The BACnet client communication driver.
l IEC 60870-5 - The IEC 60870-5 communication driver.
l IEC 61850 - The IEC 61850 communication driver.
l DDE - A third party DDE server.
l SNMP - The SNMP Manager communication driver.
l Sql variables - The driver to map variables onto Sql query results.

- 918 -
Linking a variable to a BACnet object

- 919 -
How Variable Properties are Linked to BACnet Object Properties
Each BACnet device contains one or more objects. Each object contains one or more properties. There can
be several instances of an object type within a device. The BACnet standard specifies the object types and
their properties. The standard also specifies that each device must contain a Device object. Show picture

When you link a variable to a BACnet object you specify the device, the object-type and the object instance.
You can optionally also specify a particular object property, or if the device configuration includes an
Alarm/Event Notification, the Alarm/Event status. If you do not specify a particular property then the vari-
able's value is linked to the BACnet object's present_value property and the variable's timestamp and qual-
ity are produced by C-CURE Building Management System.

Special case for the binary_input, binary_output and binary_value objects


A special case exists for the BACnet objects binary_input, binary_output and binary_value. If you do not spe-
cify a particular property when linking to a variable, then, not only is the variable's real-time value is linked
to object's present_value, but the timestamp is linked to the property change_of_state_time and the quality
to status_flags.
The BACnet status flags are converted into the variable's quality property as follows.
Status Flags Variable
Fault In alarm Overridden Out of service Quality
0 0 0 0 OK
0 0 0 1 OK
0 0 1 0 OK
0 0 1 1 OK
0 1 0 0 OK
0 1 0 1 OK
0 1 1 0 OK
0 1 1 1 OK
1 0 0 0 NS
1 0 0 1 NS
1 0 1 0 NS
1 0 1 1 NS
1 1 0 0 NS
1 1 0 1 NS
1 1 1 0 NS
1 1 1 1 NS

To enable the variable's timestamp to be linked to the BACNet object's change_of_state_time prop-
erty you must also tick Use time provided by the device in the Advanced tab of the BACNet Device
Properties dialog.

- 920 -
Linking a Variable to a BACnet Object, Property or Event/Alarm
There are two methods by which devices are added to C-CURE Building Management System's BACnet net-
work configuration.

l If you are connected to the BACnet network, you can scan the network and select the devices from
those that are discovered. These are known as Classic devices.
l You can load one or more EDE files containing the BACnet configuration. Devices can be selected from
the contents of the EDE file(s). These are known as EDE devices.

The configuration required to link a variable to a classic device or an EDE device is different.
You can also link a variable to a BACnet object property using the BACnet Mapping dialog. See the
topic on BACnet Mapping in the book on Data Acquisition for more information.

How to link a variable to a BACnet object from a classic device

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the BACnet network, Device, Object-Type and Object Identifier (instance).
a. Using the Source list box select a BACnet network. A BACnet network is referenced using the
alias that was entered when it was configured in C-CURE Building Management System. Once
you have selected a network as the source the BACnet tab appears in the dialog.
b. Using the Device list box select the BACnet device. The Type field will indicate if it is a Classic or
EDE device. The rest of this explanation assumes it is a Classic device. Show picture
c. Using the Object type and Object identifier drop down list boxes select the object type and
instance.
3. Select the Variable type.
a. To link the variable to the object's real time value this property can be left at the default setting
of Object.
b. To link the variable to a specific property use the drop down list box to select it. The properties
that are available will depend on the variable type (bit, register or text) and the Object type pre-
viously selected.
c. To link the variable to an Alarm/Event use the drop down list box to select it. For binary objects
there will only be one choice Alarm/Event. For analog objects there are two choices
Alarm/Event - High and Alarm/Event - Low.
4. Select any advanced options.
a. Select any advanced options using the Advanced tab. See the topic Advanced properties specific
to BACnet variables for details.
5. Select OK to confirm the configuration and close the dialog.

How to link a variable to a BACnet object from an EDE device

- 921 -
1. Display the variable's Source tab.
a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the BACnet network and Device.
a. Using the Source list box select a BACnet network. A BACnet network is referenced using the
alias that was entered when it was configured in C-CURE Building Management System. Once
you have selected a network as the source the BACnet tab appears in the dialog.
b. Using the Device list box select the BACnet device. The Type field will indicate if it is a Classic or
EDE device and the EDE file field will show the name of the file from which the device con-
figuration was imported. The rest of this explanation assumes it is an EDE device.
3. Select the Keyname.
a. Using the Keyname list box select the appropriate keyname. The corresponding object type and
instance are displayed in the rear-only field below it. See the note below for more information
on keynames. Show picture
4. Select the Variable type. This is the same as for classic devices.
5. Select any other advanced options in the Advanced tab. See the topic Advanced properties specific to
BACnet variables for details.
6. Select OK to confirm the configuration and close the dialog.

About the Keyname property


The Keyname is a unique identifier for a BACnet object instance. It is only found in EDE files - it is not a prop-
erty that can be retrieved from the BACnet network. C-CURE Building Management System uses the com-
bination of the EDE file name and the Keyname to identify the BACnet object instance.

About the Alarm/Event variable type


If you select the Variable type as either Alarm/Event, Alarm/Event-High or Alarm/Event-Low, then the vari-
able is configured to reflect the status of the BACnet Object's Alarm/Event Notification. At this stage, C-
CURE Building Management System does not check that the configuration of the Alarm/Event notification of
the BACnet object in the device is correct. To assist the developer to check the configuration, an Alarm
Helper dialog can be displayed. The Alarm Helper dialog does not modify the configuration, but it does dis-
play the status (valid, warning or not checked). For further information, see the BACnet book in the Data
Acquisition help.

- 922 -
Advanced Properties Specific to BACnet Variables
The Advanced tab of the variable's properties dialog contains a number of properties only available when a
BACnet source has been selected. Show picture

l Monitoring type - The mechanism used to obtain a BACnet variable's value.


l Polling - The variable value is obtained by polling the device at the rate configured in the polling
interval. This is the default setting.
l Confirmed change of value (C-COV) - The variable value is obtained using the BACnet C-COV
mechanism whereby the device sends changes of value as they occur without the need for
polling. The driver confirms that the change in value has been received.
l Unconfirmed change of value (U-COV) - The variable value is obtained using the BACnet U-COV
mechanism whereby the device sends changes of value as they occur without the need for
polling. The driver does not confirm that the change in value has been received.
l Write priority- The BACnet write priority, range 1 to 16, where 1 is the highest priority. The default is
16.
l Fields - Used to specify how structured BACnet variables are treated, or to specify a proprietary prop-
erty. The following options are available.
l FormattedXML() - Returns a string in XML format. A carriage return character appears after
each XML end tag. Used for structured BACnet properties such as Weekly-Schedule. Can only be
used with text variables.
l XML() - Similar to FormattedXML() except that there is no carriage return after each XML end
tag.
l For proprietary property types, see the topic Using BACnet proprietary properties.
l Property - Used to define the BACnet proprietary property name.

- 923 -
Using BACnet Proprietary Properties
Manufacturers sometimes define a property that is not in the BACnet standard. These are called proprietary
properties. There are three possibilities with proprietary properties.

l Basic type - A simple type like boolean, unsigned integer, real, or a string of values (like byte string or
bit string or character string).
l Structured type defined in the BACnet standard. - For example, a character string array as defined for
the property “action-text” of the BACnet object “command”,
l Structured type not defined in the BACnet standard. It is currently not possible to use such proprietary
properties with C-CURE Building Management System.

The format of a proprietary property is defined by the Fields property found in the Advanced tab of a vari-
able with a BACnet source.
Type Description
Unsigned() Return the value of a proprietary property. Can be used with text,
register and bit variables.
OctetString() Return the contents in a raw format. Each byte value is separated
by a comma. Used for a proprietary property of type Octet_String.
Can be used with text variables only.
OctetString(x) Return a specific byte x from a proprietary property type Octet_
String. Can be used for text, register and bit variables. If the spe-
cified byte does not exist in the string, the variable will have the
quality NSFORMAT.
BitString() Return the contents of a proprietary property, encoded as a bit
stream, in a raw format. Each bit value is separated by a comma.
Can be used with text variables only.
BitString(x) Return a specific bit x from a proprietary property. Can be used
for text, register and bit variables. If the specified bit does not
exist in the string, the variable will have the quality NSFORMAT.
Reference(Object_Type, Property_Id) Return the content of proprietary property in XML format that has
a type already defined in the BACnet standard.
Object_type is the ID of the type of object.
Property_ID is the ID of the property within the object.
This syntax can only be used with a text variable. The result is
returned in XML format.
If the referenced type does not correspond with the format of the
value, then the quality of the variable will be “NSFORMAT”.
BACnetObjectIdentifier(x) BACnetObjectIdentifier is a specific BACnet type. Generally used
for the property Object_Identifier that identifies the BACnet object
instance identified by two elements Object type and instance num-
ber.
This type is defined as a data type in the BACnet specification and
it is necessary to specify this type (using the position “x”) to
return one of these elements. Can be used for text variables. If
the specified instance does not exist in the string, the variable will
have the quality NSFORMAT.
BACnetObjectIdentifier Simliar to BACnetObjectIdentifier(x) above except you cannot spe-
cify the instance. Can be used with text variables.

Example of syntax for types defined in the BACnet standard


To use the property action-text (ID = 3 as defined in the BACnet standard ) of the object Command (ID= 7
as defined in the BACnet standard) you could use either:
Reference(command,action-text)
or
Reference(7,3)

- 924 -
Linking a Variable to an Equipment Item
Before you can link a variable to an equipment item, the equipment network, nodes and frames must be con-
figured. Equipment configuration is not available in the Application Explorer and must be configured from
the menu using the command Configure.Communication.Equipment. See the book on Native Drivers for fur-
ther information.

How to link a variable to an equipment item

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab. Show picture

2. Select the Network, Node and Frame.


a. Using the Source list box, select the network. The network is referenced using the network
name that was entered when it was configured in C-CURE Building Management System. Once
you have selected the network, the Equipment frame appears in the dialog.
b. Using the Node list box, select the network node.
c. Using the Frame list box, select the node frame.
3. Click on the Link... button to open the dialog box where you will be able to select the address in the
frame - See the topic Using the equipment mapping dialog.
4. You can also define the mapping manually by entering the offset within the frame and data format dir-
ectly.
5. Select OK to confirm the configuration and close the dialog.

Supported data formats


Format Size (bits) Var type Comment
Unsigned integer 2 Register
Signed integer 4 Register
Unsigned integer 4 Register
Signed integer 16 Register
Unsigned integer 16 Register
Signed integer 32 Register
Unsigned integer 32 Register
Signed byte 8 Register
Signed float 32 Register
Signed float 64 Register
Bit (positive logic) 1 Bit 1 in the PLC = 1 in C-CURE Building Management System

- 925 -
Bit (negative logic) 1 Bit 0 in the PLC = 1 in C-CURE Building Management System
Delimited string Text Variable length string delimited by \0
Fixed length string Text Fixed length string of Size/8 characters

Manually calculating the offset


If you use the Equipment Mapping dialog to establish the link between the variable and the item in
the frame, the offset properties are calculated automatically.
The offset determines the location of the item in the frame, to which a variable is linked. For register and
text variables, it is determined by the Byte offset property. For bits, both the Byte offset and Bit offset prop-
erties are used.
For registers and text variables, the byte offset is calculated as the position of the item in the frame (start-
ing at 0) multiplied by the number of bytes dictated by the format. For example if you wanted the tenth item
(position = 9) and you were using a 16 bit integer format the byte offset would be 18.
For bit variables, the byte offset is the calculated as the bit position (starting at 0) divide by 8. The bit offset
is the bit position minus the byte offset multiplied by 8. For example, if you wanted the fourteenth bit (pos-
ition = 13) the byte offset would be 1 and the bit offset 5.

- 926 -
Linking a Variable to a DDE Source
Before you can link a variable to a DDE item a DDE conversation must have been added to the DDE folder in
Data acquisition. For further information, see the help book on Data Acquisition.

How to link a variable to a DDE item

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the DDE conversation and Item.
a. Using the Source list box select a DDE conversation. The DDE conversation is referenced using
the Alias that was entered when it was configured in C-CURE Building Management System.
Once you have selected a DDE conversation the DDE tab appears in the dialog. Show picture

b. Enter the item name in the Item text box.


3. Select OK to confirm the configuration and close the dialog.

Using the Auto property


If you tick the Auto property, the name of the variable is used as the item name. The Item field is dimmed
and you cannot manually enter the value.

Selecting the data format


By default, the format of the data from the DDE conversation is treated as an unsigned byte. To change this
you use the DDE format property in the Advanced tab. This is only available if a DDE conversation has been
selected as the source. The following formats are available.
Mnemonic Format Range
UBYTE Unsigned byte 0 to 256
BYTE Byte -128 to 128
UWORD Unsigned word 0 to 65536
WORD Word -32768 to 32768
ULONG Unsigned long 0 to 4294967296
LONG Long -2147483648 to 2147483648
FLOAT Float -3.37E38 to 3.37E38
DOUBLE Double -1.67D308 to 1.67D308
STRING0 Null terminated string
STRINGN \N (CRLF) terminated string

- 927 -
If you would like to try the example of using Excel as a DDE server, the cell format for the sheet
must be set up as R1C1.

- 928 -
Linking a variable to a DNP3 source

- 929 -
Linking a Variable to a DNP3 Source
Before you can link a variable to a DNP3 source, the DNP3 network and one or more devices must have been
added to the DNP3 folder in Data acquisition. For further information, see the help book on Data Acquisition.
You can also link a variable to a DNP3 source using the DNP3 Mapping dialog. See the topic DNP3
Inputs and Output Mapping in the book on Data Acquisition for information.

How to link a variable to a DNP3 input or output

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the Device, Object type and Point address.
a. Using the Source list box select a DNP3 network. The network is referenced using the Alias that
was entered when it was configured in C-CURE Building Management System. Once you have
selected a DNP3 network as the source the DNP3 tab appears in the dialog. Show picture

b. Select the Device and Object type using the drop down list boxes.
c. Enter the Point address. The point address range starts at zero.
3. If you are linking a register with the Command attribute set, to an analog output object, select the
Variation type.
4. Select OK to confirm the configuration and close the dialog.

The Variation type field appears when you first select a DNP3 source. However, once you have selec-
ted the Object type, it will be hidden if selection of a variation is not appropriate to that object.

DNP3 object types and variable types


The following table lists the DNP3 Object types and variable types to which they correspond.
Object type Default variable type Command
Binary inputs Bit No
Binary outputs Bit Yes
Running counters Register No
Frozen counters Register No
Analog inputs Register No
Analog outputs Register Yes
Attributes 211 & 242 to 252 Text No
Attributes 212 to 241 Register No
Internal indicators Bit No

- 930 -
With the exception of the Attributes and Internal Indicators, C-CURE Building Management System allows
the mapping of data points to any of variable types. For example, you could map a Binary Input to a register
variable. C-CURE Building Management System will convert the value as follows.

l If the default type for the data point is a register and it is mapped to a bit, the value will be 0 if the
data point is less than or equal to 0, or 1 if it is greater than 0.
l If the default type for the data point is a register and it is mapped to a text, it will be converted to a
string.
l If the default type for the data point is a bit and it is mapped to a register, the value will be 0 if the
data point is false or 1 if it is true.
l If the default type for the data point is a bit and it is mapped to a text, the value will be "0" if the data
point is false or "1" if it is true.

- 931 -
Advanced Properties Specific to DNP3 Variables
The Advanced tab of the variable's properties dialog contains a number of properties only available when a
DNP3 source has been selected.

Additional properties common to all DNP3 variables

l Time tagging - The method used to generate the timestamp for the variable.
l Default - Use the default method as configured in the DNP3 general settings.
l Time tagged - Use the time tag from the device.
l Not time tagged - Do not use the time tag from the device and use C-CURE Building Management
System's timestamp instead.

Additional properties for a bit variable when the command attribute is set
See the topic Using advanced properties to configure a CROB.

Additional properties for a register variable when the command attribute is set
See the topic Using advanced properties to configure an AOB.

- 932 -
Using Advanced Properties to Configure a DNP3 CROB
The DNP3 protocol uses a command structure called a CROB (Control Relay Output Block) to force the value
of a binary output. A CROB does not just force a bit to 0 or 1 - it sends one of a selection of functions that is
then interpreted by the Device as to the precise action. For example, set an output to 1 for a pre-defined
length of time (pulse).
A CROB can be sent using either SCADA Basic, or by forcing the value of a bit variable using a Send bit anim-
ation. When sending a CROB using an animation, the CROB parameters are configured in the Advanced prop-
erties of the corresponding bit variable. You can configure two CROB's, one that is sent when using an
animation to force the bit to zero and the other that is sent when using an animation to force the bit to one.
The CROB parameters that can be sent by a send bit animation are limited to those considered to be
most common. If you require something different, you can use the MDNP3 SCADA Basic instruction
that is fully configurable.

Configuring the CROB using a bit variable's advanced properties


The following properties are used to configure the CROBs. Show picture

l Control parameters - The method used to execute the CROBs.


l Default - Use the default method configured in the DNP3 Network Settings dialog.
l Direct operate - The master sends a message to the Device containing the necessary para-
meters. The message is acted on by the Device and an acknowledge is sent back.
l Direct operate no ack - The master sends a message to the Device containing the necessary
parameters. The message is acted on by the Device but no acknowledge is sent back.
l Select before operate - The master sends a select request message to the Device containing all
the necessary parameters. The Device replies with a copy of the parameters. When the master
has successfully compared the request and reply parameters, the operate message, also con-
taining the parameters, is sent.
l CROB - The configuration of the CROB.
l Bit write to 0 - Configuration of the CROB that is sent when an animation is used to force the bit
to zero.
l Enable a different address - Allows the CROB to reference a different binary output point
to the one from which it is being sent.
l Function - Selection of the CROB function. See the table below.
l On-time - A period in seconds that is required by some of the CROB functions. Range 0 to
60 seconds.
l Bit write to 1 - Configuration of the CROB that is sent when an animation is used to force the bit
to one. The parameters are the same as for Bit write to 0.

- 933 -
The CROB functions supported by C-CURE Building Management System when using a send bit animation are
as follows.
Function in C-CURE Building Man- Trip close code Operation type On-time
agement System
Latching relay ON* NULL (0) Latch On (3) Always zero
Latching relay OFF* NULL (0) Latch Off (4) Always zero
Unpaired momentary NULL (0) Pulse On (1) Configurable 0 to 60s
Trip breaker/relay Trip (2) Pulse On (1) Configurable 0 to 60s
Close Breaker/relay Close (1) Pulse On (1) Configurable 0 to 60s
* Default setting.

Behavior
The behavior of a bit variable that is forced using a Send Bit animation and that is using a CROB is as fol-
lows.

l The value of the bit variable is immediately set to that requested by the Send Bit animation. For
example, if you used Send Bit to 1, the value of the bit is set to 1.
l The value of the bit will be updated to reflect that of the actual value of binary output in the Device
either by exception or by the next background poll. The exact mechanism and how long it will take will
depend on the configuration of the Device and of C-CURE Building Management System.
l If the CROB fails, the bit is set to invalid (NS).
l A CROB is not be sent if the bit variable is invalid.

- 934 -
Using Advanced Properties to Configure a DNP3 AOB
The DNP3 protocol uses a command structure called an AOB (Analog Output Block) to force the value of an
analog output.
An AOB can be sent using either SCADA Basic, or by forcing the value of a register variable using a Send
register animation. When sending an AOB using an animation, the AOB parameters are configured in the
Advanced properties of the corresponding register variable.

Configuring the AOB using a register variable's advanced properties


The following properties are used to configure the AOB. Show picture

l Control parameters - The method used to execute the AOB.


l Default - Use the default method configured in the DNP3 Network Settings dialog.
l Direct operate - The master sends a message to the Device containing the necessary para-
meters. The message is acted on by the Device and an acknowledge is sent back.
l Direct operate no ack - The master sends a message to the Device containing the necessary
parameters. The message is acted on by the Device but no acknowledge is sent back.
l Select before operate - The master sends a select request message to the Device containing all
the necessary parameters. The Device replies with a copy of the parameters. When the master
has successfully compared the request and reply parameters, the operate message, also con-
taining the parameters, is sent.
l AOB - The configuration of the AOB.
l Enable a different address - Allows the AOB to reference a different analog output point to the
one from which it is being sent.

Behavior
The behavior of a register variable that is forced using a Send Register animation and that is using an AOB is
as follows.

l The value of the register variable is immediately set to that requested by the Send Register anim-
ation.
l The value of the register will be updated to reflect that of the actual value of analog output in the
Device either by exception or by the next background poll. The exact mechanism and how long it will
take depend on the configuration of the Device and of C-CURE Building Management System.
l If the AOB fails, the register is set to invalid (NS).
l An AOB will not be sent if the register variable is invalid.

- 935 -
Linking a Variable to an IEC 60870-5 Object
Before you can link a variable to an IEC 60870-5 object, the IEC 60870-5 network, one or more devices as
well as sectors must have been added to the IEC 60870-5 folder in Data acquisition. For further information,
see the help book on Data Acquisition.
You can also link a variable to an IEC 60870-5 object using the IEC 60870-5 Mapping dialog. See the
topic Mapping IEC 60870-5 information objects to variables in the book on Data Acquisition for
information.

How to link a variable to IEC 60870-5 object

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the Device, Sector and Object type.
a. Using the Source list box select an IEC 60870-5 network. The network is referenced using the
Alias that was entered when it was configured in C-CURE Building Management System. Once
you have selected an IEC 60870-5 network as the source the IEC 60870-5 tab appears in the dia-
log. Show picture

b. Select the Device and Sector using the drop down list boxes. The list boxes are populated accord-
ing to the IEC 60870-5 configuration.
c. Select the Object type. See below for a list of object types and corresponding variable types in
C-CURE Building Management System. If you are mapping a bit variable to a Bitstream object,
you must also select the Bit rank.
3. Enter the Information object address. If the variable is read and write (has the control property set),
you must also enter a Write information object address. (IEC 60870-5 objects use a separate address
for read and write.) For information on how the address is formatted, see the note on Using a struc-
tured address format below.
4. Select OK to confirm the configuration and close the dialog.

IEC 60870-5 object types and variable types


Information Object type Variable
Single point Bit
Double point Bit or Register
Step position Register
Bitstream Bit or Register

- 936 -
Measured value, normalized Register
Measured value, scaled Register
Measured value, short floating point Register
Integrated total Register
Please refer to the PICS IEC 101 and the PICS IEC 104 for more information about the supported ASDU.

Using the double-point data type


In the equipment, the double point data type has two bits. It is typically used for equipment that has two dis-
creet positions but may not move from one to the other instantly - for example a large circuit breaker. In C-
CURE Building Management System, a double-point data type can be mapped to either a single bit or
register. The values produced are as follows.
Equipment C-CURE Building Management System
B2 B1 Bit Register
0 0 Invalid 0
0 1 0 1
1 0 1 2
1 1 Invalid 3

Using a structured address format


When using a structured address format the three address fields each represent one byte. One, two or three
fields are available depending on if you are using one, two or three byte addressing. To convert a decimal
address into the three byte oriented fields required for C-CURE Building Management System configuration,
use the following method.

1. Convert the decimal address into a hexadecimal number. Pad out the number with zero's until the num-
ber has six digits. For example 210010 > 00083416.
2. Split the hexadecimal number into three sets of two digits. Each two digits represents one byte. For
example 00083416 > 0016 0816 3416.
3. Convert each of the three two digit numbers back to decimal. For example 0016 0816 3416 > 010 810
5210. These numbers are entered in the three address fields.

The maximum value in each field is 255.

Using an unstructured address format


If using unstructured addressing only one address field is available. The address is entered as it is. The max-
imum value for the address is 16777215.

Advanced properties
The Advanced tab of the variable's properties dialog contains a number of properties only available when an
IEC 60870-5 source has been selected. The exact list of properties depends on the type of variable, the type
of ASDU it is mapped to and the fact that it is controllable or not.

l Monitoring
l Time tagging - The method used to generate the timestamp for the variable.
l Default - Use the default method as configured in the IEC 60870-5 settings.
l Time tagged - Use the time tag from the device.
l Not time tagged - Do not use the time tag from the device and use C-CURE Building Man-
agement System's timestamp instead.
l Control
l Control parameters - The control model to be used.
l Default - Use the default control model as configured in the IEC 60870-5 settings for the
corresponding ASDU.
l Direct execute (DE) - Use the Direct execute control model.
l Select before operate (SBO) - Use the Select before operate control model.

- 937 -
l Qualifier (QU or QL) - The control qualifier to be used, or Default to apply the qualifier as
defined in the IEC 60870-5 settings for the corresponding ASDU.
l Time tagging - Defines if commands for the variable have to be time-tagged or not.
l Default - Use the default method as configured in the IEC 60870-5 settings for the cor-
responding ASDU.
l Time tagged - If enabled, commands for the variable will be time-tagged.
l Not time tagged - If enabled, commands for the variable will not be time-tagged.
l Format
l Unsigned - If enabled, the value received from the device is interpreted as unsigned.
l Signed - If enabled, the value received from the device is interpreted as signed. Default.

- 938 -
Linking a variable to an IEC 61850 data object or data attribute
The following properties appear in the Variable Properties dialog when a variable is mapped to an IEC 61850
data object or data attribute. Show picture

In the Source tab

l Device - The selected device. Clicking the down arrow adjacent to the field displays a list of all con-
figured devices.
l Monitoring object - The selected monitoring object. Clicking the down arrow adjacent to the field dis-
plays a list of all monitoring objects (data groups, datasets, and data reports).
l Mapping - The type of data to map to, either Data object or Data attribute.
l Member - The reference of the member of the data set or data report. Clicking the down arrow adja-
cent to the field displays the list of available members, either by browsing the physical device or by
discovery in the referenced SCL file. See below.
l Field - The reference of any sub-object and attribute of the selected member. Clicking the down arrow
adjacent to the field displays the list of available sub-objects and attributes, either by browsing the
physical device or by discovery in the referenced SCL file. See below.
l Common data class - The Common Data Class for the selected member and field. Clicking the down
arrow adjacent to the field displays a list of relevant CDC's.

Mapping with a dataset group or a report group


The Member and Field properties are concatenated to provide the full reference of the data attribute or data
object. Two fields are required because when mapping with a Dataset or a Report group, C-CURE Building
Management System initially retrieves the names of the top-level Data objects only. These are made avail-
able for selection in the Members drop down list box.
In general, monitoring requires mapping of variables on Data objects to take advantage of the timestamp
and quality provided by the IED. In that case, selecting the Member and the Common data class properties
is enough. Show picture

- 939 -
For mapping on a sub-object or a Data attribute, the Field property must be used. Once the member is selec-
ted, C-CURE Building Management System can then retrieve the names of any sub-objects and attributes
which are made available for selection in the Field drop down list box. Show picture

In the above screenshot, the full reference is A1_MEASMeasurements/MMXU1$MX$A$phsA.cVal.mag.f.

Mapping with a data group


When mapping with a Data group, C-CURE Building Management System retrieves the entire Data object
and Data attribute tree at once. Show picture
This is made available directly in the Members drop down list box and it is not necessary to use the Field.

- 940 -
How to map a variable for control
Mapping a variable to handle a control requires the Command property to be checked in the General tab.
In addition, the following steps are required in the Source tab: Show picture

1. Select the network and device,


2. Select the monitoring group. Use a data group if the controllable Data object is not available in any
existing dataset or data report group,
3. In the Member property, select the Data object under the functional constraint ST,
4. Select the controllable Common data class matching the Data object (as behind the CO functional
constraint), typically SPC, DPC...
5. Adjust the Advanced properties, in particular if you want to force C-CURE Building Management Sys-
tem to use a specific control model,
6. Validate.

While selecting the Data object for control under the functional constraint ST may seem counter-intu-
itive, C-CURE Building Management System will automatically find the corresponding controllable
data object in the Logical node, and act on it using the proper control services.

In the Advanced tab

- 941 -
l Control model - The control model to use when forcing the value of the variable. Only displayed for a
variable mapped on a controllable Common data class.
l Automatic detection - Control will use the control model as configured in the physical device (or
SCL file). Default.
l Direct execute, Direct execute with enhanced security, Select before operate, Select before
operate with enhanced security) - C-CURE Building Management System will force the use of the
selected control model. Please note that controls may fail at run-time, for example if you force
the use of a Direct execute where the IED requires an SBO or SBOw.
l Data object options - Only displayed for a variable mapped on a Data object or Sub-object.
l Use time provided by device - If ticked, C-CURE Building Management System uses the
timestamp provided by the device.
l Use quality provided by device - If ticked, C-CURE Building Management System uses the qual-
ity send by the device. Information is logged in the client diagnostic traces if the quality is con-
figured to be processed as invalid. The IEC 61850 quality can be stored in variable's extended
attributes for further application-specific processing.

- 942 -
Linking a variable to a LonWorks variable

- 943 -
Linking a Variable to a LonWorks Variable
Before you can link one of C-CURE Building Management System's variables to a LonWorks variable the
LonWorks network and one or more nodes must have been added to the LonWorks folder in Data acquisition.
For further information, see the help book on Data Acquisition.
LonWorks variables are frequently (but not always) structured. That is the same variable can contain a num-
ber of different fields. For example, a variable of type SNVT_switch contains two fields, value and state.

How to link one of C-CURE Building Management System's variables to a LonWorks variable

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the LNS network, Node, Variable and Field.
a. Using the Source list box select a LonWorks network. A LonWorks network is referenced using
the Alias that was entered when it was configured in C-CURE Building Management System.
Once you have selected a LonWorks network as the source the LNS tab appears in the dialog.
Show picture

b. Using the Node list box select the LonWorks node. After you select the node there will be a brief
pause whilst C-CURE Building Management System interrogates the LonDB for a list of variables
available for that node.
c. Select the LonWorks variable using the Variable drop down list box. When it has been selected,
the type of variable is displayed in the read only field, Type.
d. If you have selected a structured variable, use the Field drop down list box to select the field to
which you are linking. Alternatively, you can use an expression as the Field property. See the
topic How to use an expression with a structured LonWorks variable for details.
3. Select OK to confirm the configuration and close the dialog.

- 944 -
Advanced Properties Specific to LonWorks Variables
The Advanced tab of the variable's properties dialog contains a number of properties only available when a
LonWorks source has been selected. Show Picture Before changing the properties it is important to under-
stand the two options for monitoring a LonWorks variable.

l Bind this variable - Selecting this option means that each time the value of the variable changes in the
LonWorks node it is automatically sent to C-CURE Building Management System. This option should be
avoided if possible because of its potential for loading the LonWorks network. Also, the binding takes
place during the startup of C-CURE Building Management System adding considerably to the time that
it takes to start. As a guideline, you should not exceed 100 variables that have this option selected.
l Polled - C-CURE Building Management System polls the LonWorks node at a pre-defined interval for
the value of the variable. It is important that the polling rate reflects the speed at which the variable
changes. For example, a room temperature might be polled every five minutes. Good polling rate
selection will help reduce the traffic on the network and hence improve its performance.

LonWorks properties in the Advanced tab

l Use default parameters - The selection of Bind this variable property and the value of the Poll interval
property is taken from the default set in the LonWorks Network configuration.
l Bind this variable - If selected the C-CURE Building Management System variable is bound to the
LonWorks node when C-CURE Building Management System starts.
l Poll interval - The interval at which the LonWorks node is polled if the variable is not bound.

Using the Permanent scan for mimics property to reduce network traffic
In addition to regulating the network traffic using carefully selected poll intervals, you can also reduce net-
work traffic by de-selecting the property Permanent scan for mimics in the Advanced options of a variables
configuration. In general (but see table below), when this property is de-selected polling only takes place
when a mimic displaying the value of the variable is open.

Variable type versus monitoring mode


Permanent
Monitoring
Variable use scan for Behavior
mode
mimic
The variable is only monitored if a mimic displaying
Mimic only Polled De-selected
it is open.
When a variable has trend recording enabled the
Trend Polled N/A variable is always scanned. The property, Per-
manent scan for mimics, has no effect.
If polled then it is possible that some transitions will
Log Polled or Bind Selected
not be logged.

- 945 -
Alarms must be bound if all transitions are to be
Alarm Bind N/A detected. The property, Permanent scan for mimics,
has no effect.
Variable linked to The variable is read once when C-CURE Building
node configuration Management System is started. To refresh the vari-
N/A Selected
property (SCPT or able you must use the LNS instruction in SCADA
UCPT) BASIC.

- 946 -
How to Use an Expression with a Structured LonWorks Variable
As LonWorks variables sometimes have a complex structure the facility has been added to use an expres-
sion to select the correct data to be linked to C-CURE Building Management System's variables. The expres-
sion is entered in the Field property of the variable's configuration dialog. The following expressions may be
used.
Expression Variable Result
BIT(x,y) Bit Extract the yth bit of the xth byte of the network variable.
UI1(x) Register Extract 1 byte from the xth byte of the network variable and treat as an
unsigned integer.
UI2(x) Register Extract 2 bytes from the xth byte of the network variable and treat as an
unsigned integer.
UI4(x) Register Extract 4 bytes from the xth byte of the network variable and treat as an
unsigned integer.
I1(x) Register Extract 1 byte from the xth byte of the network variable and treat as a signed
integer.
I2(x) Register Extract 2 byte from the xth byte of the network variable and treat as a signed
integer.
I4(x) Register Extract 4 bytes from the xth byte of the network variable and treat as a
signed integer.
R4(x) Register Extract 4 bytes from the xth byte of the network variable and treat as a IEEE
real.
RAW() Text Display a network variable in raw format. In this case, no formatting is
applied.
#SWITCH_ Register Applies only to SNVT_switch network variables. C-CURE Building Man-
VALUE() agement System variable represents the value field of the network variable.
Writing this variable (value: i) also updates the state field as follows:

l If i is greater than zero, the state field is sent to 1 and the value field to
i.
l If i is less than or equal than zero, the state and value fields are written
to 0.
#SWITCH_STATE Register Applies only to SNVT_switch network variables. C-CURE Building Man-
(x) agement System variable is the state field of the network variable. Writing
this variable (value: i) also updates the value field as follows:

l If i is equal to 1, the state field is written to 1 and the value field is writ-
ten to x.
l If i is equal to 0, the state and value field are written to 0.

Network variables or fields that are numeric can be displayed either as a string (by linking to a text
variable) or as a number (by linking to a register variable).

- 947 -
Linking a Variable to an OPC Item
Before you can link a variable to an OPC item, the OPC server and one or more OPC groups must have been
added to the OPC folder in Data acquisition. For further information, see the help book on Data Acquisition.
You can also link a variable to an OPC item using the OPC Mapping dialog. See the OPC mapping topic
in the book on Data Acquisition for information.

How to link a variable to an OPC item

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the OPC server, Group and Item ID.
a. Using the Source list box select an OPC server. An OPC server is referenced using the Alias that
was entered when it was configured in C-CURE Building Management System. Once you have
selected an OPC server as the source the OPC tab appears in the dialog. Show picture

b. Using the Group name list box select the OPC group.
c. Enter the item name in the Item ID text box. You can either type in the item name or select it
using the OPC Mapping dialog, which is displayed using the ellipsis button adjacent to the text
box.
3. Select OK to confirm the configuration and close the dialog.

Using the Access Path property


The Access path property has a relationship with the item name that is similar to using a branch with a vari-
able name. For example, you could use Channel_0_User_defined.User as the access path and Setpoint as
the item name, or have no access path and use Channel_0_User_defined.User.Setpoint as the item name.

- 948 -
Linking a variable to an SNMP source

- 949 -
Linking a Variable to an SNMP Source
Before you can link a variable to an SNMP source, an SNMP network and one or more devices must be added
to the SNMP folder in Data acquisition. If you intend to periodically poll for data you must also create at
least one Polling Group. For further information, see the help book for SNMP in Data Acquisition.
You can also link a variable to an SNMP source using the SNMP Mapping dialog. See the topic The
SNMP Mapping Dialog in the book on Data Acquisition for information.

How to link a variable to a SNMP source

1. Display the variable's Source tab.


a. In the Application Explorer expand the variables tree and select the variable.
b. Select the Properties task. The Variable Properties dialog opens.
c. Select the Source tab.
2. Select the Network, Device and Data type.
a. Using the Source list box select an SNMP network. The network is referenced using the Alias
that was entered when it was configured in C-CURE Building Management System. Once you
have selected an SNMP network as the source the SNMP tab appears in the dialog. Show picture

b. Select the Device and Data type using the drop down list boxes. See below for the range of data
types.
3. If you selected OID as the data type:
a. Enter the OID. You can either type it in directly or use the OID Browser dialog to select it. See
the topic OID Selector dialog. If you are entering a scalar OID, it must end with .0 (representing
instance 0). If you are entering a tabular OID, it must end with the instance number.
b. Select the Polling Group using the Updated By property. As an alternative to a Polling Group you
can also choose (Trap only and adhoc synchronization). This will update the variable only when
there is a trap or when communication is started. See Refresh Mechanism table below.
4. If you selected a Ping as the data type.
a. Select the Polling Group using the Updated By property.
5. If you selected a Trap as the data type there is nothing more to configure.
6. Select OK to confirm the configuration and close the dialog.

The OID Browser does not know if an OID is scalar or tabular. It assumes the more common scalar
type and appends a .0 to the OID. If the OID is tabular, you must manually remove the .0 before con-
firming the variable's configuration.

About the SNMP data type


There are three main data types available within C-CURE Building Management System's SNMP driver.

l OID - Object IDentifier. The method used to access the majority of the data available from an SNMP
device. Normally (but not always) accessed by the driver by periodic polling.

- 950 -
l Trap - Unsolicited messages from a device as the result of some significant event.
l PING - SNMP provides no support for unmanaged devices. However, C-CURE Building Management
System's SNMP driver also supports unmanaged devices by making use of the PING request.

SNMP data type and refresh mechanism


Data type Polling group Synchronization and trap
Ping Polled at the scan rate of the selected polling NA
group.
Trap N/A Trap data type can only be refreshed by a trap
message.
OID Polled at the scan rate of the selected polling Read at project start-up and on com-
group. munication recovery.
Also refreshed if the OID is received in a trap
message.
Used for trap OIDs and preferred, for per-
formance, for those OIDs that change very
infrequently or have a static value.

C-CURE Building Management System variable type versus SNMP data type
Variable type Data types
Register OID, Ping:Status code, Ping:Round-trip time
Bit OID, Ping:Status, Trap#0 to Trap#6*
Text OID

Trap #2 and Trap #3 are combined into a single item called Trap#2#3.

- 951 -
The SNMP OID Selector Dialog
The OID Selector dialog is used to browse and select an OID. The OID Selector dialog is opened from the
ellipsis button adjacent to the OID field in the Variable Properties dialog, Source tab. The operation and
appearance of the OID Selector dialog depends if offline (default) or online operation has been selected in
the SNMP Mapping dialog.

l If offline was selected in the SNMP Mapping dialog, then both standard OIDs and those from any man-
ufacturer's MIBs that the project has loaded, are displayed. Show picture

l If online mode was selected in the SNMP Mapping dialog, only those symbolic OIDs for which a cor-
responding numeric OID has been discovered, are displayed. Discovered OID nodes are displayed in
green. Show picture

If online mode was selected in the SNMP Mapping dialog, but the device had not been browsed, there
will be a delay when opening the OID Browser while the browsing is executed.
The dialog contains two panes.

l The upper pane displays the available OIDs for the device in a tree format. Adjacent to the final
branch (leaf) of each OID is an icon indicating the corresponding variable type for C-CURE Building
Management System (Register or Text - there are no bit OIDs). Some register variables are enu-
merated. See the topic Advanced properties specific to SNMP variables on how to treat these.
l The lower pane displays supplementary OID information from the MIB file including a description,
range, access and data type.

SNMP Data Types


Data Type variable type Notes
Integer Register Range = -2e31 to 2e31 - 1. Allows enumerations.
Integer32 Register Range = -2e31 to 2e31 - 1.
Can be used to specify bytes of binary or textual information. Length 0
Octet string Text
to 65535 bytes

- 952 -
Object identifier Text
Used to specify an IPv4 address in the format x.x.x.x. Example
IpAddress Text
192.168.99.10.
Counter Register Used to represent a count. Range 0 to 4294967295.
Counter32 Register Used to represent a count. Range 0 to 4294967295.
Non-negative integer which holds the maximum or minimum value spe-
Gauge Register
cified in a range when the actual value goes over or below the range.
Non-negative integer which holds the maximum or minimum value spe-
Gauge32 Register
cified in a range when the actual value goes over or below the range.
Unsigned32 Register Range = 0 to 2e31 - 1
Elapsed time in units of hundredth of a second. Range is 0 to 2e32 - 1.
TimeTicks Register C-CURE Building Management System automatically converts to mil-
liseconds.
Counter64 Register Used to represent a count. Range 0 to 2e64 -1.
UInteger32 Register

- 953 -
Advanced Properties Specific to SNMP Variables
The Advanced tab of the variable's properties dialog contains properties only available when an SNMP
source has been selected. Show picture

l Extraction fields - Used to specify how special OIDs are treated. The following options are available.
l Enum(x) - Used when linking an enumerated OID to a bit. The value in brackets (x) specifies
which of the enumerated value represents true. Any other enumerated value is treated as false.
l BitString(x) - Used when a bit value is contained in a string. (x) is the character index with (0)
for the first (rightmost) character. You can map to a bit, register or text variable.
A bit variable will be set to 0 or 1.
A register variable will be set to 0 or 1.
A text variable will be set to "0" or "1".
Any character other than "0" or "1" in the indexed character will result in the mapped variable
being assigned the quality NS FMT.
l Disable reading - Used to disable polling for an OID that can only be refreshed by a trap. Essential for
SNMP V1 as if you add an OID of this type to a group then the entire request is set to error.
l With initial value - If reading is disabled you can enter an initial value so that the variable is not
invalid prior to being set by a trap.

- 954 -
Linking a variable to a Sql Variables source

- 955 -
Linking a Variable to a Sql Variables Source
Sql Variables is the name given to the source when a variable is linked to a Data Connection via a Sql Con-
nection and a Sql Read Query. See the topic Data Connections Overview. When a variable is linked in this
way its real-time value, and optionally its timestamp and quality, are sourced from a third party database
such as Microsoft's SQL Server. Read Queries can be configured so that they are polled periodically and / or
on event.
A Sql query produces a list of records or a scalar value. In the case of a table of results, you must be able to
select the row and the column(s) to be mapped to the variable and its metadata. The configuration is in
three steps (or four steps if the query contains parameters) each with its own configuration tab.

1. Data selection - Selects the Sql Connection and its subordinate Sql Read Query.
2. Row selection - Selection of a particular row from the table of results.
3. Mapping - Selection within the row of the field that contains the value and, optionally, the field that
contains the timestamp and the status of the variable.
4. Parameters - Configuration of any parameters that the query contains. Parameters add flexibility to a
Sql Query by allowing the value of one or more fields to be provided by the configuration of the linked
variable.

Mapping variables to a Sql query is subject to scope-related constraints:

l The scope of the Sql query and the scope of the mapped variable must match,
l When using a variable to set the value of an input parameter, constraints related to scope apply to
avoid user-specific data to be used as inputs in a context where the query result(s) will be accessible
to other users.

The following matrix summarizes the list of valid combinations of scopes:


Scope of the variables
Scope of the Scope of the Sql
used to set input para-
mapped variable query
meters
Local Local Local, Shared
Shared Shared Local, Shared
Session Session Local, Shared, Session
Local, Shared, Session, Client-
Client-context Client-context
context

How to configure the Data Selection

1. Open the configuration dialog for the variable and select the Sources tab.
2. Select Sql Variables as the Source. Sql Variables is only available if one or more Sql connections have
been configured. Show picture

- 956 -
3. Select the Sql connection and the subordinate Sql query. The appearance of the Source tab is now mod-
ified to display three more sub-tabs, Row selection, Mapping and Parameters. Show picture

4. Even though the configuration is only partially completed, it is possible to test the query using the
Execute button. If the query requires any parameters, you are prompted to enter them. The results
from the query are displayed in the result field. Testing the Sql Query has the advantage of dis-
covering the Field Names that are returned by the query. The field names are used in the other con-
figuration tabs. In the following screen shot the field name that has been discovered is BIT. It is
followed, in parenthesis, by the field type. Show picture

- 957 -
The Traces button is used to enable trace information in the Event Viewer (F7) that can be useful when
debugging a particular query.

How to configure the Row Selection


The row selection can be either by Position, Field value, or All rows. Show picture

l By position - Typically used with wide table format where each data variable appears in a separate
column. Selects a row by its actual position in the query results. You can enter a position (1 by default
to select the first record), or select Last row to select the last returned row.
l By field value - Typically used with a narrow table format where one column contain the values and
other columns the metadata of the values. Selects a row by the value of a particular column (lookup).
If the Sql read query has been tested using the Execute button, the Field name and Value list boxes
are populated with the possible values.
l All rows - Typically used with a wide table format where the Sql read query has been configured to
return several rows of the same value. Selects and processes all data rows.

When using the By position option, keep in mind that any ORDER BY clause in your Sql query affects
the result you will obtain. In most cases, changing the ORDER BY clause in the query requires chan-
ging the value of Position in the variable mapping.
See the topic Sql Variables Examples for a detailed explanation and examples.

How to configure the Mapping

- 958 -
The Mapping tab is used to map the fields containing the value, and optionally the timestamp and the status
(quality) to the variable. Mapping is achieved with an expression taking advantage of the FieldValue() func-
tion with the name of the column of interest as argument. The expression is entered using the Expression
Editor dialog. See the topic Using the Expression Editor. If the Sql read query has been tested using the
Execute button, clicking the button at the top left of the dialog displays a list of the available fields. Show pic-
ture

The expression must contain the function FieldValue(), which selects the field. In addition, it can also con-
tain other expression elements should there be any requirement to manipulate the value before it is used to
update the variable value (resp. timestamp or quality).
Mapping the status (quality) of the variable can be achieved by using any of the following constants:

l VAR_QUALITY_GOOD - To set the variable status to valid


l VAR_QUALITY_NS - To set the variable status to invalid
l VAR_QUALITY_NSCOM - To set the variable status to invalid due to communication error

If the Timestamp variable property is not mapped to a field from the query result, it will be set by C-CURE
Building Management System and managed accordingly. The same goes for the Quality property.
Because there is a huge variety of timestamp formats, mapping the timestamp will eventually
requires a conversion.
See the topic Expression functions for timestamp manipulation for more information about the
expression functions available for date and time conversions.

Parameters
If one or more parameters are found in the Sql read query, they are listed in the Parameters tab and must
be substituted using an expression. A parameter can only be substituted once. If the Sql read query is sub-
sequently used in another variable, the parameter substitution is pre-configured and the field is dimmed
indicating it is read only.
A Parameter expression can be a property of the variable (domain, Extended attribute etc.) or an expression
using the standard functions and operators of the expression engine. The button at the top left of the expres-

- 959 -
sion editor dialog displays a list of the variable properties that can be substituted. Show picture

Parameters can only be set once - the first variable in which a Read Query is used will set the value of the
parameter.
For example, Register01 has the domain Security. Register01 uses a Read Query containing ?Param01 con-
figured to use the Domain. The value substituted for ?Param01 will be Security. Register02 uses the same
Read Query. Irrespective of the domain of Register02, Security will be used as the value for ?Param01.
If a parameter is mapped with an indirection on a Text extended attribute so that it is set with a variable
value, the adequacy of the scope of the variable with regards to the scope of the Sql query is only verified at
run-time. It is not checked at configuration time, nor at start-up time.

Expression functions exclusively for Sql Read Query variable mapping


Function and syntax Operation
Return the value of the field QueryResultFieldName that
belong to the result of a Sql Read Query. The format of the
FieldValue(QueryResultFieldName)
returned value is the same as that of the field.
Example: FieldValue("Temperature")

Functions exclusively for Sql Read Query substitution parameters


The following functions all return a particular property of the concerned variable.
Function and syntax Variable property
Timestamp. Type VT_R8.
TS
Example: 43895.647743055553
Name. Type VT_BSTR.
Name
Example: "Building01.Floor01.Room01.Temperature"
Value. The type is either VT_BSTR (Text variable) or VT_R8
Value (Register or Bit variable).
Example: 21.75
Quality. Type VT_UI2.
Quality
Example: 192
Domain. Type VT_BSTR.
Domain
Example: "BUILDING01"
Nature. Type VT_BSTR.
Nature
Example: "HEATING"

- 960 -
Description. Type VT_BSTR.
Description
Example: "Room 101 measured temperature"
Value of the variable in terms of its associated label. Type VT_
AssocLabel BSTR
Example: "Running"
Alarm level. Type VT_I2.
AlarmLevel
Example: 1
Units. Type VT_BSTR.
Units
Example: "Deg °C"
Extended text attribute 03 to 16. Type VT_BSTR.
Example 1: TextAttr05 > "Build-
TextAttrXX (03 to 16)
ing01.Floor01.Room01.Temperature"
Example 2: TextAttr06 > "Help.PDF"
Deferred extended text attribute 03 to 16. Type VT_BSTR.
TextIndAttrXX (03 to 16)
Example: "21.75"
Complete extended binary attribute. Type VT_UI4.
BinAttr
Example: 128
The value of the specific bit of the extended binary attribute.
BinAttrXX (01 to 30) Type VT_BOOL.
Example: BinAttr01 > 0

Traces
The Traces button allows you to enable diagnostic trace messages. Each trace generates specific messages
that are logged in the Trace Files and displayed in the Event Viewer dialog (F7).

l Trace 1: Custom - General - Enable general traces related to the activity between the Variable Man-
ager and the Sql variable driver.
l Trace 2: Custom - Details - Enable detailed traces related to the activity between the Variable Man-
ager and the Sql variable driver.
l Trace 3: Custom - Performances - Enable traces related to performances of the Sql variable driver.
l Trace 4: Sql variable driver - Performances - Enable traces related to performances of the Sql query
results processing.

- 961 -
Sql Variables mapping examples
See the topic Supported Table Formats for more information on table formats.

Reminder. The row position number starts at zero.

Wide table format


Each data appears in a separate column. A typical Sql read query returns the following table.
col_Tem-
col_Ts col_Humidity col_Wind …
perature
11/01/2019 10h02 22.5 64 17 …
We want to map the variable @Temperature to the data in the column col_Temperature.
In the Row Selection tab, the row is selected as By position.

In the Mapping tab, only the Value is mapped. As the timestamp is not mapped, it is provided by C-CURE
Building Management System.

Narrow table format


One column contain the values and other columns the context of the value. A typical Sql read query returns
the following table.
col_Ts col_Name col_Value col_Quality
11/01/2019 10h00 Wind 39 192
11/01/2019 10h03 Temperature 22,5 192
11/01/2019 10h05 Humidity 64 192
We want to map the variable @Temperature to the data in the column col_Name in the row that contains
"Temperature".
In the Row Selection tab, the row is selected as by field value.

In the above example, this will use the data in row two. If we had chosen "Humidity" this would use the data
in row three etc.
In the Mapping tab, the Value is mapped. As the timestamp is not mapped, it is provided by C-CURE Building
Management System.

Wide table format

- 962 -
Each data variable appears in a separate column. The Sql read query has been configured to return several
values for the same variable producing the following table.
Col_Id Col_Ts col_Temperature
1 2020/06/23 10:00:00 20
2 2020/06/23 11:00:00 22
3 2020/06/23 12:00:00 25
We want to map the variable @Temperature to the data in column col_Ttemperature. As the variable is
trend recorded, we also want to use the timestamps in column col_Tsemperature.
In the Row selection tab, the row is selected as each row.

In the Mapping tab, both the Value and Timestamp are mapped.

Each time the query is executed, all rows are browsed and recorded. The above example would produce
three lines in the archive unit.
20 with the timestamp 2020/06/23 10:00:00
22 with the timestamp 2020/06/23 11:00:00
25 with the timestamp 2020/06/23 11:00:00

- 963 -
Linking a Variable to an External Source

From version 6.05 onwards External variables are no longer used. External variables, and this
topic, are included for backwards compatibility only.
The value of a variable can be linked to the value of a variable with the same name in another C-CURE Build-
ing Management System on a different computer. The computers are connected using a local area network.
The station on which the value is produced, i.e. the variable has an equipment, OPC etc. source, is called the
server. The station on which the value is consumed is called the client. In practice, a station can be both cli-
ent and server, consuming some values and producing others.
To configure a variable so that it consumes a value from another station the Source property (in the Source
tab) is set to External and you enter the number of the station from where the value is produced in the Sta-
tion number field.

- 964 -
Scaling and Adding a Deadband to Register Variables
Register variables that have a value sourced from outside C-CURE Building Management System have addi-
tional properties to scale and bias the value and to incorporate a deadband. These properties are found in
the Advanced tab.

Scaling a register variable


When using analog values it is frequently the case that the representation of the value in the equipment is
not in engineering units. For example, a temperature that has a range from -10 to 40 DegC might be rep-
resented by a value of 0 to 4096.
To scale and bias the value of a register variable, so that it is in engineering units, you enter the Minimum
value and Maximum value in engineering units in the General tab and the Device minimum value and Device
maximum value in the Advanced tab. C-CURE Building Management System automatically performs the
scale and bias calculation each time the value in the equipment changes. Show picture

Adding a deadband
The deadband is how much the value of the variable must change before it is recognized as a change by the
rest of C-CURE Building Management System. The use of a deadband is essential to remove the jitter (con-
stant changing in value) caused by the primary transducer and/or the A to D converter used by the equip-
ment to convert the analog signal to its digital equivalent. As C-CURE Building Management System is
change driven, if you do not use a deadband a lot of processing time will be wasted dealing with insignificant
changes in value.

- 965 -
The deadband is configured for each variable in the Advanced tab of the variable's properties dialog. Show
picture

The value for the deadband can be entered in three ways selected by the Type drop down list box. The three
options for Type are Absolute, Range percent and Value percent.

l Absolute - The deadband is entered in engineering units. For example, if the deadband was 10 the
value would have to change by 10 or more before it was recognized.
l Range percent - The deadband is entered as a percentage of the range. For example, if the range was
0 - 4000 and the deadband was 10, the value would have to change by 400 or more before it was recog-
nized.
l Value percent - The deadband is entered as a percentage of the value. For example, if the deadband
was 10 and the current value of the variable was 400, the value would have to change by 40 or more
before it was recognized.

In a networking architecture, the Deadband property is distributed. The behavior only depends on
how the deadband is configured on the producer station of a variable. Changing it on a client station
that is only a consumer of a variable has no effect.

- 966 -
HMI Variables
HMI variables are available in version 12 of C-CURE Building Management System onwards. HMI variables
appear in the variables tree along with the I/O and internal variables.

How to create HMI variables


HMI variables can be created from the variables tree in the Application Explorer, from the Application Archi-
tect and using the SCADA Basic instruction VARIABLE. The configuration of HMI variables is saved in the file
HMIVariables.Dat.

HMI variable's properties


The properties of HMI variables behave in the same manner is the equivalent property of I/O and internal
variables.

l All HMI variables have the Name, Description, Scope and Associated Label properties. Scope is limited
to Local Station, Client Context or Session Context.
l HMI text variables have the Maximum Size property.
l HMI register variables have the Units, Format, Minimum Value and Maximum Value properties.

All HMI variables can be forced, even though they do not have the Command or Control property.

What is the difference between an HMI variable and an internal variable with scope client or
session context
HMI variables:

l Can only be used in mimics and SCADA Basic scripts.


l They have no extended attributes, log, trend or alarm capability.
l In SCADA Basic, creation and writing is synchronous unlike I/O and internal variables.
l They consume much less memory and are faster to load.

- 967 -
Temporary Variables
Starting with version 12, HMI variables supersede temporary and mimic variables. They are con-
sidered obsolete, and should not be used in new projects. Use HMI variables instead.

Temporary variables
Temporary variables are created using the SCADA Basic instruction TEMPORARY_DB. They are similar in
behavior to HMI Variables except for the following:

l They do not appear in, and cannot be selected from, the variables tree.
l They are temporary. That is they only exist from when they are created using TEMPORARY_DB and
until C-CURE Building Management System is shut down.
l Their scope cannot be set and they behave as if the scope was Local Station.

Mimic variables
Mimic variables, also known as percent variables, are created by the action of entering a name in the vari-
able field of an animation. They are differentiated from other variables by post-fixing the name with a %
character which tells C-CURE Building Management System to create it and not to attempt to reference a
variable of that name in the variables tree. Show picture

l Mimic variables have no other property other than their name and value and only exist when a mimic
declaring them is open. Because of this, they have very limited use.
l Their type is defined according to the animation where they are first encountered.
l Their scope cannot be set and they behave as if the scope was Local Station.
l They do not appear in, and cannot be selected from, the variables tree.

- 968 -
Using the Variable Selector
The Variable Selector displays C-CURE Building Management System's variables tree in a dialog box that is
independent of the Application Explorer. It is the developer's main tool to select a variable name when
required as a configuration property. For example, in an animation. It can also be used to view the current
value and quality of any variable.
The Variable Selector is available from an ellipsis button adjacent to any field where the name of a vari-
able has to be entered. It can also be opened using the menu command Configure.Variable.Selector. Show
Picture

The Variable Selector has two panes. The left displays the branches and the right any variables for the selec-
ted branch. Branches and variables are displayed in alphanumeric order.
The right pane has several columns that can be turned on and off from the right click context menu.

l Name - The name not including the branch. Always displayed.


l Description - The description as entered in the Description property of the variable's configuration.
l Value - The current value.
l Timestamp - The time that the value last changed.
l Quality - The quality or status of the variable.
l Watchcount - The number of processes subscribed to the variable. See explanation below.
l Domain - The domain as entered in the Domain property of the variable's configuration.
l Nature - The nature as entered in the Nature property of the variable's configuration.

Filtering the variables that are displayed in the right pane


The variables that are displayed in the right pane can be filtered using the following tools.

l Variable type and kind - Bit, alarm, register or text, HMI variables.
l Domain and/or nature.
l Source - Filter by the source of the variable, internal, external plus the name of any data acquisition
networks that have been configured.

Variable Quality
The quality provides an indication of the validity of the variable's value. A variable may still have a valid
real-time value even with a quality other than good. When a variable is used in an animation, if the quality is
anything other than good, a special color or a question mark will be displayed instead of its value. The fol-
lowing abbreviations are used to indicate a variables' quality.
Abbreviation Condition
Good - Indicated by a null value in the quality field.
NS Not set (invalid) - The variable may still have a value but it is no longer being updated.
DE or NS DE Dependent - The variable is invalid because the variable from which it is derived is disabled.
NS indicates that the value is not initialized, typically during the start-up for internal vari-

- 969 -
ables.
EXP or NS EXP Expression - The variable is invalid because one or more variables in the expression from
which it is derived is invalid. NS indicates that the value is not initialized, typically during
the start-up for internal variables.
OP or NS OP Operator - The variable has been masked by the operator. This will happen if an Alarm is dis-
abled in an Alarm Display. NS indicates that the value is not initialized, typically during the
start-up for internal variables.
M[n] or NS M Masked - The variable has been masked by a SCADA Basic script. The level of the mask [1
[n] to 4] is also shown. NS indicates that the value is not initialized, typically during the start-up
for internal variables.
DIS or NS DIS Disabled - The variable has been disabled by using the inhibit tick box in its configuration or
a SCADA Basic script.
NS COM Communication - The variable source is external, but unavailable (typically due to a com-
munication failure).
NS L< The value of the variable is less than its specified minimum.
NS L> The value of the variable is greater than its specified maximum.
NS FMT Format error. For example, a floating-point variable does not confirm to the IEEE format.
NS WD Equipment life indicator not refreshed. (When using specialist variable treatment -
WATCHDOGEQT.)
NS LAN Not Set (invalid) - Displayed on a client for a variable that has NS quality on the server.
NS COM LAN Communication - Displayed on a client for a variable that has NS COM quality on the server.
NS SPEC Unavailable (invalid for specific reason) - In cases a quality flag is provided by the device,
the variable is considered invalid because the configuration requires to set the status to
Unavailable for the last received quality flag.

About the Watchcount


The watchcount property is the number of processes or modules, that are currently subscribed to the vari-
able. The following processes each add to the watchcount:

l Permanent scan - The Permanent Scan attribute is set either in the variable's properties or via the
global property in Variable Settings.
l Used in a mimic - Each time the variable is used in an open mimic,
l Event - Each event that is attached to a variable,
l Expression - Each expression in which the variable is used,
l A third-party component connected and subscribed via a server interface such as the OPC server, the
Web Services Toolkit...

- 970 -
Population filters

- 971 -
Population Filters Overview
A Population is a filter that can be applied to the variables managed by a station, in order to control the
information a user can access during operations. Population filters are combined with user rights to determ-
ine the set of accessible information. Such type of filter can be changed on the fly during operations and has
been designed to accommodate needs such as:

l Be able to hide some information during emergency or maintenance situations, in order to minimize
the cognitive load for users.
l The other way round, be able to show additional information or allow particular control when the situ-
ation requires it.
l Be able to modify the subset of information accessible to a user depending on its role and the day. For
example, the case of a security gate station, with most alarms hidden during the day, and displayed at
night or on week-ends when the other teams are off.

The following features of C-CURE Building Management System support populations filters:

l Alarm viewer - If alarms are excluded by the population filter, then these alarms are not displayed in
alarm viewers.
l Log viewer - If variables or alarms are excluded by the population filter, then corresponding logged
events are not displayed in log viewers.
l Log printers - If variables or alarms are excluded by the population filter, then corresponding logged
events are not printed.
l Archiving - It is possible to filter data archiving for logged events according to a population filter.
l User commands - Users cannot send commands for variables excluded by the population filter.
l Setting values in SCADA Basic - It is not possible to set values for variables excluded by the pop-
ulation filter.
l User actions on alarms in SCADA Basic - Users cannot send commands on alarms excluded by the pop-
ulation filter.

A population can be created from the Population node in the Application Explorer or by using the SCADA
Basic instruction POPULATION. The SCADA Basic instruction, STATION_FILTER is used to apply a population
so it can be dynamically applied depending on a wide range of criteria determined by the application
designer.
The maximum number of populations that can be created is 512.

How a population is defined


A population is defined by including, and/or excluding, variables using one or more of the following variable
properties.

l Type -, Bit, Alarm, Register or Text.


l Source - Internal, Equipment, DDE, OPC, IEC 60870-5, DNP3, IEC 61850, LonWorks or SNMP.
l Binary attribute
l Domain (text attribute #1)
l Nature (text attribute #2)
l Text attributes #3 to #16
l Full name
l Branch (part of the name)

For example a Population could include all register variables with an equipment source with the Domain
Tank1 or Tank2, not having the Nature Electrical.
Population filtering based on the source is not supported to filter in log viewers (and log printing)
when data are archived using a database archive unit (HDS).

- 972 -
When you create a population it appears as an Sql like expression comprising one or more lines either includ-
ing (IN) or excluding (NOT EXISTS) property values. Show picture

A note about the Sql terminology used in Population


C-CURE Building Management System supports the following Sql operators when defining a population.

l IN - Multiple OR condition.
l NOT - Negate a condition.
l EXISTS - Condition is met.
l AND - Two or more conditions.

NOT and EXISTS are used together as an exclusion.

In version 12 the NOT EXISTS operator replaces the OUT operator used in previous versions. The
behavior is unchanged and applications that use population that were developed with previous ver-
sions are unaffected.

- 973 -
How to Configure a Population
1. Select the Populations node in the Application Explorer (Variables.Populations) and from the task list
select Add a population. The Population Creation dialog opens. Show picture

a. Enter a name for the population in the Name field. The name is used when referencing the pop-
ulation in SCADA Basic.
b. Enter an optional description. This only appears in the Application Explorer but can be useful
when identifying the configuration item later.
2. Select the Design button. The Variable Query Designer dialog opens. Show picture

3. Configure the first line of the expression.


a. Select the Variable property. Clicking in the field displays a drop down list from where the prop-
erty is selected. A list of properties can be found in the Population Filters Overview topic.
b. Select the Operator from either IN or NOT EXISTS.
c. Select the Value. This field is context sensitive and the list of available values depends on what
was selected for the Variable property. For example, if you selected Domain, a list of available
Domains is displayed.
d. To select further values, click the column title Value- click to add and another column appears
from where you can select another value.
e. When all the values have been selected, select the keyboard Enter key and the line appears in
the Query Expression box at the bottom of the dialog.
4. Repeat step (3) to add further lines and click OK when finished. The Variable Query Designer closes.

- 974 -
5. The configured expression appears in the Population Creation dialog. Show picture

6. Click Apply to confirm the configuration and OK to close the dialog.

A Variable property can only appear once in an expression.

It is possible to directly enter the Query expression but there is no syntax check until you apply the
configuration. For that reason, it is recommended only for making minor changes to an existing
expression.

You can delete a line in the Variable Query Designer dialog by clicking in the column marked X.

- 975 -
The Expression Engine

- 976 -
Expression Engine Overview
The Expression Engine provides the capability for C-CURE Building Management System to calculate a value,
using variables, functions and operators, without the need to use one of the programming languages. For
example:
EXP(LOG(INLET.PRESSURE)/2)
Expressions can be used in the following contexts.

l To compute the value of a variable based on a combination of constant values and the value of other
variables. Known as Expression On Variable.
l To compute a value for display in a mimic. Either by entering an expression directly in the variable
field of an animation, or by creating an Expression Template.
l In the Application Architect for the purpose of differentiation by computing property values at gen-
eration time.
l In an add-on developed using the SvMgr toolkit. For example, the MQTT add-on makes extensive use
of the Json function for message payload deserialization and mapping to variable properties (VTQ).
l In Data Export for computing Folder, Workbook, Template and Sheet names.
l In the mapping of Sql variables to define how variable properties and fields returned by Sql requests
are linked together.

For ease of use, an Expression Editor is provided when configuring Expression On Variable, Expression Tem-
plates, in the Application Architect and in Data Export. The Expression Editor includes features such as
keyword auto-completion. The available variables, functions and operators depend on the context in which
the Expression Editor is used. See Using the expression editor for more information. Show picture

When entering an expression directly in an animation, or in an add-on developed with the


SV Manager SDK, the expression must be entered directly by typing in the string.

- 977 -
How to Add an Expression Template or Expression on Variable
The process to add either an Expression Template or Expression on Variable is very similar.

1. Select the Expressions folder in the Application Explorer configuration tree and, from the task list,
select Add an expression template or Add an expression on a variable as appropriate. A dialog to con-
figure a new expression will open.
2. Using the General tab configure the expression general properties. Show picture

a. Enter a name for the expression in the Name field. The name is used when referencing the
expression in an animation.
b. Enter a description of the expression. The description appears in the contents pane when the
Expressions folder is selected. The description is optional.
c. If creating an Expression on Variable.
l Enter a branch in the Branch field. The branch is prefixed to all variables used in the
expression including the result. The ellipsis button adjacent to the Branch field opens the
Branch Selector dialog. The branch is optional.
l Select the Result variable in which the result of the expression will be placed. The result
variable must be a register or bit. It does not need the control property set. The ellipsis
button adjacent to the Result field displays the Variable Selector dialog
d. If the project has a multi-station configuration select the Server list name. The expression will
only be computed on stations that appear in that list.
e. Select an optional Enabling bit to enable or disable the expression. The bit must be set to 1 to
enable the expression calculation.
f. Tick the Enable box. It must be ticked for the expression calculation to be enabled.
3. Select the Expression tab and enter the expression. See the topic Expression functions and operators.
You can select any variables, which are to be included in the expression, using the Variable Selector
tool above the expression field. Show picture

4. Click OK to confirm the configuration and close the dialog.

- 978 -
Expressions on variables and expression templates are limited to 32 000 characters and 40 vari-
ables.

An expression on variables or an expression template is evaluated each time any of the variables
within it changes. This makes expressions preferable to calculating a value in a script where you
would have to arrange for it to be executed each time any value changes.

Text variables cannot be used as the result or as part of the expression in the case of expressions on
variables and expression templates.

- 979 -
How to use Variables in Expressions
Normally, when using a variable in an expression, you simply include the variable name in the expression.
For example:
EXP(LOG(INLET.PRESSURE)/2)
Where INLET.PRESSURE is the variable name.
However, some variations are useful to know.

Using variable attributes in an expression


In addition to using variable values, you can also use extended attributes in an expression. To use an exten-
ded attribute you append the attribute reference to the variable name as follows.

l To use a text attribute you append :An where n is the numeric reference of the text attribute. Example
@MYBRANCH.MYVAR:A3
l To use a binary attribute you append :Bn where n is the numeric reference of the binary attribute.
Example @MYBRANCH.MYVAR:B1

Using the ?.VarName syntax


Unless prefixed with the @ character, variable names that you include in an expression are relative to any
branch being used. However, it is possible to reference variables starting back from the root of the branch
hierarchy by using the ?.VarName syntax. For example, the expression is used with the branch Pro-
cessB.Machine2.Engine1 but you need to use the variable ProcessB.NumRunning. In that case, you can use
?.NumRunning in the expression. The question mark tells the expression engine to start from the root level
in the branch hierarchy when resolving the variable name and in this example, it would result in the variable
name ProcessB.NumRunning being used in the expression at run-time.
You can use more question marks to address all intermediate levels in the branch hierarchy. For example,
?.?.?.VarName would go down three levels from the root.

Using the square bracket [] syntax


A variable name must be enclosed in square brackets if it starts with a number, includes a special character
such as the * (star) or starts with a reserved string (such as TS_Local or TS_Utc). This is so that the Expres-
sion Engine correctly interprets it as a variable name and is useful when you need to use alarm counters or
other variables that do not strictly follow the variable naming rules in expressions.
For example:
If 01_BranchXYZ.Var1 and 01_BranchXYZ.Var2 are 2 variables in a project, an expression such as [01_
BranchXYZ.Var1] + [01_BranchXYZ.Var2] will be parsed properly by the expression engine whereas 01_
BranchXYZ.Var1 + 01_BranchXYZ.Var2 will cause a failure.

- 980 -
Expression Main Functions and Operators
The following tables list the most usual functions and operators supported by the Expression Engine. Note
that not all functions and operators are available in all expression contexts.

Base math functions


Function and syntax Operation
Abs(Var) Absolute value of Var.
Ceil(Var) Smallest integer greater than or equal to Var.
Ceiling(Var) Smallest integer greater than or equal to Var.
Exp(Var) e raised to power of Var.
Floor(Var) Largest integer less than or equal to Var.
IEEERemainder(Var1, Var2) Remainder after dividing Var1 by Var2.
If(Condition,Val_True, Val_False) If Condition is true returns Val_True, else returns Val_False.
Log(Var) Natural logarithm of Var.
Log(Var1, Var2) Logarithm of Var1 using base Var2.
Log10(Var) Logarithm of Var using base 10.
Max(Var1, Var2[, Var3,...,VarN]) The greater of Var1, Var2, Var3...VarN.
Min(Var1, Var2[, Var3,...,VarN]) The lesser of Var1, Var2, Var3...VarN.
Power(Var1, Var2) Var1 raised to the power of Var2.
Round(Var1) Rounds Var1 to the nearest integer.
Round(Var1, Var2) Rounds Var1 to Var2 decimal places.
Sign(Var) The sign of Var. -1 if it is negative +1 if it is positive.
Sqrt(Var) Square root of Var.
Truncate(Var) Integer part of Var.

Trigonometric functions
Function and syntax Operation
Acos(Var) Angle (in degrees) whose cosine is Var.
Asin(Var) Angle (in degrees) whose sine is Var.
Atan(Var) Angle (in degrees) whose tangent is Var.
Cos(Var) Cosine of Var (angle in degrees).
Pi() Return a rounded value of Pi.
Sin(Var) Sine of the angle Var (angle in degrees).
Tan(Var) Tangent of the angle Var (angle in degrees.
ToDegrees(Var) Convert the value Var from radians to degrees.
ToRadians(Var) Convert the value Var from degrees to radians.

String handling functions


Function and syntax Operation
Return an integer representing the right or left digits of the
NumIndex(Var[, Bool1]) string depending on the value of Bool1. By default, Bool1 is
false and the function returns the right index.
Compare 2 strings Str1 and Str2 and returns an integer that
indicates their relationship to one another, taking the case into
StrCompare(Str1, Str2) account.
Examples: StrCompare('cba', 'abc') = 1, StrCompare('abc',
'abc') = 0, StrCompare('abc', 'cba') = -1
StrCompareNoCase(Str1, Str2) As StrCompare but ignoring the case.
Return true if Str2 is a substring of Str1, return false oth-
StrContains(Str1, Str2[, Bool]) erwise. If Bool is true, string comparison is case sensitive, if it
is false, string comparison is not case sensitive (default true).
Compare 2 strings Str1 and Str2 and returns 0 if the strings
StrEqual(Str1, Str2)
are different or 1 if they are the same, taking the case into

- 981 -
account.
StrCompare('str1', 'str2') = False, StrCompare('str1', 'STR1')
= False, StrCompare('str1', 'str1') = True
StrEqualNocase(Str1, Str2) As StrEqual but ignoring the case.
Return a substring of Str1 from the position Num1 delimited by
the characters Chr1.
StrExtract(Str1, Chr1, Num1)
Examples: StrExtract('My.name.is.John', '.',1) = 'name',
StrExtract('My.name.is.John', '.',2) = 'is'
Return a string representing the right or left digits of Str1
StrIndex(Str1[, Bool]) depending on the value of Bool. By default, Bool is false and
the function returns the right index.
Return the index of the first occurrence of the string Str2 in
StrIndexOf(Str1, Str2)
Str1. Returns -1 if Str2 is not found.
Return the index of the last occurrence of the string Str2 in
StrLastIndexOf(Str1, Str2)
Str1. Returns -1 if Str2 is not found.
StrLeft(Str1, Num1) Return the leftmost Num1 characters of the string Str1.
StrLen(Str1) Return the number of characters in Str1.
As StrPadLeft, but Chr1 is optional, and if omitted, Str1 is left
StrPadInt(Str1, Num1[, Chr1])
padded with zeroes.
Left align the characters of Str1, padding on the left with the
StrPadLeft(Str1, Num1, Chr1) character Chr1 to the specified total length Num1.
Example: StrPadLeft('abcdef' , 10 ,'x') = 'xxxxabcdef'
Right align the characters of Str1, padding on the left with the
StrPadRight(Str1, Num1, Chr1) character Chr1 to the specified total length Num1.
Example: StrPadLeft('abcdef' , 10 ,'x) = 'abcdefxxxx'
Return Str1 less the characters from the start position Num1
StrRemove(Str1, Num1[, Num2]) to the end position Num2.
Example: StrRemove('abcdefgh', 3, 2) = 'abcfgh'
StrReplace(Str1, Str2, Str3) Return Str1 with all occurrences of Str2 replaced by Str3.
Return a substring of Str1 from the position Num1 delimited by
the characters Chr1, starting from the end of Str1.
StrReverseExtract(Str1, Chr1, Num1)
Examples: StrReverseExtract('My.name.is.John', '.',1) = 'is',
StrReverseExtract('My.name.is.John', '.',2) = 'name'
StrRight(Str1, Num1) Return the rightmost Num1 characters of the string Str1.
Return the substring of Str1 starting at the index position
StrSubstring(Str1, Num1)
Num1.
Return the substring of Str1 starting at the index position
StrSubstring(Str1, Num1, Num2)
Num1 and has a length of Num2.
StrToLower(Str1) Return all characters of Str1 as lower case.
StrToUpper(Str1) Return all characters of Str1 as upper case.
Return Str1 with all leading and trailing occurrences of a set of
characters specified in Str2 removed. If Str2 is not specified,
StrTrim(Str1[, Str2])
the function removes leading and trailing spaces.
Example: StrTrim(' *abcdefgh* ', ' *a') = 'bcdefgh'
Return Str1 with all trailing occurrences of the set of char-
acters specified in Str2 removed.
StrTrimEnd(Str1, Str2)
Example: StrTrimEnd('123abc456xyz789', '123456789') =
'123abc456xyz'
Return Str1 with all leading occurrences of a set of characters
StrStrimStart(Str1, Str2)
specified in Str2 removed.
Return the character string corresponding to Value. Value can
be of any type.
ToStr(Value)
For example, if the Value input is of type boolean, ToStr() will
return the string 'true' or 'false'.

- 982 -
Hexadecimal string handling functions
Function and syntax Operation
Base64StrToHexStr(Var) Convert the Var base64 string to a hexadecimal string.
Extract the bit (0 or 1) at the position defined by iPos and iOff-
set in the hexadecimal string Var.
HexStrToBit(Var, iPos, iOffset)
iOffset is the offset of the bit within the single hexadecimal
character specified by IPos.
Extract the byte at the position iPos in the hexadecimal string
HexStrToByte(Var, iPos)
Var.
Extract the float (IEEE single precision value) at the position
HexStrToFloat(Var, iPos)
iPos in the hexadecimal string Var.
Extract the Int16 (16 bit value) at position iPos in the hexa-
HexStrToInt16(Var, iPos)
decimal string Var.
Extract the Int32 (32 bit value) at position iPos in the hexa-
HexStrToInt32(Var, iPos[, iSize]) decimal string Var.
iSize is the number of bytes to extract (optional - default 4)
Extract the nibble (4 bit value) at position iPos in the hexa-
HexStrToNibble(Var, iPos)
decimal string Var.
Extract the UInt16 (unsigned 16 bit value) at position iPos in
HexStrToUInt16(Var, iPos)
the hexadecimal string Var.
Extract the UInt32 (unsigned 32 bit value) at position iPos in
HexStrToUInt32(Var, iPos[, iSize]) the hexadecimal string Var.
iSize is the number of bytes to extract (optional - default 4)

Swapping functions
Function and syntax Operation
Reverse the position of nibbles within the decimal value Var.
ReverseNibbles(Var) Example: ReverseNibbles(12345) = 37635 (12345 = 0x3039 -
> 0x9303 = 37635)
Swap the byte order of the decimal value Var.
SwapBytes(Var) Example: SwapBytes(12345) = 14640 (12345 = 0x3039 ->
0x3930 = 14640)
Swap the nibble order for each byte of the decimal value Var.
SwapNibbles(Var) Example: SwapNibbles(12345) = 915 (12345 = 0x3039 ->
0x0393 = 915)
Swap the word order of the decimal value Var.
SwapWords(Var) Example: SwapWords(12345) = 809 041 920 (12345 = 0x3039
-> 0x30390000 = 809 041 920)

Operators
Operator and syntax Operation Precedence Notes
Used to control the order of execution.
() Parentheses 1
Example: (Var1 * Var2) / (Var1 + Var2).
Bitwise operators, including left and right shift,
Bitwise operators
discard the fractional part of any values.
~ Var1 Bitwise NOT 2
BNOT Var1 Bitwise NOT 2
Var1 & Var2 Bitwise AND 8
Var1 BAND Var2 Bitwise AND 8
Var1 | Var2 Bitwise OR 10
Var1 BOR Var2 Bitwise OR 10
Var1 ^ Var2 Bitwise XOR 9
Var1 XOR Var2 Bitwise XOR 9
Var1 << Var2 Left shift 5

- 983 -
Var1 LSHIFT Var2 Left shift 5
Var1 >> Var2 Right shift 5
Var1 RSHIFT Var2 Right shift 5
Arithmetic operators
-Var1 Negate 2
Var1 * Var2 Multiplication 3
Var1 / Var2 Division 3
Var1 % Var2 Modulus 3 No longer supported - Use MOD instead.
Var1 MOD Var2 Modulus 3
Var1 POW Var2 Power 3
Var1 + Var2 Addition 4
Var1 - Var2 Subtraction 4
Comparison operators Comparison operators return 1 if true, else 0.
Var1 == Var2 Equality 7
Var1 = Var2 Equality 7
Var1 != Var2 Inequality 7
Var1 < Var2 Less than 6
Less than or
Var1 <= Var2 6
equal
Var1 > Var2 Greater than 6
Greater than
Var1 >= Var2 6
or equal
Equality
against at
Var1 in (value1, value2,...) 7 Equivalent to multiple ORed equality tests.
least one of
many values
Logical operators are intended for use with bit
Logical operators variables. If used with register variables only
the LSB is taken into account.
!Var1 Logical NOT 2
NOT Var1 Logical NOT 2
Var1 || Var2 Logical OR 12
Var1 OR Var2 Logical OR 12
Var1 && Var2 Logical AND 11
Var1 AND Var2 Logical AND 11

Expression Examples
Motor1.Stop & Motor1.Start | Motor1.Fault
(Inlet.Flow1 + Inlet.Flow2)/100 (note the use of brackets)
Tank1.Temperature & 65520 (masks the first 4 bits of the value)
Sqrt(Inlet.Pressure) (takes the square root)

- 984 -
Expression functions for Referencing an Excel File
The expression engine is able to access the cells of an Excel spreadsheet using the following syntax. To use
a spreadsheet in this manner a File Reference must be configured in the Application Explorer. The File Refer-
ence configures how the file is managed and specifies the alias Name, which is used to reference the spread-
sheet in an expression.
The supported Excel file formats are Xls, Xlsx, Xlsm. Cells are accessed using their numerical address.
Addresses such as A1 and A1:E5 are not supported. The cell index is 1 based.

Functions
See section below for a detailed explanation of the parameters.
If the optional parameters oNullData, szSeparator or svHSeparator are not specified the defaults
from the File Reference are used.

Function and syntax Operation


ExcelGetCell(szReference, szSheetname,
Return the contents of the specified cell.
iRow, iCol[, oNullData])
Return a string containing the contents of a row cells. If the
cell values include characters normally used as cell sep-
ExcelHTextJoin(szReference, szSheetname,
arators, the szEnclosureChar parameter can be used to
iRow[, iFirstCol, iLastCol, szSeparator,
enclose the cell values. If iFirstCol is not set or set to zero, the
oNullData, szEnclosureChar])
join starts at the first column. If the iLastCol is not set or set to
zero, the join ends at the last cell containing a value.
Return a string containing the contents of a column of cells. If
the cell values include characters normally used as cell sep-
ExcelVTextJoin(szReference, szSheetname,
arators, the szEnclosureChar parameter can be used to
iCol[, iFirstRow, iLastRow, szSeparator,
enclose the cell values. If iFirstRow is not set or set to zero,
oNullData, szEnclosureChar])
the join starts at the first row. If the iLastRow is not set or set
to zero, the join ends at the last cell containing a value.
ExcelTextJoin(szReference, szSheetname, Return a string containing the contents of an area of cells. If
iFirstRow, iFirstCol, iLastRow, iLastCol[, the cell values include characters normally used as cell sep-
szHSeparator, szVSeparator, bVertical, arators, the szEnclosureChar parameter can be used to
oNullData, szEnclosureChar]) enclose the cell values.
Search a given row of an array and returns the value of the
ExcelHLookup(szReference, szSheetname,
indicated cell. If iOptimise is set to 0 or not specified, there is
iHLookupIndex, szHLookupValue, iHValueIn-
no optimization. If iOptimise is set to 1 then column optim-
dex[, iOptimise, oNullData])
ization is used (the column retains the same value).
Search a given column of an array and returns the value of the
ExcelVLookup(szReference, szSheetname,
indicated cell. If iOptimise is set to 0 or not specified, there is
iVLookupIndex, szVLookupValue, iVValueIn-
no optimization. If iOptimise is set to 1 then row optimization
dex[, iOptimise, oNullData])
is used (the row retains the same value).
Return the contents of a cell from an array by searching for a
ExcelLookup(szReference, szSheetname, key value in a row and column. If iOptimise is set to 0 or not
iHLookupIndex, szHLookupValue, iVLook- specified, there is no optimization. If iOptimise is set to 1 then
upIndex, szVLookupValue[, iOptimise, row optimization is used (the row retains the same value). If
oNullData]) iOptimise is set to 2 then column optimization is used (the
column retains the same value).
ExcelHMatch(szReference, szSheetname, Look up a value in a row and returns the cell index or 0 if no
iHLookupIndex, szHLookupValue) match.
ExcelVMatch(szReference, szSheetname, Look up a value in a column and returns the cell index or 0 if
iVLookupIndex, szVLookupValue) no match.

Parameters
bVertical Area scan type.
0 or not specified = horizontal scan.

- 985 -
1 = vertical scan.
iCol Index of column to retrieve.
iFirstCol Index of the first column to retrieve.
iFirstRow Index of the first row to retrieve.
iHLookupIndex Index of the row to search.
iHValueIndex Index of the row for which the corresponding value is to be returned.
iLastCol Index of the last column to retrieve.
iLastRow Index of the last row to retrieve.
iOptimise Search optimization.
0 or not specified = no optimization.
1 = column optimization (the col retains the same value).
iRow Index of the line to retrieve.
iVLookupIndex Index of the row / column to search.
iVValueIndex Index of the column for which the value is to be returned.
oNullData Optional parameter containing the value to return if a cell is empty. If not specified,
and a cell is empty, the characters from the Default substitution characters for empty
cells property in the File Reference are used.
szEnclosureChar The character used to enclose cells’ values in the return string.
szHLookupValue The value to search for.
svHSeparator Cell separator. If not specified the character from Default row separator property in
the File Reference is used.
szReference Identifier (name) of the file.
szSeparator Cell separator. If not specified the character from Default column separator property
in the File Reference is used.
szSheetName The sheet name.
szVLookupValue The value to search for.
szVSeparator 0, 'NULL', '\''

Excel File Referencing Examples


The following table represents the Excel sheet used in the examples.
1 2 3 4 5 6 7 8 9
1
2
3 Property01 Property02 Property03 Property04 Property05 Property06
4 Var01 V01-P01 V01-P02 V01-P03 V01-P04 V01-P05 V01-P06
5 Var02 V02-P01 V02-P02 V02-P03 V02-P04 V02-P05 V02-P06
6 Var03 V03-P01 V03-P02 V03-P03 V03-P04 V03-P05 V03-P06
7 Var04 V04-P01 V04-P02 V04-P03 V04-P04 V04-P05 V04-P06
8 Var05 V05-P01 V05-P02 V05-P03 V05-P04 V05-P05 V05-P06
9 Var06 V06-P01 V06-P02 V06-P03 V06-P04 V06-P05 V06-P06
10 Var07 V07-P01 V07-P02 V07-P03 V07-P04 V07-P05 V07-P06
11 Var08 V08-P01 V08-P02 V08-P03 V08-P04 V08-P05 V08-P06
12 Var09 V09-P01 V09-P02 V09-P03 V09-P04 V09-P05 V09-P06
13 Var10 V10-P01 V10-P02 V10-P03 V10-P04 V10-P05 V10-P06
14
15

Expression Result
=ExcelGetCell('FileRef01', 'Sheet1', 7,
V04-P01
3)
=ExcelHTextJoin('FileRef01', 'Sheet1',
NULL:Var01:V01-P01:V01-P02:V01-P03:V01-P04:V01-P05:V01-P06
4)
=ExcelVTextJoin('FileRef01', 'Sheet1', Var01:Var02:Var03:Var04:Var05:Var06:Var07:Var08:Var09:Var10

- 986 -
2, 4)
=ExcelTextJoin('FileRef01', 'Sheet1', 4, 'V01-P01':'V01-P02':'V01-P03'\'V02-P01':'V02-P02':'V02-
3, 6, 5, ':', '\\', 0, 'NULL', '\'') P03'\'V03-P01':'V03-P02':'V03-P03'
=ExcelHLookup('FileRef01', 'Sheet1', 3,
V05-P02
'Property02', 8)
=ExcelVLookup('FileRef01', 'Sheet1', 2,
V03-P02
'Var03', 4)
=ExcelLookup('FileRef01', 'Sheet1', 3,
V04-P02
'Property02', 2, 'Var04', 1)
=ExcelHMatch('FileRef01', 'Sheet1', 3,
4
'Property02')
=ExcelVmatch('FileRef01', 'Sheet1', 2,
6
'Var03')

- 987 -
Expression functions for Referencing an Xml File
The expression engine is able to access elements and attributes of an Xml file using functions based on
XPath. To use an Xml file in this manner, a File Reference must be configured in the Application Explorer.
The File Reference configures how the file is managed and specifies the alias Name, which is used to ref-
erence the Xml file in an expression.

Functions
See section below for a detailed explanation of the parameters.

If the optional parameters oNullData is not specified the default from the File Reference are used.

Function and syntax Operation


XmlGetValue(szReference, Return a string containing the value of the first Xml node that matches the
szXPathQuery[, oNullData]) XPath query. If no match, the default value (oNullData) is returned.

Parameters
szReference Identifier (name) of the file.
szXPathQuery A string representing the XPath query to be executed to extract the Xml node.
oNullData Optional parameter containing the value to return if a value is empty or if no match
could be found. If not specified, the characters from the Default substitution char-
acters for empty cells property in the File Reference are used.

Xml File Referencing Examples


The following data represents the Xml file used in the examples. FileRef01 is the name of the File Reference
corresponding to the Xml file.

<?xml version="1.0"?>
<!-- A fragment of a book store inventory database -->
<bookstore xmlns:bk="urn:samples">
<book genre="novel" publicationdate="1997" bk:ISBN="1-861001-57-8">
<title>Pride And Prejudice</title>
<author>
<first-name>Jane</first-name>
<last-name>Austen</last-name>
</author>
<price>24.95</price>
</book>
<book genre="novel" publicationdate="1992" bk:ISBN="1-861002-30-1">
<title>The Handmaid's Tale</title>
<author>
<first-name>Margaret</first-name>
<last-name>Atwood</last-name>
</author>
<price>29.95</price>
</book>
<book genre="novel" publicationdate="1991" bk:ISBN="1-861001-57-6">
<title>Emma</title>
<author>
<first-name>Jane</first-name>
<last-name>Austen</last-name>
</author>
<price>19.95</price>
</book>
</bookstore>

Expression Result
"Pride And Pre-
XmlGetValue('FileRef01', 'descendant::book[author/last-name=\'Austen\']/title')
judice"
XmlGetValue('FileRef01', 'descendant::book[author/last-name-
"1997"
e=\'Austen\']/@publicationdate')

- 988 -
"The Handmaid's
XmlGetValue('FileRef01', '/bookstore/book[1]/title')
Tale"
XmlGetValue('FileRef01', 'descendant::book[last()]/title') "Emma"

- 989 -
Expression functions for Json parsing
JSON is an acronym for JavaScript Object Notation. The JSON format is often used for serializing structured
data over a network connection, primarily between a web server and a web application, serving as an altern-
ative to XML.
The JsonGetValue function can be used to parse JSON data fragments, and has the following syntax.
Function and syntax Operation
Extract the value of the parameter specified in szPath from the
JsonGetValue(szInputString, szPath)
Json input szInputString. Key name matching is case sensitive.

The use of the JsonGetValue function is best illustrated with an example. Consider the following Json frag-
ment.
{
"stores":[
"Lambton Quay",
"Willis Street"
],
"manufacturers":[
{
"name":"Acme Co",
"products":[
{
"name":"Anvil",
"price":50
}
]
},
{
"name":"Contoso",
"products":[
{
"name":"Elbow Grease",
"price":99.95
},
{
"name":"Headlight Fluid",
"price":4
}
]
}
]
}
Using the JsonGetValue function, it is possible to extract the desired part of the message.

l JsonGetValue(value, 'manufacturers[0].name') -> 'Acme Co'


l JsonGetValue(value, 'Manufacturers[0].name') -> Empty string
l JsonGetValue(value, 'manufacturers[0].products[0].price') -> '50'
l JsonGetValue(value, 'manufacturers[1].products[0].name') -> 'Elbow Grease'
l JsonGetValue(value, 'manufacturers[1].products[22].name') -> Empty string

More advanced examples are available in the MQTT add-on help available in the book Extras and
Add-ons.

Pay attention to the fact that JSON syntax is case sensitive.

- 990 -
Expression Functions for Timestamp Manipulation
The following functions are designed for timestamp conversions and are provided primarily for use with the
Sql Variables driver.

Common parameters
Parameter Description
Timestamp kind, use either predefined constant TS_Utc or TS_
Kind
Local.
Type: String.
Timestamp format string.
Year: YY or YYYY.
Month: MM.
Day: DD.
Format Hours: HH.
Minutes: mm.
Seconds: ss.
Milliseconds: fff, ff or f.
Z; Indicates if the time is UTC or Local.
#: Allows some of the timestamp parts to be ignored.
Type: Double.
A timestamp expressed as the number of milliseconds since
TS
the first of January 1970 at 00:00:00.000, as used by the
SCADA Basic instruction DATETIMEVALUE.

Functions
Function and syntax Operation
Returns the timestamp Str as a double.
Example 1: StrToTS('2020-04-14T17:06:26.423Z', TS_Utc,
'YYYY-MM-DDTHH:mm:ss.fffZ') > 1586883986423
StrToTs(Str, Kind, Format)
Example 2: StrToTS('2020-04-14T17:06:26.423Z', TS_Local,
'YYYY-MM-DDT##:##:##.###Z') = 1586876786423 Ignores
the time and takes date only.
Returns the timestamp Str as a UTC FileTime.
StrToFileTimeUtc(Str) Example: StrToFiletimeUtc('2019-10-29T16:14:40.284Z') =
132168392802840000
Returns the timestamp TS as a string.
If Format is omitted then a default format of YYYY-MM-
DDTHH:mm:ss.fffZ is used.
In addition to the usual format characters:
If Format is 'DATE' then YYYY-MM-DD is used.
TSToStr(TS, Kind [, Format])
If Format is 'TIME' then HH:mm:ss.fffZ is used.
Example 1: TsToStr(1586883986789, TS_Utc) = '2020-04-
14T17:06:26.789Z'
Example 2: TsToStr(1586883986789, TS_Utc, 'Date') = '2020-
04-14'
Returns an OLE Automation date from the TS.
TSToOADate(TS, Kind) Example: TSToOADate(1586883986423, TS_Utc) =
637224807864230000
Returns a TS from an OLE Automation date. Date is a double.
OADateToTS(Date, Kind) Example: OADateToTS(637224807864230000, TS_Utc) =
1586883986423
Returns a FileTime date from a TS.
TSToFileTime(TS) Example: TSToFileTime(1586883986423) =
132313575864230000
Returns a TS from a FileTime date.
FileTimeToTS(FileTime)
Example: FileTimeToTS(132313575864230000) =

- 991 -
1586883986423
Returns the year of a TS.
TsGetYears(TS, Kind)
Example: TSGetYears(1586883986423, TS_Utc) = 2020
Returns the month of a TS.
TsGetMonths(TS, Kind)
Example: TSGetMonths(1586883986423, TS_Utc) = 4
Returns the days of a TS.
TsGetDays(TS, Kind)
Example: TSGetDays(1586883986423, TS_Utc) = 14
Returns the hours of a TS.
TsGetHours(TS, Kind)
Example: TSGetHours(1586883986423, TS_Utc) = 17
Returns the minutes of a TS.
TsGetMinutes(TS, Kind)
Example: TSGetMinutes(1586883986423, TS_Utc) = 6
Returns the seconds of a TS.
TsGetSeconds(TS, Kind)
Example: TSGetSeconds(1586883986423, TS_Utc) = 26
Returns the milliseconds of a TS.
TsGetMilliseconds(TS, Kind)
Example: TSGetMilliseconds(1586883986423, TS_Utc) = 423
Returns a TS with an added Number of years. Number can be
positive or negative.
TsAddYears(TS, Kind, Number)
Example: TSAddYears(1586883986423, TS_Utc, 2) =
1649955986423
Returns a TS with an added Number of months. Number can be
positive or negative.
TsAddMonths(TS, Kind, Number)
Example: TSAddMonths(1586883986423, TS_Utc, 2) =
1592154386423
Returns a TS with an added Number of days. Number can be
positive or negative.
TsAddDays(TS, Kind, Number)
Example: TSAddDays(1586883986423, TS_Utc, 2) =
1587056786423
Returns a TS with an added Number of hours. Number can be
positive or negative.
TsAddHours(TS, Kind, Number)
Example: TSAddHours(1586883986423, TS_Utc, 2) =
1586891186423
Returns a TS with an added Number of minutes. Number can
be positive or negative.
TsAddMinutes(TS, Kind, Number)
Example: TSAddMinutes(1586883986423, TS_Utc, 2) =
1586884106423
Returns a TS with an added Number of seconds. Number can
be positive or negative.
TsAddSeconds(TS, Kind, Number)
Example: TSAddSeconds(1586883986423, TS_Utc, 2) =
1586883988423
Returns a TS with an added Number of milliseconds. Number
can be positive or negative.
TsAddMilliseconds(TS, Kind, Number)
Example: TSAddMilliseconds(1586883986423, TS_Utc, 2) =
1586883986425
Returns a local timestamp from the supplied UTC timestamp.
TsUtcToLocal (TS)
Example: TSUtcToLocal(1586883986423) = 1586891186423
Returns a UTC timestamp from the supplied local timestamp.
TsLocalToUtc (TS)
Example: TSLocalToUtc(1586891186423) = 1586883986423

- 992 -
Using the Expression Editor
The expression editor dialog includes keyword auto-completion.
Pressing the Ctrl+Space keys simultaneously displays a pop-up window containing a list of keywords includ-
ing functions, operators and properties. If you type one or more characters on a line before using Ctrl+
Space, the list will automatically scroll to first relevant keyword. The required keyword selected using either
the Enter, or Tab keys, or by clicking with the mouse. Show picture

On typing a full stop, the editor checks the preceding text. If the text is identified as a navigation keyword,
the Property pop-up opens displaying a list of properties for that keyword. The required property is selected
using either the Enter, or Tab keys, or by clicking with the mouse. Show picture

When the editor is used in the Application Architect, the small tool in the toolbar can be used to select and
enter the value of other parameters. Show picture

- 993 -
Alarm synthesis (formerly group alarm)

- 994 -
Alarm Synthesis Overview
Alarm Synthesis allows you to create alarm counter and status variables for groups of alarms. Each alarm
group produces several counter and status values. This is similar to C-CURE Building Management System's
integrated alarm counter variables except that it is configurable and far more flexible. The variable used for
each counter or status must be defined before configuring the alarm group. You can choose to use as many
or few of an alarm group's counters as required.
Alarm Syntheses is managed from the Alarm Syntheses node in the Application Explorer.
Alarm Synthesis is one of a range of special variable behaviors which, in earlier versions of C-CURE
Building Management System, could only be configured by manually editing a file named
VARTREAT.DAT. There are other special behaviors that still require manual configuration of this file.
See the book Vartreat- Special variable behaviors.
There are also three alarm variables associated with an alarm synthesis. They must be a special
type of alarm known as an Enumerated Alarm. These can only be configured by manually editing
VAREXP.DAT and ENUMALA.DAT. See the topic Creating group alarm counters.

How is the group of alarms defined?


An alarm group is defined by a range of alarm levels (say from 0 to 29) and a filter that comprises variable
branches, extended attributes and expressions. See the topic Configuring an alarm synthesis filter.

What alarm counters and status variables can be configured?


Each status and counter uses a register variable.

l Status variables
l The level of the highest level (numerically) alarm that is on and not acknowledged
l The level of the highest level (numerically) alarm that is on and acknowledged
l Counter variables. The number of alarms that are:
l On and acknowledged
l On (acknowledged or not)
l Off and not acknowledged
l Off
l Invalid
l Masked
l Masked by the user
l Masked by program
l Masked by dependence on another variable
l Masked by an expression
l On and in maintenance mode
l Off and in maintenance mode
l Inhibited

What alarm variables can be configured?


The following alarm variables can be configured. They can only be configured by manually editing
VAREXP.DAT. See the topic Creating group alarm counters. The variables must be Enumerated Alarms (see
below).

l The level of the highest priority alarm that is:


l On and not acknowledged
l On and acknowledged
l On (acknowledged or not acknowledged)

About Enumerated alarms


Alarm Synthesis makes use of a special type of alarm variable known as an Enumerated Alarm. An Enu-
merated Alarm can be used in the Alarm Viewer to display different labels depending on the alarm value and
language setting. This capability is used to display the level the highest priority alarm that is on for a par-

- 995 -
ticular alarm group. Show picture

The configuration to create an Enumerated Alarm requires manual editing of a file called ENUMALA.DAT.
This is outside of the scope of this help. If your application requires this capability, please contact your tech-
nical support agency.
In computer programming, an enumerated type (also called enumeration or enum) is a data type
consisting of a set of named values called elements, members or enumerators of the type. (cf. Wiki-
pedia)

- 996 -
How to Add an Alarm Synthesis
1. Create the alarm synthesis and selecting the level filter.
a. Select the Alarm Syntheses folder in the Application Explorer configuration tree and, from the
task list, select Add an alarm synthesis. A dialog to configure a new alarm synthesis will open.
Show picture

b. Enter a name by which the alarm synthesis will be known. The name is only used within the con-
tents pane of the Application Explorer.
c. Enter a description of the alarm synthesis. The description is optional and only appears in the
contents pane of the Application Explorer.
d. If the project has a multi-station configuration select the Server list name. The alarm synthesis
will only be active on stations that appear in that list.
e. If the project is also using a Population, and you want to take this into account, tick Take the
applied population into account. See the Population overview for information about Populations.
f. Select the range of alarms to be taken into account using the Minimum and Maximum fields.
2. Select the Filter tab and configure the filter. See the topic Configuring an alarm synthesis filter.
3. Select the Variables tab and select the variables. Enter or select the names of the variables to be used
as the alarm counter and status variables. It is only necessary to enter those that you require. All but
three of the variables must be registers (See the topic Alarm synthesis overview) The Set default but-
ton automatically enters default names for the counter variables after which you need only select a
branch.
4. Click OK to confirm the configuration and close the dialog.

- 997 -
Configuring an Alarm Synthesis Branch
Configuring a variable branch means that the alarm synthesis will only take into account variables of that
branch in addition to any expression or attribute filter and the alarm levels. You can enter a simple branch
or include the * wildcard. Show picture

The ellipsis button adjacent to the Branch name property displays the Branch Selector for easy branch selec-
tion. Selecting All modifies the selection by including a wild card. See the example below.

Examples
Branch01 will include all variables of that branch, but not of any sub-branches.
Branch01.* will include all variables of that branch plus those of any sub-branch.

- 998 -
Configuring an Alarm Synthesis Filter
An alarm synthesis filter can be based either on an extended attribute filter or on an expression.

Configuring an extended attribute filter


This is a simple filter comprising a single extended attribute and a configured value. Show picture

If you select attribute #A1 - DOMAIN or #A2 - NATURE, a list of available domains or natures can be selec-
ted from the Attribute value property. If any other attribute is selected you must enter a string in the Attrib-
ute value property.

Configuring an expression filter


An expression filter is made up of one or more simple expressions joined with logical AND or OR operators.
Each simple expression consists of a variable attribute, an operator and a value enclosed in brackets. You
can either type in the filter expression directly (in the Filter generated field) or use the list boxes and com-
mand buttons to generate it interactively. Show picture

The following attributes and operators are supported.


Attribute Description
#t The variable's name
#L The leaf (final element) of a variable's name
#B1 to #B32 The variable's extended binary attributes
#A1 to #A16 The variable's extended text attributes. #A1 and #A2 are Domain and Nature respectively
Operator Description
== Equal to

- 999 -
> Greater than
< Less than
>= Greater or equal to
<= Less or equal to
^ or BEG Beginning with string
$ or INC Including string
[ or END Ending with string
&& Logical AND used between expressions
|| Logical OR used between expressions

Examples of filter expressions


Filter Meaning
(#t BEG FACTORY)&&((#A1 == DOM1)||(#A1 == The name of the variable starts with FACTORY AND
DOM2)) the Domain is either DOM1 OR DOM2
(#A1 == DOM1)||(#A2 == NAT1) The Domain is DOM1 OR the Nature is NAT1
(#A5 >=10)&&(#A5 < 35) The attribute A5 is greater than or equal to 10 AND
less than 35

Note the use of additional brackets to control the order in which the expressions are evaluated.

- 1000 -
Formulae

- 1001 -
About Formulae
A formula is the name given to the mechanism that calculates the value of a variable using an algorithm,
and the value of a number of other variables.
The formula mechanism supports a number of industry standard algorithms, plus two that are User con-
figurable. The available algorithms are:
Flow Calculation 1 F = c1*v1*(v2+c2)/(v3+c3)
Flow Calculation 2 F = c1*v1*sqrt((v2+c2)/(v3+c3))
Flow Calculation 3 F = c1*sqrt(v1*(v2+c2)/(v3+c3)*(1-c5*v1/c6max))
Integral C = C+(v1*Period/3600)
Standard Operator 1 R = (op1) v1 (op2) v2 (op3) v3 (op4) v4
Standard Operator 2 R = R+((op1) v1 (op2) v2 (op3) v3 (op4) v4)
Where possible, formulae should be given preference over calculating a value with a SCADA BASIC pro-
gram, as formulae are considerably more efficient.

- 1002 -
Formula Management Dialog Box
Configuration of Formula is not available in the Application Explorer. It is accessible from the con-
figuration menu.
The Formula dialog box is displayed from the Action sub-menu and is used to display, delete, modify and cre-
ate formulae.
Show picture

The dialog box contains a list of configured formulae and has command buttons to create, modify and delete
them. The operation of the dialog box is similar to that used to manage Scheduler and Cyclic actions.

The Formula List


Configured formulae are displayed, one per line, in a scrollable list. The list can contain a maximum of 512
lines and so it is split up into 64 pages (64 * 512 = 32768 formulae). Each entry in the list displays details of
a particular formula including its name and branch.
Also displayed is the status of the formula. A formula may be enabled (indicated by a star), disabled (no
indication) or temporary (indicated by a T). A temporary formula is one that has been created (and may be
deleted) under control of a SCADA BASIC program.
A formula may be selected by clicking on its display in the list. A selected formula is indicated by the char-
acters <> appearing at opposite ends of the line. Several formulae may be selected at the same time. Click-
ing on a line again will de-select it. Double clicking on a formula will display its configuration in a dialog box.

Tab Options and Command Buttons

l Defined - Display all formulae that are defined but not enabled.
l Enabled - Display all formulae that are defined and enabled.
l Temporary - Display all temporary (created by a SCADA BASIC program) formulae.
l Page - Select the page that is displayed in the list.
l Type - Selection the algorithm to use for a formula.
l All -Select all displayed formulae.
l None -Deselect all displayed formulae.
l Enable - Enable all selected formulae.
l Disable - Disable all selected formulae.
l Delete - Delete all selected formulae. A confirmation box limits the risk of accidental deletion.
l Refresh - Refresh the display showing the current status of the formulae.
l Save - Save any changes to hard disk. The changes will be remembered when the software is restar-
ted.
l Validate - Validate the changes made and save to memory. The dialog box is closed. The changes will
be lost when the software is restarted.
l Create - Create a new formula. The Formula Parameter dialog box is displayed.

- 1003 -
Creating a Formula
A new formula is configured by selecting the Create command button in the Formula Management dialog
box. If an existing formula is currently selected the dialog box which is displayed will contain its con-
figuration enabling a new formula to be created with similar characteristics.
Show picture

Tab Options and Command Buttons

l Title - A free format name which will appear as an identifier in the list of defined formulae.
l Branch - A variable branch to be applied to all variable names in the formula not preceded with an @.
l Result - The name of the variable into which the result of the formula is placed.
l Enabling Bit - The name of a bit that, if specified, must have a value of 1 for the formula to be pro-
cessed.
l Event - The result is calculated each time one of the variables in its definition changes.
l Cyclic - The result is calculated periodically.
l Both - The result is calculated each time one of the variables changes and periodically.
l Period - The period in seconds for activation of a cyclic formula.
l v1 to v8 - The names of the variables used in the formula. Normally all fields must be completed,
except when using one of the algorithms with standard operators where at least one variable must be
entered.
l op1 to op4 - Used to specify the operator type a formula using a standard algorithm.
l c1 to c8 - The value for the constants (if any) used in the selected algorithm. For a description of avail-
able algorithms, see Appendix 2 of this manual.

Normally the triggering mode (Event, Cyclic or Both) is determined by the algorithm selected and is
not user configurable.

- 1004 -
Algorithms

- 1005 -
Flow calculation 1: F = c1*v1*(v2+c2)/(v3+c3)
Result D = k * V * (P+a) / (T+b)
Variables v1 = Volume V (REGISTER)
v2 = Pressure P (REGISTER)
v3 = Temperature T (REGISTER)
v4 = Inhibit (BIT)
Constants c1 = Scaling factor k
c2 = Pressure correction a =1.013 Pascal
c3 = Temperature correction b=273 Kelvin
c4 = Threshold for V below which the formula will not operate
Remarks If V is invalid then the result will be invalid
If P is invalid then the result = k * V / (T+b)
If T is invalid then the result = k * V * (P+a)
If P and T are invalid then the result = k * V
If the operand (T+b) = 0 the result is invalid
If V is less than c4 then the result will be 0
If v4 = 1 then the formula will be inhibited and the result invalid

- 1006 -
Flow calculation 2: F = c1*v1*sqrt((v2+c2)/(v3+c3))
Result F = k * d P * Ö ((P+a) / (T+b))
Variables v1 = Differential pressure d P (REGISTER)
v2 = Pressure P (REGISTER)
v3 = Temperature T (REGISTER)
v4 = Inhibit (BIT)
Constants c1 = Scaling factor k
c2 = Pressure correction a =1.013 Pascal
c3 = Temperature correction b=273 Kelvin
c4 = Threshold for d P below which the formula will not operate
Remarks If d P is invalid then the result will be invalid
If P is invalid then the result = k * d P * Ö (1/ (T+b))
If T is invalid then the result = k * d P * Ö (P+a)
If P and T are invalid then the result = k * d P
If the operand (T+b) = 0 the result is invalid
If the operand ((P+a) / (T+b)) < 0 the result is invalid
If d P is less than c4 then the result will be 0
If v4 = 1 then the formula will be inhibited and the result invalid

- 1007 -
Flow calculation 3: F = c1*sqrt(v1*(v2+c2)/(v3+c3)*(1-c5*v1/c6max))
Result F = k * Ö (d Q * (P+a) / (T+b) * (1-y * d Q / d Qmax))
Variables v1 = Flow from differential pressure d Q (REGISTER)
v2 = Pressure P (REGISTER)
v3 = Temperature T (REGISTER)
v4 = Inhibit (BIT)
Constants c1 = Scaling factor k
c2 = Pressure correction a =1.013 Pascal
c3 = Temperature correction b=273 Kelvin
c4 = Threshold for d Q below which the formula will not operate
c5 = Secondary pressure correction y
c6 = Maximum flow from differential pressure
Remarks If d Q is invalid then the result will be invalid
If P is invalid then the result = k * Ö (d Q / (T+b) * (1-y * d Q / d Qmax))
If T is invalid then the result = k * Ö (d Q * (P+a) * (1-y * d Q / d Qmax))
If both P and T are invalid them the result = k * Ö d Q
If the operand (T+b) = 0 then the result will be invalid
If the operand (d Q * (P+a) / (T+b) * (1-y * d Q / d Qmax)) < 0 then the result will be invalid
If the operand (d Q * / (T+b) * (1-y * d Q / d Qmax)) < 0 then the result will be invalid
If the operand (d Q * (P+a) * (1-y * d Q / d Qmax)) < 0 l then the result will be invalid
If v4 = 1 then the formula will be inhibited and the result will be 0.

- 1008 -
Integral: C = C+(v1*Period/3600)
Result Cpt = Cpt + (Measured value * Period/3600)
Variables v1 = Measured value (REGISTER)
v2 = Reset the result to zero (BIT)
Constants c1 = The threshold value for v1 at which the formula will operate
c2 = Value (0 or 1) at which the reset bit operates.
Remarks If the formula is inhibited by the threshold the result remains at the previous value.
If the measured value is invalid the result will be invalid.
The reset to zero only operates on the transition of v2 to the chosen state (0 or 1).

- 1009 -
Standard Operators 1: R=([((op1)v1)op2v2]op3v3)op4v4)
Result R = (-, +, * or /) v1 (-, +, * or /) v2 (-, +, * or /) v3 (-, +, * or /) v4
Variables v1 = First variable
v2 = Second variable
v3 = Third variable
v4 = Fourth variable
Constants c5 = Value substituted for v1 if not specified
c6 = Value substituted for v2 if not specified
c7 = Value substituted for v3 if not specified
c8 = Value substituted for v4 if not specified
Remarks The constants c5, c6, c7 and c8 will be substituted for the variables v1, v2, v3 and v4 respect-
ively if they are not specified.

- 1010 -
Standard operators 2: R = R+([((op1)v1)op2v2]op3v3)op4v4)
Result R = (-, +, * or /) v1 (-, +, * or /) v2 (-, +, * or /) v3 (-, +, * or /) v4 + R
Variables v1 = First variable
v2 = Second variable
v3 = Third variable
v4 = Fourth variable
Constants c5 = Value substituted for v1 if not specified
c6 = Value substituted for v2 if not specified
c7 = Value substituted for v3 if not specified
c8 = Value substituted for v4 if not specified
Remarks The constants c5, c6, c7 and c8 will be substituted for the variables v1, v2, v3 and v4 respect-
ively if they are not specified.

- 1011 -
Recipes

- 1012 -
Recipes Overview
A Recipe is a list of variables each with a desired value. When a Recipe is sent, the values are copied into
the corresponding variables in the variables tree.

Typical usage
The most common use of Recipes is in a batch process where a production plant is being used to produce
batches of different products. The instructions to the control device on how a product is to be made is sent to
it as a list of values from a C-CURE Building Management System station. The list is known as a Recipe.
Recipes can also be used in conjunction with the Scheduler for simple time based control, such as that
required in a building management system.

How recipes are created


Recipes are normally created by the developer using the Recipes command on the sub-menu Con-
figure.Station. When each recipe is created it is given a unique numeric reference and title to identify it
when sending it or displaying its configuration. Recipes can optionally be allocated to a group known as a
family, which can be then used as a criteria when selecting a recipe for modification or sending.
Recipes can also be created at run-time if the user has the necessary access rights.
In addition, Recipes can be created by the RECIPE instruction in the SCADA BASIC program language. This
can be used to create recipes from files downloaded by a host computer, or to provide other special options.
Access to recipes is controlled by a user's access rights. A user can be given rights to change, send
or create recipes. For more information, see the Help book on User Accounts.

Limitations
By default, a recipe is limited to a maximum of 2000 variables. It is possible to increase this limit - contact
your support agency for further information.

- 1013 -
Configuring a recipe

- 1014 -
How to Configure a Recipe
Recipes are configured and managed from the Recipe Configuration dialog displayed from the Recipe com-
mand on the Station sub-menu. This dialog can also be displayed at run-time from a mimic using the Recipe
animation.
Show picture

1. Configure the recipe number and name.


a. Display the Recipe Configuration dialog.
b. Select the Standard button to initialize all fields.
c. In the Number field, enter a unique numeric ID for the recipe. The range is 0 to 99999999. An
optional descriptive name can also be entered in the Title field. The Title field is limited to a max-
imum of 40 characters. The number and title are used to identify a recipe when sending or modi-
fying it after it has been created.
2. Select the variables and values.
a. Select the Edit button. The Recipe Edit dialog is displayed.
b. Select the first variable in the recipe. The name of the variable can be typed directly in the Vari-
able text box or selected by displaying the Variable Selector using adjacent button.
c. Enter the recipe value for the variable in the Source field. You can enter either a value or the
name of another variable.
d. If the variable is a register, enter a Maximum and Minimum. If the User has permission to
change the recipe value at run-time these are the limits between which it can be changed. If left
at the default of 0 and 0 the maximum and minimum from the register configuration is used.
e. Select the Insert command button to insert the variable and its recipe value into the variable
list.
f. Repeat steps 2.b to 2.e until the variable list is complete. The position in which the variable is
inserted in the list can be selected by the buttons marked << and >>. The maximum number of
variables in a single recipe is 5120. The maximum number of variables that can be displayed at
one time in the recipe's configuration dialog is 512. If more than 512 variables are used a drop
down list box appears to allow the selection of additional pages.
3. Save the recipe and close the dialog.
a. Select OK to return to the main recipe configuration dialog.
b. Select Validate to save the recipe. A dialog will be displayed prompting for the name of a file in
which the recipe is to be saved. Each recipe must be saved in a different file. It is suggested that
the recipe number is used followed by the extension RCP. For example 12345.RCP.
c. Select OK to confirm saving the recipe.

Tab options and command buttons

l Number - A unique numeric ID by which the recipe is identified.


l Title - The recipe title.
l Parameters - Display the sending allowance and tracking variable dialog box. See section below for
further details.
l Edit - Display the recipe edit dialog.

- 1015 -
l Send - Send the recipe. That is, insert the recipe values into the corresponding variables in the vari-
ables tree.
l Real-time - Retrieve the current (real-time) values of the variables listed in the recipe.
l Search - Search for a recipe. A dialog box is displayed showing a list of recipes that are available.
l OK - Save the current recipe. A request for the file name in which to save the recipe is displayed
l Cancel - Cancel any modifications and exit the recipe dialog box.
l Standard - Initialize the recipe dialog box.
l Display names - The name of each variable is displayed in the variable list.
l Display titles - The title of each variable is displayed in the variable list.

- 1016 -
The Recipe Edit Dialog
Show picture

l Value - The value of the variable in the recipe is a fixed number.


l Variable - The value of the variable in the recipe is taken from the value of another variable.
l Name - The name of the variable to insert or delete from the variable list.
l Source – Either the recipe value for the variable or the name of a variable containing the value depend-
ing on which option is selected.
l Minimum - The minimum value to which the recipe variable can be set. The default is taken auto-
matically from the variable’s configuration but can be changed if required.
l Maximum - The maximum value to which the recipe variable can be set. The default is taken auto-
matically from the variable’s configuration but can be changed if required.
l Enable Modification - Allow the value of the variable to be modified by a User before it is sent. The min-
imum and maximum values allowed are specified by the range.
l Insert - Insert the selected variable and recipe value at the current position in the list.
l << - Move the position in the list up for the next variable to be inserted.
l >> - Move the position in the list down for the next variable to be inserted.
l Delete - Delete the selected variable from the list.
l OK - Validate the list of variables. The recipe edit dialog box is closed.
l Display names - The name of each variable is displayed in the variable list.
l Display titles - The title of each variable is displayed in the variable list.

If you are using a variable to supply the value for the recipe variable you must ensure that the vari-
ables are of the same type. That is to supply a value to a register a register must be used etc.

- 1017 -
The Recipe Properties Dialog Box
The properties dialog box is used to specify a number of optional recipe properties.

l Branch - The name of a variables tree branch to be used as a prefix for all variable names in the vari-
able list.
l Family - The name of a family group to which any number of recipes can be attached. The family can
be used as a filter when selecting and sending recipes.
l Access Level - A command level for the recipe. If specified the recipe can only be sent by a user with
corresponding command level rights.
l Type - The storage type for the recipe selected from either proprietary or database. For database stor-
age, you must also select an archive unit that has been configured as database type.
l Sending allowance bit - The name of a bit variable. If specified the bit must be set to 1 to allow the
recipe to be sent.
l Tracking variable - The name of register or text variable. If a register is selected it will contain the
number of the recipe after it is sent. If a text variable is selected it will contain the title of the recipe
after it is sent. A record can be kept of the recipes that have been sent using a small program.
l Send even if variable is invalid - The recipe will be sent even if one or more of the variables is invalid.
l Send mode - See the Recipe send mode topic.

- 1018 -
Recipe Send Mode
The send mode properties in the Recipe Properties dialog determine exactly how the variables are sent
depending on the communication method being used.

For equipment variables

l Block - The variables are sorted according to the communication frame that they belong to. All vari-
ables between the highest and lowest address are sent including any not in the recipe.
l Multiple - The variables are sorted according to the communication frame that they belong to and into
contiguous blocks. Only the variables contained in the recipe are sent, but a larger number of writes
may be required (one write for each block).

For OPC variables


There are four options when sending variables to an OPC server. The options are best illustrated by
example.
Note that the order in which the variables are declared in the recipe directly affects the sequence in
which they are written to the OPC servers.
C-CURE Building Management System is connected to two OPC servers. OPC Server 1 contains variables
MV1 and MV2. OPC Server 2 contains MV3 and MV4. C-CURE Building Management System subscribes to
MV1 and MV2 using the group Group1 and to MV3 and MV4 using Group2. A recipe is configured that contains
all 4 variables in the order MV3, MV1, MV2, MV4.

l Optimized serialization
l Write MV3 to OPC Server 2 and wait for the result.
l If the result is OK, write MV1 and MV2 to OPC Server 1 and wait for the result.
l If the result is OK, write MV4 and wait for the result.
l The recipe is completed. Three OPC writes are used.

l Full serialization
l Write MV3 to OPC Server 2 and wait for the result.
l If the result is OK, write MV1 to OPC Server 1 and wait for the result.
l If the result is OK, write MV2 to OPC Server 1 and wait for the result.
l If the result is OK, write MV4 and wait for the result.
l The recipe is completed. Four OPC writes are used.
l No optimization
l Write MV3 to OPC Server 2.
l Write MV1 to OPC Server 1.
l Write MV2 to OPC Server 1.
l Write MV4 to OPC Server 2.
l Wait for all four results.
l The recipe is completed. Four OPC writes are used.
l Full optimization
l Write MV3 and MV4 to OPC Server 2.
l Write MV1 and MV2 to OPC Server 1.
l Wait for all two results.
l The recipe is completed. Two OPC writes are used.

- 1019 -
Sending a Recipe
A Recipe can be sent using several mechanisms.

l From a Scheduled action. A Recipe is sent periodically at the specified time.


l From a Scheduled Action using a Timetable agenda. One recipe can be sent at the start and a second
one at the end of each period in the timetable.
l By a user using a Send Recipe animation in a window. Options include modification, with confirmation
and selection. For further details, see the chapter on Animation in the Window Editor manual.
l From a SCADA BASIC program.

- 1020 -
Using ODBC with Recipes

- 1021 -
Using ODBC with Recipes
An ODBC database can be used to both save a recipe created in C-CURE Building Management System and to
create a recipe that can then be used.

How to save a recipe in an ODBC database


To save a recipe in an ODBC database it is created in the normal way except that the type is selected as
Database and the name of the ODBC database (as configured in the Databases tree of the Archive Con-
figuration Explorer) must be specified. Show picture

The recipe information is saved in two tables in the database. The first table stores the recipe header inform-
ation, containing the number and name of the recipe and other general information. The second table stores
the list of variables and values. The default names for the two tables are RECH (recipe header information)
and RECV (recipe variable information).
As recipes from different projects can be saved in the same database, a recipe is identified by a unique
sequence number in the header table. This number also appears in the definition of each variable in the vari-
able table.

Creating a recipe from an ODBC database


Before a recipe can be created off-line, the ODBC database must be first configured in C-CURE Building Man-
agement System. The recipe header can then be entered in the table RECH and the recipe variable list in the
table RECV. The link between the recipe header and the recipe variables is made using the IDENT field that
is present in both tables.
New recipes that have been created outside of C-CURE Building Management System are only registered dur-
ing the startup phase. Therefore, you cannot add a recipe created outside C-CURE Building Management Sys-
tem while it is running.

- 1022 -
Table Formats for ODBC Recipes
Table format for recipe header RECH
Field Field name Type Description
1 PROJECT Text Project name
2 IDENT Number Recipe identifier
3 RECNUM Text Recipe number
4 RECTITLE Text Recipe title
5 FAMILY Text Recipe family
6 RLEVEL Number Recipe level
7 ALLOWBIT Text Sending allowance bit
8 TRACKVAR Text Tracking variable
9 BRANCH Text Variables tree branch

Table format for recipe variables RECV


Field Field name Type Description
1 PROJECT Text Project name
2 IDENT Number Recipe identifier
3 NAME Text Variable name
4 CHANGE Number Enable modification flag
5 TVAL Text The value of the variable if type text
6 NVAL Number The value of the variable if type register or bit
7 NVALMIN Number The minimum value
8 NVALMAX Number The maximum value
9 NVALREP Number
10 VARIND Text

- 1023 -
Vartreat - special variable behaviors

- 1024 -
What is Variable Treatment?
Variable treatment creates specialized behavior for one or more variables. Variable treatment is only con-
figurable by manually editing the configuration file, VARTREAT.DAT, with a text editor or spreadsheet.
The following specialized behaviors can be configured.

l Equipment life indicator - One or more variables are periodically checked for a change in value. If the
value has not changed during the check period, a bit variable is set and all variables associated with
the equipment (except the life indicator) are set invalid.
l C-CURE Building Management System life indicator - One or more variables are periodically changed
so that a PLC or other equipment can check if C-CURE Building Management System is running.
l Group alarm acknowledgment using a bit variable - Acknowledgment of one or more alarms with a bit
variable. The name of the acknowledgment bit is calculated using substitution of the alarm bit attrib-
utes.
l Variable Life Indicator - A variable is tested for a change in value. A group of variables, defined by a
filter, is set to invalid if the test fails.
l Group alarm counters - Superseded by Alarm Synthesis which is configured from the Application
Explorer. See the book Alarm synthesis for information.

Spaces between fields are not permitted in VARTREAT.DAT.

- 1025 -
Creating an Equipment Life Indicator
The Equipment Life Indicator allows you to configure an equipment variable that is periodically checked to
see if its value has changed. If the value has not changed since the previous check, it is assumed the equip-
ment is faulty and all its associated variables (excluding the life indicator) are set to invalid, and a specified
internal bit is set.
The Equipment Life Indicator must only be used with variables that have an Equipment source. It
does not work for variables with other sources (for example OPC) and, if done so, may cause erro-
neous operation.
The entry in VARTREAT.DAT for an Equipment Life Indicator has the following structure.
N Description Type Size Value
1 Type of entry C 9 TREATMENT
2 Type of treatment C 13 WATCHDOGEQT
3 Reference name C 40
4 Origin N 0
5 Name of list of producers C 40
6 Reserved
7 Comment C 128
8 Reserved
9 Reserved
10 Reserved
11 Active N 0 or 1
12 Equipment life indicator variable C 255
13 Life indicator failure variable C 255
14 Check period in seconds N 10 to 32000
15 Invalidate equipment variables N 0 or 1

Explanation of fields

l Reference name - A 40 character string that identifies the equipment life indicator. The name is used
when information about the operation of the equipment life indicator appears in the trace window.
l Name of list of producers - The name of the list of producers if used on a multi-station application.
l Comment - A free format comment of up to 128 characters.
l Active - The equipment life indicator is active if set to 1, else it is inactive.
l Equipment life indicator variable - The name of the equipment register that is periodically checked so
see if its value has changed.
l Life indicator failure variable - The name of a bit variable, with the command attribute set, that is set
to 1 if the life indicator fails.
l Check period in seconds - The period at which the equipment life indicator variable is checked for a
change in value.
l Invalidate equipment variables - If set to 1, when the equipment life indicator fails, all associated vari-
ables (except the life indicator) are set to invalid. If set to 0 then there is no action.

Example of the equipment life indicator


TREATMENT,WATCHDOGEQT,WD_PLC1,0,,,PLC1 Watchdog,,,,1,PLC1.WATCHDOG,PLC1.ALARM,10,1
The variable PLC1.WATCHDOG is checked every 10 seconds for a change in value. It the value has not
changed all variables associated with PLC1 are set to invalid and the internal variable, PLC1.ALARM, is set to
1.

- 1026 -
Creating a C-CURE Building Management System Life Indicator
C-CURE Building Management System Life Indicator allows you to configure a variable, the value of which is
periodically changed so that a PLC or other equipment can check if C-CURE Building Management System is
running.
The entry in VARTREAT.DAT for a Life Indicator has the following structure.
N Description Type Size Value
1 Type of entry C 9 TREATMENT
2 Type of treatment C 11 WATCHDOGSV
3 Reference name C 40
4 Origin N 0
5 Name of list of producers C 40
6 Reserved
7 Comment C 128
8 Reserved
9 Reserved
10 Reserved
11 Active N 0 or 1
12 Name of the variable to change C 255
13 Type of change N 0, 1 or 2
14 Monitor period N 10 to 32000

Explanation of fields

l Reference name - A 40 character string that identifies the life indicator. The name is used when inform-
ation about the operation of the life indicator appears in the trace window.
l Name of list of producers - The name of the list of producers if used on a multi-station application.
l Comment - A free format comment of up to 128 characters.
l Active - Must be set to 1 for the life indicator to be active, else 0.
l Name of the variable to change - the name of the variable whose value is periodically changed. The
variable can be a bit or a register and must have the control attribute set in its configuration.
l Type of change - how the variable value is changed at each interval.
l 0 - A bit variable is set to 0.
l 1 - A bit variable is set to 1.
l 2 - A bit variable is toggled.
l If a register variable is used the value is incremented by 1 each time, and this field is not used.
l Monitor period - the period, in seconds, at which the variable is changed.

Example 1
Toggles the bit variable WATCHDOG.BIT every 10 seconds.
TREATMENT,WATCHDOGSV,WD_EQT1,0,,,C-CURE Building Management System watchdog,,,,1,WATCHDOG.BIT,

Example 2
Increments the register variable WATCHDOG.MV every 60 seconds.
TREATMENT,WATCHDOGSV,WD_EQT1,0,,,C-CURE Building Management System watchdog,,,,1,WATCHDOG.MV,,

- 1027 -
Creating Group Alarm Acknowledgement
The Group Alarm Acknowledgement allows you to configure groups of alarms that can be acknowledged by
the change in value of a bit variable, the name of which may be calculated using substitutions of the alarm
bit attributes.
Group alarm acknowledgement operates in both directions.

l When the bit is set, the group of alarms are acknowledged.


l When any of the alarms in the group is acknowledged by another means, the bit is set.

The entry in VARTREAT.DAT for a Group Alarm Acknowledgement has the following structure.
N Description Type Size Value
1 Type of entry C 9 TREATMENT
2 Type of treatment C 13 ACKALARMBYVAR
3 Reference name C 40
4 Origin N 0
5 Name of list of producers C 40
6 Reserved
7 Comment C 128
8 Reserved
9 Reserved
10 Reserved
11 Minimum priority N
12 Maximum priority N
13 Attributes filter C 256 The filter used to select the group of alarms.
14 Acknowledge variable format C 256
15 Acknowledgment state N 0 - Acknowledge the group of alarms when the
acknowledge bit is set to 0.
1 - Acknowledge the group of alarms when the
acknowledge bit is set to 1.

Explanation of fields

l Reference name - A 40 character string that identifies the group alarm acknowledge. The name is
used when information about the operation of the group alarm acknowledge appears in the trace win-
dow.
l Name of list of producers - The name of the list of producers if used on a multi-station application.
l Comment - A free format comment of up to 128 characters.
l Minimum and maximum priority - The minimum and maximum priority of alarms affected by the
acknowledge action.
l Attributes filter - See explanation below.
l Acknowledge variable format - see explanation below.

Using the attributes filter field


The filter field is used to determine which alarms are included in the group.
#F - Filter expression
#B - Variable branch
#An - A variables extended attributes where n is 1 to 16. #A1 and #A2 are a variables Domain and Nature
respectively.
The filter field may be left empty (null) in which case there is no filter and all alarms are acknowledged.

Using the acknowledge variable format field


The name of the bit variable used to acknowledge alarms in the alarm group is calculated using substitution
strings for the properties of the variables in the alarm group. The following substitutions are supported.
#Bn - Elements of the alarm variable name where n is 1 to 6.
#L - The leaf (final element) of the alarm variable.

- 1028 -
#An - The alarm variables extended attributes where n is 1 to 16. #A1 and #A2 are a variables Domain and
Nature respectively.
#t - The name of the variable
* - The branch of the alarm variable (the name less the last element)
Any string not proceeded by the # character is interpreted literally.

Examples of the group alarm acknowledge


TREATMENT,ACKALARMBYVAR,TANK N,0,,,Tank level alarms according to tank,,,,10,1,#F=(#A1-
1==LEVEL),#B1.#B2.LEVEL.ACK,1
Alarm variables with a domain of LEVEL and a priority between 1 and 10 are affected.
AREA1.TANK1.LEVEL.ACK will acknowledge AREA1.TANK1.LEVEL_HIGH, AREA1.TANK1.LEVEL_HIHI etc.
AREA1.TANK2.LEVEL.ACK will acknowledge AREA1.TANK2.LEVEL_HIGH, AREA1.TANK2.LEVEL_HIHI etc.
Etc.
TREATMENT,ACKALARMBYVAR,TANK 1,0,,,All tank level 1 alarms,,,,1,1,#F=(#A1-
1==LEVEL),#B1.TANK.LEVEL.ACK,1
Alarm variables with a domain of LEVEL and a priority of 1 are affected.
AREA1.TANK.LEVEL.ACK will acknowledge alarms starting with the branch AREA1.
AREA2.TANK.LEVEL.ACK will acknowledge any alarms starting with the branch AREA2.
Etc.

- 1029 -
Creating a Variable Life Indicator
The Variable Life Indicator allows you to configure a process that tests the value of a bit or register variable
and sets a group of variables, defined by a filter, to invalid if the test fails.

l If a register variable is used it is tested periodically. The test fails if the value has not changed since
the previous test.
l If a bit variable is used it is tested when it changes. You can select the transition that constitutes a fail
in the configuration.

The entry in VARTREAT.DAT for a Variable Life Indicator has the following structure.
N Description Type Size Value
1 Type of entry C 9 TREATMENT
2 Type of treatment C 13 WATCHDOG
3 Reference name C 40
4 Origin N 0
5 Name of list of producers C 40
6 Reserved
7 Comment C 80
8 Reserved
9 Reserved
10 Reserved
11 Attributes filter C 256 The filter used to select the group of variables to
be made invalid.
12 Enable N 0 - Life indicator disabled.
1 - Life indicator enabled.
13 Watched variable type N 0 - Bit variable defined by field 14.
1 - Register variable defined by field 16.
14 Life indicator variable name (bit) C 255 Only valid if field 13 = 0.
15 Transition N 0 - Set group of variables invalid on transition to
0.
1 - Set group of variables invalid on transition to
1.
16 Life indicator variable name (reg) C 255 Only valid if field 13 = 1.
17 Check period in seconds N 5 to 32000 - Only valid when using a register vari-
able (Field 13 set to 1).
18 Life indicator failure variable C 255 Only valid if field 13 = 1.
19 Invalidate variables N 0 or 1. Only valid if field 13 = 1.
20 Action on transition to NS COM of N 0 - No action on NS COM transition.
bit life indicator 1 - Set group of variables invalid on NS COM
transition.

Explanation of fields

l Reference name - A 40 character string that identifies the variable life indicator. The name is used
when information about its operation appears in the trace window.
l Name of a list of producers - The name of a list of producers if used on a multi-station application.
l Comment - A free format comment of up to 80 characters.
l Attributes filter - See explanation below.
l Life indicator failure variable - The name of a bit variable that is set to 1 if a register life indicator
fails. The bit must have the command property set.
l Invalidate variables - If set to 1, when a register life indicator fails the group of variables is set to
invalid. If set to 0 there is no action.

Using the attributes filter field


The filter field is used to determine which variables are included in the group. You can use either an expres-
sion or a variable branch.

- 1030 -
l A filter expression uses the variable's extended attributes. It starts using the characters #F. Variable
attributes are referenced using #An where n is 1 to 16. #A1 and #A2 are a variable's domain and
nature respectively.
l A branch filter starts using #B followed by all or part of a branch.

Example 1. All variables with Domain = BAT1 and Nature = ETAGE1 and extended attribute 3 = BUREAU1.
#F=((#A1==BAT1)&&(#A2==ETAGE1)&&(#A3==BUREAU1))

Example 2. All variables with first branch beginning with BATIMENT1.


#BBATIMENT1

Example 3. All variables with the first branch equal to BATIMENT1. Note the full stop at the end delimiting
the branch.
#BBATIMENT1.

- 1031 -
Creating Group Alarm Counters (Alarm Synthesis)
Alarm Synthesis allows you to create alarm counter and status variables for groups of alarms. Each alarm
group produces several counter and status values. Alarm Syntheses is normally managed from the Alarm
Syntheses node in the Application Explorer. See the book called Alarm Synthesis. However, there are three
alarm variables that can only be configured by manually editing the VAREXP.DAT configuration file.
The three alarm variables have to be a special type of alarm known as an Enumerated Alarm. These
can only be configured by manually editing ENUMALA.DAT. Configuration of ENUMALA.DAT is outside
the scope of this help. If you want to use this facility, please contact your technical support agency.
The following table is for a complete Alarm Synthesis entry in the VARTREAT.DAT file. You should first con-
figure an Alarm Synthesis using the Application Explorer. Only those fields with a grey background should be
changed.
The entry in VARTREAT.DAT for an Alarm Synthesis has the following structure.
N Description Type Size Value (Property in
Alarm Synthesis
dialog)
1 Type of entry C 9 TREATMENT
2 Type of treatment C 11 GROUPALARM
3 Reference name C 40
4 Origin N 0
5 Name of list of producers C 40
6 Reserved
7 Comment C 80
8 Flag to take the global filter into account (Station_Fil- N 0 - do not take the
ter) global filter into
account
1 - the global filter is
added to the group fil-
ter
9 Reserved
10 Reserved
11 Minimum priority N Minimum alarm level.
0 to 29 (General tab -
Level filter group)
12 Maximum priority N Maximum alarm
level. 0 to 29 (Gen-
eral tab - Level filter
group)
13 Filter C 256 Filter string (Expres-
sion of attribute Filter
tab - Filter generated)
14 Variable representing the Priority of the highest on and C 19 + 14 <= 255 (Variables tab -
ack alarm. HighestOnAckAlm)
15 Variable representing the Priority of the highest on and C 19 + 15 <= 255 (Variables tab -
not ack alarm. HighestOnNoAckAlm)
16 Enumerated alarm representing the maximum level of C 19 + 16 <= 255
any alarms on and ack
17 Enumerated alarm representing the maximum level of C 19 + 17 <= 255
any alarms on and not ack
18 Enumerated alarm representing the maximum level of C 19 + 18 <= 255
any alarms on (ack or not ack)
19 Variable branch C 253 (Branch filter tab)
20 Variable representing the number of - On and not C 19 + 20 <= 255 (Variables tab -
acknowledged alarms OnNoAckAlm)

- 1032 -
21 Variable representing the number of - On and acknow- C 19 + 21 <= 255 (Variables tab -
ledged alarms OnAckAlm)
22 Variable representing the number of - On alarms C 19 + 22 <= 255 (Variables tab -
(acknowledged or not) OnAlm)
23 Variable representing the number of - Off and not C 19 + 23 <= 255 (Variables tab -
acknowledged alarms OffNoAckAlm)
24 Variable representing the number of - Off alarms C 19 + 24 <= 255 (Variables tab -
OffAckAlm)
25 Variable representing the number of - Invalid alarms C 19 + 25 <= 255 (Variables tab - Inval-
idAlm)
26 Variable representing the number of - Masked alarms C 19 + 26 <= 255 (Variables tab - Dis-
ableAlm)
27 Variable representing the number of - Masked by user C 19 + 27 <= 255 (Variables tab -
alarms DisOpAlm)
28 Variable representing the number of - Masked by pro- C 19 + 28 <= 255 (Variables tab -
gram alarms DisProgAlm)
29 Variable representing the number of - Masked by C 19 + 29 <= 255 (Variables tab -
dependence alarms DisDepVarAlm)
30 Variable representing the number of - Masked by C 19 + 30 <= 255 (Variables tab - DisEx-
expression alarms pAlm)
31 Variable representing the number of - On alarms in C 19 + 31 <= 255 (Variables tab -
maintenance mode OnMaintAlm)
32 Variable representing the number of - Off alarms in C 19 + 32 <= 255 (Variables tab -
maintenance mode OffMaintAlm)
33 Variable representing the number of - Inhibited alarms C 19 + 33 <= 255 (Variables tab - Inhib-
itedAlm)

- 1033 -
System variables

- 1034 -
About System Variables
System variables are designed to provide information about how the C-CURE Building Management System
processes and the project run. They can be archived, used as alarms to generate alerts...
Some of these variables are created automatically, others must be manually configured. In both cases, their
values are maintained automatically if they are part of the project's configuration.
The topics in this sub-book describes the supported system variables. They are presented in tables with the
following information:

l Variable name - the name of the inventory variable. Where the name contains a field enclosed in tri-
angular brackets, for example <Network>, it means that this part of the variable name depends on
the project configuration.
l R/W - The value of the variable is read only (R), or read and write (R/W).
l Type - The type of variable, either Bit, Register, or Text.
l Automatic/manual - The variable is created automatically (Automatic) or must be created manually
(Manual).

For example:
Variable name R/W Type Automatic/manual
SYSTEM.<Network>.<Node> R Bit Automatic
Communication device status variable where <Node> is the name that has been given to a communication
node during configuration.
0 Healthy
1 Failure

- 1035 -
System Information Variables
TIME R Text Automatic
The system time. Default format hh:mm:ss.

DATE R Text Automatic


The system date. Default format DD/MM/YY.

USER R Text Automatic


The name of the current User.

SYSTEM.COMMENTDISPLAY R Text Automatic


The comment text from the current SEND or LINK animation. The current animation is the one over which
the window's pointer currently resides. The text in the comment field must be preceded by an @ for it to be
recognized.

SYSTEM.CONTEXT.NAME R/W Text Automatic


For use with Context windows. Displays the name of the context variable.

SYSTEM.CONTEXT.TITLE R/W Text Automatic


For use with Context windows. Displays the title of the context variable.

SYSTEM.INFO.CMD R/W Text Automatic


For backwards compatibility of earlier versions of C-CURE Building Management System only. Not used in
the current version.

SYSTEM.INFO.CMD_REPORT R/W Text Automatic


For backwards compatibility of earlier versions of C-CURE Building Management System only. Not used in
the current version.

SYSTEM.INFO.DATA_OUTPUT R/W Text Automatic


For backwards compatibility of earlier versions of C-CURE Building Management System only. Not used in
the current version.

SYSTEM.INFO.DATA_OUTPUT.ALARM R/W Text Automatic


For backwards compatibility of earlier versions of C-CURE Building Management System only. Not used in
the current version.

SYSTEM.INFO.DATA_OUTPUT.LOGREGTXT R/W Text Automatic


For backwards compatibility of earlier versions of C-CURE Building Management System only. Not used in
the current version.

SYSTEM.REGIONS.CURRENT R Register Automatic


The current region number.

SYSTEM.REGIONS.NUMBER R Register Automatic


The number of available regions.

- 1036 -
SYSTEM.REGIONS.SELECTION.MODE R/W Register Automatic
The selection mode as set by either a REGION("SETSELECTION", x) instruction in SCADA BASIC or the Set
Region Animation.
0 None
1 Permanent Selection
2 Temporary Selection

SYSTEM.REGIONS.SELECTION.VALUE R/W Register Automatic


The region as selected by the REGION("SETSELECTION", x) instruction in SCADA BASIC or the Set Region
Animation.

SYSTEM.SELECTOR.NAME R/W Text Automatic


For backwards compatibility of earlier versions of C-CURE Building Management System only. Not used in
the current version.

SYSTEM.STATION_NUMBER R Register Automatic


The numeric ID (number) of the station on which the project is running.

SYSTEM.SVKEY R/W Bit Automatic


Setting to 1 forces a read of the protection key (dongle). Not used in versions of C-CURE Building Man-
agement System after 6.04j because a Read Key button was added to the about dialog (F4 to open).

SYSTEM.VCRMODE R Bit Automatic


Set to 1 if C-CURE Building Management System is started in VCR mode (sv32.exe -vcr).

System.Localhost.Alarm.LastOn R Text Automatic


Contains the name of the variable corresponding to the most recent alarm apparition.
This variable can be used to display the name or description of the most recent alarm to the user (in a
mimic template for example). It must not be used to raise an event designed to be triggered on every
alarm appearance. In fact, this variable is only updated cyclically (once every second) and therefore, you
may miss some appearances.

System.Localhost.Session.Type R Register Automatic


Contains the type of the current session:
-1 = Error (unknown session type)
1 = C-CURE Building Management System desktop Client User Interface
100 = WebVue
101 = TouchVue
102 = SnapVue
103 = WebScheduler
104 = Web Services Toolkit client

System.Localhost.Environment.RunningInRemoteDesktopSession R Bit Automatic


Indicate if the instance of C-CURE Building Management System is running in a Remote Desktop Session.
Supersedes the variable System.WTS that is kept only for compatibility with existing projects.

System.Localhost.Environment.RunningAsService R Bit Automatic


Indicate if the instance of C-CURE Building Management System is running in as a Windows service.

- 1037 -
Local Host Resource Variables
The following variables provide information about the status of the local host computing resources. The vari-
able names are all preceded by SYSTEM.LOCALHOST.RESOURCE.

GDI R Register Automatic


The number of Graphic Device Interface objects used by the HMI.

User R Register Automatic


The number of User objects used by the HMI.

RAM R Register Automatic


The percentage of used memory on the computer.

FreeVirtualMemory R Register Automatic


The amount of unreserved and uncommitted memory currently in the user-mode portion of the virtual
address space of C-CURE Building Management System.

Handles R Register Automatic


The number of handle used by the process. A handle is a reference to a block of memory in use by the pro-
cess.

MemoryUsage R Register Automatic


The size, in Kbytes, of memory that C-CURE Building Management System has allocated that cannot be
shared with other processes.

Threads R Register Automatic


The total number of threads instantiated by the process.

- 1038 -
Printer Status Variables
SYSTEM.<Printer>.<Standby Printer>.STATUS R Register Automatic
The status of a printer number <Printer>. The standby printer number field is for future use and is currently
the same as the printer number.
0 OK
100 Unknown printer configured
102 Unable to open printer driver
103 Unable to print to printer

SYSTEM.PRINTER.<Printer>.ON R Bit Automatic


The status of the printer number <Printer>.
0 Printer is off
1 Printer on

Examples
SYSTEM.PRINTER.2.2.STATUS
A register variable containing the status of printer 2.
SYSTEM.PRINTER.1.ON
A bit variable that indicates if printer 1 is on or off.

- 1039 -
Alarm Counter Variables
SYSTEM.<State>.<Level> R Register Manual
System alarm counters by alarm state and level. The <Level> is a number that determines the alarm level
to be counted. Alternatively, ALL may be used to count alarms irrespective of level. The <State> is used to
select the alarm state that is to be counted.
Alarm state <State> Mnemonic
Alarm off ACKOFF
Alarm on and not acknowledged NOACKON
Alarm off and not acknowledged NOACKOFF
Alarm on and acknowledged ACKON
Alarm invalid NS
Alarms masked by the operator USERMASK

SYSTEM.<State>.<Level>.<Dom_Nat> R Register Manually created


System alarm counters by alarm state, level and domain and/or nature. <Dom_Nat> is a string that selects
the domain and nature to be used. Note that alarm counter names must adhere to the normal syntax for vari-
able naming. See the topic Rules for Variable naming. The character used to separate the domain and nature
is an underscore by default but may be changed using the Variable Settings. The wild card characters * or $
used either before or after the underscore can be used to signify all domains or all natures.

Examples
SYSTEM.ACKON.8 Counts all alarms of level 8 that are on and acknowledged.
SYSTEM.NOACKON.ALL.ZONE1_ELEC Counts alarms on and not acknowledged in domain ZONE1 and
nature ELEC.
SYSTEM.ACKON.15.*_CONTROL Counts all level 15 alarms with any domain and the CONTROL
nature that are on and acknowledged.

Using alarm counter variables in Expressions or Programs


If you are using alarm counter variables in expressions or programs, you must use the $ character when sig-
nifying all domains or all natures as the * character will cause a syntax error.

Using thresholds on alarm counter variables which include * in their name


If you create a threshold on an alarm counter variable that has the * character in its name, the * is replaced
by the keyword ALL in the threshold variable name.
For example, an alarm counter has the name SYSTEM.NOACKON.1.TANK_* and a HIGH threshold is added
to it. The threshold variable name will be SYSTEM.NOACKON.1.TANK_ALL_HIGH.

As of version 12.0, the use of states' mnemonic supersedes the use of the corresponding numbers in
alarm counter names. Spaces between fields are not permitted in VARTREAT.DAT

- 1040 -
Central Project Management status variables
The following variables provide information about the project version when using Central Project Man-
agement.

SYSTEM.LOCALHOST.VERSION.PROJECT R Text Automatic


The version number of the project currently loaded and running on the local station.

SYSTEM.LOCALHOST.VERSION.LIBRARY R Text Automatic


The version number of the library currently loaded and running on the local station.

SYSTEM.<StationName>.VERSION.PROJECT R Text Automatic


The version number of the project currently loaded and running on the station <StationName>.

SYSTEM.<StationName>.VERSION.LIBRARY R Text Automatic


The version number of the library currently loaded and running on the station <StationName>.

SYSTEM.VERSION.REFERENCE.PROJECT R Text Automatic


The version number of the REF project in the central folder. If the central project folder is inaccessible, it is
set to NS.

SYSTEM.VERSION.REFERENCE.LIBRARY R Text Automatic


The version number of the REF library in the central folder. If the central project folder is inaccessible, it is
set to NS.

SYSTEM.VERSION.REFERENCE.PROJECTLASTCHANGE R Text Automatic


The timestamp of the most recent change to the REF project in the central folder. If the central project
folder is inaccessible, it is set to NS.

SYSTEM.VERSION.REFERENCE.LIBRARYLASTCHANGE R Text Automatic


The timestamp of the most recent change to the REF library in the central folder. If the central project folder
is inaccessible, it is set to NS.

SYSTEM.LOCALHOST.VERSION.REFERENCE.PROJECTISNOTCURRENTREF R Bit Automatic


Set to TRUE if the local project version number is different to the REF version number in the central folder,
else FALSE. If the central project folder is inaccessible, it is set to NS.

SYSTEM.LOCALHOST.VERSION.REFERENCE.LIBRARYISNOTCURRENTREF R Bit Automatic


Set to TRUE if the local library version number is different to the REF version number in the central folder,
else FALSE. If the central project folder is inaccessible, it is set to NS.

- 1041 -
BACnet Status Variables
In the following system variable names:

l <Network> is the name of a configured BACnet network,


l <Device> is the name of a configured BACnet device,
l <Schedule> is the name of a configured BACnet schedule object,
l <Calendar> is the name of a configured BACnet notification class object,
l <Log> is the name of a configured BACnet log object (event log, trend log or trend log multiple).

SYSTEM.BACNET.XON R Bit Manual


Flow regulation status.
0 Flow regulation activated. Loss of exchanges possible
1 Flow regulation not activated.

SYSTEM.BACNET.LOSTTRANS R Register Automatic


Counter for the number of lost BACnet exchanges when flow regulation was last activated.

SYSTEM.BACNET.<Network>.ON R Bit Automatic


SYSTEM.BACNET.<Network>.<Device>.ON R Bit Automatic
SYSTEM.BACNET.<Network>.<Device>.<Notif- R Bit Automatic
Class>.ON
SYSTEM.BACNET.<Network>.<Device>.<Schedule>.ON R Bit Automatic
SYSTEM.BACNET.<Network>.<Device>.<Calendar>.ON R Bit Automatic
SYSTEM.BACNET.<Network>.<Device>.<Log>.ON R Bit Automatic
Indicate if the corresponding BACnet communication object is active.
1 The communication object is activated.
0 The communication object is not activated.

SYSTEM.BACNET.<Network>.STATUS R Register Automatic


SYSTEM.BACNET.<Network>.<Device>.STATUS R Register Automatic
SYSTEM.BACNET.<Network>.<Device>.<Notif- R Register Automatic
Class>.STATUS
SYSTEM.BACNET.<Network>.<Device>.<Schedule>.STATUS R Register Automatic
SYSTEM.BACNET.<Network>.<Device>.<Calendar>.STATUS R Register Automatic
SYSTEM.BACNET.<Network>.<Device>.<Log>.STATUS R Register Automatic
Indicate the status of the corresponding BACnet communication object.
The table below describes possible values and to which communication object values apply.

SYSTEM.BACNET.<Network>.SubscriptionCompleted R Bit Automatic


Indicate if COV subscriptions are completed for the network.
0 COV subscriptions in progress.
1 COV subscription completed or no COV subscription to perform.

SYSTEM.BACNET.<Network>.UnsubscriptionCompleted R Bit Automatic


Indicate f COV unsubscriptions are completed for the network.
0 COV unsubscriptions in progress.
1 COV unsubscription completed or no COV unsubscription to perform.

Notification
Value Error Description Network Device Schedule/Calendar Log
class
0 BACnetGlobalStatus_ Healthy con- x x x x x

- 1042 -
no_error nection
BACnetGlobalStatus_ Error: Device is
1 x x x x
disconnected not connected
Warning: At least
one BACnet net-
BACnetGlobalStatus_
work interface is
2 network_interface_ x x x x x
already in use by
in_use
another applic-
ation.
Error: Driver
could not be star-
BACnetGlobalStatus_ ted. As a con-
3 x x x x x
network_start_stack sequence, the
network is not
activated.
Error: Another
device on the net-
BACnetGlobalStatus_
work uses the
4 local_device_id_con- x
same device Id
flict
as the local
device.
Warning: No or
bad watchdog,
the state of
device is uncer-
tain. Could be
BACnetGlobalStatus_
5 that the watch- x
device_no_watchdog
dog is mapped on
an object or prop-
erty that could
not be found in
the device.
Warning: No
watchdog or
BACnetGlobalStatus_ issue while ini-
6 notification_no_ tialization it. The x
watchdog state of the noti-
fication class is
uncertain.
Warning: Sub-
scription to the
recipient-list of
the notification
class. The device
BACnetGlobalStatus_
7 corresponding to x
error_subscription
C-CURE Building
Management Sys-
tem is not
present in the
recipient-list.
Warning: Sub-
BACnetGlobalStatus_ scription to the
8 error_subscription_ recipient-list of x
no_ref the notification

- 1043 -
class. The noti-
fication class
instance exists
but registration
of C-CURE Build-
ing Management
System has
failed.
Warning: The
BACnetGlobalStatus_ object instance
9 x x x
unknown_object cannot be found
in the device.
Error: Conflict, 2
BACnetGlobalStatus_ devices have the
10 x x x x
device_id_conflict same device Id
on the network.
Warning: Com-
BACnetGlobalStatus_ munication deac-
11 x x x x x
trial_period_elapsed tivated, trial
period elapsed.

- 1044 -
Equipment Status Variables
SYSTEM.<Network> R Bit Automatic
Communication network status variable where <Network> is the name that has been given to a com-
munication network during configuration.
0 Healthy
1 Failure

SYSTEM.<Network>.Status R Register Automatic


The communication general status for the network (formerly status words).
See the topic Understanding Communication Status for more information on possible values.

SYSTEM.<Network>.StatusCom R Register Automatic


The communication driver-specific status for the network (formerly complementary status word).
See the topic Understanding Communication Status for more information on possible values.

SYSTEM.<Network>.<Node> R Bit Automatic


Communication device status variable where <Node> is the name that has been given to a communication
node during configuration.
0 Healthy
1 Failure

SYSTEM.<Network>.<Node>.Status R Register Automatic


The communication general status for the node (formerly status words).
See the topic Understanding Communication Status for more information on possible values.

SYSTEM.<Network>.<Node>.StatusCom R Register Automatic


The communication driver-specific general status for the node (formerly complementary status word).
See the topic Understanding Communication Status for more information on possible values.

SYSTEM.<Network>.<Node>.<Frame> R Bit Automatic


Communication frame status variable where <Frame> is the name that has been given to a communication
node during configuration.
0 Healthy
1 Failure

SYSTEM.<Network>.<Node>.<Frame>.Status R Register Automatic


The communication general status for the frame (formerly status words).
See the topic Understanding Communication Status for more information on possible values.

SYSTEM.<Network>.<Node>.<Frame>.StatusCom R Register Automatic


The communication driver-specific for the frame (formerly complementary status word).
See the topic Understanding Communication Status for more information on possible values.

SYSTEM.EQT.OK_NUMBER R Register Automatic


The number of equipment nodes with which the communication manager (CimWay) is successfully com-
municating.

- 1045 -
DDE Status Variables
SYSTEM.DDE.XON R Bit Manual
Flow regulation status.
0 Flow regulation activated. Loss of exchanges possible
1 Flow regulation not activated.

SYSTEM.DDE.LOSTTRANS R Bit Automatic


Counter for the number of lost DDE exchanges from the when flow regulation was last activated.

SYSTEM.DDE.<Name>.ON R Register Automatic


DDE conversation running indication for the conversation <Name>.
1 Running
0 Stopped

SYSTEM.DDE.<Name>.STATUS R Bit Automatic


DDE conversation status indication for the conversation "Name".
0 The conversation is healthy or stopped and unavailable.
300 Error when attempting to connect to the server.
500 Error when subscribing to DDE item.
600 Error when subscribing to DDE item.
700 Error when un-subscribing a DDE item.
800 Error when un-subscribing a DDE item.
900 Error when reading a DDE item.
1000 Error when reading a DDE item.
1100 Error when writing a DDE item.
1200 Error when writing a DDE item.
1300 Connection to DDE server lost.
1400 Error on DDE notification callback.
2300 Attempt to connect to the SV server (Looping not permitted).
2400 DDE conversation not produced by this station.

- 1046 -
IEC 60870-5 Status Variables
Even if located in the branch SYSTEM.104, the system variables described in this topic are available
for IEC 104 and IEC 101 communication objects.

SYSTEM.104.XON R Bit Manual


Flow regulation status.
0 Flow regulation activated. Loss of exchanges possible
1 Flow regulation not activated.

SYSTEM.104.<Network>.ON R Bit Automatic


Network activation indication where <Network> is the network alias.
1 The network is activated.
0 The network is not activated.

SYSTEM.104.<Network>.STATUS R Register Automatic


Network status where <Network> is the network alias.
0 Healthy connection
1 Disconnected, the communication between C-CURE Building Management System and the network has
failed.

SYSTEM.104.<Network>.<DEVICE>.ON R Bit Automatic


Device activation indication where <Network> is the network alias and <Device> is the device alias.
1 The device is activated.
0 The device is not activated.

SYSTEM.104.<Network>.<Device>.STATUS R Register Automatic


Device status indication where <Network> is the network alias and <Device> is the device alias.
0 The device is connected.
1 The device is disconnected.

SYSTEM.104.<Network>.<Device>.REDUNDANTACTIVEDEVICE R Text Automatic


Returns the alias of the active device when one or more standby devices have been configured for redund-
ancy. Where <Network> is the network alias and <Device> is the alias of the main device.

SYSTEM.104.<Network>.<Device>.REDUNDANCYACTIVEON R Bit Automatic


The redundancy status of the device.
0 Device is in standby (not active).
1 The device is active.

SYSTEM.104.<Network>.<Device>.<StandbyDevice>.ON R Bit Automatic


Standby device activation indication where <Network> is the network alias, <Device> is the device alias
and <StandbyDevice> is the standby device alias.
1 The device is not activated.
0 The device is activated.

SYSTEM.104.<Network>.<Device>.<StandbyDevice>.STATUS R Register Automatic


Standby device status indication where <Network> is the network alias, <Device> is the device alias, and
<StandbyDevice> is the standby device alias.

- 1047 -
1 Communication error.
0 No error.

SYSTEM.104.<Net- R Bit Automatic


work>.<Device>.<StandbyDevice>.REDUNDANCYACTIVEON
0 This is the standby device within the redundancy.
1 This is the active device within the redundancy.

- 1048 -
IEC 61850 status variables
In the following system variable names:

l <Network> is the name of a configured IEC 61850 network,


l <Device> is the name of a configured IEC 61850 device,
l <DataGroup> is the name of a configured IEC 61850 dataset, data report or data group object.

SYSTEM.61850.XON R Bit Manual


Flow regulation status.
0 Flow regulation activated. Loss of exchanges possible.
1 Flow regulation not activated.

SYSTEM.61850.LOSTTRANS R Register Automatic


Counter for the number of lost IEC 61850 exchanges when flow regulation was last activated.

SYSTEM.61850.<Network>.ON R Bit Automatic


Network activation indication where <Network> is the network alias.
1 The network is activated.
0 The network is not activated.

SYSTEM.61850.<Network>.STATUS R Register Automatic


Network status where <Network> is the network alias.
The table below describes possible values.

SYSTEM.61850.<Network>.AVAILABLE R Register Automatic


Network availability where <Network> is the network alias.
0 No error.
1 On.

SYSTEM.61850.<Network>.<Device>.ON R Bit Automatic


Device activation indication where <Network> is the network alias and <Device> is the device alias.
1 The device is activated.
0 The device is not activated.

SYSTEM.61850.<Network>.<Device>.STATUS R Register Automatic


Device status indication where <Network> is the network alias and <Device> is the device alias.
The table below describes possible values.

SYSTEM.61850.<Network>.<Device>.AVAILABLE R Register Automatic


Device availability indication where <Network> is the network alias and <Device> is the device alias.
0 No error.
1 On.

SYSTEM.61850.<Network>.<Device>.<DataGroup>.ON R Bit Automatic


Datagroup activation indication where <Network> is the network alias, <Device> is the device alias and
<DataGroup> is the datagroup alias.
1 The datagroup is activated.
0 The datagroup is not activated.

- 1049 -
SYSTEM.61850.<Network>.<Device>.<DataGroup>.STATUS R Register Automatic
Datagroup status indication where <Network> is the network alias, <Device> is the device alias and
<DataGroup> is the datagroup alias.
The table below describes possible values.

SYSTEM.61850.<Network>.<Device>.<DataGroup>.AVAILABLE R Register Automatic


Datagroup availability indication where <Network> is the network alias, <Device> is the device alias and
<DataGroup> is the datagroup alias.
0 No error.
1 On.

Status
Description
value
-1 Communication object is in passive mode.
0 Healthy connection.
1 Internal error - Driver not properly started.
2 Warning: Communication deactivated, trial period elapsed.
3 Communication object stopped.
4 Deprecated error code.
5 Communication object is not produced.
6 Network is not active.
7 Device is not active.
8 Dataset is not active.
9 Data report is not active.
10 Data group is not active.
11 No client context.
12 No remote server.
13 Client error.
14 Time out.
15 Network is not enabled.
16 Device is not enabled.
17 Dataset is not enabled.
18 Data report is not enabled.
19 Data group is not enabled.
20 No dataset defined on the Data report.
21 Request error - No transaction.
22 Request error - Syntax error.
23 Request error - Memory.
24 Request error - Not connected.
25 Request error - No connection.
26 Protocol error - Flow controlled.
27 Protocol error - Max service exceeded.
28 Protocol error - Memory.
29 Protocol error - Encoding error.
30 Protocol error - Incorrect transaction.
31 Protocol error - Connection closed.
32 Protocol error - Time out.
33 Protocol error - Connection state.
34 Protocol error - Application.
35 Protocol error - Parameters.

- 1050 -
36 Protocol error - Confirmed error.
37 Protocol error - No data read.
38 Data access error - Object-invalidated (ISO 9506-2).
39 Data access error - Hardware-fault (ISO 9506-2).
40 Data access error - Temporarily-unavailable (ISO 9506-2).
41 Data access error - Object-access-denied (ISO 9506-2).
42 Data access error - Object-undefined (ISO 9506-2).
43 Data access error - Invalid-address (ISO 9506-2).
44 Data access error - Type-unsupported (ISO 9506-2).
45 Data access error - Type-inconsistent (ISO 9506-2).
46 Data access error - Object-attribute-inconsistent (ISO 9506-2).
47 Data access error - Object-access-unsupported (ISO 9506-2).
48 Data access error - Object-non-existent (ISO 9506-2).
49 Data access error - Object-value-invalid (ISO 9506-2).
50 Unknown error.
51 Deprecated error code.
52 Deprecated error code.
53 Deprecated error code.
54 Deprecated error code.
55 Deprecated error code.
56 Deprecated error code.
57 Communication object not linked with a report object - Report not found or does not exist.
58 Communication object not linked with a dataset object - Dataset not found or does not exist.
59 The Report Control Block is already in use by another IEC 61850 client.
60 Deprecated error code.
61 Deprecated error code.
62 Deprecated error code.
63 Deprecated error code.
64 Deprecated error code.
65 Error during device connection (browsing & initialization).
66 Deprecated error code.
67 Deprecated error code.
68 Deprecated error code.
69 Deprecated error code.
70 Deprecated error code.
71 Deprecated error code.
72 Deprecated error code.
73 Deprecated error code.
74 Deprecated error code.
75 Deprecated error code.
76 Response error on initiate request for data report. No descriptor in the response.
77 Configuration error for the Report Control Block.
Configuration error for Report Control Block redundancy. Could be that RCBs are not configured
78
for the same dataset.
79 Error during the browsing of logical devices.

- 1051 -
LonWorks Status Variables
SYSTEM.LNS.XON R Bit Manual
Flow regulation status.
0 Flow regulation activated. Loss of exchanges possible
1 Flow regulation not activated.

SYSTEM.LNS.LOSTTRANS R Register Automatic


Counter for the number of lost LNS exchanges from the when flow regulation was last activated.

SYSTEM.LNS.<Network>.ON R Bit Automatic


LonWorks network running/stopped indication where <Network> is the alias of the LonWorks network.
0 Stopped.
1 Running.

SYSTEM.LNS.<Network>.<Node>.ON R Bit Automatic


LonWorks node running/stopped indication where <Network>.<Node> is the network and node alias.
0 Stopped.
1 Running.

SYSTEM.LNS.<Network>.STATUS R Register Automatic


LonWorks network status where <Network> is the alias of the LonWorks network. See table below for pos-
sible values.

SYSTEM.LNS.<Network>.<Node>.STATUS R Register Automatic


LonWorks node status where <Network>.<Node> is the network and node alias. See table below for pos-
sible values.

Code Network Node Description


0 X X No errors have been detected on this network or node.
1 X Unable to load the LCA Object Server. Check to see if the software is installed
on the computer.
2 X The configured network is unknown to the LonWorks inventory (LonDB).
3 X The configured system is unknown to the LonWorks inventory (LonDB).
4 X An error occurred whilst starting the network.
5 X The configured subsystem is unknown to the LonWorks inventory (LonDB).
6 X The configured node is unknown to the LonWorks inventory (LonDB).
8 X Starting the node failed because the network is not started.
9 X The node is not authorized to start.
10 X The network is not authorized to start.
11 X Starting this network failed because the station is not a server for this net-
work.
16 X The communication between C-CURE Building Management System and the
node has failed.
18 X The node is not commissioned (LonDB).
19 X The minimum version of LCA Object Server required is 3.2 (Turbo edition).
20 X The interface to the physical network is not defined or present.
21 X The network is offnet (LonDB).

- 1052 -
OPC Status Variables
SYSTEM.OPC.XON R Bit Manual
Flow regulation status.
0 Flow regulation activated. Loss of exchanges possible
1 Flow regulation not activated.

SYSTEM.OPC.LOSTTRANS R Register Automatic


Counter for the number of lost OPC exchanges from the when flow regulation was last activated.

SYSTEM.OPC.<Server>.ON R Bit Automatic


OPC server activation indication where <Server> is the name of the OPC server alias.
1 The server is activated.
0 The server is not activated.

SYSTEM.OPC.<Server>.STATUS R Register Automatic


OPC server status where <Server> is the name of the OPC server alias.
0 Healthy connection.
1 Connection to the server is disabled (trial period elapsed or the station does not produce this connection).
2 Error when attempting to connect
3 The connection has been lost. The server shuts down.
4 The connection has been lost. A DCOM error has occurred.
10 First frozen context time limit reached
11 Second frozen context time limit reached.
12 Connection pending.

SYSTEM.OPC.<Server>.<Group>.ON R Bit Automatic


OPC group activation indication where <Server> is the name of the OPC server alias and "<Group> is the
name of the OPC group.
1 The group is activated.
0 The group is not activated.

SYSTEM.OPC.<Server>.<Group>.STATUS R Register Automatic


OPC group status where <Server> is the name of the OPC server alias and <Group> is the name of the OPC
group.
0 Healthy connection.
1 Connection to the server is disabled (trial period elapsed or the station does not produce this connection).
2 Error when attempting to connect
3 The connection has been lost. The server shuts down.
4 The connection has been lost. A DCOM error has occurred.
10 First frozen context time limit reached
11 Second frozen context time limit reached.
12 Connection pending.
101 Error when adding the group.

- 1053 -
SNMP Status Variables
SYSTEM.SNMP.XON R Bit Manual
Flow regulation status.
0 Flow regulation activated. Loss of exchanges possible
1 Flow regulation not activated.

SYSTEM.SNMP.<Network>.ON R Bit Automatic


SNMP network activation indication where <Network> is the network alias.
1 The network is activated.
0 The network is not activated.

SYSTEM.SNMP.<Network>.STATUS R Register Automatic


SNMP network status where <Network> is the SNMP network alias.
0 Healthy connection
1 Disconnected, the communication between C-CURE Building Management System and the network has
failed.
3 Insufficient license rights (no SNMP license in dongle)
4 Unavailable listening port

SYSTEM.SNMP.<Network>.<DEVICE>.ON R Bit Automatic


SNMP device activation indication where <Network> is the network alias and <DEVICE> is the device alias.
1 The device is activated.
0 The device is not activated.

SYSTEM.SNMP.<Network>.<Device>.STATUS R Register Automatic


SNMP device activation indication where <Network> is the network alias and <DEVICE> is the device alias.
For unmanaged devices:
0 Healthy connection.
1 Disconnected, the communication between C-CURE Building Management System and the device has
failed.
For SNMP devices see table below.

Status Description
0 Device online (normal healthy status)
1 Device timeout
2 Device stopped
3 *
4 *
5 Wrong key
6 Unsupported security level
7 Windows NotInTime error
8 Decryption error
9 Unknown user name
10 Request rejected
11 Unknown report
12 Too big
13 No such name
14 Bad value
15 Read only
16 General error

- 1054 -
17 No access
18 Wrong type
19 Wrong length
20 Wrong encoding
21 Wrong value
22 No creation
23 Inconsistent value
24 Resource unavailable
25 Commit failed
26 Undo failed
27 Authorization error
28 Not writable
29 Inconsistent name
30 Invalid user
31 Invalid key
32 Invalid host or IP
33 Not polled (no variables mapped)
34 The maximum number of running devices (1000) has been reached

* See network status variable.

- 1055 -
Network Status Variables
For information on the network status variables see the book on Networked Applications.

- 1056 -
HDS Status Variables
HDS information
The following variables provide information about the status of the HDS.
System.HDS.ErrorCount R/W Register Automatic
Incremented each time there is an error or warning from the HDS. If recorded allows the user to see a his-
tory of any errors with the HDS. Can be reset by the application.

System.HDS.PendingRecords R Register Automatic


The number of records in the HDS buffer waiting to be stored in the database.

System.HDS.Overflow R Bit Automatic


Set to 1 when the HDS stops queuing records because the event buffer is full (number of pending records
has reached the buffer size).

System.HDS.Started R Bit Automatic


Set to 1 when the HDS is running. Set to 0 when it is stopped. Note that the HDS stops automatically if no
more storage space is available to it.

SYSTEM.HDS.NoResponseCount R Register Automatic


Incremented when a request between C-CURE Building Management System and the HDS is not completed
because of a timeout (5 minutes for trend data and 8 minutes for log data).

HDS database information


The following variables provide information about the status of each HDS database.
System.HDS.<DatabaseName>.Defrag R Bit Automatic
Set to 1 when a maintenance task of type index defragmentation is in progress.

System.HDS.<DatabaseName>.Custom R Bit Automatic


Set to 1 when a maintenance task of type custom is in progress.

System.HDS.<DatabaseName>.NoResponseCount R Bit Automatic


Incremented when a request between C-CURE Building Management System and the HDS is not completed
because of a timeout (5 minutes for trend data and 8 minutes for log data) for a given database.

System.HDS.<DatabaseName>.SpaceUsed R/W Register Automatic


The percentage of the database capacity (maximum database size) used.

System.HDS.<DatabaseName>.SpaceAlloc R Register Automatic


The storage space allocated to the database (in Mb).

System.HDS.<DatabaseName>.DelayProc R Bit Automatic


If set to 1, indicates that the processing of purges, shrinking or export has been blocked using VBA.

System.HDS.<DatabaseName>.Disconn R Bit Automatic


If set to 1, indicates that the database is off-line.

- 1057 -
System.HDS.<DatabaseName>.Paused R Bit Automatic
If set to 1, indicates that records are not being recorded in the database. Set by the HDS if the database is
full, or may also be set using VBA.

System.HDS.<DatabaseName>.DiskFull R Bit Automatic


If set to 1, indicates that there is not enough space on the storage device to store any more records to the
database.

System.HDS.<DatabaseName>.Full R Bit Automatic


If set to 1, indicates that the database has reached its maximum configured size.

System.HDS.<DatabaseName>.Compact R Bit Automatic


Set to 1 when a maintenance task of type shrink is in progress.

System.HDS.<DatabaseName>.Purge R Bit Automatic


Set to 1 when a maintenance task of type purge is in progress.

System.HDS.<DatabaseName>.Export R Bit Automatic


Set to 1 when a maintenance task of type export is in progress.

System.HDS.<DatabaseName>.Synchro R Bit Automatic


Deprecated - Do not use.

System.HDS.<DatabaseName>.EmergencyPurge R Bit Automatic


Set to 1 when an emergency purge is in progress.

- 1058 -
Message Status Variables
SYSTEM.EMAIL.<ProfileName>.STATUS R Register Automatic
Status of the last email sent where <ProfileName> is the name of the profile used when sending the email.
0 Email send successful
1 Failure because of incorrect configuration. For example, SMTP server name, port number or authen-
tication required (but not used).
2 Failure because email was sent with restricted attachment.
4 Failure because attachments do not exist.
8 Failure because total size of attachments too big.

SYSTEM.SMS.<ProfileName>.STATUS R Register Automatic


Status of the last SMS sent where <ProfileName> is the name of the profile used when sending the SMS.
0 OK.
1 Unknown com port.
2 Failure to get parameters.
3 Failure to set parameters.
4 Read timeout.
5 Read aborted.
6 Write timeout.
7 Write aborted.
8 Reset error.
9 Pin error.
10 SMS error.
11 PDU mode error.
12 SMS not supported.
13 Text mode error.
14 SMS send error.

- 1059 -
Event Counter Variables
Variables that count the number of events that have been created as part of the application.

SYSTEM.LOCALHOST.EVENTTRIGGER.PROGRAM.TEMPORARY R Register Automatic


The number of temporary events (created programmatically) that run a program, on the local station.

SYSTEM.LOCALHOST.EVENTTRIGGER.PROGRAM.PERMANENT R Register Automatic


The number of permanent events (created by configuration) that run a program, on the local station.

SYSTEM.LOCALHOST.EVENTTRIGGER.PROGRAM.TOTAL R Register Automatic


The total number of events that run a program, on the local station.

SYSTEM.LOCALHOST.EVENTTRIGGER.MESSAGE.TEMPORARY R Register Automatic


The number of temporary events (created programmatically) that send a message, on the local station.

SYSTEM.LOCALHOST.EVENTTRIGGER.MESSAGE.PERMANENT R Register Automatic


The number of permanent events (created by configuration) that send a message, on the local station.

SYSTEM.LOCALHOST.EVENTTRIGGER.MESSAGE.TOTAL R Register Automatic


The total number of events that send a message, on the local station.

SYSTEM.LOCALHOST.EVENTTRIGGER.TOTAL R Register Automatic


The total number of all events (program and message), on the local station.

SYSTEM.<StationName>.EVENTTRIGGER.PROGRAM.TEMPORARY R Register Automatic


The number of temporary events (created programmatically) that run a program, on the station <Sta-
tionName>.

SYSTEM.<StationName>.EVENTTRIGGER.PROGRAM.PERMANENT R Register Automatic


The number of permanent events (created by configuration) that run a program, on the station <Sta-
tionName>.

SYSTEM.<StationName>.EVENTTRIGGER.PROGRAM.TOTAL R Register Automatic


The total number of events that run a program, on the station <StationName>.

SYSTEM.<StationName>.EVENTTRIGGER.MESSAGE.TEMPORARY R Register Automatic


The number of temporary events (created programmatically) that send a message, on the station <Sta-
tionName>.

SYSTEM.<StationName>.EVENTTRIGGER.MESSAGE.PERMANENT R Register Automatic


The number of permanent events (created by configuration) that send a message, on the station <Sta-
tionName>.

SYSTEM.<StationName>.EVENTTRIGGER.MESSAGE.TOTAL R Register Automatic


The total number of events that send a message, on the station <StationName>.

- 1060 -
SYSTEM.<StationName>.EVENTTRIGGER.TOTAL R Register Automatic
The total number of all events (program and message), on the station <StationName>.

- 1061 -
Archives

- 1062 -
Archives Overview
The Archives is the name given to C-CURE Building Management System data recording. It supports two dis-
tinct systems.

l Native - records in, and display from, C-CURE Building Management System own native data storage
system.
l Historical Data Server (HDS) - records in, and display from, an industry standard database such as
Access or Microsoft SQL Server. The HDS system is available from version 8.10 of C-CURE Building
Management System onwards.

Whilst the technology used in the two systems is quite different, the functionality provided is similar and
both systems are configured from the Archives folder of the Application Explorer.

Comparison of the Native and HDS data recording systems


Native HDS
Availability All versions Version 8.10 onwards
Data sources Trend data from variables included in the Trends folder, log Trend data from variables
data from the Log Lists and report data. added to the Trends folder, log
data from the Log Lists.
Data Through the HMI using a historic Trend Viewer. Through the HMI using a his-
retrieval Through the HMI using a Log Viewer. toric Trend Viewer.
Through the HMI using mimics configured as reports. Through the HMI using a Log
Programmatically using SCADA Basic. Viewer.
A 3rd party program with con-
nectivity to the selected data-
base or a VBA script.
Storage sys- File based archive units. Database based.
tem
Recording Proprietary. The recording format is partially configurable. Database format in con-
format figurable tables.
Main advant- Highly optimized data recording for maximum per- Industry standard (database)
age formance. recording format with easy
access from 3rd party
products.
Main dis- Access from 3rd party products limited. Requires a more powerful PC
advantage (CPU, RAM & hard disk) to
achieve a similar performance
to a proprietary format archive
unit.

If you need to archive data timestamped at the device level, it is recommended to use Database
archiving (HDS). In general, the native recording system (proprietary archive unit) does not provide
a reliable data sequence.

The total number of all archive units in a project is limited to 512.

- 1063 -
Managing Archives in the Application Explorer

Tasks available when the Archives folder is selected


Icon Task Description
Settings Display the general archives settings dialog.
Database cre- Open the Database creation wizard, which guides you through the process of creating
ation wizard an HDS database and associated configuration.

- 1064 -
Archives Settings
The archives settings can be displayed from the Archives folder in the Application Explorer's Main settings
dialog or by using the Settings task when the Archives is selected in the Application Explorer's configuration
tree. Show picture

l Log only log alarm on/off changes in log lists - Selecting this property causes the acknowledged con-
dition of an alarm to be ignored - see explanation below. You must restart C-CURE Building Man-
agement System after changing this property before it takes effect.
l Storage folder for archive units - Select the location of the folder used for proprietary, ODBC and VCR
archive units. You must restart C-CURE Building Management System after changing this property
before it takes effect.
l Default - Use the default folder (the TH folder of the project).
l Custom folder - Enter and use a specific folder. You can only use an absolute path, relative paths
are not allowed. The folder must always be accessible. The default setting is the TH folder of the
project.
l Proprietary archive units
l Secure records to prevent tampering - Adds a CRC (Cyclic Redundancy Check) to proprietary
format archive units to protect the data from being tampered with.
l Trend recording fast exit - Reduces the time taken to flush the trend recording buffers to hard
disk on shutdown by writing all the data in one shot. The disadvantage of this method is that it is
more prone to data loss should there be any problems during shutdown.
l Trend recording mode
l On change - Enable on-change (exception) trend recording. The trend Period property is used as
a time filter. Applies to the entire project.
l Force one record per period - Enable periodic trend recording. The trend Period property is used
as a sampling period. Applies to the entire project.

Using the Only log alarm on/off changes property


Selecting this property causes the acknowledged condition of an alarm to be ignored as follows.
Alarm state Logged as
On, On - Not Ack. and On - Ack On
Off and Off - Not Ack. Off
Unavailable Unavailable
Selecting this property changes the behavior of the Log Viewer and the appearance of the log list Event Filter
tab but it does not change the operation of the Alarm Viewer. Show picture

- 1065 -
C-CURE Building Management System must be restarted after changing this property before it takes
effect.

- 1066 -
Using the Historic Data Server to record data

- 1067 -
Overview of HDS Data Recording
The HDS collects and records real time data from C-CURE Building Management System variables in an
industry standard database such as SQL Server. The recorded data can be displayed using the Trend or Log
Viewers or by a 3rd party product compatible with the selected database.
This version of the software has been qualified for use with the following database standards.

l Access 2000 (Using Jet 4.0)


l Microsoft SQL Server

See the Installation book for more information about supported SQL Server versions.

Data is recorded in configurable tables of which there are two types.

l Trend tables - Used for the periodic recording of register and bit variables. You can configure one or
more trend tables in each database. Recorded data may be played back through a Trend Viewer. When
a variable is selected for trend recording, you select the database, the table within that database and
the period at which the variable becomes eligible to be recorded.
l Log tables - Used for the event recording of bit and alarm changes of state and user actions. You can
configure one or more log tables in each database. The configuration of a log table selects which prop-
erties are recorded from each eligible variable. The variables that are eligible are selected by the con-
figuration of a particular log list. Recorded data may be played back through a Log Viewer.

The maximum number of tables that can be loaded by the HDS is 500.

Simplified schematic of data recording in the HDS.

- 1068 -
Using the Set as Default Property
The Set as default property occurs in the HDS in the following items.

l Log tables
l Trend tables
l Trend groups
l Database

The Set as default property has two main uses.

l To reduce configuration time by pre-selecting which of the several instances that have been con-
figured are to be used by default. For example, you might create a database with two log tables, one
of which will have the Set as default property selected. When you create a log list, its output will auto-
matically be directed to the log table set as default, unless you specify otherwise.
l To simply configuration changes. This is best explained by a simple example. If you have two data-
bases Database1 and Database2. Database1 has the Set as default property selected. Any data being
recorded will be sent to Database1 unless you specify otherwise. If you then change the configuration
so that Database2 is the default, all data will be sent to Database2 without having to change any other
configuration properties.

If you use the HDS for data recording the following configuration is mandatory.

l One database set to default.


l One trend group set to default.
l For each database (the default plus any additional databases).
l One trend table set as default.
l One log table set as default.

- 1069 -
The HDS configuration files

- 1070 -
The HDS Configuration Files
The configuration of the HDS is saved in two files.

l The HDS.INI file is located in the Bin folder of C-CURE Building Management System and affects the
operation of the HDS for all projects.
l The HDSCONF.DAT file is located in the project's C folder and only affects the operation of the HDS for
that project.

Most of the properties in the configuration files are generated as a result of configuring the HDS with the
Archives Explorer. However, there are some properties, used for fine tuning of the HDS, that can only be
changed by directly editing the configuration files using a text editor such as notepad.
Before changing any of the properties in the HDS file, both C-CURE Building Management System and the
HDS must be shutdown. The best way to ensure this is to restart the operating system and edit the files
before C-CURE Building Management System is started.
You should only change HDSCONF.DAT or HDS.INI under the supervision of technical support.

- 1071 -
The HDS.INI File
The HDS.INI file is located in the Bin folder and affects the operation of the HDS for all projects. The fol-
lowing properties are not available through the project configuration and must be changed directly by edit-
ing the HDS.INI file directly with a text editor.
You should only change HDS.INI under the supervision of technical support.

DefaultMaxBufferedEvents
Specifies the default value for MaxBufferedEvents parameter defined in the HDSCONF.DAT project con-
figuration file. See the topic The HDSCONF.DAT file topic for more information. The default value is 20000.

DefaultMaxPurgedRecords
Specifies the default value for MaxPurgedRecords parameter defined in the HDSCONF.DAT project con-
figuration file. See the topic The HDSCONF.DAT file topic for more information. The default value is 30000.

DefaultLocalDatabasesDir
Specifies the default location in which the HDS creates all the databases. If the first character is a full stop
then the directory is considered to be relative to the Bin folder. In all other cases, the location is absolute.
The default value is ..\Databases\.

- 1072 -
The HDSCONF.DAT File
The HDSCONF.DAT file is located in the project's C folder and only affects the operation of the HDS for that
project. The following properties are not available through the configuration dialogs and must be changed
directly by editing the HDSCONF.DAT file directly with a text editor.
You should only change HDSCONF.DAT under the supervision of technical support.

In the [GENERAL] section

UseUnicode
Specifies how the HDS stores string data when using an SQL Server database.

l UseUnicode=0 - Strings are saved using Multi-Byte Character Set (MBCS) encoding. MBCS is a method
of character encoding where characters are composed of 1 or 2 bytes, which can provide considerable
space saving compared to unicode. However, in general, MBCS is only suitable for characters found in
western languages. This is the default value.
l UseUnicode=1 - Strings are saved using unicode encoding. Unicode treats all characters as having a
fixed width of 2 bytes and therefore requires more space than MBCS encoding. However, unicode is
designed to support all languages and it should always be used for projects designed for international
use particularly those using non-western character sets.

QuickStop
When C-CURE Building Management System is shut down, it can take a considerable amount of time for the
HDS to stop, as it has to flush all the data in its memory buffers to the databases. It is possible to force the
HDS to shut down without flushing the data to the databases by setting this parameter to 1. This option can
be very useful during the project development phase where the loss of data is not important.

l QuickStop=0 - The HDS is shut down normally after flushing all the data in its memory buffers to the
databases. This is the default value.
l QuickStop=1 - The HDS is shut down quickly without flushing all the data in its memory buffers to the
databases. If you use this option during the project development, remember to remove it before the
project is commissioned.

EnableUI
Controls access to the HDS user interface. The HDS user interface is displayed by double clicking on the HDS
icon in the Window's System Tray.

l EnableUI=0 - The HDS user interface is disabled.


l EnableUI=1 - The HDS user interface is enabled (default).

EnableTraceWindow
Controls access to the Trace window in the HDS user interface. The Trace window enables some debug facil-
ities in the HDS.

l EnableTraceWindow=0 - The Trace window in the HDS user interface is disabled.


l EnableTraceWindow=1 - The Trace window in the HDS user interface is enabled (default).

MaxBufferedEvents
Specifies the maximum number of incoming events in the HDS buffer. If the number of events is exceeded
the HDS temporarily stops accepting new events. If this property is not defined then the default value of
DefaultMaxBufferedEvents configured in HDS.INI is used.

MaxPurgedRecords
Specifies how the HDS manages the mechanism for database size limitation based on age of data and emer-
gency purge. This property is used only for SQL Server databases.

- 1073 -
When purging a database, SQL Server records all the transactions in the database log file (.ldf). If purging a
large number of records this can generate a very large file. There are two ways in which purging may be
managed, controlled by this property.

l MaxPurgedRecords=0 - Uses the SQL Server built in purge mechanism. The SQL server handles the
purge itself with no limitation on the number of records purged. This has the potential to create prob-
lems if a very large log file is created.
l MaxPurgedRecords=Any value other than 0 - Uses the HDS to purge records a block at a time. The
size of the log file is limited by the number of records in each block, which is in turn defined by the
value of MaxPurgedRecords.

If this property is not defined then the default value of DefaultMaxPurgedRecords configured in HDS.INI is
used.

In the [PERFORMANCE] section

TimeSortingPeriod
Defines the period of time for which data is stored and sorted in a temporary buffer before being written to
the database. This helps to reduce database fragmentation. If not defined a default value of 0 is used (no
sorting).

- 1074 -
Tracing problems with the HDS

- 1075 -
Overview of Tracing Problems with the HDS
If at any time, you are experiencing problems with historic data recording it can be useful to see the trans-
actions occurring between the HDS and the database. To do this you can run the HDS in debug mode.

You should only use these tools if asked to do so by the Technical Support desk.

- 1076 -
Using the Debug Facility in the HDS
To enable the Debug Facility in the HDS you must first shut down C-CURE Building Management System and
modify the HDS initialization file HDSCONF.DAT located in the project's C folder. Open this file with a text
editor and add or modify the following lines.
EnableUI=1
EnableTraceWindow=1
Do not modify anything else in this file.

After application restart, double clicking on the HDS icon in the system tray will now open a debug window.
To display the transactions taking place select Debug. Trace from the menu.
Show picture

You can select the type of transactions that are displayed using the dialog opened from the menu command
Debug.General parameters. You should only change the settings in this dialog if you are asked to do so by
the support agency.
Once you have finished using the HDS in debug mode, shut down C-CURE Building Management System and
return the HDS initialization file to its original configuration.
EnableUI=0
EnableTraceWindow=0

- 1077 -
Using the System.HDS.Overflow Variable
This variable is set to 1 if the HDS has stopped recording information because the number of buffered events
has exceeded the configured limit. There are several ways to resolve this.

l Increase the value of MaxBufferedEvents. This is configured in the HDS initialization file HDS.ini, in
the Bin folder. You should only change it if instructed by the Technical Support team as changing this
value may affect C-CURE Building Management System's general operation.
l Reduce the number of events by increasing the period and/or deadband used for trend recording.
l Use a more powerful PC.

- 1078 -
HDS Status Variables
HDS information
The following variables provide information about the status of the HDS.
System.HDS.ErrorCount R/W Register Automatic
Incremented each time there is an error or warning from the HDS. If recorded allows the user to see a his-
tory of any errors with the HDS. Can be reset by the application.

System.HDS.PendingRecords R Register Automatic


The number of records in the HDS buffer waiting to be stored in the database.

System.HDS.Overflow R Bit Automatic


Set to 1 when the HDS stops queuing records because the event buffer is full (number of pending records
has reached the buffer size).

System.HDS.Started R Bit Automatic


Set to 1 when the HDS is running. Set to 0 when it is stopped. Note that the HDS stops automatically if no
more storage space is available to it.

SYSTEM.HDS.NoResponseCount R Register Automatic


Incremented when a request between C-CURE Building Management System and the HDS is not completed
because of a timeout (5 minutes for trend data and 8 minutes for log data).

HDS database information


The following variables provide information about the status of each HDS database.
System.HDS.<DatabaseName>.Defrag R Bit Automatic
Set to 1 when a maintenance task of type index defragmentation is in progress.

System.HDS.<DatabaseName>.Custom R Bit Automatic


Set to 1 when a maintenance task of type custom is in progress.

System.HDS.<DatabaseName>.NoResponseCount R Bit Automatic


Incremented when a request between C-CURE Building Management System and the HDS is not completed
because of a timeout (5 minutes for trend data and 8 minutes for log data) for a given database.

System.HDS.<DatabaseName>.SpaceUsed R/W Register Automatic


The percentage of the database capacity (maximum database size) used.

System.HDS.<DatabaseName>.SpaceAlloc R Register Automatic


The storage space allocated to the database (in Mb).

System.HDS.<DatabaseName>.DelayProc R Bit Automatic


If set to 1, indicates that the processing of purges, shrinking or export has been blocked using VBA.

System.HDS.<DatabaseName>.Disconn R Bit Automatic


If set to 1, indicates that the database is off-line.

- 1079 -
System.HDS.<DatabaseName>.Paused R Bit Automatic
If set to 1, indicates that records are not being recorded in the database. Set by the HDS if the database is
full, or may also be set using VBA.

System.HDS.<DatabaseName>.DiskFull R Bit Automatic


If set to 1, indicates that there is not enough space on the storage device to store any more records to the
database.

System.HDS.<DatabaseName>.Full R Bit Automatic


If set to 1, indicates that the database has reached its maximum configured size.

System.HDS.<DatabaseName>.Compact R Bit Automatic


Set to 1 when a maintenance task of type shrink is in progress.

System.HDS.<DatabaseName>.Purge R Bit Automatic


Set to 1 when a maintenance task of type purge is in progress.

System.HDS.<DatabaseName>.Export R Bit Automatic


Set to 1 when a maintenance task of type export is in progress.

System.HDS.<DatabaseName>.Synchro R Bit Automatic


Deprecated - Do not use.

System.HDS.<DatabaseName>.EmergencyPurge R Bit Automatic


Set to 1 when an emergency purge is in progress.

- 1080 -
Database migration
Depending on changes brought to the archiving features, migrating to a newer version of C-CURE Building
Management System can require changes to the HDS database schema for each of your databases.
2 mechanisms are available to ensure a smooth migration:

l If the database size is less than 10 Gb, the conversion will happen automatically the first time that the
project is started with the new version of C-CURE Building Management System. This may take sev-
eral minutes during which time you must not restart the computer.
l If the database size is greater than 10 Gb, the HDS will not start and you must use a T-SQL migration
script to manually convert the historic data. The script is found in Bin folder and must be run using SQL
Server Management Studio. If you are unsure about how to do that then please contact your Technical
Support provider.

Before initiating either the automatic or manual conversion, you should ensure that the historic data
files are backed up.

Migration of Historic Data to Version 12


The HDS database table structures changed in version 12 as follows:

l In the Log Table, the size of the LogList column increased to 100 characters.

If you have a project developed in a version earlier than 12, historic data has to be converted before it is
compatible.

Migration of Historic Data to Version 11.2 (or later)


The HDS database table structures changed in version 11.2 as follows:

l In the Log Table, the size of the AssocLabel column increased from 12 to 255 characters and the
EvtTitle column increased from 24 to 255 characters.
l In the Trend Table, the size of the AssocLabel column increased from 12 to 255 characters.

If you have a project developed in a version earlier than 11.2, historic data has to be converted before it is
compatible.

Migration of Historic Data from Version 9.0 (or earlier) to Version 10.0 (or later)
Enhancement to the operation of the HDS means that the table structures used in version 9.0 and earlier are
not compatible with those in version 10.0 and later. If you have a project developed in version 9.0 or earlier
that is using the HDS, historic data has to be converted before it is compatible with version 10.0 or later.
For more information, see the document "HDS Database migration.pdf" in the documentation addenda.

- 1081 -
Using the C-CURE Building Management System's native data recording

- 1082 -
Overview of Recording in Proprietary Archive Units
Native data recording records in, and display from, C-CURE Building Management System own built-in data
storage system.

Where is the data recorded?


The data is recorded in one or more archive units that are created as part of configuration. There are a num-
ber of different types of archive units. The choice of which type of archive unit is used mainly depends on
how the recorded data is to be retrieved. See the topic About the different types of archive unit for more
information.

What types of data can I record?


Type Data recorded Retrieval of recorded data
Trend data The values of register and bit Through the HMI using a historic Trend Viewer.
variables. Programmatically using SCADA Basic.
3rd party products, word processor, spreadsheet, database
etc. - depending on the chosen recording format.
Log data The values of bit and alarm Through the HMI using a Log Viewer.
variables plus the following Programmatically using SCADA Basic.
operator actions: 3rd party products, word processor, spreadsheet, database
Send command, send pro- etc. - depending on the chosen recording format.
gram, alarm acknowledge,
logon and logoff.
Report data The values of register, bit, Through the HMI using mimics configured as reports.
alarm and text variables. Printed to a graphic printer.
VCR data The values of register, bit, Through the HMI using a specially configured C-CURE Building
alarm and text variables. Management System station. The data is replayed in pseudo
real time controlled using a VCR style (Video Cassette
Recorder) dialog.

Simplified schematic of native data recording

- 1083 -
Native Data Recording Limits
Proprietary archive unit Min Max Default
Number of units 512
Capacity per archive unit 1 MB 100 GB* 10 MB
Capacity per file 1 KB 32 MB** 1000 KB
* expressed in the Archive Unit properties dialog as 100000 MB.
** expressed in the Archive Unit properties dialog as 32000 KB.

Free archive unit Min Max Default


Cache memory size 0 KB 32 KB 32 KB
Cache write period 0 sec 32000 sec 120 sec
Capacity per file 0 KB 32000 KB 0 KB

Reports Min Max Default


Cache memory size 1 KB 32 KB 32 KB
Cache write period 0 sec. 32000 sec. 120 sec.

Trends Min Max Default


Cache memory size 1 KB 32 KB 32 KB
Cache write period 0 sec. 32000 sec. 120 sec.
Filtering period 0 sec. 32000 sec. 0 sec.

Log list Min Max Default


Cache memory size 1 KB 32 KB 32 KB
Cache write period 0 sec 32000 sec 120 sec
Time ordered buffer period 0 sec 32000 sec 0 sec
Time ordered buffer size 1 KB 900 KB 900 KB

About daylight saving and recording data


If you enable the option in Windows to automatically adjust the clock for daylight saving changes it means
that once a year the affected PC loses an hour (when the clocks go forward) and once a year it gains an hour
(when the clocks go back). Whilst this does not have any detrimental effect on C-CURE Building Management
System, it has the following effect on the historical data recording.

l Clocks go forward - for one hour there will be no historic data.


l Clocks go back - for one hour there will be two sets of data with the same timestamps.

The Trend Viewer in particular is not designed to deal with two sets of data with the same timestamp.
If you need to archive data timestamped at the device level, it is recommended to use Database
archiving (HDS). In general, the native recording system (proprietary archive unit) does not provide
a reliable data sequence.

- 1084 -
Configuring archive units

- 1085 -
Managing Archive Units in the Application Explorer

Tasks available when the Archives Units folder is selected


Icon Task Description
Creates a general-purpose archive unit in which data is recorded in an industry
Add a database unit
standard database such as SQL Server.
Add a proprietary Creates a general-purpose archive unit in which data is recorded in files in a
unit format specific to C-CURE Building Management System.
Creates a special-purpose archive unit in which data is recorded in files in a
Add a free unit
user configurable format.
Creates a special-purpose archive unit in which data is recorded in an ODBC
Add an ODBC unit
database. Superseded by the database archive unit from version 8.10 onwards.
Creates a special-purpose archive unit only used for projects configured for the
Add a VCR unit
VCR facility.

Tasks available when a database archive unit is selected


Icon Task Description
Remove Remove the database archive unit.
Properties Display the database archive unit properties dialog.

Tasks available when a proprietary archive unit is selected


Icon Task Description
Remove Remove the proprietary archive unit.
Properties Display the proprietary archive unit properties dialog.

Tasks available when a free archive unit is selected


Icon Task Description
Remove Remove the free archive unit.
Properties Display the free archive unit properties dialog.

Tasks available when an ODBC archive unit is selected


Icon Task Description
Remove Remove the ODBC archive unit.
Properties Display the ODBC archive unit properties dialog.

Tasks available when a VCR archive unit is selected


Icon Task Description
Remove Remove the VCR archive unit.
Properties Display the VCR archive unit properties dialog.

Tasks available when a Log Lists folder is selected


Icon Task Description
Add a log list Add a log list to the log list folder of the selected archive unit.

Tasks available when a Trends folder is selected


Icon Task Description
Add a trend Add a variable to the trends folder of the selected archive unit.

- 1086 -
Tasks available when a Log Report folder is selected
Icon Task Description
Add a log report Add a log report to the log report folder of the selected archive unit.

Tasks available when a Log List is selected


Icon Task Description
Remove Remove the selected Log List.
Properties Display the log list properties dialog.

Tasks available when a Trend is selected


Icon Task Description
Remove Remove the selected variable (trend) from the trend folder.
Properties Display the trend properties dialog.

Tasks available when a Log Report is selected


Icon Task Description
Remove Remove the selected Log Report.
Properties Display the log report properties dialog.

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior when using cut and paste, or copy and paste, on con-
figuration objects in the Archives folder.
Archive object Behavior
Log list The pasted Log List must have a unique name.
You can only paste a Log List to the same type of archive unit from which it originated.
Trend The pasted Trend must have a unique name within the archive unit although the name
can be repeated in different archive units within the same project.
You can only paste a Trend to the same type of archive unit from which it originated.
As the Trend object name is also the name of the trended variable, a variable with the
same name as the pasted Trend must already exist.
Log report The pasted Log Report must have a unique name.
Database archive The pasted Archive Unit must have a unique name.
unit Any subordinate Log Lists are duplicated but with a new and unique name.
Any subordinate Trends are duplicated with the same name (same variable) but with
the Primary property de-selected.
Proprietary archive The pasted Archive Unit must have a unique name.
unit Any subordinate Log Lists are duplicated but with a new and unique name.
Any subordinate Trends are duplicated with the same name (same variable) but with
the Primary property de-selected.
Any subordinate Log Reports are duplicated but with a new and unique name.
Free unit The pasted Archive Unit must have a unique name.
Any subordinate Log Lists are duplicated but with a new and unique name.
Any subordinate Trends are duplicated with the same name (same variable) but with
the Primary property de-selected.
ODBC unit The pasted Archive Unit must have a unique name.
Any subordinate Log Lists are duplicated but with a new and unique name.
Any subordinate Trends are duplicated with the same name (same variable) but with
the Primary property de-selected.
VCR unit Not supported by cut copy paste as it is only possible to have one VCR archive unit in a
project.

- 1087 -
Pasting any of the configuration objects from the Archives folder only creates the configuration. It
does not paste any historical data that may have been recorded by the original object.

If you cut and paste an Archive Unit the data recorded in the original archive unit will be lost.

- 1088 -
Types of Archive Unit
Several different types of archive unit may be configured. The type of archive unit(s) that you use is depend-
ent on how the recorded data is to be retrieved.

Database
General-purpose archive unit.

l Main advantage - Records data in an industry standard database.


l Main disadvantages - Can use considerable storage space. Access speed can be compromised with lar-
ger databases files.

Data source Trend data from variables added to the Trends folder and log data from the Log Lists.
Data retrieval Historic Trend Viewer.
Log Viewer.
Programmatically using SCADA Basic.
Recording sys- Industry standard database. Maintenance mechanism for controlling file size and/or age
tem of data.
Location In the Databases folder in the root of the installation folder.
Record format Sql relational database tables. Format of tables partially configurable.
Redundancy and Supported.
consolidation

Proprietary
General-purpose archive unit.

l Main advantage - Highly optimized data recording for maximum performance.


l Main disadvantage - Proprietary format so access by 3rd party products limited.

Data source Trend data from variables added to the Trends folder, Log data from the Log Lists and
report data.
Data retrieval Historic Trend Viewer.
Log Viewer.
Mimics configured as reports.
Programmatically using SCADA Basic.
Recording sys- File based. Each archive unit is composed of a number of files of pre-defined size. The old-
tem est file is discarded when the unit becomes full and a new file is created. Files may be
automatically copied to another location before they are discarded.
Location Normally within the TH folder of the project.
Record format Proprietary. Binary or ASCII data is recorded in blocks. The record format is partly con-
figurable.
Redundancy and Not supported.
consolidation

(Printers)
A pre-configured virtual archive unit that allows log and report data to be sent directly to a printer without
being recorded in an archive unit.

Free
Special purpose archive unit only used if access to data is required in a simple ASCII format by 3rd party
product.
Data source Trend data from variables added to the Trends folder and Log data from the Log Lists.
Data retrieval 3rd party products, word processor, spreadsheet, database etc. - depending on the
chosen recording format.
Recording sys- File based. Sequential system with new uniquely named file created each time the cur-
tem rent file becomes full. No file management - files must be moved or deleted by some
means external to C-CURE Building Management System.

- 1089 -
Location Anywhere within the Windows' file system.
Record Format ASCII. Each data point is recorded on a single line. The record format is fully con-
figurable.
Redundancy and Not supported.
consolidation

ODBC
Special-purpose archive unit only used if access to data is required in database format by a 3rd party
product. Superseded in version 8.10 onwards by the database type archive unit.
Data Source Trend data from variables added to the Trends folder, Log data from the Log Lists and
report data.
Data Retrieval Through the HMI using a historic Trend Viewer.
Through the HMI using a Log Viewer.
Through the HMI using mimics configured as reports.
Any program with connectivity to the selected database.
Recording Sys- ODBC database.
tem
Location Anywhere within the Windows' file system.
Recording ODBC database in fixed format tables.
Format
Redundancy and Not supported.
consolidation

VCR
Special-purpose archive unit only used for projects configured for the VCR facility.
Data Source The values of register, bit, alarm and text variables.
Data Retrieval Through the HMI using a specially configured C-CURE Building Management System sta-
tion. The data is replayed in pseudo real time controlled using a VCR style (Video Cas-
sette Recorder) dialog.
Recording Sys- File based. New file created periodically each time a snapshot of the variable values is
tem taken.
Location Normally within the TH folder of the project.
Recording Proprietary.
Format
Redundancy and Not supported.
consolidation

If you need to archive data timestamped at the device level, it is recommended to use Database
archiving (HDS). In general, the native recording system (proprietary archive unit) does not provide
a reliable data sequence.

- 1090 -
Database archive unit

- 1091 -
Configuring a Database Archive Unit
Database archive units require very little configuration. Their main purpose is to behave as a container for
the log and trend folders so that the recording architecture of the HDS is the same as that of C-CURE Build-
ing Management System native data recording.

How to configure a Database type archive unit

1. Open the Application Explorer and expand the configuration tree to select the Archive Units folder.
2. From the task list, select Add a database unit. The Archive Unit dialog opens. Show picture

3. In the General tab, enter a Name and optional Description for the archive unit.
4. Click the OK button to confirm the configuration. A new archive unit is created containing two folders,
Log Lists and Trend.

It is only necessary to create one database archive unit no matter how many HDS databases or log
lists you create.

- 1092 -
Configuring log data recording

- 1093 -
Overview of Recording Log Data in the HDS
What data can I record?
Log data is primarily recorded for display through C-CURE Building Management System Log Viewer. The fol-
lowing events can be recorded.

l Changes in value of database bit variables.


l Changes in value of database alarm variables.
l User actions:
Logging on and off (including failures).
Sending a command (forcing a bit, register or text variable) from a control zone on a mimic.
Running a program from a control zone on a mimic.
Acknowledging an alarm.

Making events eligible for recording


To make bit and alarm variables eligible for logging you select the properties Log to 0 and Log to 1 in the
variable's configuration.
All user actions are eligible for logging without requiring any configuration.

Selecting what and where events are to be recorded


Events that are to be logged are selected by the configuration of one or more log lists. The output of each log
list is sent to either a specific, or the default, log table and database. The same events can be logged by one
or more log lists.
Filtering at recording time based on properties such as the domain, nature or other extended attrib-
utes is not available with HDS log lists.
In general, all events will be logged with a single log list and stored in a single Log table in your data-
base.
Filtering is possible when requesting and displaying logged events to the user with the log viewer, or
when exporting logged data.

Population filtering based on the source is not supported to filter in log viewers (and log printing)
when data are archived using a database archive unit (HDS).

- 1094 -
How to Configure a HDS Log List
1. Open the Application Explorer and expand the configuration tree to select a previously configured data-
base archive unit.
2. Select the Log Lists folder, and from the task list select Add a log list. The Log List Configuration dialog
appears.
3. Enter a Name and optional Description for the log list.
4. If not using the default database and table select the Database tab and select the Database and Table
to be used.
5. Click the OK button to confirm the configuration. A new log list is created.

- 1095 -
Filtering Events Using the Event Filter Tab
The Event Filter tab allows filtering of events that are recorded according to the event type. Ticking an
option means that the event is allowed to pass, un-ticking an option means that the event is blocked. Show
picture
The following event types are supported.

l Alarm events
l Alarm off. The change of an alarm to the off state.
l Alarm off, Not Ack. The change of an alarm to the off, not acknowledged state.
l Alarm on, Ack. The change of an alarm to the on, acknowledged state.
l Alarm on, Not Ack. The change of an alarm to the on, not acknowledged state.
l Unavailable alarm events
l Expression masked
l Inhibited
l Not accessible
l Program masked
l Alarm masked
l User masked
l Bit changes
l Change to 0. The change of a bit from any state to 0.
l Change to 1. The change of a bit from any state to 1.
l Unavailable. The change from any state to unavailable (invalid).
l User actions
l Acknowledge. Acknowledging an alarm.
l Command. The forcing of a bit, register or text variable from a control zone animation.
l Execute program. Running a SCADA Basic program from a control zone animation.
l Logon/logoff. Logging on and off and failed attempts at logging on.
l Alarm mask. Masking an alarm

Alarm events may also be filtered by a minimum and maximum alarm level.

- 1096 -
Configuring trend data recording

- 1097 -
Overview of Recording Trend Data in the HDS
What data can I record?
Trend data is primarily recorded for display through C-CURE Building Management System Trend Viewer.
The following data can be recorded.

l Changes in value of database bit variables.


l Changes in value of database register variables.

Configuring variables for HDS trend recording


To configure a variable for trend recording in the HDS you add its name to the Trends folder in a Database
type archive unit.

How do I configure the rate at which variables are recorded?


The rate at which bit and register variables are recorded by the HDS is configured using a Trend Group. At
least one trend group must be configured to provide the default recording rate.

- 1098 -
Configuring a Trend Group
A Trend Group is used to configure the recording properties, for one or more variables, when recorded in a
database archive unit. The properties must be given careful consideration to make sure variables are only
recorded when necessary. Recording variables more often that necessary by using too small a Period or
Deadband can rapidly fill a database.

How to configure a trend group for exception recording

1. Open the Application Explorer and expand the configuration tree to select the Trend Group folder.
2. From the task list, select Add a trend group.
3. In the Name field, enter a name by which the Trend Group will be known. You can enter an optional
comment in the Description field.
4. Tick the Set as default tick box if the trend group is to be used as the default. The Set as default tick
box is only available if you have created two or more trend groups.
5. Enter the Period for the group in hours, minutes, seconds and milliseconds. The minimum is 0 seconds
and the maximum 100 hours. See the topic Understanding the trend period for a detailed explanation
of how the trend period works.
6. Enter the Deadband for the group as a percentage of the variable range. This deadband is in addition
to any deadband set in the variable configuration. See below for an explanation.
7. Click the OK button to confirm the configuration and close the dialog.

Show picture

If the minimum update rate of 0 seconds is used, the value of all variables allocated to that group
will be recorded every time they change.
While the Deadband is optional, it is recommended that it is always used. When measuring analogue
values digitally there is always a small variation in the measured value, even if the process value is
steady, due to the way in which analogue to digital converters work.

There can be one, and only one, Trend Group with the property Set as default ticked.

How the deadband affects recording


When deciding what deadband to use in a Trend Group you must also consider any deadband configured in
the variable's configuration will be in addition to that in the Trend Group. The effect is sometimes not obvi-
ous and is best illustrated by a simple example.
The value from the equipment increments by 1 every second. The register variable to which it is linked is
configured with a physical deadband of 3. Hence, the real-time value of the variable increases in 3's. 3, 6, 9,
12, 15 etc. The register is also recorded using a Trend Group with a deadband of 10%. The register's range
is 0 to 100 hence, the deadband represents a physical value of 10. The value that is recorded will increment
in 12's (Remember that the real-time value increments in 3's). The following picture illustrates this. The
white trace represents the raw value from the equipment. The green trace represents the real-time value of
the register and the yellow trace what is actually recorded. Show picture

- 1099 -
- 1100 -
Understanding How the Trend Period Affects Recording
The trend period referred to in this topic appears in both the Trend Group dialog (Database Archive Unit) and
in the Trend dialog (Proprietary Archive Unit). Show picture

C-CURE Building Management System allows the choice of on-change trend recording or periodic recording.
The choice is made in the Archives Settings dialog and applies to the entire project. This topic explains the
exact behavior of the two methods.
To illustrate the behavior the following variable values plotted against time are used. The Period is set to 10
seconds.

On startup, if the station does not belong to a Historical server association, an invalid point with a
timestamp of the startup, is always recorded.

On-change recording

l If the value, timestamp, or quality of the variable does not change during the Period, nothing is recor-
ded.
l If the value, timestamp or quality of the variable changes during the period, the most recent value is
recorded along with the time at the end of the period.
Value of 3 is recorded with a timestamp of hh:mm: 10
Value of 3 is recorded with a timestamp of hh:mm: 20
Value of 2 is recorded with a timestamp of hh:mm: 40
l If the value, timestamp or quality of the variable changes during the period, and the source of the vari-
able's value is a timestamped protocol (BACnet, OPC etc.), the most recent value is recorded along
with the timestamp at which it changed.
Value of 3 is recorded with a timestamp of hh:mm: 09
Value of 3 is recorded with a timestamp of hh:mm: 19
Value of 2 is recorded with a timestamp of hh:mm: 38

Periodic (One record per period) recording

l The value of the variable and the time is recorded at the end of each period. This behavior is irre-
spective of the source of the variable.
Value of 3 is recorded with a timestamp of hh:mm: 10

- 1101 -
Value of 3 is recorded with a timestamp of hh:mm: 20
Value of 3 is recorded with a timestamp of hh:mm: 30
Value of 2 is recorded with a timestamp of hh:mm: 40

If the Period is set to 0

l If the period is set to 0 the value of the variable, and the timestamp, is recorded every time that the
value, timestamp or quality changes irrespective of which recording mode is selected.
Value of 4 is recorded with a timestamp of hh:mm: 04
Value of 3 is recorded with a timestamp of hh:mm: 09
Value of 5 is recorded with a timestamp of hh:mm: 12
Value of 6 is recorded with a timestamp of hh:mm: 17
Etc.

- 1102 -
Adding a Variable to a HDS Trends Folder
1. Open the Application Explorer and expand the configuration tree to select the Trends folder of a data-
base archive unit.
2. From the task list, select Add a trend. The Trend (Variable) configuration dialog appears. Show picture

3. If not using the defaults, select the Database, Table and Trend Group to be used.
4. Click the OK button to confirm the configuration. The variable is added to the Trends folder. Trend
recording starts immediately.

- 1103 -
HDS Trend Recording Advanced Options
Inhibiting a trend recording using a database bit
Trend recording can be temporarily suspended using a database bit variable. You can choose one or zero as
the state during which recording is suspended.
The Inhibiting Bit properties are found in the General tab of the Trend dialog.

Disabling the recording of an invalid value on shutdown


By default, for any trend, C-CURE Building Management System records an invalid value as the final point
during shutdown. This is done so that the period of time when the software is shut down is clearly shown in a
Trend Viewer. The recording of this invalid value can be disabled by ticking the property Do not record
invalid value on shutdown.
This property is found in the General tab.

- 1104 -
Proprietary archive unit

- 1105 -
Configuring a proprietary archive unit

- 1106 -
Configuring a Proprietary Archive Unit
How to create and configure a proprietary archive unit

1. Open the Application Explorer and expand the configuration tree to select the Archives Units folder.
2. From the task list, select Add a proprietary unit. The Archive Unit dialog opens. Show picture

3. Enter the Name and optional Description for the new archive unit.
4. Configure the archive unit options (see list below)
5. Click OK to confirm the configuration and close the dialog.

Archive unit properties available from the General tab


Property Meaning
Unit name The name of the archive unit. The unit name or full path name (see below) is limited to 12
characters.
Normally the name will be the same as that of the project sub-folder where the archive
unit is located. However, it is also possible to specify a complete path, for example
C:\ALARMS. In that case, the archive unit is created outside of the project folder.
Description A description for the archive unit.
Read Only Option to make the archive unit read-only.
File format Option for recording the data with or without the variable's extended attributes.
Archive capacity Total capacity of the archive unit in megabytes. (See note below.)
Archive file size The size of each file making up the archive unit. This must be a divisor of the total capa-
city. The file size should be such that between 10 and 20 files are required. See note
below.
Percentage full The name of a register in the database that, if specified, will display the percentage use of
register the archive unit.
For details of how to configure the backing-up of archive units, see the topic Creating Archive Unit Backups.
For the maximum and minimum sizes of archive units and files, see the topic Recording Limits.

Archive unit properties available from the Networking tab


Property Meaning
Historical servers The name of a server station list (historical server list). Used on multi-station applications
to define on which station(s) data will be recorded for the archive unit. See the Net-
working book for further information.
Clients The name of a client station list. Used on multi-station applications to define which sta-
tions will be able to request records for the archive unit. See the Networking book for fur-
ther information.

In most cases, the list of server(s) producing a proprietary archive unit is a list that only contains

- 1107 -
one station. In some cases, if you want to archive a set of data in local archives on several stations,
it contains a list of stations where these local archives should be managed.
Using a server list that contains an association of servers is not recommended, as it implies per-
forming redundant operations that are not supported by proprietary archive units. With such a con-
figuration, depending on which station of the association was active or passive at some point in
time, you would end up with gaps in your archived data, and no mean for consolidating them.
If your project requires redundancy and consolidation for archive data, you should use
HDS database archive units.

Deleting an archive unit

1. Open the Application Explorer and expand the configuration tree to select the Archives Units folder.
2. Select the archive unit to be deleted and, from the task list, select Remove.
3. Click OK in the confirmation dialog to complete the process.

- 1108 -
Backing-up and restoring archive unit files

- 1109 -
Configuring Archive Unit Backups
The back-up mechanism copies the content of an archive unit folder to the back-up folder. The back-up is ini-
tiated by the change of state of a database bit variable. When a back-up is initiated, the following actions
take place:

1. The archive unit cache is flushed to the archive unit files.


2. Any files in the archive folder, that do not already exist in the back-up folder, are copied to the back-
up folder.
3. Recording continues in the archive unit in the next file in the sequence.
4. The value of the percentage full register is set to 0.

The back-up mechanism is normally configured so that it is triggered when the archive unit approaches full
(for example when the percentage full register is at 90%). Using the back-up mechanism means that you
can keep historic data indefinitely without older data being discarded by the archive unit's circular recording
mechanism.
Files in a back-up folder may be freely copied, moved or deleted without affecting C-CURE Building Man-
agement System's operation. Files that have been moved elsewhere (for example to long term storage) can
be restored at any time if necessary. See the topic Managing archive unit backup files.

Configuring an archive unit back-up

1. Open the Application Explorer and expand the configuration tree to select the archive unit to be con-
figured.
2. From the task list, select Properties.
3. Select the Back-up tab and configure the back-up properties. See the list below. Show picture

Property Meaning
Back-up archive Enable the back-up option.
files
Back-up directory The name of the folder to which the archive files are to be copied.
A separate back-up folder is required for each archive unit that will be backed up.
Identification text The name of a database text variable that, if specified, is used to append a comment to
the text that appears in the Event Viewer. The text is limited to 12 characters. Show pic-
ture
Triggering bit The name of the database bit used to initiate a back-up.
To 0, to 1 The transition of the triggering bit on which the back-up is run.

- 1110 -
The back-up folder for each archive unit must have a unique name to prevent the files from one
archive unit being mixed with those from another.

Automating the back-up


When you create each archive unit, you can select a database register variable that is updated automatically
to indicate how full the unit is. The register variable measures the capacity as a percentage, 100% being full
and 0% empty. Using the threshold system, you can use the register to set a bit that is then used to initiate
a backup.

The back-up folder cannot be defined by a UNC name such as \\MyFileServer\MyBackupDir, and it is
strongly advised not to back-up archives directly over a network or onto an external disk (USB disk,
NAS, File server...). Doing so may lead to file corruption and risks of unrecoverable archive data.

- 1111 -
Managing Archive Unit Back-up Files
What are the files in a back-up folder?

l hxxxxxxx.dat - Archive unit data file where xxxxxxxx is a unique sequential number within that
archive unit. For example h0000023.dat.
l hxxxxxxx.ind - Archive unit index file where xxxxxxx is a unique sequential number within that
archive unit. For example h0000023.ind. The index file contains information about the time period
covered by the data blocks in the corresponding data file.
l <Archive unit> - The summary file with the same name as that of the archive unit. For example U_
PROP1. The summary file contains essential information that is used by C-CURE Building Management
System when creating new data files in the archive unit folder. The summary file is not used in the
back-up folder but it is required when restoring a project after a catastrophic failure.
l <Archive unit>.end - See below.

What is the <archive unit>.end file used for?


Because the backup process is asynchronous, there is no way to easily know when it has finished. The file
<archive unit>.end is always the last file that is written and it presence can be used as a flag indicating that
the backup process is completed. The <archive unit>.end file does not actually contain useful data and any
existing instance of it can be deleted before the back-up is started. Whatever mechanism is used to initiate
the back-up (SCADA Basic program for example), the presence of the <archive unit>.end file is checked to
know when the back-up is complete.
<archive unit> should be substituted with the name of the actual archive unit to get the file name.
For example Trends.end

Removing files from the back-up folder


You can delete or move the data and index files from the back-up folder as required without affecting C-
CURE Building Management System's operation other than it will no longer have access to the data. For each
data file that you delete or move, you must also delete or move the corresponding index file.
If you have more than one archive unit (and hence more than one back-up folder) be careful not to mix up
the files. It is strongly recommended that you keep them in a sub folder with the Archive Unit name.

Restoring files in the back-up folder


Data and index files can be restored to the back-up folder without affecting C-CURE Building Management
System's operation. Data contained with the files becomes immediately available. You should not restore
the summary file.

Restoring files after a catastrophic failure


If you have had to make a full restore of the project, for example after a hard disk crash, the summary file
should be copied from the back-up folder to the Archive Unit folder within the project. This will ensure that
C-CURE Building Management System continues recording data in the next data file in the sequence. If you
do not restore the summary file, C-CURE Building Management System will start recording in the first file in
the sequence (h0000000.dat) and any historic data in the back-up folder will be out of sequence and no
longer available.

- 1112 -
Advanced information about proprietary archive units

- 1113 -
Managing the Archive Unit Summary Files
For each archive unit that is created, a corresponding summary file is produced. The summary file contains
essential information that is used by C-CURE Building Management System to access the archive unit files.
Should the summary file become corrupted the contents of the entire archive unit will be lost.
To protect the summary file against corruption caused by hard disk errors, two copies are created. The main
summary file takes the name of the archive unit plus a .SAV extension. For example, for an archive unit
called PROP1, the file would be called PROP1.SAV. The copy just takes the name of the archive unit with no
extension, for example PROP1. The two files are never opened at the same time. Both are held with the
archive units, e.g. in the project's folder TH/<unit name>. Show picture

Before it reads from or writes to the main summary file C-CURE Building Management System checks its
integrity. If it is found to be corrupted, its contents are replaced by the copy.
Two system variable bits are provided that can be used to monitor the status of the summary files.
Variable Meaning
SYSTEM.UNIT.<Archive Unit>.SOM1_STATUS The status of the main summary file.
SYSTEM.UNIT.<Archive Unit>.SOM2_STATUS The status of the copy summary file.
Each variable is set to a value of 0 if the file is healthy and to 1 if it is corrupt.

- 1114 -
How the Proprietary Unit Cache Works
Data recorded in the Proprietary Archive Unit uses a memory-based cache to reduce the amount of disk
activity and increase the recording efficiency.
There is a cache for:

l Each variable that is trended.


l Each Log List.
l Each report.

Each cache has two properties, Memory Size and Write Period, that together determine how the cache
behaves. This is best explained by a diagram.

The default configuration of 32K of memory and 120 second write period have been chosen as the best com-
promise between recording efficiency and minimizing loss of data under normal operating conditions.

- 1115 -
Why are my Proprietary Archive Units Smaller than the Configured Size?
Under some circumstances, the files that make up each Archive Unit are smaller than configured. There can
be various reasons for this.

Mismatch in the configuration of the archive unit file size and the cache memory size
To understand how this can happen a more detailed explanation of the recording mechanism is required.

l Each archive data file is paired with a matching index file. For example, H0000001.DAT is paired with
H0000001.IND. Each time a block of data is written to a data file, a corresponding entry is written to
the index file.
l The index file is limited to a maximum of 1500 entries.
l Therefore, the corresponding data file is limited to 1500 x cache memory size.

By default, the cache memory size is 32 KB meaning that the data file size limit of 32 MB will be reached
before the maximum number of entries are made in the index file. However if the cache memory size is
reduced its possible that the maximum number of entries in the index file will be reached before the data
file is full, thereby limiting the capacity of the archive unit. For example if the cache size is reduced to 4 KB,
the maximum data file size will be 1500 x 4 KB = 6 MB, much less than the maximum configurable data file
size of 32 MB.

Flushing the cache memory to the archive unit before it is full


The cache memory used to buffer data can sometimes be flushed to an archive unit file before it is full. This
can occur under the following circumstances.

l When the software is shut down.


l When an archive unit back-up takes place.
l When it is forced using the SCADA Basic History instruction.

When the cache is flushed, a corresponding entry is written to the index file resulting in a similar limitation
to that explained in the paragraph above.

- 1116 -
Configuring log data recording

- 1117 -
Overview of Log Data Recording in Proprietary Archive Units
What data can I record?
Log data is primarily recorded for display through C-CURE Building Management System Log Viewer. The fol-
lowing events can be recorded.

l Changes in value of bit variables.


l Changes in value of alarm variables.
l User actions:
Logging on and off (including failures).
Sending a command (forcing a bit, register or text variable) from a control zone on a mimic.
Running a program from a control zone on a mimic.
Acknowledging an alarm.

Making events eligible for recording


To make bit and alarm variables eligible for recording you select the properties Log to 0 and Log to 1 in the
variable's configuration.
All user actions are eligible for logging without requiring any configuration.

Using log lists to select what and where events are to be recorded
Events that are to be logged are selected by the configuration of one or more log lists. A log list is attached
to specific archive unit to which its output is directed. The output from a log list can also be printed to create
alarm printers, event printers etc. The same events can be logged by one or more log lists.

Using log lists with other types of archive unit


Log lists are also used with Free Format and ODBC archive units.
Log lists are also be used with the (Printers) virtual archive unit when only printed output (not recording) is
required.
If you need to archive data timestamped at the device level, it is recommended to use Database
archiving (HDS). In general, the native recording system (proprietary archive unit) does not provide
a reliable data sequence.

- 1118 -
How to Configure a Native Log List
Log lists are created and configured using the Log List dialog as follows.

Creating and configuring a log list

1. Open the Application Explorer and expand the configuration tree to display a previously configured
archive unit folder and select its Log Lists folder.
2. From the task list, select Add a Log List. This opens the Log List properties dialog at the General tab.
Show picture

3. Enter a unique name for the log list into the Name text box.
4. To create the log list with the default settings, click the OK button. A new log list will appear in the Log
Lists folder.

Each log list must have a unique name within the project.

Deleting a log list

1. Open the Application Explorer and expand the configuration tree to select an archive unit folder and its
Log Lists folder.
2. Select the log list to be deleted.
3. In the task list, select Remove and then click OK to confirm the action.

- 1119 -
Filtering Events Using the Event Filter Tab
The Event Filter tab configures filtering of events according to the event type. Ticking an option means that
the event is allowed to pass, un-ticking an option means that the event is blocked. Show picture The fol-
lowing event types are supported.

l Alarm events
l Alarm off. The change of an alarm to the off state.
l Alarm off, Not Ack. The change of an alarm to the off, not acknowledged state.
l Alarm on, Ack. The change of an alarm to the on, acknowledged state.
l Alarm on, Not Ack. The change of an alarm to the on, not acknowledged state.
l Unavailable alarm events
l Expression masked
l Inhibited
l Not accessible
l Program masked
l Alarm masked
l User masked
l Bit changes
l Change to 0. The change of a bit from any state to 0.
l Change to 1. The change of a bit from any state to 1.
l Unavailable. The change from any state to unavailable (invalid).
l User actions
l Acknowledge. Acknowledging an alarm.
l Command. The forcing of a bit, register or text variable from a control zone animation.
l Execute program. Running a SCADA Basic program from a control zone animation.
l Logon/logoff. Logging on and off and failed attempts at logging on.
l Alarm mask. Masking an alarm

Alarm events may also be filtered by a minimum and maximum alarm level.

- 1120 -
Using an Attributes Filter Expression
An attributes filter expression is used to apply additional filter criteria to the data that is recorded. An attrib-
utes filter can be used when configuring both log and trend recording. A filter starts with an equals sign and
is followed by one or more expressions. Each expression consists of a variable, an operator and a value, all
enclosed in brackets (...).
For example: =(#t BEG ALM) would include all variable names (#t) beginning (BEG) with the text ALM.
The following symbols are supported.
Symbol Variable
#t A variable name.
#T A variable label (description).
#B Boolean attribute (as a word).
#A1 to #A16 Extended attributes. #A1 and #A2 are reserved for Domain and Nature.

Symbol Operator
== Equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
^ or BEG Beginning with "string"
$ or INC Including "string"
[ or END Ending with "string"
&& Logical AND used between expressions
|| Logical OR used between expressions
The attributes filter expression is entered in the filter's Attributes Filter tab where you can either enter the
filter directly typing it into the Filter generated text box, or use a selection of drop down list boxes and com-
mand buttons to construct the filter interactively. Show picture

Examples of Filter Expressions


Filter Meaning
=(#t BEG FACTORY)&&((#A1 == DOM1)||(#A1 == The name of the variable starts with FACTORY AND
DOM2)) the Domain is either DOM1 OR DOM 2.
=(#A1 == DOM1)||(#A2 == NAT1) The Domain is DOM1 OR the Nature is NAT1.
=(#A5 >=10)&&(#A5 < 35) The attribute A5 is greater than or equal to 10 AND
less than 35.

- 1121 -
Note the use of brackets in the first example to control the order in which the expressions are eval-
uated.

- 1122 -
Printing from a Log List
As well as being sent to an archive unit, the output from a log list may also be sent to one of the line printers
configured in C-CURE Building Management System. Log lists created subordinate to the (Printers) virtual
archive unit produce only printed output as the (Printers) archive unit does not record anything.
To enable printing from a log list select one of the printers (1 to 12) from the Printer drop down list box in
the log lists General tab. The selected printer must have been configured in C-CURE Building Management
System.

Formatting the printed output


The content of each printed line can be configured using a format string entered in the Format text box in the
log list's General tab. The format elements used in the string can be found in the topic Format Elements for
Log List Printing and Free Format Archive Units.
You can enter an alternative configuration string directly in the field or configure it using a dialog displayed
by clicking the ellipsis button adjacent to the field. Show picture

Any characters entered other than the format elements are interpreted literally. So for example the format
string #D/#M/#Y #h:#m:#s #t = #C would produce a printed line such as:
03/10/06 16:32:46 EFFLUENT.TANK1.LEVEL = 1.67

- 1123 -
Log List Advanced Configuration
The following properties are all found in the log list's Advanced tab.

Changing what attributes are recorded each time an event is logged


When used with a proprietary archive unit you can customize the log list so that one or more of a variable's
extended attributes are logged along with the normal information. The value of these extended attributes
can then be displayed in the Log Viewer. The attributes that are recorded are selected by format elements
entered in the Attributes to record string.
Format elements To record
#@A1 to #@A16 Extended text attributes A1 to A16. #A1 and #A2 represent the variable's Domain
and Nature respectively and are the default setting.
#@B Extended binary attribute.
#@*A3 to #@*A16 Deferred extended text attributes. The real time value of the variable named in the
extended attributes A3 to A16 is recorded.

Changing the output buffer


When used with a proprietary format archive unit, the output from a log list is buffered to reduce how often
data is written to the archive unit thereby reducing activity on the media on which it resides. The operation
of the buffer is controlled by the following properties.

l Cache memory size - The size of the memory buffer used. If set to zero then it is disabled.
l Write period - The frequency at which the cache is flushed to HISTO.SAV.

See the topic How the proprietary archive unit cache works for a description of the operation of the output
buffer (cache).
The Cache memory size and Write period properties are found in the Advanced tab of the Report dialog.

Configuring a time ordered buffer


Under some special circumstances related to how data is timestamped, it can be useful to delay storage to
overcome small time lags. For this purpose, each log list has an optional buffer in which data may be sorted
before being output. The operation of the time ordered buffer is controlled using the following properties.

l Memory size - The size of the memory buffer used to sort data before it is copied to disk.
l Period - The period for which data is sorted. If this is zero then no sorting takes place.

If you need to archive data timestamped at the device level, it is recommended to use Database
archiving (HDS). In general, the native recording system (proprietary archive unit) does not provide
a reliable data sequence.

Inhibiting a log list using a database bit


The output from a log list can be temporarily suspended using a database bit variable. You can choose one
or zero as the state during which the log list operation is suspended.

While a log list is suspended, all events that would have passed its filter criteria are lost.

- 1124 -
Configuring trend data recording

- 1125 -
Overview of Trend Recording in Proprietary Archive Units
What data can I record?
Trend data is primarily recorded for display through C-CURE Building Management System Trend Viewer.
The following data can be recorded.

l Changes in value of bit variables.


l Changes in value of register variables.

Configuring variables for trend recording


To configure a variable for trend recording in the native archive units you add its name to the Trends folder
in a proprietary archive unit.

The same configuration is used for trend recording in a Free Format or ODBC archive unit.

How do I configure the rate at which variables are recorded?


The rate at which bit and register variables are recorded by is configured in the dialog that is displayed when
a variable is added to the Trends folder.
If you need to archive data timestamped at the device level, it is recommended to use Database
archiving (HDS). In general, the native recording system (proprietary archive unit) does not provide
a reliable data sequence.

- 1126 -
Adding a Variable to a Proprietary Archive Unit Trends Folder
How to add a variable to a Trends folder

1. Open the Application Explorer and expand the configuration tree to display a previously configured
archive unit folder and select its Trends folder.
2. In the task list, select Add a trend. The Trend Configuration dialog opens. Show picture

3. Enter the name of the variable to be added to the Trends folder in the Variable text box. You can either
type in the name or select it from the Variable Browser displayed by clicking the ellipsis button adja-
cent to the text box.
4. Enter an optional description in the Description text box.
5. By default, the value of the variable will be recorded each time that it changes. To change this tick the
Period tick box and enter a Period value in seconds. See the topic Understanding the trend period for
more information.
6. Click OK to confirm the configuration and close the dialog.

Deleting a trend

1. Open the Application Explorer and expand the configuration tree to display a previously configured
archive unit folder and select its Trends folder.
2. In the right pane, select the trend to be deleted.
3. From the task list select Remove and then confirm the action by clicking the OK button.

- 1127 -
Understanding How the Trend Period Affects Recording
The trend period referred to in this topic appears in both the Trend Group dialog (Database Archive Unit) and
in the Trend dialog (Proprietary Archive Unit). Show picture

C-CURE Building Management System allows the choice of on-change trend recording or periodic recording.
The choice is made in the Archives Settings dialog and applies to the entire project. This topic explains the
exact behavior of the two methods.
To illustrate the behavior the following variable values plotted against time are used. The Period is set to 10
seconds.

On startup, if the station does not belong to a Historical server association, an invalid point with a
timestamp of the startup, is always recorded.

On-change recording

l If the value, timestamp, or quality of the variable does not change during the Period, nothing is recor-
ded.
l If the value, timestamp or quality of the variable changes during the period, the most recent value is
recorded along with the time at the end of the period.
Value of 3 is recorded with a timestamp of hh:mm: 10
Value of 3 is recorded with a timestamp of hh:mm: 20
Value of 2 is recorded with a timestamp of hh:mm: 40
l If the value, timestamp or quality of the variable changes during the period, and the source of the vari-
able's value is a timestamped protocol (BACnet, OPC etc.), the most recent value is recorded along
with the timestamp at which it changed.
Value of 3 is recorded with a timestamp of hh:mm: 09
Value of 3 is recorded with a timestamp of hh:mm: 19
Value of 2 is recorded with a timestamp of hh:mm: 38

Periodic (One record per period) recording

l The value of the variable and the time is recorded at the end of each period. This behavior is irre-
spective of the source of the variable.
Value of 3 is recorded with a timestamp of hh:mm: 10

- 1128 -
Value of 3 is recorded with a timestamp of hh:mm: 20
Value of 3 is recorded with a timestamp of hh:mm: 30
Value of 2 is recorded with a timestamp of hh:mm: 40

If the Period is set to 0

l If the period is set to 0 the value of the variable, and the timestamp, is recorded every time that the
value, timestamp or quality changes irrespective of which recording mode is selected.
Value of 4 is recorded with a timestamp of hh:mm: 04
Value of 3 is recorded with a timestamp of hh:mm: 09
Value of 5 is recorded with a timestamp of hh:mm: 12
Value of 6 is recorded with a timestamp of hh:mm: 17
Etc.

- 1129 -
Using an Attributes Filter Expression
An attributes filter expression is used to apply additional filter criteria to the data that is recorded. An attrib-
utes filter can be used when configuring both log and trend recording. A filter starts with an equals sign and
is followed by one or more expressions. Each expression consists of a variable, an operator and a value, all
enclosed in brackets (...).
For example: =(#t BEG ALM) would include all variable names (#t) beginning (BEG) with the text ALM.
The following symbols are supported.
Symbol Variable
#t A variable name.
#T A variable label (description).
#B Boolean attribute (as a word).
#A1 to #A16 Extended attributes. #A1 and #A2 are reserved for Domain and Nature.

Symbol Operator
== Equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
^ or BEG Beginning with "string"
$ or INC Including "string"
[ or END Ending with "string"
&& Logical AND used between expressions
|| Logical OR used between expressions
The attributes filter expression is entered in the filter's Attributes Filter tab where you can either enter the
filter directly typing it into the Filter generated text box, or use a selection of drop down list boxes and com-
mand buttons to construct the filter interactively. Show picture

Examples of Filter Expressions


Filter Meaning
=(#t BEG FACTORY)&&((#A1 == DOM1)||(#A1 == The name of the variable starts with FACTORY AND
DOM2)) the Domain is either DOM1 OR DOM 2.
=(#A1 == DOM1)||(#A2 == NAT1) The Domain is DOM1 OR the Nature is NAT1.
=(#A5 >=10)&&(#A5 < 35) The attribute A5 is greater than or equal to 10 AND
less than 35.

- 1130 -
Note the use of brackets in the first example to control the order in which the expressions are eval-
uated.

- 1131 -
Trend Recording Advanced Options
Inhibiting a trend recording using a database bit
Trend recording can be temporarily suspended using a bit variable. You can choose one or zero as the state
during which recording is suspended.
The Inhibiting Bit properties are found in the General tab of the Trend dialog.

Disabling the recording of an invalid value on shutdown


By default, for any trend, C-CURE Building Management System records an invalid value as the final point
during shutdown. This is done so that the period of time when the software is shut down is clearly shown in a
Trend Viewer. The recording of this invalid value can be disabled by ticking the property Do not record
invalid value on shutdown.
This property is found in the General tab.

Importing trend data


If the property Import data file is ticked then the real time value of the variable is not recorded. Instead,
trend data can be imported using the SCADA BASIC instruction HISTORY.
The Import data file property is found in the Advanced tab of the Trend dialog. Show picture

Recording a variable's extended attributes


When used with a proprietary archive unit you can customize the trend recording so that one or more of a
variable's extended attributes are recorded along with the standard information. The attributes that are
recorded are selected by format elements entered in the Attributes to store field.
Format element To record
Extended text attributes A1 to A16. #A1 and #A2 represent the variable's Domain and
#@A1 to #@A16
Nature respectively and are the default setting.
#@B Extended binary attribute.
Deferred extended text attributes. The real time value of the variable named in the
#@*A3 to #@*A16
extended attributes A3 to A16 is recorded.
The Attributes to store property is found in the Advanced tab of the Trend dialog.

Changing the output buffer


When used with a proprietary format archive unit, trend data is buffered to reduce how often data is written
to the archive unit thereby reducing activity on the media on which it resides. The operation of the buffer is
controlled by the following properties.

l Cache memory size - The size of the memory buffer used. If set to zero then it is disabled.
l Cache write period - The frequency at which the cache is flushed to HISTO.SAV.

See the topic How the proprietary archive unit cache works for a description of the operation of the output
buffer (cache).
The Block length and Write period properties are found in the Advanced tab of the Trend dialog.

- 1132 -
Changing the data storage format

l Text - The data will be recorded in ASCII. Data recorded in ASCII format may be read by a text editor
or other program supporting text files, but is less compact than data stored in binary.
l Binary - The data will be recorded in binary. Data recorded in Binary format may not be read by a text
editor, but as the data is more compact it is quicker to replay it through a Trend Viewer and requires
less disk space.
l Add variable name for each record - By default each block of trend data is labeled with an internal
identifier that only C-CURE Building Management System understands, but is the most efficient in
terms of disk space. As an alternative, each data block can be labeled with the variable name. This
means that the data in the file is then much easier to interpret with a text editor or other program, but
the size of the records increases considerably.

- 1133 -
Configuring reports recording

- 1134 -
Overview of Recording Report Data in Proprietary Archive Units
What is a report?
A report is a record of the real-time value of selected bit, register and text variables, at a particular point in
time.

Configuring a report
A report is defined by 1 to 5 mimic windows that are created in the normal manner. These windows have
three purposes.

l The animations in the windows define which variables are to be included in the report.
l They define the layout of the report if it is to be printed.
l They can be used with the Report Replay Toolbox to replay reports later by the user.

When is report data recorded?


Report data is recorded each time a report is activated. A report is activated by a change in value of a selec-
ted database bit variable. Using a database bit means that a report can be easily configured to be event
driven, scheduled or on demand.

How can I play back a report?


If a report is recorded in the archive units, you can view it on the screen or print it later using the Report
Replay Toolbox. Reports are printed in a WYSIWYG ('What You See Is What You Get') format on the printer
selected during the report configuration. The report on the printer will look identical to the mimic windows
that define it (within the limitations of the printer you are using).

Using reports with the (Printers) virtual archive unit


Reports attached to the (Printers) virtual archive unit can only be printed when they are activated. The real
time value of the reports is not saved.

- 1135 -
How to Configure a Report
A report is configured in two stages.

l Drawing the mimics used as source windows.


l Configuring the report's properties.

Drawing the source windows


The mimic used as source windows are designed using the usual drawing tools. The following drawing ele-
ments should not be used in a window to be used for a report.

l Trend Viewer.
l Alarm Viewer.
l Log Viewer.
l Grid Viewer.
l ActiveX controls.
l OLE objects.

If the reports are to be printed, you should take into consideration the limitations of the printer you are
using.
Animations can use the real time values of variables or expressions. The window itself (border, title bar,
background) is not printed, it just provides a container for the drawing elements that form the report.
The window is printed at 96 pixels per inch (approximately 37.8 pixels per cm). That is to say, a square of
96 pixels on the screen would be 1 inch (2.54 cm) square on the paper.
Using A4 paper in portrait mode and taking into account the margins that a typical printer requires,
this limits the maximum printable size of the window to about 750 pixels wide by 1050 pixels high.

How to configure a report

1. Open the Application Explorer and expand the configuration tree to select an archive unit and its
Reports sub-folder.
2. From the task list, select Add a log report. The Log Report configuration dialog opens. Show picture

3. Enter a name and optional description for the report in the Name and Description fields respectively.
4. Enter the name of the bit variable used to activate the report in the Trigger bit text box. You can either
type in the name or select it using the Variable Browser displayed by clicking the ellipsis button adja-
cent to the text box.
5. Select the bit transition(s) on which the report will be activated.
6. Select the Windows tab and enter the name of up to five windows and their corresponding branches
that will define the layout of the report and the variables that are recorded. You can either type in the
names or select them using the dialog displayed by clicking the ellipsis button adjacent to the text
box.
7. If the report is to be printed when it is activated, select the Printing tab, select the printer that is to be
used and tick the Enable tick box.
8. Click on the OK button to confirm the configuration of the report.

Important notes about reports

- 1136 -
l A report is limited to 256 variables in total (irrespective of the number of mimics), using a block size
of 8KB.
l If you add or remove variables in a window used for a report, any instances that have been archived
will no longer display or print correctly. It is also possible that the variables will have the wrong val-
ues or no value at all.
l To view or print a report, the current user must have window access rights corresponding to those con-
figured in the report's windows. Recording a report in the archive units is unaffected by user rights.

- 1137 -
Report Advanced Properties
Changing the output buffer
When used with a proprietary format archive unit, report data is buffered to reduce how often data is written
to the archive unit thereby reducing activity on the media on which it resides. The operation of the buffer is
controlled by the following properties.

l Cache memory size - The size of the memory buffer used. If set to zero then it is disabled.
l Cache write period - The frequency at which the cache is flushed to HISTO.SAV.

See the topic How the proprietary archive unit cache works for a description of the operation of the output
buffer (cache).
The Block length and Write period properties are found in the Advanced tab of the Report dialog.

Printing options

l No form feeds between windows – Suppresses the form feeds normally sent to the printer between
each window.
l No printing status box – Disables the printing status box that normally appears whilst a report is being
printed.

The No form feeds between windows and No printing status box properties are found in the Printing tab of
the Report dialog.

- 1138 -
The Report Selection and Replay Toolbox
The Report Selection and Replay Toolbox enables a user to select and play back recorded reports through
their source windows and to produce hard copies on the Windows' default printer.

How to use the toolbox to print a report

1. Click on function key F12 to open the Report Selection and Replay toolbox. Show picture

2. Select the report name using the Log Report list box.
3. Select the instance of the report to be printed by clicking on its entry in the list. You can either:
Scroll the list then make a selection.
Click on the list heading then select a particular data and time. Show picture

4. Click on the print tool. The report will be printed on the Windows default printer.

How to view a report on the screen

1. Open the Report Selection and Replay toolbox. (F12)


2. Select the report name in the Log Report list box.
3. In the Associated Mimics section Show picture click on a button to select a source window for the
report. There is one button for each of the 5 possible windows that form a report. You can open one or
more windows at the same time. Each window is opened in Reference mode. This is indicated by a
marker in its top left hand corner. Show picture

4. Select the report to be viewed by clicking on its entry in the list. You can either:
Scroll the list then make a selection.
Click on the list heading then select a particular data and time. Show picture

What is Reference mode?


When you open a window from the Report Selection and Replay toolbox, it is opened in Reference mode.

l The window and its animations are disconnected from the real time database.
l It displays values that have been recorded by the report mechanism.

- 1139 -
Using the Reference Set selection tools, you can open the same window twice in different reference modes.
You can then display different instances of the report on the screen at the same time. Show picture

- 1140 -
Other archive unit types

- 1141 -
The '(Printers)' Virtual Archive Unit
The '(Printers)' virtual archive unit enables you to print log and report data without also storing it in an
archive unit. It has no properties of its own to configure, as it only exists to provide a container for log lists
and log reports that only have a printer output. Show picture

This function is identical to the facilities that you can configure for an actual archive unit, in a Log
List dialog (for ASCII output) or a Log Report dialog (for graphical printing via drivers).

Log report printing supports network printers. Even if the Log report configuration (Printing tab) only
shows directly connected printers, you can use a network printer by entering directly its name under
the form \\<PrinterServer>\<PrinterName>.

- 1142 -
Free archive unit

- 1143 -
Free Archive Unit Overview
Each free archive unit consists of a folder containing several files. The folder may be located anywhere
within the Windows' file system of the host PC.
Data is written in sequentially named files starting with H00000.WRI. As each file becomes full it is renamed
to have a .DAT extension and writing continues to the next file in the sequence. So at any time within the
folder, there will be several files with the .DAT extension and one file with the .WRI extension.

What you can do

l The .DAT files may be moved, deleted or used by other programs.


l The single .WRI file is in constant use by the software and shall not be changed or moved while it is
running.
l The free archive unit has no mechanism for automatically backing up or deleting files, so the number
of files will continue to increase until the disk is full or until files are manually deleted or moved. It is
up to the developer to decide how files in the free archive units will be managed.

Data Formats
Data is recorded in the free archive units in a format configured by the developer, so data may easily be
recorded for another program to import directly.
The mechanisms that record data have no buffering so each item of data will appear as separate entry in
time order, not blocked together as in the proprietary units.

- 1144 -
Configuring a Free Archive Unit
How to create a free archive unit

1. Open the Application Explorer, expand the configuration tree and select the Archives Units folder.
2. From the task list, select Add a free unit. The Archive Unit dialog opens. Show picture

3. Enter the Name and option Description for the new archive unit.
4. Configure the archive unit options (see list below).
5. Click OK to confirm the configuration and close the dialog.

Options
Property Meaning
Unit name The name of the archive unit. The name is also used as the name of the folder in which it
is held and so the characters used in the name are limited to those that the operating sys-
tem supports for folder names.
Description A description for the archive unit.
Cache size (KB) The size of the memory buffer in which data is stored before being written to disk. Using a
memory buffer reduces the amount of output activity and hence the load on the host PC.
Write period The period at which the content of the memory buffer is written to disk. If this is set to
zero the buffer will only be written when it is full.
Writing enabled If selected, recording in the Archive Unit starts when C-CURE Building Management Sys-
at start-up tem is started. Alternatively, recording may be started and stopped with the SCADA
BASIC instruction HISTORY.

- 1145 -
Changing the Location and Format of the Free Archive Unit Files
How to change the location of the files
By default, the files that make up a free format archive unit are located in the TH folder of the project in a
sub folder of the same name as the archive unit. You can change the location of the files to a different
folder, or select a text variable containing the location for the archive files, using the Files tab of the Archive
Unit properties dialog. Show picture

How to limit the size of the free format files


By default, the free format archive unit creates just one file of unlimited size called H00000.WRI. To limit
the file size tick the property Control archive file size and enter a maximum size for the file. Data is then
written in sequentially named files starting with H00000.WRI. As each file becomes full it is renamed to
have a .DAT extension and writing continues to the next file in the sequence. So at any time within the
folder, there will be several files with the .DAT extension and one file with the .WRI extension.

How to configure the line format used in a free format archive unit
The format in which trend (Historic) data and log data is written is configured using the configuration strings
defined by the properties Trend data format and Log data format respectively. The format elements used in
the configuration strings can be found in the topic Format Elements for Log List Printing and Free Format
Archive Units.
You can enter an alternative configuration string directly in the field or configure it using a dialog displayed
by clicking the ellipsis button adjacent to the field.
For Trend data format Show picture

For Log data format Show picture

- 1146 -
Any characters entered other than the format elements are interpreted literally. So for example the format
string #D/#M/#Y #h:#m:#s #t = #C would produce a record such as:
03/10/06 16:32:46 EFFLUENT.TANK1.LEVEL = 1.67

- 1147 -
ODBC archive unit

- 1148 -
ODBC and C-CURE Building Management System
The topics in this book refer to the legacy ODBC functionality. It should not be confused with the His-
torical Data Server module available since version 8.10.
ODBC is an acronym for Open Data Base Connectivity.
ODBC defines a standard protocol by which a program or application may open, read, and write to any com-
pliant database. Once a program has ODBC connectivity it should, in theory, be able to access any ODBC
compliant database without the need for extra tools or development.

ODBC Architecture
Whilst it is not strictly necessary to understand how the ODBC interface works in order to use it with C-CURE
Building Management System, it can be useful when understanding its limitations and solving problems. The
architecture of ODBC is best explained with a simple diagram. Show picture

l In this case, the Application is C-CURE Building Management System. It uses the standard ODBC func-
tions to open, read and write to the chosen database.
l The Driver Manager is responsible for loading the driver corresponding to the database used.
l The Driver interprets the ODBC functions, sends the requests to the relational database and returns
the results to the Application using standard query language (Sql) commands.
l The Relational Database (RDB) stores the data requested and sent by the Application.

Using ODBC with C-CURE Building Management System


C-CURE Building Management System is able to use ODBC in the following ways.

l For historic data - an ODBC database may be used by an ODBC archive unit. Data may be recorded
and played back in the same way as for a proprietary archive unit.
l For recipes - recipes may be saved to, or loaded from, an ODBC database.

Recording and playing back data using an ODBC data source is considerably slower than when using
a proprietary format archive unit.
The following ODBC compliant database systems have been tested with C-CURE Building Management Sys-
tem

l Access 97 and 2000


l Oracle V8
l SQL Server 6.5

A single ODBC database can be used to record data from many ODBC archive units and recipes.
Using ODBC requires that the following configuration steps are completed in the correct order.

1. Using the operating system - check that you have ODBC drivers installed on your PC.
2. Using the operating system - create an ODBC database source. The name of the ODBC source is used
in the configuration of C-CURE Building Management System.
3. Configure C-CURE Building Management System to inform it of the existence of the ODBC database.
You will use the name you gave the database when you created the ODBC source using the operating
system.
4. Create one or more ODBC archive units that will use the database to record the data.
And/or
5. Create one or more recipes using the database to record the data.

- 1149 -
The variable name, variable title, and extended text attributes fields are limited to 40 characters in
ODBC archive units. If variables are recorded, whose configuration exceed this limitation the fields
are truncated to 40 characters and an error is generated in the Event Viewer.

- 1150 -
Setting up an ODBC Source on the Host PC
The ODBC source defines the driver and data file that is to be used by the C-CURE Building Management Sys-
tem software to record data. One or more ODBC sources may be configured.

1. Open Windows Administrative Tools. The simplest way to do this is to type Admin into Search Win-
dows on the task bar and then select Administrative Tools from the result list.
2. Open ODBC Data Sources (32 bit) by double clicking on the corresponding icon. A dialog similar to the
following will be displayed. Show picture

3. Select the Drivers tab and check that the driver that you want to use, for example Access, is installed.
4. Select the User DSN tab and click the Add button. The Create New Data Source dialog is displayed.
Show picture

5. Select the driver that you want to use and click Finish. The ODBC Setup dialog is displayed.
6. Enter the Data Source Name. This is the name that is used to reference the data source from the C-
CURE Building Management System. Enter an optional description. Show picture

7. Select the database. This may be located anywhere on the PC but it is suggested that it is located
within the project folders. Some database drivers allow a data source to be created at this point
whereas others only allow the selection of one that has been previously created.
8. Select OK to confirm selection and / or creation of the data source.

- 1151 -
Configuring an ODBC Database in C-CURE Building Management System
Before an ODBC database can be used by C-CURE Building Management System, it must first be added to
the Databases folder of the Archives Configuration Explorer. If the database is to be used just for recipes
then no further configuration is required. If the database is to be used to record trend, log or report data
then an ODBC archive unit must also be created.

How to add an ODBC database to the Databases folder of the Archives Configuration Explorer

1. Open Application Explorer, expand the configuration tree and select the Databases folder.
2. From the task list, select Add an ODBC database. The ODBC database dialog is displayed.
3. Enter a name by which the database will be known in C-CURE Building Management System in the
Name text box. You can enter an optional description for the database in the Description text box.
4. Enter the name of the database, as configured in Windows' ODBC Setup dialog, in the ODBC name text
box. Show picture

5. Configure any ODBC database options (see list below).


6. Click OK to confirm the configuration and close the dialog.

Options when configuring an ODBC database


In most applications, the following properties will not need to be changed and may be left at their default
value.
In the General tab:

l Database type - The structure and number of the tables with the database was changed between ver-
sion 6 and 7 of C-CURE Building Management System to optimize efficiency. Select Old only if the pro-
ject is to be compatible with version 6, otherwise leave at the default setting of Optimized.
l Read only - The database is read only (no data can be written by C-CURE Building Management Sys-
tem).
l Manual commit - Enables a manual commit of the database at the specified period.

In the Advanced tab:

l Login name - The name of the user for connection to the ODBC source (if it was configured with one).
l Password - The password for the connection to the ODBC source (if it was configured with one).
l Connection time-out - The time in seconds allowed for a response from the ODBC source when an
attempt at connection is made. Default 15 seconds
l Query time-out - The time in seconds allowed for a response from the ODBC source when a query is
made. Default 15 second.
l Delimiter for identifiers - Some RDBMS require the use of a particular text delimiter in queries. Select
single quote if you are using a MySQL DB.

ODBC table names


Ths software uses the following default table names to record data. If required, the table names can
changed using the Tables tab.

- 1152 -
l Version 6.0
l HIS - Historic (trend), Log and Report data.
l RECH - Recipe configuration information
l RECV - Recipe variable information.
l Version 7.0 onwards
l TRD - Data generated by the historic trend mechanism and played back through the Trend
Viewer.
l LOG - Data generated by the log filters and played back by the Log Viewer.
l REP - Data generated by the report mechanism.
l RECH - Recipe configuration information.
l RECV - Recipe variable information.

- 1153 -
Configuring an ODBC Archive Unit
To record trend, log or report data in an ODBC source, you create an ODBC type archive unit. The archive
unit may be used to record and play back data in the same way as a proprietary archive unit. The data will
be recorded using the driver and file specified by the data source.
Recording data in an ODBC archive unit takes much more space and is considerably slower than when using
a proprietary format archive unit. Depending on exactly what is being recorded, and the type of database
used, a single record can use over 1 Kb of disk space.

How to configure an ODBC archive unit

1. Open the Application Explorer, expand the configuration tree and select the Archive Units folder.
2. From the task, list select Add an ODBC unit. The Archive Unit dialog is opened.
3. Enter a name for the archive unit in the Name field. The unit name is limited to 12 characters. Enter an
optional description for the archive unit in the Description field.
4. Select the ODBC database logical name that you have previously configured. Show picture See the
topic Configuring an ODBC database in C-CURE Building Management System.

5. Configure any ODBC archive unit options (see below).


6. Click OK to confirm the configuration and close the dialog.

Other ODBC archive unit options

l Read only - If selected, the Archive Unit is read only.

- 1154 -
Table Formats for ODBC Archive Units
The variable name, variable title, and extended text attributes fields are limited to 40 characters in
ODBC archive units. If variables are recorded, whose configuration exceed this limitation the fields
are truncated to 40 characters and an error is generated in the Event Viewer.

Format for TRD table (Historic trend data)


Field Field name Type Description
1 PROJECT Text Project name
2 CHRONO Number Event time as milliseconds since 1970
3 RECTS Date/time Event time and date stamp
4 STATION Number The station number
5 UNITNAME Text Name of the archive unit
6 VARTYPE Text The type of variable (LOG, ANA, TXT or SYS)
7 NAME Text Variable name
8 TITLE Text Variable title
9 NVAL Number The value of the variable (Numeric type)
10 VALIDITY Number Validity of the variable (0 = valid, else 1)
11 BATT Number Variable binary attributes
12 - 27 SATT1 - SATT16 Text Extended attributes
28 - 43 CSATT1 - CSATT16 Text Value of extended attribute if it is a variable name
44 - 51 DATT1 - DATT8 Text Unused
52 - 59 CDATT1 - CDATT8 Text Unused

Format for LOG table (Data generated by the log lists)


Field Field name Type Description
1 PROJECT Text Project name
2 CHRONO Number Event time as milliseconds since 1970
3 RECTS Date/Time Event time and date stamp
4 STATION Number The station number
5 UNITNAME Text Name of the archive unit
6 VARTYPE Text The type of variable (LOG, ANA, TXT or SYS)
7 NAME Text Variable name
8 TITLE Text Variable title
9 NVAL Number The value of the variable (Numeric type)
10 TVAL Text The value of the variable (Text type)
11 PRIORITY Number The priority for an alarm variable
12 AVAL Number Validity of the variable (0 = valid, else 1)
13 LOGLIST Text The name of the log filter
14 EVTYPE Number The event type
15 EVTITLE Text The event title
16 EVTEXT Text The event text
17 COMPINF Text Complimentary information
18 USERNAME Text The user name
19 USERNOTE Text The user entered comment
20 TSTYPE Number
21 TSVAL Text Timestamp from equipment
22 BATT Number Variable binary attributes
23 - 38 SATT1 - SATT16 Text Extended attribute
39 - 54 CSATT1 - CSATT16 Text Value of extended attribute if it is a variable name
55 - 62 DATT1 - DATT8 Text Unused
63 - 70 CDATT1 - CDATT8 Text Unused

Format for REP table (Data generated by Report mechanism)

- 1155 -
Field Field name Type Description
1 PROJECT Text Project name
2 CHRONO Number Event time as milliseconds since 1970
3 RECTS Date/Time Event time and date stamp
4 STATION Number The station number
5 UNITNAME Text Name of the archive unit
6 VARTYPE Text The type of variable (LOG, ANA, TXT or SYS)
7 TAGNAME Text Variable internal ID
8 NAME Text Variable name
9 TITLE Text Variable title
10 NVAL Number The value of the variable (Numeric type)
11 TVAL Text The value of the variable (Text type)
12 VALIDITY Number Validity of the variable (0 = valid, else 1)
13 REPORT Text The report name
14 REPORT01 Number The transition to trigger the report (0 or 1)
15 BATT Number Variable binary attributes
16 - 31 SATT1 - SATT16 Text Extended attributes
32 - 47 CSATT1 - CSATT16 Text Value of extended attribute if it is a variable name
48 - 55 DATT1 - DATT8 Text Unused
56 - 63 CDATT1 - CDATT8 Text Unused

- 1156 -
Using the Trace Facility in the ODBC Data Sources Configuration Tool
You can use the Tracing tab in the Data Sources configuration tool from the Windows Control Panel to display
calls to ODBC drivers. You will only need to do this if asked by the Technical Support desk.

1. From the Windows Start button, select Settings.Control Panel.


2. Open the Data Sources (ODBC) tool.
3. Select the Tracing tab.
4. Enter a location for the log file that will be generated.
5. Click the Start Tracing Now command button to start the trace.
6. Click the same button to stop the trace.

Show picture

- 1157 -
Configuring and using a VCR Archive Unit
The VCR facility enables you to record changes of variables on one C-CURE Building Management System sta-
tion and play them back through mimics on another station.
For details of how to configure this facility, see the sub-book The VCR Facility in the book Special Help.

- 1158 -
Configuring databases

- 1159 -
Managing Databases in the Application Explorer

Tasks available when the Databases folder is selected


Icon Task Description
Add a data-
Add a database to the archives configuration.
base
Add an ODBC
Add an ODBC database to the archives configuration.
database
Settings Display the Databases general settings dialog.
Database wiz-
Run the Database Wizard.
ard

Tasks available when a database is selected


Icon Task Description
Remove Remove the selected database.
Properties Open the Database Properties dialog

Tasks available when the Trend Table folder is selected


Icon Task Description
Add a trend
Add a trend table to the database.
table

Tasks available when a trend table selected


Icon Task Description
Remove Remove the selected trend table.
Properties Display the Trend Table Properties dialog.

Tasks available when the Log Table folder is selected


Icon Task Description
Add a log
Add a log table to the database.
table

Tasks available when a log table selected


Icon Task Description
Remove Remove the selected log table.
Properties Display the Log Table Properties dialog.

Tasks available when the Maintenance Plan folder is selected


Icon Task Description
Add a main-
Add a maintenance plan to the Databases folder.
tenance plan

Tasks available when a maintenance plan is selected


Icon Task Description
Remove Remove the selected maintenance plan.
Properties Display the Maintenance Plan Properties dialog.
Add a task Add a task to the selected maintenance plan.

- 1160 -
Tasks available when a maintenance task is selected
Icon Task Description
Remove Remove the selected maintenance task.
Properties Display the Maintenance Task Properties dialog.

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior when using cut and paste, or copy and paste, on con-
figuration objects in the Databases folder.
Databases object Notes
Log table The pasted Log Table must have a unique name within the particular database.
Trend table The pasted Trend Table must have a unique name within the particular database.
Database Any subordinate Log tables are duplicated with the same name.
Any subordinate Trend Tables are duplicated with the same name.
Trend groups The pasted Trend Group must have a unique name.

Pasting any of the configuration objects from the Databases folder only creates the configuration. It
does not paste any historical data that may have been recorded by the original object.

If you cut and paste a Database the data recorded in the original Database will be lost.

- 1161 -
Databases Settings
The databases settings are displayed by using the Settings task when the Databases folder is selected in the
Application Explorer's configuration tree. Show picture

Changing the location used for any HDS databases


The default location for the folders and files used by an HDS database is the Databases folder located under
the installation root folder. This location can be changed by deselecting Use default folder and entering the
new location in the Folder field. C-CURE Building Management System must be shut down and restarted
before the change is taken into account.
Once an SQL database is created, the SQL Server handles the location of the files. Therefore chan-
ging the database path in the Archives Configuration Explorer will have no effect on an existing data-
base. To change the location of an existing SQL database you must use the Database Manager to
detach the database from the SQL Server, move the database files and use the Database Manager
once again to reattach the database.

Configuring the default database connection


When you configure a database, you have the option to use a default database connection. Configuring and
using a default database connection has two advantages.

l You only have to configure the default connection once but it can be used for any number of data-
bases.
l If you change the default connection, it automatically changes everywhere it is used.

How to configure the default database connection

1. In the Datasource drop down list box, select either Microsoft Access or Microsoft SQL Server.
2. If you select Microsoft SQL Server then you must configure the connection using the Configure button
that opens the Connection dialog. Show picture

a. Select or enter the server name. The browse button adjacent to this field opens a list of avail-
able local and network servers. If you are using a local server, you must use a relative path, for
example .\SQLEXPRESS. If you are using a remote server then you must use an absolute path,
for example CTI-PC\SQLEXPRESS.

- 1162 -
b. By default, the HDS uses Windows authentication. Using the Authentication list box you can
alternatively select SQL Server authentication in which case you must also enter a User name
and Password.
c. Check the configuration using the Test connection button that attempts to establish a temporary
connection to the server.
d. Confirm the configuration and close the Connection dialog by clicking the OK button.

- 1163 -
Configuring a database

- 1164 -
Configuring a Database
The configuration of a database creates the physical files in which it records data and specifies how to con-
nect to it. For the connection, you can choose to use the default data connection, or configure a specific
Microsoft Jet (Access) or Microsoft SQL Server data connection.
For information on how to configure an ODBC database, see the topic Configuring an ODBC
database.
Starting with version 11.2, SQL Server Database is created with a recovery model set to Simple.
This should be adequate for many projects, in particular in scenario when emergency purge is
enabled.
Depending on your policy for replication and purge, the recovery model may need to be changed.
Pay attention to the fact that with the default settings for the emergency purge, there is the pos-
sibility of data corruption and data loss if the backup-model of the SQL Server database is set to
Full-Backup.

How to a configure a database using the default database connection

1. Open the Application Explorer and expand the configuration tree to select the Databases folder.
2. From the task list, select Add a database. The Database Configuration dialog appears. Show picture

3. Enter the name by which the database will be known. You can enter an optional comment about the
database in the Description field.
4. Tick Use default data connection. For information on how the default connection is configured see the
topic Databases settings.
5. Click the OK button to confirm the configuration and close the dialog.

How to configure a specific Microsoft Jet (Access) database

1. Repeat steps 1 to 3 above.


2. In the Data source drop down list box, select Microsoft Access.
3. Click the OK button to confirm the configuration and close the dialog.

How to a configure a specific Microsoft SQL Server database

1. Repeat steps 1 to 3 above.


2. In the Data source drop down list box, select Microsoft SQL Server.

- 1165 -
3. Click the Configure button to open the Connection Configuration dialog. Show picture

a. Select or enter the server name. The browse button adjacent to this field opens a list of avail-
able local and network servers. If you are using a local server, you must use a relative path, for
example .\SQLEXPRESS. If you are using a remote server then you must use an absolute path,
for example CTI-PC\SQLEXPRESS.
b. By default, C-CURE Building Management System uses Windows authentication. Using the
Authentication list box you can alternatively select SQL Server authentication in which case you
must also enter a User name and Password.
c. Check the configuration using the Test connection button that attempts to establish a temporary
connection to the server.
d. Confirm the configuration and close the Connection Configuration dialog by clicking the OK but-
ton.
4. Click the OK button to confirm the configuration and close the Database Configuration dialog.

Where are the database located and how are they named?
By default, the database files are created in a folder called Databases, located under C-CURE Building Man-
agement System's root folder. You can change the database location using the Database Properties dialog.
See the topic Database Settings for more information.
By default, the name of the database file follows the form <Project name>_<Database name>. If you de-
select the property Prefix database name with project name then the project name is not used. The file type
depends on the type of database selected and will be .MDB for Microsoft Jet and .MDF for Microsoft SQL
Server.

To ensure archiving of data, it is important to monitor database connection status using HDS Status
Variables and have an alarm accessible to operators should a connection issue occurs at runtime.
In particular, you should be warned that while a built-in mechanism exists to buffer data and re-
establish a connection automatically, this built-in mechanism is only activated after a first con-
nection is successful. It means that if the initial connection at C-CURE Building Management System
startup fails, one need to act to fix the issue - the database may not exist, the RDBMS service may
not be running or the network setup including firewall rules may have changed - and restart C-CURE
Building Management System.

- 1166 -
Limiting the Size of an SQL Server Database
The main mechanism for controlling database growth is by limiting the age of its records. In addition, in the
SQL Server tab, you can configure a maximum size for the database. When the database reaches this size,
recording will temporarily stop. If the maximum database size is set to zero then the maximum size limit is
inoperative.

What happens if a database reaches its maximum size?


If a database reaches its maximum size recording is stopped. However, the HDS is still able to retrieve data
for the display in the Trend and Log Viewers.
Recording starts again as soon as the database drops below its maximum size. This will happen at the next
background shrink or the next scheduled purge of older records.

Using the emergency purge mechanism


When using an SQL Server database you can configure an emergency purge whereby a percentage of the old-
est records are automatically deleted before the database reaches the maximum size.
The emergency purge cycle is for emergency use only. It is optimized for speed and during the cycle
the system will become very busy and access to the database may be blocked. A better way to limit
the database size is by purging, that is to use the maintenance purge task, which is designed not to
block access.
The Data volume to purge (in %) is applied individually on each table of the database having the Can
be purged property ticked. If you have configured 4 tables in a database, including only 3 that are
configured to be subject to purge, and a Data Volume to purge at 20%, the 20% eldest records will
be deleted from these 3 tables upon an emergency purge of the database; the 4th table that cannot
be purge will not be affected by any record deletion.

1. Select the database SQL server tab. Show picture

2. Enter a value for the maximum size of the database in megabytes. A value of zero means there will be
no size limitation.
3. Tick the property, Enable emergency purge.
4. Enter a value, in percent, for how full the database must be before the purge takes place.
5. Enter the percentage of records that will be deleted when an emergency purge takes place.
6. Click OK to confirm the configuration.

- 1167 -
Deleting a Database
You can delete a connection to a database file by clicking on its name in the Application Explorer and, from
the task list, selecting the Remove task, A dialog will appear asking you confirm deletion of the database.
Clicking Yes will complete the operation, clicking No will close the dialog without any action.

Deleting the database files


Deleting a connection to a database does not delete the database itself.

l To delete a Jet database you just need to delete the physical files (.MDB) in the Database folder.
l To delete an SQL Server database you must use a database management tool such as SQL Server Man-
agement Studio Express or C-CURE Building Management System's Database Manager. These tools
delete both the physical files and the registration of the database in SQL Server.

- 1168 -
Configuring the database tables

- 1169 -
Database Tables Overview
Data is recorded in a database in tables. Each table has a number of columns each representing one of the
properties that is to be recorded. There are two types of table used by the HDS.

Trend Tables
Trend Tables are used for the periodic recording of register and bit variables. You can configure one or more
Trend Table in each Database. Recorded data may be played back through a Trend Viewer. When a variable
is selected for trend recording, you select the database, the table within that database and the period at
which the variable becomes eligible to be recorded.

Log Tables
Log Tables are used for the event recording of bit, alarm, register and text changes of state plus user
actions. You can configure one or more Log Tables in each Database. The configuration of a Log Table
selects which properties are recorded from each eligible variable. The variables that are eligible are selec-
ted by the configuration of a given Log List. Recorded data may be played back through a Log Viewer.

- 1170 -
Configuring a Trend or Log Table
You can configure one or more Trend Tables and/or Log Tables for each configured database. Each table has
a number of columns in which data is recorded. Some columns are mandatory and are pre-selected, while
others are optional.
Show picture

How to create a Trend Table

1. Open the Application Explorer and expand the configuration tree selecting the Databases folder. Select
a folder representing a previously configured database.
2. Expand the database folder and select the Trend tables folder.
3. From the task list, select Add a trend table. The Trend Table Configuration dialog appears.
4. Enter a name for the table.
5. The tables have a number of mandatory columns plus some optional ones. Only the optional columns
are displayed by default. Select the columns corresponding to any optional data you want to record.
See the topic What properties can you record for more information about what columns are available.
6. Select Set as default if the table will be used as the default.
7. Select Can be exported if you want the table to be included when exporting the database.
8. Select Can be purged if you want the table to be purged when purging the database. If ticked, records
will be deleted from the table when a maintenance plan including a purge is executed, and also in case
of an emergency purge of the database.
9. Click the OK button to confirm the configuration and close the dialog.

The process for creating a Log Table is the same except that it takes place within the Log Tables folder.
C-CURE Building Management System must be restarted before any modifications to tables become
available.

Modifying a table
You can add or remove columns after a table is created. If you remove columns, the columns and data
remain in the database but further data is not added from that time forwards.

- 1171 -
What Properties can you Record?
The following table lists the mandatory and optional data columns that you can select when configuring the
database tables for log and trend data in the HDS.

Trend table
Column Data type Bytes Mandatory Description
Chrono Bigint 8 Yes The timestamp of the record in numeric format in the
form of a FILETIME* data structure. The time is
always in UTC.
Name Varchar 255 Yes The name of the variable.
Value Float 8 Yes The value of the variable if it is of type bit or
register.
Quality Smallint 2 Yes The quality flags for the variable.
AlarmLevel Smallint 2 Yes The priority level for an alarm variable on the range
0 to 29.
AssocLabel Varchar 255 Yes The name of the associated label.
BinAttr Int 4 No The variable's extended binary attribute.
Description Varchar 255 No The description (title) of the variable (depends on
the language selected).
Domain Varchar 100 No The variable's domain.
Nature Varchar 100 No The variable's nature.
NumParam Float 8 Yes Complimentary numeric format information.
StationNumber Smallint 2 No Either the number of the active producer station for
the variable (e.g. for Bit transition) or the number of
the station on which the event occurred (e.g. for
Command Send).
TextAttr03 to 16 Varchar 100 No The variable's extended text attributes (A3 to A16).
TextIndAttr03 to 6 Varchar 255 No The variable's deferred extended text attributes.
When using a deferred extended text attribute the
value of the variable named in the attribute is recor-
ded.
TextParam Varchar 255 Yes Complimentary text format information. The value
sent for a text send, the name of the function for a
program send or the recipe title for a recipe send.
TS Datetime 8 No The time at which the recorded value last changed in
date and time format. The time is always in UTC.
TStype Smallint 2 No The type of timestamp in the TS column.
0 = Timestamped by C-CURE Building Management
System.
1 = Timestamped at the source (using a
timestamped protocol).
2 = Timestamp from source was invalid, C-CURE
Building Management System's timestamp used
instead.
Null = C-CURE Building Management System shut-
down.
VarType Smallint 2 No The type of variable. See table of values below.

Log table
Column Data type Bytes Mandatory Description
Chrono Bigint 8 Yes The timestamp of the record in numeric format in the
form of a FILETIME* data structure. The time is
always in UTC.

- 1172 -
Loglist Varchar 100 Yes The name of the Log List that was the source of the
data.
AssocLabel Varchar 255 Yes The name of the associated level.
EvtNumber Bigint 8 Yes A number representing the event type. See table of
values below.
EvtTitle Varchar 255 Yes The event description from the associated label.
Name Varchar 255 Yes The name of the variable.
Value Float 8 Yes The value of the variable if it is of type bit or
register.
ValueT Varchar 255 Yes The value of the variable if it is of type text.
Quality Smallint 2 Yes The quality flags for the variable.
AlarmLevel Smallint 2 Yes The priority level for an alarm variable on the range
0 to 29.
AlarmState Smallint 2 Yes The state for an alarm variable. See table of values
below.
UserComment Varchar 40 Yes The user comment (added using the Log Viewer).
Threshold Float 8 Yes The threshold value for an alarm variable.
NumParam Float 8 Yes Complimentary numeric format information. The
value sent for a register send or the recipe identifier
for a recipe send.
TextParam Varchar 255 Yes Complimentary text format information. The value
sent for a text or a register send, the name of the
function for a program send or the recipe title for a
recipe send.
Domain Varchar 100 No The variable's domain.
Nature Varchar 100 No The variable's nature.
Description Varchar 255 No The description (title) of the variable (depends on
the language selected).
StationNumber Smallint 2 No Either the number of the active producer station for
the variable (e.g. for Bit transition) or the number of
the station on which the event occurred (e.g. for
Command Send).
UserName Varchar 20 No The name of the user on the station concerned.
TS Datetime 8 No The time at which the recorded value last changed in
date and time format. The time is always in UTC.
VarType Smallint 2 No The type of variable. See table of values below.
TSType Smallint 2 No The type of timestamp in the TS column.
0 = Timestamped by C-CURE Building Management
System.
1 = Timestamped at the source (using a
timestamped protocol).
2 = Timestamp from source was invalid, C-CURE
Building Management System's timestamp used
instead.
Null = C-CURE Building Management System shut-
down.
ThresholdValue Float 8 No The threshold value for an alarm variable.
BinAttr Int 4 No The variable's extended binary attribute.
TextAttr03 to 16 Varchar 100 No The variable's extended text attributes (A3 to A16).
TextIndAttr03 to 6 Varchar 255 No The variable's deferred extended text attributes.
When using a deferred extended text attribute the
value of the variable named in the attribute is recor-
ded.
* FILETIME is a 64 bit value representing the number of 100-nanosecond intervals since January 1, 1601.

- 1173 -
The EvtNumber column
Event Data value (Hex) Data value (Dec)
No event 0x00000000 0
Alarm On, not acknowledged 0x00000001 1
Alarm On, acknowledged 0x00000002 2
Alarm Off, not acknowledged 0x00000004 4
Alarm Off, acknowledged 0x00000008 8
Alarm NS 0x00000010 16
Alarm masked by operator 0x00000040 64
Bit transition to 0 0x00000200 512
Bit transition to 1 0x00000400 1024
Command to 0 0x00000800 2048
Command to 1 0x00001000 4096
Bit transition to NS 0x00001800 6144
Alarm masked by program 0x00008000 32768
Alarm masked by a variable 0x00010000 65536
Alarm masked by an expression 0x00020000 131072
Send register 0x00040000 262144
Send text 0x00080000 524288
Forced by program 0x00100000 1048576
Alarm acknowledged by operator 0x00200000 2097152
Alarm not accessible 0x00400000 4194304
Alarm inhibited 0x00800000 8388608
Start-up 0x01000000 16777216
Close down 0x02000000 33554432
Attempt to log in 0x04000000 67108864
Operator action to mask an alarm 0x08000000 13421728
Operator action to unmask an alarm 0x10000000 268435456
Recipe send 0x20000000 536870912
Begin maintenance mode 0x40000000 1073741824
End maintenance mode 0x80000000 2147483648
Alarm to On 0x100000000 4294967296
Alarm to Off 0x200000000 80589934593

The VarType column


Type Data value (Hex) Data value (Dec)
Bit 0x0001 1
Register 0x0002 2
Text 0x0004 4
Alarm 0x0008 8
Bit command 0x0010 16
Threshold 0x0020 32
Register command 0x0040 64
Counter 0x0080 128
Chrono 0x0100 256
Text command 0x0200 512

The AlarmState column


Type Data value (Dec)
On and acknowledged 2
On and not acknowledged 3
Off 4
Off and not acknowledged 5

- 1174 -
Masked by user 6
Invalid (NS) 8
Inaccessible 9
Inhibited 10
Masked by program 11
Masked by variable 12
Masked by expression 13
In maintenance mode 14

- 1175 -
Database maintenance

- 1176 -
Overview of Database Maintenance Plans
A Maintenance Plan is used to automatically execute maintenance tasks on one or more of the database's
used by C-CURE Building Management System.
Each Maintenance Plan consists of a schedule and a list of tasks.

l The schedule decides when and how often the Maintenance Plan runs.
l The list of tasks determines what the Maintenance plan does. The tasks are executed in a configured
sequence. The first task in the sequence starts when the Maintenance Plan runs, the second task starts
when the first has finished and so on.

The following tasks are available.

l Purge - Limits the age of records in the database by deleting those older than a defined period. Equi-
valent to the functionality provided by the Database Purge tab in version 8.10.
l Export - Exports data from the database, for a defined period, in either text, ADTG or XML formats.
Equivalent to the functionality provided by the Database Export tab in version 8.10.
l Defrag - Defragments the database's index. Only available for SQL Server databases.
l Custom - Executes a custom Transact-SQL script. Only available for SQL Server databases.
l Shrink - Removes unused space allocated in the Database's files reducing the space occupied on the
storage device. Only available for SQL Server databases.

Each task is attached to a particular database. A single Maintenance Plan can execute tasks on one or more
databases.
For multi-station applications, a Maintenance Plan may be attached to a server station list thereby selecting
the stations on which it is executed.
Typical uses of the Maintenance plan are:

l Ensuring that the database does not reach its maximum size (at which point data recording would
stop).
l Making sure that the database operates at maximum efficiency by regular defragmentation and shrink-
ing (removing unused allocated space).
l Periodically exporting the data for archive purposes or access by another application.

The functionality provided by Database Maintenance Plans replaces that of the Maintenance
and Export tabs of the Database configuration dialog in versions of C-CURE Building Man-
agement System earlier than 8.2. If a project created by version 8.10, is opened in 8.2 or
later, the database maintenance and export configuration is converted to the equivalent Main-
tenance Plan.
If you shutdown the software whilst a Maintenance Plan is running, the current task is com-
pleted but any remaining tasks are not started.
From version 11.2 onwards, when a maintenance plan is produced by an association of
redundant servers, it is only executed on the active server(s) of the association. Prior to 11.2
such maintenance plans were executed on all servers of the association, irrespective of their
current status (active or passive) at the time of execution.

- 1177 -
How to Create a Maintenance Plan
This topic is an overview of configuring a Maintenance Plan. See the topic related to each task for detailed
information about it.
A Maintenance Plan consists of a schedule and a list of tasks.

l The schedule decides when and how often the Maintenance Plan runs.
l The list of tasks determines what the Maintenance plan does. The tasks are executed in a configured
sequence. The first task in the sequence starts when the Maintenance Plan runs, the second task starts
when the first has finished and so on.

Each task is attached to either a specific database or the default database. Configuring a Maintenance plan
takes place in three steps.

1. Create the plan and configure the schedule.


2. Select and configure the tasks.
3. Define the sequence in which those tasks are executed.

Creating the Maintenance Plan and configuring the schedule

1. Open the Application Explorer and select the Maintenance Plan folder.
2. From the task list, select Add a maintenance plan. The Maintenance Plan dialog opens with a default
configuration. Show picture

3. Edit the Name and Description as required and select the Apply button to create a new Maintenance
Plan.
4. Edit the schedule on which the Maintenance Plan operates. The schedule is edited by selecting the ellip-
sis button adjacent to the schedule description. For information on editing the schedule, see the book
on the Task Scheduler.
5. Enter the name of bit variable to be used to indicate the status of the Maintenance Plan. The bit will be
set to 1 while the plan is executing, otherwise it will be 0. The status variable is optional.
6. If the Maintenance Plan is running in a multi-station environment, select the Server Network List that
will determine on which server it is operational. The Server Network List property is found in the Net-
working tab.
7. Select the OK button to apply the change to the schedule and close the Maintenance Plan dialog.

You have to create a Maintenance Plan with a default schedule before you are able to edit and save a
schedule specific to your requirements.

Selecting and configuring the tasks

1. Select a previously configured Maintenance Plan and from the task list select Add a maintenance task.
The Maintenance task dialog opens Show picture

- 1178 -
2. Select the type of task and the database on which it will operate. You can select the default database
by ticking the Use default database option.
3. Some tasks require further configuration in which case an additional tab will be displayed. For inform-
ation on task specific options, see the following topics.
Export task
Purge task
Defrag task
Shrink task
Custom task
4. Select the OK button to confirm the configuration and close the dialog.

Defining the sequence in which the tasks are executed


Making sure that the tasks are executed in the correct sequence is important. For example, you would prob-
ably want to Export before you Purge and then possibly finish with a Defrag and a Shrink. By default, tasks
are executed in the sequence in which they are configured. To change the order of execution you can use the
task's Sequence property. All tasks, except the last, are sequenced by selecting the previous task name.
The last task to be executed has the sequence of Last. For this reason, it is easiest leave the task sequencing
until you have configured all the tasks for a particular Maintenance Plan.
This is best illustrated using the example of four tasks just mentioned.
Task type Task name Sequence
Export EXPORT
Purge PURGE EXPORT
Defrag DEFRAG PURGE
Shrink SHRINK Last
The order in which the tasks are executed is indicated by a number in the configuration dialog. In the fol-
lowing picture, the EXPORT task has been configured last but it is to be executed first and hence the order of
execution is not the same as that of configuration. Show picture

Other Maintenance Plan options

l Stop maintenance plan if task fails - Stops the current execution of the Maintenance Plan in case of
error. C-CURE Building Management System will attempt to run the Maintenance Plan again at the
next scheduled time.

There is no indication that the Maintenance Plan has stopped due to a failure.

- 1179 -
Maintenance Plan - Export Task
The Export Task is for the export of records for backup purposes or for use in a 3rd party product such as
Microsoft Excel. Exporting records does not remove them from the database. When an export takes place,
only tables that have the property Can be exported set are included.
Records can be exported as text, XML, or in Microsoft's ADTG (Advanced Data TableGram) format.
There is no mechanism in the HDS to import previously exported records.

How to configure an export task

1. Open the Application Explorer and from the configuration tree select the Maintenance Plan to which the
maintenance task is to be attached.
2. From the task list, select Add a maintenance task. The Maintenance Task Configuration dialog opens.
3. Using the Task drop down list box select Export. An Export tab appears in the dialog. Select the
tab.Show picture

4. Select the period of data for export. You can select the units from minutes, hours, days, weeks,
months or years. For information about the Export time shift field see below.
5. Either tick the Use default folder property or enter the path to which the export files will be sent. You
can type in the path or select it using the browse button.
6. Select the export format. If text format is selected, there are some further options that can be con-
figured - see below.
7. Click OK to confirm the configuration and close the dialog.

The default export folder, EXPORT, is located in the Databases folder.

The time used by the scheduler to trigger a Maintenance Plan is local time, whereas the time in
records of the database is UTC (Coordinated Universal Time).

Exporting data in text Format


The following options are available when exporting data in text format.

l Include column headers - If selected the first line of the text file contains the names of the tables
column headers.
l Delimiter - The character used to separate fields on each line. The default is a semi-colon.
l Substitution string for null value - A string that is substituted for any fields that are blank.

Text format records are exported as follows.

l A sub-folder with the same name as the database is created under the export path.
l One sub folder for each configured table is created under the database folder.

- 1180 -
l One text file, with the name constructed from the time at which the export was initiated, is created
under each table folder.
l Each text file contains a number of lines, each line representing one record in a table.
l Each line will contain a number of fields, separated by a delimiter, representing the values in a record.

The file name is constructed as follows: YYYYMMDDHHMM.EXT


Where YYYY is the year as four digits, MM is the month number as two digits, DD is the day number as two
digits, HH is the hour as two digits and MM is the minute as two digits. EXT is the configured file extension.
For example, 200205191200.dat, would represent a file created on the 19th of May 2002 at midday.

The property Substitution string for null value must be left empty if you export data in text format in
order to re-import it using the Database Import tool.

Using the Export time shift option


The data that is exported can be offset using the Export time shift option. For example if you export 7 days
of data with an Export time shift of 5 days the export run from 00:00 12 days ago to 00:00 5 days ago.

Offsetting the data that is exported can be very useful under certain conditions. Take for example the situ-
ation where the system is just recovering after a failure. If the schedule requires that an export is executed
immediately, and there is no offset, there is no opportunity to replace any missing data using the Database
Manager replication process. If however, a 5 day offset was configured the user has up to 5 days to replace
missing data before it is due for export.

- 1181 -
Maintenance Plan - Purge Task
The Purge Task limits the size of the database by purging (deleting) older records. The space that those
records occupied is then available to the database for new records. The space is not released to the oper-
ating system unless the database is shrinked. You configure the oldest data that remains as a number of
hours, days, weeks etc. For example 3 months.
Only tables that have the property Can be purged set will be included when a purge takes place.

How to configure a purge task

1. Open the Application Explorer and from the configuration tree select the Maintenance Plan to which the
maintenance task is to be attached.
2. From the task list, select Add a maintenance task. The Maintenance Task Configuration dialog opens.
3. Using the Task drop down list box select Purge. A Purge tab appears in the dialog. Select the tab.
Show picture

4. Configure the time limit by entering a value for the Oldest data. You can select the units from minutes,
hours, days, weeks, months or years.
5. Click OK to confirm the configuration and close the dialog.

- 1182 -
Maintenance Plan - Defrag Task
The Defrag Task defragments a database's indexes. Fragmentation exists when indexes have pages in which
the logical ordering does not match the physical ordering inside the data file. When indexes are first built, no
fragmentation exists but over time, as data is inserted, updated and deleted, fragmentation begins to rise.
The Defrag Task is only available with SQL Server databases and has no configurable options.

- 1183 -
Maintenance Plan - Custom task
The Custom Task allows a Transact-SQL script to be run on the selected database. Transact-SQL is
Microsoft's proprietary extension to the SQL language.

How to configure a custom task

1. Open the Application Explorer and from the configuration tree select the Maintenance Plan to which the
maintenance task is to be attached.
2. From the task list, select Add a maintenance task. The Maintenance Task Configuration dialog opens.
3. Using the Task drop down list box select Custom. A Custom tab appears in the dialog. Select the tab.
Show picture

4. Enter the Transact-SQL script in the Custom script text box.


5. Click OK to confirm the configuration and close the dialog.

The syntax or contents of the script is not checked, the software just acts as a pipe to deliver the
script to the SQL Database where it is actually executed.

- 1184 -
Maintenance Plan - Shrink Task
The Shrink Task compacts the database, physically reorganizing the data, so that any space that is allocated
and no longer used is released to the operating system. Shrinking the database can also result in an improve-
ment in performance as it reduces the size of the database and increases its efficiency.
The Shrink Task is only available with SQL Server databases and has no configurable options.

Shrinking a SQL Server database


With a SQL Server database, a built-in mechanism evaluates unused space and compacts the database auto-
matically. This has the advantage of taking place as a background activity whenever system time is avail-
able, but does not completely release of all the unused space.
The Shrink Task performs a more thorough compaction process releasing the maximum amount of space.
However, this can be very time consuming and is only recommenced where database performance is crit-
ical.

- 1185 -
Task scheduler

- 1186 -
Task Scheduler Overview
Show picture

The Task Scheduler is used to configure time-based tasks. Using the Task Scheduler, you can create one or
more tasks. Each task is then allocated one or more triggers that control when the task is executed.

About the Tasks


The type of task that may be configured depends from where the Task Scheduler was started.

l If started from the Maintenance tab of a database, the Task Scheduler may be used to create tasks
that purge a database.
l If started from the Export tab of a database, the Task Scheduler may be used to create tasks that
export a database.

About the Triggers


Triggers may be configured so that a task is executed once only or repeatedly. Repeat triggers may be
executed once an hour, once a day, once a week, once a month or once a year. Exceptions may be con-
figured to a repeating trigger.

- 1187 -
The Task Scheduler Dialog
Show picture

The Task Scheduler dialog contains two panes.

l The upper pane contains a calendar showing the current time and any triggers that have been con-
figured. The calendar has four tabs allowing the choice of displaying one day, one week, one month or
one year at a time. Buttons are provided to add and edit triggers.
l The lower pane contains a list of configured tasks and their triggers. Each task has a description and,
if a trigger has been set, the next time at which it is to run. Buttons are provided to create and edit
tasks.

Operation of the calendar


Using the tabs along the lower edge of the calendar, you can display either a day, week, month or year
view. In the picture above, the day view is selected. Icons and color are used to display the configuration.
Icon Meaning
The current time
A green background indicates the selected day.
Red text is used to indicate the current day.
A small solid triangle in the top left hand corner of the date display indicates that there is
one or more configured triggers on that day.
A small hollow triangle in the top left hand corner of the date display indicates that there
is one or more expired triggers on that day.
This symbol is used to indicate a repeating trigger. The name of the task to which the trig-
ger applies is shown adjacent to the icon. The location of the icon on the calendar indic-
ates the time of the trigger. The color of the background changes to pale green when the
trigger is selected for editing.
This symbol is used to indicate a single shot trigger. The name of the task to which the
trigger applies is shown adjacent to the icon. The location of the icon on the calendar
indicates the time of the trigger. The color of the background changes to pale green
when the trigger is selected for editing.
On the Day and Week tabs, a tool tip displays the time and date represented by the cur-
rent pointer position.
Only triggers relevant to the task selected in the lower pane are shown.

Operation of the task list

- 1188 -
The task list is displayed as a tree structure with the triggers shown subordinate to each task. Icons and
color are used to display the configuration.
Icon Meaning
Green - Future.
Red - Elapsed.
Yellow - Current (i.e. a trigger of the begin/end type configured to occur in an interval
that includes the current time). It does not imply that the task is enabled or running.

- 1189 -
Configuring the Scheduler Preferences
Show picture

The Scheduler Preferences dialog enables you to change the appearance of the Task Scheduler. To open the
Scheduler Preferences dialog click the Preferences button in the Task Scheduler dialog.

General Preferences

l Week begins - Select the day to be shown as the start of week (in the calendar pane of the Task Sched-
uler's Day tab, and the schedule in the Week tab).
l Time display format - Select AM/PM or 24-hour format.

Day and Week Settings

l Display current time for today - Tick the box to display a line indicating the current time in the Day
and Week tabs.
l Use drag & drop to create a Begin/End interval - This enables the use of clicking and dragging the
mouse on the calendar to create an interval.
l Hours height (pixels) - The number of pixels for each hour in the vertical scale of the Day and Week
tabs. 30 minimum, 240 maximum, 60 default.
l Mouse time resolution - The granularity of vertical pointer (mouse) movements in minutes. 1 min-
imum, 60 maximum, 5 default.

Changing the size of the Task Scheduler panes


You can change the size of the Task Scheduler panes by positioning the mouse over the horizontal bar sep-
arating the two panes and using click and drag to move it. You can also change the size of the day and week
panes (when displaying the calendar as a single day) by dragging the vertical bar that separates them.

- 1190 -
Managing Tasks
A list of all configured tasks and their triggers is displayed in the lower pane of the Task Scheduler.

l The schedule of triggers for a task is displayed in the calendar when the task is selected with a single
click.
l The Task Properties dialog, from where a task's properties may be displayed and edited, is displayed
by double clicking the task.
l A task may be temporarily disabled by un-ticking the box adjacent to the task name.

The task pop-up menu


The task pop-up menu is displayed by right clicking on a task in lower pane of the Task Scheduler. The fol-
lowing commands are supported.

l Edit task - Displays the Task Properties dialog from where the task properties can be displayed and
edited.
l Add trigger - Displays the Trigger Properties dialog from where a new trigger can be created.
l Paste trigger - Attaches a previously copied trigger to the task.
l Show next trigger - Scrolls the calendar to show the text occurrence of a trigger for that task
l Delete task - Deletes the task from the Task Scheduler.

- 1191 -
Configuring triggers

- 1192 -
Creating a Trigger
A trigger is used to control when the Task Scheduler executes a task. A trigger is attached to a single task
although a task may have several triggers.
Triggers may be created in two ways.

l From the Trigger Properties dialog.


l By using click and drag in the upper pane of the Task Scheduler dialog.

How to create a trigger using the Trigger Properties dialog

1. Open the Task Scheduler from the Database properties dialog.


2. Select the task to which the trigger is to be attached by clicking on its entry in the lower pane.
3. Open the Trigger Properties dialog. See below for the methods of opening the Trigger properties dia-
log. Show picture

4. Enter the trigger properties. See the topics, The General tab and The Repeat tab for details.
5. Click OK to confirm the new trigger and close the dialog.

How to open the Trigger Properties dialog when creating a new trigger
The Trigger properties dialog may be opened in a number of different ways. How you open dialog determ-
ines the initial setting of the trigger properties.

l Position the pointer on the time display area (not the calendar) in either the Day or Week tabs. A tool
tip displays the time corresponding to the pointer position. Right-click and select New Trigger from the
pop-up menu. The trigger is created with a start time corresponding to the position at which you
clicked.
Or:
l Click the New Trigger button. A new trigger is created with the date selected in the calendar and a
time of 00:00:00.
Or:
l Select the Add Trigger command from the task pop-up menu. A new trigger is created with the date
selected in the calendar a time of 00:00:00.
Or:
l Select the Paste Trigger command from the task pop-up menu. A new trigger is created using the prop-
erties of an existing trigger that you have previously cut or copied.

- 1193 -
The trigger properties dialog

- 1194 -
The General Tab
Show picture

The General tab is used to configure the first time a trigger is executed and to select either a single trigger
or an interval begin/end trigger.

How to configure a single trigger


A single trigger executes just the Begin Trigger action from the task to which it is attached.

1. Open the Trigger Properties dialog and select the General tab.
2. Select the Single Trigger option button.
3. Enter a date and time in the Begin On Date and Time fields.
4. Click OK to confirm the configuration.

How the Data and Time field determines the trigger repeats
The trigger is executed for the first time at the date and time entered in the Date and Time fields. These
fields also determine at exactly what time the repeat triggers occur.

l Example 1 - The start date and time is set to 01/09/2003 00:30:00. A trigger with a repeat of 2 hours
would next be executed at 01/09/2003 02:30:00. The minutes and seconds past the hour at which the
first trigger was executed is used for all subsequent executions.
l Example 2 - The start date and time is set to 01/01/2004 01:00:00. A trigger with a repeat of 1 day
would next be executed at 02/01/2004 01:00:00. The hours, minutes and seconds in the day at which
the first trigger was executed is used for all subsequent executions.

There is no relationship between the End On Date and Time in the General tab and the End On Date
and Time in the Repeat tab.

l The End On Date and Time in the General tab specifies when a task's end trigger action
is to take place.
l The End On Date and Time in the Repeat tab specifies when a trigger is to be no longer
repeated.

- 1195 -
The Repeat Tab
Show picture

The Repeat tab is used to configure the frequency at which a trigger is repeated and to enter an optional
date and time after which the trigger becomes inactive.

How to configure the trigger repeat frequency

1. Open the Trigger Properties dialog and select the Repeat tab.
2. Select the repeat units from the following options using the buttons at the top of the tab.
None - The trigger will occur once only.
Hour - the trigger is repeated every N hours.
Day - the trigger is repeated every N days.
Week - the trigger is repeated every N weeks.
Month - the trigger is repeated every N months.
Year - the trigger is repeated every N years.
3. Using the Spin button enter the multiplier for the trigger units. For example, if you were using an
hourly trigger and you entered 2, the trigger would be repeated every 2 hours.
4. If the trigger is to have a limited life span select the Option button, End on, and enter the date and
time after which the trigger will no longer be repeated.
5. If you have selected Month as the repeat unit, select either By Day or By Date. See below.
6. Click OK to confirm the configuration.

Understanding the difference between By Date and By Day when using monthly repetition
If you select the option, By Date, the trigger will occur on the same date every month. For example, if the
date was 15/Oct/03 and the repeat was 1 month, the next trigger would occur on the 15/Nov/03 and then
15/Dec/03 and so on. If the date for the repeating trigger does not exist, the nearest date in that month is
selected. For example, if you select the first date as the 31/Oct/03, the next trigger will be 30/Nov/03.
If you select the option, By Day, the trigger will occur on the same day of every month. For example, if the
date was 15/Oct/03 (the third Tuesday of October), and the repeat was 1 month, the next trigger would
occur on the 19/Nov/03 (the third Tuesday of November) and then 17/Dec/03 and so on. If the day for the
repeat trigger does not exist, the nearest day in that month is selected. For example if you select the first
day as the 29/Oct/03 (the fifth Tuesday), the next trigger will be 26/Nov/03 (the fourth Tuesday).

Examples of a repeating trigger

l The start date and time is 14/Oct/03 0:05:00 (5 minutes past midnight). The repetition is set to every
two days. There is no end date and time. The trigger will first occur at 5 minutes past midnight on the
14th of October. The next instance will be at 5 minutes past midnight on the 16th of October and so on.
l The start date and time is 14/Oct/03 10:01:00. The repetition is set to every hour. The trigger will first
occur at 1 minute past 10 on the 14th of October. The next instance will be at 1 minute past 11 and so
on.

There is no relationship between the End On Date and Time in the General tab and the End On Date
and Time in the Repeat tab.

l The End On Date and Time in the General tab specifies when a task's end trigger action
is to take place.
l The End On Date and Time in the Repeat tab specifies when a trigger is to be no longer

- 1196 -
repeated.

- 1197 -
Using the Trigger Pop-up Menu
The trigger pop-up menu is displayed by right clicking on a trigger icon in calendar pane of the Task Sched-
uler dialog. The following commands are available.

l Edit - Displays the Trigger Properties dialog. This can also be displayed by double clicking on the trig-
ger icon.
l Repeat - Shortcut to the Repeat tab of the Trigger properties dialog.
l Show next - Scroll the calendar to display the next instance of the trigger to be executed.
l Cut - Copy the selected trigger to the Windows Clipboard and delete it from the schedule.
l Copy - Copy the selected trigger to the Clipboard.
l Delete - Delete the current Trigger from the schedule.

- 1198 -
Creating Trigger Exceptions
When you edit or delete a repeating trigger using the commands from the trigger pop-up menu, a dialog box
offers the option to apply the change the current, future or all instances of the selected trigger. If you
choose Current, only the selected instance of the trigger is affected. Show picture

How a trigger is affected when you delete a single instance of a repeating trigger
If you choose to delete just the current (selected) trigger, the existing trigger definition is split in two. The
definitions are the same except one definition has an end on date and time just before the deleted trigger
whilst the other has a begin on date and time just after the deleted trigger.
For example, consider a trigger that repeats daily at 12:00:00. The trigger on the 25/09/03 is selected and
the deleted using the delete command on the trigger pop-up menu and the Current option. Two new triggers
are created.

l The first trigger has the same begin on date and time as the original trigger but has an end on date
and time of 25/09/03 11:59:00.
l The second has a begin on date and time of 26/09/03 12:00:00.

How a trigger is affected when you modify a single instance of a repeating trigger
If you choose to modify just the current (selected) trigger, the existing trigger definition is split in three. The
definitions are the same except one definition has an end on date and time just before the modified trigger,
the second is a trigger once trigger with the begin on date and time of the modified trigger, whilst the third
has a begin on date and time just after the modified trigger.
For example, consider a trigger that repeats daily at 12:00:00. The trigger on the 25/09/03 is selected and
the time changed to 11:00:00 using the Change Trigger command from the trigger pop-up menu and the Cur-
rent option. Three new triggers are created.

l The first has the same begin on date and time as the original trigger but has an end on date and time
of 25/09/03 11:59:00.
l The second is trigger once trigger with a begin on date and time of 26/09/03 11:00:00.
l The third has a begin on date and time of 26/09/03 12:00:00.

- 1199 -
Using the database creation wizard

- 1200 -
Overview of the Database Creation Wizard
The Database Creation Wizard guides you through the process of configuring data recording using the His-
torical Data Server. For more information on how HDS works, see the topic About the HDS.
To start the Database Creation Wizard open the Application Explorer and expand the configuration tree to
select the Archives folder. Select Database creation wizard from the task list. The five main steps when
using the Database Creation Wizard are:

1. Database configuration
2. Default data connection
3. Table configuration
4. Trend group configuration
5. Archive unit and log list configuration

Step 2 - Default Data Connection, is only required if you have not already created a default data connection.
See the topic Databases Settings.
After step 2 (or step 1 if a default data connection has already been configured) you can use the Finish but-
ton and the remainder of the configuration will be automatically completed using default settings.

The use of the Database Creation Wizard is highly recommended, particularly for those unfamiliar
with the Historical Data Server module, as it simplifies configuration considerably.
Starting with version 11.2, SQL Server Database is created with a recovery model set to Simple.
This should be adequate for many projects, in particular in scenario when emergency purge is
enabled.
Depending on your policy for replication and purge, the recovery model may need to be changed.
Pay attention to the fact that with the default settings for the emergency purge, there is the pos-
sibility of data corruption and data loss if the backup-model of the SQL Server database is set to
Full-Backup.

- 1201 -
Step 1 - Database Configuration
In the first step of the Database Creation Wizard, you choose the name by which the database will be known
and optionally select client and server lists. Show picture

When you have completed this step click Next to proceed to Step 2 - default data connection, or Finish to
complete the configuration using default settings.
If you have already configured a default data connection, clicking Next will take you straight to Step
3 - table configuration.

Entering the name for the database


The wizard suggests a name for the database in the form of DATABASEn where n is a number from 1
upwards. You can accept the standard name or choose one of you own. The database name should be limited
to nine characters as it is used later in the wizard to construct the archive unit name by prefixing it with
DB_. The archive unit name is limited to 12 characters.

Selecting client and server lists


The client and server lists only need to be configured if you are using client-server archive units. For more
information, see the book Using client-server archive units.

- 1202 -
Step 2 - Default Data Connection
In the second step of the Database Creation Wizard, you configure the default data connection properties.
Show picture If you have already created a default data connection, this step is omitted.

In the Data source drop down list box, select either Microsoft Access or Microsoft SQL Server. If you select
Microsoft SQL Server then you must also click the Configure button to configure the connection - see below.
When you have completed this step click Next to proceed to Step 3 - table configuration.

How to configure the connection to a Microsoft SQL Server

1. Enter the server path. In version 8.10 of C-CURE Building Management System you must type in the
name as the server browse capability is not enabled.
If you are using a local server, you must use a relative path, for example .\SQLEXPRESS.
If you are using a remote server then you must use an absolute path, for example
PIPPIN2\SQLEXPRESS.
2. By default, the HDS uses Windows authentication. If required you can change to SQL Server authen-
tication in which case you must enter a user name and password.
3. Confirm the configuration by clicking the OK button.

- 1203 -
Step 3 - Table Configuration
In the third step of the Database Creation Wizard, you choose the name of the database tables in which the
HDS will record data. You must choose the name for two tables, a trend table used to record trend (historic)
data and a log table used to record events. Show picture

Each table has a number of columns in which data is recorded. Some columns are mandatory and are pre-
selected, while others are optional. When you have completed this step click Next to proceed to Step 4 -
trend group configuration, or Finish to complete the configuration using default settings.

Choosing the table names


The wizard suggests a name for the two tables in the form of TRENDTABLEn and LOGTABLEn where n is a
number from 1 upwards. You can accept the suggested name or choose one of your own. Table names are
limited to 32 characters.

Selecting what properties are recorded


The properties that are recorded in each table can be chosen using the Select columns button adjacent to the
table name. Show picture For more information on what can be recorded, see the topic What can you record
in the book about configuring database tables.

The table configuration determines what properties are recorded for each eligible event (for
example domain, nature etc.) The events that are eligible to be recorded are configured elsewhere.

- 1204 -
Step 4 - Trend Group Configuration
In the fourth step of the Database Creation Wizard, you configure the trend group. The trend group determ-
ines the rate at which trend data is recorded. Show picture

When you have completed this step click Next to proceed to Step 5 - archive unit and log list configuration,
or Finish to complete the configuration using default settings.
If a trend group already exists this stage is omitted.

Choosing the trend group name


The wizard suggests a name for trend group in the form of TRENDGROUPn where n is a number from 1
upwards. You can accept the suggested name or choose one of your own. Trend group names are limited to
32 characters.

Selecting the trend group properties


The trend group properties affect the rate at which trend data is recorded. For more information, see the
topic Configuring a trend group.

- 1205 -
Step 5 - Archive Unit and Log List Configuration
In the fifth and final step of the Database Creation Wizard, you choose the name of the archive unit and the
name and configuration of the Log List. Show picture

The configuration of the Log List determines what types of events are recorded in the particular database.
When you have completed this step click Finish to complete the configuration and close the wizard.

Choosing the archive unit name


The wizard suggests a name for the archive unit in the form of DB_<Database Name> where <Database
Name> is the name of the database previously configured. You can accept the suggested name or choose
one of your own. Archive unit names are limited to 12 characters.

Configuring the log list


The wizard suggests a name for the log list in the form of LISTn where n is a number from 1 upwards. You
can accept the suggested name or choose one of your own. Log list names are limited to 12 characters.
To select the types of events that will be recorded in the database using the log list click the Select events
button and tick the corresponding tick box in the Select events dialog. Show picture

- 1206 -
Using client-server archive units

- 1207 -
Overview of Client-Server Archive Units
Normally C-CURE Building Management System records (and retrieves) historical data in one or more
archive units that are part of the local project and reside on the same station. When historic data is recor-
ded, it is timestamped with the local time and date. Recording and retrieving data locally in this manner is
suitable for many applications. However, it does have some disadvantages for some multi-station applic-
ations.

l There is no guarantee that all the time and date stamps will be precisely the same across different sta-
tions. Therefore, it is possible that the same data will be recorded on different stations with different
timestamps.
l By recording data in several places, you are duplicating effort and use of resources.
l If you intend to back up the data, which station do you use?

To eliminate these problems, it is possible to centralize the recording on one of the stations (the archive
server) while still making it available to other stations (archive clients) for playback. This is achieved by con-
figuring client-server archive units. Recording data in this way has a number of advantages.

l When the data is played back, the time and date stamp will be consistent across all the stations.
l The data is easier to back up as all data is on one station.
l The cost of protecting the data (for example using redundant disk arrays) is lower as the protection
only has to be implemented on one station.

A station that has archive units that are servers does not have to be a real-time data server - for
example, it could be a real-time client.

- 1208 -
Configuring Client-Server Archive Units
When configuring client-server archive units in a multi-station project, two station lists are selected as part
of the archive unit configuration.

l A client list (containing the name of one or more stations)


l A historical server list (containing the name of a single station)

When the project runs on the station named in the historical server list, the archive unit is created and
records data normally. Note that the station must be configured as a historic server in the project's network
configuration.
When the project runs on a station named in the client list, the archive unit is not created and historic data is
not recorded. Requests for historic data are redirected to, and processed by, the station named in the his-
torical server list.
If you want to record and play back data on the same station, its name must be included in both the
client and historical server lists.

How to configure a client-server archive unit

1. Open the Application Explorer and configure an archive unit in the normal way. You can use client-
server with either proprietary or database type archive units.
2. In the archive unit configuration dialog select the Networking tab. Show picture

3. Select the Servers and the Clients networking lists. Note that the lists must have been previously con-
figured as part of the network station configuration.
4. Select the OK button to confirm the configuration and close the dialog.

- 1209 -
Using Redundant Servers with Client-Server Archive Units
When configuring client-server archive units using redundant servers, two station lists are selected as part
of the archive unit configuration.

l A client list (containing the name of one or more stations)


l A historical server list (containing the name of a single historical association)

When the project runs on either of the two stations named in the historical association, the archive unit is
created and records data normally.
When the project runs on a station named in the server list, the archive unit is not created and historic data
is not recorded. Requests for historic data are redirected to, and processed by, one of the two stations
named in the historical association.

How does a client select which of the redundant historic servers to request data from?
Requests for historic data from the client archive units are routed to one or other of the historic servers as
follows.

l If only one of the servers is available then the request for historic data is sent to that server.
l If both servers are available, the request is sent to the server with the greater Available rate. See
below for information about configuring the Available rate property. If the rates are identical then the
request is sent to the server with the lowest station number.

If you want to record and play back data on the same station, its name must be included in both the
client server list and the historical association named in the server list.

How to configure a client-server archive unit using dual redundant servers

1. Open the Application Explorer and configure an archive unit in the normal way. You can use client-
server with either proprietary or database type archive units.
2. In the archive unit configuration dialog select the Networking tab. Show picture

3. Select the Servers and Clients Network lists. Note that the lists must have been previously configured
as part of the network station configuration. The server station list must contain the name of a single
historic association.
4. Select the OK button to confirm the configuration and close the dialog.

Configuring, displaying and changing the Available rate property


The Available rate property is configured as part of the station configuration when configuring the network
architecture. Show picture See the book on Networking for further information.

- 1210 -
The value of the Available rate for a particular station in an association is available from the system variable
SYSTEM.<ASSOC_NUM>.<STATION_NUM>.AVAILABLE_RATE where <ASSOC_NUM> and <STATION_
NUM> are the numbers allocated to the historic association and station respectively.
The Available rate can be changed dynamically using the LAN instruction in a SCADA Basic program. By chan-
ging the Available rate you can change the server from which clients request their historic data. You may
want to do this for a number of reasons - for example:

l If you want data from a particular time, when you know one of the servers was not running.
l If one of the servers is going to be busy (making a back-up for example) or is going to be off-line for
maintenance.

Replacing missing data in a redundant historic server archive unit


It is quite likely that sometime during the life of a project there will be periods where one or other of the his-
toric servers will have gaps in the historic data recorded in their archive units. This could be due to a variety
of reasons including routine maintenance, hardware failure etc. If you are using a database type archive
unit, you can replace the missing data on one server with the corresponding data on the other. This process
takes place off-line using the Database Manager tool supplied with C-CURE Building Management System.
See the help for the Database Manager for more information.
You cannot replace missing data in a proprietary archive unit.

- 1211 -
Configuration Issues When Using Client-Server Archive Units
The following configuration issues should be taken into account when using client-server archive units.

Log Data

l It is only possible to use client-server archive units for events involving variables. Events associated
with user actions such as logging on and off, sending a value and running a program are excluded.

When using different projects on the stations with the networked application
In general, when using client server archive units, or any networked application, the same project should be
used on all stations. However, very occasionally, this might not be possible in which case the following rules
must be followed.

l All variables being recorded must exist on both the station acting as the archive server and any station
that is an archive client. In addition, any variables used in reports must also have identical variable
identifiers.
l Any log filters must exist on the station acting as the archive server and on any station that is an
archive client.
l The report configuration must be identical on the station acting as the archive server and on any sta-
tion that is an archive client.

For reports, it is not sufficient that just the variable names are the same because, internally within
C-CURE Building Management System, the report configuration identifies the variables it uses by
their internal identifiers.

- 1212 -
Using Historical Associations with the HDS and SQL Server
C-CURE Building Management System allows considerable flexibility when using an association of two or
more historical servers and the HDS to record data in an SQL server database. The following are all possible
configurations although in practice the configuration using a single active server is the likely to be the pre-
ferred solutions for reasons of practicality and cost.

Configuration 1 - Multiple active servers and multiple SQL servers


Each historical servers are active and records in its own dedicated SQL server. Show picture

l Technical issues - A replication mechanism is advisable in case of server failure.


l Configuration - Select Multiple active servers for the redundancy mode in the association con-
figuration.
l Advantage - The same project can be used on all servers.
l Advantage - Each station records data in tables of the same name.
l Disadvantage - High cost if using full versions of SQL Server as it requires one SQL server license for
each server.

Configuration 2 - Multiple active servers and single SQL server with multiple tables
Each of historical servers are active and record in the same database in the same SQL server (on a ded-
icated PC) but in different tables. Show picture

l Technical issues - A replication mechanism is advisable in case of server failure.


l Configuration - Select Multiple active servers for the redundancy mode in the association con-
figuration.
l Advantage - Lower cost if using full version of SQL Server as only one license required.
l Disadvantage - Different projects must be used on each server because of the different table names.

Configuration 3 - Single active server and single SQL server


Only one of historical server is active at any one time. All of the historical servers record in the same table
of the same database of the same SQL server. Show picture

- 1213 -
l Technical issues - No replication mechanism required.
l Technical issues - Double buffering in the HDS minimizes any loss of data during changeover of the act-
ive server.
l Configuration - Select Single active server for the redundancy mode in the association configuration.
l Advantage - The same project can be used on all of servers.
l Advantage - Lower cost if using full version of SQL Server as only one license required.

- 1214 -
Actions

- 1215 -
Managing Actions in the Application Explorer

Tasks applicable to Actions


When the Actions folder is selected.
Icon Task Description
Settings Display the Action Settings dialog

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior when using cut and paste, or copy and paste, on con-
figuration objects in the Actions folder.
Messages Behavior
E-mail profile The pasted E-mail Profile must have a unique name.
SMS profile The pasted SMS Profile must have a unique name.
Message template The pasted Message Template must have a unique name.

Events Behavior
Trigger program Cut, copy and paste not available.
Trigger message The pasted Trigger Message event must have a unique name within the context of the
trigger variable.

Cyclics Behavior
Trigger program Cut, copy and paste not available.

Function keys Behavior


Keyboard shortcuts
to trigger program,
Cut, copy and paste not available.
standard action or
control zone

- 1216 -
Actions Settings
The actions settings can be displayed from the Actions folder in the Application Explorer's Main settings dia-
log or by using the Settings task when the Actions folder is selected in the Application Explorer's con-
figuration tree. Show picture

l Messages
l Email - See the Settings topic in the Message Profiles and Templates book.
l SMS - See the Settings topic in the Message Profiles and Templates book.
l Events - See the Settings topic in the Event actions book.
l Cyclics - See the Settings topic in the Cyclic actions book.

- 1217 -
Message profiles and templates

- 1218 -
Message Profile and Templates Overview
Message profiles and templates are used when sending messages using an event, SCADA Basic code or VBA
code.

l A profile provides information about the user account(s) and the server(s) to be used.
l A template pre-configures some of the properties and contents of a message.

- 1219 -
Managing Messages and Templates Using the Application Explorer

Tasks applicable to messages, profiles and templates


When the Messages folder is selected.
Icon Task Description
Settings Display the general message settings dialog
When the E-mail profiles folder is selected.
Icon Task Description
Add an E-mail pro- Add an e-mail profile.
file
When a specific E-mail profile is selected.
Icon Task Description
Remove Remove the selected e-mail profile. Any associated account will also be
removed.
Properties Display the properties of the selected e-mail profile.
When a specific E-mail account is selected.
Icon Task Description
Remove Remove the selected e-mail account.
Properties Display the properties of the selected e-mail account.
When the SMS profiles folder is selected.
Icon Task Description
Add an SMS profile Add an SMS profile.
When a specific SMS profile is selected.
Icon Task Description
Remove Remove the selected SMS profile. Any associated account will also be removed.
Properties Display the properties of the selected SMS profile.
When a specific SMS account is selected.
Icon Task Description
Remove Remove the selected SMS account.
Properties Display the properties of the selected SMS account.
Check SMS account Display a dialog from where the selected SMS account can be tested (checked).

Information available from the Contents pane


Column Description
Name The name by which the message template/profile/account is known.
Description Description of the message template/profile/account.
E-mail address The sender e-mail address. (E-mail account only)
Server The outgoing server name. (E-mail account only)

- 1220 -
Message Settings
The message settings are displayed from the Settings task when the Messages folder is selected in the
Application Explorer's configuration tree. These settings affect the general operation of the message system
within C-CURE Building Management System. Show picture

l E-mail
l Default e-mail profile - The e-mail profile used as a default when configuring a message. The
default is None.
l Default attachment encoding - The default encoding type for attachments. In version 10.0 of C-
CURE Building Management System, only MIME encoding is supported.
l Prohibited file extensions - Any file extensions that are prohibited for attached files, as a comma
separated list.
l Maximum attachment size - The maximum size of any attached file in KB. The default is 1000
KB.
l SMS
l Default SMS profile - The SMS profile used as a default when configuring a message. The default
is None.

- 1221 -
Configuring an E-mail Profile
An e-mail profile contains information about the account to be used by C-CURE Building Management Sys-
tem when sending an e-mail. The account supplies information such as the SMTP server name and is similar
to the account configuration for e-mail software such as Microsoft Outlook Express. In this version, there is
one account per profile.

Provision has been made for future versions to have multiple accounts selected in a priority order.

How to configure an e-mail profile

1. Creating the profile.


a. Select the E-mail profiles folder in the Application Explorer configuration tree and, from the task
list, select Add a new e-mail profile. A dialog to configure the new e-mail profile will open. Show
picture

b. Enter a name for the profile. You can either accept the suggested name or type in one of your
own.
c. Enter a description of the profile. The description appears in the contents pane of the Application
Explorer and can be useful to identify the profile later. The description is optional.
d. Click the OK button to confirm the creation of the profile. The E-mail profile dialog closes and
new dialog opens from where the e-mail account is configured.
2. Configuring the account - E-mail Account dialog, General tab. Show picture

a. Enter a name for the account. You can either accept the suggested name or type in one of your
own.
b. Enter a description of the account. The description appears in the contents pane of the Applic-
ation Explorer and can be useful to identify the account later. The description is optional.
c. Enter a valid address in the E-mail address field. This will appear in the From field of the recip-
ient's e-mail client and is mandatory.
d. Enter a display name. If configured, this will be displayed in the From field of the recipient's
message client instead of the source e-mail address. The Display name is optional.
e. Enter a valid message address in the Reply-to address field. This will be used by the recipient's
message client if the recipient chooses to reply to the message. The Reply-to address is
optional.

- 1222 -
3. Configuring the outgoing server - E-mail Account dialog, Outgoing Server tab. Show picture

a. Enter the name of your outgoing (SMTP) mail server in the Server name field.
b. Enter the outgoing mail server port number in the Port number field. The default is 25.
c. Select the delivery method, either From IIS directory if using a local IIS server, or Network if
using an external SMTP server (default).
d. If your server requires a secure connection, select the secure transport it supports, either Expli-
cit TLS or Implicit TLS. If it does not require a secure connection, select Never.
e. If your server requires authentication tick the Authentication box and enter a user name and
password.
4. Click OK to confirm the configuration and close the dialog.

The Priority property in the General tab is not used in this version.

Explicit TLS usually requires the use of port 587 and Implicit TLS port 465. Please check with your
service provider to select the appropriate secure connection type and associated port.

- 1223 -
Configuring an SMS Profile
An SMS profile contains information about the account to be used by C-CURE Building Management System
when sending an SMS. The account supplies information about the telephony modem to be used for sending
short messages. In this version, there is one account per profile.

Provision has been made for future versions to have multiple accounts selected in a priority order.

How to configure an SMS profile

1. Creating the profile.


a. Select the SMS profiles folder in the Application Explorer configuration tree and, from the task
list, select Add a new SMS profile. A dialog to configure the new SMS profile will open. Show pic-
ture

b. Enter a name for the profile. You can either accept the suggested name or type in one of your
own.
c. Enter a description of the profile. The description appears in the contents pane of the Application
Explorer and can be useful to identify the profile later. The description is optional.
d. Click the OK button to confirm the creation of the profile. The SMS profile dialog closes and new
dialog opens from where the SMS account is configured.
2. Configuring the account - SMS Account dialog, General tab. Show picture

a. Enter a name for the account. You can either accept the suggested name or type in one of your
own.
b. Enter a description of the account. The description appears in the contents pane of the Applic-
ation Explorer and can be useful to identify the account later. The description is optional.

- 1224 -
3. Configuring the modem connection - SMS Account dialog, Advanced tab. Show picture

a. Configure the modem's connection to the PC. The defaults are: Port name Empty, Baud rate
115,200 bps, Parity None, Data bits 8, Stop bits One, Flow control Wavecom: Fastrack Supreme
20, Timeout 10,000 seconds.
b. Enter the personal identification number (PIN) for the subscriber identity module (SIM) card to
give C-CURE Building Management System access to a mobile telephony network. Use the
default of 0000 if no PIN is required.
4. Click OK to confirm the configuration and close the dialog.

Checking an SMS account


You can check the operation of an SMS account and its corresponding modem by selecting the account in the
Application Explorer's configuration tree and then clicking the Check SMS account task. A dialog opens from
where you can enter a recipient's telephone number, subject and message. When the Check button is sent,
C-CURE Building Management System will attempt to send the message and the return status is displayed in
the dialog. Show picture

This checks message sending, not the actual transmission or delivery. For the latter you will need to
check the SMS-enabled device to which the message was addressed.

- 1225 -
Configuring a Message Template
A message template allows you to predefine some or all of the fields that are used when configuring an
event to send a message. When configuring the event you select the message template and it automatically
completes the fields with the information you have defined.

Field options
Each field in a message template has the following options selected by a button marked with a forward
arrow adjacent to the field.

l Not defined by the template - The template does not provide information for that field. This is the
default setting.
l Imposed by the template - The text that you enter will be used in any message where the template is
used and cannot be changed there.
l Suggested by the template. The text that you enter will be used in any message where the template is
used but can be edited there.

How to create a message template

1. Select the Message templates folder in the Application Explorer configuration tree and, from the task
list, select Add a message template. A dialog to configure the message template will open. Show pic-
ture

2. Enter a name for the template. You can either accept the suggested name or type one of your own.
3. Enter a description of the template. The description appears in the contents pane of the Application
Explorer and can be useful to identify the template later. The description is optional.
4. If the message is to be sent by e-mail, use the drop-down field E-mail profile to select a profile.
5. If the message is to be sent by SMS, use the drop-down field Telephony profile name for SMS to select
a profile.
6. Complete the remaining fields in the Message, E-mail and SMS tabs as required. For information on
the fields, see the following topics.
Message tab - How to configure an event to send a message and Using substitution strings with mes-
sages
E-mail tab - Configuring e-mail options.
SMS tab - Configuring SMS options.
7. Select Imposed by the template or Suggested by the template for each completed field as appro-
priate.
8. Click on OK to confirm the settings and close the dialog.

Leave blank any fields that are to be determined solely via the message itself.

- 1226 -
Event actions

- 1227 -
Event Actions Overview
An event action can either run a SCADA Basic program or send a message via an e-mail or short message
service (text/texto/SMS/TMS - here called SMS).

Event actions are attached to a variable and are triggered when the value of the variable changes. The trig-
ger condition is defined by a configurable expression, for example, when a register exceeds a pre-defined
value. Events may be triggered on Bit, Alarm, Register or Text variables. For Bits and Alarms, the expres-
sion may include one or more conditions, for Registers and Text variables, only one condition is allowed.
Any number of events may be attached to each variable with a maximum total of 32000.
Event actions are affected by the scope of triggering variables. See Understanding how to use the scope and
Configuration items affected by scope for more information.
Event actions are preferred to cyclic actions as they only consume system resources when a change occurs.
For example, consider a simple calculation that takes the square root of one variable and puts the result in
another. Run cyclically, the calculation could be made every 5 seconds. If the value of the variable is chan-
ging only once every 30 seconds then 5 out of 6 times the calculation would produce the same result. If the
same calculation is Event driven, it will only run when the variable changes, that is every 30 seconds.

Generating event actions by program


Event actions may also be configured using the EVENT instruction from a SCADA Basic program. These are
known as temporary actions as they can be created and deleted under program control.

- 1228 -
Managing Event Actions using the Application Explorer

Tasks applicable to event actions


When the Events folder is selected.
Icon Task Description
Add event to trigger Display the dialog from which you configure an event that sends a message
a message (SMS and/or Email).
Add event to trigger Display the dialog from which you configure an event to run a program.
a program
Enable all events Enable all events for the entire project. A dialog is displayed allowing you to
select program events, message events or both. Permanent until the disable
event task is used.
Disable all events Disable all events for the entire project. A dialog is displayed allowing you to
select program events, message events or both. Permanent until the enable
event task is used.
When a specific event is selected.
Icon Task Description
Enable event Enable the selected event. Permanent until the disable event task is used.
Disable event Disable the selected event. Permanent until the enable event task is used.
Remove Permanently remove (delete) the selected event.
Properties Display the properties dialog for the selected event.

Information available from the Contents pane


Column Description
Name The name by which the event is known.
Variable name The variable used to trigger the event.
Action The type of action. Either the program name and function or the message recipient.
State The status of the event. (Enabled or Disabled)
Type The type of event. Either Trigger a program or Send a message.
Details Other information about the event.
Temporary - The event has been created by SCADA Basic.

- 1229 -
Event Actions Settings
The event actions settings are displayed from the Settings task when the Events folder is selected in the
Application Explorer's configuration tree. These settings affect the general operation of the event handling
within C-CURE Building Management System. Show picture

l Networking
l Execute action only on active servers - If selected, event actions produced by a server asso-
ciation are only executed on the active servers of the association.
l Execute action on both active and passive servers - If selected, event actions produced by a
server association are executed on all servers of the association.

- 1230 -
Configuring an event to run a program

- 1231 -
How to Configure an Event to Run a Program
1. Creating and enabling the event.
a. Select the Events folder in the Application Explorer configuration tree and, from the task list,
select Add event to trigger a program. A dialog to configure the new event will open. Show pic-
ture

b. Enter a name for the event. You can either accept the suggested name or type in one of your
own.
c. Enter a description of the event. The description is optional.
d. For multi-station applications, select a servers list. The event will only be activated on stations
within the list. The servers list is optional.
e. Select or enter the name of a bit to enable or disable the event. The bit must be set to 1 to
enable the event. The bit is optional.
f. Tick the Enable box. It must be ticked for the event to be enabled.
2. Configure the trigger.
a. Select the Trigger tab. Select or enter the name of the variable to be used for the trigger. The
ellipsis button adjacent to the Variable field opens the Variable Selector dialog.
b. Enter the trigger expression used in conjunction with the value of the variable to trigger the
event. For information on trigger expressions, see the topic Event trigger expressions.
3. Select the program and function.
a. Select the Program tab. Enter the name of the SCADA Basic program that the event is to run.
The ellipsis button adjacent to the Program name field displays a list of available programs. The
program must exist or you will not be able to create the event.
b. Enter a variable branch for use with the program. The branch is optional.
c. Enter the name of the function, within the program, to run. If you do not specify a function, the
Main function will run.
d. Enter a comma-separated list of arguments for the function. The arguments can be retrieved in
the function using the GETARG instruction. The list of arguments is optional.
4. Click OK to confirm the event configuration and close the dialog.

Used with Event and Cyclic actions, the SCADA BASIC program language is a very powerful tool
allowing many things to be done.
As with any program language, the developer needs to be aware of limitations imposed by the envir-
onment in which it runs, and of the programming techniques needed to make most efficient use of
the available resources.
For more information, see the topic Programming guidelines in the SCADA Basic book.

- 1232 -
Configuring an event to send a message

- 1233 -
Sending Messages Overview
You can configure an event to send a message via e-mail or a short message service (SMS) directly from C-
CURE Building Management System. The mechanism for e-mail and SMS is similar except that e-mail has
more features to configure and use than SMS.

l To use an email service, you need a valid e-mail account and the host PC has to be connected to the
Internet.
l To use SMS the host PC must have an SMS enabled modem.

A message is triggered and composed as follows.

l Sending is triggered by a change in value of a variable.


l You can create templates to provide pre-configure messages and accounts. A template may apply to
many messages, but a message can only have one template.
l You can use substitution strings in a message's properties to change its configuration dynamically (for
example to select the recipients) when the message is sent.

Before you configure an event to send a message via e-mail or SMS, you must configure at least one
account profile in the E-mail/SMS Configuration dialogs. See the topic Configuring an e-mail profile or Con-
figuring a SMS profile for more information.

Glossary
Show table
Term Meaning in this context
Account An account with a provider of a service (e-mail or SMS) plus the parameters for
connection. It is not related to user accounts in C-CURE Building Management Sys-
tem.
Account profile A list of accounts in priority sequence. When sending a message, the first avail-
able account is used. It is not related to user accounts in C-CURE Building Man-
agement System.
Message An electronic text message with a subject and content. It can be sent via e-mail
and/or SMS.
Message template Pre-defines the contents and account profiles to use for e-mail and/or SMS mes-
sages. It is not related to user accounts in C-CURE Building Management System.)
Recipient An addressee, identified by an e-mail address for e-mail and/or a telephone num-
ber for SMS. This information may be entered directly or taken from the details of
a user (as configured in C-CURE Building Management System's User Accounts).
Short message A plain text message limited to 160 characters for PDU 7-bit encoding or 70 char-
acters for 16-bit Unicode. A short message is typically called a 'text' or 'SMS' in
Europe and 'texto' or 'TMS' elsewhere.
Substitution string A substitution string allows you to include real time information from the variable
that triggered the message.
User A user name registered in the User Accounts of C-CURE Building Management Sys-
tem.
User profile A user profile registered in the User Accounts of C-CURE Building Management
System.

Tips
C-CURE Building Management System supports many, but not all, features of e-mail and short message ser-
vices. Some understanding of how e-mail and SMS services work is necessary for deciding whether and how
to use those services to send data.
Some features in common are as follows.

l Automatic messaging is a one-way process of notification to each recipient.


l You can configure a message to be sent to recipients by e-mail and/or SMS.

- 1234 -
l Both e-mail and SMS depend on connection, forwarding and delivery services provided by third
parties. There is no guarantee or notification of delivery.
l Using message templates and account profiles, you can generate messages with pre-defined prop-
erties, contents, recipient lists and accounts for connection.
l Using substitution variables you can make the properties, contents and recipient lists reflect the oper-
ating conditions when the message is sent.

Some differences are as follows.

l E-mail uses the Internet whereas SMS uses telephony.


l For simple sending of brief messages, you can use SMS and/or e-mail. For handling longer messages,
attachments and further options such as copied recipients, you can only use e-mail.
l You must have an account configured for each service that is to be used. Accounts are configured (and
optionally secured) differently for e-mail and SMS.
l Different costs may be incurred for sending an e-mail or a short message. You may care to set usage
limits in the connection software you use.

Some limitations apply to the sending of messages, for instance e-mail contents are limited to plain
text. Multimedia messaging service (MMS) is not supported.

Messages sent via public networks must comply with local and international rules and tariffs for
electronic communications.

- 1235 -
How to Configure an Event to Send a Message
The dialog to configure an event to send a message contains several tabs and many properties. If you pre-
viously configure and then select a Message Template, many of the properties will be automatically com-
pleted. Properties that appear dimmed (read-only) do so because they have been configured as Imposed by
the template in the template. See the topic Message templates for more information.

1. Creating and enabling the event


a. Select the Events folder in the Application Explorer configuration tree and, from the task list,
select Add event to trigger a message. A dialog to configure the new event will open. Show pic-
ture

b. Enter a name for the event. You can either accept the name suggested or type in one of your
own.
c. Enter a description for the event. The description is optional.
d. For multi-station applications, select a servers list. The event will only be activated on stations
within the list. The servers list is optional.
e. Select a template. A template can be used to pre-configure some of the fields in the Profile, Mes-
sage and E-mail and SMS tabs. Use of a template is optional.
f. Select or enter the name of a bit to enable or disable the event. The bit must be set to 1 to
enable the event. The bit is optional.
g. Tick the Enable box. It must be ticked for the event to be enabled.
2. Configure the trigger
a. Select the Trigger tab. Select or enter the name of the variable to be used for the trigger. The
ellipsis button adjacent to the Variable field opens the Variable Selector dialog.
b. Enter the trigger expression used in conjunction with the value of the variable to trigger the
event. For information on trigger expressions, see the topic Event trigger expressions.
3. Select the profile(s). The profiles contains information about the account used to send the e-mail
and/or SMS and must have been previously configured, see the topics Configuring an SMS profile and
Configuring an e-mail profile.
4. Select the Message tab. Enter the subject and message in the corresponding fields.
5. Configure the E-mail and/or SMS recipients. See the topic Configuring the e-mail options or Con-
figuring the SMS options respectively.

Using substitution strings


You can use substitution strings in the fields in the Message tab. For further information, see the topic Using
substitution strings with messages.

- 1236 -
Configuring the E-mail Options
The following options are available from the E-mail tab of the dialog used to create an event to trigger a mes-
sage. Show picture

Selecting recipients
Enter the list of recipients to which the message is to be sent. You can select a main address (To), explicit
copy (Cc) and/or hidden copy (Bcc). There are a number of ways in which a recipient can be specified.

l You can enter an actual e-mail address.


l You can enter a User name or User profile from C-CURE Building Management System's User
Accounts. If you enter a User name, the message will be sent to the e-mail address that was entered
in the User's configuration. If you enter a User profile, the message will be sent to all Users attached
to that profile.
l You can enter a substitution string.

For further information, see the topic Adding Lists of Recipients.

Attaching a file to an e-mail


To attach a file to an e-mail use the Add file button, which opens a standard Windows Explorer dialog from
where the file can be selected. The maximum file size of an e-mail attachment is 10 Mb.
You can also attach a file to an e-mail using a substitution string. The contents of the substitution string (for
example an extended attribute of the trigger variable) provide the path and file name for the file to be
attached. As extended attributes can be dynamic, this allows the file to be re-selected depending on oper-
ating conditions.

Other e-mail options

l Priority - Selects the priority at which the e-mail appears in the recipient's e-mail client. The default is
Normal.
l Message format - Allows the e-mail to be sent as plain text or HTML. The default is Plain Text.
l Message encoding- Specifies the encoding for the character set used in the message. You may need to
change this if you are sending a message that includes characters that are not from a Western char-
acter set.

- 1237 -
Configuring the SMS Options
The following options are available from the SMS tab of the dialog used to create an event to trigger a mes-
sage. Show picture

Selecting recipients
Enter the list of recipients to which the message is to be sent. There are a number of ways in which a recip-
ient can be specified.

l You can enter an actual mobile telephone number.


l You can enter a User name or User profile from C-CURE Building Management System's User
Accounts. If you enter a User name, the message will be sent to the mobile number that was entered
in the User's configuration. If you enter a User profile, the message will be sent to all Users attached
to that profile.
l You can enter a substitution string.

For further information, see the topic Adding Lists of Recipients.

Advanced options (Message format)


The Format property allows the message to be formatted as Auto, Text, PDU 7-bit or Unicode. The default is
Auto. The maximum number of characters in a message depends on the format.
Format Maximum Comment
PDU 7-bit 160 7 bit character encoding. The normal format used for text messaging
Text 140 8 bit character encoding. Not viewable by the phones as text messages. Used
for data in, for example, smart messaging.
Unicode 70 16 bit character encoding. Used for Unicode (UCS2) text messages, viewable
by most phones. A 16-bit text message of class 0 will appear on some phones
as a Flash SMS (blinking SMS or alert SMS)
Auto Automatically select the message format according to the content of the mes-
sage.

- 1238 -
Adding Lists of Recipients
The Recipients dialog opens when you click the ellipsis button adjacent to any of the Recipient fields of either
the E-mail tab or the SMS tab of the dialog used to create an event to trigger a message. It allows you to
interactively build a list of recipients containing User names, User profiles and Substitutions.
To send a message to the same recipient via e-mail and via SMS, you include it once in the E-mail
tab and once in the SMS tab.

Adding recipients
The list of recipients is automatically updated each time you tick an entry in the Users tab, Profiles tab Show
picture or Variable substitution tab Show picture.
When you have selected all recipients click OK to return to the Create Event to Trigger a Message dialog.

- 1239 -
Using Substitution Strings with Messages
Substitution strings can be used within several of the fields used when configuring an e-mail or short mes-
sage (SMS) to provide context sensitive and real time information. The substitution strings allow you to
include information from the variable used in the expression that triggered the message and the date and
time at which it was triggered.
Substitution strings may be used in the Subject and Message fields of the Message tab, the Recipients, Pri-
ority and Attachments fields of the E-mail tab and the Mobile phone numbers field of the SMS tab. They are
also available in the corresponding fields of message templates, see Configuring a Message Template.

How to add a substitution string in a field


You can either type a substitution string directly into a field, or use the button beside the field to open the
Substitutions dialog from where the substitution string can be selected. Show picture

List of strings
String Substitutes for Comment
#@An The variable's extended attribute n. n is in the range 3 to 16.
#@*An The value of the variable named in the vari- n is in the range 3 to 16.
able's extended attribute n.

Subject and Message fields only


#T The variable's description.
#t The variable's name.
#N The name of the current User.
#E The associated label.
#d The variable's domain.
#n The variable's nature.
#A Alarm priority.
#C Threshold or value.
#S Station number.
#Y The year as two digits.
#y The year as four digits.
#M Month.
#D Day number.
#h Hour.
#m Minute.
#s Second.
#l Millisecond.

- 1240 -
Event Trigger Transitions
The condition under which an event triggers can be configured as an expression of up to 255 characters. The
syntax of the expression depends on the type of variable used in the event.

Bit or Alarm Variables


The expression for bit and alarm variables may contain a series of conditions separated by commas.
For Bits, the following conditions are available.
Condition Description
NS>S Non-significant (invalid) to significant (valid).
S>NS Significant to non-significant
ALL>S Any state to significant.
S>S Significant to significant.
S>ALL Significant to any state.
ALL>ALL Any state to any other state.
1>0 From 1 to 0.
0>1 From 0 to 1.
NS>0 From non-significant to 0.
S>0 From significant to 0
NS>1 From non-significant to 1.
S>1 From significant to 1.
ALL>0 From any state to 0.
ALL>1 From any state to 1.
For Alarms, the same conditions for Bits plus the following are available.
Condition Description
ACKON>ACKOFF On and acknowledged to Off.
ACKOFF>ACKON Off to On and acknowledged.
NOACKON>ACKON On and not acknowledged to On and acknowledged.
NOACKOFF>ACKOFF Off and not acknowledged to Off.
S>ACKON Any significant value to On and acknowledged.
S>ACKOFF Any significant value to Off.
S>NOACKON Any significant value to On and not acknowledged.
S>NOACKOFF Any significant value to Off and not acknowledged.
ALL>NOACKON Any state to On and not acknowledged.
UNMASK>MASK Unmasked to Masked.
MASK>UNMASK Masked to Unmasked.
MASK>MASK Any change of the mask.

Register Variables
The expression for a register variable may contain only a single condition.
Condition Description
ALL>S Transition from any state to a significant value.
NS>S Transition from a non-significant state to a significant state.
S>S Transition from one significant state to another.
S>ALL Transition from a significant state to any other.
S>NS Transition from a significant state to a non-significant state
ALL>ALL Transition from and state to any state. (Any change in state)
=value Equal to the given value
+value The value increases by an amount equal or greater than the given value.
-value The value decreases by an amount equal or greater than the given value.
>value The value is greater than the given value.
<value The value is less than the given value
value1>value2 Change from value1 to value2

- 1241 -
value>ALL All changes in value.

Text Variables
The expression for a text variable may contain only a single condition.
Condition Description
ALL>NS Transition to a significant (Valid) value from any other state.
NS>S Transition to a significant value from non-significant (Invalid).
S>S All changes of significant value.
S>ALL Transition from a significant (Valid) value to any other state.
S>NS Transition from a significant value to non-significant (Invalid).
ALL>ALL Any change in status.
='string' or =string Equal to the given string.
>'string' or >string The ASCII value of the text variable is greater than that of the given string.
<'string' or <string The ASCII value of the text variable is less than that of the given string.

The string can either include single quotation marks or be plain (no quotation marks). Some older
applications used double quotation marks. These are no longer compatible and must be changed to
single quotation marks.

Event expression examples


ALL>NS For a bit variable, triggered when changing from either 0 or 1 to an
invalid state.
NOACKON>ACKON,ACKON>ACKOFF For an alarm variable, triggered when changing either from Alarm On
Not Acknowledged to Alarm On Acknowledged; or from Alarm On
Acknowledged to Alarm Off.
= 'OPERATOR' For a text variable, triggered when the value equals OPERATOR.

- 1242 -
Cyclic actions

- 1243 -
Cyclic Actions Overview
A cyclic action repeatedly runs a SCADA Basic program at a configurable period. Up to 512 Cyclic actions
may be configured. The minimum period is 1 second.

Cyclic actions are different to Scheduler actions where an action is triggered at a specific time.

Using a cyclic action to run a program you can:

l Run an entire program or an individual function from a program.


l Pass a database branch to the program or function.
l Pass up to 10 arguments to the function.

Generating cyclic actions by program


Cyclic actions may also be configured using the CYCLIC instructions from a SCADA Basic program. These are
known as temporary actions as they can be created and deleted under program control.

- 1244 -
Managing Cyclic Actions in the Application Explorer

Tasks applicable to cyclic actions


When the Cyclics folder is selected.
Icon Task Description
Add cyclic Display the dialog from which you configure a cyclic action.
Enable all cyclics Enable all cyclics for the entire project. Permanent until the disable cyclic task is
used.
Disable all cyclics Disable all cyclics for the entire project. Permanent until the enable cyclic task
is used.
When a specific cyclic action is selected.
Icon Task Description
Enable cyclic Enable the selected cyclic. Permanent until the disable cyclic task is used.
Disable cyclic Disable the selected cyclic. Permanent until the enable cyclic task is used.
Remove Permanently remove (delete) the selected cyclic.
Properties Display the properties dialog for the selected cyclic.

Information available from the Contents pane


Column Description
Name The name by which the cyclic is known.
Description The description entered when configuring the cyclic.
Period The repeat period in seconds.
Action The program name and function.
State The status of the cyclic. (Enabled or Disabled)
Details Other information about the cyclic.
Temporary - The cyclic has been created by SCADA Basic.

- 1245 -
Cyclic Actions Settings
The cyclic actions settings are displayed from the Settings task when the Cyclics folder is selected in the
Application Explorer's configuration tree. These settings affect the general operation of the cyclic function
handling within C-CURE Building Management System. Show picture

l Networking
l Execute action only on active servers - If selected, cyclic actions produced by a server asso-
ciation are only executed on the active servers of the association.
l Execute action on both active and passive servers - If selected, cyclic actions produced by a
server association are executed on all servers of the association.

- 1246 -
How to Configure a Cyclic Action
1. Creating and enabling the cyclic action.
a. Select the Cyclics folder in the Application Explorer configuration tree and, from the task list,
select Add a cyclic... A dialog to configure the new cyclic will open. Show picture

b. Enter a name for the cyclic. You can either accept the suggested name or type in one of your
own.
c. Enter a description of the cyclic. The description appears in the contents pane of the Application
Explorer and can be useful to identify the cyclic later. The description is optional.
d. Select the scope for the cyclic. See Understanding how to use the scope and Configuration items
affected by scope for more information.
e. For multi-station applications, select a servers list. The event will only be activated on stations
within the list. The servers list is optional.
f. Select or enter the name of a bit to enable or disable the event. The bit must be set to 1 to
enable the cyclic. The bit is optional.
g. Tick the Enable box. It must be ticked for the event to be enabled.
2. Select the Trigger tab. Enter the period at which the action will be triggered. The period is in seconds
3. Select the Program tab.
a. Enter the name of the SCADA Basic program that the event is to run. The ellipsis button adjacent
to the Program name field displays a list of available programs. The program must exist or you
will not be able to create the event.
b. Enter a variable branch for use with the program. The branch is optional.
c. Enter the name of the function, within the program, to run. If you do not specify a function, the
Main function will run.
d. Enter a comma-separated list of arguments for the function. The arguments can be retrieved in
the function using the GETARG instruction. The list of arguments is optional.
4. Click OK to confirm the configuration and close the dialog.

Used with Event and Cyclic actions, the SCADA BASIC program language is a very powerful tool
allowing many things to be done.
As with any program language, the developer needs to be aware of limitations imposed by the envir-
onment in which it runs, and of the programming techniques needed to make most efficient use of
the available resources.
For more information, see the topic Programming guidelines in the SCADA Basic book.

- 1247 -
Scheduled actions

- 1248 -
Scheduler Overview
The Scheduler is used to configure and control time based actions, for example, to print a report at the end
of each day. Scheduled actions may be created to run hourly, daily, weekly, monthly or according to a con-
figurable time table. Scheduled actions may also be configured as once only (single shot).
A scheduled action may force a database Bit, send a Recipe or launch a SCADA BASIC program. Below are
some of the more common uses of the three types of scheduled action.
Action Use
Force a Bit Run a report.
Enable or disable the recording of historic data.
Back-up an Archive Unit.
Send a Recipe Simple time based control. For example, turn the heating and ventilation on at the
start of a day and off again at the end.
Launch a Program Make end of day calculations and put the information in a file for transfer to another
computer.
Display a message in a mimic as a prompt to the operator to perform a certain duty.
Scheduled actions are different to cyclic actions. The scheduler is designed to produce repetitive actions at a
precise time. Cyclic actions are also repetitive but at a pre-defined period, not at a specific time.
Actions are managed using the Scheduler dialog box available from the Action sub-menu. From within the
dialog box a list of scheduled actions is displayed, new actions may be created and existing actions modified
or deleted.
A total of 512 Scheduled Actions may be configured.

- 1249 -
Configuring a Scheduled Action
A new action is configured by selecting the Create command button in the Scheduler Management dialog
box. If an existing action is selected in the action list, the dialog box that is displayed will contain the con-
figuration of the selected action enabling a new action to be created with similar characteristics. An action
may set a Bit, run a SCADA BASIC function or send a Recipe.
Actions may be enabled and disabled by a database Bit. The action is enabled when the Bit is set to 1 and dis-
abled when 0.

Setting an action's agenda


An action's agenda determines when and with what frequency it will be initiated.

l Frequency - The frequency at which the action is triggered


l Timetable - According to a user defined time table.
l Once - Once only at the specified date and time.
l Monthly - Once a month on the specified day and time.
l Weekly - Once a week on the specified day and time.
l Daily - Every day at the specified time.
l Hourly - Every hour at the specified minute.
l Time - The time in hours and minutes at which the event is to be triggered.
l Day - The day on which the event is to be triggered (weekly events only).
l Date - The date at which the event is to be triggered.
l Month - The month in which the event is to be triggered (once only events).
l Year - The year in which the event is to be triggered (once only events).

For each time table action a Time Table must be created. This is covered in the section on Configuring a
Time Table Action.
The behavior of an action for Bits and Recipes is different when using a Time Table. See the section
Configuring Time Table Actions for further information.

Using a scheduled action to set a bit


Show picture

l Name - The name of the bit to set.


l Inverse - Set the bit to the opposite of its current state. There is no way to know the final state of the
bit, only that it will change.
l To 0 - Set the bit to 0.
l To 1 - Set the bit to 1.
l Pulse - Set the bit to the chosen state for a pre-defined period (in seconds).

Using a scheduled action to send a recipe


Show picture

- 1250 -
l Num start - The number of the recipe to be sent at the start of a period.
l Title start - The title of the recipe to be sent at the start of a period.
l Num end - The number of the recipe to be sent at the end of a period (optional).
l Title end - The title of the recipe to be sent at the end of a period (optional).

Either a recipe number or recipe title may be entered - not both.

Using a scheduled action to run a function


Show picture

l Program - The name of the SCADA BASIC program that contains the function to execute.
l Branch - The database branch to be used by the function. Optional.
l Function - The function to be executed. If not specified then the Main function will be executed.
l Arguments - A list of arguments that may be retrieved within the function using the GETARG instruc-
tion. A comma is used as a separator between arguments.

- 1251 -
Configuring a Timetable Action
If the Agenda for an action is selected as Time Table, the action will be triggered according to time periods
defined by a table known as a Standard Week.
A Standard Week defines a number of periods in each of the 7 days using start and end times. The action
with which the Time Table is associated will be triggered at the start and end of each period. So for
example, a Time Table could be used to trigger a report on Monday through to Friday, but not on Saturday or
Sunday.
The schedule defined by the Standard Week is repeated indefinitely, except for any Exception Periods that
have been created. Exception periods override the standard weekly settings and may be used to change the
times at which the action is triggered over holidays or shut down periods.
Time Table actions that set Bits or send Recipes differ in operation to actions, which are scheduled in any
other way. Depending on which options have been chosen, an action may be triggered at the start and end of
each period.

l For a bit, choosing the To 0 option will set the bit to 0 at the start of the period and to 1 at the end.
l For a bit, choosing the To 1 option will set the bit to 1 at the start of the period and to 0 at the end.
l For a bit, if the pulse option is selected, the pulse will occur both at the start and at the end of a
period.
l For a recipe, the recipe defined by Num start is sent at the start of a period and the recipe defined by
Num end at the end.

Defining a standard week


Once Time Table has been chosen as the agenda, two extra command buttons, Standard Week and Excep-
tion Periods, appear in the Action dialog box. Selecting the Standard Week button will display a dialog box
into which the weekly time periods are entered. A different Standard Week must be created for each Time
Table action. Show picture

Each period is defined by a start and an end time entered with a resolution of 1 minute. Any number of peri-
ods may be entered for each day with the command buttons at the top and bottom used for scrolling through
the periods. A period can also extend over more than one day. For example, a period could start on 18:00
Monday and finish on 02:00 Tuesday.
By clicking on the Attributes command button, you can change the title of Standard Week box when it is dis-
played at run-time.

From version 11.2 of C-CURE Building Management System onwards, consecutive periods with only
one minute between them behave as one contiguous period. For example, the periods Monday 12:00
to 23:59 and Tuesday 00:00 to 11:59 will behave as one period Monday 12:00 to Tuesday 11:59 with
no action taking place at Monday 23:59 or Tuesday 00:00.

Creating exception periods


Exception periods may be defined for specific days to override the standard weekly settings. They may be
used to change the operation of a scheduled action over holidays or shut down periods.

- 1252 -
Selecting the Exception Period command button in the Action dialog box will display a list of configured
Exception Periods for the current schedule. Existing Exception periods may be displayed and modified by
double clicking on the entry in the list. New Exception Periods are created by selecting the Create command
button. Show picture

Each Exception Schedule allows the definition of different periods for 3 dates. The first date defines the
change in operation on the first day of the period, the second date (which always follows the first), defines
the operation on all subsequent days until the third date, which defines the operation on the last day of the
period. Show picture

Exception periods of less than three days may be created by leaving the periods in the first and / or last date
empty. The Scheduler then assumes that the exception period is only for those dates with period definitions.
By clicking on the Attributes command button, you can change the title of Exception Period box when it is dis-
played at run-time.

- 1253 -
Displaying a Timetable at Run Time
Time Table may be displayed at run time using a special animation called Timetable. The colors in which the
time table are displayed are defined by the Time Table and Exception Period attributes.
A Timetable display may be configured to be read only or to allow the Operator to change and save the time
periods. For further details on how a Time Table is displayed at run time see the animation section in the
Window Editor manual. Show picture

The WebScheduler also permits visualizing timetables and modifying time periods.

- 1254 -
The Scheduler Management Dialog
The Scheduler dialog box is displayed from the ACTION sub-menu and is used to display, delete, modify and
create scheduled actions. Show picture

The dialog displays a list of existing scheduled actions and has a number of command buttons to create
modify and delete actions. The operation of the dialog box is very similar to that used to manage cyclic and
event driven actions.

Using the action list


Configured actions are displayed, one per line, in a scrollable list. Each line displays the type of action (activ-
ity), its frequency and its current status.
The activity starts with a single character indicating the type of action followed by a description of the activ-
ity.

l V Variable - Force the value of a bit variable. The activity description includes the name of the Bit fol-
lowed by the state to which it will be forced.
l P Function - Start a SCADA BASIC function. The activity description contains the function name and the
program in which it resides.
l R Recipe - Send a recipe. The activity description contains the name of the recipe(s) to be sent.

The frequency indicates when and how often the action will be triggered.
The status indicates if the action is enabled or not. The star (*) character indicates that an action is enabled.
An action is selected by clicking on its display line in the list. A selected action is indicated by the characters
<> which will appear at opposite ends of the line. Clicking on a line again will de-select it. Several actions
may be selected at the same time. Double clicking on an action will display its configuration dialog.

Tab options and command buttons

l Defined - Display all actions that are defined but not enabled.
l Enabled - Display all actions that are defined and enabled.
l Temporary - Not used.
l All - Select all displayed actions.
l None - Deselect all displayed actions.
l Enable - Enable all selected actions.
l Disable - Disable all selected actions.
l Delete - Delete all selected actions. A confirmation box limits the risk of accidental deletion.
l Refresh - Refresh the display showing the current status of the actions.
l Save - Save any changes to hard disk. The changes will be remembered when the software is restar-
ted.
l OK - Cancel the dialog box without saving the changes on disk. The changes will be operable but will
be lost when the software is restarted.
l Create - Create a new action. The Action Parameter dialog is displayed.

- 1255 -
Function keys

- 1256 -
Function Keys Overview
The action of many of the keyboard keys can be configured by the developer, including function keys. This is
particularly useful if, at run time, the host PC has to operate without a mouse or other pointing device. Key-
board shortcuts can be configured using either the Application Explorer or the SCADA Basic instruction KEY.
This book explains how to configure shortcuts using the Application Explorer. There are over 30 keys that
can be configured and most can be given more than one action by using them in conjunction with the Shift
and / or Ctrl keys. In addition an action may be triggered when a key is pressed down and / or when it is
released.
A key action can be one of three types.

l Standard action. An internal, predefined action such as to display the on-line Help or show the Con-
figuration Menu. Several of the keys are pre-configured with standard actions when a project is first
created.
l Execute a function. A function from a SCADA Basic program may be executed. The possibilities in this
case are endless, but a typical use would be to open a window.
l Send an animation. Reproduce the action of an operator clicking on a Send type animation in a win-
dow.

Function keys pre-configured with standard actions


Key Direction Standard action
F1 Key up Online help
F2 Key down Logon / logoff
F3 Key down User accounts
F4 Key down About window
F6 Key down Show menu
F7 Key down Event Viewer
F8 Key down Hide menu
F9 Key down Programs
F10 Key down Quit application
F11 Key down Data exports
F12 Key down VCR
PgDn Key down Next window
PgUp Key down Previous window
Right arrow Key down Next zone
Down arrow Key down Next zone
Left arrow Key down Previous zone
Up arrow Key down Previous zone
Home Key down First zone
End Key down Last zone

Other function keys that can be configured


F5, F13, F14, F15, F16, Backspace, Tab, Enter*, Pause, Esc, Space bar*, Insert, Delete...
*Use with caution as may affect other functionality.

Changes in function key management from version 12 onwards


Prior to version 12 the default configuration of the function keys with pre-configured standard actions was
created automatically each time C-CURE Building Management System started. Any changes made as part
of the project configuration were overwritten. This meant that if you wanted to delete or change the function
of any of these keys permanently, it had to be done using a SCADA Basic program arranged to run each time
the software was started.
From version 12 onwards, the default configuration of the function keys with pre-configured standard
actions is created once only when the project is first created. Therefore, any changes made subsequently,
as part of the project configuration, are permanent.

- 1257 -
If you start a project created with a version prior to 12 the behavior is the same as if you were cre-
ating a new project. That is the default configuration of the function keys with pre-configured stand-
ard actions is created once only. A SCADA Basic program to delete or change the function of these
keys is no longer necessary.

- 1258 -
Managing Function Keys using the Application Explorer

Tasks applicable to Function Keys


When the Function Keys folder is selected.
Icon Task Description
Create default func- Re-create the list of function keys you would find in a new project.
tion keys
Add function key Add a new function key.
Enable all function Enable all function keys. The state persists after shutdown and restart.
keys
Disable all function Disable all function keys. The state persists after shutdown and restart.
keys
When a specific function key is selected.
Icon Task Description
Remove Remove selected function key configuration.
Properties Display propertied for the selected function key.
Enable Enable selected function key. The state persists after shutdown and restart.
Disable Disable selected function key. The state persists after shutdown and restart.

Information available from the Contents pane


Column Description
Key and modifier The function key and modifier (Shift and / or Ctrl) if any.
Event The stroke on which the action is executed. Key Up or Key Down.
Action The action type and details. For example: Execute a program KEYACTIONS.SVB /
MyKeyAction
State Enabled or Disabled. Takes into account the Enable and Disable tasks, the Enable prop-
erty in the key configuration and the state of the enable bit if specified.
Detail Additional information about the configuration.

l Temporary - Created by a program.


l Blank (empty) - Created by the user.

- 1259 -
Configuring a Function Key
1. Creating a function key and configuring the general properties.
a. Select the Function Keys folder in the Application Explorer configuration tree and, from the task
list, select Add function key. A dialog to configure the new function key will open. Show picture

b. Enter a description of the function key. The description is optional and is only displayed in the
Application Explorer.
c. Select or enter the name of a bit to enable or disable the function key. The bit must be set to 1
for enable. The bit is optional.
d. Tick the Enable box. It must be ticked for the function key to be enabled.
2. Select the Trigger tab and configure the trigger.
a. Select the key using the drop down list box.
b. Select any modifiers (Shift and / or Control) to be used in conjunction with the key.
c. Select the key event on which the action is to be triggered (Up or Down).
3. Select the Action tab and Select the action type from either Standard Action, Function to Execute or
Send Animation.
4. If triggering a Standard action then:
a. Select the action using the drop down list box.
5. If triggering a Execute a function then:
a. Enter the name of the SCADA Basic program that is to run. The ellipsis button adjacent to the
Program name field displays a list of available programs. The program must exist or you will
not be able to create the function key.
b. Enter a variable branch for use with the program. The branch is optional.
c. Enter the name of the function, within the program, to run. If you do not specify a function, the
Main function will be executed.
d. Enter a comma'separated list of arguments for the function. The arguments can be retrieved in
the function using the GETARG instruction. The list of arguments is optional.
6. If triggering a Send animation then:
a. Enter the name of the mimic that contains the animation. The ellipsis button adjacent to the
Mimic field displays a list of available mimics. The mimic must exist or you will not be able to
create the function key.
b. If the mimic requires a variable branch, then select or enter it.
c. Enter the name of the animation. The animation name can be found using the Graphic Explorer
when the mimic is open.
7. Click OK to confirm the configuration and close the dialog.

C-CURE Building Management System does not warn you about, or prevent you from, configuring
more than one action on the same key / modifier / event combination. If you do that, all configured
actions are triggered when the key is used.

- 1260 -
User accounts

- 1261 -
User Accounts Overview
Before using C-CURE Building Management System, a user must log on using a user account. The con-
figuration of the user account determines what project features are available at run time (for example the
windows a user can open) and access to the configuration tools and operating system. The user account can
also be used to provide user sensitive window selection and select a SCADA Basic program that runs when a
user logs in.

About user accounts


Each user account consists of a user and a profile. When using networked applications there can be one or
more profiles per user account.

l The configuration of the user provides the name and password used when logging on. There is no lim-
itation to the number of users that may be configured.
l The configuration of the profile provides the access rights that the user has. The same profile may be
associated to any number of users. There is no limitation to the number of profiles that may be con-
figured.

User accounts are managed using the Application Explorer or directly from the User Accounts Administration
dialog, which can be displayed using function key F3.
The User Accounts administration dialog can be accessed using function key F3 even if a user has no
user account or development rights. To prevent this you must disable this action using the Function
Key configuration.

Logging on and off


A user logs on and off using a function key F2 and entering a name and password. If enabled in the profile, a
user can be automatically logged off after a period of inactivity.

Default user account


A default user account, known as DEFUSER together with the profile DEFPROFILE, provides the residual
rights when no user is logged in and also when C-CURE Building Management System is first started.
When a project is first created the DEFPROFILE is automatically created with all access rights and,
as part of the project's User Accounts configuration, must be changed to leave only those residual
rights that the project requires.

The advanced security strategy


When the advanced security strategy is enabled, the operation of the user rights mechanism is modified to
provide greater security and traceability. This is particularly for, but not exclusive to, applications that are
to be compliant with the FDA (Federal Drugs Agency) ruling 21 CFR Part 11.

Using Windows domain user groups


If the PC on which your application is running has access to a Windows domain controller, you can use Win-
dows user groups as an alternative to the user directory built-in C-CURE Building Management System.

- 1262 -
Managing User Accounts in the Application Explorer

Tasks applicable to user accounts


When the User Accounts folder is selected.
Icon Task Description
Settings Display the User Accounts Settings dialog.
Check Windows' Display the dialog used to check the existence of a particular Windows' user.
users
When the Profiles folder is selected.
Icon Task Description
Add a profile Add a user profile.
When a specific user profile is selected
Icon Task Description
Remove Remove the selected profile.
Properties Display the properties of the selected profile.
Associate a user Associate a user with the selected profile.
When the Users folder is selected
Icon Task Description
Add a user Add a user.
When a specific user is selected
Icon Task Description
Remove Remove the selected user.
Properties Display the properties of the selected user.
Associate a user pro-Associate a profile with the selected user.
file

Information available from the Contents pane


When the Profiles folder is selected.
Column Description
Name The name by which the user profile is known.
Description The user profile's description.
Role The user profile's role.

When the Users folder is selected.


Column Description
Account The name by which the user account is known.
Display name A combination of the user's First name and Last name.
Description The user's description.

- 1263 -
State State of the user account.
Title The user's title.
Profiles The name of any profiles associated with the user.
E-mail The user's e-mail address.
Mobile phone num- The user's mobile phone number.
ber

Rules and behavior of cut, copy and paste


The following table describes the rules and behavior when using cut and paste, or copy and paste, on con-
figuration objects in the User Accounts folder.
User
Beha-
accou-
vior
nts
Profile The
pasted
Profile
must
be
given a
unique
name.
Any
Users
that
were
asso-
ciated
with
the ori-
ginal
Profile
will
also be
asso-
ciated
with
the
new
one.
User The
pasted
User
must
be
given a
unique
name.
If a Pro-
file
was
asso-
ciated
with
the ori-

- 1264 -
ginal
User, it
will
also be
asso-
ciated
with
the
new
one.

- 1265 -
User Accounts Settings
The User Accounts settings are displayed from the Settings task when the User Accounts folder is selected in
the Application Explorer's configuration tree. Show picture

l Encrypt user accounts configuration file - Encrypt the User Accounts configuration file so that it cannot
be read with a text editor.
l Use the advanced security strategy - See the topic What is the Advanced Security Strategy for more
information.
l Number of login attempts - The number of login attempts before an account is locked. Range 1
to 10. Default 3.
l Enable networking-dependent profile association - Enable User Accounts to use different profiles
depending on which station the account is being used.
l Built-in user accounts directory
l Impose strong password - Force the use of a strong password. See the topic Choosing a Strong
Password for more information.
l 'Display name' property - Select the manner in which the Display Name is constructed from the
First Name and Last name properties.
l External user accounts directory
l Enable connection to the Microsoft Windows® directory - Enable the configuration of user
accounts using Windows User Group users. See the topic Using Windows Domain User Groups
for more information.
l Auto logon with current user - If activated, the current Windows user is automatically logged in
to C-CURE Building Management System at startup if it is allowed to (matching Windows user
groups/profile). If it is not, the login dialog box is displayed.
l Account properties update
l Display name - use the Full Name property from the external user account as C-CURE
Building Management System Display Name property.
l Description - Use the Description property from the external user account as C-CURE Build-
ing Management System Description property.
l Title - Use the Job title property from the external user account as C-CURE Building Man-
agement System Title property.
l Mobile phone number - Use the Telephone number property from the external user
account as C-CURE Building Management System Mobile phone number property.
l E-mail address - Use the Email address property from the external user account as C-
CURE Building Management System E-mail address property.
l Directory connection
l Domain name - Allow authentication of Users on a specific domain.
Defaults to empty to indicate that users should be authenticated against the domain to
which the computer belongs.
Set a value corresponding to a domain name if you need users to be authenticated against

- 1266 -
another specific domain.
l Domain controller name - For large networks the domain can have several controllers.
This setting allows the selection of a specific controller (normally the fastest). In some
projects, this can bring significant performance improvements.
Defaults to empty to indicate that the first available Domain Controller will be used.
Set a value corresponding to a Domain Controller name if you need the authentication fea-
ture to rely on a specific Domain Controller.
l Logon type - Depending on the security strategy of the domain, some logon types do not
work. Do not cache the credentials requires a weaker strategy than Cache the credentials.
Cache the credentials, when allowed by the domain, allows a User to logon to a computer,
if he had already done so in the past, even if the controller is not accessible (LOGON32_
LOGON_INTERACTIVE).
Do not cache credentials is intended for high performance servers to authenticate with
plaintext passwords and does not cache credentials (LOGON32_LOGON_NETWORK).
l Buffer size to retrieve information - The size of the buffer used to retrieve the con-
figuration of the domain controller (list of user groups...). When a large number of user
groups are declared in the domain controller, increasing the value of this property can
help to improve performance if the Domain Controller is set accordingly. Range 1 to 1000
- Defaults to 100.

If the Domain controller name is left empty, C-CURE Building Management System will use the first
accessible domain controller as evaluated by the local Windows host operating system.

- 1267 -
Configuring users

- 1268 -
How to Configure a User
1. Configuring a user
a. Select the Users folder in the Application Explorer configuration tree and, from the task list,
select Add a user. A dialog to configure a new user will open. Show picture

b. Enter a name for the user. The name is used when logging on using the User Account. The name
is limited to 20 characters.
c. Enter a description of the user. The description appears in the contents pane when the Users
folder is selected. The description is optional.
d. Enter the password and password confirmation. For information on choosing a password, see
the topic Choosing a strong password.
2. Entering optional user details.
a. Select the Details tab. The following properties, all of which are optional, are available.
b. First and last name. The first and last name are concatenated to form the read only property Dis-
play name.
c. Title - The User's title, for example Professor. The Title replaces the Role property, which was
part of the user's configuration prior to version 9.0. For compatibility with Windows domain user
groups, the Role property is now part of the Profile configuration.
d. E-mail address - The e-mail address can be used when sending a message using an event.
e. Mobile phone number - The mobile phone number can be used when sending a message using an
event.
3. Click Apply to create the user and leave the dialog open or OK to create the user and close the dialog.

Many of the properties from the Details tab are also available in System variables. The Display Name and
Title are also displayed in the dialog opened by the Security - User Information animation.

- 1269 -
Choosing a Strong Password
A strong password is one that is very difficult to guess. In C-CURE Building Management System, if you
select the option Impose strong password in the User Accounts Preferences, you must then enter a strong
password for all User Accounts.

What is a strong password?


C-CURE Building Management System uses the following criteria to determine if a strong password has been
configured.

l It must contain between 8 and 16 characters.


l It cannot contain the user name.
l It must contain at three of each of the following types of character.
l Lower case alphabetic.
l Upper case alphabetic.
l Numeric.
l Non-alphanumeric characters (you cannot use any Ctrl characters).

If you have not selected Impose strong password then you cannot use non-alphanumeric characters
in the password and the user name is not case sensitive.
If you have selected Impose strong password then you can use non-alphanumeric characters in the
password and the user name is case sensitive.
As you enter the password its strength is indicated by a colored bar. Show picture

- 1270 -
Configuring profiles

- 1271 -
What is a Profile?
A profile is a set of access rights selected from a number of categories. Each user that you create is
attached to a profile to determine the user's access rights. The combination of the user and profile is known
as a User Account. A profile may be attached to one or several users.
For networked applications, you can optionally attach more than one profile to each user. The profile that is
active depends on which station the user is logged in at.

Access right categories


The access rights for a profile are selected from the following categories each contained within its own tab in
the profile configuration dialog.

l Administration - Access to the configuration menus and operating system, password configuration,
user configuration rights.
l Programs - Selection of SCADA BASIC programs to run when a user logs on and/or off.
l Mimics - Selection of the window (mimic) that opens when a user logs in, Selection of menu windows
(mimics).
l Command - Selection of command level rights.
l Browsing - Selection of variable browsing rights.
l Alarm acknowledgement - Selection of acknowledgment rights by alarm level.
l Alarm masking - Selection of alarm masking rights.
l Alarm maintenance - Selection of alarm maintenance rights.
l Window - Selection of window level rights.
l Layer - Selection of display layer rights.
l Recipe - Selection of recipe rights.
l Web - Selection of options for when a user logs in from a Web browser including initial mimic, lan-
guage, alarm filter etc.
l Application Architect - User access (generation and access) to the Application Architect.
l Data analysis - User access (generation and configuration) to Data Export
l Advanced - Automatic logoff and password life span.

- 1272 -
How to Configure a Profile and an Important Warning
1. Configuring a profile.
a. Select the Profiles folder in the Application Explorer configuration tree and, from the task list,
select Add a profile. A dialog to configure a new profile will open. Show picture

b. Enter the name for the profile. Profile names are limited to 40 alphanumeric characters and are
not case sensitive.
c. Enter a description of the profile. The description appears in the contents pane when the Profiles
folder is selected. The description is optional.
d. Enter a role for the profile. The role is optional.
2. Selecting the profile access rights.
a. Use the other tabs of the Profile dialog to select the profile's access rights. See the Profile Prop-
erties book for a full description of all of the rights.
3. Click OK to create the profile and close the dialog.

Profile default settings


When you create a new profile, some access rights are enabled by default. This is done purposely to prevent
a User from accidentally locking themselves and/or other users completely out of C-CURE Building Man-
agement System. See warning below.

l Administration
l Profile rights
l Exit
l Desktop
l Development
l Diagnostic tasks
l Profiles and user management
l Change profile rights
l Administration
l Command, acknowledgment and masking
l Window and layers
l Recipe
l WebVue
l Application Architect
l Data analysis

Important WARNING
You must create at least one Profile/User that has either the following rights.

l Change profile rights - Administration


OR

- 1273 -
l Create profiles and Create profile associations

If you do not do this, you will have the situation where you cannot change the profile of a user, nor can you
create a new profile and associate it with a user. You will be permanently prevented from changing
anything associated with User Accounts.

- 1274 -
Profile properties according to usage

- 1275 -
Profile Properties that Affect Operating System and Development Access
Administration tab

l Cryptography - Allows the user to encrypt SCADA basic programs. (Also requires a special dongle.)
l Desktop - Allows the user access to the operating system.
l Development – Allows a user to display and use the development menu and toolbars and have access
to the operating system.
l Exit – Allows a user to shut down C-CURE Building Management System using the keyboard function
key F10.
l Help – Allows a user to display the on-line help.
l Preferences – Allows a user to display the Preferences menu.

The Desktop property was designed to deny user access to the operating system by disabling a num-
ber of system keyboard shortcuts (such as Alt+Tab...). However, due to security improvement on
recent versions of Windows (Vista onwards), it is no longer possible to fully deny access, and this
feature of C-CURE Building Management System is no longer effective.
It is recommended to follow the Microsoft guidelines to achieve the best possible level of control, by
customizing system settings and hardening Group policies.

Application architect tab


Access to the Application Architect.

l Instance rights - Create, modify and delete access for template instantiation plus the capability to
manage exceptions.
l Template rights - Create, modify and delete access for template configuration.
l Parameters rights - Create, modify and delete access for parameters configuration.

- 1276 -
Profile Properties that Affect Run-time Access
Administration tab

l Timetable: standard – Allow the user to change the standard week of a Scheduler timetable using the
Time table animation.
l Timetable: exceptions – Allow the user to change the exception periods of a Scheduler timetable using
the Timetable animation.
l Timetable: save – Allow the user to save changes made to a Scheduler timetable using the Timetable
animation.
l Zoom – Allow the user to zoom in and out of the mimics.
l Modify date and time – Allow the user the change the system date and time from the Logon (F2) dia-
log.
l Modify password – Allow the user the change his/her own password.

Command tab
The Command tab contains 30 properties called Level 0 to Level 29. When a variable is configured so that a
user may change it, it is given a command access level from 0 to 29. To change the value of the variable at
run time the user must have the corresponding command level.
The command levels are also used in the Run – program, Run – Macro and Run – Application animations.

Window tab
The Window tab controls a user's window access and printing rights.

l When each window is created, it is given an access level between 0 and 29 (default 0). To open a win-
dow a user must have the corresponding window access level.
l To be able to print a window using the Windows' print shortcut, Ctrl + P, a user must have the Printing
setting selected.

Layer tab
The Layer tab contains 16 properties called Layer 0 to Layer 15. These determine which of the mimic display
layers a user is able to see.

Alarm acknowledge tab


The Alarm acknowledge tab contains 30 properties called Level 0 to Level 29. When an alarm is defined it is
given an acknowledge level from 0 to 29. To acknowledge the alarm the user must have the corresponding
alarm acknowledge level.

Alarm masking tab


The Alarm masking tab contains 30 properties called Level 0 to Level 29. When an alarm is defined, it is
given a masking level from 0 to 29. To mask the alarm the user must have the corresponding alarm mask-
ing level.
The option Use acknowledgement level rights as masking level rights allows you to configure the masking
level rights so that they are the same as the acknowledgment level rights. This option is selected by default
for backwards compatibility.

Alarm maintenance tab


The Alarm masking tab contains 30 properties called Level 0 to Level 29. When an alarm is defined, it is
given a maintenance level from 0 to 29. To set an alarm to maintenance the user must have the cor-
responding alarm maintenance level.
The option Use acknowledgement level rights as maintenance level rights allows you to configure the main-
tenance level rights so that they are the same as the acknowledgment level rights. This option is selected by
default for backwards compatibility.

Recipe tab
The recipe rights determine the users' ability to create, modify and save recipes created using the recipe
system.

- 1277 -
l Manager – Allow the user to create recipes using the menu command Configure.Station.Recipe.
l Save – The user can modify and save a recipe using the Send Recipe animation.
l Creation – The user can change the number and label of an existing recipe using the Send Recipe anim-
ation, so creating a second recipe based on the first. The value of variables in the recipe may be
changed. The list of variables may not be changed.
l List modification – The user can change a recipe's list of variables and values using the Send Recipe
animation (prior to being sent), but NOT save it.
l Value modification – The user can change values for variables in a recipe using the Send Recipe anim-
ation (prior to being sent), but NOT save it.
l Real time – The user may recall the real-time values of the recipe variables, using the Send Recipe
animation.
l Access - Enable access to the recipe system in general. Without this selected the user has no access to
the recipe system at all and all other recipe rights are meaningless.
l Send – The user may send a recipe at run-time using the Send Recipe animation.
l Delete – The user may delete a recipe.

Data analysis tab


Access to the Data Export facility.

l Create - Allow the user to create new Data Exports.


l Modify - Allow the user to modify existing Data Exports.
l Delete - Allow the user to delete Data Exports.
l Execute manually - Allow the user to manually initiate a Data Export.

Access to Data Export in general is license-protected.

- 1278 -
Profile Properties that Affect Behavior When Logging On and Off
In the Advanced tab

l Enable automatic logoff - If enabled a user may be automatically logged off after the selected period
of inactivity. The period must be between 1 and 3600 seconds.
l Enable password lifetime - If enabled a user must change his password the next time they log in after
the selected lifetime. Lifetime is the period (in days) since the password was last changed.

In the Mimics tab

l Initial window - Selection of a window that opens automatically when a user logs in. The window may
also be opened using the substitution #U in a Link-Open animation.
l Menu - Selection of up to ten windows to provide user dependent window opening. When using the
Link-Open animation the substitution characters #M11 to #M20 are used instead of a window name.
The window that is opened is the matching one in the user's profile. If a label is supplied, and the Link-
Open animation is supported by a text drawing element, the label will be substituted for the text at run
time. Show picture

In the Programs tab


The Programs tab allows the selection of one program that will run when a user logs on and another that
runs when a user logs off. Both programs are optional. Any programs selected here must be pre-loaded
using another program or in the project start-up configuration.
For each program, you can select an optional function, branch and arguments. If you do not select a func-
tion, the Main function will run.

- 1279 -
Profile Properties That Affect Profile and User Management

You must create at least one Profile and User with the ability to change profile rights.

In the Administration tab

l Profile and user management


l Create and modify users – The user is allowed to create new users and modify existing users.
Existing profiles may be associated with users.
l Delete users and/or associations – The user is allowed to remove the association between a
user and profile and delete users.
l Create profile associations – On a multi-station system the user is allowed to associate a station
list with a profile attached to a user.
l Create and modify profiles – The user is allowed to create and modify profiles. The extent to
which the profile may be changed is controlled by the Access, Command and ack, Window and
layer access and Recipe properties.
l Delete profiles – The user is allowed to delete profiles.
l Change profile rights - The user is allowed to change the configuration of profiles. The tabs of
the Profile Configuration Dialog, to which the user has access, is configured using the following
properties.
l Administration – Administration, Programs and Mimics tabs.
l Command, acknowledgement and masking – Command, Acknowledgement and Masking
tabs.
l Window and layers access – Window access and Layer access tabs.
l Recipe – Recipe tab.
l Web – Web tab.
l Application Architect - Application Architect tab.
l Data analysis - Data analysis tab.

- 1280 -
Profile Properties that Affect Access by Third Party Applications
The properties in the Browsing tab control which variables a client application (including third party applic-
ations) can see when browsing variables exposed by C-CURE Building Management System. In order for an
application to access a variable, the user authenticated on the API of C-CURE Building Management System,
must have the corresponding browsing level right in its profile. Show picture.

At the time of writing, browsing level rights are applied by the following interfaces:

l OPC clients browsing or accessing OPC items corresponding to variables via C-CURE Building Man-
agement System’s OPC server when OPC-Security is enforced.
l Mobile apps: TouchVue and SnapVue.
l Third-party applications using the Web Services Toolkit interface.

In particular, it is a way to control what variables a user can browse when using Dream Report as either an
OPC client or a Web Services Toolkit client.
This feature is intended to encourage more secure practices. Interfaces used to access the variables
of C-CURE Building Management System are system boundaries, which it is advisable to secure.

- 1281 -
Properties That Affect Access to Web Apps and Web Services
The account for a user intending to use one of the Web app is configured in the same way as any other user
account. Specific privileges are defined in the Web tab of the Profile Properties dialog. They affect user
access to WebVue, Mobile Apps, the Web Services Toolkit, and all services relying on the Web back end.
Show picture

1. Set the ability to login via a Web App.


a. Enable access - You must tick the box so that users associated to this profile can log in via Web
Apps or the Web Services Toolkit.
2. Configure the first window to be opened.
a. First window - Mimic - You can select the name of the mimic that is to be displayed when a user
associated to this profile connects via WebVue. If you do not specify a window, then the one
selected on the Web back end configuration will be used.
b. Branch - Specifies the branch to be used.
3. Configure the languages to use.
a. Project language - For bilingual projects only. Specifies the language in which the localized texts
will be displayed to the user. This property affects WebVue mimics, but also any localized label
in Mobile apps and Web Services Toolkit. By default, the configuration is taken from the Web
back end properties.
4. Set the options specific to WebVue.
a. Allow Beep mode of MULTIMEDIA SCADA Basic verb - Enable use of the MULTIMEDIA mode of
the SCADA Basic instruction WEBVUE for the WebVue Client on which the user is logged in.
b. Beep on new alarm in alarm display - If this is ticked, WebVue will give an audible indication
each time there is an alarm transition to On - Not Acknowledged in an Alarm Viewer.
c. Only one session per user - If ticked, a user having this profile will be limited to one WebVue ses-
sion at a time. One will not be able to login in more than one web browser instances on a given
client device or from several devices at the same time.

- 1282 -
Associating a Profile with a User to Create a User Account
To complete the configuration of a User Account you must add a profile to a user. Once this is done, you are
able to log on to C-CURE Building Management System using the User Account.
For information about this process on networked applications, see the topic Using network dependent pro-
files.

How to add a profile to a user

1. Select the Users folder in the Application Explorer configuration tree and select the user to which the
profile is to be added.
2. From the task list, select Add a user profile. A dialog is displayed containing a list of available profiles.
Show picture

3. Select the profile using the drop-down list box and click OK.

To create a User Account you can also use the similar but opposite process, that is add a user to a
profile.

- 1283 -
Using the advanced security strategy

- 1284 -
What is the Advanced Security Strategy?
Enabling the advanced security strategy modifies the operation of the User Accounts mechanism in the fol-
lowing way.

l User profiles become hierarchical.


l Account names must be 6 characters or greater.
l The first time a User Account is used the password must be changed.
l The first time a User Account is used the account all properties, except the name, can be changed.
l User accounts can be de-activated.
l If a User Account is deleted a record of it remains in the user definition file.
l Information about a failed login attempt is available in two system variables.
l Failed login attempts generate an event, Attempted logon failure, that can be logged.
l On reaching the maximum number of failed login attempts configured in the User Accounts Settings
(default 3) a User Account is locked.
l All passwords used in a project, including any that have expired or were used in deleted accounts,
must be unique. An internal record is kept of the previous 1000 passwords to ensure this.

To enable advanced security strategy you must tick the property, Enable advanced security strategy in the
User Accounts settings

- 1285 -
Using Hierarchical Profiles

The following behavior is only exhibited when the advanced security strategy is enabled.

When using hierarchical profiles, a profile is allocated a profile level from 0 to 9 using the General tab. The
highest level profile is 0, the lowest 9. Show picture

The profile level determines the extent to which any user account using the profile is able to view and
modify other profiles and users.

l A User Account using a profile level of 0 can view, create or modify profiles and users of any level
(including 0).
l A User Account with a profile level of N can only view, create or modify profiles and users of level of N
+ 1 or greater.

- 1286 -
Logging in When Using a New User Account

The following behavior is only exhibited when the advanced security strategy is enabled.

When you login to a user account, either after it has been just created, unlocked following a failed login
attempt, or reactivated after a period of deactivation, you must change the password.

1. Open the Login dialog (F2) and enter the Account Name and Password. If it is a new or unlocked
account, the password will have been allocated by the administrator. If it is an account that has been
reactivated, it will be the password that was used before the account was deactivated. Click OK and
the Change Password dialog will be displayed.
2. Enter the current (old) password again and the new password. You must enter the new password in
both the New password and Confirm new fields.
3. Click OK to complete the login with the new password.

Show picture

- 1287 -
Deleting, Deactivating and Reactivating User Accounts
The following behavior is only exhibited when the advanced security strategy is enabled.
To be able to delete, activate or deactivate accounts a user must have the right Delete users and asso-
ciations, enabled on his/her profile.

How to delete a user account

1. Select the Users folder in the Application Explorer configuration tree.


2. Right click the account to be deleted and, from the pop-up menu, select Remove.
3. In the confirmation dialog, select Yes to confirm the deletion.

Even when deleted, a record of the User account remains and it is not possible create another user
account with the same name.

How to deactivate a user account

1. Select the Users folder in the Application Explorer configuration tree.


2. Right click the account to be deactivated and, from the pop-up menu, select Deactivate.

Deactivating an account temporarily removes it from the list of accounts that are available. A deactivated
account may be reactivated by an administrator with the appropriate rights.

How to reactivate a user account

1. Select the Users folder in the Application Explorer configuration tree.


2. Right click the account to be reactivated and, from the pop-up menu, select Activate.

The first time a User logs in using an account that has been reactivated the password must be changed.

User status in the Application Explorer


A user's status is indicated in the Application Explorer by changing its icon.
Icon Status
Normal
De-activated
Locked
Deleted

- 1288 -
Managing Failed Login Attempts

The following behavior is only exhibited when the advanced security strategy is enabled.

A failed login attempt is registered when a user attempts to login with any of the following errors.

l The user name is misspelt.


l The password is misspelt.
l The user account has been deleted.
l The user account is deactivated.

After the maximum number of failed login attempts configured in the User Account Settings (default 3) is
reached, the User Account is locked and can only be unlocked by a user with a superior profile level. Locked
accounts are indicated in the Application Explorer with a padlock symbol adjacent to the user name. If you
attempt to login using a locked account a dialog will be displayed requesting an administrator to unlock it. To
avoid the possibility of the system becoming completely inaccessible, a user with a profile level of 0 is never
locked.

How an administrator unlocks a locked user account


The following explanation assumes the user following the procedure has administration rights.

1. Display the Logon dialog (F2) and enter the locked user's name. Click the OK button. A dialog will
appear informing you that the account is locked and that an administrator is required to unlock it.
2. Click the Unlock button, select your name and enter your password. Click the Unlock button again. A
further dialog will appear displaying the locked user's properties.
3. Enter a new temporary password for the locked account in both the Password and Password veri-
fication fields. Click the OK button.
4. Click Cancel in the Login dialog to close it.

Show picture

A User Account that has been unlocked is treated the same as a new user account. That is, the first
time a user logs in he/she will have to first enter the temporary password allocated by the admin-
istrator, then enter and confirm a new password that only he/she will know.

System variables are available for tracing failed login attempts.

- 1289 -
Using Windows domain user groups

- 1290 -
Using Windows Domain User Groups
What is a Windows domain?
A Windows domain is a group of computers running Microsoft Windows that share a central directory data-
base. This central database, also known as Active Directory, contains the user accounts and security inform-
ation for the resources in that domain. Each person who uses computers within a domain receives their own
unique account, or user name. This account can then be assigned access to resources within the domain.

What is a user group?


A group is a collection of user accounts that can be managed as a single unit. Users that belong to a par-
ticular group are referred to as group members. Using groups can simplify administration by assigning a
common set of permissions and rights to many accounts at once, rather than assigning permissions and
rights to each account individually.

Using Windows user groups


Using C-CURE Building Management System's User Accounts configuration you allocate profiles to one or
more Windows user groups.
When a user logs on to C-CURE Building Management System, Windows authentication is called. If the user
name and password are valid, the name of the User Group is returned, which logs the user on and activates
the allocated profile. If the user name and password are not valid as Windows credentials, C-CURE Building
Management System checks if they match a valid account int the built-in directory.
If enabled in the User Accounts section of the General Operation Configuration, the Windows user's Full
Name and Description are available as Display Name and Description properties respectively.

Advantages of using Windows user groups

l Centralized management of users for multi-station applications.


l Uses the secure Windows environment to manage users.
l Windows Domain administrators can add, remove or modify user accounts without changing the con-
figuration of C-CURE Building Management System.

When using Active Directory integration, Windows Domain users can use the following syntaxes in the login
dialog box:

l Account name: UserName


l Down-Level Logon Name: DomainName\UserName where DomainName is the NetBIOS domain name
l User Principal Name (UPN): UserName@Domain.local where Domain.local is the domain name

When using the down-level logon name or user principal name, the setting Domain name is not considered.

- 1291 -
Associating a Profile with a Windows Domain User Group
To enable the use of Windows domain user groups within C-CURE Building Management System you must
first activate the option Enable connection to the Microsoft Windows directory in the User Accounts settings.

Checking the existence of a Windows user


You can check the existence of a Windows user using the Check Windows users task.

1. Select the User accounts node in the Application Explorer and, from the task list select Check Windows
user.
2. Enter the Windows user name and click the Check button. If you have entered a valid user name, the
Windows user group name is displayed. If a profile has been allocated to the user group its name is
also displayed. Show picture

Associating a profile with a Windows domain user group

1. Expand the configuration tree of the Application Explorer and select a profile.
2. From the task list, select Add a Windows user group. A dialog box opens and allows you to retrieve a
filtered list of Windows user groups. Enter any relevant filter and click the search button to display a
list of the Windows user groups. Show picture

3. Tick the user group to which the profile is to be allocated.


4. If you have enabled Network dependent profile association, select the station list or all stations.
5. Click the OK button to confirm the configuration.

To make it easier to find the relevant group(s), the Associate Windows Groups dialog provides the following
filtering capabilities:

- 1292 -
l Clicking the first button shows or hides groups already associated to one or more profile,
l The Location field allows filtering based on a domain name, in which case the Domain name and
Domain controller name settings are ignored for the search process. It can also be used to filter based
on station names. The character '.' can be used to designate the local station.
l The list-box Station is relevant when the setting Network-dependent profile association is enabled and
allows filtering based on the station to which the selected profile applies.

You can associate the same profile with one or more Windows user groups.

- 1293 -
User Account System Variables
Several system variables are provided that contain information about the current User. These variables can
be used in the HMI in the same way as any other.
The Auto column indicates if the variable is automatically created by C-CURE Building Management
System or must be manually created by the developer as part of the application development.

Name Type Auto Information provided


USER Text Auto The account name of the User on the local sta-
tion.

In the following variable names, for networked applications, <StationName> is substituted with the Sta-
tion's name.
The x in USERx references the main or secondary User.

l 1 is the main user. That is the user that has logged on in the normal way.
l 2 is the secondary user. That is the User that has provided the signature when a security animation
requiring a double signature has been used, or a signature has been provided to unlock a User.

Name Type Auto Information provided


SYSTEM.<StationName>.USER Text Auto The account name of the user on
station <StationName>.
SYSTEM.<StationName>.PROFILE Text Auto The name of the profile for the
user on station <StationName>.
SYSTEM.<StationName>.USER.NUMLOCKED Register Auto The number of locked user
accounts.
SYSTEM.<StationName>.USER.TRYLOGIN Text Auto The text that was entered in the
name field of the failed login
attempt. Only operational if the
advanced security strategy is
enabled.
SYSTEM.<StationName>.USER.REJECTED Bit Auto Set to 1 when there is a failed
login attempt. Only operational if
the advanced security strategy is
enabled.
SYSTEM.<StationName>.USERx.COMMENT Text Manual The comment field from the con-
figuration of the user on station
<StationName>.
SYSTEM.<StationName>.USERx.DISPLAYNAME Text Auto Equivalent to the Windows user
property when logged on using a
Windows domain user.
SYSTEM.<StationName>.USERx.EMAILADDRESS Text Auto The email address of the user on
station <StationName>.
SYSTEM.<StationName>.USERx.FIRSTNAME Text Manual The first name field from the con-
figuration of the user on station
<StationName>.
SYSTEM.<StationName>.USERx.LASTNAME Text Manual The last name field from the con-
figuration of the user on station
<StationName>.
SYSTEM.<StationName>.USERx.FULLACCOUNTNAME Text Auto The full account name of the user
on station <StationName>.
SYSTEM.<StationName>.USERx.LOGIN Text Manual The account name of the user on
station <StationName>. Equi-
valent to SYSTEM.<Sta-
tionName>.USER

- 1294 -
SYSTEM.<StationName>.USERx.MOBILEPHONENUMBER Text Auto The mobile phone number of the
user on station <StationName>.
SYSTEM.<StationName>.USERx.PROFILE Text Manual The profile field from the con-
figuration of the user on station
<StationName>. Equivalent to
SYSTEM.<StationName>.PROFILE
SYSTEM.<StationName>.USERx.TITLE Text Auto Equivalent to the Windows user
property when logged on using a
Windows domain user.
SYSTEM.<StationName>.USERx.ROLE Text Auto Equivalent to the Windows user
property when logged on using a
Windows domain user.
SYSTEM.LOCALHOST.USERx.COMMENT Text Auto The comment field from the con-
figuration of the User on the local
station.
SYSTEM.LOCALHOST.USERx.DISPLAYNAME Text Auto Equivalent to the Windows user
property when logged on using a
Windows domain user.
SYSTEM.LOCALHOST.USERx.EMAILADDRESS Text Auto The email address of the user on
the local station.
SYSTEM.LOCALHOST.USERx.FIRSTNAME Text Auto The first name field from the con-
figuration of the user on the local
station.
SYSTEM.LOCALHOST.USERx.LASTNAME Text Auto The last name field from the con-
figuration of the user on the local
station.
SYSTEM.LOCALHOST.USERx.FULLACCOUNTNAME Text Auto The full account name of the user
on the local station.
SYSTEM.LOCALHOST.USERx.LOGIN Text Auto The account name of the user on
the local station.
SYSTEM.LOCALHOST.USERx.MOBILEPHONENUMBER Text Auto The mobile phone number of the
user on the local station.
SYSTEM.LOCALHOST.USERx.PROFILE Text Auto The profile field from the con-
figuration of the user on the local
station.
SYSTEM.LOCALHOST.USERx.TITLE Text Auto Equivalent to the Windows user
property when logged on using a
Windows domain user.
SYSTEM.LOCALHOST.USERx.ROLE Text Auto Equivalent to the Windows user
property when logged on using a
Windows domain user.

- 1295 -
Using Network-dependent Profiles
On networked (multi-station) projects, you can configure user accounts so that the profile that is active
when the user logs on, is dependent on which station he/she is using. To do this you attach more than one
profile to each user. Each profile is associated with a station list that determines on which stations it is act-
ive. (Station lists are created when defining the station network communication.) The user will not be avail-
able on any station that is not in at least one of the station lists as there will be no active profile for that
station.Show picture

Enabling network dependent profiles


To use network dependent profiles you must first tick the option Enable network dependent profile asso-
ciation in the User Accounts settings.

How to add a profile and station list to a user

1. Select the Users folder in the Application Explorer configuration tree and select the user to which the
profile is to be added.
2. From the task list, select Add a user profile. A pop-up dialog is displayed containing a list of available
profiles
3. Select the profile using the drop-down list box.
4. Select the station list using the drop-down list box and click OK.

Distributing the user accounts configuration File


The user accounts are not automatically distributed on a multi-station system. To distribute the user
accounts you must first shutdown C-CURE Building Management System on all stations and then copy the file
User.dat (from the project's C directory) to all the stations in the project.
Alternatively, you can use a small SCADA Basic program to distribute the file.
Show example
DIM fbuf1 as long; 'handle of the buffer returned by FSTAT
DIM user1 as str; 'location of the file user.dat
DIM date as STR; 'Modification date of the file

CONST TAILLE = 0; 'offset for the file size


CONST MODIF = 4; 'offset for the file date
CONST ALLOC = 64; '22 is the minimum buffer size

sub main()
user1= "..\\CTEMP\\user.dat";
fbuf1 = ALLOC_BUFFER (ALLOC);
FSTAT(user1,fbuf1);
date = CGET_BUFFER(fbuf1,MODIF,20);
CYCLIC("ADDPROG",5,"DIFFUSION","","lastmodif");
end sub

sub lastmodif()
dim date_modif as STR;
FSTAT(user1,fbuf1);
date_modif = CGET_BUFFER(fbuf1,MODIF,20);
IF (CMPSTRING(date,date_modif) <> 0) THEN
diff();
END IF
date = date_modif;
end sub

- 1296 -
sub diff()
'This function has to be completed by launching a batch file to copy user.dat file to other st
print("Distribution of user.dat on all stations (directory C and CTEMP)");
end sub

- 1297 -
Using Automatic Logoff
Automatic logoff automatically logs off the user after a period of inactivity. Inactivity is defined as the time
since the last use of any user input device (normally the keyboard and/or mouse).
Automatic logoff can be tuned based on 2 settings.

l In the HMI Options dialog box. This enables or disable the automatic logoff for the entire project. By
default, it is enabled. You can also enter the period for which the warning dialog is displayed. By
default, this is set to zero. Show picture

l In each user profile, you can enable/disable the automatic logoff and the max inactivity period on a
per profile basis. See the topic Profile Properties that Affect Behavior When Logging On and Off.

How the automatic logoff works


Automatic logoff takes place in two stages.

l After a period of inactivity equal to that specified in the User's profile the Automatic logoff dialog is dis-
played. Show picture

l The Automatic logoff dialog initially displays the number of seconds that was entered in the HMI
Options dialog. The seconds count down to zero at which point the User is logged off and the dialog
closes.

Any activity will reset both timers and close the Automatic logoff dialog (if open) and the process starts
again.
If the default period of zero is used (in the HMI Options dialog), no warning dialog is displayed
before the User is logged off.
Automatic logoff is supported in WebVue, but no warning box will be displayed to the inactive user.

- 1298 -
Data analysis (Data export)

- 1299 -
Data Export Overview
Data Export allows you to configure and generate export of C-CURE Building Management System's his-
torical data.

Summary of main capabilities

l Export of Trend and/or Log data in Microsoft Excel 2010 workbook (.xlsx) o .csv files.
l Ability to extract data stored in Proprietary and HDS archive units.
l Ability to export raw data, sampled data, statistics and aggregated statistics.
l For the Excel output.
l Excel not required on the host station.
l Each configured data export generates its own file.
l Each export creates one workbook with one or more worksheets each containing either Trend or
Log data.
l Additional worksheets generated if the optional statistics and/or aggregated statistics are
enabled.
l Option to use Excel workbook Templates to format the output.
l For the Csv output.
l Each export can optionally generates a sub-folder within the chosen output path. Each con-
figured Log Page or Trend Page generates a corresponding file within that sub-folder.
l Additional files generated if the optional statistics and/or aggregated statistics are enabled.
l Fixed or variable export period.
l Fixed - selectable from current or previous, hour, day, week, month or year.
l Variable - by program or by variable (Time and date value in register).
l Export can be executed on-demand (manually by a user) or automatically as a background task (pro-
grammatically by SCADA Basic), on event, cyclically or according to a schedule.
l Generation and configuration possible with run-time licenses.
l Can be used to export data from Proprietary and HDS archive units.
l User access managed by C-CURE Building Management System's User Accounts system.

Licensing
The Data Export module is licensed. If the Data Export is not license-enabled, it operates as if in trial mode.

Limitations
The following are the maximum limits for Data Export.

l Number of exports that can be configured - 100.


l Number of log pages per export - 10.
l Number of trend pages per export - 10.
l Number of trends per trend page - 100.

Operation in demonstration mode


The following operational restrictions apply when using Data Export in demonstration mode.

l Configuration is fully functional.


l Manual export is functional but restricted.
l The output data values generated by an export is randomized.
l The word "Demo" appears in the output, appended to the variable names and descriptions.
l Automatic mode (using SCADA Basic) is disabled and attempts to use it will only produce a message in
the Event Log.

- 1300 -
Managing Data Export in the Application Explorer

Tasks applicable to Data Export


When the Data Exports folder is selected.
Icon Task Description
Setting Display the Data Export Settings dialog.
Add export Add a data export.
When a data export is selected.
Icon Task Description
Add a log page Add a log page to the selected data export.
Add a trend page Add a trend page to the selected data export.
Generate full export Manually generate a full export for the selected data export (e.g. all pages at
once).
Properties Open the Properties dialog for the selected data export.
Remove Remove the selected data export.
Copy Copy the selected data export. The copied data export is then available to be
pasted when the Data Exports folder is selected.
Cut Cut the selected data export. The cut data export is then available to be pasted
when the Data Exports folder is selected.
When a trend page is selected.
Icon Task Description
Add trend Add a trended variable to the selected trend page.
Properties Open the Properties dialog for the selected trend page.
Remove Remove the selected trend page.
Generate trend page Generate the selected trend page.
When a trend item associated to a page is selected.
Icon Task Description
Add trend Add a trended variable to the selected trend page.
Move up Move the selected variable's position up in the trend list.
Move down Move the selected variable's position down in the trend list.
Remove Remove the selected variable from the trend page.
Properties Open the Properties dialog for the selected trend variable.
When a log page is selected.
Icon Task Description
<Log list name> Add a log list filter to the selected log page.
Because only one log list filter can be associated to a given log page, these
tasks are not displayed once a log list filter has been added.
Properties Open the Properties dialog for the selected log page.
Remove Remove the selected log page.
Generate log page Generate the selected log page.
When the log list filter associated to a page is selected.
Icon Task Description
Properties Open the Properties dialog for the selected log list filter.
Remove Remove the selected log list filter.

- 1301 -
Rules and behavior of cut, copy and paste
You can cut, copy and paste data exports. The pasted data export must have a unique name. The pasted
data export will contain the same pages as the source.

- 1302 -
Data Export Settings
The Data Export settings are displayed from the Settings task when the Data Exports folder is selected in the
Application Explorer's configuration tree. Show picture

l Data Export wizard - Settings specific to the Data Export wizard.


l Working folder - The folder in which output from the wizard is saved. This is displayed, but can-
not be changed, in the wizard.
l Max number of raw data - The maximum number of raw data values. See explanation below.
l Max number of generated data - The maximum number of generated data values. See explan-
ation below.
l General - General setting for Data Export.
l Default export folder - The default folder in which all the files generated by the export process
are saved. See Configuring Alternative Folders below. The export folder can be overridden when
configuring a data export item.
l Default template folder - The default folder in which any Excel workbook templates, specified in
the data export configuration, are located. See Configuring Alternative Folders below. The tem-
plate folder can be overridden when configuring a data export item.
l Characters for insignificant data - The characters that will be generated for a variable's value if
its quality is NS.
l Characters for unknown data - The characters that will be generated for a variable's value if the
data is unknown.
l Enable traces for ad hoc export generation - Enable export trace for when a user, without export
rights, runs an export using either the SCADA Basic instruction Export, or the Data Export Wiz-
ard.
l Max number of raw data - The maximum number of raw data values. See explanation below.
l Max number of generated data - The maximum number of generated data values. See explan-
ation below.

The operation of Data Export is also affected by the setting First day of week and First week of year
in the Languages.Settings section in the main Application Explorer Settings dialog.

Configuring alternative folders


The default folders used by Data export are:

l USR\<project>\DataExports
l USR\<project>\DataExportTemplates

where <project> is the name of the project. You can specify alternative folders using either an absolute or
relative path (to the default folder as defined in the settings).
Examples of absolute path Examples of relative path
C:\MyExportFolder MyExportFolder
\\MyExportFolder .\MyExporFolder
..\MyExportFolder

How the max count properties are used

- 1303 -
The max count properties are used to limit the size of the output file by limiting either the number of input
values (raw data) and/or the number of generated output values. If the limit is reached the output is still pro-
duced but with limited data. The limits are as follows.

l Raw data - 0 (unlimited) to 300000. The default is 60000.


l Generated data - 0 (unlimited) to 60000. The default is 12000.

Max count for Raw data Sample data Statistics Aggregate


Used for Trend Used for Trend
Raw data Not used Used
page only page only
Used for Trend Used for Trend
Generated data Used Not used
page only page only

- 1304 -
Data Export and User Accounts
Access to Data Export, both configuration and generation, is controlled by the rights in a User's profile.
Show picture Unlike most of C-CURE Building Management System's configuration, the Data Export con-
figuration dialogs are available with a run-time license if the User has the correct Data Export rights. For
more information see the book on User Accounts.

- 1305 -
Understanding the Period Used by Data Export
By time period, we mean the interval, defined by start and end times, for which historical data is
extracted and exported when a Data Export is triggered.
The time period used by a particular Data Export is defined when the export is configured and, optionally,
when it is triggered. If you define a period when a Data Export is triggered, the period as defined in the con-
figuration will be ignored for that particular generation.
The period is configured using one of three methods. Show picture

By period
Configure a Data Export to use a set period. A period is defined by using a quantity and type of time units.
The time units you can select are as follows.

l Minutes
l Hours
l Days
l Weeks - See note below about the first day of the week.
l Months
l Years

For example, you could select 2 hours, or 4 weeks, or 1 year etc.


The period is relative to the Reference timestamp, and can either be the Completed period or the Current
period.

l Completed period - The period is the time unit previous to the reference timestamp. For example, if
you selected 24 hours and the reference timestamp was 22/05/2013 16:08:00, the completed period
would be 21/05/2013 16:00:00 to 22/05/2013 16:00:00 (actually 22/05/2013 15:59:59.999). The
incomplete 1 hour time period corresponding to the reference timestamp (from 16:00:00 to 17:00:00)
is not included in the 24 hours time period that is requested.
l Current period - The period is the time unit that includes the reference timestamp. For example, if you
selected 24 hours and the reference timestamp was 22/05/2013 16:08:00, the request would display
data for the period from 21/05/2013 17:00:00 to 22/05/2013 16:08:00. The current 1 hour time period
corresponding to the reference timestamp (from 16:00:00 to 17:00:00) is included in the 24 hours
time period asked for.

Requesting data for 1 day does not yield the same result as requesting data for 24 hours as the time unit is
not the same. The same example with a request for 2 days would behave as follows.

l Completed period - If you selected 2 days and the reference timestamp was 22/05/2013 16:08:00, the
request would display data for the period from 20/05/2013 00:00:00 to 21/05/2013 24:00:00 (actually
21/05/2013 23:59:59.999). That is the last completed 2 days period. The incomplete day and time
period corresponding to the reference timestamp (22/05/2013) is not included in the time period

- 1306 -
requested.
l Current period - If you selected 2 days and the reference timestamp was 22/05/2013 16:08:00, the
request would display data for the period from 21/05/2013 00:00:00 to 22/05/2013 16:08:00. The cur-
rent day and time period corresponding to the reference timestamp (22/05/2013) is included in the
time period requested.
l This time period definition is very versatile when requiring sliding time windows.

By default the reference time is set to the current time when the export starts. You can change this by select-
ing the option Use reference timestamp and manually entering the reference time. Of course if you use the
default current time, and Current period, you only get exported data from the start of the period to the cur-
rent time. Being able to manually override the reference timestamp is handy if one needs to re-execute an
export based on a sliding time window (current or completed period), it permits re-doing the export “as if”
the time the export starts was in the past. It can be very helpful to recover from situations where an auto-
matic export have failed (export at night or on week-ends…): Instead of missing one of your export you can
manually execute it later and override the reference timestamp.
If you use the default current time, and Current period, you only get exported data from the start of
the period to the current time. The effective period length will depend on the exact time of the trig-
ger. But it allows you to have an export over a long time period (a monthly report for instance), and
get it updated on a shorter time period (daily update for instance) – To achieve so you can configure
the export for the current 1 month, and execute it every day.

The first day of the week is configured by the property First day of week in the Languages.Settings
section in the main Application Explorer Settings dialog.

By date / time picker


Use specific start and end times. You can only use this option at trigger time (not in the Data Export con-
figuration as it would mean to hardcode specific times).). You can enter the date by typing it in, or by using
a calendar opened from the tool adjacent to the date field.

By variable
User start and end times defined by two register variables. The time must be in the format produced by the
SCADA Basic instruction DATETIMEVALUE. The format of DATETIMEVALUE is the number of milliseconds
since 01/01/1970 and is of type DOUBLE. The variable's default maximum value of 65535 must be changed
to accommodate this (suggested 9999999999999).

- 1307 -
Configuring Data Export

- 1308 -
How to Add and Configure a Data Export
1. Open the Application Explorer and expand the configuration tree to select the Data Analysis.
2. Select the Data Exports folder and, from the task list, select Add export. The Export configuration dia-
log opens. Show picture

3. Configure the export.


a. Enter the Name for the export. The name is the unique identifier of the export within C-CURE
Building Management System and can also be used in the expression used to generate the work-
book or folder name.
b. Enter the optional Description.
c. Select or enter the name of the optional Status variable. The status variable provides an indic-
ation of the current status of an export. See the topic Export status codes.
d. Select the export File Type from either Excel or Csv.
4. If you chose Excel:
a. Select the Excel tab. Show picture

b. Enter the Workbook name. The name can either be a string, an expression (see the topic Using
expressions in the folder, workbook or template names) or a variable (see below).
c. The file extension is .xlsx by default. You can change this using the Workbook Extension field.
d. If you are using a workbook template enter its name in the Workbook Template field. The name
can either be a string, an expression (see the topic Using expressions in the folder, workbook or
template names) or a variable (see below).

- 1309 -
5. If you chose Csv:
a. Select the Csv tab. Show picture

b. Enter the Folder name. The name can either be a string, an expression (see the topic Using
expressions in the folder, workbook or template names) or a variable (see below). The folder is
relative to the Default exports directory and can be used as a container for all Csv files that will
be created from a given data export.
c. The character used to separate fields in the output file is a comma by default. This can be
changed using the Delimiter field.
d. The file extension is .csv by default. You can change this using the File Extension field.
6. Click Apply to create the export configuration or OK to create the export configuration and close the
dialog if you do not intend to change any of the advanced properties.
7. Select the advanced properties. See the topic Data export advanced properties.
8. Add trend and/or log pages. See the topics How to add a trend page and How to add a log page.

The Workbook and Workbook Template support the following file extensions, xlsx (workbook), xlsm
(macro-enabled workbook), xltx (template), xltm (macro-enabled template).

Using a variable for the folder, workbook or template name


You can use a text variable to provide the folder, workbook or template name. The variable's name, pre-
ceded by an @ character, is entered in the corresponding field. The variable's value can provide either a rel-
ative or an absolute path and can include an expression.
Examples of absolute path Examples of relative path
C:\Directory\MyExport.xlsx MyExportFolder\MyExport.xlsx
=Export.Name+"\\MyTemplate.xltx"

- 1310 -
Data Export Advanced Properties
The Data Export Advanced tab contains properties that, for most applications, will not need to be changed
from the default. Show picture

l If output exists - The following properties determine what happens if, on generation, the output
already exists. The exact behavior depends on the output type.
l Excel
l Merge - The export, consisting of one or more worksheets, is merged with the existing
workbook.
l Any worksheets with a different name to those already in the workbook are added
to the workbook.
l For any worksheets that already exist the behavior depends on the configuration of
the trend or log page. See the topics Trend Page Advanced Properties and Log Page
Advanced Properties.
l Overwrite - The original workbook is deleted and a new workbook created.
l Make numbered copy - A new workbook is generated with the name taking the format of a
numbered copy. This is the default option.
l Cancel generation - Generation is canceled if the workbook already exists.
l Csv
l Merge - The export, consisting of one or more Csv files, is added to the existing folder.
l Any files with a different name to those already in the folder are added to the folder.
l For any files that already exist the behavior depends on the configuration of the
trend or log page. See the topics Trend Page Advanced Properties and Log Page
Advanced Properties.
l Overwrite - The original folder and files are deleted and a new folder and files are cre-
ated.
l Make numbered copy - A new folder will be created with the name taking the format of a
numbered copy. This is the default option.
l Cancel generation - Generation is canceled if the folder already exists.
l Selected language - Select which of the two language configurations is to be used for any bilingual
strings in the export. For example, a variable's description.
l Export folder - The folder in which all the exported files will be generated. The default folder is defined
in the Data Export settings.
l Template folder - The folder in which any Excel workbook templates are located. The default folder is
defined in the Data Export settings.
l Networking - Manage the generation of exports when using a networked architecture. Select the list
containing the names of the historical servers on which the export is to be executed. This list can con-
tain stations which only produce the Data Export and which are clients regarding the historical data. In
the case of an Association, if a Data Export is triggered, only the active producer stations will actually
complete the generation.

- 1311 -
Using Expressions in the Folder, Workbook, Template or Sheet Names
When entering an expression for either a folder, workbook, template or page name you can either type in
the expression directly or use the Expression Editor dialog. The Expression Editor dialog is displayed by click-
ing the down arrow button adjacent to the right of the field. Use of the Expression Editor dialog is recom-
mended as it includes keyword auto-completion that helps to prevent errors.
The same Expression Editor dialog is used for several aspects of C-CURE Building Management Sys-
tem's configuration. Each of the properties available are only applicable to certain aspects of con-
figuration. For this particular configuration, only those listed below are applicable.

Expression syntax
An expression always starts with the equality operator (=) and will contain at least one or more of the fol-
lowing elements.

l String value - A string delimited by quotation marks. For example ".xlsx".


l String operator - Concatenation (+), equivalent to numeric operator addition.
l A property of a configuration element - The syntax is Item.Property. For example Export.Name.

Using the Expression Editor dialog


The expression editor dialog includes keyword auto-completion.
Pressing the Ctrl+Spacebar keys simultaneously displays a pop-up window containing a list of keywords. If
you type one or more characters on a line before using Ctrl+ Spacebar, the list will automatically scroll to
first relevant keyword. The required keyword is selected using either the Enter or Tab keys, or by clicking
with the mouse.
On typing a full stop, the editor checks the preceding text. If the text is identified as a keyword, the Property
pop-up opens displaying a list of properties for that keyword. The required property is selected using either
the Enter or Tab keys or by clicking with the mouse. Show picture

Property and keywords useable with Data Export


Property Description
Name The Name of the export or page.
FileName The name of the export output (Excel workbook filename or Csv container folder)
Day The day as a number from 1 to 31.
DayName The day as a string.
Week The week as a number from 1 to 53.
Month The month as a number from 1 to 12.
MonthName The month as a string.
Year The year.
Hours The hours.
Minutes The minutes.

Values for the following properties are localized according to the language selected for the export :
DayName, MonthName. Time & Date properties are resolved based on the local time of the com-
puter generating the output. Time & Date properties on the Export item are those of the Reference
timestamp. Time & Date properties on the Page item are those of the 1st page even if for a given
generation more than one page may be exported.

- 1312 -
Keywords Usable properties
Name, FileName, Day, DayName, Week, Month, MonthName, Year, Hours &
Export
Minutes
Export.StartDate Day, DayName, Week, Month, MonthName, Year, Hours & Minutes
Export.EndDate Day, DayName, Week, Month, MonthName, Year, Hours & Minutes
Page Name
Page.DataSheet Name
Page.StatisticsSheet Name
Page.AggregateSheet Name
Page.StartDate Day, DayName, Week, Month, MonthName, Year, Hours & Minutes
Page.EndDate Day, DayName, Week, Month, MonthName, Year, Hours & Minutes

Variable names can also be used in expressions. During the generation, and as part of the expres-
sion evaluation, they will be replaced by the current values of the corresponding variables.

Expression examples
Expression Example output
="MyExport.xlsx" MyExport.xlsx
=Page.Name Trend01
=Export.Name+".xlsx" Export01.xlsx
DailyReport 22-05-
="DailyReport "+Export.Day+"-"+Export.Month+"-"+Export.Year+".xlsx"
2013.xlsx

- 1313 -
Data Export Traces
The Traces tab enables trace messages associated with Data Export. Enabling a trace generates a cor-
responding message, which is logged in the Trace Files and displayed in the Event Viewer dialog (F7) when
the condition occurs. The following screenshot was taken with the default configuration. Show picture

l Trace 1: General - Basic events. Example: Generation started


l Trace 2: Configuration loading - Loading of the main export configuration. Example: Number of trend
pages in export is 1
l Trace 3: Expression resolution - Messages related to the resolution of any expressions used in the con-
figuration properties. Example: Expression successfully resolved 'Export.Name'='Export01'
l Trace 4: Historical communication - Communication with the historical server. Example: Send get
trend to histo about TrendPage01.Unit01.Register01...'
l Trace 5: Generation steps - Messages related to progress through the generation process. Example: 1
trend page found to export

- 1314 -
Adding pages to a Data Export

- 1315 -
Adding a trend page

- 1316 -
How to Add a Trend Page
Each Trend Page can include data from one or more trended variables. A single Trend Page can generate up
to three outputs.

l Data output - Basic table of raw values (extracted as archived), or sampled data, at the configuring
sampling rate for the selected variable(s).
l Statistics output - Value statistics for the selected variable(s).
l Aggregated statistics output - Aggregated value statistics per sub-period for the selected variable(s).

1. Open the Application Explorer and expand the configuration tree to select a previously configured Data
Export.
2. From the task list, select Add a trend page. The Trend Page Creation dialog opens. The following
screen-shot shows the default configuration. Show picture

3. Configure the main properties.


a. Enter the Name for the trend page. The name is the unique identifier of the trend page within C-
CURE Building Management System and can also be used in the expression used to generate the
output name.
b. Enter the optional Description.
c. Select which outputs are to be generated by ticking the Export data, Export statistics and Export
aggregated statistics properties as required.
d. Enter the Output name. This property is used to generate the sheet name when using an Excel
output or the file name when using a Csv output. It can either be an expression or plain text.
See the topic Using expressions in the folder, workbook, template or sheet names. Note that the
name for the statistics output is configured in the Statistics tab.
e. Select the Data mode from either Sample, Sample with synchronization or Raw.
f. Click Apply to create the trend page.
4. Select the Period tab to configure the default period. The properties in the Period tab are only used if
you generate the export using SCADA Basic and do not specify the period in the EXPORT instruction.
See the topic Understanding the time period used by Data Export for information about how the period
properties are used.
5. Select the Sampling tab and configure the sampling properties. See the topic Configuring the trend
sampling. The Sampling tab does not appear if Raw data mode is selected.
6. If you have chosen to generate either of the statistics outputs, select the corresponding tabs to con-
figure what will be generated. See the topic Configuring trend statistics.
7. Click the OK button to close the dialog. The final configuration step is to add variables to the trend
page. See the topic How to add variables to a trend page.

- 1317 -
Configuring the Trend Sampling
The Data Mode property in the Properties tab of the Trend Page Configuration dialog configures the mech-
anism used to populate the output with values extracted from the variable's trend recorded data. There are
two basic methods.

l Raw - Populates the output only with those values and timestamps that are actually recorded in the
Archive Unit. As C-CURE Building Management System records data only when it changes this means
the export will produce an output with a variable number of rows depending on how frequently the raw
value was changing at the time of recording. There are limitations when using raw data mode.
l You can only add a single variable to the trend page.
l Aggregated statistics cannot be generated.
l Sample - Populates the output with values at the configured sample rate. The export will always pro-
duce the same number of values (for a given period). The value for each sample is generated using
the most recent older recorded value. The sampling rate is set as a quantity of units where the units
can be Milliseconds, Seconds, Minutes, Hours, Days, Weeks, Months or Years. When choosing the
sample rate, remember to take into account the export period to produce an output with a sensible

number of values. Show picture


There is a variation of sampling called Sampling With Synchro - see explanation below.

Understanding the Sampling With Synchro data mode


The Sampling with synchro mode allow you to configure exactly when each sample is taken.
Sampling rate Time properties Sample method
Minute Second Every Sampling rate minutes on the specified second. Example -
every 5 minutes at 30 seconds past the minute.
Hour Minutes and seconds Every Sampling rate hours on the specified minute and second.
Example - every (1) hour at 59 minutes and 59 seconds past the
hour.
Day Hours, minutes and Every Sampling rate days on the specified hour, minute and
seconds second. Example - every (1) day at 0 hours, 0 minutes and 30
seconds past midnight.
Week Days, hours, minutes Every Sampling rate weeks on the specified day, hour, minute and
and seconds second. (Day = 1 to 7) Example - every 4 weeks at 1 day, 0 hours,
0 minutes and 0 seconds after the start of the week.
Month Days, hours, minutes Every Sampling rate months on the specified day, hour, minute and
and seconds second. (Day = 1 to 31) Example - every 1 month at 1 days, 23
hours, 59 minutes and 59 seconds after the start of the month.
Year None Sample with synchronization year-based behaves as the sample
without synchronization, e.g. it exports one sample corresponding
to January 1st at 00:00:00.

- 1318 -
Configuring the Trend Statistics and Aggregated Trend Statistics Output
Statistics output
The Statistics output provides statistical information using the raw values of the trend data. You choose
which statistics are generated using the Statistics tab. The following are available. Show picture

Statistic Description
First value The first (oldest) value of the period.
Last value The last (newest) value of the period.
Minimum The minimum (lowest) value of the period.
Maximum The maximum (highest) value of the period.
Average The average value of the period.
The weighted average for the period. (For example, if a variable has a value
Weighted average of 1 for one minute, and then a value of 0 for a half minute, the average
would be 0.5 and weighted average be 0.75.)
Sum The total of all values in the period.
Standard deviation The standard deviation of the values in the period. Standard deviation shows
how much variation exists from the average value. Low standard deviation
indicates that the values are all close to the average; high standard deviation
indicates that the values are spread over a large range.
The difference in value at the start and end of the period taking into account
Counter any rollover due to the variable's maximum being reached. See example
below.
First value's timestamp The timestamp of the variable's First Value.
Last value's timestamp The timestamp of the variable's Last Value.
Minimum value's timestamp The timestamp when the variable was at the minimum value.
Maximum value's timestamp The timestamp when the variable was at the maximum value.

Understanding the counter statistic


The counter statistics is designed for energy metering, pulse counting and other fluid quantity counting over
a certain time period.
Operation of the counter statistic can be illustrated with a simple example.
Consider a register (used as a counter) with a minimum value of 0 and maximum of 65535. An Export is con-
figured with a sample rate of 10 minutes.
The register has the following values over a 30 minute period.
13/10/14 10:00:00 4
13/10/14 10:10:00 5
13/10/14 10:20:00 9
13/10/14 10:30:00 10
For this period the statistical counter result is 10-4 = 6.

- 1319 -
Then for a further 60 minutes the register has the following values.
13/10/14 10:40:00 100
13/10/14 10:50:00 800
13/10/14 11:00:00 3000
13/10/14 11:10:00 40000
13/10/14 11:20:00 60000
13/10/14 11:30:00 100*
For the whole 90 minute period the statistical counter result is 65535-4+100 = 65631.
* Rollover as the value has reached the variable's maximum.

Aggregated Statistics output


The Aggregated Statistics output provides statistical information using the raw values of the trend data. You
can choose which statistics are generated using the Aggregated Statistics tab. The statistics are the same as
on the Statistics tab. The difference is that while Statistics are calculated globally over the period of the
export, Aggregated statistics are calculated separately for each successive sub-periods within the period of
the export. The sample period interval, as defined in the Sampling tab, is used as the sub-period.
For example, using aggregated statistics for energy counters, you will be able to export a day to day con-
sumption over a year. In such a case you will generate the export for a 1 year time period, with a sampling
rate (sub-period) of 1 day.

The Aggregated Statistics output can produce very large amounts of data as it generates statistics
for each sub-period.

- 1320 -
How to Add Variables to a Trend Page
1. Select a previously configured trend page.
a. Open the Application Explorer and expand the configuration tree to select a previously con-
figured Data Export.
b. In the right pane, select a trend page.
2. Add variables to the trend page.
a. From the tool bar, select the Add trend. tool. The Trend Selector dialog opens. Show picture

b. In the left pane, select the archive unit in which the variable is trended.
c. In the right pane, select the trend to be added and click the OK button.
d. Repeat steps a to c to add more trends as required.
3. Use the Move up and Move down tools to change the order in which the trends appear in the trend
page so that it fits your ordering requirement in the exported data outputs.
4. Save the configuration and close the Application Explorer.

Only Proprietary and HDS archive units are shown in the Trend Selector dialog.

- 1321 -
Trend Page Advanced Properties
Show picture

l Data output
l Export column headers
l Export variable name - Export variable name in the first row that is written.
l Export variable description - Export variable description in the first row that is written.
l Export row headers
l Export timestamp - Export the timestamp of each sample in the first column.
l Format - The timestamp format.
l Use both date and time - Output both the date and time. This is the default set-
ting.
l Use date - Output the date only.
l Use time - Output the time only.
l Start at column - The start column for data generated by the export.
l Start at row - The start row for the data generated by the export.
l If output exists - The behavior, for a specific page, when the Merge option has been selected in
the main data export configuration. See the topic Data Export Advanced Properties for inform-
ation about other options that affect the behavior of the data export, as a whole, if the output
already exists.
l Clear all - For an Excel output clear the entire sheet of all content. For a Csv output the
contents of the entire file is cleared.
l Clear page data - For an Excel output only, clear only data that has been generated by
data export.
l Append after last row - Append new data after any existing data. For an Excel output, you
can specify an offset relative to the existing data. For a Csv output, the data is appended
right after any existing lines.
l Raw mode
l Export the previous point - Tick this property if you wish the previous point to be exported
when exporting raw data. The previous point the most recent data point just before the
beginning of the time period considered for the export.
l Statistics output - The same as for the data output except:
l Export row headers
l Export statistic name - Export the name of the statistical data in the first column.
l Aggregated statistics output - The same as for the data output, except:
l Export column headers
l Export variable name and statistic - Export variable names and statistic names in the first
row that is written.
l Export row headers
l Export timestamp
l Fields
l Use beginning timestamp only - Only the timestamp of the start of the expor-
ted period is added

- 1322 -
l Use ending timestamp only - Only the timestamp of the end of the exported
period is added
l Use beginning and ending timestamps - Both the timestamp of the start and
the timestamp of the end of the exported period are added

- 1323 -
Adding a log page

- 1324 -
How to Add a Log Page
Each Log Page can include data from one Log List. A single Log Page can generate two outputs.

l Data output - Basic table of the logged data as extracted from a Log List in an archive unit.
l Statistics output - Statistical information about the extracted log data.

1. Open the Application Explorer and expand the configuration tree to select a previously configured Data
Export.
2. From the task list, select Add a log page. The Log Page Creation dialog opens. Show picture

3. Configure the main properties.


a. Enter the Name for the log page. The name is the unique identifier of the log page within C-CURE
Building Management System and can also be used in the expression used to generate the out-
put name.
b. Enter the optional Description.
c. Select the output to be created by ticking the Export data and Statistics output properties as
appropriate.
d. Enter the Output name. This property is used to generate the sheet name when using an Excel
output or the file name when using a Csv output. It can either be an expression or plain text.
See the topic Using expressions in the folder, workbook and template names. Note that the
name for the statistics output is configured in the Statistics tab.
e. Click Apply to create the log page.
4. Select the Period tab to configure the default period. The properties in the Period tab are only used if
you generate the export using SCADA Basic and do not specify the period in the EXPORT instruction.
See the topic Understanding the time period used by Data Export for information about how the period
properties are used.
5. Select the Columns tab to configure the columns that will appear in the output. See the topic Con-
figuring the log page columns.
6. If you have chosen to generate the statistics output, select the Statistic tab to configure what will be
generated. See the topic Configuring the log statistics page.
7. Click the OK button to close the dialog. The final configuration step is to add a Log List to the log page.
See the topic How to add a log list to a log page.

- 1325 -
Configuring the Log Output Columns
The configuration of the log output columns is similar to that of the Log Viewer line format. Show picture

To edit an existing column, or add a new one, you type in the Header name and then use the ellipsis button
to open the Format Editor dialog and select the format characters that define the contents of the column.
Show picture

Although you can choose any combination of format characters, remember that Data Export can only
extract the same data (or a subset of it) as was configured in the selected Log List for archiving. For
example if you select #@A3 (extended attribute 3) and this was not configured to be archived in the
Log List, then that column will be empty in the corresponding page output.

- 1326 -
Configuring the Log Statistics Output
The Log Statistics output generates statistical information about the log data. Using the Statistics tab, you
can select the number of occurrences and/or the duration for each of the states of a bit or alarm. Show pic-
ture

Using the sorting order


Using the Sorting order list box you can choose one of the statistical data as the sort criteria for the rows of
data. Data is sorted in descending order. If you choose None then data is not sorted and appears in the order
in which the variables first appear in the historic data file within the configured time period.

Time counter format


The time counters format allows selection of the units in which the durations are displayed.
Be careful to use a realistic time unit if you use Rounded to the requested unit or you may get zero in
all the duration counters. (Example period of 10 minutes with a requested unit of hours will produce
zero.)

Understanding how the duration is calculated


When Data Export calculates the duration for the first point of the requested period it is not possible to know
the previous state of the variable. Therefore, the following principles are applied.

l If the first point is a change to 0 it is assumed that the previous value was 1.
l If the first point is a change to 1 it is assumed that the previous value was 0.
l If the first point is a change to NS it is not possible to accurately calculate the duration of each state
which will result in an empty cell in Excel.

Furthermore, for the calculations to be made properly, all transitions (0, 1 and invalid) must be selected in
the original Log List to make sure they are recorded in the archives.

- 1327 -
How to Add a Log List filter to a Log Page
1. Select a previously configured log page.
a. Open the Application Explorer and expand the configuration tree to select a previously con-
figured Data Export.
b. In the right pane, select a log page.
2. Add a log list filter to the log page.
a. From the tool bar, select the Add log list tool. The tool provides a drop-down list of the available
log lists. Show picture

b. Select the required log list. You can only select one per log page.
3. Click the Properties tool
a. In the Attributes filter tab, you can define an overall filter based on domain/nature or an expres-
sion. Doing so improves archive requests performances. Show picture

b. In the Events filter tab, select a sub-set of the log list transitions. Grayed items denote events
that are not archived by the selected log list, and therefore cannot be used for the export. Show

- 1328 -
picture

c. If you are exporting alarms select an optional alarm level range. You must choose from within
the range of the original log list.
4. Click OK to close the dialog and confirm the configuration.

Only log lists from Proprietary and HDS archive units are shown in the Log List selector dialog.

You can only add one log list to a log page.

- 1329 -
Log Page Advanced Properties
Show picture

l Raw data output


l Export column headers
l Export column description - Export column descriptions in the first row of the output.
l Start at column - The start column for data generated by the export.
l Start at row - The start row for the data generated by the export.
l If output exists - The behavior, for a specific page, when the Merge option has been selected in
the data export configuration. See the topic Data Export Advanced Properties for information
about other options that affect the behavior of the data export, as a whole, if the output already
exists.
l Clear all - For an Excel output clear the entire sheet of all content. For a Csv output the
contents of the entire file is cleared.
l Clear page data - For an Excel output only, clear only data that has been generated by
data export.
l Append after last row - Append new data after any existing data. For an Excel output, you
can specify an offset relative to the existing data. For a Csv output, the data is appended
right after any existing lines.
l Statistics output - In general the same as for the raw data output, except:
l Limit exported records – Limit the number of exported records to the given number.
l Export column headers
l Export statistic name - Export the name of the statistical data in the first column.
l Export row headers
l Export variable name - Export variable name in the first row that is written.
l Export variable description - Export variable description in the first row that is written.

- 1330 -
Data Export - Log Page and Trend Page Traces
The Traces tab enables trace messages associated with Data Export log and trend page configuration.
Enabling a trace generates a corresponding message, which is logged in the Trace Files and displayed in the
Event Viewer dialog (F7) when the condition occurs. The following screenshot is of the trend page trace and
was taken with the default configuration. The log page trace is similar. Show picture

l Trace 1: Configuration loading - Loading of the page export configuration. Example: Loading para-
meter: Statistical treatment = 'minimum'
l Trace 2: Expression resolution - Messages related to the resolution of any expressions used in the con-
figuration properties. Example: Expression successfully resolved 'Page.Name'='Trendpage01'
l Trace 3: Statistical treatment - Messages related to statistical treatment. Example: Statistic: result
'last value' = '6.00'
l Trace 4: Historical communication - Communication with the historical server. Example: Receive
trend result from histo about 'Unit01.Register01'
l Trace 5: Generation steps - Messages related to progress through the generation process. Example:
End writing aggregated values in file...

- 1331 -
Generating the output

- 1332 -
Generating an Export Manually
A User with the Export Manually user right can, on-demand, generate an entire Export, or an individual trend
page or log page. The Export Management dialog can be opened independently of the Application Explorer
using function key F11. Show picture

You can also open the Export Management dialog using a button in a mimic and the Macro animation
including the line STANDARDACTION,11.
When you manually generate an Export, you must configure the Period Selection using one of the three meth-
ods described in the topic Understanding the time period used by Data Export. If generating an individual
trend page or log page the Period Selection properties of the Generate Export dialog are completed auto-
matically using the default from the trend or log page configuration. If generating an entire Export the
Period Selection properties must be manually entered. Show picture

- 1333 -
Using the SCADA Basic Instruction EXPORT
If you want to automatically generate an export (without intervention of a user) then you must use a SCADA
Basic script incorporating the EXPORT instruction. The EXPORT instruction is straightforward to use and has
three modes.

l GENERATE - Generates an Export using the default settings.


l GENERATE_DATES - Generates an Export using specific start and end times.
l GENERATE_PERIOD - Generates an Export using a reference time and a specific period.

There are unlimited possibilities in the way SCADA Basic can be used to generate an export but the most
common are as follows.

l To generate an export on the change of a variable use the Event mechanism to run the SCADA Basic
script when the expected transition occurs on a variable or alarm.
l To generate an export according to a configurable schedule use the Scheduler mechanism to run the
SCADA Basic script (typically a recurring event).
l To generate an export using a mimic button use the Run-Program animation to run the SCADA Basic
script.

For more information on SCADA Basic, see the Programming Languages help book.

Sample program
The following script was written to allow the properties for the Export to be passed as arguments.
Sub TryGenerate ()
Dim iResult As Integer;
Dim cExportName As Str, cExportPage As Str, cFileName As Str, cStatusVar As Str;
Dim dReferenceDate As Double;

cExportName = GetArg("ARG1");
cExportPage = GetArg("ARG2");
cFileName = GetArg("ARG3");
dReferenceDate = Dval(GetArg("ARG4"));
cStatusVar = GetArg("ARG5");

iResult = Export("GENERATE", cExportName, cExportPage, cFileName);

Print ("Result from GENERATE = ", iResult);


End Sub

- 1334 -
Data Export - Excel Output Format and Examples
Trend sheet
The Trend Sheet takes the following format.

l Row 1 - Variable names.


l Row 2 - Variable descriptions.
l Column A - Sample timestamps.
l Column B, C etc. - data values.

Example with 10 minute period, 1 minute sampling and two variables. Column format has been manually
configured for clarity.Show picture

Trend statistics sheet


The Trend Statistics Sheet takes the following format.

l Row 1 - Variable names.


l Row 2 - Variable descriptions.
l Column A - Statistic descriptions.
l Column B, C etc. - Statistic values.

Example with 10 minute period, all statistics enabled and two variables. Column format has been manually
configured for clarity. Show picture

Trend aggregated statistics sheet


The Trend Aggregated Statistics sheet takes the following format.

l Row 1 - Variable names plus statistic type.


l Row 2 - Variable descriptions.
l Column A - Timestamp.
l Column B, C etc. - Statistic values.

Example with 10 minute period, 1 minute sampling, Average and Standard Deviation statistics, and two vari-
ables. Column format has been manually configured for clarity. Show picture

Log sheet

- 1335 -
The Log Sheet takes the following format.

l Row 1 - Column Headers. The columns as configured in the Columns tab of the Log Page Configuration
dialog.
l Row 2 onwards - Log data.

Example with 1 minute period and default column configuration. Show picture

Log statistics sheet


The Log Statistics Sheet takes the following format.

l Row 1 - Statistic type.


l Column A - Variable name.
l Column B - Variable description.
l Column C, D etc. - Statistic values.

Example with 1 minute period with the Bit Counts and Bit Duration statistics. Show picture

- 1336 -
Csv Output Format and Example
All outputs were generated using a tab as the separator. Tab widths have been manually adjusted in the fol-
lowing screen shots for clarity.

Trend output
The Trend output takes the following format.

l Row 1 - Variable names.


l Row 2 - Variable descriptions.
l Column A & B Sample timestamps.
l Column C, D etc. - data values.

Example with 10 minute period, 1 minute sampling and two variables. Show picture

Trend statistics output


The Trend Statistics output takes the following format.

l Row 1 - Variable names.


l Row 2 - Variable descriptions.
l Column A - Statistic descriptions.
l Column B, C etc. - Statistic values.

Example with 10 minute period, all statistics enabled and two variables. Show picture

Trend aggregated statistics output


The Trend Aggregated Statistics output takes the following format.

l Row 1 - Variable names plus statistic type.


l Row 2 - Variable descriptions.
l Column A - Timestamp.
l Column B, C etc. - Statistic values.

Example with 10 minute period, 1 minute sampling, Average and Standard Deviation statistics, and two vari-
ables. Show picture

- 1337 -
Log output
The Log output takes the following format.

l Row 1 - Column Headers. The columns as configured in the Columns tab of the Log Page Configuration
dialog.
l Row 2 onwards - Log data.

Example with 10 minute period and default column configuration. Show picture

Log statistics output


The Log Statistics Sheet takes the following format.

l Row 1 - Statistic type.


l Column A - Variable name.
l Column B - Variable description.
l Column C, D etc. - Statistic values.

Example with 10 minute period with the Bit Counts and Bit Duration statistics. The duration time unit is
seconds.Show picture

- 1338 -
Export Status Codes
Export status codes are reported in the optional status variable that is part of the Export configuration.
Code Status
0 Successful
1 Running
2 Not generated by this server
3 Canceled
10 General failure
11 Failure - Bad configuration
12 Failure - Failed historical request
13 Canceled - Export file already exists
14 Failure - In demo mode

- 1339 -
Using Excel workbook Templates with Data Export
The workbook generated by the Data export has, by default, no formatting. To automatically format the out-
put you can specify an Excel workbook template in the Export Configuration dialog. The template is applied
to the workbook when it is generated. Show picture

The name of the worksheet or worksheets in the workbook template must match those being gen-
erated by the Export. This implies that you must use either fixed text as the worksheet name or an
expression whose output does not change each time the worksheet is generated.

Using a template will clear data from any existing sheet even if the Clear if sheet exists property is
not set.

- 1340 -
Printing

- 1341 -
Printing Overview
There are two distinct printing mechanisms within C-CURE Building Management System.

l Graphical. You can print the contents of a window or the entire screen on the Windows' default printer.
This mechanism is used when producing screen dumps from SCADA BASIC, using the built-in program
"Hardcopy", when printing a report and when printing from the Print command on the File menu.
l Text only. You can print information in text format on any printer configured in the operating system,
either locally or over a network. This mechanism is used when printing events through the Log Filters,
Alarm and Log Displays and when using the SCADA Basic instruction LPRINT.

A printer can only be used to print data from one source. If your project requires the use of both printing
mechanisms, you will need two printers. For example, you could use a dot matrix printer connected to one
of the PC's serial ports to print alarms and events and a color ink jet printer connected to another PC's port
to make screen hard copies.
If a printer is connected to the same port as the protection dongle, it must be switched on at all
times or it may not be possible for C-CURE Building Management System to read the dongle.

- 1342 -
Printing graphics

- 1343 -
Printing Graphics Overview
In general, graphical printing uses the default printer as set in the operating system. You cannot change
print settings from within C-CURE Building Management System. The only exception to this is when printing
a window from the File – Print command on the menu. You can select and print to any printer configured
under the operating system. You can also change the printer properties - but the changes are temporary and
are not remembered when C-CURE Building Management System is shutdown.
When using any of the screen printing methods the macro animations (trend viewer, alarm viewer,
log viewer, and grid control) may not print correctly.

- 1344 -
Printing from the File Menu
On the File menu, you will find command buttons for Print set-up, Print preview and Print. These provide the
same functionality you find in most applications (word processor, spreadsheet etc) running under Windows.

Using the print set-up command


The Print set-up command displays a standard Windows Print set-up dialog that allows you to select which
printer to use and change its properties. Note that any change in printer properties are temporary and do
not affect the configuration of the operating system.

Using the print preview command


The print preview command displays a preview of what will actually be printed. The following command but-
tons are available.

l Print - Prints what you see in the print preview.


l Next page - Displays the next page (if there is more than one).
l Prev page - Displays the previous page (If there is more than one).
l Zoom in - Makes the image larger.
l Zoom out - Makes the image smaller.
l Close - Closes the print preview box.

Using the Print command


The print command prints the contents of the window that currently has focus (the one that was clicked in
last).

- 1345 -
Printing Graphics from a Program
Printing Using the Integrated Hardcopy Program
C-CURE Building Management System contains an integrated hardcopy program. This is called in the same
way as SCADA basic program using the Run program animation. It contains two functions, Screen and Win-
dow. The Screen function will print the whole of the screen whereas the Window function will just print the
window in which the animation resides.

Printing Graphics using SCADA BASIC


You can make a print of a window under program control using the SCADA Basic instruction WINDOW. There
are two modes that may be used, Print and Hardcopy. For further information, see the section on SCADA
Basic.

- 1346 -
Printing Text

- 1347 -
Printing Text Overview
C-CURE Building Management System supports printing on up to 12 devices from a single station. You can
print to any of the printers configured in the host operating system, either on the local PC or over a network.
For each printer that you configure C-CURE Building Management System creates a print spooler, which man-
ages the information being sent to the printer. You can also print to a text file. Text printing is always in por-
trait format and is not affected by changing the printer properties in the operating system.
If you print to a printer used by C-CURE Building Management System from another application, you
may cause C-CURE Building Management System's print spooler to stop. Printing can then only be
resumed by user intervention.

- 1348 -
Managing Printing in the Application Explorer

Tasks available when the Line Printers folder is selected


Icon Task Description
Settings Display the line printers general settings dialog.
Add a line
Add a new line printer.
printer
Enable all line
Enable all configured line printers.
printers
Disable all
Disable all configured line printers.
line printers

Tasks available a Line Printer is selected


Icon Task Description
Remove Remove the selected line printer.
Properties Display the properties dialog for the selected line printer.
Enable line
Enable the selected line printer.
printer
Disable line
Disable the selected line printer.
printer

- 1349 -
Printers Settings
The Printers settings can be displayed from the Printers folder in the Application Explorer's Main settings dia-
log or by using the Settings task when the node Line printers is selected in the Application Explorer's con-
figuration tree. The printer settings affect the operation of packet printing within C-CURE Building
Management System. Show picture

l Printing period - For all printers having Packet printing enabled, the period at which packets are sent
to the spooler. The default is 1 second.
l Number of lines per period - For all printers having Packet printing enabled, the number of lines that
are sent at once when a packet is to be printed.

These properties determine the maximum rate at which C-CURE Building Management System prints to a
line (text) printer if the Packet printing option was selected in the printer configuration. For example if the
printing period is set to 5 seconds and the number of lines per period is set to 10, C-CURE Building Man-
agement System is able to print up to 10 lines once every 5 seconds. The properties are used to avoid con-
gestion in the printing mechanism when attempting to print an excessive number of lines - for example on
recovery from a communication failure.
This option is included for compatibility only as the packet printing mechanism has been superseded by C-
CURE Building Management System's print spooler.

- 1350 -
Configuring a Line Printer
How to configure a line printer that prints to a printer via a print spooler

1. Open the Application Explorer and expand the configuration tree to select the General.Line Printers
folder.
2. From the task list, select Add a line printer. The Line Printer dialog opens. Show picture

3. Select the Printer Id. This number is used as a reference when selecting the printer in C-CURE Building
Management System.
4. Enter an optional Description for the printer.
5. Select Print to Printer spooler.
6. Select Enable.
7. If the printer is connected via another host on a network, enter the Print server host name. The ellip-
sis button displays a list of known hosts on the network.
8. Enter or select the printer using the Printer name combo box.
9. Click OK to confirm the configuration and close the dialog.

How to configure a print device that prints to a file

1. Open the Application Explorer and expand the configuration tree to select the General.Line Printers
folder.
2. From the task list, select Add a line printer. The Line Printer dialog opens. Show picture

3. Select the Printer Id. This number is used as a reference when selecting the printer in C-CURE Building
Management System.
4. Enter an optional Description for the printer.
5. Select Print to File.
6. Select Enable.
7. Enter or select the name of the file to which the output will be sent. The file must already exist, C-
CURE Building Management System will not create it.
8. Click OK to confirm the configuration and close the dialog.

- 1351 -
Advanced properties
Additional properties are available in the Advanced tab for tuning the print spooler and for use when the pro-
ject is multi-station. Show picture

l Spooler - properties that affect the operation of the spooler. The spooler properties are only available
when using a print spooler.
l Working folder - The folder in which the temporary files used by the spooler are stored. By
default, the TEMP folder within the project.
l Printer - Properties that are directly influenced by the printer used.
l Character conversion - Convert the data to be printed to ASCII or ANSI format or leave as
is (NONE).
l TrueType font option - Select the option appropriate to the printer you are using. If the
printer does not support TrueType fonts then leave this property at its default setting.
l Connection - Properties that affect the connection between C-CURE Building Management Sys-
tem, the spooler and the printer.
l Spooler timeout - The period, in milliseconds, at which the spooler checks to see if it has
anything to print. The default period is 3000 milliseconds.
l Printer timeout - The maximum period, in seconds, for which continuous messages will be
sent to a printer. After this period, messages will be saved until the next spooler timeout.
For example, if the spooler timeout was set to 3 seconds, and the printer timeout set to 2
seconds, messages will be sent to the printer for a maximum of 2 seconds in any 3. In
some cases, it may be necessary to change this period to avoid overloading the printer
buffer.
l Retry timeout - The period, in seconds, at which the spooler will retry a failed printer (out
of paper etc.). The default period is 900 seconds.
l Enable packet printing – If selected the spooler and printer timeout periods are ignored
and the messages are buffered and printed in packets.
l Lines per packet - The number of messages (lines) per packet.
l Add form feed - Add a form feed to the end of each packet.
l Information
l Open warning boxes – Enable display of the Windows' printing warning boxes, under error
conditions, allowing the user to cancel or retry printing.
l Verbose – Enable the reporting of all printer transactions in the print spooler message
area
l Networking - Selection of a server station list containing the names of the stations on which the
printer will be active. Only used on multi-station applications.

- 1352 -
C-CURE Building Management System Print Spooler
C-CURE Building Management System creates a print spooler for each printer configured. The print spooler
is started with its interface window minimized. To restore the Print Spooler window click on its icon in the
Windows' task bar. Each print spooler is identified by displaying the associated printer number in its title
bar.
Show picture

In the print spooler is an event list displaying the spooler activity and a number of fields displaying the
spooler properties.

Command Buttons

l Stop – Temporarily suspends printing. C-CURE Building Management System continues to send mes-
sages to the temporary spooler files, which will grow in size until the spooler Start button is clicked.
The printer status variable in the database is set to 0.
l Start – Printing is resumed. The spooler prints the contents of the temporary spooler files until they
become empty. The printer status variable in the database is set to 1.
l Cancel – Minimizes the print spooler window.

If you close a print spooler, all printing associated with that printer will stop until C-CURE Building
Management System is restarted.

Using the Start and Stop buttons in the print spooler does not have the same effect as using the
Start and Stop mode of the Printer instruction in a SCADA Basic program. If you stop the printer
from the spooler, you must start it again from the spooler. If you stop the printer from a
SCADA Basic program, you must start it again from SCADA Basic.

- 1353 -
Changing Printer Properties
To permanently change a printer's properties you must use the operating system tools.
To change a printer's properties

1. Display the list of configured printers by selecting the Settings – Devices - Printers & Scanners option
from the Start menu.
2. Select the printer to change and click Manage to display its status.
3. To change the general printer properties select the Properties command on the Printer menu strip.
4. To select the printer as default select the Default command on the Printer menu strip.
5. To select paper defaults (size, portrait, landscape etc.) select the Document Defaults command.

Changes you make here will affect the printing of graphics with C-CURE Building Management System imme-
diately, text printing is not affected by printer properties.

Disabling The Windows' Print Spooler


Some operating systems have their own integral spoolers associated with each printer. Whilst C-CURE Build-
ing Management System will print satisfactorily with the print spoolers enabled, the spoolers delay the detec-
tion of printing problems as they only notify problems once they are full.
To disable the Windows' print spooler display the printer properties and select the option to print directly to
printer.
Show picture

- 1354 -
Libraries

- 1355 -
Managing Libraries in the Application Explorer

Tasks applicable to Libraries


When the Local Libraries folder is selected.
Icon Task Description
Add new local lib- Add a new local library and create the corresponding folders.
rary
Add an existing Add a local library to the project from folders that already exist.
local library
When the Shared Libraries folder is selected.
Icon Task Description
Add new shared lib- Add a new shared library and create the corresponding folders.
rary
Add an existing Add a shared library to the project from folders that already exist.
shared library
When a library is selected
Icon Task Description
Properties Display the Library Properties dialog.
Hide/show in select- Toggle display of the library in any of the dialogs where you can select a lib-
ors rary.
Remove Remove a library from the project with the option to delete the supporting
folders and their contents.
Open the library Open the folders forming the library with the Windows Explorer.
with Windows
Explorer
Add an image Add an image to the library. The image is copied from its current location to the
library folder.

Rules and behavior of cut, copy and paste


You cannot cut, copy or paste items within the Libraries folder.

- 1356 -
Libraries Settings
There are no settings specific to the Libraries.

- 1357 -
Managing the Contents of a Library Using the Application Explorer
The Application Explorer can be used to manage the following library elements.
Visible in Library
Folder Element Manager Preview Delete Add
3D 3D mimics No No No No
B Images Yes Yes Yes Yes
P Programs Yes No Yes No
S Symbols Yes Yes Yes No
SCR Scripts (VBA) No No No No
Templates Templates (AA) No No No No
W Mimics Yes Yes Yes No
WT Mimic templates Yes Yes Yes No
The contents of a library, selected in the configuration tree, is displayed in the right pane. You can select the
library elements that are displayed using the tool bar at the top of the right pane. Show picture

What information is displayed in the right pane?


The following information is displayed in the right pane.

l Name - The name of the library element.


l Type - The element type. Image, Binary symbol, Binary mimic, Binary mimic template, ASCII sym-
bol, ASCII mimic or ASCII mimic template.
l Path - The path, including the element name, that is used as the reference whenever the element is
used in C-CURE Building Management System.
For example /SH_ARROWS/ARROWS_EMBOSSED_BOT_BLACK_32.png
l Size - The size, in pixels, of any ASCII mimic or ASCII symbol. This is NOT the size of the file.
l Filename - The full Windows file name including the path.
For example E:\Projects\LIB\B\SH_ARROWS\ARROWS_EMBOSSED_BOT_BLACK_32.png

The Path property is not a true relative path as it only contains the name of the library folder and the
element. It does not contain the name of the sub folder used to separate images, symbols etc.

Displaying the library contents as thumbnails

- 1358 -
To preview the contents of a library as thumbnails you can change the display options using the Application
Explorer's main toolbar. Show picture

Adding images to a library


You can add images to a library using the Add an image task. This task opens a Window's Explorer style dia-
log from where images can be browsed, selected, and copied to the library. Show picture

Adding other content to a library


You cannot add mimics, mimic templates, symbols or programs to a library using the Application Explorer.

l To add mimics, mimic templates, or symbols to a library you select the library when saving the same
(using the graphic editor).
l To add programs to a library you select the library when saving a program (using the program editor).

- 1359 -
How to Configure a New Library
Adding a new local or shared library
Adding a new library will create new, empty folders for the library contents. The procedure to create a new
Local Library or Shared Library is the same.

1. Open the Library Configuration dialog.


a. In the Application Explorer expand the configuration tree and under the Libraries folder select
Local Libraries or Shared Libraries as appropriate.
b. From the task list select the task Add a new shared library. The Library Configuration dialog
opens. Show picture

2. Configure the library.


a. Enter the Folder name. This is the actual name for the folder that will be created on the hard
disk and so it must follow Windows' folder naming rules.
b. Enter the Label. The Label will appear in dialogs whenever you are selecting a library. The label
can be bilingual.
c. Enter an optional Description.
3. Click OK to create the library and close the dialog.

About the Path and Folder full name properties


The Path and Folder full name properties are read only and are automatically generated by the Application
Explorer.

l The Path is the name of the library folder relative to the project folder. The Path is prefixed to the
name of any item in the library when it is used in C-CURE Building Management System. For example
if you created a shared library using the folder MYLIB the path would be /MYLIB.If you pasted an
image called KEY.PNG from this library into a mimic it would be referenced as /MYLIB/KEY.PNG.
l The Folder full name is the actual folder used to store the library as it appears on the hard disk.

The Library Configuration dialog Advanced tab Show picture

- 1360 -
l Behavior
l Visibility
l Always - The library is always visible in the dialogs where you are able to select library
contents.
l Never - The library is never visible in the dialogs where you are able to select library con-
tents.
l Depending on User rights - The libraries visibility, in the dialogs where you are able to
select the library contents, depends on the property Profile rights.Preferences in the
Administration tab of the Profile for the current User. If Preferences is selected the library
is visible.
l Update
l Always - The library contents can always be modified.
l Never - The library contents can never be modified.
l Depending on User rights - The ability to modify the libraries contents, depends on the
property Profile rights.Preferences in the Administration tab of the Profile for the current
User. If Preferences is selected the library contents can be modified.

- 1361 -
How to Add an Existing Library
Adding an existing library is necessary when setting up a new computer to run C-CURE Building Management
System and project that is using libraries not in the standard distribution. Such libraries, perhaps developed
in-house, or from an earlier version of the software, must be explicitly added to the newly installed com-
puter.

See also the topic <Project and library overview.Backing up and restoring projects and libraries>.

Local libraries
The folders that make up a local library are found under the LIB folder that is part of the project folder struc-
ture. If you copy the project to another installation of C-CURE Building Management System, nothing needs
to be done to add the libraries. The libraries will automatically appear, along with their contents, in the
Libraries Management dialog.

Shared libraries
The folders that make up a shared library are found under the LIB folder in the project's root. If you copy a
project that is using a shared library to another installation of C-CURE Building Management System, you
must use the following procedure to make the library contents available (if it is not already present).

1. Copy the library folder and contents from the original location, or from the temporary location where
you have restored a backup, to the new installation's LIB folder in the project root. You must copy the
entire folder including all its sub folders (3D, B, P, S etc.). In the following example, the library folder
is called MyLib.
2. Start C-CURE Building Management System and open the Application Explorer.
3. Navigate the configuration tree and select the Shared Libraries node.
4. Start the task Add an existing shared library. The Shared library creation dialog opens.
5. Click the Folder name drop down list box. In it will appear a list of library folders that the Application
Explorer has found, but are not yet configured in the project. Show picture

6. Select the relevant library.


7. Enter the optional Label and Description. The label is the identity of the library within the project. If
you do not enter a label, the library folder name will be used.
8. Click OK to confirm the configuration and close the dialog. Note that the Path and Full folder name
properties are automatically generated by the Application Explorer.

- 1362 -
Geographical data

- 1363 -
Geographical data Overview
The Geographical data node includes the configuration elements necessary to configure the behavior of a
geolocation client apps such as SnapVue.
It supports geolocation, micro-geolocation and tracking features of C-CURE Building Management System.
Geographical data includes:

l Zones - A zone usually represents a real world location such as a room in a building or the area where
a specific piece of equipment is installed. Zones can be organized in a hierarchy with parent and child
zones. For example Building1.Floor1.Room1.Chiller1. Zones can also be configured to represent the
functional breakdown of a large piece of equipment.
l Geo-tags - A geo-tag is a beacon, the detection of which determines a corresponding geographical
zone. The main property of a geo-tag is its unique ID. By associating a geo-tag with a zone, the C-
CURE Building Management System server can determine the location of the connected user. The fol-
lowing geo-tag types are supported.
l NFC tags (Near Field Communication),
l QR codes,
l Bluetooth Low Energy beacons (BLE),
l Wi-Fi access points,
l GPS location. Not strictly speaking a geo-tag but may be used if geo-tags are found.
l Actions - An action, for example display a Mimic, that the user of a SnapVue client can execute.
Actions are added to zones thereby determining what a user can visualize and execute when they have
been determined to be in a particular zone. Actions can be cascaded from the parent zone by all child
zones.

Using zones to represent the real world


A zone and the hierarchy of zones can be used in a variety of ways to support operational needs in different
types of systems. The table below describes the 3 main drivers for designing the hierarchy of zones.
Type of system Operational need What a zone represents
The root part of the hierarchy includes zones cor-
responding to the different sites, with their GPS
Infrastructure mon- Outdoor locations to identify
coordinates.
itoring and other geo- remote sites.
Children zones matches a geographical and/or func-
graphically Lone workers tracking.
tional breakdown of sites, including associated geo-
distributed systems Locate users while on site.
tags for the micro-geolocation of users by proximity
to a given piece of equipment.
Indoor locations to identify Zones matches a physical and logical breakdown of
areas on a site and within build- buildings, including associated geo-tags for the
Building man-
ings. micro-geolocation of users by proximity to a given
agement systems
Locate users while on site or piece of equipment or room (building, floors, zones
within buildings. or rooms).
Zones matches a physical and logical breakdown of
the industrial site (factory), including associated geo-
Indoor locations to identify
Industrial equipment tags for the micro-geolocation of users by proximity
areas on a site and within a
monitoring, man- to a given piece of manufacturing. The functional
factory.
ufacturing, factory breakdown can go further with zones used to rep-
Locate users while on site or
automation resent equipment pieces such as a control panel, an
within the factory.
electrical panel, the front or rear part of a machine, a
motor control panel...
In a system comprising several geographically distributed sites, the root part of the hierarchy is usually a
set of zones corresponding to the different sites, with their GPS coordinates.

How the SnapVue client and the geolocation server operate together

- 1364 -
l The SnapVue client app runs on a mobile device such as an Android or iOS tablet or smart phone.
l The C-CURE Building Management System server software runs on a computer under Microsoft Win-
dows.
l SnapVue and the server communicate using the IIS web server and deployed using the Web Deploy-
ment Console.
l SnapVue sends information to the server about the context of the connected user, detected geo-tags,
and its GPS position (if available).
l The server determines the zone where the user is located using the geo-tags and sends the cor-
responding actions (for that zone and for any parent zone) to SnapVue.
l The SnapVue user is then able to visualize data and execute the actions appropriate to the zone con-
text.

A zone's visibility to a user depends on the user's browsing rights as configured in the User Profile.

- 1365 -
Managing Geographical Data in the Application Explorer

The Geographical data folder includes Zones, Actions and Geo-tags.


When used to manage Geographical data, the appearance of the Application Explorer is modified to include a
third pane that is used to associate Geo-tags, and add Actions to Zones. Show picture

Tasks applicable to the Geographical data folder


When the Geographical data folder is selected
Icon Task Description
Settings Display the Geographical data settings.
When the Zones folder is selected
Icon Task Description
Add a zone Add a new zone to the zones folder.
When a specific zone is selected.
Icon Task Description
Add a zone Add a child to the selected zone.
Remove Remove the zone.
Properties Display the Zone Properties dialog.
Associate a geo-tag Associate a geo-tag with the selected zone.
Add an action Add an action to the selected zone.
Enable actions Enable all actions for the selected zone.
Disable actions Disable all actions for the selected zone.
Copy Copy the selected zone.
Cut Cut the selected zone.
When an action is selected.
Icon Task Description
Remove Remove the action.
Properties Display the action's properties.

- 1366 -
When an associated geo-tag is selected.
Icon Task Description
Remove Remove the association of the geo-tag with the zone.
Properties Display the associated geo-tag's properties.
When the Geo-tags folder is selected.
Icon Task Description
Add a geo-tag Add a new geo-tag.
Settings Display the Geo-tag's Settings dialog.
When a specific geo-tag is selected.
Icon Task Description
Remove Remove the geo-tag and any association with a zone.
Properties Display the Geo-tag Properties dialog.
Copy Copy the selected geo-tag.
Cut Cut the selected geo-tag.

- 1367 -
Geographical Data Settings
The geographical data settings can be displayed from the Geographical Data entry in the Application
Explorer's Main settings dialog or from the Settings task when the Geographical Data folder is selected in
the Application Explorer's configuration tree. Show picture

l Geo-tags
l Default remanence - The remanence settings to be used by a ContextVue client app of C-CURE
Building Management System unless overwritten by its own local settings. The remanence is the
period of time, after receiving a signal from a geo-tag, that it will be considered as detected.
The value set for remanence depends on the type of geo-tag. For example, Bbluetooth beacons
emit a signal about every second so the remanence can be low. NFC and QR codes are detected
once only, so the remanence means how much time these tags should be considered part of
remain in the user environment.
l Unlimited - The remanence period is unlimited. That is once it has been scanned it is to be
permanently considered part of the user environmentstored in client's memory.
l During time interval - The remanence period in hours, minutes and seconds.

- 1368 -
How to Add and Configure a Zone
A zone usually represents a real world location such as a room in a building or a specific piece of equipment.
Zones can, and will normally, be nested. For example Building1.Floor1.Room1.Chiller1.
The geo-tags associated with a zone allow the C-CURE Building Management System server to determine
the location of the SnapVue client user or its proximity to a given piece of equipment.
The actions added to a zone define what the user of the SnapVue mobile app can visualize and operate when
at that zone. Actions can also be cascaded from a parent zone.
When a user has been determined as being in a child zone they are, by definition, also in the parent
zone.

1. Select the Zones folder, or a zone that is already configured, in the Application Explorer and, from the
task list, select Add a zone. The Zone Configuration dialog opens. Show picture

2. Enter a name by which the zone will be known.


3. Enter a description of the zone. The description is optional and only appears in the contents pane of
the Application Explorer.
4. Enter the Local branch of the zone. As for variables, branches associated to zones are hierarchical.
The Context branch is a reminder of the parent zone's branch. The branch will be used as a filter for
any variables available to an action. Branches are aggregated from parent zone, child zone and action
unless preceded by the '@' character. For example, if the zone FLOOR01 has branch FL1 and a child
zone ROOM1 has the branch RM1 any variables available to actions added to the ROOM1 will be filtered
by the branch FL1.RM1.
5. Select the Browsing level. For a user to have access to a zone they must have access to the cor-
responding level in the user profile.
6. Detection criteria - It is the logic used to identify a zone based on the detection of several tags. For
example, if a zone has two associated tags B1 and B2. If all geo-tags are detected means that a user
must see both geo-tags to be detected in the zone. If at least one geo-tag is detected means that it is
enough for a user to detect at least one of the geo-tags to be detected in the zone.
7. Detection in a single child zone at a time - Defines if child zones are mutually exclusive or not. That is,
if a user can be in more than one child zone at the same time. This is used in situations where geo-
tags from more than one child zone are visible at the same time. Using this property, only the zone
corresponding to the closest geo-tag is selected.
As part of the tracking process, each zone receives a score depending on the distance to its geo-tags
as well as the scores of child zones. The better the score, the greater is the probability that the user is
in the zone.
8. Click OK to confirm the configuration and close the dialog.

Advanced tab

- 1369 -
A zone has advanced properties. Show picture

l Variables filtering - Properties that filter the variables available to actions and hence to the SnapVue
client. Variables can be filtered by a branch and / or an expression.
l Sql expression - A Sql expression used to filter variables instead of, or as well as, the branch
name. For example Domain = "MyDomain". See the topic Using an Sql Expression to Filter the
List of Variables in the Grid Control book. If you use both a Branch name and Sql expression fil-
ter they are combined using a logical AND.
l Geospatial reference - The configured real world position of a zone in latitude, longitude and altitude.
Used in conjunction with the GPS Position reported by the mobile client as a method of determining
zone. The radius specifies the circle within which the position is valid.
l Use parent zone - Use the geospatial reference of the parent zone.
l Use static value - Use the entered value. Latitude and Longitude are in degrees, Altitude and
Radius are in meters.

How to associate a geo-tag with a zone

1. Select a configured zone and, from the task list, select Associate a geo-tag. The geo-tag Association
Configuration dialog opens. Show picture

2. Select the geo-tag Tag name. A given geo-tag can be associated to one or more zones.
3. Enter the Maximum detection distance. If not entered the default of zero is used.
4. Click OK to confirm the configuration and close the dialog.

Geo-tag priority and accuracy

- 1370 -
It is possible that if there is more than one detectable geo-tag type, there may be some conflict in the
determined zone. To overcome this the SnapVue client reports geo-tag types using the following priority.

1. NFC or QR tags first because they are the most accurate. Their accuracy is under 1 meter and the
most recent scanned takes priority.
2. If no NFC or QR tags are seen, then Bluetooth tags are used. BLE beacon positioning accuracy is about
1-2 meters.
3. Else, if no BLE is seen, then Wi-Fi is used. Wi-Fi Access Point positioning accuracy is about 10 meters.
4. Else, if no Wi-Fi is seen, then GPS is used. GPS positioning accuracy is about 100 meters.

How to add an action to a zone

1. Select a configured zone and, from the task list, select the required action from the Add an action list.
The Action Configuration dialog opens. Show picture

2. Enter a Name for the action.


3. Enter an optional Description.
4. Select the Cascade display mode you need. This property drives how the action will be made visible to
users detected in children zones and with which branch it will be resolved. There are 3 possible
choices to combine:
l If the action should only be visible on this zone (the one where it is configured) or if it should
also be visible to a user detected in a child zone.
l If the action should always be resolved (branch-wise) in the context of the zone where the user
is detected (either this zone or a child zone), or if it should always be resolved in the context of
this zone (the one where it is configured)
5. Select the optional Enabling bit that can be used to dynamically enable and disable the action.
6. Select the Parameters tab and configure the action parameters. See the Actions book.
7. Select the Tile tab and configure the tile. The tile determines the appearance of the action within the
SnapVue mobile application. See the Actions book.
8. Click OK to confirm the configuration and close the dialog.

For further information on the configuration of actions, see the Actions book.

- 1371 -
How to Add a Geo-tag
A geo-tag is a beacon, the detection of which is used to determine a geographical zone. The main property
of a geo-tag is its unique ID. By associating a geo-tag with a zone, the C-CURE Building Management
System server can determine the zone(s) where a SnapVue client is located.

1. Select the Geo-tags folder in the Application Explorer and, from the task list, select Add a geo-tag. The
Geo-tag Configuration dialog opens. Show picture

2. Enter a name by which the geo-tag will be known.


3. Enter a description of the geo-tag. The description is optional and only appears in the contents pane of
the Application Explorer.
4. Enter the geo-tag Physical ID. What you enter here depends on the geo-tag type.
a. For a BLE beacon, it is the UUID of the beacon.
b. For an NFC tag, it is the text from the NFC in NDEF (text) format.
c. For a QR Code, it is the text that corresponds to the QR code as defined at the time of generating
the QR Code.
d. For a Wi-Fi endpoint, it is the MAC address of the access point.
5. Click OK to confirm the configuration and close the dialog.

- 1372 -
Understanding actions
Whilst the types of action available to the SnapVue client are very different in functionality, the same basic
procedure is used for configuration in C-CURE Building Management System and they share some common
behavior. For how to add an action to a zones see the topic How to add and configure a zone.

Available action types


The types of action available is the following, they offer a variety of possibility for the user to visualize
information and send commands:

l Send command - Allow the user to send a command or a set-point for a given variable. The value sent
can be pre-configured or entered by the user.
l Variable details - Display detailed information to the user for a variable, including timestamp, status
and extended attributes.
l List of variables - Display a list of variables and their values to the user.
l Trend - Display a trend style view of up to 16 variables to the user.
l List of alarms - Display a list of eligible alarms to the user.
l List of logged events - Display a list of events from a selected Log List to the user.
l Symbol - Display a graphic symbol selected at design time to the user.
l Mimic - Display a mimic selected at design time to the user.
l Execute program - Allow the user to execute a SCADA Basic script on the server.
l Open Url - Allow the user to browse to a specific Url in an embedded web browser.

Whilst they provide similar functionality, the trend view, log view and alarm list view are not the
same as the equivalent graphic controls in C-CURE Building Management System desktop client or
WebVue.

Important note about the variables filter


All action types other than List of logged events and Open Url, inherit the branch from the zone to which it is
attached (if any). The branch is known as the Context and allows filtering / electing the variable(s) available
to the action. Show picture

Some actions also have an optional local branch. Any local branch is appended to the context branch unless
it is preceded with the @ character which makes it absolute. For example:

l If the context is BMS.B01 and the local branch is Floor01, the branch filter is BMS.B01.Floor1.
l If the context is BMS.B01 and the local branch is @BMS.B02, the branch filter is BMS.B02.

Some actions, namely Send command, Variable details and List of variables, also inherit any Sql expression
from the zone. If a local Sql expression is configured it is ANDed to any branch filter.

- 1373 -
The context branch is shown in the action but any inherited SQL expression is not.

Action visibility
The actions visible to the user of the SnapVue mobile app primarily depend on what has been configured in
the C-CURE Building Management System server for the zone in which the user is detected. However, the fol-
lowing conditions must also be met.

l Browsing level - The user, having been detected as being in a zone, must have the Browsing Level
rights in their User Profile corresponding to that of the action.
l Fully defined parameters - The parameters of the action must be fully defined.
l Open Url - The Url must be filled in.
l Variable details - A single variable is found.
l Trend and List of variables - At least one variable is found.
l Symbol - The Symbol name must be filled in.
l Mimic - The Mimic name must be filled in.
l Execute Program - The Program name must be filled in.
l List of logged events - The Log list name must be filled in.
l List of alarms - Always displayed, if no alarm matches the filter, the list of alarm is empty.
l Send command - A single variable is found.

In general, if no matching variable is found in the zone in which the action is defined, it will not be
visible to a user located at that zone.

The Tiles tab


The tiles tab configures the visual representation of each action on the SnapVue home view. Show picture

l Miscellaneous
l Browsing level - The browsing level, corresponding to that of a user's profile, that the user must
have if the tile is to be displayed.
l Visual representation
l Priority - The priority determines the position of the tile on the page. Tiles with a higher priority
are positioned to the top and left of those with a lower priority. Range 0 to 100.
l Tile size - Area occupied by the tile. In the following screen-shot all tiles are 2 x 2 which is the
default. Show picture

- 1374 -
l Tile type
l Image - The tile displays an image selected from a library. Images are automatically re-
sized to fit the space available in the tile.
l Symbol - The tile displays a symbol selected from a library. Symbols are automatically
re-sized to fit the space available in the tile. Note that any control zone in the symbol is
disabled. Tapping the symbol displays the tile's action.
l Image on bit - The tile displays one of three selected images depending on the value of a
selected bit variable (0, 1 or NS).
l Variable value - The tile displays the value of a selected variable (bit, register or text),
and an image selected from a library.
l Visual representation - Colors are selected from a palette or entered as a hexadecimal code, for
example #FF000000
l Foreground color - The color of any displayed text. The default is black.
l Background color - The background color at the top of the tile. The default is white.
l Bottom background color - The background color at the bottom of the tile. The tile color is
displayed in a gradient color if different to the Background Color. The default is white.

- 1375 -
Action Parameters Reference
This topic explains the parameters specific to each type of action.

Send command
Allows the user to set a bit, register or text variable to a value. For text or register variables, a specific
value is entered in the configuration. For bit variables, the bit is toggled.
The context used in the action is a combination of the zone context branch and the configured variable
name. If the variable name starts with an @, any context branch is ignored and the specific variable is used
in all zones. The left panel displays a hierarchy of zones. Selecting a zone shows its context branch and any
variables matching the filters.
In the picture below, the variable name is CMD_LIGHT, the context for the zone is BMS.Floor00.Room00,
and hence, the variable when the user is in that zone is BMS.Floor00.Room00.CMD_LIGHT.

l If the variable is a bit, you can select Send to 1, Send to 0, or Reverse. The send mode can be Direct,
Confirmation or Label (display the bit's associated label).
l If the variable is a register, you can configure a specific value or an increment. The send mode can be
Direct or Confirmation.
l If the variable is a text, you can only configure a specific value.

Only commandable variables are displayed. If multiple variables match the filter, the first one available will
be set. Show picture

Variable details
Displays detailed attributes of a variable to the user.
The context used in the action is a combination of the zone context branch and configured variable name. If
the variable name starts with an @, any context branch is ignored and the specific variable is used in all
zones. The left panel displays a hierarchy of zones. Selecting a zone shows its context branch and any vari-
ables matching the filters.
In the picture below, the variable name is OCCUPANCY and the context branch for the zone is
BMS.Floor00.Room00, and hence, the variable when the user is in that zone is
BMS.Floor00.Room00.OCCUPANCY. Show picture

- 1376 -
List of variables
Displays a list of variables and their values to the user.
The context used in the action is a combination of the zone context branch and the local branch. If the local
branch starts with an @, any zone context branch is ignored. The left panel displays a hierarchy of zones.
Selecting a zone shows its context branch and any variables matching the filter. The action will display a set
of all matching variables. The number of variables that can be displayed is limited to 100. Show picture

In addition to the zone context and action branches, a filter using an Sql expression can be entered. For
example Domain = "MyDomain". See the topic Using an Sql Expression to Filter the List of Variables in the
Grid Control book. The Sql expression and branch are combined using a logical AND.

Trends
Displays a trend view of up to 16 pre-selected variables to the user.
The context used in the action is a combination of the zone context branch and configured variable names. If
a variable name starts with an @, any context branch is ignored and the specific variable is used in all
zones. For each trace you can select color, thickness, line style, marker and type in a similar manner to the
Trend Viewer in the desktop application. Show picture

- 1377 -
List of alarms
Displays a list of alarms to the user.
The context used in the action is a combination of the zone context branch and the local branch. If the local
branch starts with an @, any zone context branch is ignored. The alarms that are displayed can be filtered in
the same manner as the Alarm Viewer in the desktop application, using Domain, Nature, Alarm Level and
Event Type. The action will display all alarms matching the filter. The number of alarms that can be dis-
played is limited to 100. Show picture

List of logged events


Displays a list of events from a selected Log List to the user.
There is no context for this action. The events that are displayed are from the selected Log List and can be
filtered, in the same manner as the Log Viewer in the desktop application, using Domain, Nature, Alarm
Level and Event Type. The number of events that can be displayed is limited to 100.Show picture

- 1378 -
Symbol
Displays a selected symbol to the user.
The context used in the action is a combination of the zone context branch and the local branch. If the local
branch starts with an @, any zone context branch is ignored. Any variables displayed by the symbol take
into account the action context unless the name of the variable within the symbol itself is directly referenced
(preceded by an @) in which case the specific variable is resolved irrespective of the context. Show picture

Mimic
Displays a selected mimic to the user.
The context used in the action is a combination of the zone context branch and the local branch. If the local
branch starts with an @, any zone context branch is ignored. Any variables displayed by the mimic take into
account the action context unless the name of the variable within the mimic itself is directly referenced (pre-
ceded by an @) in which case the specific variable is resolved irrespective of the context. Show picture

- 1379 -
Execute program
Allow the user to execute a selected SCADA Basic script on the server.
The context used in the action is a combination of the zone context branch and the local branch. If the local
branch starts with an @, any zone context branch is ignored. Any variables referenced in the script take into
account the action context unless the name of the variable within the script itself is directly referenced (pre-
ceded by an @) in which case the specific variable is used irrespective of the context. A program function
and arguments can be specified in a similar manner to the Send program animation in the desktop applic-
ation. If a function is not specified, the Main function will be executed. Show picture

The program does not have to be loaded with the given branch for such an action to be effective. The
script can be generic, and you can retrieve the execution context by using the verb GETARG mode
BRANCH.

Open Url
Allow the user to browse to a specific Url in an embedded web browser. There is no context for this action.
Show picture

- 1380 -
- 1381 -

You might also like