Sets the analog output channel voltage.
Gx3788AnalogOutSetVoltage (nHandle, nChannel, dVoltage, pnStatus)
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. |
dVoltage |
DOUBLE |
Voltage to set the analog output 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. |
The function sets the analog output voltage of the specified channel number.
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);
Gx3788AnalogOutReset, Gx3788AnalogOutGetVoltage, Gx3788AnalogOutGetOutputState, GxFpgaGetErrorString