Scan i/o -5 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 31

Advertising
background image

Developing Applications

3–5

Publication 1747-6.5.3 Junel 1998

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.

The application can change the behavior of the input and output scans by allowing
the application to have more control over I/O scanning. The application can prevent
the scanner from doing any output scans and allow the application to read inputs
and initialize outputs before the scanner begins to write outputs. This mode allows
the application to pre-scan the inputs before the outputs are written.

The application can set the scanner to a conditional scan mode where the scanner
writes outputs at the next scan time after the application writes data to the output
image. In this mode, the scanner only writes outputs each time the application writes
data to the output image.

The application can also prevent output scans by the scanner and have the scanner
send a message after every input scan. The application can detect an end-of-scan
message and then read the input image, perform logic, and write outputs using
OC_DemandOutputScan to force the scanner to write outputs immediately. This
lets the application synchronize its control loop with the input and output scans.

The application can also disable both input and output scans. In this mode, the
scanner is a slave and input or output scans only take place when requested by the
host application.

Advertising
This manual is related to the following products: