nidaqmx.task.collections

class nidaqmx.task.collections.ChannelCollection(task_handle, interpreter)[source]

Bases: Sequence

Contains the collection of channels for a DAQmx Task.

This class defines methods that implements a container object.

property all

nidaqmx.task.channels.Channel: Specifies a channel object that represents the entire list of virtual channels on this channel collection.

property channel_names

Specifies the entire list of virtual channels on this channel collection.

Type:

List[str]

class nidaqmx.task.collections.AIChannelCollection(task_handle, interpreter)[source]

Bases: ChannelCollection

Contains the collection of analog input channels for a DAQmx Task.

add_ai_accel_4_wire_dc_voltage_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-5.0, max_val=5.0, units=AccelUnits.G, sensitivity=1000.0, sensitivity_units=AccelSensitivityUnits.MILLIVOLTS_PER_G, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=0.0, use_excit_for_scaling=False, custom_scale_name='')[source]

Creates channel(s) to measure acceleration. Use this instance for custom sensors that require excitation. You can use the excitation to scale the measurement.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.AccelUnits]) – Specifies the units to use to return acceleration measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.AccelSensitivityUnits]) – Specifies the units of the sensitivity input.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • use_excit_for_scaling (Optional[bool]) – Specifies if NI- DAQmx divides the measurement by the excitation. You should typically set use_excit_for_scaling to True for ratiometric transducers. If you set use_excit_for_scaling to True, set max_val and min_val to reflect the scaling.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_accel_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-5.0, max_val=5.0, units=AccelUnits.G, sensitivity=1000.0, sensitivity_units=AccelSensitivityUnits.MILLIVOLTS_PER_G, current_excit_source=ExcitationSource.INTERNAL, current_excit_val=0.004, custom_scale_name='')[source]

Creates channel(s) that use an accelerometer to measure acceleration.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.AccelUnits]) – Specifies the units to use to return acceleration measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.AccelSensitivityUnits]) – Specifies the units of the sensitivity input.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_accel_charge_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-5.0, max_val=5.0, units=AccelUnits.G, sensitivity=100.0, sensitivity_units=AccelChargeSensitivityUnits.PICO_COULOMBS_PER_G, custom_scale_name='')[source]

Creates channel(s) that use a charge-based sensor to measure acceleration.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.AccelUnits]) – Specifies the units to use to return acceleration measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.AccelChargeSensitivityUnits]) – Specifies the units of the sensitivity input.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_bridge_chan(physical_channel, name_to_assign_to_channel='', min_val=-0.002, max_val=0.002, units=BridgeUnits.VOLTS_PER_VOLT, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, custom_scale_name='')[source]

Creates channel(s) that measure voltage ratios from a Wheatstone bridge. Use this instance with bridge-based sensors that measure phenomena other than strain, force, pressure, or torque, or that scale data to physical units NI-DAQmx does not support.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.BridgeUnits]) – Specifies in which unit to return voltage ratios from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_charge_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-1e-09, max_val=1e-09, units=ChargeUnits.COULOMBS, custom_scale_name='')[source]

Creates channel(s) that use a sensor with charge output.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ChargeUnits]) – Specifies the units to use to return charge measurements from the channel.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_current_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-0.01, max_val=0.01, units=CurrentUnits.AMPS, shunt_resistor_loc=CurrentShuntResistorLocation.LET_DRIVER_CHOOSE, ext_shunt_resistor_val=249.0, custom_scale_name='')[source]

Creates channel(s) to measure current.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.CurrentUnits]) – Specifies the units to use to return current measurements.

  • shunt_resistor_loc (Optional[nidaqmx.constants.CurrentShuntResistorLocation]) – Specifies the location of the shunt resistor. For devices with built-in shunt resistors, specify the location as INTERNAL. For devices that do not have built-in shunt resistors, you must attach an external one, set this input to EXTERNAL and use the ext_shunt_resistor_val input to specify the value of the resistor.

  • ext_shunt_resistor_val (Optional[float]) – Specifies in ohms the resistance of an external shunt resistor.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_current_rms_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-0.01, max_val=0.01, units=CurrentUnits.AMPS, shunt_resistor_loc=CurrentShuntResistorLocation.LET_DRIVER_CHOOSE, ext_shunt_resistor_val=249.0, custom_scale_name='')[source]

Creates a channel to measure current RMS, the average (mean) power of the acquired current.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.CurrentUnits]) – Specifies the units to use to return current measurements.

  • shunt_resistor_loc (Optional[nidaqmx.constants.CurrentShuntResistorLocation]) – Specifies the location of the shunt resistor. For devices with built-in shunt resistors, specify the location as INTERNAL. For devices that do not have built-in shunt resistors, you must attach an external one, set this input to EXTERNAL and use the ext_shunt_resistor_val input to specify the value of the resistor.

  • ext_shunt_resistor_val (Optional[float]) – Specifies in ohms the resistance of an external shunt resistor.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_force_bridge_polynomial_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=ForceUnits.POUNDS, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, forward_coeffs=None, reverse_coeffs=None, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, physical_units=BridgePhysicalUnits.POUNDS, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure force or load. Use this instance with sensors whose specifications provide a polynomial to convert electrical values to physical values. When you use this scaling type, NI-DAQmx requires coefficients for a polynomial that converts electrical values to physical values (forward), as well as coefficients for a polynomial that converts physical values to electrical values (reverse). If you only know one set of coefficients, use the DAQmx Compute Reverse Polynomial Coefficients function to generate the other set.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ForceUnits]) – Specifies in which unit to return force measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • forward_coeffs (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • reverse_coeffs (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_force_bridge_table_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=ForceUnits.POUNDS, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, electrical_vals=None, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, physical_vals=None, physical_units=BridgePhysicalUnits.POUNDS, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure force or load. Use this instance with sensors whose specifications provide a table of electrical values and the corresponding physical values. When you use this scaling type, NI-DAQmx performs linear scaling between each pair of electrical and physical values. The input limits specified with min_val and max_val must fall within the smallest and largest physical values. For any data outside those endpoints, NI-DAQmx coerces that data to the endpoints.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ForceUnits]) – Specifies in which unit to return force measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • electrical_vals (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_vals (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_force_bridge_two_point_lin_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=ForceUnits.POUNDS, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, first_electrical_val=0.0, second_electrical_val=2.0, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, first_physical_val=0.0, second_physical_val=100.0, physical_units=BridgePhysicalUnits.POUNDS, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure force or load. Use this instance with sensors whose specifications do not provide a polynomial for scaling or a table of electrical and physical values. When you use this scaling type, NI-DAQmx uses two points of electrical and physical values to calculate the slope and y-intercept of a linear equation and uses that equation to scale electrical values to physical values.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ForceUnits]) – Specifies in which unit to return force measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • first_electrical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • second_electrical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • first_physical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • second_physical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_force_iepe_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-2000.0, max_val=2000.0, units=ForceUnits.NEWTONS, sensitivity=2.25, sensitivity_units=ForceIEPESensorSensitivityUnits.MILLIVOLTS_PER_NEWTON, current_excit_source=ExcitationSource.INTERNAL, current_excit_val=0.004, custom_scale_name='')[source]

Creates channel(s) that use an IEPE force sensor to measure force or load.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ForceUnits]) – Specifies in which unit to return force measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.ForceIEPESensorSensitivityUnits]) – Specifies the units of the sensitivity input.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_freq_voltage_chan(physical_channel, name_to_assign_to_channel='', min_val=1, max_val=100, units=FrequencyUnits.HZ, threshold_level=0.0, hysteresis=0.0, custom_scale_name='')[source]

Creates channel(s) that use a frequency-to-voltage converter to measure frequency.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.FrequencyUnits]) – Specifies the units to use to return frequency measurements.

  • threshold_level (Optional[float]) – Specifies in volts the level at which to recognize waveform repetitions. You should select a voltage level that occurs only once within the entire period of a waveform. You also can select a voltage that occurs only once while the voltage rises or falls.

  • hysteresis (Optional[float]) – Specifies in volts a window below level. The input voltage must pass below threshold_level minus hysteresis before NI-DAQmx recognizes a waveform repetition. Hysteresis can improve measurement accuracy when the signal contains noise or jitter.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_microphone_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, units=SoundPressureUnits.PA, mic_sensitivity=10.0, max_snd_press_level=100.0, current_excit_source=ExcitationSource.INTERNAL, current_excit_val=0.004, custom_scale_name='')[source]

Creates channel(s) that use a microphone to measure sound pressure.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • units (Optional[nidaqmx.constants.SoundPressureUnits]) – Specifies the units to use to return sound pressure measurements.

  • mic_sensitivity (Optional[float]) – Is the sensitivity of the microphone. Specify this value in mV/Pa.

  • max_snd_press_level (Optional[float]) – Is the maximum instantaneous sound pressure level you expect to measure. This value is in decibels, referenced to 20 micropascals.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_pos_eddy_curr_prox_probe_chan(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=0.00254, units=LengthUnits.METERS, sensitivity=200.0, sensitivity_units=EddyCurrentProxProbeSensitivityUnits.MILLIVOLTS_PER_MIL, custom_scale_name='')[source]

Creates channel(s) that use an eddy current proximity probe to measure position.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.LengthUnits]) – Specifies the units to use to return position measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.EddyCurrentProxProbeSensitivityUnits]) – Specifies the units of the sensitivity input.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_pos_lvdt_chan(physical_channel, name_to_assign_to_channel='', min_val=-0.1, max_val=0.1, units=LengthUnits.METERS, sensitivity=50.0, sensitivity_units=LVDTSensitivityUnits.MILLIVOLTS_PER_VOLT_PER_MILLIMETER, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=1.0, voltage_excit_freq=2500.0, ac_excit_wire_mode=ACExcitWireMode.FOUR_WIRE, custom_scale_name='')[source]

Creates channel(s) that use an LVDT to measure linear position.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.LengthUnits]) – Specifies the units to use to return linear position measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.LVDTSensitivityUnits]) – Specifies the units of the sensitivity input.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • voltage_excit_freq (Optional[float]) – Specifies in hertz the excitation frequency that the sensor requires. Refer to the sensor documentation to determine this value.

  • ac_excit_wire_mode (Optional[nidaqmx.constants.ACExcitWireMode]) – Is the number of leads on the sensor. Some sensors require you to tie leads together to create a four- or five- wire sensor. Refer to the sensor documentation for more information.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_pos_rvdt_chan(physical_channel, name_to_assign_to_channel='', min_val=-70.0, max_val=70.0, units=AngleUnits.DEGREES, sensitivity=50.0, sensitivity_units=RVDTSensitivityUnits.MILLIVOLTS_PER_VOLT_PER_DEGREE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=1.0, voltage_excit_freq=2500.0, ac_excit_wire_mode=ACExcitWireMode.FOUR_WIRE, custom_scale_name='')[source]

Creates channel(s) that use an RVDT to measure angular position.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.AngleUnits]) – Specifies the units to use to return angular position measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.RVDTSensitivityUnits]) – Specifies the units of the sensitivity input.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • voltage_excit_freq (Optional[float]) – Specifies in hertz the excitation frequency that the sensor requires. Refer to the sensor documentation to determine this value.

  • ac_excit_wire_mode (Optional[nidaqmx.constants.ACExcitWireMode]) – Is the number of leads on the sensor. Some sensors require you to tie leads together to create a four- or five- wire sensor. Refer to the sensor documentation for more information.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_power_chan(physical_channel, voltage_setpoint, current_setpoint, output_enable, name_to_assign_to_channel='')[source]

Creates channel(s) to measure power.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • voltage_setpoint (float) – Specifies, in volts, the constant output voltage.

  • current_setpoint (float) – Specifies, in amperes, the output current.

  • output_enable (bool) – Specifies whether to enable or disable the output.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_pressure_bridge_polynomial_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=PressureUnits.POUNDS_PER_SQ_INCH, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, forward_coeffs=None, reverse_coeffs=None, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, physical_units=BridgePhysicalUnits.POUNDS_PER_SQ_INCH, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure pressure. Use this instance with sensors whose specifications provide a polynomial to convert electrical values to physical values. When you use this scaling type, NI-DAQmx requires coefficients for a polynomial that converts electrical values to physical values (forward), as well as coefficients for a polynomial that converts physical values to electrical values (reverse). If you only know one set of coefficients, use the DAQmx Compute Reverse Polynomial Coefficients function to generate the other set.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.PressureUnits]) – Specifies in which unit to return pressure measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • forward_coeffs (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • reverse_coeffs (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_pressure_bridge_table_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=PressureUnits.POUNDS_PER_SQ_INCH, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, electrical_vals=None, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, physical_vals=None, physical_units=BridgePhysicalUnits.POUNDS_PER_SQ_INCH, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure pressure. Use this instance with sensors whose specifications provide a table of electrical values and the corresponding physical values. When you use this scaling type, NI-DAQmx performs linear scaling between each pair of electrical and physical values. The input limits specified with min_val and max_val must fall within the smallest and largest physical values. For any data outside those endpoints, NI-DAQmx coerces that data to the endpoints.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.PressureUnits]) – Specifies in which unit to return pressure measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • electrical_vals (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_vals (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_pressure_bridge_two_point_lin_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=PressureUnits.POUNDS_PER_SQ_INCH, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, first_electrical_val=0.0, second_electrical_val=2.0, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, first_physical_val=0.0, second_physical_val=100.0, physical_units=BridgePhysicalUnits.POUNDS_PER_SQ_INCH, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure pressure. Use this instance with sensors whose specifications do not provide a polynomial for scaling or a table of electrical and physical values. When you use this scaling type, NI-DAQmx uses two points of electrical and physical values to calculate the slope and y-intercept of a linear equation and uses that equation to scale electrical values to physical values.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.PressureUnits]) – Specifies in which unit to return pressure measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • first_electrical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • second_electrical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • first_physical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • second_physical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_resistance_chan(physical_channel, name_to_assign_to_channel='', min_val=100.0, max_val=1000.0, units=ResistanceUnits.OHMS, resistance_config=ResistanceConfiguration.TWO_WIRE, current_excit_source=ExcitationSource.EXTERNAL, current_excit_val=0.001, custom_scale_name='')[source]

Creates channel(s) to measure resistance.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ResistanceUnits]) – Specifies the units to use to return resistance measurements.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_rosette_strain_gage_chan(physical_channel, rosette_type, gage_orientation, rosette_meas_types, name_to_assign_to_channel='', min_val=-0.001, max_val=0.001, strain_config=StrainGageBridgeType.QUARTER_BRIDGE_I, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, gage_factor=2.0, nominal_gage_resistance=350.0, poisson_ratio=0.3, lead_wire_resistance=0.0)[source]

Creates channels to measure two-dimensional strain using a rosette strain gage.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create the strain gage virtual channels necessary to calculate the rosette measurements channels.

  • rosette_type (nidaqmx.constants.StrainGageRosetteType) – Specifies information about the rosette configuration and measurements.

  • gage_orientation (float) – Specifies information about the rosette configuration and measurements.

  • rosette_meas_types (List[nidaqmx.constants.StrainGageRosetteMeasurementType]) – Specifies information about the rosette configuration and measurements.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx creates a default channel name.

  • min_val (Optional[float]) – Specifies the minimum strain you expect to measure. This value applies to each strain gage in the rosette.

  • max_val (Optional[float]) – Specifies the maximum strain you expect to measure. This value applies to each strain gage in the rosette.

  • strain_config (Optional[nidaqmx.constants.StrainGageBridgeType]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • gage_factor (Optional[float]) – Contains information about the strain gage and measurement.

  • nominal_gage_resistance (Optional[float]) – Contains information about the strain gage and measurement.

  • poisson_ratio (Optional[float]) – Contains information about the strain gage and measurement.

  • lead_wire_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_rtd_chan(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, rtd_type=RTDType.PT_3750, resistance_config=ResistanceConfiguration.TWO_WIRE, current_excit_source=ExcitationSource.EXTERNAL, current_excit_val=0.0025, r_0=100.0)[source]

Creates channel(s) that use an RTD to measure temperature.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • rtd_type (Optional[nidaqmx.constants.RTDType]) – Specifies the type of RTD connected to the channel.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • r_0 (Optional[float]) – Is the sensor resistance in ohms at 0 degrees Celsius. The Callendar-Van Dusen equation requires this value. Refer to the sensor documentation to determine this value.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_strain_gage_chan(physical_channel, name_to_assign_to_channel='', min_val=-0.001, max_val=0.001, units=StrainUnits.STRAIN, strain_config=StrainGageBridgeType.FULL_BRIDGE_I, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, gage_factor=2.0, initial_bridge_voltage=0.0, nominal_gage_resistance=350.0, poisson_ratio=0.3, lead_wire_resistance=0.0, custom_scale_name='')[source]

Creates channel(s) to measure strain.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.StrainUnits]) – Specifies the units to use to return strain measurements.

  • strain_config (Optional[nidaqmx.constants.StrainGageBridgeType]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • gage_factor (Optional[float]) – Contains information about the strain gage and measurement.

  • initial_bridge_voltage (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_gage_resistance (Optional[float]) – Contains information about the strain gage and measurement.

  • poisson_ratio (Optional[float]) – Contains information about the strain gage and measurement.

  • lead_wire_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_temp_built_in_sensor_chan(physical_channel, name_to_assign_to_channel='', units=TemperatureUnits.DEG_C)[source]

Creates channel(s) that use the built-in sensor of a terminal block or device to measure temperature. On SCXI modules, for example, the built-in sensor could be the CJC sensor.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_thrmcpl_chan(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, thermocouple_type=ThermocoupleType.J, cjc_source=CJCSource.CONSTANT_USER_VALUE, cjc_val=25.0, cjc_channel='')[source]

Creates channel(s) that use a thermocouple to measure temperature.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • thermocouple_type (Optional[nidaqmx.constants.ThermocoupleType]) – Specifies the type of thermocouple connected to the channel. Thermocouple types differ in composition and measurement range.

  • cjc_source (Optional[nidaqmx.constants.CJCSource]) – Specifies the source of cold-junction compensation.

  • cjc_val (Optional[float]) – Specifies in units the temperature of the cold junction if you set cjc_source to CONSTANT_VALUE.

  • cjc_channel (Optional[str]) – Specifies the channel that acquires the temperature of the thermocouple cold- junction if you set cjc_source to CHANNEL.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_thrmstr_chan_iex(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, resistance_config=ResistanceConfiguration.FOUR_WIRE, current_excit_source=ExcitationSource.EXTERNAL, current_excit_val=0.00015, a=0.001295361, b=0.0002343159, c=1.018703e-07)[source]

Creates channel(s) that use a thermistor to measure temperature. Use this instance when the thermistor requires current excitation.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • a (Optional[float]) – Contains the constants for the Steinhart-Hart thermistor equation. Refer to the sensor documentation to determine values for these constants.

  • b (Optional[float]) – Contains the constants for the Steinhart-Hart thermistor equation. Refer to the sensor documentation to determine values for these constants.

  • c (Optional[float]) – Contains the constants for the Steinhart-Hart thermistor equation. Refer to the sensor documentation to determine values for these constants.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_thrmstr_chan_vex(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, resistance_config=ResistanceConfiguration.FOUR_WIRE, voltage_excit_source=ExcitationSource.EXTERNAL, voltage_excit_val=2.5, a=0.001295361, b=0.0002343159, c=1.018703e-07, r_1=5000.0)[source]

Creates channel(s) that use a thermistor to measure temperature. Use this instance when the thermistor requires voltage excitation.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • a (Optional[float]) – Contains the constants for the Steinhart-Hart thermistor equation. Refer to the sensor documentation to determine values for these constants.

  • b (Optional[float]) – Contains the constants for the Steinhart-Hart thermistor equation. Refer to the sensor documentation to determine values for these constants.

  • c (Optional[float]) – Contains the constants for the Steinhart-Hart thermistor equation. Refer to the sensor documentation to determine values for these constants.

  • r_1 (Optional[float]) – Specifies in ohms the value of the reference resistor.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_torque_bridge_polynomial_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=TorqueUnits.INCH_POUNDS, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, forward_coeffs=None, reverse_coeffs=None, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, physical_units=BridgePhysicalUnits.INCH_POUNDS, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure torque. Use this instance with sensors whose specifications provide a polynomial to convert electrical values to physical values. When you use this scaling type, NI-DAQmx requires coefficients for a polynomial that converts electrical values to physical values (forward), as well as coefficients for a polynomial that converts physical values to electrical values (reverse). If you only know one set of coefficients, use the DAQmx Compute Reverse Polynomial Coefficients function to generate the other set.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TorqueUnits]) – Specifies in which unit to return torque measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • forward_coeffs (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • reverse_coeffs (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_torque_bridge_table_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=TorqueUnits.INCH_POUNDS, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, electrical_vals=None, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, physical_vals=None, physical_units=BridgePhysicalUnits.INCH_POUNDS, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure torque. Use this instance with sensors whose specifications provide a table of electrical values and the corresponding physical values. When you use this scaling type, NI-DAQmx performs linear scaling between each pair of electrical and physical values. The input limits specified with min_val and max_val must fall within the smallest and largest physical values. For any data outside those endpoints, NI-DAQmx coerces that data to the endpoints.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TorqueUnits]) – Specifies in which unit to return torque measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • electrical_vals (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_vals (Optional[List[float]]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_torque_bridge_two_point_lin_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=TorqueUnits.INCH_POUNDS, bridge_config=BridgeConfiguration.FULL_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, nominal_bridge_resistance=350.0, first_electrical_val=0.0, second_electrical_val=2.0, electrical_units=BridgeElectricalUnits.MILLIVOLTS_PER_VOLT, first_physical_val=0.0, second_physical_val=100.0, physical_units=BridgePhysicalUnits.INCH_POUNDS, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure torque. Use this instance with sensors whose specifications do not provide a polynomial for scaling or a table of electrical and physical values. When you use this scaling type, NI-DAQmx uses two points of electrical and physical values to calculate the slope and y-intercept of a linear equation and uses that equation to scale electrical values to physical values.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TorqueUnits]) – Specifies in which unit to return torque measurements from the channel.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • nominal_bridge_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • first_electrical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • second_electrical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • electrical_units (Optional[nidaqmx.constants.BridgeElectricalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • first_physical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • second_physical_val (Optional[float]) – Specifies how to scale electrical values from the sensor to physical units.

  • physical_units (Optional[nidaqmx.constants.BridgePhysicalUnits]) – Specifies how to scale electrical values from the sensor to physical units.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_velocity_iepe_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-50.0, max_val=50.0, units=VelocityUnits.INCHES_PER_SECOND, sensitivity=100.0, sensitivity_units=VelocityIEPESensorSensitivityUnits.MILLIVOLTS_PER_INCH_PER_SECOND, current_excit_source=ExcitationSource.INTERNAL, current_excit_val=0.002, custom_scale_name='')[source]

Creates channel(s) that use an IEPE velocity sensor to measure velocity.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.VelocityUnits]) – Specifies in which unit to return velocity measurements from the channel.

  • sensitivity (Optional[float]) – Is the sensitivity of the sensor. This value is in the units you specify with the sensitivity_units input. Refer to the sensor documentation to determine this value.

  • sensitivity_units (Optional[nidaqmx.constants.VelocityIEPESensorSensitivityUnits]) – Specifies the units of the sensitivity input.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_voltage_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-5.0, max_val=5.0, units=VoltageUnits.VOLTS, custom_scale_name='')[source]

Creates channel(s) to measure voltage. If the measurement requires the use of internal excitation or you need excitation to scale the voltage, use the AI Custom Voltage with Excitation instance of this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.VoltageUnits]) – Specifies the units to use to return voltage measurements.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_voltage_chan_with_excit(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-10.0, max_val=10.0, units=VoltageUnits.VOLTS, bridge_config=BridgeConfiguration.NO_BRIDGE, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=0.0, use_excit_for_scaling=False, custom_scale_name='')[source]

Creates channel(s) to measure voltage. Use this instance for custom sensors that require excitation. You can use the excitation to scale the measurement.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.VoltageUnits]) – Specifies the units to use to return voltage measurements.

  • bridge_config (Optional[nidaqmx.constants.BridgeConfiguration]) – Specifies what type of Wheatstone bridge the sensor is.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • use_excit_for_scaling (Optional[bool]) – Specifies if NI- DAQmx divides the measurement by the excitation. You should typically set use_excit_for_scaling to True for ratiometric transducers. If you set use_excit_for_scaling to True, set max_val and min_val to reflect the scaling.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_ai_voltage_rms_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-5.0, max_val=5.0, units=VoltageUnits.VOLTS, custom_scale_name='')[source]

Creates channel(s) to measure voltage RMS, the average (mean) power of the acquired voltage.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.VoltageUnits]) – Specifies the units to use to return voltage measurements.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_accel_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-5.0, max_val=5.0, units=AccelUnits.G, current_excit_source=ExcitationSource.INTERNAL, current_excit_val=0.004, custom_scale_name='')[source]

Creates channel(s) that use an accelerometer to measure acceleration. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.AccelUnits]) – Specifies the units to use to return acceleration measurements from the channel.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_bridge_chan(physical_channel, name_to_assign_to_channel='', min_val=-0.002, max_val=0.002, units=TEDSUnits.FROM_TEDS, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, custom_scale_name='')[source]

Creates channel(s) that measure a Wheatstone bridge. You must configure the physical channel(s) with TEDS information to use this function. Use this instance with bridge-based sensors that measure phenomena other than strain, force, pressure, or torque, or that scale data to physical units NI-DAQmx does not support.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TEDSUnits]) – Specifies in which unit to return measurements from the channel.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_current_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-0.01, max_val=0.01, units=TEDSUnits.FROM_TEDS, shunt_resistor_loc=CurrentShuntResistorLocation.LET_DRIVER_CHOOSE, ext_shunt_resistor_val=249.0, custom_scale_name='')[source]

Creates channel(s) to measure current. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TEDSUnits]) – Specifies the units to use to return measurements.

  • shunt_resistor_loc (Optional[nidaqmx.constants.CurrentShuntResistorLocation]) – Specifies the location of the shunt resistor. For devices with built-in shunt resistors, specify the location as INTERNAL. For devices that do not have built-in shunt resistors, you must attach an external one, set this input to EXTERNAL and use the ext_shunt_resistor_val input to specify the value of the resistor.

  • ext_shunt_resistor_val (Optional[float]) – Specifies in ohms the resistance of an external shunt resistor.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_force_bridge_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=ForceUnits.POUNDS, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure force or load. You must configure the physical channel(s) with TEDS information to use this function. NI-DAQmx scales electrical values to physical values according to that TEDS information.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ForceUnits]) – Specifies in which unit to return force measurements from the channel.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_force_iepe_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-2000.0, max_val=2000.0, units=ForceUnits.NEWTONS, current_excit_source=ExcitationSource.INTERNAL, current_excit_val=0.001, custom_scale_name='')[source]

Creates channel(s) that use an IEPE force sensor to measure force or load. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.ForceUnits]) – Specifies in which unit to return force measurements from the channel.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_microphone_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, units=SoundPressureUnits.PA, max_snd_press_level=100.0, current_excit_source=ExcitationSource.INTERNAL, current_excit_val=0.004, custom_scale_name='')[source]

Creates channel(s) that use a microphone to measure sound pressure. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. You must use physical channels that you configured with TEDS information. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • units (Optional[nidaqmx.constants.SoundPressureUnits]) – Specifies the units to use to return sound pressure measurements.

  • max_snd_press_level (Optional[float]) – Is the maximum instantaneous sound pressure level you expect to measure. This value is in decibels, referenced to 20 micropascals.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_pos_lvdt_chan(physical_channel, name_to_assign_to_channel='', min_val=-0.1, max_val=0.1, units=LengthUnits.METERS, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=1.0, voltage_excit_freq=2500.0, ac_excit_wire_mode=ACExcitWireMode.FOUR_WIRE, custom_scale_name='')[source]

Creates channel(s) that use an LVDT to measure linear position. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.LengthUnits]) – Specifies the units to use to return linear position measurements from the channel.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • voltage_excit_freq (Optional[float]) – Specifies in hertz the excitation frequency that the sensor requires. Refer to the sensor documentation to determine this value.

  • ac_excit_wire_mode (Optional[nidaqmx.constants.ACExcitWireMode]) – Is the number of leads on the sensor. Some sensors require you to tie leads together to create a four- or five- wire sensor. Refer to the sensor documentation for more information.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_pos_rvdt_chan(physical_channel, name_to_assign_to_channel='', min_val=-70.0, max_val=70.0, units=AngleUnits.DEGREES, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=1.0, voltage_excit_freq=2500.0, ac_excit_wire_mode=ACExcitWireMode.FOUR_WIRE, custom_scale_name='')[source]

Creates channel(s) that use an RVDT to measure angular position. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.AngleUnits]) – Specifies the units to use to return angular position measurements from the channel.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • voltage_excit_freq (Optional[float]) – Specifies in hertz the excitation frequency that the sensor requires. Refer to the sensor documentation to determine this value.

  • ac_excit_wire_mode (Optional[nidaqmx.constants.ACExcitWireMode]) – Is the number of leads on the sensor. Some sensors require you to tie leads together to create a four- or five- wire sensor. Refer to the sensor documentation for more information.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_pressure_bridge_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=PressureUnits.POUNDS_PER_SQ_INCH, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure pressure. You must configure the physical channel(s) with TEDS information to use this function. NI-DAQmx scales electrical values to physical values according to that TEDS information.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.PressureUnits]) – Specifies in which unit to return pressure measurements from the channel.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_resistance_chan(physical_channel, name_to_assign_to_channel='', min_val=100.0, max_val=1000.0, units=TEDSUnits.FROM_TEDS, resistance_config=ResistanceConfiguration.TWO_WIRE, current_excit_source=ExcitationSource.EXTERNAL, current_excit_val=0.001, custom_scale_name='')[source]

Creates channel(s) to measure resistance. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TEDSUnits]) – Specifies the units to use to return measurements.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_rtd_chan(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, resistance_config=ResistanceConfiguration.TWO_WIRE, current_excit_source=ExcitationSource.EXTERNAL, current_excit_val=0.0025)[source]

Creates channel(s) that use an RTD to measure temperature. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_strain_gage_chan(physical_channel, name_to_assign_to_channel='', min_val=-0.001, max_val=0.001, units=StrainUnits.STRAIN, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, initial_bridge_voltage=0.0, lead_wire_resistance=0.0, custom_scale_name='')[source]

Creates channel(s) to measure strain. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.StrainUnits]) – Specifies the units to use to return strain measurements.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies information about the bridge configuration and measurement.

  • voltage_excit_val (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • initial_bridge_voltage (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • lead_wire_resistance (Optional[float]) – Specifies information about the bridge configuration and measurement.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_thrmcpl_chan(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, cjc_source=CJCSource.CONSTANT_USER_VALUE, cjc_val=25.0, cjc_channel='')[source]

Creates channel(s) that use a thermocouple to measure temperature. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • cjc_source (Optional[nidaqmx.constants.CJCSource]) – Specifies the source of cold-junction compensation.

  • cjc_val (Optional[float]) – Specifies in units the temperature of the cold junction if you set cjc_source to CONSTANT_VALUE.

  • cjc_channel (Optional[str]) – Specifies the channel that acquires the temperature of the thermocouple cold- junction if you set cjc_source to CHANNEL.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_thrmstr_chan_iex(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, resistance_config=ResistanceConfiguration.FOUR_WIRE, current_excit_source=ExcitationSource.EXTERNAL, current_excit_val=0.00015)[source]

Creates channel(s) that use a thermistor to measure temperature. Use this instance when the thermistor requires current excitation. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • current_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • current_excit_val (Optional[float]) – Specifies in amperes the amount of excitation to supply to the sensor. Refer to the sensor documentation to determine this value.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_thrmstr_chan_vex(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=100.0, units=TemperatureUnits.DEG_C, resistance_config=ResistanceConfiguration.FOUR_WIRE, voltage_excit_source=ExcitationSource.EXTERNAL, voltage_excit_val=2.5, r_1=5000.0)[source]

Creates channel(s) that use a thermistor to measure temperature. Use this instance when the thermistor requires voltage excitation. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TemperatureUnits]) – Specifies the units to use to return temperature measurements.

  • resistance_config (Optional[nidaqmx.constants.ResistanceConfiguration]) – Specifies the number of wires to use for resistive measurements.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • r_1 (Optional[float]) – Specifies in ohms the value of the reference resistor.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_torque_bridge_chan(physical_channel, name_to_assign_to_channel='', min_val=-100.0, max_val=100.0, units=TorqueUnits.INCH_POUNDS, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=2.5, custom_scale_name='')[source]

Creates channel(s) that use a Wheatstone bridge to measure torque. You must configure the physical channel(s) with TEDS information to use this function. NI-DAQmx scales electrical values to physical values according to that TEDS information.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TorqueUnits]) – Specifies in which unit to return torque measurements from the channel.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_voltage_chan(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-5.0, max_val=5.0, units=TEDSUnits.FROM_TEDS, custom_scale_name='')[source]

Creates channel(s) to measure voltage. You must configure the physical channel(s) with TEDS information to use this function. If the measurement requires the use of internal excitation or you need excitation to scale the voltage, use the TEDS AI Custom Voltage with Excitation instance of this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TEDSUnits]) – Specifies the units to use to return measurements.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

add_teds_ai_voltage_chan_with_excit(physical_channel, name_to_assign_to_channel='', terminal_config=TerminalConfiguration.DEFAULT, min_val=-10.0, max_val=10.0, units=TEDSUnits.FROM_TEDS, voltage_excit_source=ExcitationSource.INTERNAL, voltage_excit_val=0.0, custom_scale_name='')[source]

Creates channel(s) to measure voltage. Use this instance for custom sensors that require excitation. You can use the excitation to scale the measurement. You must configure the physical channel(s) with TEDS information to use this function.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • terminal_config (Optional[nidaqmx.constants.TerminalConfiguration]) – Specifies the input terminal configuration for the channel.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TEDSUnits]) – Specifies the units to use to return measurements.

  • voltage_excit_source (Optional[nidaqmx.constants.ExcitationSource]) – Specifies the source of excitation.

  • voltage_excit_val (Optional[float]) – Specifies in volts the amount of excitation supplied to the sensor. Refer to the sensor documentation to determine appropriate excitation values.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AIChannel

class nidaqmx.task.collections.AOChannelCollection(task_handle, interpreter)[source]

Bases: ChannelCollection

Contains the collection of analog output channels for a DAQmx Task.

add_ao_current_chan(physical_channel, name_to_assign_to_channel='', min_val=0.0, max_val=0.02, units=CurrentUnits.AMPS, custom_scale_name='')[source]

Creates channel(s) to generate current.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.CurrentUnits]) – Specifies the units to use to generate current.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AOChannel

add_ao_func_gen_chan(physical_channel, name_to_assign_to_channel='', type=FuncGenType.SINE, freq=1000.0, amplitude=5.0, offset=0.0)[source]

Creates a channel for continually generating a waveform on the selected physical channel.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • type (Optional[nidaqmx.constants.FuncGenType]) – Specifies the kind of waveform to generate.

  • freq (Optional[float]) – Is the frequency of the waveform to generate in hertz.

  • amplitude (Optional[float]) – Is the zero-to-peak amplitude of the waveform to generate in volts. Zero and negative values are valid.

  • offset (Optional[float]) – Is the voltage offset of the waveform to generate.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AOChannel

add_ao_voltage_chan(physical_channel, name_to_assign_to_channel='', min_val=-10.0, max_val=10.0, units=VoltageUnits.VOLTS, custom_scale_name='')[source]

Creates channel(s) to generate voltage.

Parameters:
  • physical_channel (str) – Specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to generate.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to generate.

  • units (Optional[nidaqmx.constants.VoltageUnits]) – Specifies the units to use to generate voltage.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.AOChannel

class nidaqmx.task.collections.CIChannelCollection(task_handle, interpreter)[source]

Bases: ChannelCollection

Contains the collection of counter input channels for a DAQmx Task.

add_ci_ang_encoder_chan(counter, name_to_assign_to_channel='', decoding_type=EncoderType.X_4, zidx_enable=False, zidx_val=0, zidx_phase=EncoderZIndexPhase.AHIGH_BHIGH, units=AngleUnits.DEGREES, pulses_per_rev=24, initial_angle=0.0, custom_scale_name='')[source]

Creates a channel that uses an angular encoder to measure angular position. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • decoding_type (Optional[nidaqmx.constants.EncoderType]) – Specifies how to count and interpret the pulses the encoder generates on signal A and signal B. X_1, X_2, and X_4 are valid for quadrature encoders only. TWO_PULSE_COUNTING is valid only for two-pulse encoders.

  • zidx_enable (Optional[bool]) – Specifies whether to use Z indexing for the channel.

  • zidx_val (Optional[float]) – Specifies in units the value to which to reset the measurement when signal Z is high and signal A and signal B are at the states you specify with zidx_phase.

  • zidx_phase (Optional[nidaqmx.constants.EncoderZIndexPhase]) – Specifies the states at which signal A and signal B must be while signal Z is high for NI-DAQmx to reset the measurement. If signal Z is never high while signal A and signal B are high, for example, you must choose a phase other than A_HIGH_B_HIGH.

  • units (Optional[nidaqmx.constants.AngleUnits]) – Specifies the units to use to return angular position measurements from the channel.

  • pulses_per_rev (Optional[int]) – Is the number of pulses the encoder generates per revolution. This value is the number of pulses on either signal A or signal B, not the total number of pulses on both signal A and signal B.

  • initial_angle (Optional[float]) – Is the starting angle of the encoder. This value is in the units you specify with the units input.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_ang_velocity_chan(counter, name_to_assign_to_channel='', min_val=0.0, max_val=1.0, decoding_type=EncoderType.X_4, units=AngularVelocityUnits.RPM, pulses_per_rev=24, custom_scale_name='')[source]

Creates a channel to measure the angular velocity of a digital signal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • decoding_type (Optional[nidaqmx.constants.EncoderType]) – Specifies how to count and interpret the pulses the encoder generates on signal A and signal B. X_1, X_2, and X_4 are valid for quadrature encoders only. TWO_PULSE_COUNTING is valid only for two-pulse encoders.

  • units (Optional[nidaqmx.constants.AngularVelocityUnits]) – Specifies in which unit to return velocity measurements from the channel.

  • pulses_per_rev (Optional[int]) – Is the number of pulses the encoder generates per revolution. This value is the number of pulses on either signal A or signal B, not the total number of pulses on both signal A and signal B.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_count_edges_chan(counter, name_to_assign_to_channel='', edge=Edge.RISING, initial_count=0, count_direction=CountDirection.COUNT_UP)[source]

Creates a channel to count the number of rising or falling edges of a digital signal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • edge (Optional[nidaqmx.constants.Edge]) – Specifies on which edges of the input signal to increment or decrement the count.

  • initial_count (Optional[int]) – Is the value from which to start counting.

  • count_direction (Optional[nidaqmx.constants.CountDirection]) – Specifies whether to increment or decrement the counter on each edge.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_duty_cycle_chan(counter, name_to_assign_to_channel='', min_freq=2.0, max_freq=10000.0, edge=Edge.RISING, custom_scale_name='')[source]

Creates channel(s) to duty cycle of a digital pulse. Connect the input signal to the default input terminal of the counter unless you select a different input terminal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_freq (Optional[float]) – Specifies the minimum frequency you expect to measure.

  • max_freq (Optional[float]) – Specifies the maximum frequency you expect to measure.

  • edge (Optional[nidaqmx.constants.Edge]) – Specifies between which edges to measure the frequency or period of the signal.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_freq_chan(counter, name_to_assign_to_channel='', min_val=2.0, max_val=100.0, units=FrequencyUnits.HZ, edge=Edge.RISING, meas_method=CounterFrequencyMethod.LOW_FREQUENCY_1_COUNTER, meas_time=0.001, divisor=4, custom_scale_name='')[source]

Creates a channel to measure the frequency of a digital signal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.FrequencyUnits]) – Specifies the units to use to return frequency measurements.

  • edge (Optional[nidaqmx.constants.Edge]) – Specifies between which edges to measure the frequency or period of the signal.

  • meas_method (Optional[nidaqmx.constants.CounterFrequencyMethod]) – Specifies the method to use to calculate the period or frequency of the signal.

  • meas_time (Optional[float]) – Is the length of time in seconds to measure the frequency or period of the signal if meas_method is HIGH_FREQUENCYWITH_2_COUNTERS. Leave this input unspecified if meas_method is not HIGH_FREQUENCYWITH_2_COUNTERS.

  • divisor (Optional[int]) – Is the value by which to divide the input signal when meas_method is LARGE_RANGEWITH_2_COUNTERS. Leave this input unspecified if meas_method is not LARGE_RANGEWITH_2_COUNTERS.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_gps_timestamp_chan(counter, name_to_assign_to_channel='', units=TimeUnits.SECONDS, sync_method=GpsSignalType.IRIGB, custom_scale_name='')[source]

Creates a channel that uses a special purpose counter to take a timestamp and synchronizes that counter to a GPS receiver. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units to use to return the timestamp.

  • sync_method (Optional[nidaqmx.constants.GpsSignalType]) – Specifies the method to use to synchronize the counter to a GPS receiver.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_lin_encoder_chan(counter, name_to_assign_to_channel='', decoding_type=EncoderType.X_4, zidx_enable=False, zidx_val=0, zidx_phase=EncoderZIndexPhase.AHIGH_BHIGH, units=LengthUnits.METERS, dist_per_pulse=0.001, initial_pos=0.0, custom_scale_name='')[source]

Creates a channel that uses a linear encoder to measure linear position. With the exception of devices that support multi- counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • decoding_type (Optional[nidaqmx.constants.EncoderType]) – Specifies how to count and interpret the pulses the encoder generates on signal A and signal B. X_1, X_2, and X_4 are valid for quadrature encoders only. TWO_PULSE_COUNTING is valid only for two-pulse encoders.

  • zidx_enable (Optional[bool]) – Specifies whether to use Z indexing for the channel.

  • zidx_val (Optional[float]) – Specifies in units the value to which to reset the measurement when signal Z is high and signal A and signal B are at the states you specify with zidx_phase.

  • zidx_phase (Optional[nidaqmx.constants.EncoderZIndexPhase]) – Specifies the states at which signal A and signal B must be while signal Z is high for NI-DAQmx to reset the measurement. If signal Z is never high while signal A and signal B are high, for example, you must choose a phase other than A_HIGH_B_HIGH.

  • units (Optional[nidaqmx.constants.LengthUnits]) – Specifies the units to use to return linear position measurements from the channel.

  • dist_per_pulse (Optional[float]) – Is the distance to measure for each pulse the encoder generates on signal A or signal B. This value is in the units you specify with the units input.

  • initial_pos (Optional[float]) – Is the position of the encoder when you begin the measurement. This value is in the units you specify with the units input.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_lin_velocity_chan(counter, name_to_assign_to_channel='', min_val=0.0, max_val=1.0, decoding_type=EncoderType.X_4, units=VelocityUnits.METERS_PER_SECOND, dist_per_pulse=0.001, custom_scale_name='')[source]

Creates a channel that uses a linear encoder to measure linear velocity. With the exception of devices that support multi- counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • decoding_type (Optional[nidaqmx.constants.EncoderType]) – Specifies how to count and interpret the pulses the encoder generates on signal A and signal B. X_1, X_2, and X_4 are valid for quadrature encoders only. TWO_PULSE_COUNTING is valid only for two-pulse encoders.

  • units (Optional[nidaqmx.constants.VelocityUnits]) – Specifies in which unit to return velocity measurements from the channel.

  • dist_per_pulse (Optional[float]) – Is the distance to measure for each pulse the encoder generates on signal A or signal B. This value is in the units you specify with the units input.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_period_chan(counter, name_to_assign_to_channel='', min_val=1e-06, max_val=0.1, units=TimeUnits.SECONDS, edge=Edge.RISING, meas_method=CounterFrequencyMethod.LOW_FREQUENCY_1_COUNTER, meas_time=0.001, divisor=4, custom_scale_name='')[source]

Creates a channel to measure the period of a digital signal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units to use to return time or period measurements.

  • edge (Optional[nidaqmx.constants.Edge]) – Specifies between which edges to measure the frequency or period of the signal.

  • meas_method (Optional[nidaqmx.constants.CounterFrequencyMethod]) – Specifies the method to use to calculate the period or frequency of the signal.

  • meas_time (Optional[float]) – Is the length of time in seconds to measure the frequency or period of the signal if meas_method is HIGH_FREQUENCYWITH_2_COUNTERS. Leave this input unspecified if meas_method is not HIGH_FREQUENCYWITH_2_COUNTERS.

  • divisor (Optional[int]) – Is the value by which to divide the input signal when meas_method is LARGE_RANGEWITH_2_COUNTERS. Leave this input unspecified if meas_method is not LARGE_RANGEWITH_2_COUNTERS.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_pulse_chan_freq(counter, name_to_assign_to_channel='', min_val=1000, max_val=1000000, units=FrequencyUnits.HZ)[source]

Creates a channel to measure pulse specifications, returning the measurements as pairs of frequency and duty cycle. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.FrequencyUnits]) – Specifies the units to use to return pulse specifications in terms of frequency.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_pulse_chan_ticks(counter, name_to_assign_to_channel='', source_terminal='OnboardClock', min_val=1000, max_val=1000000)[source]

Creates a channel to measure pulse specifications, returning the measurements as pairs of high ticks and low ticks. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • source_terminal (Optional[str]) – Is the terminal to which you connect a signal to use as the source of ticks. A DAQmx terminal constant lists all terminals available on devices installed in the system. You also can specify a source terminal by specifying a string that contains a terminal name. If you specify OnboardClock, or do not specify any terminal, NI-DAQmx selects the fastest onboard timebase available on the device.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_pulse_chan_time(counter, name_to_assign_to_channel='', min_val=1e-06, max_val=0.001, units=TimeUnits.SECONDS)[source]

Creates a channel to measure pulse specifications, returning the measurements as pairs of high time and low time. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units to use to return pulse specifications in terms of high time and low time.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_pulse_width_chan(counter, name_to_assign_to_channel='', min_val=1e-06, max_val=0.1, units=TimeUnits.SECONDS, starting_edge=Edge.RISING, custom_scale_name='')[source]

Creates a channel to measure the width of a digital pulse. starting_edge determines whether to measure a high pulse or low pulse. With the exception of devices that support multi- counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units to use to return time or period measurements.

  • starting_edge (Optional[nidaqmx.constants.Edge]) – Specifies on which edge to begin measuring pulse width.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_semi_period_chan(counter, name_to_assign_to_channel='', min_val=1e-06, max_val=0.1, units=TimeUnits.SECONDS, custom_scale_name='')[source]

Creates a channel to measure the time between state transitions of a digital signal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signal to the default input terminal of the counter unless you select a different input terminal.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units to use to return time or period measurements.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

add_ci_two_edge_sep_chan(counter, name_to_assign_to_channel='', min_val=1e-06, max_val=1.0, units=TimeUnits.SECONDS, first_edge=Edge.RISING, second_edge=Edge.FALLING, custom_scale_name='')[source]

Creates a channel that measures the amount of time between the rising or falling edge of one digital signal and the rising or falling edge of another digital signal. With the exception of devices that support multi-counter tasks, you can create only one counter input channel at a time with this function because a task can contain only one counter input channel. To read from multiple counters simultaneously, use a separate task for each counter. Connect the input signals to the default input terminals of the counter unless you select different input terminals.

Parameters:
  • counter (str) – Specifies the name of the counter to use to create the virtual channel. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • min_val (Optional[float]) – Specifies in units the minimum value you expect to measure.

  • max_val (Optional[float]) – Specifies in units the maximum value you expect to measure.

  • units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units to use to return time or period measurements.

  • first_edge (Optional[nidaqmx.constants.Edge]) – Specifies on which edge of the first signal to start each measurement.

  • second_edge (Optional[nidaqmx.constants.Edge]) – Specifies on which edge of the second signal to stop each measurement.

  • custom_scale_name (Optional[str]) – Specifies the name of a custom scale for the channel. If you want the channel to use a custom scale, specify the name of the custom scale to this input and set units to FROM_CUSTOM_SCALE.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.CIChannel

class nidaqmx.task.collections.COChannelCollection(task_handle, interpreter)[source]

Bases: ChannelCollection

Contains the collection of counter output channels for a DAQmx Task.

add_co_pulse_chan_freq(counter, name_to_assign_to_channel='', units=FrequencyUnits.HZ, idle_state=Level.LOW, initial_delay=0.0, freq=1.0, duty_cycle=0.5)[source]

Creates channel(s) to generate digital pulses that freq and duty_cycle define. The pulses appear on the default output terminal of the counter unless you select a different output terminal.

Parameters:
  • counter (str) – Specifies the names of the counters to use to create the virtual channels. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • units (Optional[nidaqmx.constants.FrequencyUnits]) – Specifies the units in which to define pulse frequency.

  • idle_state (Optional[nidaqmx.constants.Level]) – Specifies the resting state of the output terminal.

  • initial_delay (Optional[float]) – Is the amount of time in seconds to wait before generating the first pulse.

  • freq (Optional[float]) – Specifies at what frequency to generate pulses.

  • duty_cycle (Optional[float]) – Is the width of the pulse divided by the pulse period. NI-DAQmx uses this ratio combined with frequency to determine pulse width and the interval between pulses.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.COChannel

add_co_pulse_chan_ticks(counter, source_terminal, name_to_assign_to_channel='', idle_state=Level.LOW, initial_delay=0, low_ticks=100, high_ticks=100)[source]

Creates channel(s) to generate digital pulses defined by the number of timebase ticks that the pulse is at a high state and the number of timebase ticks that the pulse is at a low state. The pulses appear on the default output terminal of the counter unless you select a different output terminal.

Parameters:
  • counter (str) – Specifies the names of the counters to use to create the virtual channels. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • source_terminal (str) – Is the terminal to which you connect an external timebase. A DAQmx terminal constant lists all terminals available on devices installed in the system. You also can specify a source terminal by specifying a string that contains a terminal name.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • idle_state (Optional[nidaqmx.constants.Level]) – Specifies the resting state of the output terminal.

  • initial_delay (Optional[int]) – Is the number of timebase ticks to wait before generating the first pulse.

  • low_ticks (Optional[int]) – Is the number of ticks the pulse is low.

  • high_ticks (Optional[int]) – Is the number of ticks the pulse is high.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.COChannel

add_co_pulse_chan_time(counter, name_to_assign_to_channel='', units=TimeUnits.SECONDS, idle_state=Level.LOW, initial_delay=0.0, low_time=0.01, high_time=0.01)[source]

Creates channel(s) to generate digital pulses defined by the amount of time the pulse is at a high state and the amount of time the pulse is at a low state. The pulses appear on the default output terminal of the counter unless you select a different output terminal.

Parameters:
  • counter (str) – Specifies the names of the counters to use to create the virtual channels. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.

  • name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units in which to define pulse high and low time.

  • idle_state (Optional[nidaqmx.constants.Level]) – Specifies the resting state of the output terminal.

  • initial_delay (Optional[float]) – Is the amount of time in seconds to wait before generating the first pulse.

  • low_time (Optional[float]) – Is the amount of time the pulse is low.

  • high_time (Optional[float]) – Is the amount of time the pulse is high.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.COChannel

class nidaqmx.task.collections.DIChannelCollection(task_handle, interpreter)[source]

Bases: ChannelCollection

Contains the collection of digital input channels for a DAQmx Task.

add_di_chan(lines, name_to_assign_to_lines='', line_grouping=LineGrouping.CHAN_FOR_ALL_LINES)[source]

Creates channel(s) to measure digital signals. You can group digital lines into one digital channel or separate them into multiple digital channels. If you specify one or more entire ports in the lines input by using port physical channel names, you cannot separate the ports into multiple channels. To separate ports into multiple channels, use this function multiple times with a different port each time.

Parameters:
  • lines (str) – Specifies the names of the digital lines or ports to use to create virtual channels. The DAQmx physical channel constant lists all lines and ports for devices installed in the system.

  • name_to_assign_to_lines (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • line_grouping (Optional[nidaqmx.constants.LineGrouping]) – Specifies how to group digital lines into one or more virtual channels. If you specify one or more entire ports with the lines input, you must set this input to one channel for all lines.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.DIChannel

class nidaqmx.task.collections.DOChannelCollection(task_handle, interpreter)[source]

Bases: ChannelCollection

Contains the collection of digital output channels for a DAQmx Task.

add_do_chan(lines, name_to_assign_to_lines='', line_grouping=LineGrouping.CHAN_FOR_ALL_LINES)[source]

Creates channel(s) to generate digital signals. You can group digital lines into one digital channel or separate them into multiple digital channels. If you specify one or more entire ports in lines input by using port physical channel names, you cannot separate the ports into multiple channels. To separate ports into multiple channels, use this function multiple times with a different port each time.

Parameters:
  • lines (str) – Specifies the names of the digital lines or ports to use to create virtual channels. The DAQmx physical channel constant lists all lines and ports for devices installed in the system.

  • name_to_assign_to_lines (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.

  • line_grouping (Optional[nidaqmx.constants.LineGrouping]) – Specifies how to group digital lines into one or more virtual channels. If you specify one or more entire ports with the lines input, you must set this input to one channel for all lines.

Returns:

Indicates the newly created channel object.

Return type:

nidaqmx.task.channels.DOChannel