def cfg_burst_handshaking_timing_export_clock(
self, sample_clk_rate, sample_clk_outp_term,
sample_mode=AcquisitionType.FINITE, samps_per_chan=1000,
sample_clk_pulse_polarity=Polarity.ACTIVE_HIGH,
pause_when=Level.HIGH,
ready_event_active_level=Polarity.ACTIVE_HIGH):
"""
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.
Args:
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.
"""
cfunc = lib_importer.windll.DAQmxCfgBurstHandshakingTimingExportClock
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.c_int,
ctypes.c_ulonglong, ctypes.c_double, ctypes_byte_str,
ctypes.c_int, ctypes.c_int, ctypes.c_int]
error_code = cfunc(
self._handle, sample_mode.value, samps_per_chan, sample_clk_rate,
sample_clk_outp_term, sample_clk_pulse_polarity.value,
pause_when.value, ready_event_active_level.value)
check_for_error(error_code)
评论列表
文章目录