Operator`s manual

43 Signametrics
Description Initialize the scanner.
#include "sm4040.h"
int SCANInit(int iScan)
Remarks This function must be the first function to be executed. It opens the driver for the
specified Scanner. The first one being 0, the second 1, etc. It also initializes the hardware
and software and sets the scanner to Disabled configuration.
Parameter Type/Description
iScan
int Identifies the Scanner. Scanners are numbered starting with zero.
Return Value The return value is one of the following constants.
Value Meaning
SCAN_OKAY
Scanner was initialized successfully.
Negative Value
Error code
Example int i = SCANInit(0); // Initialize the first Scanner
SCANIsInitialized
H/W access Command ; Polled Command
Description Return the active status of the Scanner.
#include “SM4040.H”
int SCANIsInitialized(int iScan)
Remarks This function returns the status of the Scanner. If the scanner was previously initialized,
it is an active one, and TRUE is returned. If the scanner was not initialized and is
available to be opened, the return value is FALSE, indicating the Scanner maybe
initialized and addressed. This function is used for managing multiple scanners in a
system.
Parameter Type/Description
iScan
int Identifies the Scanner. Scanners are numbered starting with zero.
Return Value TRUE, FALSE or an error code.
Value Meaning
TRUE
Scanner is initialized and active.
FALSE
Scanner is not initialized.
Negative Value
Error code
Example int active = SCANIsInitialzied(0);
SCANOpenAllChannels
H/W access Command ; Polled Command