Oc_setoutputupdate mode, Oc_setoutputupdatemode -61, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 121: Syntax, Parameters: description

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-61

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_SetModuleInterrupt( Handle, 6, IOINT_ENABLE );

/* Slot 6 module now enabled to generate module interrupts. */

/* Use OC_PollScanner() to check for Module Interrupt

messages. */

OC_SetOutputUpdate
Mode

OC_SetOutputUpdateMode controls how the scanner updates real
outputs from the Output Image.

Syntax:

int

OC_SetOutputUpdateMode(HANDLE handle, int mode);

Parameters:

Description:

This function does not affect input image scanning.

Setting the output update mode to OUTUPD_NEVER allows the host
application to read the input image and perform logic to determine
the initial state of outputs. Once the output image is written with the
initial state data, the output update mode can be changed to allow
updating of the outputs.

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

mode

If

mode

is:

OUTUPD_NEVER

the scanner does not write outputs from
the output image unless explicitly
requested by the OC_DemandOutputScan
function

OUTUPD_CHANGE

the scanner writes outputs only when the
scanner output image is written via
OC_WriteOutputImage, but does not
continuously update outputs from the
output image every scan

OUTUPD_ALWAYS

the scanner continuously updates outputs
from the output image on every scan.

By default, the output update mode is OUTUPD_NEVER. A change
in status of the output update mode will take effect at the start of
the next scan.

Advertising
This manual is related to the following products: