Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 60

6–6
Library of Routines
OC_ConfigureDII
Publication 1747-6.5.3 June 1998
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
DII_CFG
diicfg;
int
retcode;
diicfg.Slotnum = 6;/* Slot 6 has discrete input module */
diicfg.IOIncludeMask = 1;/* bit 0 is the input trigger */
diicfg.IOEdgeType = 1;/* bit 0 must toggle from low to high */
diicfg.PresetCount = 3;/* bit 0 must toggle 3 times */
retcode = OC_ConfigureDII( Handle, &diicfg );
/* Use OC_PollScanner() to check for DII messages */
Name:
Value:
Description:
SUCCESS
0
discrete input interrupt (DII) was configured successfully
ERR_OCACCESS
2
handle
does not have access to the scanner
ERR_OCRESPONSE
10
scanner did not respond to request
ERR_OCSCANCFG
14
scanner has not been configured
ERR_OCSLOT
12
slot number is invalid