01-26-2020 04:02 AM
Hi,
I tried to write my calculating data inside the for loop into a spreadsheet separately. As a result of my calculation, I could only get the last xy data series. On the other hand, I can see all the data on the graph outside the loop. Last time, I encountered an array matching problem (attached files). I will be grateful if anyone could help me.
Erdi.
01-26-2020 06:39 AM
You are trying to connect a 3D array to a 2D array input. Write to Spreadsheet only takes 1D or 2D arrays as an input. If you want to save all of your data, you could place "write to spreadsheet" inside the loop and you would save a lot of files or perhaps change the tunnel mode to concatenating, which would keep your data as a 2D array.
Some more info on concatenating tunnels:
https://zone.ni.com/reference/en-XX/help/371361R-01/lvhowto/autocat_arraysnloops/
01-26-2020 07:34 AM
Thanks for the help. I changed the tunnel mode to concatenating but now all data saved as one xy data. How can I separate each data sets in the same text file?
01-26-2020 10:29 AM
What are you talking about? You attached a picture where it shows multiple X, Y's saved in the file.
Are you running your VI multiple times in a row by pressing the run button? If so, you want to change that False going into the Write function to a True so it appends new data to the same file.
You should get rid of that Save Data Path property node. It serves no purpose other than writing the same value back into the control that it already is.
01-26-2020 11:07 AM
Ok that my mistake, sorry, let me clarify.
When I press the run button the .vi calculates multiple times (with rump by delta) my equation. I got the data as attached "data 1.txt", but, I want is to save the X, Y data set obtained from each calculation in separate columns in txt file like attached "data 2.txt".
Thanks.
01-26-2020 01:02 PM
Then you'll need to redo your array operations. Try putting the transpose after the For Loop.
And you still need to get rid of that File Save Path property node.