Returns the error string associated with the specified error number.
GxCntGetErrorString (nError, pszMsg, nErrorMaxLen, pnStatus)
Name |
Type |
Description |
nError |
SHORT |
Error number. |
pszMsg |
PSTR |
Buffer to the returned error string. |
nErrorMaxLen |
SHORT |
The size of the error string buffer. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function returns the error string associated with the nError as returned from other driver functions by the pnStatus parameter.
The following table displays the possible error values; not all errors apply to this board type:
Warnings
12 Measurement value is out of range
11 Unable to find suitable filter value AutoFilter mode
10 Measurement timeout, no signal was detected. Timeout value needs to be greater than Gate Time.
Resource Errors
0 No error has occurred
-1 Unable to open the HW driver. Check if HW is properly installed
-2 Board does not exist in this slot/base address
-3 Different board exist in the specified PCI slot/base address
-4 PCI slot not configured properly. You may configure using the PciExplorer from the Windows Control Panel
-5 Unable to register the PCI device
-6 Unable to allocate system resource for the device
-7 Unable to allocate memory
-8 Unable to create panel
-9 Unable to create Windows timer
-10 Bad or Wrong board EEPROM
-11 Not in calibration mode
-12 Board is not calibrated
-13 Function is not supported by the specified board
General Parameter Errors
-20 Invalid or unknown error number
-21 Invalid parameter
-22 Illegal slot number
-23 Illegal board handle
-24 Illegal string length
-25 Illegal operation mode
VISA Errors
-30 Unable to Load VISA32/64.DLL, make sure VISA library is installed
-31 Unable to open default VISA resource manager, make sure VISA is properly installed
-32 Unable to open the specified VISA resource
-33 VISA viGetAttribute error
-34 VISA viInXX error
-35 VISA ViMapAddress error
Misc Errors
-38 Unable to lock a board resource, resource is used by another process or thread
Parameter Errors
-40 Invalid channel number (0 or 1)
-41 Invalid operation mode
-42 Invalid value, value is out of range
-43 Invalid trigger level voltage, voltage should be between -5.0V and +5.0V
-44 The specified function call is not applicable to Counter Function settings
-45 Timeout occur while waiting for measurement
Board/execution error
-50 Parameter range error
-51 Error send command handshake timeout
-52 Datacom error with board
-53 Recv51 was aborted
-54 Measurement timeout, no signal was detected
-55 Timeout on stats byte
-56 Error Last byte recv.
-57 Cannot reinitialize, stuck in infinite loop
-58 Timeout occur while waiting for measurement
Calibration errors
-70 Calibration did not started
-71 Invalid calibration device number, device number are between 0 to 2
-72 Time base calibration timeout, unable to detect input signal
-73 Error Channel A Trigger Level calibration
-74 Error Channel B Trigger Level calibration
-75 Error Time base calibration frequency
-76 Error Channel B Trigger Level calibration
-75 Error Time Base input Frequency
-76 Error: unable to calibrate Time Base, the Time Base oscillator is out of range
The following example initializes the board. If the initialization failed, the following error string is printed:
CHAR sz[256];
SHORT nStatus, nHandle;
..
GxCntInitialize (3, &Handle, &Status);
if (nStatus<0)
{ GxCntGetErrorString(nStatus, sz, sizeof sz, &nStatus);
printf(sz); // prints the error string returns
}