本文整理汇总了Python中PyDAQmx.c_int32方法的典型用法代码示例。如果您正苦于以下问题:Python PyDAQmx.c_int32方法的具体用法?Python PyDAQmx.c_int32怎么用?Python PyDAQmx.c_int32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyDAQmx
的用法示例。
在下文中一共展示了PyDAQmx.c_int32方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sendDigOutCmd
# 需要导入模块: import PyDAQmx [as 别名]
# 或者: from PyDAQmx import c_int32 [as 别名]
def sendDigOutCmd(self, outLines, outCmd, timeBetweenPts=0.0001):
dig_out = daqmx.Task()
dig_out.CreateDOChan(outLines, "", daqmx.DAQmx_Val_ChanForAllLines)
# print(dig_out)
numpts = len(outCmd)
doSamplesWritten = daqmx.c_int32()
# dig_out.WriteDigitalU32(numSampsPerChan=numpts, autoStart=True, timeout=1.0, dataLayout=daqmx.DAQmx_Val_GroupByScanNumber, writeArray=outCmd, reserved=None, sampsPerChanWritten=byref(doSamplesWritten))
# DebugLog.log("Digital output: Wrote %d samples" % doSamplesWritten.value)
for n in range(0, numpts):
outCmd_n = np.array(outCmd[n])
dig_out.WriteDigitalU32(numSampsPerChan=1, autoStart=True, timeout=0.01, dataLayout=daqmx.DAQmx_Val_GroupByScanNumber, writeArray=outCmd_n, reserved=None, sampsPerChanWritten=byref(doSamplesWritten))
time.sleep(timeBetweenPts)