NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

生产者结构这样写有问题吗?

请问这样的生产者结构有问题吗,对数据的传输会不会因为内层的循环而延时?比如等内层循环结束,队列中的数据才能能被读?
0 项奖励
1 条消息(共 4 条)
4,020 次查看

No problem, the producer should work properly in the inner loop, there will not be any delay. But I am not sure whether your state machine should work properly for you project, you should just run and see the result. Run it , debug it.

 

 

And for your question in the image, no, no need to use a shift register at that position.

 

Best Regards

Hu Yu
0 项奖励
2 条消息(共 4 条)
4,008 次查看

再麻烦解答一个问题:

labview中 功能全局变量 可以同时读吗

 

普通全局变量在使用时会复制副本,增加开销,但全局变量可以同时访问,所以可以用来做线程间操作的统一开关

 

不知道上面这句话,我说得对不对有没有问题

 

 

另,两个线程如果要使用一个开关控制两个线程中操作的开始、停止,如果不使用全局变量或局部 变量,有没有别的办法可用?

 

 

0 项奖励
3 条消息(共 4 条)
4,003 次查看

I think Function Global Variable should not be accessed(either read or write) simultaneous, because it is one thread only.

 

The second question

 

I agree with you, and I think the rendezvous and event in synchronize plate would help you to control multi threads 

 

Best Regards

Hu Yu
4 条消息(共 4 条)
3,989 次查看