View Single Post
  #1   Spotlight this post!  
Unread 05-12-2010, 02:12
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
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
Reply With Quote