Python API Reference¶
The Python API for Linux allows users to communicate and control Measurement Computing hardware using the Python language.
The API provides structures and enumerations to manage connected devices, obtain information about device capabilities, and configure hardware settings. Subsystem methods provide full-functionality for each device type.
Device Discovery¶
The API provides a method that gets a list of available DAQ devices connected to the system.
-
get_daq_device_inventory
(interface_type, number_of_devices=100)¶ Gets a list of
DaqDeviceDescriptor
objects that can be used as theDaqDevice
class parameter to create DaqDevice objects.Parameters: - interface_type (InterfaceType) – One or more of the
InterfaceType
attributes (suitable for bit-wise operations) specifying which physical interfaces (such as USB) to search for MCC devices. - number_of_devices (Optional[int]) – Option parameter indicating the maximum number (optional [int]) of devices to return in the list; the default is 100).
Returns: A list of
DaqDeviceDescriptor
objects that describe each of the each of the MCC devices found on the specified interface.Return type: list[DaqDeviceDescriptor]
Raises: - interface_type (InterfaceType) – One or more of the
Device Management¶
The API provides classes to manage devices connected to the system:
DaqDevice class¶
Provides access to available MCC Daq devices for operation, configuration, and retrieving information.
Methods¶
-
class
DaqDevice
(daq_device_descriptor)¶ Creates a
DaqDevice
object based on the daq_device_descriptor (usually obtained usingget_daq_device_inventory()
). The DaqDevice object allows access to all of the classes, methods, and attributes for the associated MCC device.Parameters: daq_device_descriptor (DaqDeviceDescriptor) – The object that describes the DAQ device. Raises: ULException
Method Description get_descriptor()
Returns the DaqDeviceDescriptor for an existing DaqDevice
object.connect()
Establishes a connection to a physical DAQ device referenced by the DaqDevice
object.is_connected()
Gets the connection status of a DAQ device referenced by the DaqDevice
object.disconnect()
Disconnects from the DAQ device referenced by the DaqDevice
object.flash_led()
Flashes the LED on the DAQ device for the device referenced by the DaqDevice
object.get_info()
Gets the DAQ device information object used to retrieve information about the DAQ device for the device referenced by the DaqDevice
object.get_config()
Gets the DAQ device configuration object for the device referenced by the DaqDevice
object.get_ai_device()
Gets the analog input subsystem object used to access the AI subsystem for the device referenced by the DaqDevice
object.get_ao_device()
Gets the analog output subsystem object used to access the AO subsystem for the device referenced by the DaqDevice
object.get_dio_device()
Gets the digital input/output subsystem object used to access the DIO subsystem for the device referenced by the DaqDevice
object.get_ctr_device()
Gets the counter subsystem object used to access the counter subsystem for the device referenced by the DaqDevice
object.get_tmr_device()
Gets the counter subsystem object used to access the timer subsystem for the device referenced by the DaqDevice
object.get_daqi_device()
Gets the DAQ input subsystem object used to access the DAQ input subsystem. get_daqo_device()
Gets the DAQ output subsystem object used to access the DAQ output subsystem for the device referenced by the DaqDevice
object.enable_event()
Binds one or more event conditions to a callback function for the device referenced by the DaqDevice
object.disable_event()
Disables one or more event conditions and unbinds the associated callback function for the device referenced by the DaqDevice
object.mem_read()
Reads a value from a specified region in memory. mem_write()
Writes a block of data to the specified address in the reserved memory area on the device referenced by the DaqDevice
object.release()
Removes the device referenced by the DaqDevice
object from the Universal Library, and releases all resources associated with that device.-
get_descriptor
()¶ Returns the DaqDeviceDescriptor for an existing
DaqDevice
object.Returns: The object that describes the DAQ device. Return type: DaqDeviceDescriptor Raises: ULException
-
connect
()¶ Establish a connection to a physical DAQ device referenced by the
DaqDevice
object.Raises: ULException
-
is_connected
()¶ Gets the DAQ device connection status for the device referenced by the
DaqDevice
object.Returns: True if the DAQ device is connected, otherwise False. Return type: bool Raises: ULException
-
disconnect
()¶ Disconnects from the DAQ device referenced by the
DaqDevice
object.Raises: ULException
-
flash_led
(number_of_flashes)¶ Flashes the LED on the DAQ device for the device referenced by the
DaqDevice
object.Parameters: number_of_flashes (int) – The number of flashes; set to 0 for a continuous flash until the next call with a non-zero value. Raises: ULException
-
get_info
()¶ Gets the DAQ device information object for the device referenced by the
DaqDevice
object.Returns: The object used for getting the capabilities of the DAQ device. Return type: DaqDeviceInfo
-
get_config
()¶ Gets the DAQ device configuration object for the device referenced by the
DaqDevice
object.Returns: The object used for getting the configuration of the DAQ device. Return type: DaqDeviceConfig
-
get_ai_device
()¶ Gets the analog input subsystem object used to access the AI subsystem for the device referenced by the
DaqDevice
object.Returns: The object used to access the AI subsystem. Return type: AiDevice
-
get_ao_device
()¶ Gets the analog output subsystem object used to access the AO subsystem for the device referenced by the
DaqDevice
object.Returns: The object used to access the AO subsystem. Return type: AoDevice
-
get_dio_device
()¶ Gets the digital input/output subsystem object used to access the DIO subsystem for the device referenced by the
DaqDevice
object.Returns: The object used to access the DIO subsystem. Return type: DioDevice
-
get_ctr_device
()¶ Gets the counter subsystem object used to access the counter subsystem for the device referenced by the
DaqDevice
object.Returns: The object used to access the counter subsystem. Return type: CtrDevice
-
get_tmr_device
()¶ Gets the timer subsystem object used to access the timer subsystem for the device referenced by the
DaqDevice
object.Returns: The object used to access the timer subsystem. Return type: TmrDevice
-
get_daqi_device
()¶ Gets the DAQ input subsystem object used to access the DAQ input subsystem for the device referenced by the
DaqDevice
object.Returns: The object used to access the DAQ input subsystem. Return type: DaqiDevice
-
get_daqo_device
()¶ Gets the DAQ output subsystem object used to access the DAQ output subsystem for the device referenced by the
DaqDevice
object.Returns: The object used to access the DAQ output subsystem. Return type: DaqoDevice
-
enable_event
(event_types, event_parameter, event_callback_function, user_data)¶ Binds one or more event conditions to a callback function for the device referenced by the
DaqDevice
object.Parameters: - event_types (DaqEventType) – One or more attributes (suitable for bit-wise operations) specifying the conditions to bind to the callback function.
- event_parameter (int) – A numeric value that specifies additional information for some event types, such as the number of samples for the ON_DATA_AVAILABLE event type.
- event_callback_function (function) – The callback function to be executed on the event condition.
- user_data (object) – Data (defined by the user) to be passed to the callback function.
Raises:
-
disable_event
(event_types)¶ Disables one or more event conditions and unbinds the associated callback function for the device referenced by the
DaqDevice
object.Parameters: event_types (DaqEventType) – One or more attributes (suitable for bit-wise operations) specifying the conditions to unbind from the callback function. Raises: ULException
-
mem_read
(mem_region_type, address, count)¶ Reads a value from a specified region in memory on the device referenced by the
DaqDevice
object.Parameters: - mem_region_type (MemRegion) – The region in memory to read.
- address (int) – The memory address.
- count (int) – The number of bytes to read.
Raises:
-
mem_write
(mem_region_type, address, mem_buffer)¶ Writes a block of data to the specified address in the reserve memory area on the device referenced by the
DaqDevice
object.Parameters: - mem_region_type (MemRegion) – The region in reserve memory area to write to.
- address (int) – The memory address .
- mem_buffer (bytearray) – The data to write.
Raises:
-
release
()¶ Removes the device referenced by the
DaqDevice
object from the Universal Library, and releases all resources associated with that device.Raises: ULException
-
DaqDeviceInfo class¶
Provides information about the capabilities of the DAQ device.
Methods¶
-
class
DaqDeviceInfo
¶ An instance of the DaqDeviceInfo class is obtained by calling
DaqDevice.get_info()
.Method Description get_product_id()
Gets the product type referenced by the DaqDevice
object.get_event_types()
Gets a list of DaqEventType
values containing the types supported by the device referenced by theDaqDevice
object.get_mem_info()
Gets the DAQ device memory information object used to retrieve information about the reserved memory regions on the DAQ device referenced by the DaqDevice
object.-
get_product_id
()¶ Gets the product type referenced by the
DaqDevice
object.Returns: The product ID. Return type: int Raises: ULException
-
get_event_types
()¶ Gets a list of
DaqEventType
values containing the types supported by the device referenced by theDaqDevice
object.Returns: A list of values containing the types supported by the device. Return type: list[DaqEventType] Raises: ULException
-
get_mem_info
()¶ Gets the DAQ device memory information object used to retrieve information about the reserved memory regions on the DAQ device referenced by the
DaqDevice
object.Returns: An instance of the object that contains information about the reserved memory regions on the DAQ device. Return type: DevMemInfo Raises: ULException
-
DaqDeviceConfig class¶
Provides information about the configuration of the DAQ device.
Methods¶
-
class
DaqDeviceConfig
¶ An instance of the DaqDeviceConfig class is obtained by calling
DaqDevice.get_config()
.Method Description get_version()
Gets the version of the firmware specified on the device referenced by the DaqDevice
object, specified byDevVersionType
, and returns it it as a string.-
get_version
(version_type)¶ Gets the version of the firmware specified on the device referenced by the
DaqDevice
object, specified byDevVersionType
, and returns it as a string.Parameters: version_type (DevVersionType) – The type of firmware. Returns: The version of the specified type of firmware. Return type: str Raises: ULException
-
DevMemInfo class¶
Constructor for the DaqDeviceInfo
class.
Methods¶
-
class
DevMemInfo
¶ An instance of the DevMemInfo class is obtained by calling
DaqDeviceInfo.get_mem_info()
.Method Description get_mem_regions()
Gets a list of memory regions on the device referenced by the DaqDevice
object.get_mem_descriptor()
Gets the memory descriptor object for the specified region of memory on the device referenced by the DaqDevice
object.-
get_mem_regions
()¶ Gets a list of memory regions on the device referenced by the
DaqDevice
object.Returns: A list of supported MemRegion objects. Return type: list[MemRegion] Raises: ULException
-
get_mem_descriptor
(mem_region)¶ Gets the memory descriptor object for the specified region of memory on the device referenced by the
DaqDevice
object.Parameters: mem_region (MemRegion) – The memory region. Returns: A MemDescriptor object for the specified memory region. Return type: MemDescriptor Raises: ULException
-
Analog Input Subsystem¶
Provides classes to manage the AI subsystem on a device:
AiDevice class¶
Analog input subsystem of the UL DAQ Device.
Methods¶
-
class
AiDevice
¶ An instance of the AiDevice class is obtained by calling
DaqDevice.get_ai_device()
.Method Description get_info()
Gets the analog input information object for the device referenced by the AiDevice
object.a_in()
Returns the value read from an A/D channel on the device referenced by the AiDevice
object.a_in_scan()
Scans a range of A/D channels on the device referenced by the AiDevice
object, and stores the samples.a_in_load_queue()
Loads the A/D queue of the device referenced by the AiDevice
object.set_trigger()
Configures the trigger parameters for the device referenced by the AiDevice
object that will be used whena_in_scan()
is called withRETRIGGER
orEXTTRIGGER
.get_scan_status()
Gets the status, count, and index of an A/D scan operation on the device referenced by the AiDevice
object.scan_stop()
Stops the analog input scan operation currently running on the device referenced by the AiDevice
object.scan_wait()
Waits until the scan operation completes on the device referenced by the AiDevice
object, or the specified timeout elapses.-
get_info
()¶ Gets the analog input information object for the device referenced by the
AiDevice
object.Returns: An object used for retrieving information about the analog input subsystem of the UL DAQ Device. Return type: AiInfo
-
a_in
(channel, input_mode, analog_range, flags)¶ Returns the value read from an A/D channel on the device referenced by the
AiDevice
object.Parameters: - channel (int) – A/D channel number.
- input_mode (AiInputMode) – The input mode of the specified channel.
- analog_range (Range) – The range of the data to be read.
- flags (AInFlag) – One or more of the
AInFlag
attributes (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned.
Returns: The value of the A/D channel.
Return type: float
Raises:
-
a_in_scan
(low_channel, high_channel, input_mode, analog_range, samples_per_channel, rate, options, flags, data)¶ Scans a range of A/D channels on the device referenced by the
AiDevice
object, and stores the samples.Parameters: - low_channel (int) – First A/D channel in the scan.
- high_channel (int) – Last A/D channel in the scan.
- input_mode (AiInputMode) – The input mode of the specified channels.
- analog_range (Range) – The range of the data being read.
- samples_per_channel (int) – the number of A/D samples to collect from each channel in the scan.
- rate (float) – A/D sample rate in samples per channel per second.
- options (ScanOption) – One or more of the attributes (suitable for bit-wise operations) specifying the optional conditions that will be applied to the scan, such as continuous or external clock.
- flags (AInScanFlag) – One or more of the attributes (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned.
- data (Array[float]) – The buffer to receive the data. Use
create_float_buffer
to create the buffer.
Returns: The actual input scan rate of the scan.
Return type: float
Raises:
-
a_in_load_queue
(queue)¶ Loads the A/D queue of the device referenced by the
AiDevice
object.Parameters: queue (list[AiQueueElement]) – A list of AiQueueElement structs, each of which contains fields specifying the channel, range, and mode. Raises: ULException
-
set_trigger
(trig_type, trig_chan, level, variance, retrigger_sample_count)¶ Configures the trigger parameters for the device referenced by the
AiDevice
object that will be used whena_in_scan()
is called withRETRIGGER
orEXTTRIGGER
.Parameters: - trig_type (TriggerType) – One of the
TriggerType
attributes that determines the type of the external trigger. - trig_chan (int) – The trigger channel; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- level (float) – The level at or around which the trigger event should be detected; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- variance (float) – 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.
- retrigger_sample_count (int) – The number of samples per trigger to acquire with each trigger event; ignored unless the RETRIGGER ScanOption is set for the scan.
Raises: - trig_type (TriggerType) – One of the
-
get_scan_status
()¶ Gets the status, count, and index of an A/D scan operation on the device referenced by the
AiDevice
object.Returns: A tuple containing the scan status and transfer status for the analog input background operation. Return type: ScanStatus, TransferStatus Raises: ULException
-
scan_stop
()¶ Stops the analog input scan operation currently running on the device referenced by the
AiDevice
object.Raises: ULException
-
scan_wait
(wait_type, timeout)¶ Waits until the scan operation completes on the device referenced by the
AiDevice
object, or the specified timeout elapses.Parameters: - wait_type (WaitType) – One or more of the attributes (suitable for bit-wise operations) specifying the event types to wait for.
- timeout (float) – The timeout value in seconds (s); set to -1 to wait indefinitely for the scan function to end.
Raises:
-
AiInfo class¶
Provides information about the capabilities of the analog input subsystem.
Methods¶
-
class
AiInfo
¶ An instance of the AiInfo class is obtained by calling
AiDevice.get_info()
.Method Description get_num_chans()
Gets the total number of A/D channels on the device referenced by the AiInfo
object.get_num_chans_by_mode()
Gets the number of A/D channels on the device referenced by the AiInfo
object for the specified input mode.get_num_chans_by_type()
Gets the number of A/D channels on the device referenced by the AiInfo
object for the specifiedAiChanType
.get_resolution()
Gets the A/D resolution for the device referenced by the AiInfo
object in number of bits.get_min_scan_rate()
Gets the minimum scan rate for the device referenced by the AiInfo
object in samples per second.get_max_scan_rate()
Gets the maximum scan rate for the device referenced by the AiInfo
object in samples per second.get_max_throughput()
Gets the maximum throughput for the device referenced by the AiInfo
object in samples per second.get_max_burst_rate()
Gets the maximum burst rate for the device referenced by the AiInfo
object in samples per second.get_max_burst_throughput()
Gets the maximum burst throughput for the device referenced by the AiInfo
object in samples per second when using theScanOption.BURSTIO
.get_fifo_size()
Gets the FIFO size in bytes for the device referenced by the AiInfo
object.get_scan_options()
Gets a list of ScanOption
attributes (suitable for bit-wise operations) specifying scan options supported by the device referenced by theAiInfo
object.has_pacer()
Determines whether the device referenced by the AiInfo
object supports paced analog input operations.get_chan_types()
Gets a list of AChanType
attributes (suitable for bit-wise operations) indicating supported channel types for the device referenced by theAiInfo
object.get_ranges()
Gets a list of supported ranges for the device referenced by the AiInfo
object.get_trigger_types()
Gets a list of supported trigger types for the device referenced by the AiInfo
object.get_max_queue_length()
Gets the maximum length of the queue list for the device referenced by the AiInfo
object.get_queue_types()
Gets a list of supported queue types for the device referenced by the AiInfo
object.get_chan_queue_limitations()
Gets a list of queue limitations for the device referenced by the AiInfo
object.-
get_num_chans
()¶ Gets the total number of A/D channels on the device referenced by the
AiInfo
object.Returns: The number of analog input channels. Return type: int Raises: ULException
-
get_num_chans_by_mode
(input_mode)¶ Gets the number of A/D channels on the device referenced by the
AiInfo
object for the specified input mode.Parameters: input_mode (AiInputMode) – The analog input mode for which the number of channels is to be determined Returns: The number of analog input channels. Return type: int Raises: ULException
-
get_num_chans_by_type
(channel_type)¶ Gets the number of A/D channels on the device referenced by the
AiInfo
object for the specifiedAiChanType
.Parameters: channel_type (AiChanType) – The analog channel type for which the number of channels is to be determined. Returns: The number of analog input channels. Return type: int Raises: ULException
-
get_resolution
()¶ Gets the A/D resolution for the device referenced by the
AiInfo
object in number of bits.Returns: The number of bits of resolution (integer) for the A/D converter on the device. Return type: int Raises: ULException
-
get_min_scan_rate
()¶ Gets the minimum scan rate for the device referenced by the
AiInfo
object in samples per second.Returns: The minimum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_scan_rate
()¶ Gets the maximum scan rate for the device referenced by the
AiInfo
object in samples per second.Returns: The maximum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_throughput
()¶ Gets the maximum throughput for the device referenced by the
AiInfo
object in samples per second.Returns: The maximum throughput in samples per second. Return type: float Raises: ULException
-
get_max_burst_rate
()¶ Gets the maximum burst rate for the device referenced by the
AiInfo
object in samples per second when usingScanOption.BURSTIO
.Returns: The maximum burst rate in samples per second. Return type: float Raises: ULException
-
get_max_burst_throughput
()¶ Gets the maximum burst throughput for the device referenced by the
AiInfo
object in samples per second.Returns: The maximum burst throughput in samples per second. Return type: float Raises: ULException
-
get_fifo_size
()¶ Gets the FIFO size in bytes for the device referenced by the
AiInfo
object.Returns: The FIFO size in bytes. Return type: int Raises: ULException
-
get_scan_options
()¶ Gets a list of
ScanOption
attributes (suitable for bit-wise operations) specifying scan options supported by the device referenced by theAiInfo
object.Returns: A list of supported ScanOption values. Return type: list[ScanOption] Raises: ULException
-
has_pacer
()¶ Determines whether the device referenced by the
AiInfo
object supports paced analog input operations.Returns: True if the device has an analog input hardware pacer. False if the device does not have an analog input hardware pacer. Return type: bool Raises: ULException
-
get_chan_types
()¶ Gets a list of
AiChanType
attributes (suitable for bit-wise operations) indicating supported channel types for the device referenced by theAiInfo
object.Returns: A list of the supported analog channel types. Return type: list[AiChanType] Raises: ULException
-
get_ranges
(input_mode)¶ Gets a list of supported ranges for the specified input mode for the device referenced by the
AiInfo
object.Parameters: input_mode (AiInputMode) – The analog input mode for which the supported ranges are to be determined. Returns: The list of supported analog ranges. Return type: list[Range] Raises: ULException
-
get_trigger_types
()¶ Gets a list of supported trigger types for the device referenced by the
AiInfo
object.Returns: The list of supported trigger types. Return type: list[TriggerType] Raises: ULException
-
get_max_queue_length
(input_mode)¶ Gets the maximum length of the queue list for the specified channel mode for the device referenced by the
AiInfo
object.Parameters: input_mode (AiInputMode) – The analog input channel mode for which the queue length is to be determined. Returns: The maximum number of elements in the queue list. Return type: int Raises: ULException
-
get_queue_types
()¶ Gets a list of supported queue types for the device referenced by the
AiInfo
object.Returns: The list of supported queue types. Return type: list[AiQueueType] Raises: ULException
-
get_chan_queue_limitations
()¶ Gets a list of supported queue limitations for the device referenced by the
AiInfo
object.Returns: The list of queue limitations. Return type: list[AiChanQueueLimitation] Raises: ULException
-
Analog Output Subsystem¶
Provides classes to manage the AO subsystem on a device:
AoDevice class¶
Analog output subsystem of the UL DAQ Device.
Methods¶
-
class
AoDevice
¶ An instance of the AoDevice class is obtained by calling
DaqDevice.get_ao_device()
.Method Description get_info()
Gets the analog output information object for the device referenced by the AoDevice
object.a_out()
Writes the data value to a D/A output channel on the device referenced by the AoDevice
object.a_out_scan()
Writes values to a range of D/A channels. get_scan_status()
Gets the current status, count, and index for the device referenced by the AoDevice
object.scan_stop()
Stops the D/A scan operation currently running on the device referenced by the AoDevice
object.scan_wait()
Waits until the scan operation completes on the device referenced by the AoDevice
object, or the specified timeout elapses.set_trigger()
Configures the trigger parameters for the device referenced by the AoDevice
object that will be used whena_out_scan()
is called withRETRIGGER
orEXTTRIGGER
.-
get_info
()¶ Get the analog output information object for the device referenced by the
AoDevice
object.Returns: An object used for getting the capabilities of the analog output subsystem. Return type: AoInfo
-
a_out
(channel, analog_range, flags, data)¶ - Writes the data value to a D/A output channel on the device referenced by the
AoDevice
object.Parameters: Returns: The actual output scan rate.
Return type: float
Raises:
-
a_out_scan
(low_chan, high_chan, analog_range, samples_per_channel, rate, options, flags, data)¶ Writes values to a range of D/A channels.
Parameters: - low_chan (int) – First D/A channel in the scan.
- high_chan (int) – Last D/A channel in the scan.
- analog_range (Range) – The range of the data to be written.
- samples_per_channel (int) – Number of D/A samples to output.
- rate (float) – Sample output rate in scans per second.
- options (ScanOption) – One or more of the attributes (suitable for bit-wise operations) specifying the optional conditions that will be applied to the scan.
- flags (AOutScanFlag) – One or more of the attributes (suitable for bit-wise operations) specifying the conditioning applied to the data.
- data (Array[float]) – The data buffer to write. Use
create_float_buffer
to create the buffer.
Returns: The actual output scan rate.
Return type: float
Raises:
-
get_scan_status
()¶ Gets the current status, count, and index of the D/A operation for the device referenced by the
AoDevice
object.Returns: A tuple containing the scan status and transfer status of the analog output background operation. Return type: ScanStatus, TransferStatus Raises: ULException
-
scan_stop
()¶ Stops the D/A scan operation currently running on the device referenced by the
AoDevice
object.Raises: ULException
-
scan_wait
(wait_type, timeout)¶ Waits until the scan operation completes on the device referenced by the
AoDevice
object, or the specified timeout elapses.Parameters: - wait_type (WaitType) – One or more of the attributes (suitable for bit-wise operations) specifying the event types to wait for.
- timeout (float) – The timeout value in seconds (s); set to -1 to wait indefinitely for the scan function to end.
Raises:
-
set_trigger
(trigger_type, channel, level, variance, retrigger_count)¶ Configures the trigger parameters for the device referenced by the
AoDevice
object that will be used whena_out_scan()
is called withRETRIGGER
orEXTTRIGGER
.Parameters: - trigger_type (TriggerType) – One of the TriggerType attributes that determines the type of the external trigger.
- channel (int) – Analog output channel number; ignored if trigger_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- level (float) – The level at or around which the trigger event should be detected; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- variance (float) – 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.
- retrigger_count (int) – The number of samples to generate with each
trigger event; ignored unless
ScanOption.RETRIGGER()
is set for the scan.
Raises:
-
AoInfo class¶
Provides information about the capabilities of the analog output subsystem.
Methods¶
-
class
AoInfo
¶ The instance of the AoInfo class is obtained by calling
AoDevice.get_info()
.Method Description get_num_chans()
Gets the total number of D/A channels for the device referenced by the AoInfo
object.get_resolution()
Gets the D/A resolution in number of bits for the device referenced by the AoInfo
object.get_min_scan_rate()
Gets the minimum scan rate for the device referenced by the AoInfo
object in samples per second.get_max_scan_rate()
Gets the maximum scan rate for the device referenced by the AoInfo
object in samples per second.get_max_throughput()
Gets the maximum throughput for the device referenced by the AoInfo
object in samples per second.get_fifo_size()
Gets the FIFO size in bytes for the device referenced by the AoInfo
object.get_scan_options()
Gets a list of ScanOption
attributes (suitable for bit-wise operations) specifying scan options supported by the device referenced by theAoInfo
object.has_pacer()
Determines whether the device referenced by the AoInfo
object supports paced analog output operations.get_ranges()
Gets a list of supported ranges for the device referenced by the AoInfo
object.get_trigger_types()
Gets a list of supported trigger types for the device referenced by the AoInfo
object.-
get_num_chans
()¶ Gets the total number of D/A channels for the device referenced by the
AoInfo
object.Returns: The number of analog output channels. Return type: int Raises: ULException
-
get_resolution
()¶ Gets the D/A resolution in number of bits for the device referenced by the
AoInfo
object.Returns: The number of bits of resolution (integer) for the A/D converter on the device. Return type: int Raises: ULException
-
get_min_scan_rate
()¶ Gets the minimum scan rate for the device referenced by the
AoInfo
object in samples per second.Returns: The minimum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_scan_rate
()¶ Gets the maximum scan rate for the device referenced by the
AoInfo
object in samples per second.Returns: The maximum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_throughput
()¶ Gets the maximum throughput for the device referenced by the
AoInfo
object in samples per second.Returns: The maximum throughput in samples per second. Return type: float Raises: ULException
-
get_fifo_size
()¶ Gets the FIFO size in bytes for the device referenced by the
AoInfo
object.Returns: The FIFO size in bytes. Return type: int Raises: ULException
-
get_scan_options
()¶ Gets a list of
ScanOption
attributes (suitable for bit-wise operations) specifying scan options supported by the device referenced by theAoInfo
object.Returns: A list of supported ScanOption
values.Return type: list[ScanOption] Raises: ULException
-
has_pacer
()¶ Determines whether the device referenced by the
AoInfo
object supports paced analog output operations.Returns: True if the device has an analog output hardware pacer. False if the device does not have an analog output hardware pacer. Return type: bool Raises: ULException
-
get_ranges
()¶ Gets a list of supported ranges for the device referenced by the
AoInfo
object.Returns: The list of supported analog ranges. Return type: list[Range] Raises: ULException
-
get_trigger_types
()¶ Gets a list of supported trigger types for the device referenced by the
AoInfo
object.Returns: The list of supported trigger types. Return type: list[TriggerType] Raises: ULException
-
Digital I/O Subsystem¶
Provides classes to manage the Digital I/O subsystem on a device:
DioDevice class¶
Digital I/O subsystem of the UL DAQ Device.
Methods¶
-
class
DioDevice
¶ An instance of the DioDevice class is obtained by calling
DaqDevice.get_dio_device()
.Method Description get_info()
Gets the digital I/O information object for the device referenced by the DioDevice
object.get_config()
Gets the digital I/O configuration object for the device referenced by the DioDevice
object.d_config_port()
Configures a digital port as input or output for the device referenced by the DioDevice
object.d_config_bit()
Configures a digital bit as input or output for the device referenced by the DioDevice
object.d_in()
Returns the value read from a digital port for the device referenced by the DioDevice
object.d_out()
Writes the value to the digital port type for the device referenced by the DioDevice
object.d_bit_in()
Returns the value read from a digital bit for the device referenced by the DioDevice
object.d_bit_out()
Writes the specified value to a digital output bit for the device referenced by the DioDevice
object.d_in_scan()
Scans a range of digital ports at the specified rate on the device referenced by the DioDevice
object.d_out_scan()
Scans data to a range of digital output ports at the specified rate on the device referenced by the DioDevice
object.d_in_set_trigger()
Configures the trigger parameters for the device referenced by the DioDevice
object that will be used whend_in_scan()
is called withRETRIGGER
orEXTTRIGGER
.d_out_set_trigger()
Configures the trigger parameters for the device referenced by the DioDevice
object that will be used whend_out_scan()
is called withRETRIGGER
orEXTTRIGGER
.d_in_get_scan_status()
Gets the status, count, and index of the digital input scan operation on the device referenced by the. DioDevice
object.d_out_get_scan_status()
Gets the status, count, and index of the digital output scan operation on the device referenced by the. DioDevice
object.d_in_scan_stop()
Stops the digital input scan operation currently running. on the device referenced by the DioDevice
object.d_out_scan_stop()
Stops the digital output scan operation currently running on the device referenced by the DioDevice
object.d_in_scan_wait()
Waits until the scan operation completes on the device referenced by the DioDevice
object, or the time specified by the timeout argument elapses.d_out_scan_wait()
Waits until the scan operation completes on the device referenced by the DioDevice
object, or the time specified by the timeout argument elapses.-
get_info
()¶ Gets the Digital I/O information object for the device referenced by the
DioDevice
object.Returns: The object used for retrieving information about the digital I/O subsystem of the UL DAQ Device. Return type: DioInfo
-
get_config
()¶ Gets the Digital I/O configuration object for the device referenced by the
DioDevice
object.Returns: The object used for retrieving configuration information about the digital I/O subsystem of the UL DAQ Device. Return type: DioConfig
-
d_config_port
(port_type, direction)¶ Configures a digital port as input or output for the device referenced by the
DioDevice
object.Parameters: - port_type (DigitalPortType) – The digital port type; the port must be configurable.
- direction (DigitalDirection) – The direction of the digital port (input or output).
Raises:
-
d_config_bit
(port_type, bit_number, direction)¶ Configures a digital bit as input or output for the device referenced by the
DioDevice
object. The port must be configurable (DigitalPortIoType = BITIO).Parameters: - port_type (DigitalPortType) – The digital port containing the bit to configure; the bit must be configurable.
- bit_number (int) – The bit number within the specified port.
- direction (DigitalDirection) – The bit direction (input or output).
Raises:
-
d_in
(port_type)¶ Returns the value read from a digital port for the device referenced by the
DioDevice
object.Parameters: port_type (DigitalPortType) – Digital port to read. Returns: The value of the digital port. Return type: int Raises: ULException
-
d_out
(port_type, data)¶ Writes the specified value to a digital output port for the device referenced by the
DioDevice
object.Parameters: - port_type (DigitalPortType) – The digital port.
- data (int) – The value to write to the digital port.
Raises:
-
d_bit_in
(port_type, bit_number)¶ Returns the value read from a digital bit for the device referenced by the
DioDevice
object.Parameters: - port_type (DigitalPortType) – Digital port containing the bit to read.
- bit_number (int) – The bit position within the port to read.
Returns: The value of the digital bit.
Return type: int
Raises:
-
d_bit_out
(port_type, bit_number, data)¶ Writes the specified value to a digital output bit for the device referenced by the
DioDevice
object.Parameters: - port_type (DigitalPortType) – The digital port containing the bit to be written to.
- bit_number (int) – The number of the bit to be written to.
- data (int) – The bit value to write.
Raises:
-
d_in_scan
(low_port_type, high_port_type, samples_per_port, rate, options, flags, data)¶ Scans a range of digital ports at the specified rate on the device referenced by the
DioDevice
object.Parameters: - low_port_type (DigitalPortType) – First digital port in the scan.
- high_port_type (DigitalPortType) – Last digital port in the scan.
- samples_per_port (int) – The number of samples to read.
- rate (float) – The sample input rate, in samples per second.
- options (ScanOption) – One or more attributes (suitable for bit-wise operations) specifying the optional conditions that will be applied to the scan, such as continuous or external clock.
- flags (DInScanFlag) – One or more
DInScanFlag
attributes (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned. - data (Array[int]) – The buffer in which the digital data is returned.
Use
create_int_buffer
to create the buffer.
Returns: The actual sample input rate of the scan.
Return type: float
Raises:
-
d_out_scan
(low_port_type, high_port_type, samples_per_port, rate, options, flags, data)¶ Scans data to a range of digital output ports at the specified rate on the device referenced by the
DioDevice
object.Parameters: - low_port_type (DigitalPortType) – First digital port in the scan.
- high_port_type (DigitalPortType) – Last digital port in the scan.
- samples_per_port (int) – The number of samples per port to write.
- rate (float) – The sample output rate, in samples per second.
- options (ScanOption) – One or more
ScanOption
attributes (suitable for bit-wise operations) specifying the optional conditions that will be applied to the scan, such as continuous or external clock. - flags (DOutScanFlag) – One or more
DOutScanFlag
attributes (suitable for bit-wise operations) specifying the conditioning applied to the data before it is output. - data (Array[int]) – The data buffer to write to the digital port.
Use
create_int_buffer
to create the buffer.
Returns: The actual sample output rate of the scan.
Return type: float
Raises:
-
d_in_set_trigger
(trig_type, trig_chan, level, variance, retrigger_sample_count)¶ Configures the trigger parameters for the device referenced by the
DioDevice
object that will be used whend_in_scan
is called withRETRIGGER
orEXTTRIGGER
.Parameters: - trig_type (TriggerType) – One of the class:TriggerType attributes that determines the type of the external trigger.
- trig_chan (int) – The trigger channel; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- level (float) – The level at or around which the trigger event should be detected; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- variance (float) – 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.
- retrigger_sample_count (int) – The number of samples per trigger to
acquire with each trigger event; ignored unless
RETRIGGER
is set for the scan.
Raises:
-
d_out_set_trigger
(trig_type, trig_chan, level, variance, retrigger_sample_count)¶ Configures the trigger parameters for the device referenced by the
DioDevice
object that will be used whend_out_scan
is called withRETRIGGER
orEXTTRIGGER
.Parameters: - trig_type (TriggerType) – One of the
TriggerType
attributes that determines the type of the external trigger. - trig_chan (int) – The trigger channel; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- level (float) – The level at or around which the trigger event should be detected; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- variance (float) – 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.
- retrigger_sample_count (int) – The number of samples per trigger to
acquire with each trigger event; ignored unless
RETRIGGER
is set for the scan.
Raises: - trig_type (TriggerType) – One of the
-
d_in_get_scan_status
()¶ Gets the status, count, and index of the digital input scan operation on the device referenced by the
DioDevice
object.Returns: A tuple containing the scan status and transfer status of the digital input background operation. Return type: ScanStatus, TransferStatus Raises: ULException
-
d_out_get_scan_status
()¶ Gets the status, count, and index of the digital output scan operation on the device referenced by the
DioDevice
object.Returns: A tuple containing the scan status and transfer status of the digital output background operation. Return type: ScanStatus, TransferStatus Raises: ULException
-
d_in_scan_stop
()¶ Stops the digital input scan operation currently running on the device referenced by the
DioDevice
object.Raises: ULException
-
d_out_scan_stop
()¶ Stops the digital output scan operation currently running on the device referenced by the
DioDevice
object.Raises: ULException
-
d_in_scan_wait
(wait_type, timeout)¶ Waits until the scan operation completes on the device referenced by the
DioDevice
object, or the specified timeout elapses.Parameters: Raises:
-
DioInfo class¶
Provides information about the capabilities of the digital I/O subsystem.
Methods¶
-
class
DioInfo
¶ An instance of the DioInfo class is obtained by calling
DioDevice.get_info()
.Method Description get_num_ports()
Gets the total number of digital I/O ports on the device referenced by the DioInfo
object.get_port_types()
Gets a list of supported port types on the device referenced by the DioInfo
object.get_port_info()
Gets the port information object for the specified port on the device referenced by the DioInfo
object.has_pacer()
Determines whether the device referenced by the DioInfo
supports paced digital operations (scanning) for the specified digital direction.get_min_scan_rate()
Gets the minimum scan rate for the device referenced by the DioInfo
object in samples per second for the specified digital direction.get_max_scan_rate()
Gets the maximum scan rate for the device referenced by the DioInfo
object in samples per second. for the specified digital direction.get_max_throughput()
Gets the maximum throughput for the device referenced by the DioInfo
object in samples per second for the specified digital direction.get_fifo_size()
Gets the FIFO size in bytes for the device referenced by the DioInfo
object for the specified digital direction.get_scan_options()
Gets a list of ScanOption
attributes (suitable for bit-wise operations) specifying scan options supported by the device referenced by theDioInfo
object for the specified digital direction.get_trigger_types()
Gets a list of supported trigger types for the device referenced by the DioInfo
object for the specified digital direction.-
get_num_ports
()¶ Gets the total number of digital I/O ports on the device referenced by the
DioInfo
object.Returns: The number of digital I/O ports. Return type: int Raises: ULException
-
get_port_types
()¶ Gets a list of supported port types on the device referenced by the
DioInfo
object.Returns: A list of supported digital port types. Return type: list[DigitalPortType] Raises: ULException
-
get_port_info
(port_type)¶ Gets the port information object for the specified port on the device referenced by the
DioInfo
object.Parameters: port_type (DigitalPortType) – The digital port type. Returns: The port type and number of bits in the port. Return type: DioPortInfo Raises: ULException
-
has_pacer
(direction)¶ Determines whether the device referenced by the
DioInfo
object supports paced digital operations (scanning) for the specified digital direction.Parameters: direction (DigitalDirection) – The direction of the digital port (input or output). Returns: True if the device supports paced digital operations in the specified direction. False if the device does not support paced digital operations in the specified direction.
Return type: bool Raises: ULException
-
get_min_scan_rate
(direction)¶ Gets the minimum scan rate for the device referenced by the
DioInfo
object in samples per second for the specified digital direction.Parameters: direction (DigitalDirection) – The direction of the digital port (INPUT or OUTPUT). or output). Returns: The minimum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_scan_rate
(direction)¶ Gets the maximum scan rate for the device referenced by the
DioInfo
object in samples per second for the specified digital direction.Parameters: direction (DigitalDirection) – The direction of the digital port (INPUT or OUTPUT). Returns: The maximum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_throughput
(direction)¶ Gets the maximum throughput for the device referenced by the
DioInfo
object in samples per second for the specified digital direction.Parameters: direction (DigitalDirection) – The direction of the digital port (INPUT or OUTPUT). Returns: The maximum throughput in samples per second. Return type: float Raises: ULException
-
get_fifo_size
(direction)¶ Gets the FIFO size in bytes for the device referenced by the
DioInfo
object for the specified digital direction.Parameters: direction (DigitalDirection) – The direction of the digital port (INPUT or OUTPUT). Returns: The FIFO size in bytes. Return type: int Raises: ULException
-
get_scan_options
(direction)¶ Gets a list of
ScanOption
attributes (suitable for bit-wise operations) specifying scan options supported by the device referenced by theDioInfo
object for the specified digital direction.Parameters: direction (DigitalDirection) – The direction of the digital port (INPUT or OUTPUT). Returns: A list of supported scan options. Return type: list[ScanOption] Raises: ULException
-
get_trigger_types
(direction)¶ Gets a list of supported trigger types for the device referenced by the
DioInfo
object for the specified digital direction.Parameters: direction (DigitalDirection) – The direction of the digital port (INPUT or OUTPUT). Returns: A list of the supported trigger types. Return type: list[TriggerType] Raises: ULException
-
DioConfig class¶
Provides classes to configure digital options.
Methods¶
-
class
DioConfig
¶ An instance of the DioConfig class is obtained by calling
DioDevice.get_config()
.Method Description get_port_direction()
Gets the configured direction for each bit in the specified port for the device referenced by the DioInfo
object.-
get_port_direction
(port_type)¶ Gets the configured direction for each bit in the specified port for the device referenced by the
DioInfo
object object.Parameters: port_type (DigitalPortType) – The digital port type whose direction is being determined. Returns: A list of values that specify the direction of each bit in the specified port. Return type: list[DigitalDirection] Raises: ULException
-
Counter Subsystem¶
Provides classes to manage the counter subsystem on a device:
CtrDevice class¶
Counter subsystem of the UL DAQ Device.
Methods¶
-
class
CtrDevice
¶ An instance of the CtrDevice class is obtained by calling
DaqDevice.get_ctr_device()
.Method Description get_info()
Gets the counter information object for the device referenced by the CtrDevice
object.c_in()
Reads the value of a count register for the device referenced by the CtrDevice
object.c_load()
Loads a value into the specified counter register for the device referenced by the CtrDevice
object.c_clear()
Clears the value of a count register for the device referenced by the CtrDevice
object (sets it to 0).c_read()
Reads the value of the specified counter register for the device referenced by the CtrDevice
object.c_in_scan()
Scans a range of counters at the specified rate on the device referenced by the CtrDevice
object, and stores samples.c_config_scan()
Configures the specified counter on the device referenced by the CtrDevice
object; for counters with programmable types.set_trigger()
Configures the trigger parameters for the device referenced by the CtrDevice
object that will be used whenc_in_scan()
is called withRETRIGGER
orEXTTRIGGER
.get_scan_status()
Gets the status, count, and index of the for the counter input scan operation on the device referenced by the CtrDevice
object.scan_stop()
Stops the counter input scan operation on the device referenced by the CtrDevice
.scan_wait()
Waits until the scan operation completes on the device referenced by the CtrDevice
object, or the specified timeout elapses.-
get_info
()¶ Gets the counter information object for the device referenced by the
CtrDevice
object.Returns: The CtrInfo
object used for retrieving information about the counter subsystem of the UL DAQ Device.Return type: CtrInfo
-
c_in
(counter_number)¶ Reads the value of a count register for the device referenced by the
CtrDevice
object.Parameters: counter_number (int) – The counter number. Returns: The data value. Return type: int Raises: ULException
-
c_load
(counter_number, register_type, load_value)¶ Loads a value into the specified counter register for the device referenced by the
CtrDevice
object.Parameters: - counter_number (int) – The counter number.
- register_type (CounterRegisterType) – The type of counter register.
- load_value (int) – The load value.
Raises:
-
c_clear
(counter_number)¶ Clears the value of a count register for the device referenced by the
CtrDevice
object (sets it to 0).Parameters: counter_number (int) – The counter number to clear. Raises: ULException
-
c_read
(counter_number, register_type)¶ Reads the value of the specified counter register for the device referenced by the
CtrDevice
object.Parameters: - counter_number (int) – The counter number.
- register_type (CounterRegisterType) – The type of counter register.
Returns: The value of the counter register.
Return type: int
Raises:
-
c_in_scan
(low_counter_num, high_counter_num, samples_per_counter, rate, options, flags, data)¶ Scans a range counters at the specified rate on the device referenced by the
CtrDevice
object and stores the samples.Parameters: - low_counter_num (int) – The first counter in the scan.
- high_counter_num (int) – The last counter in the scan.
- samples_per_counter (int) – The number of samples per counter to read.
- rate (float) – The rate in samples per second per counter.
- options (ScanOption) – One or more scan options (suitable for bit-wise operations) specifying the optional conditions that will be applied to the scan, such as continuous or external clock.
- flags (CInScanFlag) – One or more flag values (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned.
- data (Array[int]) – The buffer to receive the data being read. Use
create_int_buffer
to create the buffer.
Returns: The actual input scan rate.
Return type: float
Raises:
-
c_config_scan
(counter_number, measurement_type, measurement_mode, edge_detection, tick_size, debounce_mode, debounce_time, flags=<CConfigScanFlag.DEFAULT: 0>)¶ Configures the specified counter on the device referenced by the
CtrDevice
object; for counters with programmable types.Parameters: - counter_number (int) – The counter number.
- measurement_type (CounterMeasurementType) – The measurement type.
- measurement_mode (CounterMeasurementMode) – The measurement mode.
- edge_detection (CounterEdgeDetection) – Sets whether to increment the counter on a positive edge or negative edge of the input signal.
- tick_size (CounterTickSize) – An attribute that specifies the resolution for measurement modes such as period, pulse width, and timing.
- debounce_mode (CounterDebounceMode) – The debounce mode.
- debounce_time (CounterDebounceTime) – The debounce time.
- flags (Optional[CConfigScanFlag]) – One or more flag values (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned.
Raises:
-
set_trigger
(trig_type, trig_chan, level, variance, retrigger_count)¶ Configures the trigger parameters for the device referenced by the
CtrDevice
object that will be used whenc_in_scan()
is called with theRETRIGGER
orEXTTRIGGER
ScanOption.Parameters: - trig_type (TriggerType) – One of the
TriggerType
attributes that determines the type of the external trigger. - trig_chan (int) – The trigger channel; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- level (float) – The level at or around which the trigger event should be detected; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- variance (float) – The degree to which the input signal can vary relative to the level parameter; ignored for all types where level is ignored.
- retrigger_count (int) – The number of samples per trigger
to acquire with each trigger event; ignored unless
ScanOption.RETRIGGER
is set for the scan.
Raises: - trig_type (TriggerType) – One of the
-
get_scan_status
()¶ Gets the status, count, and index of the counter input scan operation on the device referenced by the
CtrDevice
object.Returns: A tuple containing the scan status and transfer status of the analog output background operation. Return type: ScanStatus, TransferStatus Raises: ULException
-
scan_stop
()¶ Stops the counter input scan operation currently running on the device referenced by the
CtrDevice
object.Raises: ULException
-
scan_wait
(wait_type, timeout)¶ Waits until the scan operation completes on the device referenced by the
CtrDevice
object, or the specified timeout elapses.Parameters: - wait_type (WaitType) – The wait type`.
- timeout (float) – The timeout value in seconds (s); set to -1 to wait indefinitely for the scan function to end.
Raises:
-
CtrInfo class¶
Provides information about the capabilities of the counter subsystem.
Methods¶
-
class
CtrInfo
¶ An instance of the CtrInfo class is obtained by calling
CtrDevice.get_info()
.Method Description get_num_ctrs()
Gets the total number of counter channels for the device referenced by the CtrInfo
object.get_measurement_types()
Gets a list of supported measurement types for a specified counter on the device referenced by the CtrInfo
object.get_measurement_modes()
Gets a list of supported measurement modes compatible with the specified measurement type on the device referenced by the CtrInfo
object.get_register_types()
Gets a list of supported register types for the device referenced by the CtrInfo
object.get_resolution()
Gets the resolution in number of bits for the device referenced by the CtrInfo
object.get_min_scan_rate()
Gets the minimum scan rate for the device referenced by the CtrInfo
object in samples per second.get_max_scan_rate()
Gets the maximum scan rate for the device referenced by the CtrInfo
object in samples per second.get_max_throughput()
Gets the maximum throughput for the device referenced by the CtrInfo
object in samples per second.get_fifo_size()
Gets the FIFO size in bytes for the device referenced by the CtrInfo
object.get_scan_options()
Gets a list of scan options supported by the device referenced by the CtrInfo
object.has_pacer()
Determines whether the device referenced by the CtrInfo
object supports paced counter input operations.get_trigger_types()
Gets a list of trigger types supported by the device referenced by the CtrInfo
object.-
get_num_ctrs
()¶ Gets the total number of counters on the device referenced by the
CtrInfo
object.Returns: The number of counters. Return type: int Raises: ULException
-
get_measurement_types
(counter_number)¶ Gets a list of supported measurement types for a specified counter on the device referenced by the
CtrInfo
object.Parameters: counter_number (int) – The counter number. Returns: A list of CounterMeasurementType
attributes (suitable for bit-wise operations) specifying the compatible measurement types.Return type: list[CounterMeasurementType] Raises: ULException
-
get_measurement_modes
(counter_measurement_type)¶ Gets a list of supported measurement modes compatible with the specified measurement type on the device referenced by the
CtrInfo
object.Parameters: counter_measurement_type (CounterMeasurementType) – The measurement type. Returns: A list of CounterMeasurementMode
attributes (suitable for bit-wise operations) specifying the compatible measurement types.Return type: list[CounterMeasurementMode] Raises: ULException
-
get_register_types
()¶ Gets a list of supported register types for the device referenced by the
CtrInfo
object.Returns: A list of CtrRegisterType
attributes (suitable for bit-wise operations) specifying supported register types.Return type: list[CounterRegisterType] Raises: ULException
-
get_resolution
()¶ Gets the counter resolution in number of bits for the device referenced by the
CtrInfo
object.Returns: The number of bits of resolution. Return type: int Raises: ULException
-
get_min_scan_rate
()¶ Gets the minimum scan rate for the device referenced by the
CtrInfo
object in samples per second.Returns: The minimum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_scan_rate
()¶ Gets the maximum scan rate for the device referenced by the
CtrInfo
object in samples per second.Returns: The maximum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_throughput
()¶ Gets the maximum throughput for the device referenced by the
CtrInfo
object in samples per second.Returns: The maximum throughput in samples per second. Return type: float Raises: ULException
-
get_fifo_size
()¶ Gets the FIFO size in bytes for the device referenced by the
CtrInfo
object.Returns: The FIFO size in bytes. Return type: int Raises: ULException
-
get_scan_options
()¶ Gets a list of scan options supported by the device referenced by the
CtrInfo
object.Returns: A list of attributes (suitable for bit-wise operations) specifying supported ScanOption
values.Return type: list[ScanOption] Raises: ULException
-
has_pacer
()¶ Determines whether the device referenced by the
CtrInfo
object supports paced counter input operations.Returns: Returns True if the device has a counter hardware pacer, or False if the device does not have a counter hardware pacer. Return type: bool Raises: ULException
-
get_trigger_types
()¶ Gets a list of supported trigger types for the device referenced by the
CtrInfo
object.Returns: A list of TriggerType
attributes (suitable for bit-wise operations) specifying supported trigger type values.Return type: TriggerType Raises: ULException
-
Timer Subsystem¶
Provides classes to manage the timer subsystem on a device:
TmrDevice class¶
Timer subsystem of the UL DAQ Device.
Methods¶
-
class
TmrDevice
¶ An instance of the TmrDevice class is obtained by calling
DaqDevice.get_tmr_device()
.Method Description get_info()
Gets the timer information object for the device referenced by the TmrDevice
object.pulse_out_start()
Starts the specified timer on the device referenced by the TmrDevice
object to generate digital pulses at a specified frequency and duty cycle.pulse_out_stop()
Stops the specified timer output on the device referenced by the TmrDevice
object.get_pulse_out_status()
Gets the status of the timer output operation for the specified timer on the on the device referenced by the TmrDevice
object.set_trigger()
Configures the trigger parameters that will be used when pulse_out_start()
is called withEXTTRIGGER
orRETRIGGER
.-
get_info
()¶ Gets the timer information object for the device referenced by the
TmrDevice
object.Returns: An object used for retrieving information about the timer subsystem of the UL DAQ Device. Return type: TmrInfo
-
pulse_out_start
(timer_number, frequency, duty_cycle, pulse_count, initial_delay, idle_state, options)¶ Starts the specified timer on the device reference by the
TmrDevice
object to generate digital pulses at a specified frequency and duty cycle.Parameters: - timer_number (int) – The timer number.
- frequency (float) – The frequency of the timer pulse output.
- duty_cycle (float) – The duty cycle of the timer pulse output.
- pulse_count (int) – The number of pulses to generate; set to 0 for continuous pulse output
- initial_delay (float) – The amount of time in seconds to wait before the the first pulse is generated at the timer output.
- idle_state (TmrIdleState) – The timer idle state.
- options (PulseOutOption) – One or more of the
PulseOutOption
attributes (suitable for bit-wise operations) specifying the optional conditions that will be applied to the output, such as external trigger or retrigger.
Returns: A tuple containing the actual frequency, duty cycle, and initial delay values.
Return type: float, float, float
Raises:
-
pulse_out_stop
(timer_number)¶ Stops the specified timer output on the device referenced by the
TmrDevice
object.Parameters: timer_number (int) – The timer number. Raises: ULException
-
get_pulse_out_status
(timer_number)¶ Gets the status of the timer output operation for the specified timer on the device referenced by the
TmrDevice
object.Parameters: timer_number (int) – The timer number. Returns: A TmrStatus
value.Return type: TmrStatus Raises: ULException
-
set_trigger
(trig_type, trig_chan, level, variance, retrigger_count)¶ Configures the trigger parameters that will be used when
pulse_out_start()
is called withRETRIGGER
orEXTTRIGGER
. referenced by theTmrDevice
object.Parameters: - trig_type (TriggerType) – The digital trigger type.
- trig_chan (int) – Ignored.
- level (float) – Ignored.
- variance (float) – Ignored.
- retrigger_count (int) – Ignored.
Raises:
-
TmrInfo class¶
Provides information about the capabilities of the timer subsystem.
Methods¶
-
class
TmrInfo
¶ An instance of the TmrInfo class is obtained by calling
TmrDevice.get_info()
.Method Description get_num_tmrs()
Gets the total number of timer channels on the device referenced by the TmrInfo
object.get_timer_type()
Get the timer type for the specified timer on the device referenced by the TmrInfo
object.get_min_frequency()
Gets the minimum output frequency on the device referenced by the TmrInfo
object.get_max_frequency()
Gets the maximum output frequency for the specified timer on the device referenced by the TmrInfo
object.-
get_num_tmrs
()¶ Gets the total number of timers on the device referenced by the
TmrInfo
object.Returns: The total number of timers. Return type: int Raises: ULException
-
get_timer_type
(timer_number)¶ Gets the timer type for the specified timer on the device referenced by the
TmrInfo
object.Parameters: timer_number (int) – The timer number. Returns: The TimerType
for the specified timer.Return type: TimerType Raises: ULException
-
get_min_frequency
()¶ Gets the minimum output frequency for the specified timer on the device referenced by the
TmrInfo
object.Returns: The minimum output frequency. Return type: float Raises: ULException
-
get_max_frequency
()¶ Gets the maximum output frequency for the specified timer on the device referenced by the
TmrInfo
object.Returns: The maximum output frequency. Return type: float Raises: ULException
-
Daq Input Subsystem¶
Provides classes to manage the DAQ input subsystem on a device:
DaqiDevice class¶
Daq Input subsystem of the UL DAQ Device.
Methods¶
-
class
DaqiDevice
¶ An instance of the DaqiDevice class is obtained by calling
DaqDevice.get_daqi_device()
.Method Description get_info()
Gets daq input information object for the device referenced by the DaqiDevice
object.set_trigger()
Configures the trigger parameters for the device referenced by the DaqiDevice
object that will be used whendaq_in_scan()
is called withRETRIGGER
orEXTTRIGGER
.daq_in_scan()
Allows scanning of multiple input subsystems, such as analog, digital, counter, on the device referenced by the DaqiDevice
object and stores the samples in an array.get_scan_status()
Gets the status, count, and index of the synchronous input scan operation on the device referenced by the DaqiDevice
object.scan_stop()
Stops the synchronous output scan operation on the device referenced by the DaqiDevice
object currently running.scan_wait()
Waits until the scan operation completes on the device referenced by the DaqiDevice
object, or the specified timeout elapses.-
get_info
()¶ Gets the DAQ input information object for the device referenced by the
DaqiDevice
object.Returns: A DaqiInfo object used for retrieving information about the DAQ input subsystem of the UL DAQ Device. Return type: DaqiInfo
-
set_trigger
(trigger_type, trigger_channel, level, variance, retrigger_sample_count)¶ Configures the trigger parameters for the device referenced by the
DaqiDevice
object that will be used whendaq_in_scan()
is called with theRETRIGGER
orEXTTRIGGER
ScanOption.Parameters: - trigger_type (TriggerType) – One of the
TriggerType
attributes that determines the type of the external trigger. - trigger_channel (DaqInChanDescriptor) – The trigger channel.
- level (float) – The level at or around which the trigger event should be detected; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- variance (float) – 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.
- retrigger_sample_count (int) – The number of samples per trigger to acquire with each trigger event; ignored unless the RETRIGGER ScanOption is set for the scan.
Raises: - trigger_type (TriggerType) – One of the
-
daq_in_scan
(channel_descriptors, samples_per_channel, rate, options, flags, data)¶ Allows scanning of multiple input subsystems, such as analog, digital, or counter, on the device referenced by the
DaqiDevice
object and stores the samples in an array. This method works only with devices that support synchronous input.Parameters: - channel_descriptors (list[DaqInChanDescriptor]) – A list of DAQ input channel descriptors.
- samples_per_channel (int) – the number of samples to collect from each channel in the scan.
- rate (float) – Sample input rate in samples per second.
- options (ScanOption) – One or more attributes (suitable for bit-wise operations) specifying the optional conditions that will be applied to the scan, such as continuous or external clock.
- flags (DaqInScanFlag) – One or more attributes (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned.
- data (Array[float]) – The data buffer to receive the data being read. Use
create_float_buffer
to create the buffer.
Returns: The actual input scan rate of the scan.
Return type: float
Raises:
-
get_scan_status
()¶ Gets the current status, count, and index of the synchronous input scan operation on the device referenced by the
DaqiDevice
object.Returns: A tuple containing the scan status and transfer status for the daq input background operation. Return type: ScanStatus, TransferStatus Raises: ULException
-
scan_stop
()¶ Stops the synchronous input scan operation currently running on the device referenced by the
DaqiDevice
object.Raises: ULException
-
scan_wait
(wait_type, timeout)¶ Waits until the scan operation completes on the device referenced by the
DaqiDevice
object, or the specified timeout elapses.Parameters: - wait_type (WaitType) – The wait type.
- timeout (float) – The timeout value in seconds (s); set to -1 to wait indefinitely for the scan function to end.
Raises:
-
DaqiInfo class¶
Provides information about the capabilities of the DAQ input subsystem.
Methods¶
-
class
DaqiInfo
¶ An instance of the DaqiInfo class is obtained by calling
DaqiDevice.get_info()
.Method Description get_channel_types()
Gets a list of supported DaqInChanType
attributes for the device referenced by theDaqiInfo
object.get_min_scan_rate()
Gets the minimum scan rate for the device referenced by the DaqiInfo
object in samples per second.get_max_scan_rate()
Gets the maximum scan rate for the device referenced by the DaqiInfo
object in samples per second.get_max_throughput()
Gets the maximum throughput for the device referenced by the DaqiInfo
object in samples per second.get_fifo_size()
Gets the FIFO size in bytes for the device referenced by the DaqiInfo
object.get_scan_options()
Gets a list of scan options supported by the device referenced by the DaqiInfo
object.get_trigger_types()
Gets a list of trigger types supported by the device referenced by the DaqiInfo
object.-
get_channel_types
()¶ Gets a list of supported
DaqInChanType
channel types for the device referenced by theDaqiInfo
object.Returns: A list of supported DaqInChanType
attributes (suitable for bit-wise operations) specifying compatible channel types for the device.Return type: list[DaqInChanType] Raises: ULException
-
get_min_scan_rate
()¶ Gets the minimum scan rate for the device referenced by the
DaqiInfo
object in samples per second.Returns: The minimum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_scan_rate
()¶ Gets the maximum scan rate for the device referenced by the
DaqiInfo
object in samples per second.Returns: The maximum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_throughput
()¶ Gets the maximum throughput for the device referenced by the
DaqiInfo
object in samples per second.Returns: The maximum throughput in samples per second. Return type: float Raises: ULException
-
get_fifo_size
()¶ Gets the FIFO size in bytes for the device referenced by the
DaqiInfo
object.Returns: The FIFO size in bytes. Return type: int Raises: ULException
-
get_scan_options
()¶ Gets a list of supported scan options for the device referenced by the
DaqiInfo
object.Returns: A list of attributes (suitable for bit-wise operations) specifying supported ScanOption values. Return type: list[ScanOption] Raises: ULException
-
get_trigger_types
()¶ Gets a list of supported trigger types for the device referenced by the
DaqiInfo
object.Returns: A list of TriggerType
attributes (suitable for bit-wise operations) specifying supported trigger type values.Return type: list[TriggerType] Raises: ULException
-
Daq Output Subsystem¶
Provides classes to manage the DAQ output subsystem on a device:
DaqoDevice class¶
DAQ output subsystem of the UL DAQ Device.
Methods¶
-
class
DaqoDevice
¶ An instance of the DaqoDevice class is obtained by calling
DaqDevice.get_daqo_device()
.Method Description get_info()
Gets the DAQ output information object for the device referenced by the DaqoDevice
object.set_trigger()
Configures the trigger parameters for the device referenced by the DaqoDevice
object that will be used whendaq_out_scan()
is called withRETRIGGER
orEXTTRIGGER
.daq_out_scan()
Outputs values synchronously to multiple output subsystems, such as analog and digital subsystems, on the device referenced by the DaqoDevice
object.get_scan_status()
Gets the status, count, and index of the synchronous output scan operation on the device referenced by the DaqoDevice
object.scan_stop()
Stops the synchronous output scan operation on the device referenced by the DaqoDevice
object currently running.-
get_info
()¶ Gets the DAQ output information object for the device referenced by the
DaqoDevice
object.Returns: A DaqoInfo object used for retrieving information about the DAQ output subsystem of the UL DAQ Device. Return type: DaqoInfo
-
daq_out_scan
(channel_descriptors, samples_per_channel, rate, options, flags, data)¶ Outputs values synchronously to multiple output subsystems, such as analog and digital subsystems, on the device referenced by the
DaqoDevice
object. This This method only works with devices that support synchronous output.Parameters: - channel_descriptors (list[DaqOutChanDescriptor]) – A list of DaqOutChanDescriptor objects.
- samples_per_channel (int) – The number of samples per channel to output.
- rate (float) – The sample rate in scans per second.
- options (ScanOption) – One or more attributes (suitable for bit-wise operations) specifying the optional conditions that will be applied to the scan, such as continuous or external clock.
- flags (DaqOutScanFlag) – One or more attributes (suitable for bit-wise operations) specifying the conditioning applied to the data.
- data (Array[float]) – The data buffer to be written. Use
create_float_buffer
to create the buffer.
Returns: The actual output scan rate.
Return type: float
Raises:
-
get_scan_status
()¶ Gets the current status, count, and index of the synchronous output scan operation on the device referenced by the
DaqoDevice
object.Returns: A tuple containing the scan status and transfer status for the daq input background operation. Return type: ScanStatus, TransferStatus Raises: ULException
-
scan_stop
()¶ Stops the synchronous output scan operation currently running on the device referenced by the
DaqoDevice
object.Raises: ULException
-
scan_wait
(wait_type, timeout)¶ Waits until the scan operation completes on the device referenced by the
DaqoDevice
object, or the specified timeout elapses.Parameters: - wait_type (WaitType) – The wait type.
- timeout (float) – The timeout value in seconds (s); set to -1 to wait indefinitely for the scan function to end.
Raises:
-
set_trigger
(trigger_type, trigger_channel, level, variance, retrigger_sample_count)¶ Configures the trigger parameters for the device referenced by the
DaqoDevice
object that will be used whendaq_out_scan()
is called with theRETRIGGER
orEXTTRIGGER
ScanOption.Parameters: - trigger_type (TriggerType) – One of the
TriggerType
attributes that determines the type of the external trigger. - trigger_channel (DaqOutChanDescriptor) – The trigger channel.
- level (float) – The level at or around which the trigger event should be detected; ignored if trig_type is set to POS_EDGE, NEG_EDGE, HIGH, LOW, GATE_HIGH, GATE_LOW, RISING, or FALLING.
- variance (float) – 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.
- retrigger_sample_count (int) – The number of samples per trigger to acquire with each trigger event; ignored unless the RETRIGGER ScanOption is set for the scan.
Raises: - trigger_type (TriggerType) – One of the
-
DaqoInfo class¶
Provides information about the capabilities of the DAQ output subsystem.
Methods¶
-
class
DaqoInfo
¶ An instance of the DaqoInfo class is obtained by calling
DaqoDevice.get_info()
.Method Description get_channel_types()
Gets a list of supported DaqOutChanType
attributes for the device referenced by theDaqoInfo
object.get_min_scan_rate()
Gets the minimum scan rate for the device referenced by the DaqoInfo
object in samples per second.get_max_scan_rate()
Gets the maximum scan rate for the device referenced by the DaqoInfo
object in samples per second.get_max_throughput()
Gets the maximum throughput for the device referenced by the DaqoInfo
object in samples per second.get_fifo_size()
Gets FIFO for the DAQ size in bytes for the device referenced by the DaqoInfo
object .get_scan_options()
Gets a list of scan options supported by the device referenced by the DaqoInfo
object.get_trigger_types()
Gets a list of trigger types supported by the device referenced by the DaqoInfo
object.-
get_channel_types
()¶ Gets a list of supported
DaqOutChanType
channel types for the device referenced by theDaqoInfo
object.Returns: A list of supported DaqOutChanType
attributes (suitable for bitwise operations) specifying compatible channel types for the for the device referenced by theDaqoInfo
object.Return type: list[DaqOutChanType] Raises: ULException
-
get_min_scan_rate
()¶ Gets the minimum scan rate for the device referenced by the
DaqoInfo
object in samples per second.Returns: The minimum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_scan_rate
()¶ Gets the maximum scan rate for the device referenced by the
DaqoInfo
object in samples per second.Returns: The maximum scan rate in samples per second. Return type: float Raises: ULException
-
get_max_throughput
()¶ Gets the maximum throughput for the device referenced by the
DaqoInfo
object in samples per second.Returns: The maximum throughput. Return type: float Raises: ULException
-
get_fifo_size
()¶ Gets the FIFO size in bytes for the device referenced by the
DaqoInfo
object.Returns: The FIFO size in bytes. Return type: int Raises: ULException
-
get_scan_options
()¶ Gets a list of supported scan options for the device referenced by the
DaqoInfo
object.Returns: A list of supported ScanOption
attributes (suitable for bit-wise operations) specifying supported scan option values.Return type: list[ScanOption] Raises: ULException
-
get_trigger_types
()¶ Gets a list of supported trigger types for the device referenced by the
DaqoInfo
object.Returns: A list of TriggerType
attributes (suitable for bit-wise operations) specifying supported trigger type values.Return type: list[TriggerType] Raises: ULException
-
Global Methods¶
Buffer Management¶
Provides methods to allocate buffers for data storage:
Method Description create_float_buffer()
Creates a buffer for double precision floating point sample values. create_int_buffer()
Creates a buffer for 64-bit unsigned integer sample values.
-
create_float_buffer
(number_of_channels, samples_per_channel)¶ Create a buffer for double precision floating point sample values.
Parameters: - number_of_channels (int) – Number of channels in the scan.
- samples_per_channel (int) – Number samples per channel to be stored in the buffer.
Returns: An array of size number_of_channels * samples_per_channel
Return type: Array[float]
-
create_int_buffer
(number_of_channels, samples_per_channel)¶ Create a buffer for 64-bit unsigned integer sample values.
Parameters: - number_of_channels (int) – Number of channels in the scan.
- samples_per_channel (int) – Number samples per channel to be stored in the buffer.
Returns: An array of size number_of_channels * samples_per_channel.
Return type: Array[int]
Events¶
The Python API provides event handling capability for each DaqEventType
condition.
Events are enabled and disabled using the DaqDevice.enable_event()
and
DaqDevice.disable_event()
methods. Valid callback functions for events have a single
argument of type EventCallbackArgs
, which is a namedtuple containing the following three elements:
- event_type:
- The
DaqEventType
condition that triggered the event.- event_data:
- The total samples acquired for an
ON_DATA_AVAILABLE
event, theULError
code for anON_INPUT_SCAN_ERROR
or anON_OUTPUT_SCAN_ERROR
event, otherwise None.- user_data:
- The object passed as the
user_data
parameter for theDaqDevice.enable_event()
method.
Usage¶
The following can be used as a prototype for an event callback function.
def event_callback_function(event_callback_args: EventCallbackArgs) -> None:
event_type = event_callback_args.event_type
event_data = event_callback_args.event_data
user_data = event_callback_args.user_data
# Insert user specific code here
return
Constants¶
AiChanQueueLimitation
AiChanType
AInFlag
AiInputMode
AInScanFlag
AiQueueType
AOutFlag
AOutScanFlag
CConfigScanFlag
CInScanFlag
CounterDebounceMode
CounterDebounceTime
CounterEdgeDetection
CounterMeasurementMode
CounterMeasurementType
CounterRegisterType
CounterTickSize
DaqEventType
DaqInChanType
DaqInScanFlag
DaqOutChanType
DaqOutScanFlag
DevVersionType
DigitalDirection
DigitalPortIoType
DigitalPortType
DInScanFlag
DOutScanFlag
InterfaceType
MemAccessType
MemRegion
PulseOutOption
Range
ScanOption
ScanStatus
TempUnit
TcType
TimerType
TmrIdleState
TmrStatus
TriggerType
ULError
WaitType
-
class
AiChanQueueLimitation
¶ Contains attributes suitable for bit-wise operations indicating device queue limitations. Used with
get_chan_queue_limitations
. See alsoget_queue_types
andget_max_queue_length
to determine queue capabilities-
UNIQUE_CHAN
= 1¶ A particular channel number cannot appear more than once in the queue.
-
ASCENDING_CHAN
= 2¶ Channel numbers must be listed in ascending order within the queue.
-
CONSECUTIVE_CHAN
= 4¶ Channel numbers must be listed in consecutive order within the queue.
-
-
class
AiInputMode
¶ Contains attributes indicating A/D channel input modes. Used with most analog input methods and with many of the
AiDevice.get_info methods
.-
DIFFERENTIAL
= 1¶ Differential
-
SINGLE_ENDED
= 2¶ Single-ended
-
PSEUDO_DIFFERENTIAL
= 3¶ Pseudo-differential
-
-
class
AInFlag
¶ Contains attributes indicating conditioning to apply to analog input data before it’s returned. Use as the flags argument value for
a_in()
.-
DEFAULT
= 0¶ Data is returned with scaling and calibration factors applied.
-
NOSCALEDATA
= 1¶ Data is returned in native format, without scaling applied.
-
NOCALIBRATEDATA
= 2¶ Data is returned without calibration factors applied.
-
-
class
AiQueueType
¶ Contains attributes describing queue types (the
AiQueueElement
attributes that are allowed to change within a list of AiQueueElement). Many devices only support a subset ofAiQueueType
.-
CHAN
= 1¶ The AI subsystem supports a channel queue.
-
GAIN
= 2¶ The AI subsystem supports a gain queue.
-
MODE
= 4¶ The AI subsystem supports a mode queue.
-
-
class
AiChanType
¶ Contains attributes suitable for bit-wise operations describing channel types. Returned by
get_chan_types
.-
VOLTAGE
= 1¶ Voltage
-
TC
= 2¶ Thermocouple
-
RTD
= 4¶ Resistance Temperature Detector (RTD)
-
THERMISTOR
= 8¶ Thermistor
-
SEMICONDUCTOR
= 16¶ Semiconductor
-
DISABLED
= 1073741824¶ Disabled
-
-
class
AInFlag
Contains attributes indicating conditioning to apply to analog input data before it’s returned. Use as the flags argument value for
a_in()
.-
DEFAULT
= 0 Data is returned with scaling and calibration factors applied.
-
NOSCALEDATA
= 1 Data is returned in native format, without scaling applied.
-
NOCALIBRATEDATA
= 2 Data is returned without calibration factors applied.
-
-
class
AInScanFlag
¶ Contains attributes indicating conditioning to apply to analog input data before it’s returned. Use as the flags argument value for
a_in_scan()
.-
DEFAULT
= 0¶ User data should be in scaled format (usually volts). The data is then written to the device after converting to native device format and calibration factors (if any) applied.
-
NOSCALEDATA
= 1¶ Data is returned in native format, without scaling applied.
-
NOCALIBRATEDATA
= 2¶ Data is returned without calibration factors applied.
-
-
class
AiQueueType
Contains attributes describing queue types (the
AiQueueElement
attributes that are allowed to change within a list of AiQueueElement). Many devices only support a subset ofAiQueueType
.-
CHAN
= 1 The AI subsystem supports a channel queue.
-
GAIN
= 2 The AI subsystem supports a gain queue.
-
MODE
= 4 The AI subsystem supports a mode queue.
-
-
class
AiChanQueueLimitation
Contains attributes suitable for bit-wise operations indicating device queue limitations. Used with
get_chan_queue_limitations
. See alsoget_queue_types
andget_max_queue_length
to determine queue capabilities-
UNIQUE_CHAN
= 1 A particular channel number cannot appear more than once in the queue.
-
ASCENDING_CHAN
= 2 Channel numbers must be listed in ascending order within the queue.
-
CONSECUTIVE_CHAN
= 4 Channel numbers must be listed in consecutive order within the queue.
-
-
class
AOutFlag
¶ Contains attributes indicating conditioning to apply to analog output data before it is written to the D/A. Use as the flags argument value for
a_out()
.-
DEFAULT
= 0¶ User data should be in scaled format (usually volts). The data is then written to the device after converting to native device format and calibration factors (if any) applied.
-
NOSCALEDATA
= 1¶ User data should be in native device format (usually integer in the range 0 to 2resolution- 1). The data is written to the device without conversion.
-
NOCALIBRATEDATA
= 2¶ Calibration factors (if any) are not applied to the data before writing.
-
-
class
AOutScanFlag
¶ Use as the flags argument value for
a_out_scan()
to set the properties of data returned.-
DEFAULT
= 0¶ User data should be in scaled format (usually volts). The data is then written to the device after converting to native device format and calibration factors (if any) applied.
-
NOSCALEDATA
= 1¶ User data should be in native device format (usually integer in the range 0 to 2resolution- 1). The data is written to the device without conversion.
-
NOCALIBRATEDATA
= 2¶ Calibration factors (if any) are not applied to the data before writing.
-
-
class
CConfigScanFlag
¶ Use as the flags argument value for
c_in_scan()
to set the properties of data returned.-
DEFAULT
= 0¶ Placeholder value; standard functionality.
-
-
class
CInScanFlag
¶ Use as the flags argument value for c_in_scan() to set the properties of data returned.
-
DEFAULT
= 0¶ Default counter behavior.
-
CTR16_BIT
= 1¶ Sets up the counter as a 16-bit counter channel.
-
CTR32_BIT
= 2¶ Sets up the counter as a 32-bit counter channel.
-
CTR64_BIT
= 4¶ Sets up the counter as a 64-bit counter channel.
-
NOCLEAR
= 8¶ Does not clear the counter to 0 at the start of each scan.
-
-
class
CounterDebounceMode
¶ Use as the debounce_mode argument for
c_config_scan()
to set the glitch rejection properties of a counter.-
NONE
= 0¶ Disables the debounce feature.
-
TRIGGER_AFTER_STABLE
= 1¶ The counter is incremented only after the counter input is stable for a period of a length defined by CounterDebounceTime.
-
TRIGGER_BEFORE_STABLE
= 2¶ The counter is incremented on the first edge at the counter input, then waits for a stable period of a length defined by CounterDebounceTime before counting the next edge.
-
-
class
CounterDebounceTime
¶ Use as the value for the debounce_time argument for
c_config_scan()
whenCounterDebounceMode
is not NONE.-
DEBOUNCE_0ns
= 0¶ Disables the debounce feature. Valid only when CounterDebounceMode is set to None.
-
DEBOUNCE_500ns
= 1¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 500 ns.
-
DEBOUNCE_1500ns
= 2¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 1500 ns.
-
DEBOUNCE_3500ns
= 3¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 3500 ns.
-
DEBOUNCE_7500ns
= 4¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 7500 ns.
-
DEBOUNCE_15500ns
= 5¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 15500 ns.
-
DEBOUNCE_63500ns
= 7¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 63500 ns.
-
DEBOUNCE_127500ns
= 8¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 127500 ns.
-
DEBOUNCE_100us
= 9¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 100 us.
-
DEBOUNCE_300us
= 10¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 300 us.
-
DEBOUNCE_700us
= 11¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 700 us.
-
DEBOUNCE_1500us
= 12¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 1500 us.
-
DEBOUNCE_3100us
= 13¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 3100 us.
-
DEBOUNCE_6300us
= 14¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 6300 us.
-
DEBOUNCE_12700us
= 15¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 12700 us.
-
DEBOUNCE_25500us
= 16¶ Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 25500 us.
-
-
class
CounterEdgeDetection
¶ Use as the value for the edge_detection argument for
c_config_scan()
.-
RISING_EDGE
= 1¶ Rising edge
-
FALLING_EDGE
= 2¶ Falling edge
-
-
class
CounterMeasurementMode
¶ Contains attributes suitable for bit-wise operations indicating counter operation modes. Compatible values can be OR’d together. Use as the value for the measurement_mode argument for
c_config_scan()
. This value should be set consistent with the measurement_type argument value.-
DEFAULT
= 0¶ Configures the counter for default counting modes for the COUNT measurement type.
-
CLEAR_ON_READ
= 1¶ Configures the counter to clear after every read for the COUNT measurement type.
-
COUNT_DOWN
= 2¶ Configures the counter to count down for the COUNT measurement type.
-
GATE_CONTROLS_DIR
= 4¶ Configures the counter to increment when the gate pin is high, and decrement when the gate pin is low for the COUNT measurement type.
-
GATE_CLEARS_CTR
= 8¶ Configures the counter to clear when the gate input is high for the COUNT measurement type.
-
GATE_TRIG_SRC
= 16¶ Configures the counter to start counting when the gate input goes active for the COUNT measurement type. By default, active is on the rising edge. The gate is re-armed when the counter is loaded and when c_config_scan() is called.
-
OUTPUT_ON
= 32¶ Configures the counter output to go high when the counter reaches the value of output register 0 for the COUNT measurement type, and go low when the counter reaches the value of output register 1. Use c_load() to set or read the value of the output registers.
-
OUTPUT_INITIAL_STATE_HIGH
= 64¶ Configures the initial state of the counter output pin high for the COUNT measurement type.
-
NO_RECYCLE
= 128¶ Configures the counter to restart when a clear or load operation is performed, or the count direction changes for the COUNT measurement type.
-
RANGE_LIMIT_ON
= 256¶ When counting up, configures the counter to roll over to the min limit when the max limit is reached for the COUNT measurement type. When counting down, configures the counter to roll over to max limit when the min limit is reached. When counting up with NO_RECYCLE enabled, the counter freezes whenever the count reaches the value that was loaded into the max limit register. When counting down with NO_RECYCLE enabled, the counter freezes whenever the count reaches the value that was loaded into the min limit register. Counting resumes if the counter is reset or the direction changes.
-
GATING_ON
= 512¶ Enables the counter when the mapped channel or gate pin is high for the COUNT measurement type.
-
INVERT_GATE
= 1024¶ Inverts the polarity of the gate input for the COUNT measurement type.
-
PERIOD_X1
= None¶ Latches the counter measurement each time 1 complete period is observed for the PERIOD measurement type.
-
PERIOD_X10
= 2048¶ Latches the counter measurement each time 10 complete periods are observed for the PERIOD measurement type.
-
PERIOD_X100
= 4096¶ Latches the counter measurement each time 100 complete periods are observed for the PERIOD measurement type.
-
PERIOD_X1000
= 8192¶ Latches the counter measurement each time 1000 complete periods are observed for the PERIOD measurement type.
-
PERIOD_GATING_ON
= 16384¶ Inverts the polarity of the gate input for the PERIOD measurement type.
-
PERIOD_INVERT_GATE
= 32768¶ Inverts the polarity of the gate input for the PERIOD measurement type.
-
PULSE_WIDTH_INVERT_GATE
= 131072¶ Inverts the polarity of the gate input for the PULSE_WIDTH measurement type.
-
TIMING_DEFAULT
= None¶ Configures the counter for default timing modes for the TIMING measurement type.
-
TIMING_MODE_INVERT_GATE
= 262144¶ Inverts the polarity of the gate input for the TIMING measurement type.
-
ENCODER_X1
= None¶ Sets the encoder measurement mode to X1 for the ENCODER measurement type.
-
ENCODER_X2
= 524288¶ Sets the encoder measurement mode to X2 for the ENCODER measurement type.
-
ENCODER_X4
= 1048576¶ Sets the encoder measurement mode to X4 for the ENCODER measurement type.
-
ENCODER_LATCH_ON_Z
= 2097152¶ Configures the encoder Z mapped signal to latch the counter outputs for the ENCODER measurement type.
-
ENCODER_CLEAR_ON_Z
= 4194304¶ Clears the counter when the index (Z input) goes active for the ENCODER measurement type.
-
ENCODER_NO_RECYCLE
= 8388608¶ Disables the counter when a count overflow or underflow occurs for the ENCODER measurement type; re-enables when a clear or load operation is performed on the counter.
-
ENCODER_RANGE_LIMIT_ON
= 16777216¶ Enables upper and lower limits for the ENCODER measurement type.
-
ENCODER_Z_ACTIVE_EDGE
= 33554432¶ Sets the encoder Z signal as the active edge for the ENCODER measurement type.
-
-
class
CounterMeasurementType
¶ Contains attributes suitable for bit-wise operations indicating counter operation modes. Use individually as the value for the measurement_type argument for
c_config_scan()
. Useget_info
withget_measurement_types()
to get a list of bit-wise operable attributes to check device capabilities.-
COUNT
= 1¶ Counter measurement. The counter increments on the active edge of the input.
-
PERIOD
= 2¶ Period measurement. Measures the number of ticks between active edges of the input, with the granularity of measurement set by the tick_size argument of
c_config_scan()
.
-
PULSE_WIDTH
= 4¶ Pulse width measurement. Measures the number of ticks between the active edge of the counter input and the following edge of the counter input, with the granularity of measurement set by the tick_size argument of
c_config_scan()
.
-
TIMING
= 8¶ Timing measurement. Measures the number of ticks between the between the active edge of the counter input and the active edge of the gate input, with the granularity of measurement set by the tick_size argument of
c_config_scan()
.
-
ENCODER
= 16¶ Encoder measurement. Configures the counter as an encoder, if supported.
-
-
class
CounterRegisterType
¶ Contains attributes suitable for bit-wise operations indicating counter register types available. Used individually for the
c_load
register_type argument, and as the value returned by to get a list of bit-wise operable attributes usingget_register_types()
to check device capabilities.-
COUNT
= 1¶ Counter register
-
LOAD
= 2¶ Load register
-
MIN_LIMIT
= 4¶ Max Limit register
-
MAX_LIMIT
= 8¶ Min Limit register
-
OUTPUT_VAL0
= 16¶ The register that sets the count value at which the counter output will change state from its original state.
-
OUTPUT_VAL1
= 32¶ The register that sets the count value at which the counter output will reset to its original state.
-
-
class
CounterTickSize
¶ Use as the value for the tick_size argument for
c_config_scan
whenCounterMeasurementType
is PERIOD, PULSE_WIDTH, or TIMING. Refer to the device hardware manual to determine which sizes are compatible with your device.-
TICK_20PT83ns
= 1¶ Sets the tick size to 20.83 ns
-
TICK_208PT3ns
= 2¶ Sets the tick size to 208.3 ns
-
TICK_2083PT3ns
= 3¶ Sets the tick size to 2083.3 ns
-
TICK_20833PT3ns
= 4¶ Sets the tick size to 20833.3 ns
-
TICK_20ns
= 11¶ Sets the tick size to 20 ns
-
TICK_200ns
= 12¶ Sets the tick size to 200 ns
-
TICK_2000ns
= 13¶ Sets the tick size to 2000 ns
-
TICK_20000ns
= 14¶ Sets the tick size to 20000 ns
-
-
class
DaqInChanType
¶ Contains attributes suitable for bit-wise operations indicating channel types for the
daq_in_scan()
method. Used with synchronous input scanning operations as a property in theDaqInChanDescriptor
object, and as the list of bit-wise operable attributes usingDaqiDevice.get_info()
.-
ANALOG_DIFF
= 1¶ Analog input channel, differential mode
-
ANALOG_SE
= 2¶ Analog input channel, single-ended mode
-
DIGITAL
= 4¶ Digital channel
-
CTR16
= 8¶ 16-bit counter channel
-
CTR32
= 16¶ 32-bit counter channel
-
CTR48
= 32¶ 48-bit counter channel
-
-
class
DaqInScanFlag
¶ Contains attributes indicating conditioning to apply to analog input data before it’s returned. Use as the flags argument value for
daq_in_scan
.-
DEFAULT
= 0¶ Data is returned with scaling and calibration factors applied to analog channel data.
-
NOSCALEDATA
= 1¶ Data for analog channels is returned in native format, without scaling applied.
-
NOCALIBRATEDATA
= 2¶ Data for analog channels is returned without calibration factors applied.
-
NOCLEAR
= 8¶ Counters are not cleared (set to 0) when a scan starts
-
-
class
DaqEventType
¶ Contains attributes suitable for bit-wise operations indicating the types of conditions that trigger an event. Used as the event_type argument value for
enable_event()
anddisable_event()
. Values can be OR’d together to enable or disable multiple events. Returned as a bit-wise operable list usingget_event_types
.-
NONE
= 0¶ No event type. Possible return value for get_info()(). Not a valid value for enable_event() and disable_event().
-
ON_DATA_AVAILABLE
= 1¶ Defines an event trigger condition that occurs when a specified number of samples are available.
-
ON_INPUT_SCAN_ERROR
= 2¶ Defines an event trigger condition that occurs when an input scan error occurs.
-
ON_END_OF_INPUT_SCAN
= 4¶ Defines an event trigger condition that occurs upon completion of an input scan operation such as a_in_scan().
-
ON_OUTPUT_SCAN_ERROR
= 8¶ Defines an event trigger condition that occurs when an output scan error occurs.
-
ON_END_OF_OUTPUT_SCAN
= 16¶ Defines an event trigger condition that occurs upon completion of an input scan operation such as a_out_scan().
-
-
class
DaqOutChanType
¶ Contains attributes suitable for bit-wise operations indicating channel types for the
daq_out_scan()
method. Used with synchronous output scanning operations as a property in theDaqOutChanDescriptor
object, and as the list of bit-wise operable attributes usingDaqoDevice.get_info()
-
ANALOG
= 1¶ Analog output channel.
-
DIGITAL
= 2¶ Digital output channel.
-
-
class
DaqOutScanFlag
¶ Contains attributes indicating conditioning to apply to analog output data before it’s written to the D/A. Use as the flags argument value for
daq_out_scan
.-
DEFAULT
= 0¶ The data buffer contains scaled data for analog channels, and calibration factors are applied to analog outputs.
-
NOSCALEDATA
= 1¶ Data for analog channels is in native format, without scaling applied.
-
NOCALIBRATEDATA
= 2¶ Data for analog channels is output without calibration factors applied.
-
-
class
DigitalDirection
¶ Used with most digital IO methods to specify the direction of programmable ports or bits and with
get_port_info()
as the list returned indicating the current direction that each bit in the specified port type is configured for.-
INPUT
= 1¶ Input
-
OUTPUT
= 2¶ Output
-
-
class
DigitalPortIoType
¶ Contains attributes indicating the fixed direction or direction programmability of the specified digital port. Returned by
get_port_info()
.-
IN
= 1¶ Fixed input port
-
OUT
= 2¶ Fixed output port
-
IO
= 3¶ Bidirectional (input or output) port
-
BITIO
= 4¶ Bitwise configurable
-
NONCONFIG
= 5¶ Bidirectional (input or output) port; configuration is not required.
-
-
class
DigitalPortType
¶ Used with most digital IO methods as the port_type argument to specify the port on the device and as a list returned from
get_port_types()
indicating the ports available on the device.-
AUXPORT
= 1¶ AuxPort
-
AUXPORT0
= None¶ AuxPort0
-
AUXPORT1
= 2¶ AuxPort1
-
AUXPORT2
= 3¶ AuxPort2
-
FIRSTPORTA
= 10¶ FirstPortA
-
FIRSTPORTB
= 11¶ FirstPortB
-
FIRSTPORTC
= 12¶ FirstPortC
-
FIRSTPORTCL
= None¶ FirstPortC Low
-
FIRSTPORTCH
= 13¶ FirstPortC High
-
SECONDPORTA
= 14¶ SecondPortA
-
SECONDPORTB
= 15¶ SecondPortB
-
SECONDPORTCL
= 16¶ SecondPortC Low
-
SECONDPORTCH
= 17¶ SecondPortC High
-
THIRDPORTA
= 18¶ ThirdPortA
-
THIRDPORTB
= 19¶ ThirdPortB
-
THIRDPORTCL
= 20¶ ThirdPortC Low
-
THIRDPORTCH
= 21¶ ThirdPortC High
-
FOURTHPORTA
= 22¶ FourthPortA
-
FOURTHPORTB
= 23¶ FourthPortB
-
FOURTHPORTCL
= 24¶ FourthPortC Low
-
FOURTHPORTCH
= 25¶ FourthPortC High
-
FIFTHPORTA
= 26¶ FifthPortA
-
FIFTHPORTB
= 27¶ FifthPortB
-
FIFTHPORTCL
= 28¶ FifthPortC Low
-
FIFTHPORTCH
= 29¶ FifthPortC High
-
SIXTHPORTA
= 30¶ SixthPortA
-
SIXTHPORTB
= 31¶ SixthPortB
-
SIXTHPORTCL
= 32¶ SixthPortC Low
-
SIXTHPORTCH
= 33¶ SixthPortC High
-
SEVENTHPORTA
= 34¶ SeventhPortA
-
SEVENTHPORTB
= 35¶ SeventhPortB
-
SEVENTHPORTCL
= 36¶ SeventhPortC Low
-
SEVENTHPORTCH
= 37¶ SeventhPortC High
-
EIGHTHPORTA
= 38¶ EighthPortA
-
EIGHTHPORTB
= 39¶ EighthPortB
-
EIGHTHPORTCL
= 40¶ EighthPortC Low
-
EIGHTHPORTCH
= 41¶ EighthPortC High
-
-
class
DInScanFlag
¶ The flags argument value for
daq_in_scan()
.
-
class
DOutScanFlag
¶ The flags argument value for
daq_out_scan()
.
-
class
DevVersionType
¶ Use as the version_type argument for
get_version()
for the specified device.-
FW_MAIN
= 0¶ Firmware version installed on the current device.
-
FPGA
= 1¶ FPGA version installed on the current device.
-
RADIO
= 2¶ Radio firmware version installed on the current device.
-
-
class
InterfaceType
¶ Contains attributes suitable for bit-wise operations indicating the physical connection interface used to communicate with a DAQ device. Values can be OR’d together to specify multiple interfaces.
-
USB
= 1¶ USB interface
-
BLUETOOTH
= 2¶ Bluetooth interface
-
ETHERNET
= 4¶ Ethernet interface
-
ANY
= 7¶ Any interface
-
-
class
MemAccessType
¶ Contains attributes suitable for bit-wise operations indicating the level of user access to various memory locations on the device. Returned by
get_info
as the field types attribute list returned in theMemDescriptor
object.-
READ
= 1¶ Indicates read access for the location specified by MemRegion()
-
WRITE
= 2¶ Indicates write access for the location specified by MemRegion()
-
-
class
MemRegion
¶ Contains attributes suitable for bit-wise operations indicating the type of memory region on a device. Returned as a list by
get_info
. Use withget_mem_descriptor
as the mem_region argument to specify the memory location on the specified device.-
CAL
= 1¶ Specifies the calibration data region information returned to the MemDescriptor struct.
-
USER
= 2¶ Specifies the user data region information returned to the MemDescriptor struct.
-
SETTINGS
= 4¶ Specifies the data settings region information returned to the MemDescriptor struct.
-
-
class
PulseOutOption
¶ Used with
pulse_out_start
as the options argument value to set advanced options for the specified device.-
DEFAULT
= 0¶ No PulseOutOption values are applied.
-
EXTTRIGGER
= 32¶ The output operation is held off until the specified trigger condition is met. Trigger conditions may be modified using
set_trigger
.
-
RETRIGGER
= 64¶ The output operation is held off until the specified trigger condition is met. The trigger is then re-armed and output is held off until the next trigger. This mode is intended for finite timer operation.
-
-
class
Range
¶ Used with many analog input and output functions, as well as a return value for get_ranges().
-
BIP60VOLTS
= 1¶ -60 to +60 Volts
-
BIP30VOLTS
= 2¶ -30 to +30 Volts
-
BIP15VOLTS
= 3¶ -15 to +15 Volts
-
BIP20VOLTS
= 4¶ -20 to +20 Volts
-
BIP10VOLTS
= 5¶ -10 to +10 Volts
-
BIP5VOLTS
= 6¶ -5 to +5 Volts
-
BIP4VOLTS
= 7¶ -4 to +4 Volts
-
BIP2PT5VOLTS
= 8¶ -2.5 to +2.5 Volts
-
BIP2VOLTS
= 9¶ -2.0 to +2.0 Volts
-
BIP1PT25VOLTS
= 10¶ -1.25 to +1.25 Volts
-
BIP1VOLTS
= 11¶ -1 to +1 Volts
-
BIPPT625VOLTS
= 12¶ -.625 to +.625 Volts
-
BIPPT5VOLTS
= 13¶ -.5 to +.5 Volts
-
BIPPT25VOLTS
= 14¶ -0.25 to +0.25 Volts
-
BIPPT125VOLTS
= 15¶ -0.125 to +0.125 Volts
-
BIPPT2VOLTS
= 16¶ -0.2 to +0.2 Volts
-
BIPPT1VOLTS
= 17¶ -.1 to +.1 Volts
-
BIPPT078VOLTS
= 18¶ -0.078 to +0.078 Volts
-
BIPPT05VOLTS
= 19¶ -.05 to +.05 Volts
-
BIPPT01VOLTS
= 20¶ -.01 to +.01 Volts
-
BIPPT005VOLTS
= 21¶ -.005 to +.005 Volts
-
UNI60VOLTS
= 1001¶ 0 to +60 Volts
-
UNI30VOLTS
= 1002¶ 0 to +30 Volts
-
UNI15VOLTS
= 1003¶ 0 to +15 Volts
-
UNI20VOLTS
= 1004¶ 0 to +20 Volts
-
UNI10VOLTS
= 1005¶ 0 to +10 Volts
-
UNI5VOLTS
= 1006¶ 0 to +5 Volts
-
UNI4VOLTS
= 1007¶ 0 to +4 Volts
-
UNI2PT5VOLTS
= 1008¶ 0 to +2.5 Volts
-
UNI2VOLTS
= 1009¶ 0 to +2.0 Volts
-
UNI1PT25VOLTS
= 1010¶ 0 to +1.25 Volts
-
UNI1VOLTS
= 1011¶ 0 to +1 Volts
-
UNIPT625VOLTS
= 1012¶ 0 to +.625 Volts
-
UNIPT5VOLTS
= 1013¶ 0 to +.5 Volts
-
UNIPT25VOLTS
= 1014¶ 0 to +0.25 Volts
-
UNIPT125VOLTS
= 1015¶ 0 to +0.125 Volts
-
UNIPT2VOLTS
= 1016¶ 0 to +0.2 Volts
-
UNIPT1VOLTS
= 1017¶ 0 to +.1 Volts
-
UNIPT078VOLTS
= 1018¶ 0 to +0.078 Volts
-
UNIPT05VOLTS
= 1019¶ 0 to +.05 Volts
-
UNIPT01VOLTS
= 1020¶ 0 to +.01 Volts
-
UNIPT005VOLTS
= 1021¶ 0 to +.005 Volts
-
-
class
ScanOption
¶ Scan status. Returned as the first element of the tuple returned by the various get status methods.
-
DEFAULTIO
= 0¶ Transfers A/D data based on the board type and sampling speed.
-
SINGLEIO
= 1¶ Transfers one packet of data at a time.
-
BLOCKIO
= 2¶ Transfers A/D data in blocks.
-
BURSTIO
= 4¶ Transfers A/D data from the FIFO after the scan completes. Allows maximum rates for finite scans up to the full capacity of the FIFO. Not recommended for slow acquisition rates.
-
CONTINUOUS
= 8¶ Scans data in an endless loop. The only way to stop the operation is with scan_stop().
-
EXTCLOCK
= 16¶ Data conversions are controlled by an external clock signal.
-
EXTTRIGGER
= 32¶ Sampling begins when a trigger condition is met.
-
RETRIGGER
= 64¶ Re-arms the trigger after a trigger event is performed.
-
BURSTMODE
= 128¶ Enables burst mode sampling, minimizing the channel skew.
-
PACEROUT
= 256¶ Enables or disables the internal pacer output on a DAQ device.
-
-
class
TcType
¶ Thermocouple types. Reserved for future use.
-
J
= 1¶ Type J
-
K
= 2¶ Type K
-
T
= 3¶ Type T
-
E
= 4¶ Type E
-
R
= 5¶ Type R
-
S
= 6¶ Type S
-
B
= 7¶ Type B
-
N
= 8¶ Type N
-
-
class
TempUnit
¶ Temperature units. Reserved for future use.
-
CELSIUS
= 1¶ Celcius
-
FAHRENHEIT
= 2¶ Fahrenheit
-
KELVIN
= 3¶ Kelvin
-
-
class
TimerType
¶ Types of timer channels. Returned by
~get_timer_type
.-
STANDARD
= 1¶ Programmable frequency timer
-
ADVANCED
= 2¶ Programmable frequency timer, plus other attributes such as pulse width
-
-
class
TmrIdleState
¶ Timer idle state. Used as the idle_state argument of
pulse_out_start
.-
LOW
= 1¶ Idle low
-
HIGH
= 2¶ Idle high
-
-
class
TmrStatus
¶ Used with
get_pulse_out_status
, as the timer status returned for the specified device.-
IDLE
= 0¶ The timer is currently idle.
-
RUNNING
= 1¶ The timer is currently running.
-
-
class
TriggerType
¶ Used as an individual value with subsystem set_trigger() functions as the trig_type argument, or as a list of bit-wise operable values returned from get_info() methods.
-
NONE
= 0¶ No trigger type. Valid for subsystem get_info() functions; not a valid value for subsystem set_trigger functions.
-
POS_EDGE
= 1¶ A digital trigger. The trigger condition is met when the trigger input transitions from a logic low level to a logic high level. This is the default condition when triggering is enabled. All others require configuration using the subsystem set_trigger() functions.
-
NEG_EDGE
= 2¶ A digital trigger. The trigger condition is met when the trigger input transitions from a logic high level to a logic low level.
-
HIGH
= 4¶ A digital trigger. The trigger condition is met when the trigger input is at a logic high level.
-
LOW
= 8¶ A digital trigger. The trigger condition is met when the trigger input is at a logic low level.
-
GATE_HIGH
= 16¶ A digital gate. The operation is enabled only when the trigger input is at a logic high level.
-
GATE_LOW
= 32¶ A digital gate. The operation is enabled only when the trigger input is at a logic low level.
-
RISING
= 64¶ An analog trigger. The trigger condition is met when the trigger input transitions from below the threshold specified by (the level argument value minus the variance argument value) to above the threshold specified by the level argument value.
-
FALLING
= 128¶ An analog trigger. The trigger condition is met when the trigger input transitions from above the threshold specified by (the level argument value minus the variance argument value) to below the threshold specified by the level argument value.
-
ABOVE
= 256¶ An analog trigger. The trigger condition is met when the trigger input is above the threshold specified by the level argument value.
-
BELOW
= 512¶ An analog trigger. The trigger condition is met when the trigger input is below the threshold specified by the level argument value.
-
GATE_ABOVE
= 1024¶ An analog trigger. The trigger condition is met only when the trigger input is above the threshold specified by the level argument value.
-
GATE_BELOW
= 2048¶ An analog trigger. The trigger condition is met only when the trigger input is below the threshold specified by the level argument value.
-
PATTERN_EQ
= 16384¶ A digital pattern trigger. The trigger condition is met when the digital pattern at the trigger input is equal to the pattern specified by the level argument value ANDed with bitwise mask specified by the variance argument value of the set_trigger function for each subsystem.
-
PATTERN_NE
= 32768¶ A digital pattern trigger. The trigger condition is met when the digital pattern at the trigger input is not equal to the pattern specified by the level argument value ANDed with bitwise mask specified by the variance argument value of the set_trigger function for each subsystem.
-
PATTERN_ABOVE
= 65536¶ A digital pattern trigger. The trigger condition is met when the digital pattern at the trigger input is greater than the pattern specified by the level argument value ANDed with bitwise mask specified by the variance argument value of the set_trigger function for each subsystem. Value is determined by additive bit weights.
-
PATTERN_BELOW
= 131072¶ A digital pattern trigger. The trigger condition is met when the digital pattern at the trigger input is less than the pattern specified by the level argument value ANDed with bitwise mask specified by the variance argument value of the set_trigger function for each subsystem. Value is determined by additive bit weights.
-
-
class
ULError
¶ Error codes for Universal Library.
-
NO_ERROR
= 0¶ No error has occurred
-
UNHANDLED_EXCEPTION
= 1¶ Unhandled internal exception
-
BAD_DEV_HANDLE
= 2¶ Invalid device handle
-
BAD_DEV_TYPE
= 3¶ This function cannot be used with this device
-
USB_DEV_NO_PERMISSION
= 4¶ Insufficient permission to access this device
-
USB_INTERFACE_CLAIMED
= 5¶ USB interface is already claimed
-
DEV_NOT_FOUND
= 6¶ Device not found
-
DEV_NOT_CONNECTED
= 7¶ Device not connected or connection lost
-
DEAD_DEV
= 8¶ Device no longer responding
-
BAD_BUFFER_SIZE
= 9¶ Buffer too small for operation
-
BAD_BUFFER
= 10¶ Invalid buffer
-
BAD_MEM_TYPE
= 11¶ Invalid memory type
-
BAD_MEM_REGION
= 12¶ Invalid memory region
-
BAD_RANGE
= 13¶ Invalid range
-
BAD_AI_CHAN
= 14¶ Invalid analog input channel specified
-
BAD_INPUT_MODE
= 15¶ Invalid input mode specified
-
ALREADY_ACTIVE
= 16¶ A background process is already in progress
-
BAD_TRIG_TYPE
= 17¶ Invalid trigger type specified
-
OVERRUN
= 18¶ FIFO overrun, data was not transferred from device fast enough
-
UNDERRUN
= 19¶ FIFO underrun, data was not transferred to device fast enough
-
TIMEDOUT
= 20¶ Operation timed out
-
BAD_OPTION
= 21¶ Invalid option specified
-
BAD_RATE
= 22¶ Invalid sampling rate specified
-
BAD_BURSTIO_COUNT
= 23¶ Sample count cannot be greater than FIFO size for BURSTIO scans
-
CONFIG_NOT_SUPPORTED
= 24¶ Configuration not supported
-
BAD_CONFIG_VAL
= 25¶ Invalid configuration value
-
BAD_AI_CHAN_TYPE
= 26¶ Invalid analog input channel type specified
-
ADC_OVERRUN
= 27¶ ADC overrun occurred
-
BAD_TC_TYPE
= 28¶ Invalid thermocouple type specified
-
BAD_UNIT
= 29¶ Invalid unit specified
-
BAD_QUEUE_SIZE
= 30¶ Invalid queue size
-
BAD_CONFIG_ITEM
= 31¶ Invalid config item specified
-
BAD_INFO_ITEM
= 32¶ Invalid info item specified
-
BAD_FLAG
= 33¶ Invalid flag specified
-
BAD_SAMPLE_COUNT
= 34¶ Invalid sample count specified
-
INTERNAL
= 35¶ Internal error
-
BAD_COUPLING_MODE
= 36¶ Invalid coupling mode
-
BAD_SENSOR_SENSITIVITY
= 37¶ Invalid sensor sensitivity
-
BAD_IEPE_MODE
= 38¶ Invalid IEPE mode
-
BAD_AI_CHAN_QUEUE
= 39¶ Invalid channel queue specified
-
BAD_AI_GAIN_QUEUE
= 40¶ Invalid gain queue specified
-
BAD_AI_MODE_QUEUE
= 41¶ Invalid mode queue specified
-
FPGA_FILE_NOT_FOUND
= 42¶ FPGA file not found
-
UNABLE_TO_READ_FPGA_FILE
= 43¶ Unable to read FPGA file
-
NO_FPGA
= 44¶ FPGA not loaded
-
BAD_ARG
= 45¶ Invalid argument
-
MIN_SLOPE_VAL_REACHED
= 46¶ Minimum slope value reached
-
MAX_SLOPE_VAL_REACHED
= 47¶ Maximum slope value reached
-
MIN_OFFSET_VAL_REACHED
= 48¶ Minimum offset value reached
-
MAX_OFFSET_VAL_REACHED
= 49¶ Maximum offset value reached
-
BAD_PORT_TYPE
= 50¶ Invalid port type specified
-
WRONG_DIG_CONFIG
= 51¶ Digital I/O is configured incorrectly
-
BAD_BIT_NUM
= 52¶ Invalid bit number
-
BAD_PORT_VAL
= 53¶ Invalid port value specified
-
BAD_RETRIG_COUNT
= 54¶ Invalid re-trigger count
-
BAD_AO_CHAN
= 55¶ Invalid analog output channel specified
-
BAD_DA_VAL
= 56¶ Invalid D/A output value specified
-
BAD_TMR
= 57¶ Invalid timer specified
-
BAD_FREQUENCY
= 58¶ Invalid frequency specified
-
BAD_DUTY_CYCLE
= 59¶ Invalid duty cycle specified
-
BAD_INITIAL_DELAY
= 60¶ Invalid initial delay specified
-
BAD_CTR
= 61¶ Invalid counter specified
-
BAD_CTR_VAL
= 62¶ Invalid counter value specified
-
BAD_DAQI_CHAN_TYPE
= 63¶ Invalid DAQ input channel type specified
-
BAD_NUM_CHANS
= 64¶ Invalid number of channels specified
-
BAD_CTR_REG
= 65¶ Invalid counter register specified
-
BAD_CTR_MEASURE_TYPE
= 66¶ Invalid counter measurement type specified
-
BAD_CTR_MEASURE_MODE
= 67¶ Invalid counter measurement mode specified
-
BAD_DEBOUNCE_TIME
= 68¶ Invalid debounce time specified
-
BAD_DEBOUNCE_MODE
= 69¶ Invalid debounce mode specified
-
BAD_EDGE_DETECTION
= 70¶ Invalid edge detection mode specified
-
BAD_TICK_SIZE
= 71¶ Invalid tick size specified
-
BAD_DAQO_CHAN_TYPE
= 72¶ Invalid DAQ output channel type specified
-
NO_CONNECTION_ESTABLISHED
= 73¶ No connection established
-
BAD_EVENT_TYPE
= 74¶ Invalid event type specified
-
EVENT_ALREADY_ENABLED
= 75¶ An event handler has already been enabled for this event type
-
BAD_EVENT_SIZE
= 76¶ Invalid event count specified
-
BAD_CALLBACK_FUCNTION
= 77¶ Invalid callback function specified
-
BAD_MEM_ADDRESS
= 78¶ Invalid memory address
-
MEM_ACCESS_DENIED
= 79¶ Memory access denied
-
DEV_UNAVAILABLE
= 80¶ Device is not available at time of request
-
BAD_RETRIG_TRIG_TYPE
= 81¶ Re-trigger option is not supported for the specified trigger type
-
BAD_DESCRIPTOR
= 100001¶ Invalid descriptor
-
Types¶
-
class
DaqDeviceDescriptor
¶ A class containing properties that define a particular DAQ device.
-
product_name
¶ The generic (unqualified) product name of the device referenced by the DaqDeviceDescriptor.
-
product_id
¶ The numeric string indicating the product type referenced by the DaqDeviceDescriptor.
-
dev_interface
¶ The
InterfaceType
indicating the type of interface in use by the device referenced by the DaqDeviceDescriptor.
-
dev_string
¶ Similar to product_name, but may contain additional information.
-
unique_id
¶ A string that uniquely identifies a specific device, usually with a serial number or MAC address.
-
-
class
MemDescriptor
¶ A class containing properties that define the location and access types for a specified region of physical memory on the device.
-
address
¶ A numeric value that specifies the address of the memory.
-
size
¶ The size in bytes that specifies the size of the memory area at the specified address.
-
access_types
¶ A list of
MemAccessType
values indicating the access rights to the memory at the specified address
-
-
class
AiQueueElement
¶ A class containing properties that define an analog input queue element.
-
channel
¶ The analog input channel number for the queue element.
-
input_mode
¶ The
AiInputMode
value to use for the specified channel for the queue element.
-
-
class
DaqInChanDescriptor
¶ A class containing properties that define a DAQ input channel.
-
channel
¶ The channel number.
-
type
¶ The
DaqInChanType
for the specified channel.
-
-
class
DaqOutChanDescriptor
¶ A class containing properties that define a DAQ output channel.
-
channel
¶ The channel number.
-
type
¶ The
DaqOutChanType
for the specified channel.
-
-
class
DioPortInfo
¶ Digital input/output port information.
-
port_type
¶ The
DigitalPortType
value.
-
port_io_type
¶ The
DigitalPortIoType
value.
-
number_of_bits
¶ The number of bits in the port.
-
-
class
TransferStatus
¶ A class containing properties that define the progress of a scan operation.
-
current_scan_count
¶ The number of samples per channel transferred since the scan started.
-
current_total_count
¶ The total number of samples transferred since the scan started.
-
current_index
¶ The index into the data buffer immediately following the last sample transferred.
-