Oc_setuserledstate, Oc_setuserledstate -65, Syntax – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 125: Parameters: description, Return value: considerations, Example

Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-65
OC_SetUserLEDState
OC_SetUserLEDState sets the state of a user-defined LED
Syntax:
int
OC_SetUserLEDState(HANDLE handle, int lednum,
int state);
Parameters:
Description:
The application can use the four user LEDs for any purpose.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library.
Example:
HANDLE
Handle;
int
retcode;
retcode = OC_SetUserLEDState( Handle, 1, LED_GREEN_SOLID );
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
lednum
Must be a value from 1 to 4, which corresponds to LED1, LED2,
LED3, and LED4
ledstate
If
ledstate
is:
LED_OFF
LED is off
LED_RED_SOLID
LED is on, red solid
LED_GREEN_SOLID
LED is on, green solid
LED_RED_FLASH
LED is on, red flashing (LED1 and
LED2 only)
LED_GREEN_FLASH
LED is on, green flashing (LED1 and
LED2 only)
Name:
Value:
Description:
SUCCESS
0
LED was updated successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCPARAM
8
parameter contains invalid value