|
cRIO data logging
Preamble:
I always have trouble with file I/O. I'm not sure why. It should be easy, right? Bear with me if I'm overlooking things right in front of me (if, for example, I should be using datalogs instead of a tab-delimited text document)
Problem:
I want to log data to a file. There will be new data regularly; the point of the log is to record a history of the data. This means I want to read it as an array when I FTP the file over to my computer. It may be thousands of entries long. I don't want the data to become corrupt if I quit the program improperly (the robot is shut down, for example, or my project explorer looses comms during a temporary deployment).
I'd prefer human-readable, but I'll let that go if it's not practical.
I'd also like it to have a fairly low overhead, so the logging does not slow down the data collection. I could be logging anything from 6 bytes every 20ms to 8 bytes every 1ms.
What is a good way to continuously log data?
__________________
-- Marshal Horn
|