Special CE Functions



Three special CE functions for extracting multiple values from the scan task buffer (see Device Independent Fields Treated Specially ), have been included as part of the release.

BBLOG_SCAN CE Function

BBLOG_SCAN(1, [RTU 01.scan input(0)], [.alarm data], [.fail count])

The arguments to the BBLOG_SCAN CE function are as follows:

Argument Description
0 A flag that indicates whether the alarm text contained in the "[.alarm data]" attribute is saved or not. Set this value to zero to overwrite it with the text sent from the RTU.
1 The scan link to the appropriate record in the scan input table. Note that the "st buffer size" field should have a value of 108.
2 A table attribute that will contain the logical alarm information (see below for the table format).
3 An optional attribute that will contain the scan fail count if specified.

The "alarm data" table should have the following format:

Field Number Field Name DE Type Description
0 alarm type rtUINT16 This code completely identifies the type of alarm being reported (see Common Alarm Information below). The values contained within this value have been broken out into other fields within this table.
1 alarm priority rtUINT8 This value contains the alarm priority information of the alarm signal, and the logical alarm type information (for logical signals) (see Common Alarm Information below).
2 inhibit status rtUINT8 This value contains the inhibit status byte (see Common Alarm Information below). The values contained within this value have been broken out into other fields within this table.
3 alarm rtLOGICAL Alarm state from the "alarm type" value above.
4 report state rtUINT8 Alarm report state from the "alarm type" value above.
5 ack required rtLOGICAL Specifies whether an acknowledgement is required or not.
6 manual inhibit rtLOGICAL Manual inhibit status value from the "inhibit status" byte above.
7 control inhibit rtLOGICAL Control inhibit status value from the "inhibit status" byte above.
8 alarm inhibit rtLOGICAL Alarm inhibit status value from the "inhibit status" byte above.
9 alarm rereport rtLOGICAL Alarm re-report value from the "alarm type" value above.
10 ext format rtLOGICAL Extended format value from the "alarm type" value above.
11 alarm time rtTIME Alarm time.
12 on off text rtBYTES8 Text that contains either "ON" or "OFF".
13 alarm text rtBYTES80 Alarm text.

BBLOG_INV_SCAN CE Function

BBLOG_INV_SCAN(1, [RTU 01.scan input(0)], [.alarm data], [.invert], [.fail count])

The arguments to the BBLOG_INV_SCAN CE function are as follows:

Argument Description
0 A flag that indicates whether the alarm text contained in the "[.alarm data]" attribute is saved or not. Set this value to zero to overwrite it with the text sent from the RTU.
1 The scan link to the appropriate record in the scan input table. Note that the "st buffer size" field should have a value of 108.
2 A table attribute that will contain the logical alarm information (see below for the table format).
3 An optional attribute that specifies whether the logical value is inverted (1) or not (0). This value can be specified as NULL if it is not required and any of the following parameters are needed.
4 An optional attribute that will contain the scan fail count if specified.

The "alarm data" table is as described above.

BBANA_SCAN CE Function

BBANA_SCAN(1, 1, [RTU 01.scan input(0)], [.alarm data], [.fail count])

The arguments to the BBANA_SCAN CE function are as follows:

Argument Description
0 A flag that indicates whether the alarm units text contained in the "[.alarm data]" attribute is saved or not. Set this value to zero to overwrite it with the units text sent from the RTU.
1 A flag that indicates whether the alarm text contained in the "[.alarm data]" attribute is saved or not. Set this value to zero to overwrite it with the text sent from the RTU.
2 The scan link to the appropriate record in the scan input table. Note that the "st buffer size" field should have a value of 116.
3 A table attribute that will contain the logical alarm information (see below for the table format).
4 An optional attribute that will contain the scan fail count if specified.

The "alarm data" table should have the following format:

Field Number Field Name DE Type Description
0 alarm type rtUINT16 This code completely identifies the type of alarm being reported (see Common Alarm Information below). The values contained within this value have been broken out into other fields within this table.
1 alarm priority rtUINT8 This value contains the alarm priority information of the alarm signal, and the logical alarm type information (for logical signals) (see Common Alarm Information below).
2 inhibit status rtUINT8 This value contains the inhibit status byte (see Common Alarm Information below). The values contained within this value have been broken out into other fields within this table.
3 alarm rtLOGICAL Indicates if any of the alarm state bits are set from the "alarm type" value above.
4 lo rep state rtUINT8 Low alarm report state from the "alarm type" value above.
5 lo lo rep state rtUINT8 Low/Low alarm report state from the "alarm type" value above.
6 hi rep state rtUINT8 Hi alarm report state from the "alarm type" value above.
7 hi hi rep state rtUINT8 Hi/Hi alarm report state from the "alarm type" value above.
8 questionable data rtLOGICAL Questionable data value from the "inhibit status" byte above.
9 manual inhibit rtLOGICAL Manual inhibit status value from the "inhibit status" byte above.
10 control inhibit rtLOGICAL Control inhibit status value from the "inhibit status" byte above.
11 alarm inhibit rtLOGICAL Alarm inhibit status value from the "inhibit status" byte above.
12 alarm rereport rtLOGICAL Alarm re-report value from the "alarm type" value above.
13 ext format rtLOGICAL Extended format value from the "alarm type" value above.
14 ack required rtLOGICAL Specifies whether an acknowledgement is required or not.
15 alarm limit rtFLOAT Alarm limit if provided.
16 alarm time rtTIME Alarm time.
17 units text rtBYTES8 Analog unit text.
18 alarm text rtBYTES80 Alarm text.

Common Alarm Information

This section describes some of the common alarm information values.

Alarm Data Description
alarm type

This code completely identifies the type of alarm being reported:

Bit Description
2 0=standard format, 1=extended format
6 alarm re-report indicator
4 set alarm value
8 set questionable data value
16 set signal value

If alarm signal type is analog, then:

Bit Description
3,7,11,15 alarm state for low, high, low/low and high/high alarm respectively. 0=no alarm, 1=alarm.
0:1,4:5,8:9,
12:13
alarm report state for low, high, low/low and high/high respectively. 00=no report, 01=single, 10=momentary, 11=multiple

If alarm signal type is logical, then:

Bit Description
0:1 alarm report state for low, high, low/low and high/high respectively. 00=no report, 01=single, 10=momentary, 11=multiple
3 logical alarm state. 0=no alarm, 1=alarm.
7 logical signal value.
alarm priority

This value contains the alarm priority information of the alarm signal, and the logical alarm type information (for logical signals).

If alarm signal type is analog, then:

Bit Description
0:1, 2:3, 4:5, 6:7 alarm priority for low, high, low/low, and high/high alarms respectively. 00=event, 01=op guide, 10=noncritical, 11=critical.

If alarm signal type is logical, then:

Bit Description
0:1 logical alarm type. 01=false state, 10=true state, 11=change of state.
2:3 logical alarm priority.
inhibit status

The format of the inhibit status byte is as follows:

Bit Description
0 reserved
1 reserved
2 questionable data status (analog only)
3 reserved
4 manual inhibit status
5 control inhibit status
6 alarm inhibit status
7 reserved

 

[warning] This byte is saved in this format only for alarm data types with the extended format. For the standard format, this byte is as described in st buffer size.