|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acces.aiousb.AnalogOutputSubsystem
public class AnalogOutputSubsystem
Class AnalogOutputSubsystem represents the analog output subsystem of a device. One accesses
this analog output subsystem through its parent object, typically through a method such as
dac() (see USB_AO16_Family.dac()
).
Field Summary | |
---|---|
static int |
DAC_RANGE_0_10V
Unipolar, 0-10 volt range. |
static int |
DAC_RANGE_0_5V
Unipolar, 0-5 volt range (see setRange() ). |
static int |
DAC_RANGE_10V
Bipolar, -10 to +10 volt range. |
static int |
DAC_RANGE_5V
Bipolar, -5 to +5 volt range. |
static int |
MAX_COUNTS
Maximum number of counts D/A can output. |
Constructor Summary | |
---|---|
AnalogOutputSubsystem(USBDevice parent)
Constructor for analog output subsystem. |
Method Summary | |
---|---|
double |
countsToVolts(char counts)
Converts a single D/A count value to volts, based on the current range setting. |
double[] |
countsToVolts(char[] counts)
Converts an array of D/A count values to an array of voltage values, based on the current range setting. |
int |
getNumChannels()
Gets the number of analog output channels. |
int |
getRange()
Gets the current voltage range of the D/A outputs. |
java.io.PrintStream |
print(java.io.PrintStream stream)
Prints the properties of this subsystem. |
AnalogOutputSubsystem |
setRange(int range)
Sets the voltage range of the D/A outputs. |
char |
voltsToCounts(double volts)
Converts a single voltage value to D/A counts, based on the current range setting. |
char[] |
voltsToCounts(double[] volts)
Converts an array of voltage values to an array of D/A count values, based on the current range setting. |
AnalogOutputSubsystem |
write(char[] points)
Writes a block of count values to one or more D/A channels. |
AnalogOutputSubsystem |
write(int channel,
char counts)
Writes a count value to a D/A channel. |
AnalogOutputSubsystem |
writeVolts(int channel,
double volts)
Writes a voltage value to a D/A channel. |
AnalogOutputSubsystem |
writeVolts(OutputVoltagePoint[] points)
Writes a block of voltage values to one or more D/A channels. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DAC_RANGE_0_5V
setRange()
).
public static final int DAC_RANGE_5V
public static final int DAC_RANGE_0_10V
public static final int DAC_RANGE_10V
public static final int MAX_COUNTS
Constructor Detail |
---|
public AnalogOutputSubsystem(USBDevice parent)
parent
- the parent USB device object that this subsystem is a part of.Method Detail |
---|
public java.io.PrintStream print(java.io.PrintStream stream)
stream
- the print stream where properties will be printed.
public int getNumChannels()
public int getRange()
setRange()
public AnalogOutputSubsystem setRange(int range)
range
- the voltage range to select. May be one of:DAC_RANGE_0_5V
DAC_RANGE_5V
DAC_RANGE_0_10V
DAC_RANGE_10V
java.lang.IllegalArgumentException
OperationFailedException
public AnalogOutputSubsystem write(int channel, char counts)
channel
- the channel to write to.counts
- the D/A count value to output. The number of bits of resolution for the D/A outputs varies from
model to model, however it's usually 12 or 16 bits. Moreover, some of the 12-bit models actually accept a
16-bit value and simply truncate the least significant 4 bits. Consult the manual for the specific device to
determine the range of D/A values the device will accept. In general, 12-bit devices accept a count range of
0-0xfff, and 16-bit devices accept a count range of 0-0xffff.
java.lang.IllegalArgumentException
OperationFailedException
public AnalogOutputSubsystem write(char[] points)
points
- an array of 16-bit integers representing channel-count pairs. The first integer of each pair
is the D/A channel number and the second integer is the D/A count value to output to the specified channel.
Refer to write()
for an explanation of the channel addressing
and count values.
java.lang.IllegalArgumentException
OperationFailedException
public AnalogOutputSubsystem writeVolts(int channel, double volts)
channel
- the channel to write to.volts
- the voltage value to output.
public AnalogOutputSubsystem writeVolts(OutputVoltagePoint[] points)
points
- an array of OutputVoltagePoint
points representing channel-voltage pairs.
java.lang.IllegalArgumentException
public double countsToVolts(char counts)
counts
- the count value to convert to volts.
setRange()
).public double[] countsToVolts(char[] counts)
counts
- the array of count values to convert to volts.
setRange()
).
java.lang.IllegalArgumentException
public char voltsToCounts(double volts)
volts
- the voltage value to convert to counts.
setRange()
).public char[] voltsToCounts(double[] volts)
volts
- the array of voltage values to convert to counts.
setRange()
).
java.lang.IllegalArgumentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |