Enraf 854 Atg Interface Application Notes
Enraf 854 Atg Interface Application Notes
Enraf 854 Atg Interface Application Notes
APPLICATION NOTES
ENRAF NONIUS 854 ATG Interface
Contents
INTRODUCTION ............................................................................................ 1
Functional Overview ............................................................................ 1
COMMUNICATIONS INTERFACE............................................................... 2
Line Parameter Information ................................................................ 2
DESCRIPTION OF RECORD FORMATS & USAGE ................................... 3
General Command Format................................................................... 3
Command / Answer Record Data .............................................. 5
Data Request Messages........................................................................ 10
Operational Command Messages......................................................... 11
Identification Request Message ........................................................... 11
Item Messages....................................................................................... 12
Sample Item Message Commands............................................. 14
CIU Individual Commands .................................................................. 15
Gauge Group Commands ..................................................................... 15
General Gauge Group Command Format................................. 15
PROTOCOL CONSIDERATIONS .................................................................. 16
Calculation of BCC Field...................................................................... 16
Transmission Protocol Timings............................................................ 16
ACCOL USER INTERFACE........................................................................... 17
General Description.............................................................................. 17
Port Configuration Characteristics...................................................... 17
ACCOL Terminal Assignments............................................................ 18
Status Code Definitions........................................................................ 19
854 ATG Signal List ............................................................................. 21
Formats for the 854 ATG...................................................................... 27
APPENDIX A ∼ ACCOL EXAMPLES .......................................................... 29
Data Request......................................................................................... 29
Operational Request............................................................................. 31
Software Version Request .................................................................... 32
Item Commands.................................................................................... 33
Set Display Format .................................................................... 33
Set High Alarm Level ................................................................ 35
APPENDIX B ∼ REFERENCES ................................................................... 38
APPENDIX C ∼ TERMS & ABBREVIATIONS............................................ 39
ENRAF-NONIUS 854 ATG Interface
INTRODUCTION
Functional Overview
The Bristol Babcock 33XX controller functions as the master station on a master /
slave communication link. A port on the 33XX is connected via a standard RS 232
point-to-point or Multidrop link to up to ten ENRAF 858 type CIUs (GPU version).
The commands available over the link are described in references 1, 2, and 3 of
Appendix B. Theoretically, a maximum of thirty 854 ATG devices may be connected
to each 858 CIU.
An ACCOL ‘load’ containing custom calls to send data to, or request data from the
ATGs must run within the 33XX. This data is held in the 33XX in the form of
standard ACCOL signals. Translation between the ACCOL signals and the
messages to and from the ATGs is handled by the Custom Module firmware.
Each port of the 33XX can be associated with a separate communication link to an
858 link.
All available read / write commands are initiated by the 33XX. All operations will
be under control of an ACCOL program. No automatic polling is performed by the
Custom Module - any periodic polling for input must be performed by the ACCOL
load, via appropriate custom calls within an ACCOL task running at an appropriate
rate.
COMMUNICATIONS INTERFACE
Full details of the available cable configurations are described in reference 3,
ENRAF-NONIUS Instruction Manual Series 858 Communications Interface Unit
(Version 2.1, May 1994, Part No.:4416.500). It is assumed that data sent from the
33XX will not appear at the 33XX RX line. RTS / CTS should either be looped back
at the 33XX end, or looped via a modem connection. The 33XX makes no use of
other modem controls, so these will need to be wired as required locally at a modem
(if used).
Each 858 CIU used possesses a unique address. When the 33XX sends a command,
only the CIU specifically addressed will respond. Thus, the 33XX treats the link to
each 858 (or 854) as a logical ‘point-to-point’ link. Each CIU must be set to ‘host’
mode.
NOTE: The 33XX actually transmits using RS423. Some RS 232 implementations
are not RS 423 compatible. In such cases, an additional ‘level matching’ hardware
may be required the details of which are not within the scope of this document.
In addition, CIU Individual Commands are processed and answered by the CIU
only. Some support is provided for these, as they form a useful diagnostic tool.
The meaning of each command / answer type is governed by the ‘Type of Record’, or
TOR field. For general use, Data Request messages, Operational messages and
Identification messages are recommended. ‘Item messages’ have a TOR of ‘Z’, and
allow low level access to 854 data. However, it is possible that subsequent versions
of 854/858 products from ENRAF will change the use and availability of some
Items, so it is advisable that users consult appropriate ENRAF documentation for
this information.
The following describes the format of all available commands and answers.
Mnemonics used are described subsequently. Additional details of the available
‘Item’ messages are provided in references 1 and 2 of Appendix B.
All commands to the 854 (with the exception of those with TOR = Z) have the
following format:
5 r TOR
The following describes data found in Command / Answer records (discussed later).
H high alarm
L low alarm
- no alarm
FFFFFF error
-not available or invalid
-units error (as above)
999999 error
W Water found.
- Valid level
s 1 Temperature sign
F Invalid Temperature.
- Negative Temperature.
+ Positive Temperature.
F Invalid temperature,
temperature error, no
previous store command.
- Valid temperature.
soft 4 Version number of software
installed on XPU board.
L 1200 baud
H 2400 baud
msb 1 Highest nibble of switch SK3,
1 Line 1 occupied.
2 Line 2 occupied.
4 Line 3 occupied.
- No failure.
F Failure
- No Failure.
F Failure.
TOR Description
The answer records returned by the 854 corresponding to Data Request messages
are as follows.
TOR Description
Item Messages
An Item Message, specified by a TOR of ‘Z’ signifies sending Items to, or requesting
Items from the 854. The ‘Z’ record allows access to nearly all Items used within the
854 at a low level of access. The Items shown below are prescribed as being
available for use and ‘frozen’ according to current ENRAF standards. Additional
Items may also be available, please consult references 1 and 2 of Appendix B for
additional details.
The following are examples of item message commands and corresponding answers.
Note: there is no way of verifying if the commands have been carried out by the field
units.
PROTOCOL CONSIDERATIONS
In the event of no valid response being received within the timeout period, retries
may be performed as specified by parameter P1. Once a CIU has received a
command, and is preparing an answer, it will transmit ASCII ‘ack’ characters to the
33XX at approximately 30 ms intervals. This causes the 33XX Custom Module to
restart its response timeout. If an 858 CIU fails in such a way that it sends out
continuous ‘acks’, then the Custom Module will never timeout. The timeout record
may also be sent to the 33XX when a field transmission error occurs. This timeout
record may interrupt the transmission of an answer record in progress, so the 33XX
must continue to poll an STX character to account for this.
General Description
Communication is achieved in the standard way, using the Custom Module
statement within an ACCOL executing task (not TASK 0). The Custom call
requires that a signal list providing details of the requested operation, be specified.
101 Format Error: An input signal was control inhibited. (Formats only)
103 Format Error: An input string signal value was truncated. (Formats
only)
104 Format Error: Attempt to store into a Read Only Data Array
-200 to
-209 Timeout message received from CIU (with error code 0=-200, 1=-201...)
-1000 to
-10999 Error code returned by 854 (corresponding to 854 error code 000 to
999, see reference 2 of Appendix B,) negate and subtract 1000 to get
error code returned by 858 / 854.
An analog signal whose value represents the 33XX port number to be used
for communication with the 858 CIU. The port must be a Custom port
configured for 854 ATG mode.
An analog signal whose value specifies the CIU address. Valid values are 0
to 9. (Converted to ASCII by the Custom Module.) If a value of ‘1000’ is
given, then this specifies a ‘general purpose’ command. The entire content of
the output / input messages between STX and ETX is then under format
control.
This is an analog signal whose value specifies the address on the ENRAF
field communication devices. Valid values are 0 to 99. For device group
commands the value 300 represents the address ‘*’ (wildcard), the values of
100 to 109 indicate an address of *n, while 200 to 209 indicate n* (see
reference 3, Appendix B). A value of 1000 is used to select CIU direct
commands.
This is a string signal (1 character) whose value specifies the ENRAF TOI.
For commands to the 854, this is always set to ‘B’. Other values are allowed
for CIU commands and for possible future expansion:
(Other upper case alphabetic characters are allowed and treated as ’Z’
commands.)
This is an analog signal providing the number of a list which contains signals
to store the input data for the given command.
For TOR = B:
Input list, Signal 1: Alarm status signal.
Input list, Signal 2: Level status signal.
Input list, Signal 3: Level signal.
For TOR = C:
Input list, Signal 1: Alarm status signal.
Input list, Signal 2: Temperature status signal.
Input list, Signal 3: Temperature signal.
For TOR = D:
Input list, Signal 1: Alarm status signal.
Input list, Signal 2: Level status signal.
Input list, Signal 3: Level signal.
Input list, Signal 4: Temperature status signal.
Input list, Signal 5: Temperature signal.
For TOR = E:
Input list, Signal 1: Stored alarm status signal.
Input list, Signal 2: Level status signal.
Input list, Signal 3: Level signal.
For TOR = F:
Input list, Signal 1: Stored alarm status signal.
Input list, Signal 2: Level status signal.
Input list, Signal 3: Level signal.
Input list, Signal 4: Temperature status signal.
Input list, Signal 5: Temperature signal.
For TOR = Z:
Input list: This will be a mixture of string signals, analogs or digitals,
depending upon the item requested. At its simplest, this can be a single
string signal, large enough to hold the entire expected answer record. In this
way it is possible for the ACCOL load to receive any reply received from the
854, though processing of the string signal within the ACCOL program will
be limited. More advantageous is the use of string signals to handle the
static part of the data field, and the use of analog or logical signals together
with the input format to handle the data returned. This is more clearly
demonstrated by the examples in Appendix A.
Alarm Status
Value Description
-1 Alarm Data Error (F)
-2 Motor Limit Switch (C)
-3 Block or freeze active (B)
-4 High alarm (H)
-5 Low alarm (L)
-10 Other value returned.
0 No alarm.
Level
The raw value (in units of millimeters, or 0.001 ft) is divided by 1000 inches.
The value ranges from 0 to 99.999. In addition, 999.999 may be returned on
error.
Level Status
Value Description
-1 Level information not valid(F)
-2 Motor Limit Switch (C)
-3 Block or freeze active (B)
-4 Locktest or calibrate active (L)
Temperature
Temperature Status
Value Description
-1 Temperature data not valid (F).
0 Valid temperature.
Version Number
An ACCOL string signal which contains the version number, such as,’854
A1.0’. The allocated string must be large enough to contain the version
number returned. Formats may be used to parse the numerical portion of the
version into analog signals, if required.
The formats are only used to translate between ACCOL analog and logical signals
and the data field of ‘Z’ command / answer records. Where strings are specified in
the input / output lists, no format is used. The length of the string dictates how
many characters are transferred directly to / from the input / output data field.
unless a corresponding ‘T’ format is present at the correct place in the format list.
Note: The 854 requires Item values to conform to a precise format. These formats are
not always the same as given by the ENRAF documentation. It is advisable that an
ENRAF ‘Pet’ terminal is used to verify the formats required during commissioning.
‘CSTn:m’ formats are used to select various options controlling the format of
numbers in the current format block only. ‘m’ should be specified as ‘1’ to set the
option on and ‘0’ to turn the option off.
Descriptor Function
Descriptor Function
Port C line at 2400 bps, 7 bit characters, 1 stop bit, odd parity, 854 ATG mode (22),
idle time of 60ms. 0 retries.
Port details:
Data Request
In this example, the ATG is requested to send alarm status, level and temperature
(TOR=D). The request can be sent every n seconds (controlled by the ACCOL task
rate for Task 10). Status signals are each returned as single analog values.
*SIGNALS
PORT.NUM.1 A 3.0000000 (Port C on 33XX)
CIU.ADDR.1 A 5.0000000 (CIU address)
TX.ADDR.1 A 1.0000000 (Transmission address)
TOI.TYPE.1 S LEN:1 ‘B’ (TOI type)
TOR.TYPE.1 S LEN:1 ‘D’ (TOR type)
IO.LIST.1 A 11.000000 (List number, for signals)
REPLY.TIMOUT.1 A 2.0000000 (2 seconds allowed for response)
DONE.1 0.0000000 (Completion code)
ALARM.STATUS.1 A 0.0000000 (To contain alarm status value)
LEVEL.STATUS.1 A 0.0000000 (To contain level status value)
LEVEL.1.1 A 0.0000000 (To contain level value)
TEMPER.STATUS.1 A 0.0000000 (To contain temperature status
value)
TEMPER.1.1 A (To contain temperature value)
ATG1.STATUS.1 A (Status signal)
*TASK 10
10 *CUSTOM
MODE 22.0000000 (mode # for 854 ATG mode)
LIST 1.0000000 (Custom module parameter list #)
STATUS ATG1.STATUS.1 (Custom module status signal)
*LIST 11
10 ALARM.STATUS.1
20 LEVEL.STATUS.1
30 LEVEL.1.1
40 TEMPER.STATUS.1
30 TEMPER.1.1
Operational Request
In this example, the ATG is requested to send an operational request to ‘Search for
Water Level’.
*SIGNALS
PORT.NUM.1 A 3.0000000 (Port C on 33XX)
CIU.ADDR.1 A 5.0000000 (CIU address)
TX.ADDR.1 A 1.0000000 (Transmission address)
TOI.TYPE.1 S LEN:1 ‘B’ (TOI type)
TOR.TYPE.1 S LEN:1 ‘W’ (TOR type)
IO.LIST.1 A 11.000000 (List number for signals)
REPLY.TIMOUT.1 A 2.0000000 (2 seconds allowed for response)
DONE.1 0.0000000 (Completion code)
*TASK 10
10 *CUSTOM
MODE 22.0000000 (mode # for 854 ATG mode)
LIST 1.0000000 (Custom module parameter list #)
STATUS ATG1.STATUS.1 (Custom module status signal)
*LIST 1
10 PORT.NUM.1
20 CIU.ADDR.1
30 TX.ADDR.1
40 TOI.TYPE.1
50 TOR.TYPE.1
60 IO.LIST.1
70 REPLY.TIMOUT.1
80 DONE.1
*LIST 11
10 ALARM.STATUS.1
*SIGNALS
PORT.NUM.1 A 3.0000000 (Port C on 33XX)
CIU.ADDR.1 A 5.0000000 (CIU address)
TX.ADDR.1 A 1.0000000 (Transmission address)
TOI.TYPE.1 S LEN:1 ‘B’ (TOI type)
TOR.TYPE.1 S LEN:1 ‘X’ (TOR type)
IO.LIST.1 A 11.000000 (List number for signals)
REPLY.TIMOUT.1 A 2.0000000 (2 seconds allowed for response)
DONE.1 0.0000000 (Completion code)
*TASK 10
10 *CUSTOM
MODE 22.0000000 ( Mode # for 854 ATG mode)
LIST 1.0000000 (Custom module parameter list #)
STATUS ATG1.STATUS.1 (Custom module status signal)
*LIST 1
10 PORT.NUM.1
20 CIU.ADDR.1
30 TX.ADDR.1
40 TOI.TYPE.1
50 TOR.TYPE.1
60 IO.LIST.1
70 REPLY.TIMOUT.1
80 DONE.1
*LIST 11
10 SOFT.VERS.1
Item Commands
The following are examples of Item commands.
The following example sends an Item command to set the display format to ‘A’.
*SIGNALS
PORT.NUM.1 A 3.0000000 (Port C on 33XX)
CIU.ADDR.1 A 5.0000000 (CIU address)
TX.ADDR.1 A 1.0000000 (Transmission address)
TOI.TYPE.1 S LEN:1 ‘B’ (TOI type)
TOR.TYPE.1 S LEN:1 ‘Z’ (TOR type)
IO.LIST.1 A 11.000000 (List number for signals)
REPLY.TIMOUT.1 A 2.0000000 (2 seconds allowed for response)
DONE.1 0.0000000 (Completion code)
*LIST 1
10 PORT.NUM.1
20 CIU.ADDR.1
30 TX.ADDR.1
40 TOI.TYPE.1
50 TOR TYPE.1
60 IO.LIST.1
70 REPLY.TIMOUT.1
80 DONE.1
90 OUTPUT.LIST.1
100 INPUT.FORM.1
110 OUTPUT.FORM.1
*LIST 11
10 OITEM.SET.1
20 OITEM.VAL.1
The following example sends an Item command to request the setting of the high
alarm level. The returned value is to be placed in an ACCOL string signal.
*SIGNALS
PORT.NUM.1 A 3.0000000 (Port C on 33XX)
CIU.ADDR.1 A 5.0000000 (CIU address)
TX.ADDR.1 A 1.0000000 (Transmission address)
TOI.TYPE.1 S LEN:1 ‘B’ (TOI type)
TOR.TYPE.1 S LEN:1 ‘Z’ (TOR type)
IO.LIST.1 A 11.000000 (List number for signals)
REPLY.TIMOUT A 2.0000000 (2 seconds allowed for response)
DONE.1 0.0000000 (Completion code)
*TASK 10
10 * CUSTOM
MODE 22.000000 (mode # for 854 ATG mode)
LIST 1.0000000 (Custom module parameter list #)
STATUS ATG1.STATUS.1 (Custom module status signal)
*LIST 11
10 ITEM.VAL.1
*LIST 12
10 OITEM.SET.1
*FORMAT 21
10 2X,F9.4 (skip the ‘HA’ echo, then interpret ASCII value)
*SIGNALS
PORT.NUM.1 A 3.0000000 (Port C on 33XX)
CIU.ADDR.1 A 5.0000000 (CIU address)
TX.ADDR.1 A 1.0000000 (Transmission address)
TOI.TYPE.1 S LEN:1 ‘B’ (TOI type)
TOR.TYPE.1 S LEN:1 ‘Z’ (TOR type)
IO.LIST.1 A 11.000000 (List number for signals)
REPLY.TIMOUT A 2.0000000 (2 seconds allowed for response)
DONE.1 0.0000000 (Completion code)
*TASK 10
10 *CUSTOM
MODE 22.000000 (mode # for 854 ATG mode)
LIST 1.0000000 (Custom module parameter list #)
STATUS ATG1.STATUS.1 (Custom module status signal)
*LIST 1
10 PORT.NUM.1
20 CIU.ADDR.1
30 TX.ADDR.1
40 TOI.TYPE.1
50 TOR.TYPE.1
60 IO.LIST.1
70 REPLY.TIMOUT.1
80 DONE.1
90 OUTPUT.LIST.1
100 INPUT.FORM.1
110 OUTPUT.FORM.1
*LIST 12
10 OITEM.SET.1
20 OITEM.VAL.1
*FORMAT 22
10 F9.4
APPENDIX B ∼ REFERENCES
1. ENRAF-NONIUS Protocol Manual for 854 Advanced Technology Gauge via the
type CIU-GPU Version (Version 1, February 1990, Document
Number:0000.564.4416.505-40)
2. ENRAF-NONIUS Instruction Manual Series 854 ATG Level Gauge (Version 2.2,
November 1993, Part No. 4416.220)
ack acknowledge
C Celsius
F Fahrenheit
ms milliseconds
TX / RX Transmit / Receive