LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any where wrong in programming

Solved!
Go to solution

The attached vi is trying to collect signal from DAQ 9229(USB Casing).

 

4CH simutaneously, 10 seconds, 50k/s/CH

 

The data volumn seems not large, but the program runs and seems almost hanging there.

 

I wonder if any thing wrong in programming. Thanks.

Download All
0 Kudos
Message 1 of 9
(3,556 Views)
Can you explain better as to what's wrong, ie, what exactly is happening right now and what are you expecting to see? What happens when you acquire from just one channel? Does it work alright then? And, what starts happening when you start scaling the program to 2, 3 and 4 channels.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 9
(3,541 Views)

Don't know why but I had some trouble openning up the VIs.

 

could you post a ZIP file of the file folder it and it's sub VIs are located in?

0 Kudos
Message 3 of 9
(3,516 Views)

Actually the program can run, but the performance not good, will slow down the whole windows and hang there.

 

And I will cost 1.3G memory. How to improve it?

 

Zip files attached again.

0 Kudos
Message 4 of 9
(3,489 Views)

Turbot,

I have removed all the DAQmx stuff, and replaced the acquisition step with the attached simulation VI, that generates the same amout of data at the same rate. I don't see any problem with your application (apart the fact that the diagram is terribly large ! ;)). The memory foot print is perfect, and correspond to the amount of data generated.

So there is apparently nothing wrong with your program. You'll have to concentrate on the acquisition step...

Hope that helps.

Chilly Charly    (aka CC)
Message 5 of 9
(3,481 Views)
Solution
Accepted by topic author alex.

FIrst your plain data is 12 MB.

Then you split the data from the analog read (2*12 MB)

You store 4 queues with data.

 

Inside the lower while loops you have data in the shift register. You use a build array from the queue data, there the data duplicates again, I would try to rewrite the software trigger for 1D data.

 

I would remove the Express VIs with signal analyzing VIs.

Express VIs are not made to be memory efficient, they just work.

Try converting them to normal VIs and optimize them.

What's the use of the shift register with the boolean?

 

You don't need any of the wait xx ms functions.

 

Ton

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 9
(3,475 Views)

turbot wrote:

Actually the program can run, but the performance not good, will slow down the whole windows and hang there.

 

And I will cost 1.3G memory. How to improve it?

 

Zip files attached again.


If you have less physical memory than you have virtual memory in use, the perfomance will suck.

 

Do you have more physical than virtual memory? If not add memmory as the simplest solution.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 9
(3,438 Views)
Following up on Ton's comment, use one queue rather than 4. You don't need 4 - it's all the same data. Let the loop pull out the specific data it needs by using Array Subset.
0 Kudos
Message 8 of 9
(3,426 Views)
Now I have changed the program as attached. 4CH collect data simunaneously. Any more suggestion?
0 Kudos
Message 9 of 9
(3,392 Views)