beautypg.com

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

Page 81

background image

Chapter 7

Scanner Management

7-14

In the data array, you must fill the first 32 bytes, one for each possible
adapter position. The subscripting is 4 x rack + group / 2. (In the subscript
calculation, group is the adapter’s starting group number within the rack,
not the FDG number.) For each adapter position, if the adapter doesn’t
exist, or it exists but you don’t want it to be in a fault group, put zero in the
data byte. For each existing adapter that is in the current scan list and that
you want in a fault group, put the fault group number ORed with
SF_IN_FGRP in the data byte.

Note that an adapter is not allowed to be in an FDG unless it is also in the
current scan list. If you want to increase the scan list and put the added
adapters in fault groups, you must issue two commands in that order. If
you try to issue a FDG request that puts unscanned adapters in fault
groups, the scanner returns an error code and does not change the existing
fault groups.

Once you’ve set up the data array, call mr_wait with a first argument of
C_FLT_GRP. The scanner must be in program mode to execute a FDG
request; otherwise the scanner returns an error code.

Calling sequence (example):

packet.qmr_data[...] = 0; /* no fault group */
packet.qmr_data[...] = 1 | SF_IN_FGRP; /* fault group #1 */

. . .

packet.qmr_data[...] = 0 | SF_IN_FGRP; /* fault group #0 */
status = mr_wait(C_FLT_GRP,

&packet

);

where

packe

t is a QMR type packet. Note that the argument to mr_wait is a

pointer to the packet.

packet.qmr_data

contains the fault group numbers for the 32 possible

adapter addresses, four per rack.

Returned values:

status and packet.qmr_stat as explained under General Form, above.