Control scanner operation -4 scan i/o -4, Control scanner operation, Scan i/o – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 36

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

3-4 Developing Applications

Control scanner operation

Once the scanner has been configured, the application can control
scanner operation. The host application can:

set the scanner to Idle or Scan mode

control the scan time

control I/O

read or write module files

clear faults

enable/disable slots

set I/O Idle state

install/remove forces

handle module interrupts and discrete input interrupts

The API uses messages to communicate with the scanner. The scan
time settings affect the time allowed by the scanner to process a
message. OC_SetScanTime adjusts the scan time of the application.

The scanner processes messages during any available time that it is
not scanning I/O. If the scan time is set too small, some API functions
might take a relatively long time to complete. If some functions seem
to be taking too long to complete, increase the scan time to provide
more time for the scanner to process messages. If the scan time is set
too large, I/O won’t update fast enough.

From the end of post until entering scan mode, the scanner holds the
I/O reset line high.

For information about estimating scan time, see PCIS Bus Card for
1746 Local I/O Installation Instructions, publication 1747-5.31.

Scan I/O

The scanner provides two basic methods for scanning I/O: timed
scans and on-demand scans. The host application can use either, or a
combination of both.

Typically, the scanner reads inputs from modules and writes outputs
to modules once every scan time. To read inputs and write outputs,
the application calls OC_ReadInputImage and OC_WriteOutputImage
independently from the scanner’s scan sequence.

Advertising
This manual is related to the following products: