nidaqmx.task.di_channel

class nidaqmx._task_modules.channels.di_channel.DIChannel(task_handle, virtual_or_physical_name, interpreter)[source]

Bases: nidaqmx._task_modules.channels.channel.Channel

Represents one or more digital input virtual channels and their properties.

property chan_type

Indicates the type of the virtual channel.

Type

nidaqmx.constants.ChannelType

property channel_names

Specifies the unflattened list of the virtual channels.

Type

List[str]

property description

Specifies a user-defined description for the channel.

Type

str

property di_acquire_on

nidaqmx.constants.ActiveOrInactiveEdgeSelection: Specifies on which edge of the sample clock to acquire samples.

property di_data_xfer_mech

nidaqmx.constants.DataTransferActiveTransferMode: Specifies the data transfer mode for the device.

property di_data_xfer_req_cond

Specifies under what condition to transfer data from the onboard memory of the device to the buffer.

Type

nidaqmx.constants.InputDataTransferCondition

property di_dig_fltr_enable

Specifies whether to enable the digital filter for the line(s) or port(s). You can enable the filter on a line-by- line basis. You do not have to enable the filter for all lines in a channel.

Type

bool

property di_dig_fltr_enable_bus_mode

Specifies whether to enable bus mode for digital filtering. If you set this property to True, NI-DAQmx treats all lines that use common filtering settings as a bus. If any line in the bus has jitter, all lines in the bus hold state until the entire bus stabilizes, or until 2 times the minimum pulse width elapses. If you set this property to False, NI-DAQmx filters all lines individually. Jitter in one line does not affect other lines.

Type

bool

property di_dig_fltr_min_pulse_width

Specifies in seconds the minimum pulse width the filter recognizes as a valid high or low state transition.

Type

float

property di_dig_fltr_timebase_rate

Specifies in hertz the rate of the digital filter timebase. NI-DAQmx uses this value to compute settings for the filter.

Type

float

property di_dig_fltr_timebase_src

Specifies the terminal of the signal to use as the timebase of the digital filter.

Type

str

property di_dig_sync_enable

Specifies whether to synchronize recognition of transitions in the signal to the internal timebase of the device.

Type

bool

property di_invert_lines

Specifies whether to invert the lines in the channel. If you set this property to True, the lines are at high logic when off and at low logic when on.

Type

bool

property di_logic_family

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

Type

nidaqmx.constants.LogicFamily

property di_mem_map_enable

Specifies for NI-DAQmx to map hardware registers to the memory space of the application, if possible. Normally, NI- DAQmx maps hardware registers to memory accessible only to the kernel. Mapping the registers to the memory space of the application increases performance. However, if the application accesses the memory space mapped to the registers, it can adversely affect the operation of the device and possibly result in a system crash.

Type

bool

property di_num_lines

Indicates the number of digital lines in the channel.

Type

int

property di_tristate

Specifies whether to tristate the lines in the channel. If you set this property to True, NI-DAQmx tristates the lines in the channel. If you set this property to False, NI-DAQmx does not modify the configuration of the lines even if the lines were previously tristated. Set this property to False to read lines in other tasks or to read output-only lines.

Type

bool

property di_usb_xfer_req_count

Specifies the maximum number of simultaneous USB transfers used to stream data. Modify this value to affect performance under different combinations of operating system and device.

Type

int

property di_usb_xfer_req_size

Specifies the maximum size of a USB transfer request in bytes. Modify this value to affect performance under different combinations of operating system and device.

Type

int

property is_global

Indicates whether the channel is a global channel.

Type

bool

property name

Specifies the name of the virtual channel this object represents.

Type

str

property physical_channel

nidaqmx.system.physical_channel.PhysicalChannel: Specifies the name of the physical channel upon which this virtual channel is based.

save(save_as='', author='', overwrite_existing_channel=False, allow_interactive_editing=True, allow_interactive_deletion=True)

Saves this local or global channel to MAX as a global channel.

Parameters
  • save_as (Optional[str]) – Is the name to save the task, global channel, or custom scale as. If you do not specify a value for this input, NI-DAQmx uses the name currently assigned to the task, global channel, or custom scale.

  • author (Optional[str]) – Is a name to store with the task, global channel, or custom scale.

  • overwrite_existing_channel (Optional[bool]) – Specifies whether to overwrite a global channel of the same name if one is already saved in MAX. If this input is False and a global channel of the same name is already saved in MAX, this function returns an error.

  • allow_interactive_editing (Optional[bool]) – Specifies whether to allow the task, global channel, or custom scale to be edited in the DAQ Assistant. If allow_interactive_editing is True, the DAQ Assistant must support all task or global channel settings.

  • allow_interactive_deletion (Optional[bool]) – Specifies whether to allow the task, global channel, or custom scale to be deleted through MAX.

property sync_unlock_behavior

Specifies the action to take if the target loses its synchronization to the grand master.

Type

nidaqmx.constants.SyncUnlockBehavior