UL for Linux
A user library to access supported MCC hardware in Linux
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
Analog Output

Configure the analog output subsystem and acquire data. More...

Functions

UlError ulAOut (DaqDeviceHandle daqDeviceHandle, int channel, Range range, AOutFlag flags, double data)
 Writes the value of a D/A output. More...
 
UlError ulAOutArray (DaqDeviceHandle daqDeviceHandle, int lowChan, int highChan, Range range[], AOutArrayFlag flags, double data[])
 Writes values to a range of D/A channels. More...
 
UlError ulAOutScan (DaqDeviceHandle daqDeviceHandle, int lowChan, int highChan, Range range, int samplesPerChan, double *rate, ScanOption options, AOutScanFlag flags, double data[])
 Writes values to a range of D/A channels. More...
 
UlError ulAOutScanWait (DaqDeviceHandle daqDeviceHandle, WaitType waitType, long long waitParam, double timeout)
 Returns when the scan operation completes on the specified device, or the time specified by the timeout argument elapses. More...
 
UlError ulAOutScanStatus (DaqDeviceHandle daqDeviceHandle, ScanStatus *status, TransferStatus *xferStatus)
 Returns the status, count, and index of a D/A scan operation. More...
 
UlError ulAOutScanStop (DaqDeviceHandle daqDeviceHandle)
 Stops the analog output operation currently running. More...
 
UlError ulAOutSetTrigger (DaqDeviceHandle daqDeviceHandle, TriggerType type, int trigChan, double level, double variance, unsigned int retriggerSampleCount)
 Configures the trigger parameters that will be used when ulAOutScan() is called with the SO_RETRIGGER or SO_EXTTRIGGER ScanOption. More...
 
UlError ulAOGetInfo (DaqDeviceHandle daqDeviceHandle, AoInfoItem infoItem, unsigned int index, long long *infoValue)
 Use with AoInfoItem to retrieve information about the AO subsystem. More...
 
UlError ulAOGetInfoDbl (DaqDeviceHandle daqDeviceHandle, AoInfoItemDbl infoItem, unsigned int index, double *infoValue)
 Use with AoInfoItemDbl to retrieve information about the AO subsystem. More...
 
UlError ulAOSetConfig (DaqDeviceHandle daqDeviceHandle, AoConfigItem configItem, unsigned int index, long long configValue)
 Use with AoConfigItem to set configuration options at runtime. More...
 
UlError ulAOGetConfig (DaqDeviceHandle daqDeviceHandle, AoConfigItem configItem, unsigned int index, long long *configValue)
 Use with AoConfigItem to retrieve configuration options set for a device. More...
 

Detailed Description

Configure the analog output subsystem and acquire data.

Function Documentation

UlError ulAOGetConfig ( DaqDeviceHandle  daqDeviceHandle,
AoConfigItem  configItem,
unsigned int  index,
long long *  configValue 
)

Use with AoConfigItem to retrieve configuration options set for a device.

Parameters
daqDeviceHandlethe handle to the DAQ device
configItemthe configuration item to retrieve
indexeither ignored or an index into the configValue
configValuethe specified configuration value is returned to this variable
Returns
The UL error code.
UlError ulAOGetInfo ( DaqDeviceHandle  daqDeviceHandle,
AoInfoItem  infoItem,
unsigned int  index,
long long *  infoValue 
)

Use with AoInfoItem to retrieve information about the AO subsystem.

Parameters
daqDeviceHandlethe handle to the DAQ device
infoItemthe analog output information to retrieve
indexeither ignored or an index into the infoValue, depending on the value of the infoItem argument
infoValuethe AO information is returned to this variable
Returns
The UL error code.
UlError ulAOGetInfoDbl ( DaqDeviceHandle  daqDeviceHandle,
AoInfoItemDbl  infoItem,
unsigned int  index,
double *  infoValue 
)

Use with AoInfoItemDbl to retrieve information about the AO subsystem.

Parameters
daqDeviceHandlethe handle to the DAQ device
infoItemthe analog output information to retrieve
indexeither ignored or an index into the infoValue
infoValuethe AO information is returned to this variable
Returns
The UL error code.
UlError ulAOSetConfig ( DaqDeviceHandle  daqDeviceHandle,
AoConfigItem  configItem,
unsigned int  index,
long long  configValue 
)

Use with AoConfigItem to set configuration options at runtime.

Parameters
daqDeviceHandlethe handle to the DAQ device
configItemthe configuration item to set
indexeither ignored or an index into the configValue
configValuethe value to set the specified configuration item to
Returns
The UL error code.
UlError ulAOut ( DaqDeviceHandle  daqDeviceHandle,
int  channel,
Range  range,
AOutFlag  flags,
double  data 
)

Writes the value of a D/A output.

Parameters
daqDeviceHandlethe handle to the DAQ device
channelD/A channel number
rangeD/A range
flagsbit mask that specifies whether to scale and/or calibrate the data
datathe value to write
Returns
The UL error code.
UlError ulAOutArray ( DaqDeviceHandle  daqDeviceHandle,
int  lowChan,
int  highChan,
Range  range[],
AOutArrayFlag  flags,
double  data[] 
)

Writes values to a range of D/A channels.

Parameters
daqDeviceHandlethe handle to the DAQ device
lowChanfirst D/A channel
highChanlast D/A channel
rangeD/A ranges
flagsbit mask that specifies whether to scale and/or calibrate the data
data[]a pointer to an array that stores the data
Returns
The UL error code.
UlError ulAOutScan ( DaqDeviceHandle  daqDeviceHandle,
int  lowChan,
int  highChan,
Range  range,
int  samplesPerChan,
double *  rate,
ScanOption  options,
AOutScanFlag  flags,
double  data[] 
)

Writes values to a range of D/A channels.

Parameters
daqDeviceHandlethe handle to the DAQ device
lowChanfirst D/A channel in the scan
highChanlast D/A channel in the scan
rangeD/A range
samplesPerChanthe number of D/A samples to output
ratethe sample rate in scans per second. Upon return, this value is set to the actual sample rate.
optionsbit mask that specifies D/A scan options
flagsbit mask that specifies whether to scale and/or calibrate the data
data[]a pointer to an array that stores the data
Returns
The UL error code.
UlError ulAOutScanStatus ( DaqDeviceHandle  daqDeviceHandle,
ScanStatus status,
TransferStatus xferStatus 
)

Returns the status, count, and index of a D/A scan operation.

Parameters
daqDeviceHandlethe handle to the DAQ device
statusthe status of the background operation
xferStatusa TransferStatus struct containing fields that return the current sample count, scan count, and buffer index for the specified output scan operation
Returns
The UL error code.
UlError ulAOutScanStop ( DaqDeviceHandle  daqDeviceHandle)

Stops the analog output operation currently running.

Parameters
daqDeviceHandlethe handle to the DAQ device
Returns
The UL error code.
UlError ulAOutScanWait ( DaqDeviceHandle  daqDeviceHandle,
WaitType  waitType,
long long  waitParam,
double  timeout 
)

Returns when the scan operation completes on the specified device, or the time specified by the timeout argument elapses.

Parameters
daqDeviceHandlethe handle to the DAQ device
waitTypethe wait type
waitParamReserved for future use
timeoutthe timeout value in seconds (s); set to -1 to wait indefinitely for the scan operation to end.
Returns
The UL error code.
UlError ulAOutSetTrigger ( DaqDeviceHandle  daqDeviceHandle,
TriggerType  type,
int  trigChan,
double  level,
double  variance,
unsigned int  retriggerSampleCount 
)

Configures the trigger parameters that will be used when ulAOutScan() is called with the SO_RETRIGGER or SO_EXTTRIGGER ScanOption.

Parameters
daqDeviceHandlethe handle to the DAQ device
typethe trigger type
trigChanthe trigger channel; ignored if type is set to TRIG_POS_EDGE, TRIG_NEG_EDGE, TRIG_HIGH, TRIG_LOW, GATE_HIGH, GATE_LOW, TRIG_RISING, or TRIG_FALLING.
levelthe level at or around which the trigger event should be detected; ignored if type is set to TRIG_POS_EDGE, TRIG_NEG_EDGE, TRIG_HIGH, TRIG_LOW, GATE_HIGH, GATE_LOW, TRIG_RISING, or TRIG_FALLING.
variancethe degree to which the input signal can vary relative to the level parameter; ignored for all types where level is ignored. For pattern triggering, this argument serves as the mask value.
retriggerSampleCountthe number of samples to generate with each trigger event; ignored unless the SO_RETRIGGER ScanOption is set for the scan.
Returns
The UL error code.