AnsweredAssumed Answered

Problem writing to .csv file

Question asked by rftester on Jan 6, 2016
Latest reply on Jan 7, 2016 by rftester
Hi Vee users,

I have a Vee test where I read a number of parameters from a .csv file, perform a test loop, and store the results in another.csv file at the end of each loop.

Along with the measurement results, I save some of the imported parameters, one of which is an array of text entries. All other values go to the results file fine but these text entries are causing a problem.

I am creating the .csv line entry in a formula box like this: InputPin1+","+InputPin2+","+...etc. The values on some of these input pins are obtained from arrays with another formula box like this: Array[index].

This all works well as long as the items written to the .csv file come from the measurement loop or number (not text) arrays created from the first .csv file. I get results in my csv file (opened in Excel) like this:
NumberFromArray   MeasurementResult   CounterNumber   NumberFromArray
NumberFromArray   MeasurementResult   CounterNumber   NumberFromArray
NumberFromArray   MeasurementResult   CounterNumber   NumberFromArray
etc...

But as soon as I read from the text array the .csv file I write has errors beginning on the second line like this:
NumberFromArray   MeasurementResult   CounterNumber   TextFromArray
NumberFromArray   MeasurementResult   CounterNumber   
TextFromArray
NumberFromArray   MeasurementResult   CounterNumber   
TextFromArray
NumberFromArray   MeasurementResult   CounterNumber   
TextFromArray
.......

It's as if an end of line is finding it's way in somehow. If I replace the TextArray[index] input with a text constant, a number, or a NumberArray[index] everything works fine. I have tried everything I can think of in my measurement routine and the UserFunction that imports the .csv and creates the arrays, but I just can't get it working. I also can't understand why the problem begins on the second line.

Any suggestions on this would be greatly appreciated.
Thanks,
Don  

Outcomes