7 - scanner management, Chapter objectives, Overview – Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual
Page 68: Scanner management

Chapter
7
7-1
Scanner Management
This chapter explains how to issue management requests to the scanner.
After reading this chapter, you should be able to:
queue any of the six types of management requests
print or display the results, or write formatted results to a file.
To make this chapter shorter and easier to read, we use the abbreviation
MR for management request.
Here is a summary of the actions involved in completing an MR:
Your program puts the data (for all commands except autoconfigure and
link status) and length of data (for scan list only) into a packet of
specified structure.
Your program calls the mr_wait library routine.
mr_wait copies information to an internal queue and interrupts the
scanner. mr_wait does not return to your program but instead goes into
a wait loop, which ends when the request is done or g_timout units of
time have elapsed.
When the scanner responds (usually a short time later), the interrupt
handler copies the MR information to the global RAM. This happens
essentially in background as far as mr_wait is concerned.
When the scanner comes back a second time with a completion status,
the interrupt handler copies that status (plus the length of data and the
data, for autoconfigure and link status) to your program’s packet.
Again, this is in background as far as mr_wait is concerned.
When
mr_wait
senses in its loop that the request is complete, it returns
control to your program. If the timeout interval runs out before the
scanner comes back with a confirmation, mr_wait returns to your
program anyway.
Chapter Objectives
Overview