LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems storing data into excel

Solved!
Go to solution

Hi Folks!

 

I have created a program which reads a voltage signal and hence calculates the number of peaks at a given time. What I am having trouble with is saving the values that the program is calculating.

 

Usually I would build and array and save these values into an ".csv" file and open it in excel. This has worked for me before but when I tried it with the program I just made it gave me an error saying "you have connected 2 arrays of different dimensions". I have also attached the program for your reference.

 

If anyone would be able to let me know what went wrong in my code then that would be really helpful. Also, if there is another way to store values into excel then do let me know.

 

Thanks,

Rahul Patel

Download All
0 Kudos
Message 1 of 3
(3,124 Views)
Solution
Accepted by topic author Rahul P

You've got a couple of problems. First, your program will only record the very last result. You are just passing 3 different scalars out of the while loop. Either turn auto-indexing on or use a shift register and a build array function. Since you do have scalars out of the while loop, the build array that you have outside is creating a 1D array. Obviously, you cannot pass that to the Transpose 2D Array.

 

Try the simple modification I've attached.

Message 2 of 3
(3,118 Views)

Dennis,

 

Thanks for the quick and helpful response. I now realise my mistake. Will keep this in mind for the future!

 

Best,

Rahul Patel

0 Kudos
Message 3 of 3
(3,080 Views)