beautypg.com

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

Page 76

background image

Chapter 7

Scanner Management

7-9

Autoconfigure

In doing an autoconfigure, the scanner actually queries each possible
adapter position to determine which addresses have adapters present.

To tell the scanner to do an autoconfigure, you simply issue an mr_wait
function call with C_AUTOCONF as its first argument. The scanner must
be in program mode to do an autoconfigure; otherwise the scanner returns
an error status.

When the scanner does an autoconfigure, it forgets any fault dependent
groups you may have set up. When doing an autoconfigure, the scanner
also puts a new default scan list into effect. The default scan list is simply
a list of all adapters that responded, in rack and group order. (In single slot
addressing, a single adapter with more than eight slots looks like two
adapters to the scanner.)

Calling sequence:

status = mr_wait(C_AUTOCONF,

&packet

);

where:

packet

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

pointer to the packet.

Returned values:

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

packet.qmr_data contains 32 words of configuration information, one

for every possible adapter address, followed by 0 to 16 bytes of the
current scan list; see discussion below.

packet.qmr_len

contains the length of data in bytes, which is 64 plus the

length of the new default scan list. In other words, to obtain the length
of the scan list you subtract 64 from packet.qmr_len.

Before we give you further information on interpreting the data returned
by an autoconfigure, you should know that we have provided a routine,
mr_print, to turn all the information into English. For details, please
see ”Print or Display Results” in this chapter.