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
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
The last input on the formula box, called Test_Plan_String, is the one causing the problem. This input is being obtained from an array of text type that was created by reading a csv file. In the logging box you can see this item displayed at the end of each line as test1, test2, etc. As you can see, it is displayed normally in the logging window. In the csv file however, there are the extra line breaks mentioned in the original post.
If I change the input to Test_Plan_String to an array of some number type or a text constant the csv file looks fine.
Also of interest is that if the csv file is opened in notepad instead of a spreadsheet it appears normally, leading me to think that maybe there is some formatting involved that the spreadsheet recognizes but the text editor doesn't.
Thanks,
Don
Attachments
But the debug it we need to post vee program with sample data. Not a screen shoot
I'll keep in mind in the future to post a Vee program when appropriate. Your suggestion gave me the info to research and debug this myself, which helps for continued learning.
Don
Attachments