Returns the error string associated with the specified error number.
GxPdoGetErrorString (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.
The following table displays the possible error values; not all errors apply to this board type;
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
Parameter Errors
-40 Invalid channel number, channels numbers are 0-7
-41 Invalid channel rail, channel's rail may be Rail A-C or Open
-42 Invalid DAC number, DAC numbers are 0-2
-43 Invalid DAC voltage value
-44 Invalid rail number, Rail numbers are 1-3
-45 Invalid Rail source, Rail source is not supported by the specified Rail.
-46 Invalid gain value
-47 Invalid offset value
Board/execution error
-60 Unable to set DAC value
Calibration by user error
-80 Incorrect calibration sequence, see the on-line help for details on how to calibrate the board
-81 Invalid calibration data source, specified calibration data source not supported.
-82 Invalid load value, load can be between 64 Ohm to 50 KOhm
-83 Unable to change calibration data source while in calibration process
The following example initializes the board. If the initialization failed, the following error string is printed:
CHAR sz[256];
SHORT nStatus, nHandle;
..
Gx1838Initialize (3, &Handle, &Status);
if (nStatus<0)
{ GxPdoGetErrorString(nStatus, sz, sizeof sz, &nStatus);
printf(sz); // prints the error string returns
}