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 methods to detect DAQ devices connected to the system.

Method

Description

get_daq_device_inventory()

Gets a list of DaqDeviceDescriptor objects that can be used as the DaqDevice class parameter to create DaqDevice objects.

get_net_daq_device_descriptor()

Gets a DaqDeviceDescriptor object for an Ethernet DAQ device that can be used as the DaqDevice class parameter to create DaqDevice objects.

get_daq_device_inventory(interface_type, number_of_devices=100)

Gets a list of DaqDeviceDescriptor objects that can be used as the DaqDevice 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]) – Optional parameter indicating the maximum number 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

ULException

get_net_daq_device_descriptor(host, port, ifc_name, timeout=- 1)

Gets a DaqDeviceDescriptor object for an Ethernet DAQ device that can be used as the DaqDevice class parameter to create DaqDevice object.

Parameters
  • host (str) – The remote device host name or IP address.

  • port (int) – The remote device port number.

  • ifc_name (str or None) – The network interface name to be used for communication with the DAQ device (e.g. eth0, wlan0, etc.); Set to None to select the default network interface.

  • timeout (Optional[float]) – Optional parameter to set the timeout value in seconds for the discovery operation to complete; Set to -1 (default) to wait indefinitely.

Returns

A DaqDeviceDescriptor object for the specified remote device.

Return type

DaqDeviceDescriptor

Raises

ULException

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 using get_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 for the device referenced by the DaiDevice object.

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 on the device referenced by the DaqDevice object.

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.

reset()

Resets the DAQ device. This causes the DAQ device to disconnect from the host. Invoke DaqDevice.connect() to re-establish the connection to the 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(connection_code=0)

Establish a connection to a physical DAQ device referenced by the DaqDevice object.

Parameters

connection_code (Optional[int]) – A code required to connect to Ethernet devices if the device’s connection code has been previously set to something other than the default value of 0.

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

ULException

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

ULException

mem_write(mem_region_type, address, mem_buffer, mem_unlock_code=0)

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.

  • mem_unlock_code (int) – The memory unlock code required to write to the EEPROM for Ethernet devices. The default value is 0. See hardware documentation for more details.

Raises

ULException

release()

Removes the device referenced by the DaqDevice object from the Universal Library, and releases all resources associated with that device.

Raises

ULException

reset()

Resets the DAQ device. This causes the DAQ device to disconnect from the host. Invoke DaqDevice.connect() to re-establish the connection to the 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 the DaqDevice 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 the DaqDevice 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 by DevVersionType, and returns it as a string.

has_exp()

Determines whether the device referenced by the DaqDevice object has an expansion board attached.

set_connection_code()

Configures the connection code for the device referenced by the DaqDevice object.

get_connection_code()

Gets the connection code for the device referenced by the DaqDevice object.

get_ip_address()

Gets the IP address of the device referenced by the DaqDevice object.

get_network_interface_name()

Gets the network interface name of the device referenced by the DaqDevice object.

get_version(version_type)

Gets the version of the firmware specified on the device referenced by the DaqDevice object, specified by DevVersionType, 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

has_exp()

Determines whether the device referenced by the DaqDevice object has an expansion board attached.

Returns

True if an expansion board is attached. False if no expansion board is attached.

Return type

bool

Raises

ULException

set_connection_code(connection_code, mem_unlock_code)

Configures the connection code for the Ethernet device referenced by the DaqDevice object. The connection code becomes active after cycling power to the device or calling DaqDevice.reset(). This function only applies to Ethernet devices.

Parameters
  • connection_code (int) – The connection code.

  • mem_unlock_code (int) – The memory unlock code required to write to the EEPROM, which is where the connection code is stored. See hardware documentation for more details.

Raises

ULException

get_connection_code()

Gets the connection code for the device referenced by the DaqDevice object.

Returns

The connection code.

Return type

int

Raises

ULException

get_ip_address()

Gets the IP address of the device referenced by the DaqDevice object and returns it as a string.

Returns

The IP address.

Return type

str

Raises

ULException

get_network_interface_name()

Gets the network interface name for the device referenced by the DaqDevice object and returns it as a string.

Returns

The network interface name.

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.

get_config()

Gets the analog input configuration 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 when a_in_scan() is called with RETRIGGER or EXTTRIGGER.

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.

t_in()

Returns a temperature value read from an A/D channel on the device referenced by the AiDevice object.

t_in_list()

Returns a list of temperature values read from an A/D channel on the device referenced by the AiDevice object.

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

get_config()

Gets the analog input configuration object for the device referenced by the AiDevice object.

Returns

The object used for retrieving configuration information about the analog input subsystem of the UL DAQ Device.

Return type

AiConfig

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

ULException

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

ULException

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 when a_in_scan() is called with RETRIGGER or EXTTRIGGER.

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

ULException

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

ULException

t_in(channel, scale, flags=<TInFlag.DEFAULT: 0>)

Returns a temperature value read from an A/D channel on the device referenced by the AiDevice object.

Parameters
  • channel (int) – A/D channel number.

  • scale (TempScale) – The temperature scaling option for the temperature value to be read.

  • flags (Optional[TInFlag]) – One or more flag values (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned.

Returns

The temperature value of the A/D channel.

Return type

float

Raises

ULException

t_in_list(low_chan, high_chan, scale, flags=<TInListFlag.DEFAULT: 0>, ignore_open_connection=False)

Returns a list a temperature values read from the specified range of A/D channels on the device referenced by the AiDevice object.

Parameters
  • low_chan (int) – The low A/D channel number in the range of channels.

  • high_chan (int) – The high A/D channel number in the range of channels.

  • scale (TempScale) – The temperature scaling option for the temperature values to be read.

  • flags (Optional[TInListFlag]) – One or more flag values (suitable for bit-wise operations) specifying the conditioning applied to the data before it is returned.

  • ignore_open_connection (Optional[bool]) – If true, exceptions due to open thermocouple detection are suppressed and a data value of -9999 indicates an open connection error.

Returns

A list of temperature values for the specified range of A/D channels.

Return type

list[float]

Raises

ULException

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 specified AiChanType.

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 the ScanOption.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 the AiInfo object.

has_pacer()

Determines whether the device referenced by the AiInfo object supports paced analog input operations.

get_chan_types()

Gets a list of AiChanType attributes (suitable for bit-wise operations) indicating supported channel types for the device referenced by the AiInfo 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.

supports_iepe()

Determines whether the device referenced by the AiInfo object supports IEPE excitation for analog input operations.

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 specified AiChanType.

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 using ScanOption.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 the AiInfo 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 the AiInfo 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

supports_iepe()

Determines whether the device referenced by the AiInfo object supports IEPE excitation for analog input operations.

Returns

True if the device supports IEPE excitation. False if the device does not support IEPE excitation.

Return type

bool

Raises

ULException

AiConfig class

Provides classes to configure analog input options.

Methods

class AiConfig

An instance of the AiConfig class is obtained by calling AiDevice.get_config().

Method

Description

set_chan_type()

Configures the channel type for the specified A/D channel.

get_chan_type()

Gets the channel type for for the specified A/D channel.

set_chan_tc_type()

Configures the thermocouple type for the specified A/D channel.

get_chan_tc_type()

Gets the thermocouple type for the specified A/D channel.

set_chan_sensor_connection_type()

Configures the sensor connection type for the specified A/D channel.

get_chan_sensor_connection_type()

Gets the sensor connection type for the specified A/D channel.

get_chan_sensor_coefficients()

Gets the sensor coefficients being used for the specified A/D channel.

set_chan_iepe_mode()

Configures the IEPE mode for the specified A/D channel.

get_chan_iepe_mode()

Gets the IEPE mode for the specified A/D channel.

set_chan_coupling_mode()

Configures the coupling mode for the specified A/D channel.

get_chan_coupling_mode()

Gets the coupling mode for the specified A/D channel.

set_chan_sensor_sensitivity()

Configures the sensor sensitivity for the specified A/D channel in Volts/unit.

get_chan_sensor_sensitivity()

Gets the sensor sensitivity for the specified A/D channel in Volts/unit.

set_chan_slope()

Configures the slope multiplier for the specified A/D channel.

get_chan_slope()

Gets the slope multiplier of the specified A/D channel.

set_chan_offset()

Configures the offset value for the specified A/D channel.

get_chan_offset()

Gets the offset value of the specified A/D channel.

get_cal_date()

Gets the calibration date for the DAQ device.

set_chan_otd_mode()

Configures the open thermocouple detection mode for the specified A/D channel.

get_chan_otd_mode()

Gets the open thermocouple detection mode for the specified A/D channel.

set_temp_unit()

Configures the temperature unit for the specified A/D channel.

get_temp_unit()

Gets the temperature unit for the specified A/D channel.

set_chan_data_rate()

Configures the data rate for the specified A/D channel.

get_chan_data_rate()

Gets the data rate for the specified A/D channel.

set_otd_mode()

Configures the open thermocouple detection mode for the A/D.

get_otd_mode()

Gets the open thermocouple detection mode for the A/D.

set_calibration_table_type()

Configures the calibration table type for the A/D.

get_calibration_table_type()

Gets the calibration table type for the A/D.

set_reject_freq_type()

Configures the rejection frequency type for the A/D.

get_reject_freq_type()

Gets the rejection frequency type for the A/D.

get_expansion_cal_date()

Gets the calibration date of the expansion board connected to the DAQ device.

set_chan_type(channel, chan_type)

Configures the channel type for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number.

  • chan_type (AiChanType) – The channel type to be set.

Raises

ULException

get_chan_type(channel)

Gets the channel type for the specified A/D channel.

Parameters

channel (int) – The A/D channel number.

Returns

The channel type of the specified channel.

Return type

AiChanType

Raises

ULException

set_chan_tc_type(channel, tc_type)

Configures the thermocouple type for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose thermocouple type is being set.

  • tc_type (TcType) – The thermocouple type to set.

Raises

ULException

get_chan_tc_type(channel)

Gets the thermocouple type for the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose thermocouple type is being determined.

Returns

The thermocouple type of the specified channel.

Return type

TcType

Raises

ULException

set_chan_sensor_connection_type(channel, connection_type)

Sets the sensor connection type for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose sensor connection type is being set.

  • connection_type (SensorConnectionType) – The sensor connection type.

Raises

ULException

get_chan_sensor_connection_type(channel)

Gets the sensor connection type for the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose sensor connection type is being determined.

Returns

The sensor connection type of the specified channel.

Return type

SensorConnectionType

Raises

ULException

get_chan_sensor_coefficients(channel)

Gets the sensor coefficients being used for the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose sensor coefficients are being determined.

Returns

The sensor coefficients of the specified channel.

Return type

str

Raises

ULException

set_chan_iepe_mode(channel, mode)

Configures the IEPE mode for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose IEPE mode is being set.

  • mode (IepeMode) – The IEPE mode to set

Raises

ULException

get_chan_iepe_mode(channel)

Gets the IEPE mode for the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose IEPE mode is being determined.

Returns

The IEPE mode of the specified channel.

Return type

IepeMode

Raises

ULException

set_chan_coupling_mode(channel, mode)

Configures the coupling mode for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose coupling mode is being set.

  • mode (CouplingMode) – The coupling mode to set.

Raises

ULException

get_chan_coupling_mode(channel)

Gets the coupling mode for the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose coupling mode is being determined.

Returns

The coupling mode of the specified channel.

Return type

CouplingMode

Raises

ULException

set_chan_sensor_sensitivity(channel, sensitivity)

Configures the sensory sensitivity for the specified A/D channel in Volts/unit.

Parameters
  • channel (int) – The A/D channel number whose sensor sensitivity is being set.

  • sensitivity (float) – The sensor sensitivity in Volts/unit.

Raises

ULException

get_chan_sensor_sensitivity(channel)

Gets the sensor sensitivity for the specified A/D channel in Volts/unit.

Parameters

channel (int) – The A/D channel number whose sensory sensitivity is being determined.

Returns

The sensor sensitivity in Volts/unit.

Return type

float

Raises

ULException

set_chan_slope(channel, slope)

Configures the slope multiplier for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose slope is being set.

  • slope (float) – The slope multiplier value to set.

Raises

ULException

get_chan_slope(channel)

Gets the slope multiplier of the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose slope is being determined.

Returns

The slope multiplier of the specified A/D channel.

Return type

float

Raises

ULException

set_chan_offset(channel, offset)

Sets the offset value for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose offset is being set.

  • offset (float) – The offset value to set.

Raises

ULException

get_chan_offset(channel)

Gets the offset value of the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose offset is being determined.

Returns

The offset of the specified A/D channel.

Return type

float

Raises

ULException

get_cal_date(cal_type=<CalibrationType.FACTORY: 0>)

Gets the calibration date for the DAQ device.

Parameters

cal_type (Optional[CalibrationType]) – Optional parameter to set the type of calibration whose date is being determined. The default type is factory.

Returns

The date when the device was calibrated last in UNIX Epoch time.

Return type

int

Raises

ULException

set_chan_otd_mode(channel, mode)

Configures the open thermocouple detection mode for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose open thermocouple detection mode is being set.

  • mode (OtdMode) – The open thermocouple detection mode to set.

Raises

ULException

get_chan_otd_mode(channel)

Gets the open thermocouple detection mode for the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose open thermocouple detection mode is being determined.

Returns

The open thermocouple detection mode of the specified channel.

Return type

OtdMode

Raises

ULException

set_temp_unit(temp_unit)

Configures the temperature unit for the specified A/D.

Parameters

temp_unit (TempUnit) – The temperature unit to set.

Raises

ULException

get_temp_unit()

Gets the temperature unit for the specified A/D.

Returns

The scan temperature unit.

Return type

TempUnit

Raises

ULException

set_chan_data_rate(channel, rate)

Configures the data rate for the specified A/D channel.

Parameters
  • channel (int) – The A/D channel number whose data rate is being set.

  • rate (float) – The data rate value to set.

Raises

ULException

get_chan_data_rate(channel)

Gets the data rate of the specified A/D channel.

Parameters

channel (int) – The A/D channel number whose data rate is being determined.

Returns

The data rate of the specified A/D channel.

Return type

float

Raises

ULException

set_otd_mode(mode)

Configures the open thermocouple detection mode for the A/D.

Parameters

mode (OtdMode) – The open thermocouple detection mode to set.

Raises

ULException

get_otd_mode()

Gets the open thermocouple detection mode for the A/D.

Returns

The open thermocouple detection mode of the A/D.

Return type

OtdMode

Raises

ULException

set_calibration_table_type(cal_type)

Configures the calibration table type for the A/D.

Parameters

cal_type (AiCalTableType) – The calibration table type to set.

Raises

ULException

get_calibration_table_type()

Gets the calibration table type for the A/D.

Returns

The calibration table type of the A/D.

Return type

AiCalTableType

Raises

ULException

set_reject_freq_type(reject_freq_type)

Configures the rejection frequency type for the A/D.

Parameters

reject_freq_type (AiRejectFreqType) – The rejection frequency type to set.

Raises

ULException

get_reject_freq_type()

Gets the rejection frequency type for the A/D.

Returns

The rejection frequency type of the A/D.

Return type

AiRejectFreqType

Raises

ULException

get_expansion_cal_date(cal_type=<CalibrationType.FACTORY: 0>)

Gets the calibration date of the expansion board connected to the DAQ device.

Parameters

cal_type (Optional[CalibrationType]) – Optional parameter to set the type of calibration whose date is being determined; The default type is factory.

Returns

The date when the device was calibrated last in UNIX Epoch time.

Return type

int

Raises

ULException

Analog Output Subsystem

Provides classes to manage the analog output 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.

get_config()

Gets the analog output configuration 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()

Outputs values to a range of D/A channels on the device referenced by the AoDevice object.

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 when a_out_scan() is called that will be used when a_out_scan() is called with RETRIGGER or EXTTRIGGER.

a_out_list()

Writes a list of values to the specified range of D/A channels for the device referenced by the AoDevice object.

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

get_config()

Gets the analog output configuration object for the device referenced by the AoDevice object.

Returns

The object used for retrieving configuration information about the analog output subsystem of the UL DAQ Device.

Return type

AoConfig

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
  • channel (int) – D/A channel number.

  • analog_range (Range) – The range to use when writing data.

  • flags (AOutFlag) – One or more of the AOutFlag attributes (suitable for bit-wise operations) tht specifies whether to scale and/or calibrate the data.

  • data (float) – The value to write.

Returns

The actual output scan rate.

Return type

float

Raises

ULException

a_out_scan(low_chan, high_chan, analog_range, samples_per_channel, rate, options, flags, data)

Outputs values to a range of D/A channels on the device referenced by the AoDevice object.

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

ULException

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

ULException

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 when a_out_scan() is called with RETRIGGER or EXTTRIGGER.

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

ULException

a_out_list(low_chan, high_chan, ranges, flags, data)

Writes a list of values to the specified range of D/A channels for the device referenced by the AoDevice object.

Parameters
  • low_chan (int) – The low D/A channel number in the range of channels.

  • high_chan (int) – The high D/A channel number in the range of channels.

  • ranges (list[Range]) – The range to use for each of the channels in the specified range of channels.

  • flags (AOutListFlag) – One or more of the attributes (suitable for bit-wise operations) specifying the conditioning applied to the data.

  • data (list[float]) – The values to write to the specified range of D/A channels.

Raises

ULException

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 the AoInfo 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 the AoInfo 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

AoConfig class

Provides classes to configure analog output options.

Methods

class AoConfig

An instance of the AoConfig class is obtained by calling AoDevice.get_config().

Method

Description

set_sync_mode()

Configures the synchronization mode for the analog output subsystem.

get_sync_mode()

Gets the synchronization mode for the analog output subsystem.

set_chan_sense_mode()

Configures the sense mode for the specified DAC channel.

get_chan_sense_mode()

Gets the sense mode for the specified DAC channel.

set_sync_mode(sync_mode)

Configures the synchronization mode for the Analog Output subsystem.

Parameters

sync_mode (AOutSyncMode) – The synchronization mode to be set.

Raises

ULException

get_sync_mode()

Gets the synchronization mode for the Analog Output subsystem.

Returns

The synchronization mode.

Return type

AOutSyncMode

Raises

ULException

set_chan_sense_mode(channel, mode)

Configures the sense mode for the specified DAC channel.

Parameters
  • channel (int) – The DAC channel number whose sense mode is being set.

  • mode (AOutSenseMode) – The sense mode to set.

Raises

ULException

get_chan_sense_mode(channel)

Gets the sense mode for the specified DAC channel.

Parameters

channel (int) – The DAC channel number whose sense mode is being determined.

Returns

The sense mode of the specified channel.

Return type

AOutSenseMode

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 when d_in_scan() is called with RETRIGGER or EXTTRIGGER.

d_out_set_trigger()

Configures the trigger parameters for the device referenced by the DioDevice object that will be used when d_out_scan() is called with RETRIGGER or EXTTRIGGER.

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.

d_in_list()

Returns a list of values read from the specified range of digital ports for the device referenced by the DioDevice object.

d_out_list()

Writes a list of values to the specified range of digital output ports for the device referenced by the DioDevice object.

d_clear_alarm()

Clears the alarms for the bits specified by the bit mask within the specified DigitalPortType of the device referenced by the DioDevice object.

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

ULException

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

ULException

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

ULException

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

ULException

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

ULException

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

ULException

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

ULException

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 when d_in_scan is called with RETRIGGER or EXTTRIGGER.

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

ULException

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 when d_out_scan is called with RETRIGGER or EXTTRIGGER.

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

ULException

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
  • wait_type (WaitType) – One or more of the WaitType 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

ULException

d_out_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
  • wait_type (WaitType) – One or more of the WaitType 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

ULException

d_in_list(low_port_type, high_port_type)

Returns a list of values read from the specified range of digital ports for the device referenced by the DioDevice object.

Parameters
Returns

A list of values from the specified range of digital ports.

Return type

list[int]

Raises

ULException

d_out_list(low_port_type, high_port_type, data)

Writes a list of values to the specified range of digital output ports for the device referenced by the DioDevice object.

Parameters
  • low_port_type (DigitalPortType) – First digital port to write.

  • high_port_type (DigitalPortType) – Last digital port to write.

  • data (list[int]) – The list of values to write to the digital ports.

Raises

ULException

d_clear_alarm(port_type, bit_mask)

Clears the alarms for the bits specified by the bit mask within the specified DigitalPortType of the device referenced by the DioDevice object.

Parameters
  • port_type (DigitalPortType) – The digital port containing the bit(s) to configure.

  • bit_mask (int) – A mask of bits within the specified port whose alarms will be cleared.

Raises

ULException

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 the DioInfo 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

  • or output) ((input) –

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 the DioInfo 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.

set_port_initial_output_val()

Sets the initial output value of the specified digital port type. This allows for a known state when switching the port direction from input to output.

get_port_iso_filter_mask()

Gets the ISO filter mask for the specified port type.

set_port_iso_filter_mask()

Sets the ISO filter mask for the specified port type.

get_port_output_logic()

Gets the output logic for the specified port type.

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

set_port_initial_output_val(port_type, initial_output_val)

Sets the initial output value of the specified digital port type. This allows for a known state when switching the port direction from input to output.

Parameters
  • port_type (DigitalPortType) – The digital port type whose initial value is being set.

  • initial_output_val (int) – The initial output value for the specified digital port type.

Raises

ULException

get_port_iso_filter_mask(port_type)

Gets the ISO filter mask for the specified port type.

Parameters

port_type (DigitalPortType) – The digital port type whose filter mask is being retrieved.

Returns

The filter mask for the specified port type. A zero indicates the corresponding bit is disabled.

Return type

int

Raises

ULException

set_port_iso_filter_mask(port_type, filter_mask)

Sets the ISO filter mask for the specified port type.

Parameters
  • port_type (DigitalPortType) – The digital port type whose filter mask is being set.

  • filter_mask (int) – The filter mask for the specified port type. A zero indicates the corresponding bit is disabled.

Raises

ULException

get_port_logic(port_type)

Gets the logic for the specified port type.

Parameters

port_type (DigitalPortType) – The digital port type whose logic is being retrieved.

Returns

The logic for the specified port type. A zero indicates non-invert mode for the corresponding bit. A non-zero indicates inverted mode for the corresponding bit.

Return type

int

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.

get_config()

Gets the counter configuration 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 when c_in_scan() is called with RETRIGGER or EXTTRIGGER.

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

get_config()

Gets the counter configuration object for the device referenced by the CtrDevice object.

Returns

The object used for retrieving configuration information about the counter subsystem of the UL DAQ Device.

Return type

CtrConfig

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

ULException

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

ULException

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

ULException

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

ULException

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 when c_in_scan() is called with the RETRIGGER or EXTTRIGGER 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 RETRIGGER is set for the scan.

Raises

ULException

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

ULException

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

CtrConfig class

Provides classes to configure counter options.

Methods

class CtrConfig

An instance of the CtrConfig class is obtained by calling CtrDevice.get_config().

Method

Description

set_register_val()

Configures the register value for the specified counter.

get_register_val()

Gets the register value for the specified counter.

set_register_val(reg_val)

Configures the register value for the specified counter.

Parameters

reg_val (int) – The counter register value to be set.

Raises

ULException

get_register_val()

Gets the register value for the specified counter.

Returns

The register value of the specified counter.

Return type

int

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 with EXTTRIGGER or RETRIGGER.

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 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

ULException

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 with RETRIGGER or EXTTRIGGER. referenced by the TmrDevice object.

Parameters
  • trig_type (TriggerType) – The digital trigger type.

  • trig_chan (int) – Ignored.

  • level (float) – Ignored.

  • variance (float) – Ignored.

  • retrigger_count (int) – Ignored.

Raises

ULException

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 when daq_in_scan() is called with RETRIGGER or EXTTRIGGER.

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 when daq_in_scan() is called with the RETRIGGER or EXTTRIGGER 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 ScanOption.RETRIGGER is set for the scan.

Raises

ULException

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

ULException

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

ULException

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 the DaqiInfo 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 the DaqiInfo 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 when daq_out_scan() is called with RETRIGGER or EXTTRIGGER.

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 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

ULException

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

ULException

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 when daq_out_scan() is called with the RETRIGGER or EXTTRIGGER 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 ScanOption.RETRIGGER is set for the scan.

Raises

ULException

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 the DaqoInfo 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 the DaqoInfo object.

Returns

A list of supported DaqOutChanType attributes (suitable for bitwise operations) specifying compatible channel types for the for the device referenced by the DaqoInfo 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]

ULException class

Exception for an error in the UL.

exception ULException(error_code)

Exception for an error in the UL.

Parameters

error_code (ULError) – A ULError error code value.

error_code = None

The ULError error code value.

error_message = None

The error message

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, the ULError code for an ON_INPUT_SCAN_ERROR or an ON_OUTPUT_SCAN_ERROR event, otherwise None.

user_data:

The object passed as the user_data parameter for the DaqDevice.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

class AiCalTableType

Analog input calibration table types.

FACTORY = 1

Factory calibration table

FIELD = 2

Field calibration table

class AiChanQueueLimitation

Contains attributes suitable for bit-wise operations indicating device queue limitations. Used with get_chan_queue_limitations. See also get_queue_types and get_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 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 AiInputMode

Contains attributes indicating A/D channel input modes. Used with most analog input methods and with many of the 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 AiRejectFreqType

Analog input rejection frequency types.

AI_RFT_60HZ = 1

60 Hz rejection frequency

AI_RFT_50HZ = 2

50 Hz rejection frequency

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 of AiQueueType.

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 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 AOutListFlag

Contains attributes indicating the conditioning to apply to analog output data before it’s written to the D/A. Used as the flags argument for a_out_list.

DEFAULT = 0

Scaled data is supplied and calibration factors are applied to output.

NOSCALEDATA = 1

Data is supplied in native format (usually, values ranging from 0 to 2resolution- 1).

NOCALIBRATEDATA = 2

Data is output without calibration factors applied.

SIMULTANEOUS = 4

All of the specified channels will be updated simultaneously.

class AOutScanFlag

Contains attributes indicating the conditioning to apply to analog output data before it’s written to the D/A. Use as the flags argument value for a_out_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

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 AOutSenseMode

Used with set_chan_sense_mode and get_chan_sense_mode to specify the sense mode of a DAC channel.

DISABLED = 1

Sense mode is disabled.

ENABLED = 2

Sense mode is enabled.

class AOutSyncMode

Used with set_sync_mode and get_sync_mode to specify the synchronization mode for an analog output subsystem.

SLAVE = 0

Receive the D/A Load signal from an external source

MASTER = 1

Output the internal D/A Load signal

class CalibrationType

Used with get_cal_date to get the calibration date for a DAQ device.

FACTORY = 0

Factory calibration type.

FIELD = 1

Field calibration type.

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() when CounterDebounceMode 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_31500ns = 6

Sets the time period that the counter input must be stable when using TRIGGER_AFTER_STABLE or TRIGGER_BEFORE_STABLE CounterDebounceModes to 31500 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 = 0

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 = 0

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 = 0

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.

LATCH_ON_INDEX = 67108864

Configures the counter to be latched by the signal on the index pin for the COUNT measurement type.

PHB_CONTROLS_DIR = 134217728

Configures the counter to increment when the phase B pin is high, and decrement when the phase B pin is low for the COUNT measurement type.

DECREMENT_ON = 268435456

Configures the counter to decrement by the signal on the mapped channel for the COUNT 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(). Use get_info with get_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 using get_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 CouplingMode

Coupling modes.

DC = 1

DC coupling

AC = 2

AC coupling

class CounterTickSize

Use as the value for the tick_size argument for c_config_scan when CounterMeasurementType is set to 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 the DaqInChanDescriptor object, and as the list of bit-wise operable attributes using DaqiDevice.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

DAC = 128

Analog output 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() and disable_event(). Values can be OR’d together to enable or disable multiple events. Returned as a bit-wise operable list using get_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 output 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 the DaqOutChanDescriptor object, and as the list of bit-wise operable attributes using DaqoDevice.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 = 1

AuxPort0

AUXPORT1 = 2

AuxPort1

AUXPORT2 = 3

AuxPort2

FIRSTPORTA = 10

FirstPortA

FIRSTPORTB = 11

FirstPortB

FIRSTPORTC = 12

FirstPortC

FIRSTPORTCL = 12

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 d_in_scan().

DEFAULT = 0

Placeholder value; standard functionality.

class DOutScanFlag

The flags argument value for d_out_scan().

DEFAULT = 0

Placeholder value; standard functionality.

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.

FW_MEASUREMENT = 3

Measurement firmware version installed on the current device.

FW_MEASUREMENT_EXP = 4

Measurement firmware version installed on the expansion board attached to the current device.

class IepeMode

IEPE modes.

DISABLED = 1

IEPE excitation current is disabled

ENABLED = 2

IEPE excitation current is enabled

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 the MemDescriptor 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 with get_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.

RESERVED0 = 8

Specifies the first reserved region information returned to the MemDescriptor

class OtdMode

Open Thermocouple detection modes.

DISABLED = 1

Open Thermocouple detection mode is disabled.

ENABLED = 2

Open Thermocouple detection mode is enabled.

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

BIP3VOLTS = 22

-3.0 to +3.0 Volts

BIPPT312VOLTS = 23

-0.312 to +0.312 Volts

BIPPT156VOLTS = 24

-0.156 to +0.156 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

MA0TO20 = 2000

0 to 20 Milliamps

class ScanOption

Contains attributes suitable for bit-wise operations indicating optional scan modes. These values can be OR’d together to specify multiple options. Used with many analog input and output scan functions, as well as a return value for AiInfo.get_scan_options.

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 the subsystem scan_stop() function.

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.

EXTTIMEBASE = 512

Data conversions are controlled by an external timebase signal.

TIMEBASEOUT = 1024

Enables or disables the internal timebase output on a DAQ device.

class ScanStatus

Scan status.

IDLE = 0

The scan is idle.

RUNNING = 1

The scan is running.

class SensorConnectionType

Used with set_chan_sensor_connection_type and get_chan_sensor_connection_type to specify the sensor connection type for a specified A/D channel.

SCT_2_WIRE_1 = 1

2-wire with a single sensor per differential channel pair

SCT_2_WIRE_2 = 2

2-wire with two sensors per differential channel pair

SCT_3_WIRE = 3

3-wire with a single sensor per differential channel pair

SCT_4_WIRE = 4

4-wire with a single sensor per differential channel pair

class TcType

Thermocouple types.

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.

CELSIUS = 1

Celcius

FAHRENHEIT = 2

Fahrenheit

KELVIN = 3

Kelvin

class TempScale

Temperature scaling options.

CELSIUS = 1

Celsius

FAHRENHEIT = 2

Fahrenheit

KELVIN = 3

Kelvin

VOLTS = 4

Volts

NOSCALE = 5

No scale (Raw)

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 TInFlag

Used with t_in.

DEFAULT = 0

Placeholder value. Standard functionality.

WAIT_FOR_NEW_DATA = 1

Wait for new data before returning.

class TInListFlag

Used with t_in_list.

DEFAULT = 0

Placeholder value. Standard functionality.

WAIT_FOR_NEW_DATA = 1

Wait for new data before returning.

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.

GATE_IN_WINDOW = 4096

Scanning is enabled as long as the external analog trigger is inside the region defined by the level argument value and the variance argument value.

GATE_OUT_WINDOW = 8192

Scanning is enabled as long as the external analog trigger is outside the region defined by the level argument value and the variance 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_DEV_VER = 82

This function cannot be used with this version of the device

BAD_DIG_OPERATION = 83

This digital operation is not supported on the specified port

BAD_PORT_INDEX = 84

Invalid digital port index specified

OPEN_CONNECTION = 85

Temperature input has open connection

DEV_NOT_READY = 86

Device is not ready to send data

PACER_OVERRUN = 87

Pacer overrun, external clock rate too fast

BAD_TRIG_CHANNEL = 88

Invalid trigger channel specified

BAD_TRIG_LEVEL = 89

Invalid trigger level specified

BAD_CHAN_ORDER = 90

Invalid channel order

TEMP_OUT_OF_RANGE = 91

Temperature input is out of range

TRIG_THRESHOLD_OUT_OF_RANGE = 92

Trigger threshold is out of range

INCOMPATIBLE_FIRMWARE = 93

Incompatible firmware version, firmware update required

BAD_NET_IFC = 94

Specified network interface is not available or disconnected

BAD_NET_HOST = 95

Invalid host specified

BAD_NET_PORT = 96

Invalid port specified

NET_IFC_UNAVAILABLE = 97

Network interface used to obtain the device descriptor not available or disconnected

NET_CONNECTION_FAILED = 98

Network connection failed

BAD_CONNECTION_CODE = 99

Invalid connection code

CONNECTION_CODE_IGNORED = 100

Connection code ignored

NET_DEV_IN_USE = 101

Network device already in use

BAD_NET_FRAME = 102

Invalid network frame

NET_TIMEOUT = 103

Network device did not respond within expected time

DATA_SOCKET_CONNECTION_FAILED = 104

Data socket connection failed

PORT_USED_FOR_ALARM = 105

One or more bits on the specified port are used for alarm

BIT_USED_FOR_ALARM = 106

The specified bit is used for alarm

CMR_EXCEEDED = 107

Common - mode voltage range exceeded

NET_BUFFER_OVERRUN = 108

Network buffer overrun, data was not transferred from buffer fast enough

BAD_NET_BUFFER = 109

Invalid network buffer

BAD_DESCRIPTOR = 100001

Invalid descriptor

class WaitType

Used with the subsystem scan_wait functions as the wait_type argument value for the specified device.

WAIT_UNTIL_DONE = 1

Function returns when the scan operation completes or the time specified by the timeout argument value elapses.

Types

class DaqDeviceDescriptor

A class containing properties that define a particular DAQ device.

property product_name

The generic (unqualified) product name of the device referenced by the DaqDeviceDescriptor.

property product_id

The numeric string indicating the product type referenced by the DaqDeviceDescriptor.

property dev_interface

The InterfaceType indicating the type of interface in use by the device referenced by the DaqDeviceDescriptor.

property dev_string

Similar to product_name, but may contain additional information.

property 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.

property region

A MemRegion value indicating the region of memory.

property address

A numeric value that specifies the address of the memory.

property size

The size in bytes that specifies the size of the memory area at the specified address.

property 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.

property channel

The analog input channel number for the queue element.

property input_mode

The AiInputMode value to use for the specified channel for the queue element.

property range

The Range value to use for the specified channel for the queue element.

class DaqInChanDescriptor

A class containing properties that define a DAQ input channel.

property channel

The channel number.

property type

The DaqInChanType for the specified channel.

property range

The Range to be used for the specified channel; ignored if not analog.

class DaqOutChanDescriptor

A class containing properties that define a DAQ output channel.

property channel

The channel number.

property type

The DaqOutChanType for the specified channel.

property range

The Range to be used for the specified channel; ignored if not analog.

class DioPortInfo

Digital input/output port information.

property port_type

The DigitalPortType value.

property port_io_type

The DigitalPortIoType value.

property number_of_bits

The number of bits in the port.

class TransferStatus

A class containing properties that define the progress of a scan operation.

property current_scan_count

The number of samples per channel transferred since the scan started.

property current_total_count

The total number of samples transferred since the scan started.

property current_index

The index into the data buffer immediately following the last sample transferred.

class EventCallbackArgs(event_type, event_data, user_data)

Bases: tuple

property event_data

Alias for field number 1

property event_type

Alias for field number 0

property user_data

Alias for field number 2