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 |
Can't open HW |
-2 |
Board not exist |
-3 |
Wrong board |
-4 |
Slot not configuration |
-5 |
Unable register device |
-6 |
Unable allocate device resource |
-7 |
Unable allocate memory |
-8 |
Unable create panel |
-9 |
Unable to get timer |
-10 |
Board invalid Eeprom |
-11 |
Not in calibration mode |
-12 |
Not calibrated |
-13 |
Err function not supported |
-14 |
Not MTS board |
-15 |
Unable to open file |
-16 |
Error file not exist |
-17 |
Error mode not supported by slot |
-18 |
Not PXI board |
-19 |
Not PCI board |
Parameter Errors
-20 |
Invalid error |
-21 |
Invalid parameter |
-22 |
Invalid slot |
-23 |
Invalid handle |
-24 |
Invalid string length |
-25 |
Invalid mode |
-26 |
Parameter out of range |
-27 |
File extension not supported |
-28 |
Invalid chassis number |
-29 |
Invalid calibration time stamp |
VISA Error
-30 |
Load DLL error |
-31 |
Open default resource manager error |
-32 |
Open error |
-33 |
Get attribute error |
-34 |
VI-In error |
-35 |
Memory map error |
Misc Error
-37 |
Sync create |
-38 |
Sync timeout |
-39 |
Lvrt unsupported |
-40 |
License error |
-41 |
Event enable failed |
-42 |
Event disable failed |
-43 |
Event wait timeout |
-44 |
Event wait error |
-45 |
DMA mem alloc failed |
-46 |
Error DMA mem un map |
-47 |
Error DMA mem free |
-48 |
Error checksum |
Built In Test Error
-50 |
BIT Adapter not connected |
-51 |
BIT Comparator |
-52 |
BIT close open |
-53 |
BIT close column |
-54 |
BIT switch other |
-55 |
BIT partial |
Board Errors/Warnings
-60 |
Error closed loop |
-61 |
Invalid relay number |
-62 |
Invalid number of relays |
-63 |
Invalid relays cycles limit |
-64 |
Invalid relay cycles array size |
-65 |
Error over limit relay replacement |
-66 |
Eeprom busy timeout |
-67 |
Error closed relays over limit |
-68 |
Error set relays timeout |
Board specific parameter error
-80 |
Invalid configuration |
-81 |
Invalid channel |
-82 |
Invalid bus |
-83 |
Invalid group |
-84 |
Invalid row |
-85 |
Invalid column |
-86 |
Invalid relay |
-87 |
Invalid daisy chain mode |
-88 |
Invalid relay type |
-89 |
Invalid group mode |
-90 |
Invalid section |
-91 |
Invalid path |
-92 |
Invalid signal type |
-93 |
Invalid input |
-94 |
Simulation INI file read error |
-95 |
Invalid block |
-96 |
Error bit still running |
-97 |
Eeprom checksum invalid |
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;
GX6256Initialize(3, FALSE, &Handle, &Status);
if (nStatus<0)
{ GxSWGetErrorString(nStatus, sz, sizeof sz, &nStatus);
printf(sz); // print the error string return;
}