LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CPU performace and Labview

I have a 2.8 GHz Intel processor with a 1GB ram and enough harddisk space. I have connected three K-type themocouples and a Infrared pyrometer to a SC-2345 which is connected to a DAQ card in my PC. I measure  temperature at 4 different locations of an oven. The program cannot take more than 2 data in one second. When I ask the program to collect more than 2 datapoints in one second, the CPU usage is above 100% and the data collection becomes random. Is this normal? I thought 4 thermocouples was not a big load on the CPU?
 
Thanks
 
Baris 
0 Kudos
Message 1 of 8
(3,039 Views)

Hi Baris,

4 thermocouples should not be loading the CPU that much.

Are you using a while loop?  Or some sort of WAIT function?   Soemthing is loading the CPU and I doubt that it is the thermocouples.

Can you should part (or all) of the main loop?  Even a screencapture...

How often do you read the temperature?  How often do you need to measure (resolution / sample rate)?

JLV

Message 2 of 8
(3,031 Views)
Measuring the temperature of a few thermocouples should not load the CPU significantly. What usually happens is that there is a while loop without a wait statement, or you are configuring the measurement and releasing the reference each time, or something of that nature. If you can post a copy of your code (do a "Save with options", "Development distribution" and if the resulting *.llb is large zip it into a smaller file) we can probably spot the problem quickly.
 
P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 8
(3,016 Views)
Thank you very much. I am sending the code where I have problem with the data collection speed. I need to measure 10 datapoints in one second.
0 Kudos
Message 4 of 8
(3,007 Views)

I can see several potential problems. Although I wouldn't expect any of these to display any problem if your wait is more than 100 ms.

Express VIs are claimed to work slower. I think most professional LV programmers don't use them, so I don't know. You can convert the VI by right clicking it and opening its FP.

File operations can be problematic on occasion. Constantly writing to the disk may be the problem. Try having to file operations out of the loop or less frequently.

Updating the screen can be a real CPU hogger, usually if you have overlapping objects. In your case, there are none, so it doesn't look like this should be the problem.

In any case, I don't think any of these should be a problem even when you get to really high speeds, but I suggest you try the first 2.


___________________
Try to take over the world!
Message 5 of 8
(2,996 Views)
You have converted 4 separate express VIs that each do one channel of acquisition. If you look in the subVIs, you'll see that each one does a config, start, read, clear. You should have a single config and start outside the while for all 4 channels, and inside the loop, a single read for all 4 channels. When the acquisition is complete, you do a clear task.
Message 6 of 8
(2,995 Views)

I know this is off-topic, but I think tst brought up an interesting subject.  I don't use Express vi's, either.  I tried them once and found that the performance what not there, and decided to stay away from them.  The decision to stay away was based on the fact that it was faster for me to implement vi's using the classical method rather than using Express vi's.   However, my friend insists on using the Express method and he is happy with the performance. 

Performance and use of Express VI's could be a topic for a new thread..  😉

JLV

Message 7 of 8
(2,965 Views)
I'm not a big fan of the Express VI either. Because they do everything (create channels, create task, start task, read, stop task, close task), they can be pretty slow when you've got thme inside a while loop. For a one-shot acquisition, though, they can be handy but once you've learned the lower level DAQmx functions, why bother?
Message 8 of 8
(2,958 Views)