nidaqmx.system

class nidaqmx.system.system.System(grpc_options=None)[source]

Bases: object

Represents a DAQmx system.

Contains static properties that access tasks, scales, and global channels stored in Measurement Automation Explorer (MAX), performs immediate operations on DAQ hardware, and creates classes from which you can get information about the hardware.

class DriverVersion(major_version, minor_version, update_version)

Bases: tuple

property major_version

Alias for field number 0

property minor_version

Alias for field number 1

property update_version

Alias for field number 2

add_cdaq_sync_connection(ports_to_connect)[source]

Adds a cDAQ Sync connection between devices. The connection is not verified.

Parameters

ports_to_connect (nidaqmx.types.CDAQSyncConnection) – Specifies the cDAQ Sync ports to connect.

are_configured_cdaq_sync_ports_disconnected(chassis_devices_ports='', timeout=- 1.0)[source]

Verifies configured cDAQ Sync connections between devices. Failures generally indicate a wiring issue or that a device has been powered off or removed. Stop all NI-DAQmx tasks running on the devices prior to running this function because any running tasks cause the verification process to fail.

Parameters
  • chassis_devices_ports (Optional[str]) – Specifies the names of the CompactDAQ chassis, C Series modules, or cDAQ Sync ports in comma separated form to search. If no names are specified, all cDAQ Sync ports on connected, non-simulated devices are scanned.

  • timeout (Optional[float]) – Specifies the time in seconds to wait for the device to respond before timing out.

Returns

Returns the port-to-port connections that failed verification.

Return type

List[nidaqmx.types.CDAQSyncConnection]

auto_configure_cdaq_sync_connections(chassis_devices_ports='', timeout=- 1.0)[source]

Detects and configures cDAQ Sync connections between devices. Stop all NI-DAQmx tasks running on the devices prior to running this function because any running tasks cause auto-configuration to fail.

Parameters
  • chassis_devices_ports (Optional[str]) – Specifies the names of the CompactDAQ chassis, C Series modules, or cDAQ Sync ports in comma separated form to search. If no names are specified, all cDAQ Sync ports on connected, non-simulated devices are scanned.

  • timeout (Optional[float]) – Specifies the time in seconds to wait for the device to respond before timing out. If a timeout occurs, no configuration is changed.

Returns

Returns the configured port-to-port connections.

Return type

List[nidaqmx.types.CDAQSyncConnection]

connect_terms(source_terminal, destination_terminal, signal_modifiers=SignalModifiers.DO_NOT_INVERT_POLARITY)[source]

Creates a route between a source and destination terminal. The route can carry a variety of digital signals, such as triggers, clocks, and hardware events.

Parameters
  • source_terminal (str) – Specifies the originating terminal of the route. 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.

  • destination_terminal (str) – Specifies the receiving terminal of the route. A DAQmx terminal constant provides a list of all terminals available on devices installed in the system. You also can specify a destination terminal by specifying a string that contains a terminal name.

  • signal_modifiers (Optional[nidaqmx.constants.SignalModifiers]) – Specifies whether to invert the signal this function routes from the source terminal to the destination terminal.

property devices

Indicates the collection of devices for this DAQmx system.

Type

nidaqmx.system._collections.DeviceCollection

disconnect_terms(source_terminal, destination_terminal)[source]

Removes signal routes you created by using the DAQmx Connect Terminals function. The DAQmx Disconnect Terminals function cannot remove task-based routes, such as those you create through timing and triggering configuration.

Parameters
  • source_terminal (str) – Specifies the originating terminal of the route. 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.

  • destination_terminal (str) – Specifies the receiving terminal of the route. A DAQmx terminal constant provides a list of all terminals available on devices installed in the system. You also can specify a destination terminal by specifying a string that contains a terminal name.

property driver_version

Indicates the major, minor and update portions of the installed version of NI-DAQmx.

  • major_version (int): Indicates the major portion of the installed version of NI-DAQmx, such as 7 for version 7.0.

  • minor_version (int): Indicates the minor portion of the installed version of NI-DAQmx, such as 0 for version 7.0.

  • update_version (int): Indicates the update portion of the installed version of NI-DAQmx, such as 1 for version 9.0.1.

Type

collections.namedtuple

get_analog_power_up_states(device_name)[source]

Gets the power up states for analog physical channels.

Parameters

device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

Returns

Contains the physical channels and power up states set. Each element of the list contains a physical channel and the power up state set for that physical channel.

  • physical_channel (str): Specifies the physical channel that was modified.

  • power_up_state (float): Specifies the power up state set for the physical channel specified with the physical_channel input.

  • channel_type (nidaqmx.constants.AOPowerUpOutputBehavior): Specifies the output type for the physical channel specified with the physical_channel input.

Return type

power_up_states (List[nidaqmx.types.AOPowerUpState])

get_analog_power_up_states_with_output_type(physical_channels)[source]

Gets the power up states for analog physical channels.

Parameters

physical_channels (List[str]) – Indicates the physical channels that were modified.

Returns

Contains the physical channels and power up states set. Each element of the list contains a physical channel and the power up state set for that physical channel.

  • physical_channel (str): Specifies the physical channel that was modified.

  • power_up_state (float): Specifies the power up state set for the physical channel specified with the physical_channel input.

  • channel_type (nidaqmx.constants.AOPowerUpOutputBehavior): Specifies the output type for the physical channel specified with the physical_channel input.

Return type

power_up_states (List[nidaqmx.types.AOPowerUpState])

get_digital_logic_family_power_up_state(device_name)[source]

Gets the digital logic family for a device.

Parameters

device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

Returns

Specifies the logic family to set the device to when it powers up. A logic family corresponds to voltage thresholds that are compatible with a group of voltage standards. Refer to device documentation for information on the logic high and logic low voltages for these logic families.

Return type

nidaqmx.constants.LogicFamily

get_digital_power_up_states(device_name)[source]

Gets the power up states for digital physical lines.

Parameters

device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

Returns

Contains the physical channels and power up states set. Each element of the list contains a physical channel and the power up state set for that physical channel.

  • physical_channel (str): Indicates the physical channel that was modified.

  • power_up_state (nidaqmx.constants.PowerUpStates): Indicates the power up state set for the physical channel specified with the physical_channel output.

Return type

List[nidaqmx.types.DOPowerUpState]

get_digital_pull_up_pull_down_states(device_name)[source]

Gets the resistor level for lines when they are in tristate logic.

Parameters

device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

Returns

Contains the physical channels and power up states set. Each element of the list contains a physical channel and the power up state set for that physical channel.

  • physical_channel (str): Indicates the physical channel that was modified.

  • power_up_state (nidaqmx.constants.ResistorState): Indicates the power up state set for the physical channel specified with the physical_channel output.

Return type

List[nidaqmx.types.DOResistorPowerUpState]

property global_channels

Indicates the collection of global channels for this DAQmx system.

Type

nidaqmx.system._collections.PersistedChannelCollection

static local()[source]

nidaqmx.system.system.System: Represents the local DAQmx system.

static remote(grpc_options)[source]

nidaqmx.system.system.System: Represents the remote DAQmx system.

Parameters

grpc_options (GrpcSessionOptions) – Specifies the gRPC session options.

remove_cdaq_sync_connection(ports_to_disconnect)[source]

Removes a cDAQ Sync connection between devices. The connection is not verified.

Parameters

ports_to_disconnect (nidaqmx.types.CDAQSyncConnection) – Specifies the cDAQ Sync ports to disconnect.

property scales

Indicates the collection of custom scales for this DAQmx system.

Type

nidaqmx.system._collections.PersistedScaleCollection

set_analog_power_up_states(device_name, power_up_states)[source]

Updates power up states for analog physical channels.

Parameters
  • device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

  • power_up_states (List[nidaqmx.types.AOPowerUpState]) –

    Contains the physical channels and power up states to set. Each element of the list contains a physical channel and the power up state to set for that physical channel.

    • physical_channel (str): Specifies the physical channel to modify.

    • power_up_state (float): Specifies the power up state to set for the physical channel specified with the physical_channel input.

    • channel_type (nidaqmx.constants.AOPowerUpOutputBehavior): Specifies the output type for the physical channel specified with the physical_channel input.

set_analog_power_up_states_with_output_type(power_up_states)[source]

Updates power up states for analog physical channels.

Parameters

power_up_states (List[nidaqmx.types.AOPowerUpState]) –

Contains the physical channels and power up states to set. Each element of the list contains a physical channel and the power up state to set for that physical channel.

  • physical_channel (str): Specifies the physical channel to modify.

  • power_up_state (float): Specifies the power up state to set for the physical channel specified with the physical_channel input.

  • channel_type (nidaqmx.constants.AOPowerUpOutputBehavior): Specifies the output type for the physical channel specified with the physical_channel input.

set_digital_logic_family_power_up_state(device_name, logic_family)[source]

Sets the digital logic family to use when the device powers up.

Parameters
  • device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

  • logic_family (nidaqmx.constants.LogicFamily) – Specifies the logic family set to the device to when it powers up. A logic family corresponds to voltage thresholds that are compatible with a group of voltage standards. Refer to device documentation for information on the logic high and logic low voltages for these logic families.

set_digital_power_up_states(device_name, power_up_states)[source]

Updates power up states for digital physical channels.

Parameters
  • device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

  • power_up_states (List[nidaqmx.types.DOPowerUpState]) –

    Contains the physical channels and power up states to set. Each element of the list contains a physical channel and the power up state to set for that physical channel.

    • physical_channel (str): Specifies the digital line or port to modify. You cannot modify dedicated digital input lines.

    • power_up_state (nidaqmx.constants.PowerUpStates): Specifies the power up state to set for the physical channel specified with the physical_channel input.

set_digital_pull_up_pull_down_states(device_name, power_up_states)[source]

Sets the resistor level to pull up or pull down for lines when they are in tristate logic.

Parameters
  • device_name (str) – Specifies the name as configured in MAX of the device to which this operation applies.

  • power_up_states (List[nidaqmx.types.DOResistorPowerUpState]) –

    Contains the physical channels and power up states to set. Each element of the list contains a physical channel and the power up state to set for that physical channel.

    • physical_channel (str): Specifies the digital line or port to modify. You cannot modify dedicated digital input lines.

    • power_up_state (nidaqmx.constants.ResistorState): Specifies the power up state to set for the physical channel specified with the physical_channel input.

property tasks

Indicates the collection of saved tasks for this DAQmx system.

Type

nidaqmx.system._collections.PersistedTaskCollection

tristate_output_term(output_terminal)[source]

Sets a terminal to high-impedance state. If you connect an external signal to a terminal on the I/O connector, the terminal must be in high-impedance state. Otherwise, the device could double-drive the terminal and damage the hardware. If you use this function on a terminal in an active route, the function fails and returns an error.

Parameters

output_terminal (str) – Specifies the terminal on the I/O connector to set to high-impedance state. A DAQmx terminal constant lists all available terminals on installed devices. You also can specify an output terminal by using a string that contains a terminal name.