Oc_sethostwatchdog, Oc_sethostwatchdog -56, Return value: considerations – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 116: Example, Syntax
Publication 1747-UM002A-US-P - June 2000
6-56 Library of Routines
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
handle;
FORCEDATA
forces;
int
retcode;
/* Force low byte of input word 1 of slot 6 to 0x5A */
forces.SlotNum = 6;
forces.WordOffset = 1;
forces.IOType = FORCE_INPUTS;
forces.ForceMask = 0x00FF;
forces.ForceVal = 0x005A;
retcode = OC_SetForces( handle, &forces );
/* Must call OC_EnableForces() to actually apply the force
data */
OC_SetHostWatchdog
OC_SetHostWatchdog sets the host-to-scanner watchdog delay and
mode of the scanner.
Syntax:
int
OC_SetHostWatchdog(HANDLE handle, int mode,
WORD delay);
Name:
Value:
Description:
SUCCESS
0
I/O forces were configured successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCPARAM
8
parameter contains invalid value
ERR_OCRESPONSE
10
scanner did not respond to request
ERR_OCSCANCFG
14
scanner has not been configured
ERR_OCSLOT
12
slot number is invalid