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
Synchronous device I/O

Configure the DAQ I/O subsystem to acquire or generate data. More...

Functions

UlError ulDaqInScan (DaqDeviceHandle daqDeviceHandle, DaqInChanDescriptor chanDescriptors[], int numChans, int samplesPerChan, double *rate, ScanOption options, DaqInScanFlag flags, double data[])
 Allows scanning of multiple input subsystems, such as analog, digital, counter, and stores the samples in an array. More...
 
UlError ulDaqInScanStatus (DaqDeviceHandle daqDeviceHandle, ScanStatus *status, TransferStatus *xferStatus)
 Returns the status of a synchronous input operation. More...
 
UlError ulDaqInScanStop (DaqDeviceHandle daqDeviceHandle)
 Stops the synchronous input operation currently running. More...
 
UlError ulDaqInScanWait (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 ulDaqInSetTrigger (DaqDeviceHandle daqDeviceHandle, TriggerType type, DaqInChanDescriptor trigChanDescriptor, double level, double variance, unsigned int retriggerSampleCount)
 Configures the trigger parameters that will be used when ulDaqInScan() is called with the SO_RETRIGGER or SO_EXTTRIGGER ScanOption. More...
 
UlError ulDaqOutScan (DaqDeviceHandle daqDeviceHandle, DaqOutChanDescriptor chanDescriptors[], int numChans, int samplesPerChan, double *rate, ScanOption options, DaqOutScanFlag flags, double data[])
 Outputs values synchronously to analog output channels and digital output ports. More...
 
UlError ulDaqOutScanStatus (DaqDeviceHandle daqDeviceHandle, ScanStatus *status, TransferStatus *xferStatus)
 Returns the status of a synchronous output operation. More...
 
UlError ulDaqOutScanStop (DaqDeviceHandle daqDeviceHandle)
 Stops the synchronous output operation currently running. More...
 
UlError ulDaqOutScanWait (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 ulDaqOutSetTrigger (DaqDeviceHandle daqDeviceHandle, TriggerType type, DaqInChanDescriptor trigChanDescriptor, double level, double variance, unsigned int retriggerSampleCount)
 Configures the trigger parameters that will be used when ulDaqOutScan() is called with the SO_RETRIGGER or SO_EXTTRIGGER ScanOptions. More...
 
UlError ulDaqIGetInfo (DaqDeviceHandle daqDeviceHandle, DaqIInfoItem infoItem, unsigned int index, long long *infoValue)
 Use with DaqIInfoItem to retrieve information about the synchronous input subsystem. More...
 
UlError ulDaqIGetInfoDbl (DaqDeviceHandle daqDeviceHandle, DaqIInfoItemDbl infoItem, unsigned int index, double *infoValue)
 Use with DaqIInfoItemDbl to retrieve information about the synchronous input subsystem. More...
 
UlError ulDaqOGetInfo (DaqDeviceHandle daqDeviceHandle, DaqOInfoItem infoItem, unsigned int index, long long *infoValue)
 Use with DaqOInfoItem to retrieve information about the synchronous output subsystem. More...
 
UlError ulDaqOGetInfoDbl (DaqDeviceHandle daqDeviceHandle, DaqOInfoItemDbl infoItem, unsigned int index, double *infoValue)
 Use with DaqOInfoItemDbl to retrieve information about the synchronous output subsystem. More...
 

Detailed Description

Configure the DAQ I/O subsystem to acquire or generate data.

Function Documentation

UlError ulDaqIGetInfo ( DaqDeviceHandle  daqDeviceHandle,
DaqIInfoItem  infoItem,
unsigned int  index,
long long *  infoValue 
)

Use with DaqIInfoItem to retrieve information about the synchronous input subsystem.

Parameters
daqDeviceHandlethe handle to the DAQ device
infoItemthe synchronous input information to retrieve
indexignored for all info types available to this function
infoValuethe synchronous input information is returned to this variable
Returns
The UL error code.
UlError ulDaqIGetInfoDbl ( DaqDeviceHandle  daqDeviceHandle,
DaqIInfoItemDbl  infoItem,
unsigned int  index,
double *  infoValue 
)

Use with DaqIInfoItemDbl to retrieve information about the synchronous input subsystem.

Parameters
daqDeviceHandlethe handle to the DAQ device
infoItemthe synchronous input information to retrieve
indexignored for all info types available to this function
infoValuethe synchronous input information is returned to this variable
Returns
The UL error code.
UlError ulDaqInScan ( DaqDeviceHandle  daqDeviceHandle,
DaqInChanDescriptor  chanDescriptors[],
int  numChans,
int  samplesPerChan,
double *  rate,
ScanOption  options,
DaqInScanFlag  flags,
double  data[] 
)

Allows scanning of multiple input subsystems, such as analog, digital, counter, and stores the samples in an array.

This method only works with devices that support synchronous input.

Parameters
daqDeviceHandlethe handle to the DAQ device
chanDescriptors[]an array of DaqInChanDescriptor structs with fields for channel number, type, and range that specifies the order and parameters for each channel in the scan
numChansthe number of channels in the scan
samplesPerChanthe number of samples to collect from each channel in the scan
ratesample rate in samples per channel. Upon return, this value is set to the actual sample rate.
optionsscan options
flagsbit mask that specifies whether to scale data, calibrate data, or clear the counter at the start of each scan.
data[]pointer to the buffer that receives the data
Returns
The UL error code.
UlError ulDaqInScanStatus ( DaqDeviceHandle  daqDeviceHandle,
ScanStatus status,
TransferStatus xferStatus 
)

Returns the status of a synchronous input operation.

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

Stops the synchronous input operation currently running.

Parameters
daqDeviceHandlethe handle to the DAQ device
Returns
The UL error code.
UlError ulDaqInScanWait ( 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 ulDaqInSetTrigger ( DaqDeviceHandle  daqDeviceHandle,
TriggerType  type,
DaqInChanDescriptor  trigChanDescriptor,
double  level,
double  variance,
unsigned int  retriggerSampleCount 
)

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

Parameters
daqDeviceHandlethe handle to the DAQ device
typethe trigger type
trigChanDescriptorthe DaqInChanDescriptor struct with fields for channel number, type, and range that defines the trigger input
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 acquire with each trigger event; ignored unless the SO_RETRIGGER ScanOption is set for the scan.
Returns
The UL error code.
UlError ulDaqOGetInfo ( DaqDeviceHandle  daqDeviceHandle,
DaqOInfoItem  infoItem,
unsigned int  index,
long long *  infoValue 
)

Use with DaqOInfoItem to retrieve information about the synchronous output subsystem.

Parameters
daqDeviceHandlethe handle to the DAQ device
infoItemthe synchronous output information to retrieve
indexignored for all info types available to this function
infoValuethe synchronous output information is returned to this variable
Returns
The UL error code.
UlError ulDaqOGetInfoDbl ( DaqDeviceHandle  daqDeviceHandle,
DaqOInfoItemDbl  infoItem,
unsigned int  index,
double *  infoValue 
)

Use with DaqOInfoItemDbl to retrieve information about the synchronous output subsystem.

Parameters
daqDeviceHandlethe handle to the DAQ device
infoItemthe synchronous output information to retrieve
indexignored for all info types available to this function
infoValuethe synchronous output information is returned to this variable
Returns
The UL error code.
UlError ulDaqOutScan ( DaqDeviceHandle  daqDeviceHandle,
DaqOutChanDescriptor  chanDescriptors[],
int  numChans,
int  samplesPerChan,
double *  rate,
ScanOption  options,
DaqOutScanFlag  flags,
double  data[] 
)

Outputs values synchronously to analog output channels and digital output ports.

This function only works with devices that support synchronous output.

Parameters
daqDeviceHandlethe handle to the DAQ device
chanDescriptors[]an array of DaqOutChanDescriptor structs containing fields for channel number, type, and range that specify the order and parameters for each channel in the scan
numChansthe number of channels in the scan
samplesPerChanthe number of samples per channel
ratethe sample rate in scans per second. Upon return, this value is set to the actual rate.
optionsscan options
flagsbit mask that specifies whether to scale and/or calibrate data for any analog channels in the scan
data[]buffer that holds the data that will be transferred to the device
Returns
The UL error code.
UlError ulDaqOutScanStatus ( DaqDeviceHandle  daqDeviceHandle,
ScanStatus status,
TransferStatus xferStatus 
)

Returns the status of a synchronous output operation.

Parameters
daqDeviceHandlethe handle to the DAQ device
statusthe status of the background operation
xferStatusTransferStatus 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 ulDaqOutScanStop ( DaqDeviceHandle  daqDeviceHandle)

Stops the synchronous output operation currently running.

Parameters
daqDeviceHandlethe handle to the DAQ device
Returns
The UL error code.
UlError ulDaqOutScanWait ( 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 type of wait
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 ulDaqOutSetTrigger ( DaqDeviceHandle  daqDeviceHandle,
TriggerType  type,
DaqInChanDescriptor  trigChanDescriptor,
double  level,
double  variance,
unsigned int  retriggerSampleCount 
)

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

Parameters
daqDeviceHandlethe handle to the DAQ device
typethe trigger type
trigChanDescriptora DaqInChanDescriptor struct containing fields for channel number, type, and range that defines the trigger input
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 acquire with each trigger event; ignored unless the SO_RETRIGGER ScanOption is set for the scan.
Returns
The UL error code.