06-24-2009 09:33 AM
And it looks like you have a lot of repeated code.
Do you know how to create a subVI?
This will really make your code cleaner as well as more efficient.
I would recommend converting some of that code to subVIs if you have the time.
06-25-2009 10:00 AM
Hey,
Thanks for the tip about the sub VI's. I am still really new to this. I tried to set it up as you said, but it is still all in the same colomn. But, it is seperated by imput (i.e. all the data points from 1, come first, then all from 2, and so on). I'm sorry I keep not quite getting it, but I really appreciate you help.
Thank you.
06-25-2009 10:08 AM
Heres what is happening with your code:
A) The inner loop runs once, gets a point for each channel.
B) It then builds all the channels' data into a 2D array then writes it to a file.
C) The outer loop iterates again, so the shift registers re-intialize to their default values, which is a 1D array of 0.
D) step A occurs, gets one more point.
E) Step B occurs... step C.... step A ..... etc
The outer loop is forcing the inner loop to re-initialize every time.
Since you don't have 'append' wired to 'True', the 'write to spreadsheet file' will keep overwriting your data.
Why do you have a while loop within another while loop?
You do not need the outer while loop at all.
Remove the outer loop, then put the 'stop button' to control the inner loop.
06-29-2009 04:15 AM
Hey Cory K,
I really appreciate all of your help. I got the data in seperate rows, which is just as useful in Excel.
Thanks,
Humble Humphery