12-21-2009 07:08 PM
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
Solved! Go to Solution.
12-21-2009 07:47 PM
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.
12-22-2009 10:33 AM
Dennis,
Thanks for the quick and helpful response. I now realise my mistake. Will keep this in mind for the future!
Best,
Rahul Patel