beautypg.com

5 - startup, status, and shutdown, Chapter objectives, Overview – Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual

Page 44: Startup, status, and shutdown

background image

Chapter

5

5-1

Startup, Status, and Shutdown

This chapter explains features that must be in every scanner program.
After reading this chapter, you should be able to write code that:

tells the scanner to start operation

lets the scanner know that your program is still active (the host

watchdog)

makes sure that the scanner is still active

checks the current operating status of the scanner

shuts down scanner operation in a way that leaves the scanner ready for

when your program runs again.

Every application begins with a call to setup_6008 or start_6008. Every
application makes one or more calls to host_active to satisfy the host
watchdog. Applications should check global variable g_act_scnr
periodically to make sure that the scanner is still active, though this is not
enforced. If your program finds from g_act_scnr that the scanner is no
longer active, you can call fatal_6008 to find out why. Finally, every
application must call stop_6008 before exiting.

CAUTION: If you are running a real-time control program,
screen dumps

[Shift-PrtSc]

cause the scanner to lose

communication with the host computer. Adapters on the I/O
link go to Last State or Reset, depending on their switch
settings. You must restart your system to re-establish
communication.

Chapter Objectives

Overview