Rockwell-automation 1747-PCIS API Software - Open Controller Uživatelský manuál Strana 123

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 174
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 122
Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-63
OC_SetScanMode
OC_SetScanMode changes the scan mode of the scanner.
Syntax:
int OC_SetScanMode(HANDLE handle, int mode);
Parameters:
Description:
The scanner must be properly configured before going to Scan mode.
OC_SetScanMode will fail if there are any unread extended errors or
faults. Call OC_GetExtendedError to extract all extended errors and
call OC_ClearFault to clear any faults before calling OC_SetScanMode.
Before the scanner changes to Scan mode, it compares the
downloaded I/O configuration to the racks and I/O modules actually
installed. If there are any problems, an extended error is generated
and OC_SetScanMode returns an error. If the scanner finds no
problems, the scanner is in Scan mode when this function returns.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE Handle;
int retcode;
retcode = OC_SetScanMode(Handle, SCAN_RUN); /* Scan I/O */
Parameter: Description:
handle Must be a valid handle returned from OC_OpenScanner
mode If
mode is:
SCAN_IDLE the scanner changes to Idle mode and stops
scanning I/O
SCAN_RUN the scanner changes to Scan mode and begins
scanning I/O.
Name: Value: Description:
SUCCESS 0 scan mode was set successfully
ERR_OCACCESS 2
handle does not have access to the scanner
ERR_OCFAULT 13 scanner is faulted
ERR_OCINIT 5 scanner has not been initialized, see OC_InitScanner
ERR_OCPARAM 8 parameter contains invalid value
ERR_OCRESPONSE 10 scanner did not respond to request
Zobrazit stránku 122
1 2 ... 118 119 120 121 122 123 124 125 126 127 128 ... 173 174

Komentáře k této Příručce

Žádné komentáře