Returns the error string associated with the specified error number.
GxSWGetErrorString (nError, pszMsg, nErrorMaxLen, pnStatus)
Name |
Type |
Comments |
nError |
SHORT |
Error number as returned by the pnStatus of any GXSW function. See table below for possible error numbers values. The error number should be a negative number, otherwise the function returns the "No error has occurred" string. |
pszMsg |
LPSTR |
Buffer containing the returned error string (null terminated string). |
nErrorMaxLen |
SHORT |
Size of the buffer pszMsg. |
pnStatus |
LPSHORT |
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. This function also returns error values, or 0 on success.
The following table displays the possible error values; not all errors apply to this board type:
Resource Errors
-1 |
Board does not exist in this slot |
-2 |
Unable to open the HW device/Service |
-3 |
Different board exist in the specified PCI slot |
-4 |
PCI slot not configured properly. You may configure it by using the PXI/PCIExplorer from the Control Panel |
-5 |
Unable to register the PCI device |
-6 |
Unable to allocate system resource or memory for the PCI device |
-7 |
Too many boards |
-8 |
Unable to create panel |
-9 |
Unable to create a Windows timer |
Parameter Errors
-20 |
Invalid parameter |
-21 |
Invalid PCI slot number |
-22 |
Invalid board handle |
-23 |
Invalid channel number |
-24 |
Invalid bus number |
-25 |
Invalid mode |
-26 |
Invalid group number |
-27 |
Invalid string length |
-28 |
Invalid row number |
-29 |
Invalid column number |
Board Errors/Warnings
-50 |
BIT error: Adapter not connected |
-51 |
BIT error : Comparator Error |
-52 |
BIT error : Unable to open/close a relay in Group x, Row y Column z |
-53 |
BIT error : Error occurred while switching a relay in Group x (Row y Column z) in Row a, Column b |
-54 |
The board successfully passed the BIT. Only one BIT adapter was found and tested |
Miscellaneous Errors
-99 |
Invalid or unknown error number |
Additional errors may be added as more boards are supported. See the ReadMe.TXT file.
The following example initializes the board at slot 3. If the initialization failed the following error string is printed:
CHAR sz[256];
SHORT nStatus, nHandle;
GX6338Initialize(3, &Handle, &Status);
if (nStatus<0)
{ GxSWGetErrorString(nStatus, sz, sizeof sz, &nStatus);
printf(sz); // print the error string return;
}