10-23-2008 01:29 PM
Hello,
I am using LabView-DAGmx and PXI-6220 to acquire voltage (differential) data. The application needs 8 channels which PXI-6220 should be able to support easily, but also must have 10 1-D Floating Point Arrays (8 elements in each) in order to keep on calculating the average, verifying the readings, allowing changing the set points, ... etc. I also use 8 elapsed counter VIs to display the times in the application. While I really didn't think the FP Arrays and the calculation are a lot to my workstation, I found from time to time the elapsed counters are not constantly updating the times (strings) and the CPU Usage has hit 80%. I then modified my VI to do only 4 channels instead of 8 channels, and the CPU Usage would remain below 40% (I think it's still very high.) At the point, the timers were still not able to update the time display fast enough, although I found every time a correct time will be displayed when it updates.
My question is, how much memory should be appropriate for this kind of application (LabView & My Multiple Channel Averaging)? I have now Pentium 4 3GHz and 1GB RAM. Is upgrading RAM to 2G or 4G going to help a lot in the situation? If we intend to use TestStand, what size of RAM would an expert recommand?
Thanks!
10-23-2008 01:36 PM
Without any code or details (samplerate) it is hard to say anything.
What is normally the load on the CPU. What other processes are executing (we had a virus scanner that would hit 100% every 5 minutes).
Ton
10-23-2008 01:48 PM
10-23-2008 02:30 PM
Why single sample? How is the timing done? Reading data in bursts at approx. 10 Hz works most of the time perfect.
Ton
10-23-2008 03:16 PM
Single Sample so that each reading can be added to the total for averaging. This is different from "Moving Average" which uses a fixed buffer to calculate the mean from of the number of readings.
The timing is done through the general while loop.
There is also a particular but required (for our application) reason that it has to be 40Hz for each channel.
Please see the attachment. Thanks a lot!
10-23-2008 03:39 PM
I see several things in your code that can be improved:
Ton
PS you can attach pictures directly.
To attach pictures of your code I advice the Code Capture Tool. It is great for this purpose, you select the part you want to capture, start the tool (Tools->Code Capture Tool), review your setting (FP-none, BD-selected, Clipboard-FileName), finish the capture.
Then you switch over to your internet browser, in the file dialog you past the file name from the clipboard and the file is attached.
To download
10-23-2008 03:49 PM
Thanks, Ton! I shall use your expertises to improve the existing codes then come back for a further discussion.