06-14-2017 09:03 PM
06-15-2017 08:55 AM
I have redesigned the program as a state machine. Everything is still working as desired with the exception of writing the values to a file. Previously, I was planning to build an array of the number of sites for a given panel. Then write the file when that array was full. The idea being that one panels worth of data would be written to a single row in the spreadsheet.
I am still having issues getting that array to populate the way I want, so I have moved to writing to the file after each measurement. The problem I am having with this method is knowing how many readings have been written to the file, in order to add a newline in for a new sheet.
06-16-2017 10:27 AM
If your goal is only to check for the number of Captures equal to the number of Sites, you should be able to add a shift register to your loop, and set the value equal to sites in the Init case. Then in capture, decrement the counter and compare with 0. If (after decrementing) the value on the shift register is equal to zero, you have Sites number of measurements.