GxAoGetErrorString

Purpose

Returns the error string associated with the specified error number.

Syntax

GxAoGetErrorString (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

-50

Invalid group number, allowed range is 0-3

-51

Invalid channel number, allowed range is 0-15

-52

Invalid range voltage range, allowed range is 0-3

-53

Unable to set I/O port since port direction is set to input

-54

Invalid port bit number, allowed range is 0-3

-55

Voltage is out of the allowed range

-56

Channel is busy, return on timeout

-57

Unable to lock channel or group for voltage settings

-58

Invalid Clock Rate, must be between 0.5 Hz and 10 MHz

-59

ARB memory channels have changed, memory is out of date

-60

Channel is not configured as ARB

-61

ARB memory size exceeded, allowed range is 1-262144

-62

Channels is configured as Static, not ARB

-63

Cannot continue operation because the ARB sequencer is running

-64

Invalid calibration Channel Gain calculated

-65

Invalid calibration ADC Gain calculated

-66

Invalid calibration ADC Offset calculated

-67

Invalid trigger mode, allowed range is 0-11

-68

Invalid clock source, allowed range is 0-11

-69

DIO memory size exceeded, allowed range is 1-8192

-70

Invalid DIO memory type, allowed range is 0-2

-71

Allocated DIO vector size exceeded

-72

Calibration mode is not enabled

-73

Invalid calibration voltage point

-74

Cannot continue operation because the DIO is running

-75

Invalid ARB mode

-76

Streaming is not supported by the firmware

-77

Invalid PXI Trigger Bus Line number, allowed range is 0-7

-78

Function timed out

-79

Board timed out while waiting for digitizer

 

GX1632e Errors

-100

Invalid ARB mode

-101

Cannot execute this function while Arb is running on the specified group

-102

Streaming not supported by firmware

-103

Invalid PXI Trigger Bus Line number, allowed range is 0-7

-104

Timeout occurred while attempting to flush the bucket table pointers

-105

Timeout occurred while reading back a measurement from the ADC

-110

Invalid voltage, allowed voltage depends upon voltage range

-111

Invalid voltage range, allowed range is 0-4

-112

Invalid Measurement Accuracy parameter

-113

Measurement over range

-114

EEPROM Write Timeout

-115

Invalid Arb bucket size, allowed range is 0-7

-116

Invalid waveform type, allowed range is 0-5

-117

Invalid gain, allowed range is 0-25

-118

Invalid offset, allowed range is -25 to 25

-119

Invalid frequency, allowed range is 1000-1000000

-120

Invalid start phase, allowed range is -360.0 to 360.0

-121

The offset and amplitude specified will produce voltages beyond -25 to 25V

-122

Invalid duty cycle, allowed range is 0.0 to 100.0

-123

More memory needs to be allocated before this operation can be performed

-124

Timeout while waiting for the DRAM to empty

-125

Exiting ISR early due to waveform stopping

-126

Invalid clock output choice for master domain

-127

Invalid clock role, allowed range is 0 (leader) or 1 (follower)

-128

Invalid clock leader source, allowed values are PXI0-7, and Star trigger

 

Example

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

 

CHAR sz[256];

SHORT nStatus, nHandle;

 

GxAoInitialize (3, &Handle, &Status);

if (nStatus<0)

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

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

}