Oc_setmoduleinterrupt -69 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 123
![background image](/manuals/579094/123/background.png)
OC_SetModuleInterrupt
Library of Routines
6–69
Publication 1747-6.5.3 June 1998
OC_SetModuleInterrupt
OC_SetModuleInterrupt enables, disables, or acknowledges the module interrupt
for the slot
slotnum
on the scanner.
Syntax:
int
OC_SetModuleInterrupt(HANDLE handle, int slotnum, int mode);
Parameters:
Description:
When a module interrupt is received, the scanner generates a module interrupt message that the host
application can read by calling the OC_PollScanner function. After retrieving the module interrupt message,
the host application should immediately acknowledge the module interrupt and then service the module
interrupt message. The module interrupt must be acknowledged before another can be received from that
module.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
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. */
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
slotnum
Must be a valid slot number
mode
If
mode
is:
IOINT_DISABLE
the module interrupt is disabled (default)
IOINT_ENABLE
the module interrupt is enabled
IOINT_ACK
the module interrupt is acknowledged.
Name:
Value:
Description:
SUCCESS
0
module interrupt was processed 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