nidaqmx.task.timing

class nidaqmx._task_modules.timing.Timing(task_handle)[source]

Bases: object

Represents the timing configurations for a DAQmx task.

ai_conv_active_edge

nidaqmx.constants.Edge – Specifies on which edge of the clock pulse an analog-to-digital conversion takes place.

ai_conv_dig_fltr_enable

bool – Specifies whether to apply a digital filter to the AI Convert Clock.

ai_conv_dig_fltr_min_pulse_width

float – Specifies in seconds the minimum pulse width the filter recognizes.

ai_conv_dig_fltr_timebase_rate

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

ai_conv_dig_fltr_timebase_src

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

ai_conv_dig_sync_enable

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

ai_conv_max_rate

float – Indicates the maximum convert rate supported by the task, given the current devices and channel count.

ai_conv_rate

float – Specifies in Hertz the rate at which to clock the analog- to-digital converter. This clock is specific to the analog input section of multiplexed devices.

ai_conv_src

str – Specifies the terminal of the signal to use as the AI Convert Clock.

ai_conv_timebase_div

int – Specifies the number of AI Convert Clock Timebase pulses needed to produce a single AI Convert Clock pulse.

ai_conv_timebase_src

nidaqmx.constants.MIOAIConvertTimebaseSource – Specifies the terminal of the signal to use as the AI Convert Clock Timebase.

cfg_burst_handshaking_timing_export_clock(sample_clk_rate, sample_clk_outp_term, sample_mode=<AcquisitionType.FINITE: 10178>, samps_per_chan=1000, sample_clk_pulse_polarity=<Polarity.ACTIVE_HIGH: 10095>, pause_when=<Level.HIGH: 10192>, ready_event_active_level=<Polarity.ACTIVE_HIGH: 10095>)[source]

Configures when the DAQ device transfers data to a peripheral device, using the onboard Sample Clock of the DAQ device to control burst handshake timing and exporting that clock for use by the peripheral device.

Parameters:
  • sample_clk_rate (float) – Specifies in hertz the rate of the Sample Clock.
  • sample_clk_outp_term (str) – Specifies the terminal to which to export the Sample Clock.
  • sample_mode (Optional[nidaqmx.constants.AcquisitionType]) – Specifies if the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
  • samps_per_chan (Optional[long]) – Specifies the number of samples to acquire or generate for each channel in the task if sample_mode is FINITE_SAMPLES. If sample_mode is CONTINUOUS_SAMPLES, NI-DAQmx uses this value to determine the buffer size. This function returns an error if the specified value is negative.
  • sample_clk_pulse_polarity (Optional[nidaqmx.constants.Polarity]) – Specifies the polarity of the exported Sample Clock.
  • pause_when (Optional[nidaqmx.constants.Level]) – Specifies whether the task pauses while the trigger signal is high or low.
  • ready_event_active_level (Optional[nidaqmx.constants.Polarity]) – Specifies the polarity of the Ready for Transfer Event.
cfg_burst_handshaking_timing_import_clock(sample_clk_rate, sample_clk_src, sample_mode=<AcquisitionType.FINITE: 10178>, samps_per_chan=1000, sample_clk_active_edge=<Edge.RISING: 10280>, pause_when=<Level.HIGH: 10192>, ready_event_active_level=<Polarity.ACTIVE_HIGH: 10095>)[source]

Configures when the DAQ device transfers data to a peripheral device, using an imported sample clock to control burst handshake timing.

Parameters:
  • sample_clk_rate (float) – Specifies in hertz the rate of the Sample Clock.
  • sample_clk_src (str) – Specifies the source terminal of the Sample Clock. Leave this input unspecified to use the default onboard clock of the device.
  • sample_mode (Optional[nidaqmx.constants.AcquisitionType]) – Specifies if the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
  • samps_per_chan (Optional[long]) – Specifies the number of samples to acquire or generate for each channel in the task if sample_mode is FINITE_SAMPLES. If sample_mode is CONTINUOUS_SAMPLES, NI-DAQmx uses this value to determine the buffer size. This function returns an error if the specified value is negative.
  • sample_clk_active_edge (Optional[nidaqmx.constants.Edge]) – Specifies on which edges of Sample Clock pulses to acquire or generate samples.
  • pause_when (Optional[nidaqmx.constants.Level]) – Specifies whether the task pauses while the trigger signal is high or low.
  • ready_event_active_level (Optional[nidaqmx.constants.Polarity]) – Specifies the polarity of the Ready for Transfer Event.
cfg_change_detection_timing(rising_edge_chan=u'', falling_edge_chan=u'', sample_mode=<AcquisitionType.FINITE: 10178>, samps_per_chan=1000)[source]

Configures the task to acquire samples on the rising and/or falling edges of the lines or ports you specify. To detect both rising and falling edges on a line or port, specify the name of that line or port to both rising_edge_chan and falling_edge_chan.

Parameters:
  • rising_edge_chan (Optional[str]) – Specifies the names of the digital lines or ports on which to detect rising edges. The DAQmx physical channel constant lists all lines and ports for devices installed in your system.
  • falling_edge_chan (Optional[str]) – Specifies the names of the digital lines or ports on which to detect falling edges. The DAQmx physical channel constant lists all lines and ports for devices installed in your system.
  • sample_mode (Optional[nidaqmx.constants.AcquisitionType]) – Specifies if the task acquires samples continuously or if it acquires a finite number of samples.
  • samps_per_chan (Optional[long]) – Specifies the number of samples to acquire from each channel in the task if sample_mode is FINITE_SAMPLES. This function returns an error if the specified value is negative.
cfg_handshaking_timing(sample_mode=<AcquisitionType.FINITE: 10178>, samps_per_chan=1000)[source]

Determines the number of digital samples to acquire or generate using digital handshaking between the device and a peripheral device.

Parameters:
  • sample_mode (Optional[nidaqmx.constants.AcquisitionType]) – Specifies if the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
  • samps_per_chan (Optional[long]) – Specifies the number of samples to acquire or generate for each channel in the task if sample_mode is FINITE_SAMPLES. If sample_mode is CONTINUOUS_SAMPLES, NI-DAQmx uses this value to determine the buffer size. This function returns an error if the specified value is negative.
cfg_implicit_timing(sample_mode=<AcquisitionType.FINITE: 10178>, samps_per_chan=1000)[source]

Sets only the number of samples to acquire or generate without specifying timing. Typically, you should use this instance when the task does not require sample timing, such as tasks that use counters for buffered frequency measurement, buffered period measurement, or pulse train generation. For finite counter output tasks, samps_per_chan is the number of pulses to generate.

Parameters:
  • sample_mode (Optional[nidaqmx.constants.AcquisitionType]) – Specifies if the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
  • samps_per_chan (Optional[long]) – Specifies the number of samples to acquire or generate for each channel in the task if sample_mode is FINITE_SAMPLES. If sample_mode is CONTINUOUS_SAMPLES, NI-DAQmx uses this value to determine the buffer size. This function returns an error if the specified value is negative.
cfg_pipelined_samp_clk_timing(rate, source=u'', active_edge=<Edge.RISING: 10280>, sample_mode=<AcquisitionType.FINITE: 10178>, samps_per_chan=1000)[source]
“Sets the source of the Sample Clock, the rate of the Sample Clock, and the number of samples to acquire or generate. The device acquires or generates samples on each Sample Clock edge, but it does not respond to certain triggers until a few Sample Clock edges later. Pipelining allows higher data transfer rates at the cost of increased trigger response latency. Refer to the device documentation for information about which triggers pipelining affects.
This timing type allows handshaking
using the Pause trigger and either the Ready for Transfer event or the Data Active event. Refer to the device documentation for more information.
This timing type is supported only by

the NI 6536 and NI 6537.”

Args:
rate (float): Specifies the sampling rate in samples per
channel per second. If you use an external source for the Sample Clock, set this input to the maximum expected rate of that clock.
source (Optional[str]): Specifies the source terminal of the
Sample Clock. Leave this input unspecified to use the default onboard clock of the device.
active_edge (Optional[nidaqmx.constants.Edge]): Specifies on
which edges of Sample Clock pulses to acquire or generate samples.
sample_mode (Optional[nidaqmx.constants.AcquisitionType]):
Specifies if the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
samps_per_chan (Optional[long]): Specifies the number of
samples to acquire or generate for each channel in the task if sample_mode is FINITE_SAMPLES. If sample_mode is CONTINUOUS_SAMPLES, NI-DAQmx uses this value to determine the buffer size. This function returns an error if the specified value is negative.
cfg_samp_clk_timing(rate, source=u'', active_edge=<Edge.RISING: 10280>, sample_mode=<AcquisitionType.FINITE: 10178>, samps_per_chan=1000)[source]

Sets the source of the Sample Clock, the rate of the Sample Clock, and the number of samples to acquire or generate.

Parameters:
  • rate (float) – Specifies the sampling rate in samples per channel per second. If you use an external source for the Sample Clock, set this input to the maximum expected rate of that clock.
  • source (Optional[str]) – Specifies the source terminal of the Sample Clock. Leave this input unspecified to use the default onboard clock of the device.
  • active_edge (Optional[nidaqmx.constants.Edge]) – Specifies on which edges of Sample Clock pulses to acquire or generate samples.
  • sample_mode (Optional[nidaqmx.constants.AcquisitionType]) – Specifies if the task acquires or generates samples continuously or if it acquires or generates a finite number of samples.
  • samps_per_chan (Optional[long]) – Specifies the number of samples to acquire or generate for each channel in the task if sample_mode is FINITE_SAMPLES. If sample_mode is CONTINUOUS_SAMPLES, NI-DAQmx uses this value to determine the buffer size. This function returns an error if the specified value is negative.
change_detect_di_falling_edge_physical_chans

nidaqmx.system.physical_channel.PhysicalChannel – Specifies the names of the digital lines or ports on which to detect falling edges. The lines or ports must be used by virtual channels in the task. You also can specify a string that contains a list or range of digital lines or ports.

change_detect_di_rising_edge_physical_chans

nidaqmx.system.physical_channel.PhysicalChannel – Specifies the names of the digital lines or ports on which to detect rising edges. The lines or ports must be used by virtual channels in the task. You also can specify a string that contains a list or range of digital lines or ports.

change_detect_di_tristate

bool – Specifies whether to tristate lines specified with change_detect_di_rising_edge_physical_chans and change_detect_di_falling_edge_physical_chans that are not in a virtual channel in the task. If you set this property to True, NI-DAQmx tristates rising/falling edge lines that are not in a virtual channel in the task. If you set this property to False, NI-DAQmx does not modify the configuration of rising/falling edge lines that are not in a virtual channel in the task, even if the lines were previously tristated. Set this property to False to detect changes on lines in other tasks or to detect changes on output-only lines.

delay_from_samp_clk_delay

float – Specifies the amount of time to wait after receiving a Sample Clock edge before beginning to acquire the sample. This value is in the units you specify with delay_from_samp_clk_delay_units.

delay_from_samp_clk_delay_units

nidaqmx.constants.DigitalWidthUnits – Specifies the units of delay_from_samp_clk_delay.

hshk_delay_after_xfer

float – Specifies the number of seconds to wait after a handshake cycle before starting a new handshake cycle.

hshk_sample_input_data_when

nidaqmx.constants.SampleInputDataWhen – Specifies on which edge of the Handshake Trigger an input task latches the data from the peripheral device.

hshk_start_cond

nidaqmx.constants.HandshakeStartCondition – Specifies the point in the handshake cycle that the device is in when the task starts.

implicit_underflow_behavior

nidaqmx.constants.UnderflowBehavior – Specifies the action to take when the onboard memory of the device becomes empty.

master_timebase_rate

float – Specifies the rate of the Master Timebase.

master_timebase_src

str – Specifies the terminal of the signal to use as the Master Timebase. On an E Series device, you can choose only between the onboard 20MHz Timebase or the RTSI7 terminal.

ref_clk_rate

float – Specifies the frequency of the Reference Clock.

ref_clk_src

str – Specifies the terminal of the signal to use as the Reference Clock.

samp_clk_active_edge

nidaqmx.constants.Edge – Specifies on which edge of a clock pulse sampling takes place. This property is useful primarily when the signal you use as the Sample Clock is not a periodic clock.

samp_clk_dig_fltr_enable

bool – Specifies whether to apply the pulse width filter to the signal.

samp_clk_dig_fltr_min_pulse_width

float – Specifies in seconds the minimum pulse width the filter recognizes.

samp_clk_dig_fltr_timebase_rate

float – Specifies in hertz the rate of the pulse width filter timebase. NI-DAQmx uses this value to compute settings for the filter.

samp_clk_dig_fltr_timebase_src

str – Specifies the input terminal of the signal to use as the timebase of the pulse width filter.

samp_clk_dig_sync_enable

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

samp_clk_max_rate

float – Indicates the maximum Sample Clock rate supported by the task, based on other timing settings. For output tasks, the maximum Sample Clock rate is the maximum rate of the DAC. For input tasks, NI-DAQmx calculates the maximum sampling rate differently for multiplexed devices than simultaneous sampling devices.

samp_clk_overrun_behavior

nidaqmx.constants.OverflowBehavior – Specifies the action to take if Sample Clock edges occur faster than the device can handle them.

samp_clk_rate

float – Specifies the sampling rate in samples per channel per second. If you use an external source for the Sample Clock, set this input to the maximum expected rate of that clock.

samp_clk_src

str – Specifies the terminal of the signal to use as the Sample Clock.

samp_clk_term

str – Indicates the name of the internal Sample Clock terminal for the task. This property does not return the name of the Sample Clock source terminal specified with samp_clk_src.

samp_clk_timebase_active_edge

nidaqmx.constants.Edge – Specifies on which edge to recognize a Sample Clock Timebase pulse. This property is useful primarily when the signal you use as the Sample Clock Timebase is not a periodic clock.

samp_clk_timebase_div

int – Specifies the number of Sample Clock Timebase pulses needed to produce a single Sample Clock pulse.

samp_clk_timebase_master_timebase_div

int – Specifies the number of pulses of the Master Timebase needed to produce a single pulse of the Sample Clock Timebase.

samp_clk_timebase_rate

float – Specifies the rate of the Sample Clock Timebase. Some applications require that you specify a rate when you use any signal other than the onboard Sample Clock Timebase. NI- DAQmx requires this rate to calculate other timing parameters.

samp_clk_timebase_src

str – Specifies the terminal of the signal to use as the Sample Clock Timebase.

samp_clk_timebase_term

str – Indicates the name of the internal Sample Clock Timebase terminal for the task. This property does not return the name of the Sample Clock Timebase source terminal specified with samp_clk_timebase_src.

samp_clk_underflow_behavior

nidaqmx.constants.UnderflowBehavior – Specifies the action to take when the onboard memory of the device becomes empty. In either case, the sample clock does not stop.

samp_clk_write_wfm_use_initial_wfm_dt

bool – Specifies that the value of samp_clk_rate will be determined by the dt component of the initial DAQmx Write waveform input for Output tasks.

samp_quant_samp_mode

nidaqmx.constants.AcquisitionType – Specifies if a task acquires or generates a finite number of samples or if it continuously acquires or generates samples.

samp_quant_samp_per_chan

float – Specifies the number of samples to acquire or generate for each channel if samp_quant_samp_mode is AcquisitionType.FINITE. If samp_quant_samp_mode is AcquisitionType.CONTINUOUS, NI-DAQmx uses this value to determine the buffer size.

samp_timing_engine

int – Specifies which timing engine to use for the task.

samp_timing_type

nidaqmx.constants.SampleTimingType – Specifies the type of sample timing to use for the task.

simultaneous_ao_enable

bool – Specifies whether to update all channels in the task simultaneously, rather than updating channels independently when you write a sample to that channel.

sync_clk_interval

int – Specifies the interval, in Sample Clock periods, between each internal Synchronization Clock pulse. NI-DAQmx uses this pulse for synchronization of triggers between multiple devices at different rates. Refer to device documentation for information about how to calculate this value.

sync_pulse_min_delay_to_start

float – Specifies in seconds the amount of time that elapses after the master device issues the synchronization pulse before the task starts.

sync_pulse_reset_delay

float – Specifies in seconds the amount of time to wait after the Synchronization Pulse before resetting the ADCs or DACs on the device. When synchronizing devices, query sync_pulse_reset_time on all devices and note the largest reset time. Then, for each device, subtract the reset time from the largest reset time and set this property to the resulting value.

sync_pulse_reset_time

float – Indicates in seconds the amount of time required for the ADCs or DACs on the device to reset. When synchronizing devices, query this property on all devices and note the largest reset time. Then, for each device, subtract the value of this property from the largest reset time and set sync_pulse_reset_delay to the resulting value.

sync_pulse_src

str – Specifies the terminal of the signal to use as the synchronization pulse. The synchronization pulse resets the clock dividers and the ADCs/DACs on the device.

sync_pulse_sync_time

float – Indicates in seconds the delay required to reset the ADCs/DACs after the device receives the synchronization pulse.

sync_pulse_term

str – Indicates the name of the internal Synchronization Pulse terminal for the task. This property does not return the name of the source terminal.