如何在Labview for/while循环中手动递增/递减索引
这是我的基本用例:
Labview 收到来自外部硬件的触发后开始收集模拟数据。 它监视该数据,并在模拟数据达到阈值时触发另一个硬件。 每个试验的该阈值可以有不同的值。 但是,操作员可能希望能够重做试验(如果由于噪声而提前发送触发器或未按预期达到阈值)。
是否可以增加/减少索引,或者我是否需要使用可以根据需要增加/减少的移位寄存器(即,如果按下重做按钮则减少它)?
谢谢阿齐姆
Here is my basic use case:
After Labview receives a trigger from external hardware start collecting analog data. It monitors this data and triggers another piece of hardware if the analog data reaches a threshold. This threshold can have different values for each trial. However, the operator might want to be able to redo a trial (if the trigger is sent to early because of noise or the threshold isn't reached as expected).
Is it possible to increment/decrement the index or do I need to use a shift register that I can either increment/decrement as needed (ie decrement it if the redo button is pressed)?
Thanks
Azim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果不深入了解应用程序的本质并回答您的实际问题,不,您不能影响 for 或 while 循环中索引节点出来的值。 每次循环迭代它都会自动递增 1。
在应用程序方面,您可能需要研究状态机。 听起来您也许可以将其用于您想要做的事情。
Without getting into the nitty-gritty of your application and to answer your actual question, no, you can not affect the value that comes out of the index node in a for or while loop. It autoincrements by one for every loop iteration.
Application-wise, you may want to look into a State Machine. It sounds like you might be able to use that for what you're trying to do.
我认为如果您不想使用循环的自动递增索引,移位寄存器是您最好的选择。 这为您手动调整索引提供了最大的灵活性。
I think a shift register is your best bet if you don't want to use the autoincrementing index of the loop. This gives you the most flexibility in manually adjusting your index.