BAILEY User Guide
BAILEY User Guide
Driver Specification
Bailey Driver
Contents
1. QA 4
1.1 Introduction 4
1.2 Procedure for generating a new driver 4
3. PROTOCOL REQUIREMENTS 16
3.1 Introduction 16
3.2 Initialising the Board 16
3.3 Initialising the Port 16
3.4 Initialising the IO Device 16
3.5 IO Device Online Test 16
3.6 State Flow Description 16
3.7 Message Structure 17
3.8 Data Format 22
3.9 Check Sum 22
3.10 Error Handling 22
4. USER INTERFACE 23
4.1 Introduction 23
4.2 Driver Name 23
4.3 Boards Form 23
4.4 Ports Form 23
4.5 IO Devices Form 24
4.6 Pulldown lists Help 24
BAILEY.DOC 2
Driver Design Specification
5. BASIC TESTING 46
5.1 Introduction 46
5.2 Procedure 46
6. PERFORMANCE TESTING 47
6.1 Introduction 47
6.2 Calculating the Blocking Constant 47
7. REFERENCES 48
7.1 References 48
8. APPENDIX 49
Appendix A Initialization flow chart 49
Appendix B Configuration flowchart 50
Appendix C Bailey Driver Execution flowchart 51
BAILEY.DOC 3
Driver Design Specification
1. QA
1.1 Introduction
This document follows the development of the Bailey driver. It serves as a functional specification,
design specification and test specification.
The following check list defines the QA steps for generating a new driver. This procedure must be
followed for drivers to be integrated into Citect.
The hand over of a driver requires that all the above steps are completed and checked off.
BAILEY.DOC 4
Driver Design Specification
2.1 Introduction
There are many devices made by Elsag Bailey to enable communication between host computers
and their DCS equipment. A simple binary serial protocol is employed via a RS232C connection to
interface between host computer and DCS. The interface provides connectivity to the DCS internal
network protocol enabling transfer of messages to and from host computers and modules distrib-
uted through out the network.
The DCS uses a variety of internal protocols such as Module Bus, Control way, INFI-NET and Plant
loop to communicate between module, PCU and OIS. Elsag Bailey provides hardware interfaces,
which use the common serial protocol to interface host computers to these protocols.
The Elsag Bailey DCS comes in two varieties, Network 90 and INFI 90. The names distinguish be-
tween the type of communication being used within a PCU and between PCUs. The Network 90
DCS is the older systems which uses Module bus and Plant loop. While INFI90 is the newer sys-
tem, which uses Module bus, plant loop, Control way and INFI-NET. The two types of Elsag Bailey
DCS equipment can be linked together using specialised hardware interface units, meaning that
Network 90 and INFI90 systems can coexist in the same, plant, system or PCU.
Bailey Controls Australia Pty Ltd., Regent Park, NSW Australia. A Babcock & Wilcox Company.
There are two distinct hardware interface unit types used by Elsag Bailey to provide connectivity
between host computers and their DCS system:
These interfaces are generally called Computer Interface Units CIU. CIU are combinations of hard-
ware, which provide the following functionality:
The data storage and data transfer control module holds the exception report routing database and
directs the operations of both process control unit interface and the host interface. It acts as the
translator between the INFI-NET/Plant loop, host computer and the control way/module bus. It
communicates directly with the PCU interface hardware and monitors the local control way/module
bus. It polls each local PCU module on the control way/module bus for exception reports using the
following criteria:
BAILEY.DOC 5
Driver Design Specification
The exception reports are packed together with other exception reports having a common node des-
tination and transferred to the PCU interface for transmission. The PCU interface receives all incom-
ing messages from other PCU interfaces on the loop and retransmits a new stream of messages in
a store and forward fashion to the next node. When there are no messages to transmit the module
transmit null packets to keep the loop synchronized.
The host interface is generally a termination unit, which provides level conversion and isolation be-
tween the host computer and the DCS equipment.
NCIU01 or TCU (Computer inter- LIM (Loop inter- SIM (Serial inter-
INPCI01 face termination unit) face module) face module) &
PTM (Point table
module)
NCIU03 or TMF(Multi function Con- LIM (Loop inter- PCT ( Plant loop
INPCI02 troller Termination unit) face module) to Computer
Transfer module)
& BTM Bus
transfer module)
BAILEY.DOC 6
Driver Design Specification
BAILEY.DOC 7
Driver Design Specification
BAILEY.DOC 8
Driver Design Specification
These interfaces are generally called serial port modules (SPM) or Communication Port modules
(CPM). These are single slot units, which occupy one slot in a Module Mounting Unit (MMU) within
a PCU. They provide:
SPM and CPM are designed to provide local (within PCU) system configuration, tuning and diagnos-
tics. They enable the host to configure, tune and monitor the master modules and their function
blocks. They do not provide the exception reporting facility offered by a CIU, instead to monitor a
point the host must poll it directly.
The diagrams below use the acronyms defined in this diagram. Host computer may be substituted
for EWS.
BAILEY.DOC 9
Driver Design Specification
BAILEY.DOC 10
Driver Design Specification
BAILEY.DOC 11
Driver Design Specification
The NSPM01 is designed to function as DCE through a type Z interchange. This is a non-specified
optional interchange, which allows equipment manufactures to define what signals will be used. To
minimize the chance of confusion, a detailed description of each signal line of the NSPM01’s serial
port is given below. Please note that the RS-232C specification identifies pin names and functions
with respect to DTE. The pin numbers below refer to the front panel connector on the NSPM01. Ku-
dos
BAILEY.DOC 12
Driver Design Specification
Pin 5 - CLEAR TO SEND (CTS). This signal is an output from the DCE in response to receiving
a RTS signal. Since the RTS signal is disabled by default, the module generates the CTS
signal as long as the Machine Fault Timer is in its normal state.
Pin 6 - DATA SET READY (DSR). This signal is also an output from the DCE to the DTE. Be-
cause of the overlap of signal definition with respect to the modules, this signal is synony-
mous with the CTS signal. Both signals are generated at a common point.
Pin 7 - SIGNAL GROUND. This is the common for all signals.
Pin 8 - RECEIVED LINE SIGNAL DETECT (RLSD). This signal is generated to indicate that a
valid communication link has been established. For the NSPM01 module, this signal is used
to indicate when access to the Module Bus is possible. Again, as with Pins 5 and 6, if the
Machine Fault Timer is normal, the communication link is considered to be present. This
signal is synonymous with the CTS and DSR signals on the NSPM01 but is provided to al-
low interfacing with other data equipment.
Pin 20 - DATA TERMINAL READY (DTR). This is an input to the DCE. It is to confirm that the
DTE is there and that the communication link is to be maintained. If the signal is not gen-
erated by the DTE, jumpers are provided on the modules so that the need for this input can
be eliminated.
All other pin assignments of the RS232C interchange are grouped into a “don’t care” classification.
TX 2 2 TX
RX 3 3 RX
RTS 4 4 RTS
CTS 5 5 CTS
DSR 6 6 DSR
SG 7 7 SG
DCD 8 8 DCD
DTR 20 20 DTR
D Connector D Connector
25-WAY 25-WAY
FEMALE FEMALE
BAILEY.DOC 13
Driver Design Specification
DCD 1 1 SHLD
RX 2 2 TX
TX 3 3 RX
DTR 4 4 RTS
SG 5 5 CTS
DSR 6 6 DSR
RTS 7 7 SG
CTS 8 8 DCD
20 DTR
D Connector D Connector
9-WAY 25-WAY
FEMALE FEMALE
Refer to Bailey network 90 Serial Port Module (NSPM01) “Product Instruction” manual E93-905-1
Special attention should be directed to switches SW3 (port settings) and Jumpers JP9 and JP10
(Connecting baud rate).
None
There is no special setup required for this protocol - only to ensure the Citect driver (BAILEY.DLL) is
used.
2048 Bytes
BAILEY.DOC 14
Driver Design Specification
2.8 Contacts
Simon Frost
W.A. Cromarty Pty Ltd
79 Howick Street,
South Launceston,
Tasmania 7249
Tel 03 63449110
Fax 03 63441221
Bruce Kinchin
Ci Technologies Pty Limited
10-12 West Street
PO Box 174
Pymble NSW 2073
Australia
Tel: (02) 855 1000
Fax: (02) 488 9164
BAILEY.DOC 15
Driver Design Specification
3. Protocol Requirements
3.1 Introduction
This section outlines the protocol and execution flow of the Bailey driver. The protocol is not covered
in depth here as an adequate description is given in [1].
The driver uses standard RS232 communication. Therefore only the normal board initialization car-
ried out by CITECT is required.
The port is opened using the COMSetVector function and reset using the COMReset each time the
driver is restarted.
The CIU device requires extensive initialization while the SPM and CPM modules require only to be
restarted. See Appendix A Initialization flow chart and Appendix B Configuration flow chart
The device is considered to be online after the initialization has been completed. See Appendix A
Initialization flow chart. There exists a special condition where the unit does not go on line until both
the initialization and configuration (See Appendix B Configuration flow chart) have been completed.
This special case has been included to make swapping from a secondary server back to a primary
server seamless. This will only occur if CIU > 0 BackGroundInit = 1 and the device has been initial-
ized successfully by the driver prior to the current initialization attempt.
This driver is based on the front-end back-end model. The front end services all requests from the
IOSERVER. All requests are handled through the READDCB and WRITEDCB calls. Read requests
are separated into tag types, TUNE BLOCK (TR, TI, TD), READ BLOCK OUTPUT (BR, BI, BD) and
point tags (PV, SP, RI etc). The back end of the driver maintains a image of the CIU point table and
all requests for point tag data are serviced from the in\mage. Read requests for READ BLOCK
OUTPUT tags and TUNE BLOCK tags are handled by the back-end. See 3.7.3 Read commands
and 3.7.5 Tune commands for respective descriptions.
Write request are also separated into point tags and TUNE BLOCK tags. As with the read requests
the write tags are handled by the back-end of the driver. To facilitate continuity of the back-end poll-
ing strategy all requests that cannot be handled directly by the front end are placed in the IN queue.
The IN queue is then serviced during the polling operations of the back-end. Commands generated
from the IN queue OUT queue or polling cycle are transmitted and placed in the OUT queue. Re-
sponses from the Bailey host communication equipment are matched to an item in the OUT queue.
The driver replied to the IOSERVER immediately with write responses. Read responses may be
replied directly or placed in the RETURN queue. The RETURN queue uses a timer to delay the read
responses to the IOSERVER.
BAILEY.DOC 16
Driver Design Specification
The OUT queue is given the highest priority during the operation of the back-end. The IN queue is
serviced next and finally exception reports are polled. The responses to polled commands are de-
coded and used to update the internal point table image. See Appendix C Bailey Driver Execution
flowchart for further details
The Bailey host communication equipment uses binary COMANDS and REPLIES to send mes-
sages back and forth between host and DCS. Each information transfer is a command from the host
followed by a reply from the bailey equipment. The message structures are:
The message structure of both the commands and replies are outlined in Sections 2 of [1]. Com-
mands and relies are terminated by the 0D (HEX). To avoid 0D as a character within a message, the
driver must translate both 0D and 1B into 1B0E and 1B1B receptively for commands and visa versa
for replies. Section 3 of [1] covers this topic.
The driver communicates with a CIU uses the following messages. To communicate with a CPM or
SPM unit only the CIU RESTART, ENVIRONMENT, READ BLOCK, READ BLOCK OUTPUT, TUNE
BLOCK and DEMAND MODULE STATUS messages are uses as these units have a reduced
command set. (See CIU parameter below 4.9.2.4)
The driver used 26 IO Device Variable Types (see 4.7) to perform all its IO with the Bailey host
communication equipment. Each IO Device Variable type is associated with one or more of the
messages below.
BAILEY.DOC 17
Driver Design Specification
BAILEY.DOC 18
Driver Design Specification
or execution mode.
Note: The byte structure of each of the above commands and their respective replies can be found
in section 2of [1].
Several of these commands require the address of a specific block location within the DCS system.
Bailey uses a propriety addressing system, which does not map well into that, used by CITECT.
The system refers to a specific block within the DCS using:
For exception reporting purposes. Route which map a block within the DCS into a CIU point data-
base are referred to by:
To facilitate this in the code the DATAPOINT structure has been mapped into the MAPPOINT struc-
ture. Therefore UnitAddress and UnitType fields are assigned as follows at compile time.
UnitAddress Description
Bits
Bit 29 – 24 Point type (PV, SP, CO, RI, A, SS, D, SM, MS, RCM, RMSC etc)
BAILEY.DOC 19
Driver Design Specification
Bit 23 – 16 This byte will be put into UnitAddress when 0 is entered as an index
Bit 15 – 0 Index
Bit 29 – 16 Block
Bit 15 – 11 Module
Bit 10 – 3 Node
Bit 2 – 0 Ring
Initialization is a function performed by the back end of the driver. The driver performs initialization
functions with the following commands. CIU RESTART, ENVIRONMENT, CONNECT POINT LIST
and DISCONNECT POINT LIST. The initialization takes two forms. If the CIU = 0 or the MapPath =
NULL then a CIU RESTART command is issued followed by an ENVIRONMENT. Otherwise the
driver uses DISCONNECT POINT LIST to remove all of the existing CIU point routes and then re-
connects them using CONNECT POINT LIST. This forces the CIU to refresh its point table and pro-
vide a fresh exception reports for each point.
Configuration is a function performed by the back-end of the driver. The driver performs configuration
functions with the following commands. ESTABLISH POINT, DISESTABLISH POINT, ESTABLISH
AND CONNECT POINT, CONNECT POINT LIST and ESTABLISH REPORT. Configuration only oc-
curs if CIU > 0. Configuration is the process of building the CIU internal point table. Each point in
the table must be first established using one of the establishment commands and then connected
with a connect command. These two commands enter a point into the CIU database and link that
point to a block within the DCS.
Configuration may occur in the background, or as each point is accessed by CITECT. If Back-
GroundInit = 0 the driver tries to establish and connect each point as it is accessed by CITECT.
Otherwise the driver tries to establish and connect all points which are not being accessed by
CITECT in the background during normal polling for exception reports.
The majority of IO device variable tag listed in 4.7 can be associated with a point in the CIU. The
driver uses the index field when establishing a point in the CIU. The index is a unique number asso-
ciated with one block in the DCS. All IO device variables addressing the same block within the DCS
should have the same index number, making transfer of data more efficient and reducing network
overheads.
When the MapPath <> NULL the DISESTABLISH POINT command many be used to remove a
point in the CIU database if that point (index) has been removed from the CITECT project or the in-
dex has been assigned to a different block.
The following table shows the IO variable tag types, which are established and removed by the vari-
ous commands.
BAILEY.DOC 20
Driver Design Specification
ESTABLISH AND CONNECT POINT PV, SP, CO, RI, A, SS, EMS, D, RCM, RMSC
The driver performs read functions with the following commands. READ EX-CEPTION REPORT
SPECS READ EXCEP-TION, READ MISC STATUS EXCEP-TION, READ VALUE LIST, READ
MISC STATUS LIST, READ BLOCK OUT-PUT and DEMAND MODULE STATUS.
This driver is primarily based on the front-end back-end model however the READ BLOCK OUTPUT
and DEMAND STATUS commands fall under the Request based model. When CITECT services
tags, which uses these messages the driver issues the commands directly and waits for a reply. All
other tags except those associated with tunable parameters (see below 3.7.5) are serviced from the
driver’s internal image of the point table. This image is maintained by continuously polling the CIU
for exception reports. Using exception reporting tags is preferable as READ BLOCK OUTPUT
commands are slow and reduce the efficiency of both the driver and DCS network.
The following table shows the IO variable tag types, which are read by the various read commands.
The driver performs write functions with the following commands OUTPUT VALUE and OUTPUT
STATUS. Write commands from CITECT are immediately formatted and transmitted.
The following table shows the IO variable tag types, which are written by the various write com-
mands
BAILEY.DOC 21
Driver Design Specification
Tunable blocks within a DCS are both read and written to by CITECT. However they are treated dif-
ferently by the driver because the function of reading and writing them is slower than exception re-
porting. Tunable blocks are read using READ BLOCK the resulting reply is cached by the driver and
used to service further requests until the data has been cached for a period greater than Watch-
Time. At which time the following access to that tune block will cause the driver to issue another
READ BLOCK command.
When CITECT writes to a tune block the block is first read using READ BLOCK and then written to
using TUNE BLOCK. The driver needs to read the block first to establish all the parameter of the
block before changing any of them and writing the block back into the DCS.
Tunable parameters can be cached because they are not modified very often. However it is possible
that two people could tune the same block within the WatchTime causing one person to have invalid
data on that particular block.
The following table shows the IO variable tag types, which are written and read by the various tune
commands
The data formats used by the Bailey Host Communication Equipment is clearly defined in “FIELDS”
Section 3 Pages 5 – 8 and Section 6 Page 1 Point 7of [1].
The byte wise sums of all bytes in the command, except for the checksum byte itself and the
command terminator. This single byte quantity is the next to last byte transmitted in the command.
Only the command terminator follows it. Commands issued by the host must have checksums.
Command replies may have checksums if the checksum option is switched on. The bailey diver
expects to see checksums on all replies.
All reply codes, other than NO ERROR (0) and those mentioned below, received by the driver have
0x100 added to them and assigned to the ErrDriver field of the DCB in the reply to IOSERVER. Data
encapsulated in a message with a non 0 reply code is ignored.
Certain reply codes can be masked from CITECT using the ErrorMask parameter below (4.9.2.4). In
this case the driver uses the error codes to inhibit operations but returns NO ERROR (0) to the IO-
SERVER.
The driver does not return error codes encountered during the polling of exceptions and background
establishing of points. Message with non 0 reply codes received during polling are ignored.
BAILEY.DOC 22
Driver Design Specification
4. User Interface
4.1 Introduction
This section defines how the user will see the driver. This relates directly to how the Citect forms
need to be filled out and any special INI options. For the kernel, the debugs trace messages and
the Stats.Special counters are documented.
Bailey
Typically you would use a serial board or COM port for this communication. Refer to the instruc-
tions for setting up and using COM ports or serial boards, or complete the Boards form as in-
structed, but with the following specific information.
4.3.1.2 Address
If using a serial board or COM port, you should enter 0.
4.3.1.4 Interrupt
Leave this field blank.
You should complete the Ports form as instructed, but with the following specific information.
BAILEY.DOC 23
Driver Design Specification
4.4.1.5 Parity
This value should match the setting of the ICI-01 - NONE is recommended.
You should complete the I/O Devices form as instructed, but with the following specific information.
The following entries should be included in the Citect Help.DBF spec file.
PROTOCOL BAILEY
READ ONLY
BAILEY.DOC 24
Driver Design Specification
WRITE ONLY
READ or WRITE
BAILEY.DOC 25
Driver Design Specification
Note 1. To Use WSP, WCO, or WR, you must put the appropriate Station (FC 21, 22, 23, 80) into
the correct mode. This is done with the Station Mode (SM) Command.
SM<Index>,<Ring>,<Node>,<Module>,<Block> = 9
SM<Index>,<Ring>,<Node>,<Module>,<Block>=7
SM<Index>,<Ring>,<Node>,<Module>,<Block>=3
This allows the writing to Set Points and Control Outputs (WSP & WCO).
Note 2. The WRCM Command writes to Remote Switches, Device Drivers and Multi-State Device
Drivers. Referencing the same Index as the DD or MSDD tag enables the WRCM to write to the point.
e.g. DD02,0,12,5,100.Q
WRCM02,0,12,5,100
MSDD03,0,12,5,120.Q
WRCM03,0,12,5,120
Note 4. The Address range has been left blank as the Bailey DCS address system has five fields
<Index (1-10000 *)>, <Ring (0-7)>, <Node (0-255)>, <Module (0-31)>, <Block (0-16383**)> each with
its own specific range.
Analog status (PV, SP, CO, R, A) data types have the format PVxxxxx.qqq, SPxxxxx.qqq,
COxxxxx.qqq, Rxxxxx.qqq, and Axxxxx.qqq, where "xxxxx" is in the format <Index>, <Ring>,
<Node>, <Module>, <Block> and "qqq" is an optional qualifier as detailed below:
BAILEY.DOC 26
Driver Design Specification
Digital values (D) have the format Dxxxxx.qqq, where "xxxxx" is in the format <Index> , <Ring> ,
<Node> , <Module> , <Block> and "qqq" is the mandatory qualifier as detailed below:
Station status (SS) data types have the format SSxxxxx.qqq, where "xxxxx" is in the format <Index>,
<Ring>, <Node>, <Module>, <Block> and "qqq" is the mandatory qualifier as detailed below:
Remote switch (RCM) status has the format RCMxxxxx.qqq, where "xxxxx" is in the format <Index>,
<Ring>, <Node>, <Module>, <Block> and "qqq" is the mandatory qualifier as detailed below:
Device Driver (FC 123) status has the format DDxxxxx.qqq, where "xxxxx" is in the format <Index>,
<Ring>, <Node>, <Module>, <Block> and "qqq" is the mandatory qualifier as detailed below:
BAILEY.DOC 27
Driver Design Specification
.SO Override is 1
.M1 Mode bit 1
.M0 Mode bit 0
Multi-State Device Driver (FC 129) status has the format MSDDxxxxx.qqq, where "xxxxx" is in the
format <Index>, <Ring>, <Node>, <Module>, <Block> and "qqq" is the mandatory qualifier as de-
tailed below:
Value Meaning
0 Go to local-manual (console/station-manual)
1 Go to local-auto (console/station-auto)
2 Go to local-cascade/ratio (console/station-cascade/ratio)
3 Go to computer-manual
4 Go to computer-auto
5 Go to computer cascade/ratio
6 Go to local level (console/station level)
7 Go to computer level
8 Go to computer back-up state
9 Computer OK
10 Go to previous state
Value Meaning
1 Sustain reset
2 Sustain set
BAILEY.DOC 28
Driver Design Specification
5 Pulse reset
6 Pulse set
Value Meaning
1 Reset control output
2 Set control output
4 Request manual mode
8 Request automatic mode
Value Meaning
0-3 Request device driver state (value 0-3)
4 Request manual mode
8 Request automatic mode
Tune block (T) has the format Txxxxx.Sn, where "xxxxx" is in the format <Index>, <Ring>, <Node>,
<Module>, <Block> and "n" is the mandatory Specification Number (1 to 128) applied to the speci-
fied block. Refer to the Bailey Function Code Manual for details on the Specification Numbers that
you can use. Note that not all of the Specification Numbers (parameters) are tunable.
Bailey does not use Exception Reporting for tuning parameters, so take care not to slow down the
system when using tuning parameters. To improve the performance of tuning parameters, Citect
will read tuning parameters every 5 seconds.
To reduce the traffic on the Network 90 when reading tune blocks, CITECT reads tune blocks every
15 seconds (3 * [Bailey]Timeout). Writes to tune blocks are performed immediately.
Module Status has the format MS.qqq, where "qqq" is the mandatory qualifier as detailed below:
BAILEY.DOC 29
Driver Design Specification
4.8 PROTDIR.DBF
4.9.1.1 [BAILEY]Block
The blocking constant is a trade-off between the time taken to make multiple data requests and the
time taken to read more data in a single request.
Default Value 2
4.9.1.2 [BAILEY]Delay
The period (in milliseconds) to wait between receiving a response and sending the next command.
4.9.1.3 [BAILEY]MaxPending
The maximum number parameter determines number of pending commands that the driver holds
ready for immediate execution.
Allowable Values 1 to 32
Default Value 1
BAILEY.DOC 30
Driver Design Specification
4.9.1.4 [BAILEY]PollTime
The interrupt or polling service time (in milliseconds). Setting the polling time to 0 puts the driver in
interrupt mode.
4.9.1.5 [BAILEY]Retry
Allowable Values 0 to 8
Default Value 2
4.9.1.6 [BAILEY]Timeout
Specifies how many milliseconds to wait for a response before displaying an error message.
4.9.1.7 [BAILEY]WatchTime
The frequency (in seconds) that the driver uses to check the communications link to the I/O Device.
4.9.2.1 [BAILEY]BackgroundInit
The driver will establish and connect read points in the background. If the server is an I/O Server but
is not an Alarm/Report/Trend Server you may consider setting this parameter to 0.
Allowable Values 0 or 1
Default Value 1
4.9.2.2 [BAILEY]CIU
As the different Bailey communication devices have different message sets, and message formats
the driver needs to know which it is attached to. The three types handled are:
0. NSPM01
1. CIU02/03, /CIC01
BAILEY.DOC 31
Driver Design Specification
Default Value 2
4.9.2.3 [BAILEY]Debug
Developers track down a CIU configuration problem using the debug parameter. It has four levels:
Default Value 0
4.9.2.4 [BAILEY]ErrorMask
On occasions reply codes may be returned by the Bailey equipment, which effect the performance
of the driver but are not critical to the operation of CITECT. One particular code 101 Busy- cannot
respond at this time is the most common cause. This code maps to driver error 357 and it can be
ignored by the driver using the ErrorMask. ErrorMask can be filled with 5 driver error codes sepa-
rated by TAB, COMMA or SPACE, which the driver will ignore.
4.9.2.5 [BAILEY]FastInit
The driver will give higher priority to establishing and connecting analog points. This will result in
pages displaying data faster (~12 seconds) the first time the page is displayed. But if you want digi-
tal data (For example alarm data) to have equal priority, set this parameter to 0. If you set the value
to 0, then you should also set [Lan]WatchTime to at least 120 seconds to stop request timeout
errors. In this case the first page may take a moment to update.
Allowable Values 0 or 1
Default Value 1
4.9.2.6 [BAILEY]MapPath
If the project being developed has many alarms, trends and points (> 2000) it may take the driver
several minutes each time the IO server is started to establish a point table on the CIU. As only a
few points are added or deleted each time the server is started a delay of several minutes while the
whole point table is reestablished, can be difficult. This parameter enables CITECT to keep a copy
of the last CIU point table on disk. Provided the CIU has not been restarted since the last time the
server was communicating with it, the point table in the CIU and on the disk should be identical. The
BAILEY.DOC 32
Driver Design Specification
driver can therefore read the disk version and set up its index table to mirror the CIU and go straight
on line. The driver notes any differences between the disk copy and the new “variable.dbf”; different
points are either established or deleted in the background to update the CIU point table
Allowable Values any directory or directory plus filename. If a filename is not includes then a default
name Bailey_<channel number>. MAP will be used
Default Value c:\temp\Bailey_<channel number>. MAP
4.9.2.7 [BAILEY]Primary
When using redundant CIU pairs, a #COM error can occur and exist for some time when a primary
CIU is taken offline and then put back online again (for example during services or swaps). The de-
lay is caused by the primary reestablishing its point table after it has gone online. The primary pa-
rameter tells CITECT to continue using the secondary CIU until the primary has established its point
table. Note: BackgroundInit must be 1 and CIU must be > 0 for this function to work.
Allowable Values 0 or 1
Default Value 0 go online immediately
4.9.2.8 [BAILEY]Options
Default Value 11
4.9.2.9 [BAILEY]ReqDelay
4.9.2.10 [BAILEY]Ring
Allows mapping of the ring numbers. Each of the ring numbers must be unique.
Allowable Values 0 to 255, 0 to 255, 0 to 255, 0 to255, 0 to 255, 0 to 255, 0 to 255, 0 to255
Default Value 0, 1, 2, 3, 4, 5, 6, 7
4.9.2.11 [BAILEY]WatchDog
The following errors, listed in (hexadecimal) sequence, are specific to this protocol. Citect displays
the error number and description for common protocol-specific errors. Uncommon errors are not
contained in the Citect error database, in which case Citect will only display the error number.
BAILEY.DOC 33
Driver Design Specification
You may require additional information to enable you to rectify an error. This information should be
detailed in the documentation that accompanied the I/O Device (or network). Refer to [1] "Reply
Codes" and "Module Bus Reply Codes". Ref: Bailey Network 90, E93-905-2, pages 9-1 to 9-7, page
A-4
The driver offsets all errors generated by the Bailey module. The offset is 0x100 hexadecimal or 256
decimal –
DRIVER ERRORS
BAILEY.DOC 34
Driver Design Specification
BAILEY.DOC 35
Driver Design Specification
0x165 101 Mode for command does not agree with current module mode
BAILEY.DOC 36
Driver Design Specification
The following entries should be included in the Citect ProtErr.DBF spec file.
BAILEY 0 29 Incompati-
ble type
BAILEY.DOC 37
Driver Design Specification
BAILEY.DOC 38
Driver Design Specification
tablished
(by another
computer)
BAILEY.DOC 39
Driver Design Specification
this time
BAILEY.DOC 40
Driver Design Specification
The driver uses two forms of debug messages. The Bailey "Reply Codes" and "Module Bus Reply
Codes" which are returned in the driver specific error code field of the device error message incre-
mented by 0x100 hexadecimal and the trace messages. The trace messages has two forms. Trace
of the transmitted message, which has the form:
And a trace of the message received from the Bailey equipment in the form:
Note: the received message has had the checksum removed since the message has passed the
checksum test.
2 Byte Key
BAILEY.DOC 41
Driver Design Specification
7 INIT_UNIT The number of times the serial port has been reset
BAILEY.DOC 42
Driver Design Specification
4.14.1.1.2 Blocking
Blocking of similar data types also increases performance. If you block each data type (e.g. Digital,
Real, etc.) together in your Variables Definitions, then the variables of each type are read faster. To
block them together, you should try to keep Index numbers running in order (for each type). For
example:
PV1,0,5,6,199
PV2,0,5,6,728
SP3,0,5,6,199
WSP201,0,5,6,199
WPV202,0,5,6,728
WPV203,0,5,6,199
D401,0,5,6,236.BAD
D402,0,5,6,173.VAL
SS403,0,5,6,328.A
PV601,0,5,6,199.BAD
BAILEY.DOC 43
Driver Design Specification
PV602,0,5,6,199.HL
SP603,0,5,6,199.SPT
n By blocking data types together, you can keep ReqDelay at 60 and Block at 2, but you should still
experiment to determine the optimum settings for your installation (if the response times of the
system are inadequate).
n The CPU Usage value should be monitored (shown on the Page General display of the Citect Ker-
nel). If this value rises to unacceptably high levels, then increase the ReqDelay parameter.
The BR, BI and BD tags use the READ BLOCK OUTPUT command to retrieve data from the Bailey
DCS. This command is inefficient for the driver since it has to issue a command and wait for a reply
from the DCS for each tag read. This command also increases the traffic on the DCS internal net-
work, as the actual module in which the block resides must be asked for the output value. The tags
were implemented to enable limited monitoring of a DCS using equipment, which is not capable of
exception reporting such as a SPM or CPM.
With the above in mind these tags can be used to read any output from any block using either a
SPM or CIU type unit. One of the most common uses is to read the output of FC 129 the MSDD
function code. The outputs for this FC reside in block N, N+1, N+2 and N+3. N is the block the FC
is configured in. There is two ways to read these blocks. The preferred way is to configure several
block in the control module with FC30 and FC45 to generate exception reports for blocks N, N+1
etc. and then include D and A tags in the project to read exception reports from the FC30 and FC45
blocks. The other way is to configure BR and BD tags in the project to read the N, N+1, N+2 and
N+3 blocks directly.
When using large numbers of BR, BI and BD tags it is important to consider the effect of the index
field. The index field is used as an address by CITECT. Since the granularity of CITECT is meas-
ured in blocks which relates to16 digital tags The blocking parameter equates to Block *16 indexes.
So the minimum number of indexes the driver will read during each request is 16 if Block = 1. This
can be a problem when using the serial port module. The serial port module does not use an index
table or exception reporting therefore each request is sent over the Bailey communication network
to the module denoted in the address. This is a much slower operation than exception reporting so
reading more tags than is necessary for the current page and associated trend or alarms can cause
screen update delays. To over come this problem tags BR, BI and BD can be indexed at intervals of
16 therefore only one slow READ BLOCK OUTPUT operation will be performed per request. Alterna-
tively all the BR, BI and BD tags per page can be grouped together, so that all the tags on the one
page are updated in one or two requests.
BAILEY.DOC 44
Driver Design Specification
A function code is a function, which resides in the control module firmware. Blocks that are asso-
ciated with a FC during configuration of a control module are data storage areas for each instantia-
tion of the FC. This storage area is broken up into several sections, specifications, status and out-
put. The driver is capable of reading each of these sections. It can write to the status section and
tuning parts of the specification section. The driver therefore operates independently of the FCs
assigned to the blocks.
Its only function is to read and write the bytes within the blocks. The format of these bytes is differ-
ent for each FC and some tags have been included to help decode the status section of blocks as-
sociated with these FCs, for example MSDD (FC 129 Multi State Device Driver). If there is not a tag
for the FC you wish to use and its status field (RCM) is different to the standard one either add an-
other record into the Bailey.dbf file to handle the status section or use RCM to read in the status
and decode it with cicode.
The majority of tags listed above can be associated with a point in the CIU points database. The
driver uses the index field when establishing a point in the CIU. This index is a unique number as-
sociated with one block in the DCS. All tags addressing the same block within the DCS should
have the same index number. This will make the transfer of data more efficient and reduce network
overheads
4.14.5 Troubleshooting
BAILEY.DOC 45
Driver Design Specification
5. Basic Testing
5.1 Introduction
As this specification is written for a driver, which has been in service for may years this section is
considered unnecessary. All modifications to the driver in the recent release have been field tested
during commissioning of the driver at least three separate sites.
5.2 Procedure
Not applicable
BAILEY.DOC 46
Driver Design Specification
6. Performance Testing
6.1 Introduction
Limited performance testing has been carried out on this driver following recent modifications. Per-
formance testing was not considered necessary as P Wong performed these during initial testing in
1992.
BAILEY.DOC 47
Driver Design Specification
7. References
7.1 References
[1] Bailey Product Instruction E93-905-9, "Enhanced Computer Interface Unit Programmer's
Reference Manual", Bailey Controls, Wickliffe, Ohio 44092.
[2] Bailey Product Instruction E93-905-1 “Serial Port Module (NSPM01)”, Bailey Controls,
Wickliffe, Ohio 44092
BAILEY.DOC 48
Driver Design Specification
8. Appendix
START
READ PARMAETERS
MAPPATH =
LOAD AND NULL AND
COMPARE INITSTATE <>
PREVIOUS MAP RESTART
DISCONNECT
POINT LIST N
CIU RESTART
ERROR
ERROR
N
N
CONNECT POINT
LIST
ENVIRONMENT
ERROR ERROR
N N
ONLINE
BAILEY.DOC 49
Driver Design Specification
The following flow chart applies to each point whose index number is > 0 Configuration of a point in
the CIU can occur: Once every cycle of the polling loop, During a read or write request from CITECT
or During initialization (special redundancy case only)
START
MS, WSP,
WCO, WRI, ESTABLISH POINT
SM
Y
ERROR
ESTABLISHED
Y
END
BAILEY.DOC 50
Driver Design Specification
Front-end READ
START
CONFIGURE
NOT
ESTABLISHED
REPLY
END
Front-end WRITE
START
IN QUEUE
BAILEY.DOC 51
Driver Design Specification
BACK-END TRANSMITT
START
COUNT++
CONFIGURE
COUNT%4=
0
READ EXCEPTION
COUNT%4=
REPORT SPECS
3
BAILEY.DOC 52
Driver Design Specification
BACK-END CPU
START
WRITE
ERROR
REPLY
CONFIGURATION
END
BAILEY.DOC 53