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

Page 79

Advertising
background image

Chapter 7

Scanner Management

7-12

The scan list request is the only MR that requires both data and length of
data to be in the packet before you call mr_wait. The first argument to
mr_wait is C_SCANLIST. The scanner must be in program mode to
execute a scan list request; otherwise the scanner just returns an error code.

Calling sequence:

packet.qmr_len = . . . /* length of scan list, 0-64 */
packet.qmr_data[0] = . . . /* first adapter address */
packet.qmr_data[1] = . . . /* second adapter address */

. . .

packet.qmr_data[length-1] = . . . /* last adapter address */
status = mr_wait(C_SCANLIST,

&packet

);

where

packet

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

pointer to the packet.

packet.qmr_len, the length of the scan list, may be anything from 0 to

64 inclusive.

packet.qmr_data contains the adapter addresses for the scan list, in the

form 4 x rack + starting group / 2. A given adapter can occur more than
once in the list, or an existing adapter may be omitted from the scan list.

Returned values:

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

The time required to complete a scan list command is essentially the
time to scan every adapter once: 11 milliseconds per scan list entry (7
ms/entry at 115.2 Kbaud). Since the scan list can be as long as 64
entries, the worst case time is 704 ms at 57.6 Kbaud, 448 ms at 115.2
Kbaud.

Advertising