Control scanner operation -4 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 30

Advertising
background image

3–4

Developing Applications

Publication 1747-6.5.3 June 1998

The application can read the current I/O configuration with the
OC_GetIOConfiguration function. If the scanner is not in Scan mode, this function
returns the current scanner configuration which can be downloaded to the scanner
using OC_DownloadIOConfiguration.

If the application requires a specific I/O configuration, the application can define
the I/O configuration structure with the rack sizes and module types installed in
each slot. The application passes this configuration structure to
OC_CreateIOConfiguration. OC_CreateIOConfiguration returns a scanner
configuration that can be downloaded to the scanner. For more information, see
chapter 5.

Once a valid scanner configuration is successfully downloaded to the scanner via
OC_DownloadIOConfiguration, the application can set the scanner to Scan mode
and control I/O.

Both OC_CreateIOConfiguration and OC_GetIOConfiguration build the
configuration data from an internal database of supported I/O modules.

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. For information about
estimating scan time, see PCIS Bus Card for 1746 Local I/O Installation
Instructions, publication 1747-5.31.

Advertising
This manual is related to the following products: