07-31-2018 06:43 PM
This may seem like a stupid question but why is this writing to the file in only a 1d array? it should be 3 columns but its only writing to the file as one column. Please see the pictures below. Also how do I add a time stamp as the first column? I plan to save the file as a .csv and open in Excel.
07-31-2018 07:54 PM - edited 07-31-2018 07:56 PM
Please attach your vi instead of a picture. What is writing to the queue and what is the size of the 2D array? Why are you mixing delimiters (tab, comma)?
08-01-2018 06:58 AM
you don't have a line feed at the end.
you could also try to use the "Write Delimited Spreadsheet.vi"
regards
08-01-2018 10:46 AM
@jwscs wrote:
you don't have a line feed at the end.
"Array to spreadsheet string" always inserts a linefeed at the end, so yes, there is one!
@jwscs wrote:you could also try to use the "Write Delimited Spreadsheet.vi"
That would be significantly less efficient, because the file gets opened and closed with each iteration of the loop and it still would need tweaks and external operations to include the timestamp.
08-01-2018 11:11 AM
Based on the image, I don't understand why you are dealing with a 2D array. If you add a timestamp, then you need to know the time for each row.
So where is this data coming from? I have a feeling that is the source of your problem.
Also, you do not want to have a wait in a consumer loop. The Dequeue Element will limit your loop rate so that it cannot process any data that has not be supplied by the producer. But if it falls behind for any reason (ex: disk slow slowdown), you want this loop to run as fast as it can to catch up.