Gx3788AnalogOutGetVoltage

Purpose

Returns the analog output channel voltage.

Syntax

Gx3788AnalogOutGetVoltage (nHandle, nChannel, pdVoltage, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3788 board.
nChannel
SHORT
Selects analog output channel to set, analog Out channels:
0.      GX3788_ANALOG_OUT_0.
1.      GX3788_ANALOG_OUT_1.
2.      GX3788_ANALOG_OUT_2.
3.      GX3788_ANALOG_OUT_3.
4.      GX3788_ANALOG_OUT_4.
5.      GX3788_ANALOG_OUT_5.
6.      GX3788_ANALOG_OUT_6.
7.    GX3788_ANALOG_OUT_7.
pdVoltage
PDOUBLE
Returned voltage setting of the selected channel.
Output channel voltage can be set from -10.0V to +10.0V with  ± 6.0 mV of accuracy.  Max current per analog out channel is 3 mA.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function returns the analog output channel voltage.

Example

The following example sets the analog output channel 4 to 6.5 volts, and returns the channel’s voltage settings:

 

SHORT nStatus;

DOUBLE dVoltage;

 

Gx3788AnalogOutSetVoltage (nHandle, GX3788_ANALOG_OUT_4, 6.5, &nStatus);

Gx3788AnalogOutGetVoltage (nHandle, GX3788_ANALOG_OUT_4, &dVoltage, &nStatus);

 

See Also

 

Gx3788AnalogOutReset, Gx3788AnalogOutSetVoltage, Gx3788AnalogOutSetOutputState, GxFpgaGetErrorString