UL for Linux
User library to access and control supported MCC hardware over the Linux platform
|
Configure the counter input subsystem and acquire data. More...
Functions | |
UlError | ulCIn (DaqDeviceHandle daqDeviceHandle, int counterNum, unsigned long long *data) |
Reads the value of a count register. More... | |
UlError | ulCRead (DaqDeviceHandle daqDeviceHandle, int counterNum, CounterRegisterType regType, unsigned long long *data) |
Reads the value of the specified counter register. More... | |
UlError | ulCLoad (DaqDeviceHandle daqDeviceHandle, int counterNum, CounterRegisterType registerType, unsigned long long loadValue) |
Loads a value into the specified counter register. More... | |
UlError | ulCClear (DaqDeviceHandle daqDeviceHandle, int counterNum) |
Sets the count of the specified counter to 0. More... | |
UlError | ulCConfigScan (DaqDeviceHandle daqDeviceHandle, int counterNum, CounterMeasurementType type, CounterMeasurementMode mode, CounterEdgeDetection edgeDetection, CounterTickSize tickSize, CounterDebounceMode debounceMode, CounterDebounceTime debounceTime, CConfigScanFlag flags) |
Configures a counter channel, for counters with programmable types. More... | |
UlError | ulCInScan (DaqDeviceHandle daqDeviceHandle, int lowCounterNum, int highCounterNum, int samplesPerCounter, double *rate, ScanOption options, CInScanFlag flags, unsigned long long data[]) |
Reads a range of counter channels. More... | |
UlError | ulCInSetTrigger (DaqDeviceHandle daqDeviceHandle, TriggerType type, int trigChan, double level, double variance, unsigned int retriggerSampleCount) |
Configures the trigger parameters that will be used when ulCInScan() is called with the SO_RETRIGGER or SO_EXTTRIGGER ScanOption. More... | |
UlError | ulCInScanStatus (DaqDeviceHandle daqDeviceHandle, ScanStatus *status, TransferStatus *xferStatus) |
Returns the status of a counter input operation. More... | |
UlError | ulCInScanStop (DaqDeviceHandle daqDeviceHandle) |
Stops the counter input operation currently running. More... | |
UlError | ulCInScanWait (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 | ulCtrGetInfo (DaqDeviceHandle daqDeviceHandle, CtrInfoItem infoItem, unsigned int index, long long *infoValue) |
Use with CtrInfoItem to retrieve information about the counter subsystem. More... | |
UlError | ulCtrGetInfoDbl (DaqDeviceHandle daqDeviceHandle, CtrInfoItemDbl infoItem, unsigned int index, double *infoValue) |
Use with CtrInfoItemDbl to retrieve information about the counter subsystem. More... | |
UlError | ulCtrGetConfig (DaqDeviceHandle daqDeviceHandle, CtrConfigItem configItem, unsigned int index, long long *configValue) |
Use with CtrConfigItem to retrieve configuration options set for a device. More... | |
UlError | ulCtrSetConfig (DaqDeviceHandle daqDeviceHandle, CtrConfigItem configItem, unsigned int index, long long configValue) |
Use with CtrConfigItem to set configuration options at runtime. More... | |
Configure the counter input subsystem and acquire data.
UlError ulCClear | ( | DaqDeviceHandle | daqDeviceHandle, |
int | counterNum | ||
) |
Sets the count of the specified counter to 0.
daqDeviceHandle | the handle to the DAQ device |
counterNum | the counter number |
UlError ulCConfigScan | ( | DaqDeviceHandle | daqDeviceHandle, |
int | counterNum, | ||
CounterMeasurementType | type, | ||
CounterMeasurementMode | mode, | ||
CounterEdgeDetection | edgeDetection, | ||
CounterTickSize | tickSize, | ||
CounterDebounceMode | debounceMode, | ||
CounterDebounceTime | debounceTime, | ||
CConfigScanFlag | flags | ||
) |
Configures a counter channel, for counters with programmable types.
daqDeviceHandle | the handle to the DAQ device |
counterNum | the counter number |
type | the type of counter measurement |
mode | the counter mode |
edgeDetection | sets the active edge of the counter input signal to positive or negative |
tickSize | bit mask that specifies the counter resolution for measurement modes such as period, pulse width, and timing |
debounceMode | bit mask that specifies the counter debounce mode |
debounceTime | bit mask that specifies the counter debounce time |
flags | bit mask that specifies counting properties such as resolution and clear on scan start |
UlError ulCIn | ( | DaqDeviceHandle | daqDeviceHandle, |
int | counterNum, | ||
unsigned long long * | data | ||
) |
Reads the value of a count register.
Use ulCRead() to read any available register type (count, load, max limit, or min limit).
daqDeviceHandle | the handle to the DAQ device |
counterNum | the counter number |
data | the data value |
UlError ulCInScan | ( | DaqDeviceHandle | daqDeviceHandle, |
int | lowCounterNum, | ||
int | highCounterNum, | ||
int | samplesPerCounter, | ||
double * | rate, | ||
ScanOption | options, | ||
CInScanFlag | flags, | ||
unsigned long long | data[] | ||
) |
Reads a range of counter channels.
daqDeviceHandle | the handle to the DAQ device |
lowCounterNum | the first channel of the scan |
highCounterNum | the last channel of the scan |
samplesPerCounter | the number of samples per counter to read |
rate | the rate in samples per second per counter. Upon return, this value is set to the actual sample rate. |
options | scan options |
flags | bit mask that specifies the counter scan option |
data[] | pointer to the buffer to receive the data |
UlError ulCInScanStatus | ( | DaqDeviceHandle | daqDeviceHandle, |
ScanStatus * | status, | ||
TransferStatus * | xferStatus | ||
) |
Returns the status of a counter input operation.
daqDeviceHandle | the handle to the DAQ device |
status | the status of the background operation |
xferStatus | a TransferStatus struct containing fields that return the current sample count, scan count, and buffer index for the specified input scan operation |
UlError ulCInScanStop | ( | DaqDeviceHandle | daqDeviceHandle | ) |
Stops the counter input operation currently running.
daqDeviceHandle | the handle to the DAQ device |
UlError ulCInScanWait | ( | 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.
daqDeviceHandle | the handle to the DAQ device |
waitType | the wait type |
waitParam | Reserved for future use |
timeout | the timeout value in seconds (s); set to -1 to wait indefinitely for the scan operation to end. |
UlError ulCInSetTrigger | ( | DaqDeviceHandle | daqDeviceHandle, |
TriggerType | type, | ||
int | trigChan, | ||
double | level, | ||
double | variance, | ||
unsigned int | retriggerSampleCount | ||
) |
Configures the trigger parameters that will be used when ulCInScan() is called with the SO_RETRIGGER or SO_EXTTRIGGER ScanOption.
daqDeviceHandle | the handle to the DAQ device |
type | the trigger type |
trigChan | the 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 |
level | the 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 |
variance | the 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. |
retriggerSampleCount | the number of samples to acquire with each trigger event; ignored unless the SO_RETRIGGER ScanOption is set for the scan. |
UlError ulCLoad | ( | DaqDeviceHandle | daqDeviceHandle, |
int | counterNum, | ||
CounterRegisterType | registerType, | ||
unsigned long long | loadValue | ||
) |
Loads a value into the specified counter register.
daqDeviceHandle | the handle to the DAQ device |
counterNum | the counter number |
registerType | the register type |
loadValue | the load value |
UlError ulCRead | ( | DaqDeviceHandle | daqDeviceHandle, |
int | counterNum, | ||
CounterRegisterType | regType, | ||
unsigned long long * | data | ||
) |
Reads the value of the specified counter register.
daqDeviceHandle | the handle to the DAQ device |
counterNum | the counter number |
regType | the register type |
data | the data value |
UlError ulCtrGetConfig | ( | DaqDeviceHandle | daqDeviceHandle, |
CtrConfigItem | configItem, | ||
unsigned int | index, | ||
long long * | configValue | ||
) |
Use with CtrConfigItem to retrieve configuration options set for a device.
daqDeviceHandle | the handle to the DAQ device |
configItem | the configuration item to retrieve |
index | either ignored or an index into the configValue |
configValue | the specified configuration value is returned to this variable |
UlError ulCtrGetInfo | ( | DaqDeviceHandle | daqDeviceHandle, |
CtrInfoItem | infoItem, | ||
unsigned int | index, | ||
long long * | infoValue | ||
) |
Use with CtrInfoItem to retrieve information about the counter subsystem.
daqDeviceHandle | the handle to the DAQ device |
infoItem | the counter information to retrieve |
index | either ignored or an index into the infoValue , depending on the value of the infoItem argument |
infoValue | the counter information is returned to this variable |
UlError ulCtrGetInfoDbl | ( | DaqDeviceHandle | daqDeviceHandle, |
CtrInfoItemDbl | infoItem, | ||
unsigned int | index, | ||
double * | infoValue | ||
) |
Use with CtrInfoItemDbl to retrieve information about the counter subsystem.
daqDeviceHandle | the handle to the DAQ device |
infoItem | the counter information to retrieve |
index | either ignored or an index into the infoValue , depending on the value of the infoItem argument |
infoValue | the counter information is returned to this variable |
UlError ulCtrSetConfig | ( | DaqDeviceHandle | daqDeviceHandle, |
CtrConfigItem | configItem, | ||
unsigned int | index, | ||
long long | configValue | ||
) |
Use with CtrConfigItem to set configuration options at runtime.
daqDeviceHandle | the handle to the DAQ device |
configItem | the configuration item to set |
index | either ignored or an index into the configValue |
configValue | the value to set the specified configuration item to |