01-20-2012 11:37 AM - edited 01-20-2012 11:45 AM
My goal is to read the number of cycles in a while loop, take that number and save it to a file. Basically, each time the program runs, there will be X number of cycles the user performs (totally random). Say one person does 50 cycles, the next does 253, etc... I would like to generate a spreadsheet locally that will have a stamp of ALL cycles performed.
How is this doable? Unfamiliar with techniques using variables, so please extrapolate!
Here's the code. I need to know how many times the read matches the write.
Thank You!
01-20-2012 11:46 AM
Sorry...here's the code!
01-20-2012 12:01 PM
Look at the help for write to spreadsheet file and read from spreadsheet file. Set append to true on the write to spreadsheet file vi.
01-25-2012 07:41 AM
Okay, I've got my voltage measurements writing to file, but still need a way to store my cycle counts.
Anyone?
01-25-2012 08:28 AM
Store the cycle count in a shift register. When the user hits "done" or "stop", write the cycle count to a dedicated file. You seem to want to remember each time it was cycled and the number, so write each new cycle count to a new line in the file (i.e. make Append True). When the program starts back up, or resumes test, read the lines into an array and add the array. That's your total cycle count to start from.
01-25-2012 08:34 AM
Or you could just open the file add the number of cycles comple when done and save it. That way you always have the total.
I would use a simple binary file for this. Is is small and fast.
01-25-2012 08:46 AM - edited 01-25-2012 08:47 AM
Tim is right. I just said to do the seperate lines because I thought the OP wanted a record somewhere of all the cycle "stamps" AND a total. If the total is all we want, then just write the number.
I was just wondering why the OP had no problem writing measurements to file, but couldn't write this single number? Maybe the intention is more complicated than we think.
01-25-2012 03:26 PM
No, I just want a quick way to store total cycle counts. I have a time stamp on the data, just need cycle count and maybe day.
Thanks again, folks!