Oc_enableforces, Oc_enableforces -12 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 72

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

6-12 Library of Routines

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_EnableEOSNotify( Handle, EOSMSG_ENABLE );

/* Use OC_PollScanner() to check EOS messages */

OC_EnableForces

OC_EnableForces enables/disables forces for all inputs and outputs
with entries in the force files on the scanner.

Syntax:

int

OC_EnableForces(HANDLE handle, int mode);

Parameters:

Description:

If no I/O forces are in the force files, OC_EnableForces does not
enable forces and instead returns an error. All forces are disabled by
default.

ATTENTION

!

Enabling forces will potentially change the output
data values that your application was previously
controlling.

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

mode

If

mode

is:

FORCE_ENABLE

forces are enabled

FORCE_DISABLE

forces are disabled

FORCE_CLEAR

forces are disabled and all input and output
forces are cleared from the force files.

Advertising
This manual is related to the following products: