CitectSCADA 7.20 User Guide-4
CitectSCADA 7.20 User Guide-4
See Also
Installing a Driver Pack
301
Chapter: 15 Communicating with I/O Devices
You need to install a driver pack on the computer that will connect to the target device.
This computer needs to be configured as a CitectSCADA I/O Server. It needs to be also be
installed on any machines where the CitectSCADA project is compiled.
Before installing the driver pack, close your CitectSCADA runtime environment and
Citect Explorer. You need administrator permissions for the I/O Server PC.
To install a driver pack:
1. Save the driver pack to an appropriate location on the I/O Server PC.
2. Double-click the EXE file to launch the installation.
3. Follow the instructions provided by the installation Wizard.
4. You are prompted to select the CitectSCADA installation folder. If you installed Citect-
SCADA in a different folder to the default, browse to that location. An alert message
will alert you if you have selected the wrong folder.
5. Click Finish to complete the installation.
After you have installed a Driver Pack, the associated help will be automatically merged
into the Driver Reference Help.
Note: If you are installing a driver pack on an older version of CitectSCADA that pre-
cedes the initial release of the driver, the supporting help may not appear auto-
matically in the Driver Reference Help. If this is the case, you can locate the driver
help in the CitectSCADA bin directory. The help file will be named <driv-
ername>.chm.
See Also
The Driver Update Utility
302
Chapter: 15 Communicating with I/O Devices
l Unofficial Version Installed: drivers that you have installed that are newer than the
version available on the DriverWeb. This would usually mean that you are running a
tech preview or field test version, or you have a Hotfix installed.
Once you have viewed the list, you can download a driver update (or any of the new
drivers) directly from the Update Utility.
Installation
The Driver Update Utility operates independently to CitectSCADA and is installed sep-
arately. The installer is available in the Extras directory on the CitectSCADA installation
disk, or you can obtain a copy from the Citect DriverWeb at http://ww-
w.citect.com/driverweb.
Note: The Driver Update Utility needs an Internet connection to operate successfully.
It uses a secure 128-connection when connecting to the DriverWeb.
See Also
Installing a driver pack
303
Chapter: 15 Communicating with I/O Devices
l Do not under any circumstances change or remove any of the undocumented Citect.ini
parameters.
l Before deleting sections of the Citect.ini file, confirm that no undocumented parameters
will be deleted.
Failure to follow these instructions can result in death, serious injury, or equip-
ment damage.
Note: Always seek the advice of Technical Support personnel regarding undoc-
umented features.
Citect.ini parameters can be used to tune the performance of a CitectSCADA driver and
perform runtime maintenance diagnostics.
You can customize the way CitectSCADA communicates with the a driver (and even
individual PLCs) by creating or editing the section of the Citect.ini file named after a spe-
cific driver, for example, [MODBUS].
There are some ini parameters that are common to every CitectSCADA driver, as well as
custom parameters unique to each driver.
See the Driver Reference Help (Help menu | Driver Help) for the ini parameters related
to each driver, and their default values.
When CitectSCADA starts at runtime, it reads configuration values from the Citect.ini
file that is stored locally. Therefore, any configuration settings needs to be included in
the Citect.ini file located on the computer acting as the I/O Server to the devices in the
system.
By default, CitectSCADA looks for the Citect.ini file in the CitectSCADA project\bin direc-
tory. If it can't find the file there, it searches the default Windows directory.
304
Chapter: 15 Communicating with I/O Devices
Note: With the release of V7.20, a feature called persistence can be applied to I/O
devices in memory mode. Using a Persisted Memory I/O device is recommended as
an alternative to using a disk I/O device, as full synchronization is supported if a
server becomes unavailable for a period of time. See Persisted I/O Memory Modefor
more information.
Once configured, disk I/O devices appear exactly as any other I/O device in your system,
but are not connected to any field equipment. Disk I/O devices can contain any type of
variable supported by CitectSCADA, and you can configure them to emulate any sup-
ported I/O device. You can also specify a generic protocol for a disk I/O device.
A disk I/O device is useful when the status of your plant needs to be restored after a
planned or unplanned system shutdown. You can configure your system to continually
update a disk I/O device with the subset of variables that defines the status of your
plant. When you restart your system after a shutdown, CitectSCADA can restore this
status immediately.
You can also use disk I/O devices for storing predefined data that needs to be recalled
immediately when a process is necessary (for example, in a simple recipe system).
Note: If you create a RAM disk in the computer for the disk I/O device, you do not
need to create or copy the disk file to the RAM disk. CitectSCADA automatically
creates a disk file on startup. Do not set up your Disk I/O device on a RAM disk if
you want the data written to it to survive a power cycle of the Servers.
See Also
Disk I/O Device setup
Redundant Disk I/O Devices
Using Memory Mode
305
Chapter: 15 Communicating with I/O Devices
I/O Device A name or your Disk I/O Device, for example: DISK_PLC. Each I/O
name Device needs to have a unique name in the CitectSCADA system.
I/O Device A unique number for the disk I/O Device (1-4095). Each I/O Device
number needs to have a unique number in the CitectSCADA system.
I/O Device The path and filename of the disk file, for example:
address
[RUN]:DSKDRV.DSK
If you are using redundant disk I/O Devices, specify the path to both
the primary file and the Standby file in the configuration of both disk
I/O Devices.
Primary_File, Standby_File
Primary_File is the name (and path) of the primary disk I/O Device
file. You may use path substitution in this part of the field.
Standby_File is the name (and path) of the Standby Disk I/O Device
file. You may use path substitution in this part of the field.
Notes:
306
Chapter: 15 Communicating with I/O Devices
I/O Device If not using redundant disk I/O Devices, leave this property blank.
startup
mode If you are using redundant disk I/O Devices, use either:
StandbyWrite: This disk I/O Device will remain unused until the com-
puter with the primary disk I/O device configured becomes inoperative.
Every write request sent to the primary disk I/O Device is also sent to
this disk I/O Device.
See Also
Redundant Disk I/O Devices
Disk I/O Device Errors
307
Chapter: 15 Communicating with I/O Devices
When the system is operating, CitectSCADA reads and writes runtime data to the disk
I/O Device configured in the primary server. It also writes runtime data to the disk I/O
Device configured in the standby server. (CitectSCADA maintains both disk I/O Devices
identically.)
If the primary server becomes inoperative, the Disk I/O Device in the standby server is
activated without interrupting the system. When the primary server becomes active,
CitectSCADA automatically returns control to the primary server, and copies the Disk
I/O Device from the standby server to the primary server. The Disk I/O Device in the
standby server reverts to its standby role.
To define a redundant disk I/O Device:
Errors Message
308
Chapter: 15 Communicating with I/O Devices
See Also
Disk I/O Device Setup
Redundant Disk I/O Devices
309
Chapter: 15 Communicating with I/O Devices
310
Chapter: 15 Communicating with I/O Devices
5. On the I/O Device dialog, for disk I/O devices set Background Poll back to FALSE, set
Memory to TRUE and clear out the Port Name field as it is not necessary for Memory
Mode.
6. Restart the I/O server to finish the migration to persisted memory I/O mode, with
your devices now containing your original values from the disk I/O device.
See Also
Using Memory Mode
311
Chapter: 15 Communicating with I/O Devices
Hardware Alarms
When an error occurs in a CitectSCADA operation, a hardware alarm is generated. Hard-
ware alarms are typically displayed on a dedicated page within a project, allowing an
operator to monitor the status of a system's infrastructure.
Hardware alarms will indicate if break in communications has occurred, if Cicode can't
execute, if a server becomes inoperative, and so on. If you are having problems com-
municating with a device, initially check the hardware alarms page for evidence of an
error.
See Hardware Alarms.
Driver errors
There are two types of driver errors that are logged to syslog.dat:
l generic
l driver-specific
Generic errors are common to many drivers, and are mapped to general hardware
errors.
Driver-specific errors are unique to a particular driver. A driver will convert a specific
error into a generic error so that it can be recognized by the hardware alarm system.
However, if further investigation is necessary, you can refer to a description of the orig-
inal error in the Driver Reference Help. This includes a description of the errors asso-
ciated with each driver.
See Driver Error Messages.
312
Chapter: 15 Communicating with I/O Devices
Citect Kernel
The Citect Kernel is a gateway into the internal workings of CitectSCADA at runtime,
and is provided for diagnostics and debugging purposes.
The Kernel can display several different diagnostic windows each providing an active
view of the CitectSCADA runtime system.
The Citect Kernel Driver window, launched via the Page Driver Kernel command, dis-
plays information about each driver in the CitectSCADA system. The statistics it
presents include read requests, physical reads, digital reads per second, register reads,
cache reads, error count, timeouts, and so on.
See Using the Citect Kernel.
See also
Debugging communications
313
Chapter: 15 Communicating with I/O Devices
Example
[COMx]
WritePortName=PORT_1,PORT_2
WriteDebugLevel=1
WriteFileSize=2000
ReadPortName=PORT_1
ReadDebugLevel=1
ReadFileSize=1000
StatusPortName=PORT_2
StatusDebugLevel=1
StatusFileSize=10
314
Chapter: 15 Communicating with I/O Devices
l WPORT_1.dat
l WPORT_2.dat
l RPORT_1.dat
l SPORT_2.dat
In general, the format for the file names is "R", "W" or "S" followed by the Port name
requested, followed by ".dat". The file names represent the corresponding "Read", "Write"
and "Status" files.
File formats
The Write file will adopt the following format:
LINE 1 WRITE Debug file Started PORTNAME Debug Level 1 DOW MONTH DOM
HH:MM:SS.sss
LINE 2 HH:MM:SS.sss
LINES AA BB CC ..
4...
where:
Example:
315
Chapter: 15 Communicating with I/O Devices
LINE 1 READ Debug file Started PORTNAME Debug Level 1 DOW MONTH DOM
HH:MM:SS.sss
LINE 2 HH:MM:SS.sss
LINES AA BB CC ..
4...
where:
Example
STATUS Debug file Started PORTNAME Debug Level 1 DOW MONTH DOM
LINE HH:MM:SS.sss
1
HH:MM:SS.sss
LINE
2
modemStatus X
LINE
3
Example
316
Chapter: 15 Communicating with I/O Devices
More parameters might be added later, so check the COMx information and the Citect
Knowledge Base regularly.
See Also
Debugging a TCP/IP driver
317
Chapter: 15 Communicating with I/O Devices
318
Chapter: 15 Communicating with I/O Devices
319
Chapter: 15 Communicating with I/O Devices
320
Chapter: 15 Communicating with I/O Devices
Test Setup
Test setup
1. Do not configure any other protocols. Temporarily delete other boards and units
while performing this test.
2. Configure a unit for each port to be tested. Make the I/O Devices form look as follows:
l Name: <unique name for the I/O Device>
l Number: <unique network number for the I/O Device>
l Address: NA
l Protocol: LOOPBACK
l Port Name: <the "Port Name" in the Ports form>
3. The following Citect.ini options are supported:
321
Chapter: 15 Communicating with I/O Devices
l [LOOPBACK]
Note: The COMx driver does not support internal loop-back. The external loop-
back is the default mode.
Size - Sets the maximum frame size. The length of each frame transmitted is random
between 1 to 'Size'-1. The default size is 512.
4. Start up CitectSCADA. Each port will transmit a frame of random length. This proc-
ess is repeated when the entire frame is received.
5. Open the kernel, type "page driver" and press Enter. Type V to set the display mode
to 'verbose'. The following statistics appear:
l Number of characters transmitted.
l Number of frames transmitted.
l Number of characters received.
l Elapsed time in milliseconds.
l Characters received per second.
l Start time in milliseconds.
l Total number of errors.
l Error code of last detected error.
Note: The total number of errors should be 0. If the number of errors reported is
not zero, your serial hardware is not operating properly.
322
Chapter: 15 Communicating with I/O Devices
The diagram below shows the loop-back connections to use with RS-422 or RS-485.
323
Chapter: 15 Communicating with I/O Devices
Performance Considerations
Many external factors influence the performance of control and monitoring systems. The
capabilities of the computer, the I/O Device(s), and the communication pathway between
them are obvious factors. The faster they can transfer data, the faster your system oper-
ates. (CitectSCADA always attempts to maintain a data transfer rate as fast as the I/O
Device hardware can support.) The data transfer rate is hardware dependent: once you
have installed the hardware, your ability to influence this characteristic is limited.
However, there is one area where you can directly affect the performance of your run-
time system: the arrangement of data registers in the I/O Device(s).
See Also
Caching data
Grouping registers
Remapping variables in an I/O Device
Caching data
On large networked systems with many clients, you can improve communications turn-
around time by using memory caching.
When caching is enabled, data that is read from an I/O Device is stored temporarily in
the memory of the I/O Server. If another request is made (from the same or another
client) for the same data within the cache time, the CitectSCADA I/O Server returns the
value in its memory, rather than rereading the I/O Device. Data caching results in faster
overall response when the same data is necessary by many clients.
A cache time of 300 milliseconds is recommended. Avoid using long cache times (in
excess of 1000 milliseconds), as this may negatively impact the timely delivery of infor-
mation to the system.
Note: Do not use data caching for disk I/O devices as they implement a cache them-
selves.
324
Chapter: 15 Communicating with I/O Devices
Normally, upon request from a client, an I/O Server reads status data from an I/O
Device, and passes it back to the requesting client.
If the server receives subsequent requests from other clients before the original data is
returned to the first client, it optimizes the read by automatically sending the original
data back to requesting clients. (Page General Blocked Reads shows this count).
If a client requests the same data immediately after the server returned the data to a
client, the server rereads the device unnecessarily.
Setting the data cache time to 300 ms (or similar) prevents identical repetitive reads
within that cached time frame. If further clients request the identical data from the same
server up to 300 ms after the server has sent that data to an earlier client, the cached
data on the server is sent immediately in response to the subsequent requests.
CitectSCADA also uses read-ahead caching. When the data in the cache is getting old
(close to the cache time), the I/O Server will re-request it from the I/O Device. This opti-
mizes read speed for data that is about to be re-used (frequent). To give higher priority to
other read requests, the I/O Server requests this data only if the communication channel
to the I/O Device is idle.
Note: When read-through caching is enabled for a remote or scheduled I/O Device,
the persistence cache for that device is saved to disk when the active I/O Server dis-
connects from the device. This occurs regardless of the value set in [IOServer]S-
avePeriod. You can enable read-through caching by setting the parameter
[Dial]ReadThroughCache.
See Also
Grouping registers
325
Chapter: 15 Communicating with I/O Devices
Grouping registers
When you configure a CitectSCADA system, you need to define each variable (register
address) that CitectSCADA will read when your system is running. When your runtime
system is operating, CitectSCADA calculates the most efficient method of reading reg-
isters. CitectSCADA optimizes communication based on the type of I/O Device and the
register addresses.
When CitectSCADA requests data from an I/O Device, the value of the register is not
returned immediately; an overhead is incurred. This overhead (associated with protocol
headers, checksum, device latency, and so on) depends on the brand of I/O Device, and
is usually several times greater than the time necessary to read a single register. It is
therefore inefficient to read registers individually, and CitectSCADA usually reads a con-
tiguous block of registers. Because the overhead is only incurred once (when the initial
request is made), the overhead is shared across every register in the block, increasing the
overall efficiency of the data transfer.
However, reading a block of registers where only a small percentage of the block is actu-
ally used is also inefficient. If the registers that your CitectSCADA system will read are
scattered throughout the memory of your I/O Device, excessive communication will be
necessary. CitectSCADA needs to either read many contiguous blocks (and discard the
unused registers), or read registers individually, degrading system performance. You can
avoid this by grouping the registers that CitectSCADA will read.
CitectSCADA continually reads registers associated with alarms. (If an alarm condition
occurs, CitectSCADA can display the alarm immediately.) therefore group registers that
indicate alarm conditions.
Registers associated with status displays (objects, trends, and so on) are only read as
they are necessary (that is, when the associated graphics page is displayed) and are
appropriately grouped according to the pages on which they are displayed.
Registers used for data logging are read at a frequency that you define. They are grouped
according to the frequency at which they are read.
The following table shows an ideal register grouping for a CitectSCADA system:
Digital Alarms
Digital status unique to Graphics Page 1 Analog status unique to Graphics Page n
326
Chapter: 15 Communicating with I/O Devices
Digital status common to more than one Graph- Analog trends (for data logging) on smallest
ics Page timebase (for example 1 sec)
All other digital status, for example for logging. Analog alarms
While memory constraints and the existing PLC program might impose limitations,
grouping registers into discrete blocks, even if they are not consecutive blocks, will
improve system performance.
When designing your system, allow several spare registers at the end of each block for
future enhancements.
See Also
Remapping variables in an I/O Device
327
Chapter: 15 Communicating with I/O Devices
You can also reassign one type of variable (for example, an integer) to another type of
variable (for example, a digital variable).
328
Chapter: 15 Communicating with I/O Devices
To remap in CitectSCADA, first create the variables in your project as you would nor-
mally. Then you can set up the remapping, specifying that any variable with an address
in the desired range will be remapped. The I/O Server will redirect the addresses at run-
time as per the remapping instruction.
Note: Not every PLC and/or CitectSCADA driver supports remapping. It is not rec-
ommend unless necessary. Contact Schneider Electric (Australia) Pty. Ltd. Support if
you need to evaluate whether the PLC and/or driver support remapping.
Option Description
CitectSCADA variable The first remapped (CitectSCADA) variable defined in the var-
iable tags database (using the Tags dialog box); for example:
Motor_1_Run.
329
Chapter: 15 Communicating with I/O Devices
Option Description
Physical Variable The first physical variable in the PLC, for example: ReMa-
pIntV7. (79 characters maximum).
Remap Read Determines whether to perform the remapping for reads. Set
to TRUE or FALSE.
Remap Write Determines whether to perform the remapping for writes. Set
to TRUE or FALSE.
Note: To determine if the device supports remapped reads or writes, see the I/O
Device data type Help.
330
Chapter: 15 Communicating with I/O Devices
See Also
Remapping example
Remapping example
Using the CCM protocol with a GE 9030 PLC, the following remapping could be used to
optimize communication when reading some digital register values. This example is
based on the assumption that the PLC is set up correctly for remapping.
Variable tags database
The digital register values are defined as follows.
Address M1
Address M3
Address M4
331
Chapter: 15 Communicating with I/O Devices
Address M16
Notice that the address M2 is not used. Skipping addresses does not affect performance.
Remapping database
The remapping is defined as follows.
Length 16
The physical variable is an integer data type; it does not need to be defined in the var-
iable tags database (but it can be).
332
Chapter: 15 Communicating with I/O Devices
In this case, reading individual bits within these larger data types is done by reading the
designated data type and getting the CitectSCADA driver to sub-divide it into individual
bits. Writing to bits within the larger data types is more complicated, as writing to one
bit within the larger data type will at the same time overwrite the other bits within that
same data type. To prevent overwriting existing bits when writing a new bit value, a
'read-modify-write' scenario can be used to write to a bit within the larger data type.
Using this approach, the CitectSCADA driver will read the larger data type, modify the
appropriate bit within the larger data type, and then write the larger data type back to
the device.
While the 'read-modify-write' approach is necessary to avoid overwriting existing bits in
the registers of larger data types, it can create an issue if the device being written to is
also configured or programmed to modify these same registers. For example, if a PLC
device modifies the registers of one of its larger data types after the CitectSCADA driver
has read these same registers, but before CitectSCADA has written the modified value,
the changes made by the PLC will be overwritten. This outcome can be avoided if Citect-
SCADA and any devices using these data types are configured so that only one or the
other has write access at any given time.
This 'read-modify-write' method has a serious operational concern: if the device modifies
the larger data type after the CitectSCADA driver has read it, but before CitectSCADA
has written the new value, any changes made by the device are overwritten. This issue
could be serious in a control system, and it is recommended that the device and Citect-
SCADA be configured so that only one of these systems writes to the data types of this
kind.
When the read-modify-write method will be used to alter a data type's bit values, configure
your system so that Citect and the host device do not have simultaneous write access to the
affected memory ranges.
Failure to follow these instructions can result in death, serious injury, or equip-
ment damage.
333
Chapter: 15 Communicating with I/O Devices
4. The CitectSCADA driver then changes bit 3 of its copy of the register to 0x0Ah. When
it writes to the PLC, it overwrites the PLC's copy of the whole register (not just the
changed bit). Because the PLC code modified bits 0 and 4 in the interval between
CitectSCADA's read and write, these changes are overwritten.
334
Chapter: 15 Communicating with I/O Devices
PLC_VAR = 1234;
Prompt("Variable is " + PLC_VAR : ####);
FUNCTION
TestFunc(INT nValue)
PLC_VAR = nValue;
END
Another side effect of the delays inherent in asynchronous writes to I/O devices is that
you might assume that CitectSCADA has successfully written to the I/O Device, when in
fact the write operation might not yet have been completed or even attempted. In such
cases, it is still possible that a hardware- or configuration-based error will prevent the
success of the write operation. While such an unsuccessful write operation will generate
an error, your Cicode cannot be notified or use the IsError() function because the Cicode
has continued to execute past the initial I/O device write command. Therefore, when it is
important to check the success of a write operation before allowing code execution to con-
tinue, you might insert the function TagRead() after the write and then verify the value of
335
Chapter: 15 Communicating with I/O Devices
the variable. TagRead() forces Cicode to re-read the I/O Device variable so that you can
check the new value. TagRead() is a blocking function. It blocks the calling Cicode task
until the operation is complete.
PLC_VAR = 1234;
sTestStr = TagRead("PLC_VAR");
IF sTestStr <> 1234 THEN
Prompt("Write not completed");
END
Here the data will be read from the physical PLC, not from the I/O Server cache, as the
I/O Server will invalidate any cached data associated with a PLC write. This will allow
you to test for a completed write. Please be aware that other Cicode tasks running at the
same time will not be waiting on the TagRead, so they might see the old or new value,
depending on if they are using the same copy of the PLC variable. You can also stop
CitectSCADA from writing to the local copy of the variable by using the function Code-
SetMode(0, 0).
336
Chapter: 15 Communicating with I/O Devices
You need to have at least one modem at the I/O Server end, and at least one at the I/O
Device end.
See Also
Modems at the I/O Server
Modems at the I/O Device
I/O Device constraints for multi-dropping
Configuring multidrop remote I/O Devices
I/O Server redundancy for dial-up remote I/O Devices
Troubleshooting dial-up remote I/O Device communications
Dial- Makes calls to remote I/O Devices in response to a CitectSCADA request; for
out example, scheduled, event-based, operator request, and so on. Also returns
calls from remote I/O Devices.
Dial- Only receives calls from remote I/O Devices, identifies the caller, then hangs up
in immediately so it can receive other calls. CitectSCADA then returns the call
using a dial-back or dial-out modem.
Dial- Receives calls from remote I/O Devices and makes scheduled calls to remote I/O
in Devices.
and
dial-
out
Your modem setup depends on your system requirements. When making your decision,
consider the following guidelines:
l If you need to communicate with multiple remote I/O Devices at once, you will need
a separate modem for each I/O Device. Otherwise you'll have to wait as I/O Devices
are contacted one after the other, and incoming calls may be held up.
l If you have scheduled requests to I/O Devices and you also need to urgently return
calls from remote I/O Devices that dial in, you will need at least one modem for each
337
Chapter: 15 Communicating with I/O Devices
of these functions. For example, if you have a large number of remote I/O Devices
and you require fast responses by CitectSCADA, provide an additional modem at the
I/O Server. This would reduce the chances of it being engaged when an I/O Device
dials in (say, with an urgent alarm).
l In a big system with many remote I/O Devices or a system where calls from remote
I/O Devices can be time sensitive, it's a good idea to dedicate at least one modem to
Dial-Back. This will give you quick responses to Dial-In calls (from remote I/O
Devices). It also means your dial-out schedules won't be disrupted (if you use the
same modem for returning calls and scheduled calls, the scheduled calls are forced to
wait until the dial-back call is complete).
See Also
Modems at the I/O Device
Example configurations for modems at the I/O Server
Note: Wherever your modem is, you need to verify that its Data bits, Parity, Stop
bits, and Serial Port Speed settings are compatible with the remote I/O Device as
defined by the device's manufacturer or your communications link will not work.
See Also
Modems at the I/O Server
338
Chapter: 15 Communicating with I/O Devices
All your remote I/O Devices have the same communication requirements (data bits, stop
bits, parity, and baud rate) - 19200 8 E 1.
You don't expect any important calls from your I/O Devices, or you only have a few
remote I/O Devices. This means you can use a single modem at the I/O Server end. This
modem would be set up to answer and return incoming calls and make scheduled and
other CitectSCADA initiated calls.
To configure your modem, define it in Windows. Assuming that the logical modem is
called 'Standard Modem', configure it as follows:
You would then configure it in CitectSCADA as a dial-out modem and dial-in modem:
Example 2
In this example, your I/O Devices use a total of two different communication spec-
ifications - 9600 7 O 1 and 19200 8 E 1.
You don't expect important calls from I/O Devices or you have only a few I/O Devices.
This means you can get by with a single modem at the I/O Server end. This modem has
to receive and return calls from I/O Devices as well as initiate calls (dial out) to I/O
Devices.
To configure your modem, you need to first define it in Windows (through the Windows
Control Panel). Remember, you're not just defining the physical modem here. You have
to define a separate Windows (virtual) modem for each communication specification.
So far, this gives you two virtual modems - one for 9600 7 O 1 and one for 19200 8 E 1.
However, Windows won't let you define both of these modems as dial-in. It only lets you
define one dial-in modem per port. If you choose the first, it won't be able to receive calls
with the second, and vice versa.
This means you have to set up a separate virtual modem that can answer calls no
matter which communication specification is used. This modem would be set with a
generic communication specification of 9600 8 N 1.
339
Chapter: 15 Communicating with I/O Devices
So in Windows, you'll end up with three logical modems (two for Dial-Out and one for
Dial-In). Assuming that the logical modems are called 'Standard Modem' to 'Standard
Modem #3', you would configure them as follows:
Example 3
In this example, there are five different communications frameworks - 9600 7 O 1, 19200
8 E 1, 4800 8 N 1, 9600 8 N 1, and 19200 8 N 1.
If you expect important calls from I/O Devices or you have many I/O Devices, you
would set up three modems at the I/O Server end:
l One on COM3 dedicated to receiving calls from 9600 7 O 1 I/O Devices.
l One on COM2 for dialing out to 4800 8 N 1, 9600 8 N 1, and 19200 8 N 1 I/O
Devices.
l One on COM1 for dialing out to 9600 7 O 1 and 19200 8 E 1 I/O Devices.
The two dial-out modems would return calls as well as initiate calls in response to
scheduled requests, and so on.
340
Chapter: 15 Communicating with I/O Devices
To configure your modems, you need to first define them in Windows (through the Win-
dows Control Panel). Remember, you're not just defining the physical modem here. You
have to define a separate Windows (virtual) modem for each communication frame-
work.
Assuming that the logical modems are called 'Standard Modem' to 'Standard Modem
#6', you would configure them as follows:
341
Chapter: 15 Communicating with I/O Devices
Example 4
In this example, your I/O Devices use three different communication frameworks: 9600 7
O 1, 19200 8 E 1, and 9600 8 N 1. However, in this example, you are expecting impor-
tant calls from I/O Devices, so you need a modem dedicated to returning calls.
Here you need to configure your modems like this:
l One modem on COM1 to dial remote I/O Devices (for scheduled calls, and so on).
l One modem on COM2 to receive calls from remote I/O Devices.
l One dedicated modem on COM3 to return these calls.
To configure your modems, first define them in Windows (through the Windows Control
Panel). Remember, you're not just defining the physical modem here: you need to define
a separate Windows (virtual) modem for each communication framework. This means
you have to configure:
l Three logical modems on the port to which the physical dial-out modem is attached.
l One logical modem on the port to which the physical dial-in modem is attached.
l Three logical modems on the port to which the physical dial-back modem is
attached.
Assuming that the necessary total of seven logical modems are called 'Standard Modem'
through to 'Standard Modem #7', configure these modems as follows:
342
Chapter: 15 Communicating with I/O Devices
343
Chapter: 15 Communicating with I/O Devices
344
Chapter: 15 Communicating with I/O Devices
Note: If you are multi-dropping and you want to be able to dial in to the I/O
Server, use your I/O Devices to issue the caller ID, not the modem. This is because
using the modem to issue the ID will send the same ID no matter which I/O
Device the call is relevant to. This makes it difficult to identify the I/O Device that
triggered the call.
By using the I/O Device to issue the ID, the I/O Server will receive a unique caller ID for
each I/O Device. However, not every I/O Device are capable of issuing caller IDs. If
multi-dropping, use I/O Devices that can issue caller IDs.
To set up a modem connected to your dial-up remote I/O Devices:
You can connect multiple I/O Devices to the same modem. This means CitectSCADA
can communicate with these I/O Devices one after the other using the same phone con-
nection, rather than hanging up and re-dialing. This will reduce the number of necessary
telephone calls and increase the speed and efficiency of communications.
1. Connect the modem to a PC with a telephony program installed (for example Hyper-
Terminal or PhoneDialer). This is where you will configure the modem to answer
calls from CitectSCADA and/or initiate calls.
2. If the modem is necessary to make calls to CitectSCADA, configure it to initiate the
phone call to a pre-determined CitectSCADA I/O Server Dial-In type modem (fol-
lowing manufacturer instructions).
345
Chapter: 15 Communicating with I/O Devices
3. Depending on your hardware either the modem or an intelligent PLC can be respon-
sible for initiating calls to CitectSCADA and identifying the caller. Whichever is
responsible needs to have a caller ID set. The caller ID can be any combination of
alpha-numeric characters and/or the character '_' (underscore).
Some modems have dip-switch settings, and some have initiation strings which can
include auto-dial-up numbers that are stored within the modem's non-volatile mem-
ory. Consult the manual provided with the modem for exact details.
You can use either the Express Communications Wizard or the I/O Devices form to
set the caller ID for an I/O Device.
If multi-dropping off a single modem, use your I/O Devices to issue the caller ID, not
the modem. This is because using the modem to issue the ID will send the same ID
no matter which I/O Device the call is relevant to, making it difficult to identify
which I/O Device triggered the call.
By using the I/O Device to issue the ID, the I/O Server will receive a unique caller ID
for each I/O Device. However, not every I/O Device is capable of issuing caller IDs. If
you are multi-dropping, use I/O Devices that can issue caller IDs.
4. Set the modem's Data bits, Parity, Stop bits, and Serial-Rate to match manufacturer
specifications for communication with the I/O Devices.
Some modems do not allow you to manipulate their communications settings via
methods such as extended AT commands or dip switches. If this is the case, the only
way of setting the necessary values is to communicate with the modem using the
values (for example, via HyperTerminal). Once this is done, the modem remembers
the last values used to communicate with its serial port.
5. Connect the modem to the I/O Devices.
To configure a modem at the I/O Server you need to set it up in Windows and then set it
up in CitectSCADA.
If every one of your I/O Devices are the same, you only have to do this once for each
modem. However, if your I/O Devices talk using different communication specifications
(data bits, parity, stop bits, and serial-rate), your modem has to be able to talk using each
of these details as well. To set this up, you have to create a modem in Windows and
CitectSCADA for each specification. (See Example configurations for modems at the I/O
Server)
To set up a modem in Windows
346
Chapter: 15 Communicating with I/O Devices
Note: Do not select a brand name modem from the Manufacturers list, even if the
name of the modem you're installing is included in the list. Do not click Have
Disk.
5. Select the Standard xxxx bps modem rate from the list of models to exactly match
the bit per second rate of the I/O Device that is going to be communicating via this
modem. Check the device to determine the device communication rate. If you are still
unsure, select the 9600 bps model. This can be changed later if necessary.
6. Do not click Have Disk. Click Next.
7. Select the COMx Port that the modem is connected to. Click Next.
8. Click Finish. Windows displays the modem in the list of modems on the Modems
Properties form.
9. No option was given for the selection and setting of the Data bits, Parity, or Stop bits
information. The Modems wizard automatically defaults to 8-none-1 for Standard
Modem types. To change these settings to match the Data bits, Parity, Stop bits
requirements of the remote I/O Device, select a modem in the list, then click the Prop-
erties button.
10. Click the Advanced tab and click Change Default Preferences.
11. Click the Advanced tab at the next dialog to gain access to the Data bits, Parity, Stop
bits settings for the modem.
12. Change the Data bits, Parity, and Stop bits settings using the drop-down options, so
that they exactly match those being used by the remote I/O Device and its remote
modem. Don't change any advanced settings. (The default is Hardware flow control.)
13. Click OK. If a modem of the same rate is installed to the same port as an existing
modem, Windows asks for confirmation that you want to install the same thing more
than once. Click Yes to install a duplicate copy of the modem.
14. Preconfigure the modem(s) to be used at the remote dial-up I/O Device(s). These will
be used to test modem configuration settings in the next step.
15. With CitectSCADA not running, confirm that the local and remote modems will prop-
erly communicate with each other by using a terminal communications program
such HyperTerminal or PhoneDialer (both supplied with Windows).
Once the modem(s) are set up and tested with proven communications in Windows,
they can then be set up in CitectSCADA.
To set up a modem in CitectSCADA:
Before completing this procedure, verify that you have set up your modem in Windows
(as described above).
347
Chapter: 15 Communicating with I/O Devices
Option Description
Server Name (16 The name of the I/O Server to which the modem is attached.
Chars.)
Modem Name (64 The name of the modem you are configuring (as it appears in the
chars.) Windows Control Panel | Phone and Modem Options).
Use this modem to Determines whether this modem will be used to initiate calls from
make outgoing calls the I/O Server to a dial-up remote I/O Device. (Dial-Out)
Use this modem to Determines whether this modem will be used to receive calls from
answer incoming a dial-up remote I/O Device. (Dial-In)
calls
The following fields are implemented with extended forms (press F2).
Use this Determines whether this modem will be used to initiate calls from the
modem to I/O Server to a dial-up remote I/O Device in response to a call received
call back I/O from the I/O Device. (Dial-Back)
Devices
Note: CitectSCADA allows you to set up a maximum of 256 modems on the I/O
Server for communication with remote dial-up I/O Devices. Before it can suc-
cessfully establish communication, any targeted remote I/O Devices need to also
be properly configured within CitectSCADA on the I/O Server.
348
Chapter: 15 Communicating with I/O Devices
If you set the ring count to 3 on IOServer1 and 4 on IOServer2, IODev_1 will attempt to
call IOServer1. If IOServer1 has not answered the call after 3 rings, IOServer2 will
answer it.
See Also
Troubleshooting dial-up remote I/O Device communications
349
Chapter: 15 Communicating with I/O Devices
If the modem at the PC end is configured so that calls are automatically answered even
when your CitectSCADA project is off, data being reported from the I/O devices may be
lost. Therefore, it is recommended that you turn off the PC modem's auto-answer feature
before taking your project offline. To do this, set the following parameter to zero:
Be aware, however, this will also impact applications that might use the modem other
than CitectSCADA, as the modem cannot answer a call while CitectSCADA is not driv-
ing its functionality.
On the modem at the I/O Device end
350
Chapter: 15 Communicating with I/O Devices
Scheduled Communications
CitectSCADA allows you to schedule communications with your I/O Devices (regardless
of the type of connection: modem, radio link, etc.). For example, if you have multiple I/O
Devices on a single network or line, you can schedule reads so that the important I/O
Devices are read more often than less important I/O Devices. Alternatively, a water sup-
plier with radio link connections to dam level monitors might schedule hourly level
reads from CitectSCADA in order to conserve band-width.
See Also
Specifying a schedule
Writing to the scheduled I/O Device
Reading from the scheduled I/O Device
Specifying a schedule
To configure scheduled communications with an I/O Device, you need to flag it as a
"Scheduled" device. This is done using the Express Communications Wizard. If your I/O
Device is not capable of scheduled communications, the scheduling options will not be
presented by the wizard.
Note: Scheduled communications will not work for drivers that are designed to han-
dle Report-By-Exception protocols. For communicating with your I/O Device outside
of schedule use the IODeviceControl function.
1. Select the Project Editor (or press the Project Editor icon).
2. Choose Communication | Express Wizard or open Citect Explorer.
3. Double-click the Express I/O Device Setup icon in the Communications folder of the
current project.
4. Follow the instructions to work through the screens, selecting the relevant I/O Device,
and so on. When the scheduling screen displays, check the Connect I/O Device to
PSTN box, even if your I/O Device is not connected via a modem (but leave the
Phone number to dial and Caller ID fields blank).
5. Fill out the schedule fields to achieve the desired schedule. For example (all based on
a Synchronize at time of 10:00:00).
If you enter 12:00:00 in the Repeat every field, and start your project at 9 a.m., the I/O
Server will communicate with the I/O Device at 10 a.m., then once every 12 hours after
that, i.e. 10 p.m., then again at 10 a.m. of the following day, etc.
351
Chapter: 15 Communicating with I/O Devices
l If you enter 12:00:00, and start your project at 4 p.m., the I/O Server will com-
municate with the I/O Server at 10 p.m., then again at 10 a.m. of the following
day, etc. i.e. it will assume that communications were established at 10 a.m., so it
continues as if they had been, communicating once every 12 hours after 10 a.m.
l If you enter 3 days, and start your project at 9 a.m. on a Wednesday, the I/O
Server will communicate with the I/O Device at 10 a.m., then once every 3 days
after that, i.e. 10 a.m. on the following Saturday, then at 10 a.m. on the following
Tuesday, etc.
l If you enter the 6th of December in the Repeat every, and start your project during
November, the I/O Server will communicate with the I/O Device at 10 a.m. on
December 6, then again on December 6 of the following year, and so on.
6. Select On Startup for a persistent connection. To disconnect a persistent connection,
you need to call the IODeviceControl() function with type 8.
7. If your I/O Device is not connected via a modem, you need to go to the Ports form
(select Ports from the Communication menu) and change the Port number to the
actual number of the COM port.
See Also
Writing to the scheduled I/O Device
Note: Don't control hardware using a scheduled I/O Device, as the exact state of the
hardware may not be known. Although you can read the state from the cache, it may
have changed since the cache was created.
Do not use a scheduled I/O device to control hardware in a system managed by CitectSCADA.
Failure to follow these instructions can result in death, serious injury, or equip-
ment damage.
352
Chapter: 15 Communicating with I/O Devices
See Also
Reading from the scheduled I/O Device
Note: Because the I/O Server reads tags on initiation of communication, the license
point count is increased, even though some of the tags read may not actually be
used.
INT hTask;
// Initiate communications and read tags.
// Sleep time will depend on how fast your
// modems connect.
FUNCTION
DialDevice(STRING sDevice)
INT bConnected = 0;
INT nRetry = 5;
hTask = TaskHnd("");
IODeviceControl(sDevice, 7, 0);
Sleep(20);
WHILE bConnected <> 1 AND nRetry > 0 DO
bConnected = IODeviceInfo(sDevice, 18);
nRetry = nRetry - 1;
Sleep(10);
END
IF bConnected = 1 THEN
WHILE TRUE DO
Sleep(2);
IODeviceControl(sDevice, 16, 0);
353
Chapter: 15 Communicating with I/O Devices
END
END
END
// Kill the read task and terminate the connection.
FUNCTION
HangupDevice(STRING sDevice)
TaskKill(hTask);
IODeviceControl(sDevice, 8, 0);
END
You can also force the I/O Server to read data directly from an I/O Device by enabling
Read-Through Caching. With [Dial]ReadThroughCache set, while the I/O Server is con-
nected to a device it will supply data to requesting clients directly from the device. The
cache is not updated during this time, but is refreshed with the most recent device data
just before the server disconnects.
Note: If using modems, you might need to adjust or deactivate the inactivity timer in
your modems to stop them from disconnecting while no data is being read. The inac-
tivity timer is controlled by the S30 register. If your modem doesn't support this reg-
ister, please consult your modem's manual.
354
Chapter: 16 Tagging Process Variables
You need to assign a variable tag to each I/O Device variable that CitectSCADA uses in
your runtime system. To define your variable tags, you declare them in the variable tag
database. The variable tag becomes a label, used to reference the data value of the I/O
Device register at the specified address. Using labels has several benefits:
l You do not have to remember the address every time you want to use the variable.
You use the tag name, which has to be logical and descriptive, and therefore less con-
fusing.
l The address in the I/O Device is defined only once. If you change the address, you
only need to update the variable tag definition, not every instance in your con-
figuration.
l You can scale the raw data to an appropriate range in the same declaration.
l You can access extended data value, quality and timestamp information.
You need to define your variables as a specific data type. The most common variables
supported by I/O Devices are digital and integer. CitectSCADA also supports real, string,
byte, bcd, long, and longbcd data types.
After you have defined your variable tags, you can use them to:
l Display objects on a graphics page.
l Store data for trending and analysis. (See Trending Data.)
l Monitor Alarms. (See Configuring and Processing Alarms.)
l Control equipment and processes. (See Defining Commands and Controls.)
l Store data in memory (See Configuring Local Variables.)
The most common variables supported by I/O Devices are digital and integer variables,
although some I/O Devices support other numeric variables and strings.
See Also
Tag name syntax
Tag Extensions
Tag Data Types
Using structured tag names
Configuring Local Variables
Configuring Variable Tags
Formatting numeric variables
Using arrays
355
Chapter: 16 Tagging Process Variables
Tag Naming
CitectSCADA puts a couple of restrictions on the names of variable tags:
l Tags are restricted to using a specific syntax. See Tag name syntax.
l Do not give Tags the same name as Cicode functions within the project or within any
included projects. An error will result during compilation if a tag has the same name
as a Cicode function and is placed on a graphic page. See Defining Variable Tag
Names for a list of restrictions on naming.
In addition, using a tag naming convention will make your project easier and faster to
design, configure, commission, and maintain. See Using structured tag names for rec-
ommendations about naming conventions.
That is, the tag name needs to begin with either an alpha character (A-Z or a-z) or the
underscore character (_). Any following characters needs to be either alpha characters
(A-Z or a-z), digit characters (0 - 9), backslash characters (\), or underscore characters (_).
The use of any other characters will result in a compiler error.
For example, '_MyTag123' and 'my\New\Tag' are both valid tag names, whereas '\Ne-
wTag\' is invalid.
Tag names that begin with a numeric character, such as '12TagName', are only valid if
the INI parameter [General]TagStartDigit is set to 1 (the default value is zero).
Note: The name of an Alarm Tag needs to follow this syntax but the Alarm Name
does not.
356
Chapter: 16 Tagging Process Variables
Area_Type_Occurrence_Attribute
Area
The Area section identifies a plant area, number, or name. If you use a prefix that iden-
tifies tags within a particular area, you can easily duplicate CitectSCADA functions
within the area. For example, if you have three boilers with the same controls on each
boiler, you can configure the tags for boiler number one, and copy the tags to boilers two
and three. You then only need to change the area section in the tag names to the area of
the second and third boiler. The remainder of the tags remain unchanged, for example:
If you do not need this facility, you can omit the Area section of the Tag Name to reduce
the number of characters in the tag.
Type
The Type section identifies the Type of parameter, process equipment, or control hard-
ware. The ISA standard naming system is recommended.
357
Chapter: 16 Tagging Process Variables
B1_PUMP_101_PV Pump
B1_VALVE_101_PV Valve
Occurrence
The Occurrence section identifies the loop number.
Attribute
The Attribute section identifies the attribute or particular parameter that is associated
with the loop.
B1_TIC_101_SP Setpoint
B1_TIC_101_OP Output
B1_TIC_101_I Integral
358
Chapter: 16 Tagging Process Variables
Recommended Attributes
Genies and Super Genies supplied with CitectSCADA use the following attribute con-
vention. If you follow this convention, you can use the Genies without having to modify
them.
359
Chapter: 16 Tagging Process Variables
360
Chapter: 16 Tagging Process Variables
_DEV Deviation
361
Chapter: 16 Tagging Process Variables
Note: To keep the tag names shorter you can omit the underscore, but you would sac-
rifice readability; for example: B1TIC101PV instead of B1_TIC_101_PV.
Tag Extensions
A variable tag is a representation of data elements. Each element provides access to a
view of the data value for the tag.
Each variable tag can be used on its own or by referencing a particular element to access
the following information:
Element Description
.field The field element, which represents the latest field data received from the device
(see Reading Tag Values).
.valid The valid element, which represents the last field data which had ‘Good’ quality
(see Reading Tag Values).
.override The override element, which represents the overridden tag value (see Controlling
and Overriding Tag Values).
.overridemode The override mode, which is used to set the override behavior of the tag (see Over-
ride Mode).
.controlmode The control mode, which is used to set the control inhibit mode of the tag (see Con-
trol Inhibit Mode).
.status The tag status element, which is used to represent the current status of the tag
(see Tag Status).
The tag and each element have items that can be referenced to access the following infor-
mation:
Item Description
v The value, which will access the data value of the tag or element.
vt The value timestamp, which will access the timestamp of when the value last
changed.
q The quality, which will access the quality of the value , either GOOD, UNCERTAIN or
BAD. You can access further detail from the quality using the Cicode Quality func-
tions.
qt The quality timestamp, which will access the timestamp of when the quality last
changed.
The timestamp, which will access the timestamp of when the tag or element was
t
last updated.
362
Chapter: 16 Tagging Process Variables
Element The optional element name. If the element name is not specified, the requested ele-
ment will be determined at runtime.
Item The optional item name. If the item name is not specified, the whole element is ref-
erenced.
The array index is at the end of the reference (MyArray.v[n], MyArray.Field[n], MyAr-
ray.Field.v[n]). There is only a single quality and timestamp for each array, each member
will return the same quality and timestamp.
Note: Consider the impact on network traffic when configuring tag extensions, as the
distribution of quality and value timestamps increases the amount of data being sent
between servers.
1. Reference the tag data by using only the tag name, for example ‘MyTag’ (unqualified
tag reference). This will provide default access to the Field element information, unless
the tag is in one of the override modes.
2. Reference the tag data by using the tag name and the item name, for example
‘MyTag.q (unqualified tag reference). This will provide access to the item information for
the tag, either default from Field or Override element.
3. Reference the tag data by using the tag name and the element name, for example
‘MyTag.Field’ (qualified tag reference). This reference will provide access to the specific
tag element information.
4. Reference the tag data by using the tag name, element name and the item name, for
example ‘MyTag.Field.vt’. This reference will provide access to the specific tag element
item (qualified tag reference).
You can also access alarm data similar to tag data. See Using Alarm Properties as Tags.
Controlling Tag Extension behavior
By default, the tag data referenced without an element will provide access to the data
value when the value is of quality is good and an error (#BAD, #COM, etc) when the
quality is bad. The configuration parameter PageIgnoreValueQuality can be used to
change this behavior, including automatically changing the background color of text and
number graphics objects on a page with changes in quality of the tag.
363
Chapter: 16 Tagging Process Variables
The Tag Extensions behavior is controlled by several citect.ini file settings which are
described in the .Parameter Help file. For each of these settings there is a corresponding
setting in the parameters database (param.dbf). A citect.ini file setting specifies behavior
for a particular machine and a parameter database setting is applied system-wide. The
citect.ini file setting can be entered using the Computer Setup Editor, the parameter data-
base settings are configured in the CitectSCADA Project Editor from the System, Param-
eter menu.
Note: By default, the TagSubscribe Cicode function is set to retrieve "lightweight" tag
values that exclude quality and value timestamps. If you need a subscription to
retrieve timestamp data, you need to set the "bLightweight" argument to 0 (false).
See Also
The Quality Tag Element
Reading and Writing Tags
Tag Data Types
Controlling and Overriding Tag Values
Cicode label
Value Description
name
QUAL_BAD 0x00 Value is not useful for reasons indicated by the Substatus Bit
Field.
QUAL_UNCR 0x01 The Quality of the value is uncertain for reasons indicated by the
Substatus Bit Field.
These can be accessed from a text object on a graphics page at runtime or with Cicode
using the QualityGetPart Cicode function and the necessary Part parameter.
Within each of these quality values is a second, substatus layer, and a third extended
substatus layer. These layers of information listed below can also be accessed using the
QualityGetPart Cicode function.
364
Chapter: 16 Tagging Process Variables
Cicode label
Value Description
name
Cicode label
Value Description
name
Cicode label
Value Description
name
365
Chapter: 16 Tagging Process Variables
Cicode label
Value Description
name
QUAL_BAD_SEN- 0x04 An inoperative sensor has been detected (the ‘Limits’ field can
SOR_FAILURE provide additional diagnostic information in some situations).
QUAL_BAD_ 0x05 Communication has been lost, however, the last known value is
LAST_KNOWN_ available. The age of the value may be determined from the
VALUE TIMESTAMP in the OPCITEMSTATE.
QUAL_BAD_ 0x06 Communication has been lost. There is no last known value
COMM_FAILURE available.
QUAL_BAD_OUT_ 0x07 The block is off scan or otherwise locked. This quality is also
OF_SERVICE used when the active state of the item or the group containing
the item is InActive.
QUAL_BAD_WAIT- 0x08 After items are added to a group, it may take some time for the
ING_FOR_INI- server to actually obtain values for these items. In such cases,
TIAL_DATA the client might perform a read (from cache), or establish a
ConnectionPoint based subscription and/or execute a refresh
on such a subscription before the values are available. This sub-
status is only available from OPC DA 3.0 or newer servers.
See Also
QUAL_EXT Substatus Values
QUAL_GOOD Substatus Values
QUAL_UNCR Substatus Values
The Quality Tag Element
Cicode label
Value Description
name
QUAL_UNCR_ 0x01 Whatever was writing this value has stopped doing so. Regard
LAST_USABLE_ the returned value as ‘stale’. This differs from a BAD value with
VALUE Substatus 5 (0x14) (Last Known Value). This status is asso-
ciated specifically with a detectable communication error on a
‘fetched’ value and indicates the failure of some external source
to ‘put’ something into the value within an acceptable period of
time. The age of the value can be determined from the TIMES-
366
Chapter: 16 Tagging Process Variables
Cicode label
Value Description
name
TAMP in OPCITEMSTATE.
QUAL_UNCR_ 0x04 Either the value has ‘pegged’ at one of the sensor limits (in
SENSOR_NOT_ which case, set the limit field to 1 or 2) or the sensor is other-
ACCURATE wise known to be out of calibration via some form of internal diag-
nostics (in which case,set the limit field to 0).
QUAL_UNCR_ 0x05 The returned value is outside the limits defined for this param-
ENG_UNIT_ eter. In this case the Limits field indicates which limit has been
EXCEEDED exceeded but does NOT necessarily imply that the value cannot
move farther out of range.
QUAL_UNCR_ 0x06 The value is derived from multiple sources and has less than the
SUBNORMAL necessary number of Good sources.
See Also
QUAL_EXT Substatus Values
QUAL_GOOD Substatus Values
QUAL_BAD Substatus Values
The Quality Tag Element
Cicode label
Value Description
name
QUAL_GOOD_ 0x06 The value has been Overridden. Typically this is means the input
LOCAL_OVER- has been disconnected and a manually entered value has been
RIDE "forced".
See Also
QUAL_EXT Substatus Values
QUAL_BAD Substatus Values
QUAL_UNCR Substatus Values
The Quality Tag Element
367
Chapter: 16 Tagging Process Variables
Cicode label
Value Description
name
QUAL_EXT_ 0x01 The device is a scheduled device that is offline and no cache
SCHEDULED_ value is available.
OFFLINE
QUAL_EXT_ 0x0C The requested cluster is not known or no clusters are available.
CLUSTER_NOT_
FOUND
368
Chapter: 16 Tagging Process Variables
Cicode label
Value Description
name
QUAL_EXT_ 0x10 Tag element value not replicated to every redundant DataSource.
VALUE_NOT_
REPLICATED
See Also
QUAL_BAD Substatus Values
QUAL_GOOD Substatus Values
QUAL_UNCR Substatus Values
The Quality Tag Element
369
Chapter: 16 Tagging Process Variables
370
Chapter: 16 Tagging Process Variables
The Staleness Period represents the total number of seconds that will elapse after the last
update before extended quality of the tag element is set to “Stale”. It can be configured
on both the server and client. The server configuration is specified in the table above. For
client configuration details refer to the ClientStalenessPeriod parameter.
Staleness Period Tolerance
Staleness Period Tolerance represents the percentage of the staleness period within a
total of which time a check or stale client tag elements will be performed. The default
value is 10%, which caters for a large number of configuration scenarios. You can reduce
or increase the tolerance as necessary by your particular scenario by configuring this
value in the client machine’s using the ClientStalenessPeriodTolerance parameter. This
parameter is not available for server configuration.
Example:
In order to reduce CPU load on the client machine,the default Staleness Period Tolerance
is 10%. This means that if staleness period is set to 600 seconds, a check for stale client
tag elements will be performed every 60 seconds.
371
Chapter: 16 Tagging Process Variables
<xs:simpleType name="DataType">
<xs:restriction base="xs:string">
<xs:enumeration value="Boolean" />
<xs:enumeration value="SByte" />
<xs:enumeration value="Byte" />
<xs:enumeration value="Char" />
<xs:enumeration value="Double" />
<xs:enumeration value="Int16" />
<xs:enumeration value="Int32" />
<xs:enumeration value="Int64" />
<xs:enumeration value="Single" />
<xs:enumeration value="String" />
<xs:enumeration value="UInt16" />
<xs:enumeration value="UInt32" />
<xs:enumeration value="UInt64" />
<xs:enumeration value="Decimal" />
<xs:enumeration value="DateTime" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ElementName"
<xs:restriction base="xs:string">
<xs:enumeration value="" />
<xs:enumeration value="Field" />
<xs:enumeration value="Valid" />
<xs:enumeration value="Override" />
<xs:enumeration value="OverrideMode" />
<xs:enumeration value="ControlMode" />
<xs:enumeration value="Status" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="DataSource">
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="properties" type="PropertyCollection">
<xs:unique name="UniquePropertyName">
<xs:selector xpath="dsps:property" />
<xs:field xpath="@name" />
</xs:unique>
</xs:element>
<xs:element name="tags" type="TagCollection">
<xs:unique name="UniqueTagName">
372
Chapter: 16 Tagging Process Variables
<xs:complexType name="TagCollection">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="tag" type="Tag" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="necessary" />
<xs:attribute name="type" type="DataType" use="necessary" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="TagElement">
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="v" type="Value" />
<xs:element name="q" type="Quality" />
<xs:element name="t" type="xs:dateTime" />
<xs:element name="qt" type="xs:dateTime" />
<xs:element name="vt" type="xs:dateTime" />
</xs:sequence>
<xs:attribute name="name" type="ElementName" use="necessary" />
</xs:complexType>
<xs:complexType name="Value">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="item" type="xs:string" />
</xs:sequence>
<xs:attribute name="type" type="DataType" use="necessary" />
<xs:attribute name="size" type="xs:positiveInteger" use="necessary" />
</xs:complexType>
<xs:complexType name="Quality">
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="generic" type="xs:integer" />
<xs:element name="specific" type="xs:integer" />
</xs:sequence>
</xs:complexType>
373
Chapter: 16 Tagging Process Variables
The data received from the field is represented by the Field and Valid tag elements.
l The Field element represents the latest tag field data received from the device.
l The Valid element represents the last field data which had “Good” quality.
Note:The Valid tag element initially has bad quality. The quality will only become
good when the first read request is successfully finished for the tag, which will only
occur when the IO device is online and either background polling is enabled, the tag
has been subscribed to, or a TagRead has beeninitiated.
You can access these elements by using a qualified tag reference (a tag referenced by the
tag name and the element name, for example ‘MyTag.Field’).. The following tables
describe each of these elements.
Field tag element
CitectSCADA
Reference Syntax Description
Data type
374
Chapter: 16 Tagging Process Variables
CitectSCADA
Reference Syntax Description
Data type
If you determine that the tag value is incorrect because of a sensor or communication
becoming inoperative, the tag value may need to be overridden. The Override tag ele-
ment is used to store the overridden tag value. For further information refer to Con-
trolling and Overriding Tag Values.
Not specified (unqualified Yes Write to the Field element and propagate
tag reference) the value to the I/O Device.
375
Chapter: 16 Tagging Process Variables
If you determine that the tag value is incorrect because of a sensor or communication
interuption, the tag value may need to be overridden. The Override element tag element
is used to store the overridden tag value. For further information refer to Controlling and
Overriding Tag Values.
When the tag is put into the control inhibit mode, writing to the Field element value is pro-
hibited. If the system is configured in such a way that it does not give the operator any indi-
cation that the tag is in the control inhibit mode, the operator may assume that he is
performing a control operation which does not, in fact, occur.
Configure the system in such a way that it provides a visual indication to the operator that a
tag is in the control inhibit mode.
Failure to follow these instructions can result in death, serious injury, or equip-
ment damage.
376
Chapter: 16 Tagging Process Variables
To provide a visual indication to the operator that a tag is in the control inhibit mode
the following can be done:
Set any of the following Citect.ini parameters in such a way that control inhibit mode
will be indicated by changing the background color or overlaying the numeric or text
graphics objects and symbol set objects with a dithered pattern:
[Page]ControlInhibitDitheringColor
[Page]ControlInhibitDitheringDensity
[Page]ControlInhibitTextBackgroundColor
and set [Page]IgnoreValueQuality parameter to a value of 0 or 2.
or
Use the Control Mode element value (0 if the tag is not in the control inhibit mode or 1
otherwise)
or
Use the Field element quality Tag Status ControlInhibit bit (1 if the tag is in the control
inhibit mode or 0 otherwise)
Control Mode
Control inhibit mode allows you to prohibit writing to the Field tag element. Setting a tag
in Control inhibit mode is applied system wide. Writing to the Field element will be pro-
hibited for each of the I/O Data Consumers.
Control inhibit mode is controlled by the “Control Mode” element which is described in
the following table.
CitectSCADAData
Reference Syntax Description
type
377
Chapter: 16 Tagging Process Variables
CitectSCADAData
Reference Syntax Description
type
Note: The quality of tags referenced by items, ex. Tag1.v or Tag1.Field.t, is GOOD
and its timestamps are 0 (INVALID TIMESTAMP). Therefore they give no visual
indication of any not good quality, error or change in handling state such as control
inhibit or override mode regardless of the setting used for the [Page] Ignore-
ValueQuality parameter.
Override Mode
When the tag is put into the override mode, the default tag element value will be equal to the
Override element value instead of the Field element value. If the system is configured in such
a way that it does not give the operator any indication that the tag is in override mode, the
operator may assume that he is seeing the Field element value (live data) and consequently
may operate the plant inappropriately.
Configure the system in such a way that it provides a visual indication to the operator that a
tag is in override mode.
Failure to follow these instructions can result in death, serious injury, or equip-
ment damage.
To provide a visual indication to the operator that a tag is in the override mode the fol-
lowing can be done:
Set any of the following citect.ini parameters in such a way that override mode will be
indicated by changing the background color or overlaying the numeric or text graphics
objects and symbol set objects with a dithered pattern:
[Page]OverrideDitheringColor
[Page]OverrideDitheringDensity
378
Chapter: 16 Tagging Process Variables
[Page]OverrideTextBackgroundColor`
and set [Page]IgnoreValueQuality parameter to a value of 0 or 2.
or
Use the Override Mode element value (0 if the tag is not in the Override Mode or 1,2,3,4
otherwise)
or
Use the default or override element quality Tag Status Override bit (1 if the tag is in the
override mode or 0 otherwise)
Using Override Mode
If you determine that the tag value is incorrect because of a sensor or communication
interuption, the tag value may need to be overridden. The Override tag element is used
to store the overridden tag value.
You can put the tag into the Override Mode which will cause each unqualified tag ref-
erence (a tag referenced only by the tag name, for example ‘MyTag’).in every I/O Data
Consumer (Control Client, Trend Server, Alarm server, etc) to return the Override ele-
ment.The quality of the tag will indicate that the tag is in override mode.
Tag override is controlled by the Override and Override Mode tag elements. The Over-
ride element contains the override value and the Override Mode tag element is used to
set the specific override mode.
The following tables describe each of these elements:
Override tag element
CitectSCADA
Reference Syntax Description
Data type
379
Chapter: 16 Tagging Process Variables
Note: The quality of tags referenced by items, ex. Tag1.v or Tag1.Field.t, is constantly
GOOD and its timestamps are constantly 0 (INVALID TIMESTAMP). Therefore they
give no visual indication of any not good quality, error or change in handling state
such as control inhibit or override mode regardless of the setting used for the [Page]
IgnoreValueQuality parameter.
CitectSCADA
Reference Syntax Description
Data type
TagName.OverrideMode.T TIMESTAMP Time when the tag was put in or out of Over-
ride mode. (equal to 0 at start up)
Override Modes
Override
Mode Description
Value
1 The tag is in Static Override Mode and the Override value is initially set to the
value of the tag’s Field element.
2 The tag is in Static Override Mode and the Override value is initially set to the
value of the tag’s Valid element.
3 The tag is in Static Override Mode and the Override will remain at the previously
set value of the tag's Override element.
4 The tag is in the Dynamic Override Mode and the Override value will continually
track the value of the tag's Valid element. The ability to write to the value of the
tag’s Override element is disabled in this mode.
380
Chapter: 16 Tagging Process Variables
Tag Status
The Tag Status element is used to represent the current status of the tag. The value of
this element is affected only for those tag operations that involve a physical device (for
example, writing to the Field element will affect the status element, but writing to the
Control Mode will not). Tag Status element is reset after I/O Server restart. The element
value contains a set of bit flags.
The following table describes the Tag Status element:
CitectSCADA
Reference Syntax Description
Data type
381
Chapter: 16 Tagging Process Variables
Tag values can be used with the Cicode Variable data types.
A Cicode variable of INT data type can be used to store Tag data types: BCD, BYTE, DIG-
ITAL, INT, UINT, LONG, ULONG and LONGBCD.
A Cicode variable of the QUALITY or TIMESTAMP data type can be used to store the
Tag quality and timestamp items.
See Also
Cicode Variable Data Types
382
Chapter: 16 Tagging Process Variables
383
Chapter: 16 Tagging Process Variables
Note: If you do not specify a range for your tag, then an out of range alert message
will be generated if you write a value which is outside the range of the type.
You need to specify the correct data type that corresponds to the data type of the I/O
Device variable you are configuring. Each data type has a unique address format. You
need to use this format when you are specifying the address of the variable (as the
Address property).
You will want to verify that you only use data types that are valid for your I/O Device. If
you do not specify a data type, the variable will be treated as 16-bit integer.
CitectSCADA supports concatenation of I/O Device registers. For example, you can
define a real data type (in CitectSCADA) as two contiguous int data types (in the I/O
Device). CitectSCADA reads across the boundary of the two ints and returns a real.
If you use concatenation of registers, the address of the variables needs to be on odd
boundaries or even boundaries. You cannot mix address boundaries. For example, V1,
V3, V5 are valid addresses.
Be careful when using this feature: the I/O Device needs to maintain the integrity of the
second register. (If the I/O Device writes to the second int, the value of the real could be
corrupted.) The structure of some I/O Devices might not support this feature, and might
therefore behave unpredictably.
384
Chapter: 16 Tagging Process Variables
Do not mix the use of odd and even variable addresses as boundaries when you are con-
catenating registers.
Failure to follow these instructions can result in death, serious injury, or equip-
ment damage.
String variables
While numeric variables are more common, some I/O Devices also support ASCII
strings. You can use strings to store text data (for example, from a bar code reader).
All strings needs to be NULL-terminated in the I/O Device. CitectSCADA uses the NULL
character to check for the end of a string, and if no NULL character is present, Citect-
SCADA reads (and displays) any extra characters in memory, after the end of the string.
When you are using a disk I/O Device, you can also specify a string data type for storage
of recipes, or for operator display information.
Not every I/O Device supports strings. However, if your I/O Device does support integer
data types, CitectSCADA can use these integer registers to store ASCII strings in your I/O
Device. CitectSCADA strings can only be stored in contiguous blocks (consecutive reg-
isters), and are stored as an array.
Note: Non printable characters within string tag values will be substituted with
spaces e.g. string [ 0x01, 0x41, 0x10, 0x42 ] will appear as " A B", so cache loading
continues to operate.
To display the data types for an I/O Device, double-click the I/O Devices book from the
Help, select your I/O Device from the list, and then select the Data Types topic.
I/O Device Name
The name of the I/O Device where the variable is stored (31 characters). If using I/O
Device redundancy, you need to specify the primary I/O Device name here, not the
standby.
Address
The register address in the I/O Device where the variable is stored (254 characters). The
format and prefix of an address will depend on the protocol configured for the I/O
Device, which can be determined by checking the Protocol field on the I/O Devices form
in Project Editor.
Raw Zero Scale / Raw Full Scale
385
Chapter: 16 Tagging Process Variables
The unscaled (raw) values (of the variable) that represent the zero point and full scale
point for the data (11 characters). The raw values are the values that CitectSCADA reads
from the I/O Device.
Eng Zero Scale / Eng Full Scale
The scaled values that CitectSCADA calculates from the raw values (11 characters). The
Raw Zero Scale is scaled to the Eng Zero Scale and the Raw Full Scale is scaled to the
Eng Full Scale. These properties are represented in engineering units and are used as the
upper and lower limits of trends and bar graphs.
Most I/O Devices return an integer to indicate the value of an analog input. To return a
usable value, the I/O Device converts an input signal (usually 4-20 mA) to a raw scale
variable, usually (but not always) in the range 6400 to 32000.
To present this variable as a meaningful value, you can specify a scaling calculation.
CitectSCADA then scales every value accordingly, as in the following diagram.
The scaled value of the variable (engineering value), not its raw value, is used through-
out the system.
The scaling properties are optional. If you do not specify scaling, Eng Zero Scale defaults
to Raw Zero Scale, and Eng Full Scale defaults to Raw Full Scale; that is, no scaling
occurs.
A value that is below the specified Raw Zero Scale or above the specified Raw Full Scale
causes an "Out of Range" alert message in your runtime system.
Eng Units
386
Chapter: 16 Tagging Process Variables
(8 characters.) The engineering units that the value represents (for example %, deg,
mm/sec, etc.). This property is optional. If you do not specify engineering units, no engi-
neering units are used.
Format
(11 characters). The display format of the value (of the variable) when it is displayed on
a graphics page, written to a file, or passed to a function (that expects a string). This
property is optional. If you do not specify a format, the format defaults to ####.##.
Deadband
(11 characters). A deadband allows the value of a variable tag to fluctuate within a
defined threshold without updates being sent through the system. This may be useful if
a tag produces many small, insignificant value changes. The threshold is represented as
a percentage of the tag's engineering range. The default value is 0 (zero), which captures
every value change.
For example, if a variable tag has an engineering range of zero to 10000, a deadband of 1
would mean a change in value would have to be greater than 100 (or 1 percent of the
range) to be recognized. If the current value was 5600, the tag in the PLC would have to
change to a value greater than 5700 or less than 5500 before an update would be sent
through the system.
Comment
Any useful comment (48 characters).
Linked
The Linked field in the status line of the Variable Tags form reads either Yes or No and
indicates whether or not the variable tag is linked to an external data source. When you
program an I/O Device using software other than CitectSCADA, an external data source
is used to store tag data. Linked variable tags are updated whenever external tag data
changes, meaning you do not need to enter the information again in CitectSCADA.
387
Chapter: 16 Tagging Process Variables
& * ** -
/ + < <=
NOT OF OR PROGRAM
l Cicode function names. See Functions Reference for an entire list of Cicode functions.
Using reserved words or Cicode function names may cause a syntax error.
388
Chapter: 16 Tagging Process Variables
Format specifiers
Format specifiers are keyboard characters that you use to define the format for the
numeric variable. The specifiers that you can use are:
0 Zero Padding
- Minus Justification
EU Engineering units
S Exponential notation
389
Chapter: 16 Tagging Process Variables
Changing justification
By default, numeric variables are right-justified (within their field). You can change the
default justification by using a minus (-) sign as the second character in the format
string, for example:
Format: #-###
This format string displays:
390
Chapter: 16 Tagging Process Variables
Note: If you do not specify an engineering unit for the variable, only the number is
displayed (or logged).
391
Chapter: 16 Tagging Process Variables
See Also
Using arrays
Using arrays
An array is a collection of variables (all of the same data type) that are stored in con-
secutive memory registers in your I/O Device. Numeric arrays are useful when you have
separate devices (or processes) performing similar functions. You can program the I/O
Device to store, in consecutive memory registers, variables that relate to each of these
processes, for example:
Here, five consecutive variables (V500, V501, V502, V503, and V504) store the conveyor
speed of five conveyors (1 to 5). Instead of configuring five separate variable tags (one
for each conveyor), you can configure a single tag, as an array.
To specify a single variable tag for an array, define the first address and add the size of
the array (the number of consecutive addresses) to the register address, for example:
Address V500[5]
Here, five register addresses are referred to by the variable tag Conveyor_Speed.
392
Chapter: 16 Tagging Process Variables
<Tag Name>[Index]
For example, to refer to the third variable of the array in the above example (Conveyor
3), use the following syntax:
The index of the first entry of an array is always 0 (zero). In this example, Conveyor_
Speed[0] is the first entry of the array (Conveyor 1), and Conveyor_Speed[4] is the last
entry (Conveyor 5).
Note the following when using arrays:
l Do not define large arrays, because each time an individual array entry is requested,
CitectSCADA reads the entire array from the I/O Device. With large arrays, system
performance could be reduced.
l The size of the array needs to be less than the maximum request length of the pro-
tocol. The I/O Device description help topic (for your I/O Device) displays the max-
imum request length of the protocol.
l declare digital arrays on a 16 bit boundary. CitectSCADA rounds each digital array
down to the nearest 16 bit boundary. Consequently, digitals in the array are changed.
For example, if you declare an array Test to start at bit 35, and CitectSCADA starts
the array at bit 32. The index to the array also starts at bit 32; Test[0] refers to bit 32,
not bit 35.
l Each individual array entry has its own data value for the field, valid and override
elements, but the entries within an array share the override and control mode ele-
ments, quality and timestamps. Reading the quality or timestamp for an indexed
array entry will return the quality or timestamp for the entire array. Writing to the
value for an indexed array entry will change the timestamps and quality for the
entire array. Changing the override mode and the control mode for an array entry
will change it for the entire array.
See Also
Tag Extensions
393
Chapter: 16 Tagging Process Variables
String arrays
If you are using a CitectSCADA string data type, you need to specify an array of integer
data types. One int register stores two string characters.
To calculate the size of an array (for string data types), use the following formula:
The last element of the array is always used to store the null character '\0'. This char-
acter marks the end of the string.
To store the word "Recipe", you need to specify an array with 4 elements, for example:
Address V500[4]
You can then refer to the entire string by specifying the tag:
<Tag Name>
For example:
To store the word "Recipes", you would also specify an array with 4 elements. The char-
acters are stored as follows:
394
Chapter: 16 Tagging Process Variables
Note: If your I/O Device supports string data types, you need to specify the address
in the format determined by the I/O Device you are using.
See Also
Using structured tag names
1. In Project Editor, select Tags | Local Variables. The Local Variables dialog displays.
2. In the Name field, enter a name for the local variable. Variable names cannot include
the '-', '/', '%' or <space> characters.
3. In the Data Type field (16 characters), select one of the following supported data
types:
395
Chapter: 16 Tagging Process Variables
Numeric and digital variables have a default value of 0 and string variables default to ""
(empty string). If you do not specify a data type, the local variable will be treated as 16-
bit integer.
4. In the Array Size field (8 characters), enter the size of the array (number of elements)
used to store the local variable. The array will be of the data type specified in the
Data Type field. The array can be one or two-dimensional. Up to 32766 elements can
be used, which, for a two dimensional array, means that the size of the first dimen-
sion multiplied by the size of the second is less than or equal to 32766. When spec-
ifying a multi-dimensional array, separate the dimensions with a comma, for
example "20,30"."
5. In the Zero Scale field (11 characters), enter the value of the local variable that rep-
resents the zero point for the data. The zero scale value is used as the lower limit for
trend and bar graphs, and values below the zero scale value will cause an "Out of
Range" alert message in the runtime system.
6. In the Full Scale field (11 characters), enter the value of the local variable that rep-
resents the full scale point of the data. The full scale value is used as the upper limit
for trend and bar graphs, and values above the full scale value will cause an "Out of
Range" alert message in the runtime system.
396
Chapter: 16 Tagging Process Variables
7. In the EngUnit field, enter the engineering units that the value represents (for exam-
ple %, deg, mm/sec, etc.). This property is optional. If you do not specify engineering
units, no engineering units are used.
8. In the Format field, Enter the display format of the value (of the variable) when it is
displayed on a graphics page, written to a file, or passed to a function (that expects a
string). This property is optional. If you do not specify a format, the format defaults to
####.#.
9. In the Comment field, enter any useful comment. This property is optional and is not
used at runtime.
10. Click Add.
See Also
Configuring Variable Tags
397
Chapter: 16 Tagging Process Variables
398
Chapter: 17 Linking, Importing, and Exporting Tags
Because I/O Devices are often programmed independently of CitectSCADA, you can
import, or link to, every the tag in an external data source. This means that you only
have to define tag information once when you program your I/O Devices. You do not
have to re-enter the same information again in CitectSCADA. Because the necessary infor-
mation is already saved in an external data source, you can just import it or link to it.
There are two types of tags in the CitectSCADA variable database - linked tags and non-
linked tags. When performing a tag import from Citect Explorer, only non-linked tags are
updated. Linked tags remain unchanged. When performing a refresh or auto-refresh,
only linked tags are updated. Non-linked tags remain unchanged. When performing a
synchronization (Live Update), every tag for the I/O device are updated and linked.
CitectSCADA also lets you export tags to an external file, specifying the destination and
format of your choice. You might then import this file into a third-party I/O Device pro-
gramming package database, or simply use it as a backup.
Note: The simultaneous update of a tag name and its fields is only supported when
importing via OFS. In every other case, if you attempt to simultaneously update a
tag's name and fields, only the name will be updated. In this case update a tag name
in a separate operation from updating its fields.
See Also
Linking tags
Importing tags
Exporting tags
Unity Support Matrixes
Linking tags
Linking is an I/O Device specific operation. When you add an I/O Device record in Citect-
SCADA (using the Express Communications Wizard), you can choose to link it to an
external data source. The external data source is where the tag data was saved when the
actual I/O Device was programmed. If you link to the external data source, CitectSCADA
automatically creates variable tag records for every tag in the I/O Device.
399
Chapter: 17 Linking, Importing, and Exporting Tags
These variable tag records are dynamically linked to the tags in the external data source.
CitectSCADA is updated whenever one of the external tags is changed. For example, you
might program your I/O Devices, configure your project, then add some new tags or edit
existing tags. In this situation, CitectSCADA is automatically updated with your
changes.
This update occurs when you attempt to read the changed tags in CitectSCADA (for
example you compile your project, display the tag using the Variable Tags dialog box,
modify or paste the tag, or perform a manual refresh, etc.). For example, if you change
the address of a tag using a third party I/O Device programming package, the external
data source is changed. Then, when you display the variable tag record or compile your
project in CitectSCADA, the change is copied from the external database to Citect-
SCADA's variable tags database.
You can tell if a tag is linked because the status line at the bottom of the Variable Tags
form will read Linked: Yes. If it is linked and you change a field, your change will not
be overwritten when the link is next refreshed. Generally, however, any field which takes
its value from the external data source is disabled.
Note: Some properties defined for the external tags will not be relevant to Citect-
SCADA. Also, some will not be in a format that CitectSCADA can read. Each I/O
Device has an associated format file in CitectSCADA. It is this file that determines
what information is copied to CitectSCADA's variable tags database and how this
information is to be converted. In most cases, you will not have to edit this file.
400