beautypg.com

9 - general support features, Chapter objectives, Timing loops – Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual

Page 108: General support features

background image

Chapter

9

9-1

General Support Features

This chapter explains how to use the library functions not discussed in
earlier chapters. After reading this chapter, you should be able to:

write timing loops

date and time stamp your program output

use a supplied library routine to translate a numeric scanner command to

English.

The interrupt handler that we supply maintains two counters for the use of
your program: one unsigned counter that counts up every 55 milliseconds
and one signed counter that counts down every 55 ms. (The actual interval
is more nearly 1,193,180 / 64K Hz, about 18.2065 ticks a second.)

The time base is determined by host hardware and cannot be changed by
user programming. If 55 ms intervals are too large for your timing, your
only recourse is to program the timer chip. Such programming is beyond
the scope of this manual, but you should be able to find the necessary
information in the hardware technical reference manual for your host
computer.

If your application needs more than two timers, you can also use the
system time function described in the next section. Remember to take
account of midnight in your coding.

The two timers described in this section work only after a call to
setup_6008 or start_6008 and before a call to stop_6008.

Chapter Objectives

Timing Loops