GxSmuGetErrorString

Applies To

GX3104, GX3116e

Purpose

Returns the error string associated with the specified error number.

Syntax

GxSmuGetErrorString (nError, pszMsg, nErrorMaxLen, pnStatus)

Parameters

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.

Comments

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
-100
Invalid channel number
-101
Invalid sense mode
-102
Invalid range mode
-103
Invalid current range value
-104
Invalid voltage range value
-105
Invalid operation mode
-106
Invalid output state
-107
Invalid relay control settings
-110
Error: Timeout when trying to close/open a relay
-111
Error: Timeout when trying to read relay state
-112
Error: Failed last operation of close/open relays
-113
Error: EEPROM did not acknowledge all bytes in transmission
-114
Error: Timeout when trying to reset the ADC
-115
Error: Timeout when trying to set the relays control
-116
Error: Timeout when trying to set the I/O expender
-117
Error: Timeout reading back the ADC
-118
Error: Timeout setting the current and voltage
-119
Error: The total current settings from all channels exceeds the maximum aloud.
-120
Error: unable to set the current range
-121
Error: unable to set the voltage range
-122
Error: trying to set the current to positive polarity
-123
Error: trying to set the current to negative polarity
-124
Error: function not supported in constant voltage mode
-125
Error: function not supported in constant current mode
-126
Error: timeout while trying to take measurement
-128
Error: specified channel do not support 1A current range
-130
Error: EEPROM cannot acknowledge the operation
-131
Error: EEPROM timeout when trying to write to it
-132
Error: EEPROM timeout when trying to read from it
-140
Error: specified output voltage is out of range
-142
Error: specified output voltage limit is out of range
-143
Error: specified output current is out of range
-144
Error: specified output current limit is out of range
-150
Error: invalid measurement signal, signal may be voltage or current
-151
Error: invalid measurement source voltage
-152
Error: invalid measurement source current
-153
Error: invalid measurement aperture type, type can be measurement in reading per second or in Power Line Cycles
-154
Error: invalid Power Line Frequency value
-155
Error: out of range aperture time in reading per seconds
-156
Error: out of range aperture time in power line cycles
-157
Error: invalid measurement resolution
-158
Error: invalid measurement value
-159
Error: invalid measurement current range
-160
Error: invalid measurement since the output is disabled

 

Example

The following example initializes the board. If the initialization failed, the following error string is printed:

 

CHAR   sz[256];

SHORT  nStatus, nHandle;

 

GxSmuInitialize (3, &Handle, &Status);

if (nStatus<0)

{  GxSmuGetErrorString(nStatus, sz, sizeof sz, &nStatus);

   printf(sz); // prints the error string returns

}