def cfg_change_detection_timing(
self, rising_edge_chan="", falling_edge_chan="",
sample_mode=AcquisitionType.FINITE, samps_per_chan=1000):
"""
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**.
Args:
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.
"""
cfunc = lib_importer.windll.DAQmxCfgChangeDetectionTiming
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes_byte_str,
ctypes_byte_str, ctypes.c_int, ctypes.c_ulonglong]
error_code = cfunc(
self._handle, rising_edge_chan, falling_edge_chan,
sample_mode.value, samps_per_chan)
check_for_error(error_code)
评论列表
文章目录