From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
|
DAQmx Read VI总是查询它已经获得了多少个采样点数,这个使用了相当一部分处理器的空间。当多通道扫描的时候,尤其如此。按照如下步骤,来改变DAQmx Read这个VI,使得它读入已有的采样点,而不是不断的寻找它已经获得的采样点。
1.在程序框图中放置一个属性节点。
2.从拖放列表中,选择获取所有可用的采样点。
3.保证属性节点处于写入模式。如果不是,右击属性节点,选择改变为写入。
4.连接一个真布尔量到输入。
5.移除DAQmx Read的VI的待读取采样数的输入控件。
6.增加一个等待函数在包含DAQmx Read这个VI的循环中,使得循环在执行的过程中,不会100%占用CPU。
你的程序应该跑的更加流畅,同时注意使用尽可能少的资源在你修改后的程序中,可以参考如下图所示的程序。
|