LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I AM SURE THIS WILL ANSWER MANY QUESTIONS ABOUT ARRAYS AND STRUCTURING TO NEWBIES LIKE MYSELF

Hello,

I have two questions. The first one is related to arrays and the second one to DAQ.

At first I was using the DAQ assistant, but i saw that it was way too slow to capture and process data. Then I used the Read VI in the control panel and created it under analog, multiple channels, multiple samples, 2D Double. By the way i am reading 4 analog inputs. Now I could capture data and process it way faster. Also, the Read VI, by default, puts the channels as rows and columns as data. My question is why is DAQ SLOWER THAN THE READ VI?

My last question is about structuring and arrays. I need to build a big array that stops building when i activate a button. IT SHOULD CONSIST OF 4 rows, one row for each analog input. Then i want to max and min each row, this i think I can do. I have uploaded the VIs. What is the best way to structure this VI to capture the array? Right now THE VALUES RESET, so the min max are dinamic not static.

Thank you in advance.


0 Kudos
Message 1 of 2
(2,526 Views)
Let's take this one piece at a time.

The DAQ Assistant creates an Express VI. If you right-click on the resultant Express VI and select "Open Front Panel" you can convert it to a regular VI. If you then look at the block diagram you will see that the Express VI is doing quite a bit more than just a read. It's configuring the task. You are not doing any of that, and are relying on an unknown configuration. If you look at the DAQmx examples that ship with LabVIEW you will see the proper way to configure for reading channels.

If you need the data that's returned from the read VI to be transposed, then simply use the Transpose 2D Array function.

The data gets "reset" because each loop writes to the front panel array. If you need to keep a history then you need to use a shift register. If all you want to do is to track the min/max you don't need to keep adding the new data. All you need to do is to have the shift register keep track of the min/max for each row, and you calculate the new values with each sweep.

I have no idea what you're doing with all those property nodes and logic. It almost seems that you're trying to use indicators like controls. The subVI with the formula node made even less sense.

You have a Write to Spreadsheet File VI off on the right all by its lonesome. This is not doing you any good as it's not even wired.
0 Kudos
Message 2 of 2
(2,488 Views)