LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Store and save cycle count data

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!

 

0 Kudos
Message 1 of 8
(3,837 Views)

Sorry...here's the code!

0 Kudos
Message 2 of 8
(3,832 Views)

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.

 

=====================
LabVIEW 2012


0 Kudos
Message 3 of 8
(3,828 Views)

Okay, I've got my voltage measurements writing to file, but still need a way to store my cycle counts.

Anyone?

0 Kudos
Message 4 of 8
(3,798 Views)

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.

Richard






0 Kudos
Message 5 of 8
(3,790 Views)

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.

Tim
GHSP
0 Kudos
Message 6 of 8
(3,786 Views)

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.

Richard






0 Kudos
Message 7 of 8
(3,784 Views)

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!

0 Kudos
Message 8 of 8
(3,771 Views)