11-09-2011 08:42 PM
我在数据采集编程时,需要通过前面板阿牛控制采集开始与结束。在编程时采用了2个生产者/消费者结构:一个是事件,用于对前面板的按钮动作响应;然后在事件的消费者循环中,套用了一个“生产者/消费者(数据)”结构。请问这样是否影响程序的CPU占用率呢。我的程序运行时CPU占用几乎全满,应该怎么处理呢?
Solved! Go to Solution.
11-10-2011 03:05 AM - edited 11-10-2011 03:07 AM
Hi,
it is definitelly unnecessary to use the Producer/Custom structure inside another of it.
The problem you have is not because of the structure. It comes up with one or more SubVIs which take up all the resources.
You should check the VI timing to find out which VI takes the most of the time. Mostly you have forgotten to add a time out or a wait function in the VI which causes you the CPU load.
Read this and this to use the performance and memory function.
11-10-2011 09:44 AM
您好,你说不必使用双重结构是吧,那这块我应该怎么处理呢?您能给出个例子的程序截图么?或是某种解决方法。万分感谢!
11-10-2011 09:45 AM
您好,你说不必使用双重结构是吧,那这块我应该怎么处理呢?您能给出个例子的程序截图么?或是某种解决方法。万分感谢!
11-10-2011 09:49 AM
It depends what you want to do with the structure.
You may post your code here, and someone may help you out.
There are no standard solutions for a specified question.