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 |
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.
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 |
Board Specific Parameter Errors
-39 |
Invalid configuration |
-40 |
Invalid channel number |
-41 |
Illegal bus number |
-42 |
Illegal group number |
-43 |
Illegal row number |
-44 |
Illegal column number |
-45 |
Invalid Relay number |
-46 |
Invalid Daisy Chain Mode |
-47 |
Invalid relay type |
-48 |
Invalid Group Mode |
-49 |
Invalid Section number |
Board Errors/Warnings
-60 |
Error: connection will create a closed loop |
-61 |
Error: specified relay number is out of range |
-62 |
Error: specified number of relays is out of range |
-63 |
Error: specified relays cycles limit is out of range |
-64 |
Error: specified relay cycles array size is out of range |
-65 |
Error: EPROM communication generated timeout |
-66 |
Error: Trying to close more relays then allowed by this board type at any given time. |
Miscellaneous Errors
-99 |
Invalid or unknown error number |
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;
GGX6338Initialize(3, &Handle, &Status);
if (nStatus<0)
{ GxSWGetErrorString(nStatus, sz, sizeof sz, &nStatus);
printf(sz); // print the error string return;
}