02-25-2016 10:51 AM
I'm reading the voltage measured on an Agilent 34401 using Single Point measurment in a For Loop (so that I can graph results in real time). The only issue I'm having is that when I try to write the data to a file, it isn't written in two columns (time/loop literation and voltage) like I thought it would be. Instead, it is written as a set of information about each iteration of the loop (including date, time and a bunch of "Delta_X" values). Would anyone know how to write data to a file so that it simply displays in two column form?
Thanks.
Solved! Go to Solution.
02-25-2016 01:39 PM
@cnoyes23 wrote:I'm reading the voltage measured on an Agilent 34401 using Single Point measurment in a For Loop (so that I can graph results in real time). The only issue I'm having is that when I try to write the data to a file, it isn't written in two columns (time/loop literation and voltage) like I thought it would be. Instead, it is written as a set of information about each iteration of the loop (including date, time and a bunch of "Delta_X" values). Would anyone know how to write data to a file so that it simply displays in two column form?
Thanks.
I don't know. Have you tried correctly parsing the results? 😉
Sorry, I couldn't resist.
02-25-2016 02:41 PM
Please run once with an indicator of what is being written to the spreadsheet. Then right click the indicator and click "change to constant". Then upload your VI. Thanks,
Gregory
02-25-2016 04:02 PM
02-25-2016 04:09 PM
We don't know what your results are yet, but if you follow my post above we will be able to see if what data you are actually getting.
02-26-2016 09:24 AM
These are the results that I'm getting (the numbers with the blurbs of text). For reference (and I'm not sure this is even possible) I attached an image of the data written from a previous file on this computer that came out in column form. I also attached an image of my VI because the computer I'm using isn't connected to the internet anymore.
02-26-2016 09:26 AM
Files were too big to be sent together. Here is the data form I'm trying to get.
02-26-2016 09:27 AM
And here's the picture of my VI
02-26-2016 09:28 AM
Well it's going to be pretty hard to offer help without having the actual VI. But, if you are getting that header every time, then maybe search for the ***End of Header*** in order to find the data you are after.
02-26-2016 09:30 AM - edited 02-26-2016 09:33 AM
Some comments:
Don't Initialize and Close your instrument inside the loop, that should only be done once at the beginning and end of a program (usually).
Do continue to read and write inside the loop.
Don't use write to measurement file express VI.
Do use write to spreadsheet or the report generation toolkit.
Also, what is the data in the left column, just the loop iteration or data point number? Or is it some other variable we don't see here?