def anlg_win_coupling(self):
"""
:class:`nidaqmx.constants.Coupling`: Specifies the coupling for
the source signal of the trigger if the source is a terminal
rather than a virtual channel.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetAnlgWinRefTrigCoupling
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Coupling(val.value)
python类c_int()的实例源码
def dig_edge_edge(self):
"""
:class:`nidaqmx.constants.Edge`: Specifies on what edge of a
digital pulse the Reference Trigger occurs.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetDigEdgeRefTrigEdge
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Edge(val.value)
def dig_pattern_trig_when(self):
"""
:class:`nidaqmx.constants.DigitalPatternCondition`: Specifies
whether the Reference Trigger occurs when the physical
channels specified with **dig_pattern_src** match or differ
from the digital pattern specified with
**dig_pattern_pattern**.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetDigPatternRefTrigTrigWhen
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return DigitalPatternCondition(val.value)
def anlg_edge_slope(self):
"""
:class:`nidaqmx.constants.Slope`: Specifies on which slope of
the trigger signal to start acquiring or generating samples.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetAnlgEdgeStartTrigSlope
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Slope(val.value)
def anlg_win_coupling(self):
"""
:class:`nidaqmx.constants.Coupling`: Specifies the coupling for
the source signal of the trigger if the source is a terminal
rather than a virtual channel.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetAnlgWinStartTrigCoupling
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Coupling(val.value)
def delay_units(self):
"""
:class:`nidaqmx.constants.DigitalWidthUnits`: Specifies the
units of **delay**.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetStartTrigDelayUnits
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return DigitalWidthUnits(val.value)
def dig_edge_edge(self):
"""
:class:`nidaqmx.constants.Edge`: Specifies on which edge of a
digital pulse to start acquiring or generating samples.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetDigEdgeStartTrigEdge
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Edge(val.value)
def trig_type(self):
"""
:class:`nidaqmx.constants.TriggerType`: Specifies the type of
trigger to use to start a task.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetStartTrigType
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return TriggerType(val.value)
def adv_cmplt_event_pulse_polarity(self):
"""
:class:`nidaqmx.constants.Polarity`: Specifies the polarity of
the exported Advance Complete Event.
"""
val = ctypes.c_int()
cfunc = (lib_importer.windll.
DAQmxGetExportedAdvCmpltEventPulsePolarity)
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)
def adv_trig_pulse_polarity(self):
"""
:class:`nidaqmx.constants.Polarity`: Indicates the polarity of
the exported Advance Trigger.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetExportedAdvTrigPulsePolarity
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)
def ai_conv_clk_pulse_polarity(self):
"""
:class:`nidaqmx.constants.Polarity`: Indicates the polarity of
the exported AI Convert Clock. The polarity is fixed and
independent of the active edge of the source of the AI
Convert Clock.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetExportedAIConvClkPulsePolarity
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)
def ai_hold_cmplt_event_pulse_polarity(self):
"""
:class:`nidaqmx.constants.Polarity`: Specifies the polarity of
an exported AI Hold Complete Event pulse.
"""
val = ctypes.c_int()
cfunc = (lib_importer.windll.
DAQmxGetExportedAIHoldCmpltEventPulsePolarity)
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)
def change_detect_event_pulse_polarity(self):
"""
:class:`nidaqmx.constants.Polarity`: Specifies the polarity of
an exported Change Detection Event pulse.
"""
val = ctypes.c_int()
cfunc = (lib_importer.windll.
DAQmxGetExportedChangeDetectEventPulsePolarity)
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)
def ctr_out_event_output_behavior(self):
"""
:class:`nidaqmx.constants.ExportAction`: Specifies whether the
exported Counter Output Event pulses or changes from one
state to the other when the counter reaches terminal count.
"""
val = ctypes.c_int()
cfunc = (lib_importer.windll.
DAQmxGetExportedCtrOutEventOutputBehavior)
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return ExportAction(val.value)
def ctr_out_event_pulse_polarity(self):
"""
:class:`nidaqmx.constants.Polarity`: Specifies the polarity of
the pulses at the output terminal of the counter when
**ctr_out_event_output_behavior** is
**ExportActions2.PULSE**. NI-DAQmx ignores this property if
**ctr_out_event_output_behavior** is
**ExportActions2.TOGGLE**.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetExportedCtrOutEventPulsePolarity
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)
def ctr_out_event_toggle_idle_state(self):
"""
:class:`nidaqmx.constants.Level`: Specifies the initial state of
the output terminal of the counter when
**ctr_out_event_output_behavior** is
**ExportActions2.TOGGLE**. The terminal enters this state
when NI-DAQmx commits the task.
"""
val = ctypes.c_int()
cfunc = (lib_importer.windll.
DAQmxGetExportedCtrOutEventToggleIdleState)
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Level(val.value)
def data_active_event_lvl_active_lvl(self):
"""
:class:`nidaqmx.constants.Polarity`: Specifies the polarity of
the exported Data Active Event.
"""
val = ctypes.c_int()
cfunc = (lib_importer.windll.
DAQmxGetExportedDataActiveEventLvlActiveLvl)
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)
def hshk_event_interlocked_asserted_lvl(self):
"""
:class:`nidaqmx.constants.Level`: Specifies the asserted level
of the exported Handshake Event if
**hshk_event_output_behavior** is
**ExportActions5.INTERLOCKED**.
"""
val = ctypes.c_int()
cfunc = (lib_importer.windll.
DAQmxGetExportedHshkEventInterlockedAssertedLvl)
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Level(val.value)
def hshk_event_output_behavior(self):
"""
:class:`nidaqmx.constants.ExportAction`: Specifies the output
behavior of the Handshake Event.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetExportedHshkEventOutputBehavior
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return ExportAction(val.value)
def pause_trig_lvl_active_lvl(self):
"""
:class:`nidaqmx.constants.Polarity`: Specifies the active level
of the exported Pause Trigger.
"""
val = ctypes.c_int()
cfunc = lib_importer.windll.DAQmxGetExportedPauseTrigLvlActiveLvl
if cfunc.argtypes is None:
with cfunc.arglock:
if cfunc.argtypes is None:
cfunc.argtypes = [
lib_importer.task_handle, ctypes.POINTER(ctypes.c_int)]
error_code = cfunc(
self._handle, ctypes.byref(val))
check_for_error(error_code)
return Polarity(val.value)