getNumAdcs
unsigned int getNumAdcs ()
-
Get the number of channels of ADCs.
-
Returns
-
Number of the ADC channels.
initSensor
void initSensor (unsigned int channel, float adcMin, float
sensorMin, float adcMax, float sensorMax)
-
Initializes a sensor attached to a given ADC channel. The initialization
includes setting both the maximum and minimum points which, with the basic
ADC configuration, are used to establish the relationship between the physical
units and the HEX value produced by the ADC (see getSensor).
-
Parameters
-
channel: channel number of the ADC to set.
-
adcMin: minimum voltage for the ADC output.
-
sensorMin: minimum physical value which corresponds to the
minimum ADC voltage.
-
adcMax: maximum voltage for the ADC output.
-
sensorMax: maximum physical value which corresponds to the
maximum ADC voltage.
initAdc<
HEIGHT=12 WIDTH=12>initAdc
void initAdc (unsigned int channel, int isBipolar,
int isTwosComplement, unsigned int numBits,
float referenceVal)
-
Initializes an ADC channel with the device attributes.
-
Parameters
-
channel: channel number of the ADC to set.
-
isBipolar: set to 1 if ADC is bipolar or 0 if unipolar.
-
isTwosComplement: set to 1 if two's complement is used or 0
if offset representation is used for ADC numbers.
-
numBits: resolution of ADC (number of bits).
-
referenceVal: reference voltage of the ADC. Note, different
devices have different rules for relating their reference to their
range. This API uses the convention that the maximum voltage is one
bit less than the reference voltage.
isAdcBipolar
unsigned int isAdcBipolar (unsigned int channel);
isAdcTwosComplement
unsigned int isAdcTwosComplement (unsigned int channel);
getSensor
float getSensor">getSensor
float getSensor (unsigned int channel);
-
Gets the value of the sensor connected to an ADC channel in physical units.
If the value exceeds the limits established, the limit is used instead.
-
Parameters
-
channel: channel number of the associated ADC
-
setSensorMaximum
void setSensorMaximum (unsigned int channel, float adcValue,
float sensorValue);
-
Sets the maximum physical level and the associated ADC voltage output for
a given channel.
-
Parameters
-
channel: channel number of the ADC to set
-
adcValue: maximum voltage for the ADC to output (see getSensor)
-
sensorValue: maximum physical value which corresponds to
the maximum ADC voltage.
setSensorMinimum
void setSensorMinimum (unsigned int channel, float adcValue,
float SensorValue);
-
Sets the minimum physical level and the associated ADC voltage output for
a given channel.
-
Parameters
-
channel: channel number of the ADC to set
-
adcValue: minimum voltage for the DAC to command (see getSensor)
-
actuatorValue: minimum physical value which corresponds to
the minimum DAC voltage.
getAdc
float getAdc (unsigned int channel);
-
Gets the ADC voltage value for a given channel.
-
Parameters
-
channel: channel number of the ADC to get
-
Returns
-
voltage value as a floating point number.
setAdcBipolar
vetAdcBipolar
void setAdcBipolar (unsigned int channel, int isBipolar);
getAdcHex
void getAdcHex (unsigned int channel);
getAdcNumBits
void getAdcNumBits (unsigned int channel);
setAdcNumBits
void setAdcNumBits (unsigned int channel, unsigned int numBits);
setAdcReference
void setDacReference (unsigned int noChannels, float value);
setAdcTwosComplement
void setAdcTwosComplement (unsigned int channel,
int isTwosComplement);
setNumAdcs
void setNumAdcs (unsigned int noChannels);
updateAll "updateAll">updateAll
void updateAll();
updateAdc
void updateAdc (unsigned int channel);
updateTotal
unsigned int updateTotal (unsigned int channel);
Last modified: Mon Feb 1odified: Mon Feb 15 00:02:37 Eastern Standard
Time 1999