122
Syntax
HRESULT AD_DigitalToVoltage(
[in] long Port,
[in] long Digital,
[out, retval] double* Volts
);
Parameters
Port
[in] Port number for the A/D converter. Valid values are 1, 2, 3, and 4.
Digital
[in] A value between 0 and 1023 (default) to convert to a voltage value.
Volts
[out, retval] A real number (default: 0 to 10.0) representing a voltage level.
Remarks
The value returned by this function depends on the values of the maximum voltage and maximum digital value.
Use
AD_MaxVoltage
and
AD_MaxDigital
to get the true ranges for the digital and voltage values.
AD_MaxVoltage ( Port )
AD_MaxVoltage ( Port )
AD_MaxVoltage ( Port )
AD_MaxVoltage ( Port )
Gets the voltage corresponding to the maximum A/D digital value.
Syntax
HRESULT AD_MaxVoltage(
[in] long Port,
[out, retval] double* MaxVolts
);
Parameters
Port
[in] Port number for the A/D converter. Valid values are 1, 2, 3, and 4.
MaxVolts
[out, retval] The voltage that must be applied to the specified port to cause AD_ReadDigital
to return the maximum digital value.
Remarks
When the voltage is applied to the port that meets or exceeds the maximum voltage value returned by this call,
then a read of the digital value of the port will yield the maximum digital value. Use
AD_MaxDigital
to get
the A/D maximum digital value. The default maximum voltage value is 10.0.
AD_MinVoltage ( Port )
AD_MinVoltage ( Port )
AD_MinVoltage ( Port )
AD_MinVoltage ( Port )
Gets the voltage corresponding to the maximum A/D digital value.
Syntax
HRESULT AD_MaxVoltage(
[in] long Port,
[out, retval] double* MaxVolts
);
Parameters
Port
[in] Port number for the A/D converter. Valid values are 1, 2, 3, and 4.
MaxVolts
[out, retval] The voltage that must be applied to the specified port to cause AD_ReadDigital
to return the maximum digital value.