beautypg.com

Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual

Page 85

background image

Chapter 7

Scanner Management

7-18

Arguments:

same as for cfg_info above.

Returned values:

an integer that can then be examined for the status values described

below (leading characters SF_). You may prefer to call the xlat_flt
function to convert the status bits to an English language string.

Before calling the flt_info function, your program should first examine
the SL_IN_SCAN bit in the configuration byte for the same adapter,
which can be obtained through cfg_info as shown in the sample code
below. If SL_IN_SCAN is false (0), the fault information is
meaningless.

Fault and Fault Dependent Group Bit Fields

The fields listed in Table 7.B are defined in the high byte of information
about each adapter. The fault information byte can be extracted by using
the flt_info function described above.

Table 7.B

Fault and Fault Dependent Group Bit Field Descriptions

Bit Field

Hex Value

Description

SF_ON_LINE

70 (hex)

true (1) if the adapter is on line, false (0) if faulted.

SF_IN_FGRP

08 (hex)

true (1) if the adapter is in a fault dependent group.

SF_GRP_NUM

07 (hex)

number of the fault group this adapter belongs to (meaningless

if SF_IN_FGRP is zero).

SF_GRP_FLT

80 (hex)

true (1) if this adapter has been instructed to go into fault mode

because a member of its fault group is faulted.

You can extract the fault dependent group number (0-7) by ANDing the
fault information byte with the constant SF_GRP_NUM, provided that the
SF_IN_FGRP bit is set.

Coding Examples

Here’s some sample code to extract the fault dependent group number:

status = flt_info(&pkt, rack, group);
if ( status & SF_IN_FGRP )

fdg_number = status & SF_GRP_NUM;

else

fdg_number = -1; /* no fault dep group */