Oc_enableforces -15 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 69

OC_EnableForces
Library of Routines
6–15
Publication 1747-6.5.3 June 1998
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.
Return Value:
!
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.
Name:
Value:
Description:
SUCCESS
0
forces were updated successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCNOFORCES
15
no forces installed, scanner cannot enable forces
ERR_OCPARAM
8
parameter contains invalid value
ERR_OCRESPONSE
10
scanner did not respond to request
ERR_OCSCANCFG
14
scanner has not been configured