http://nxtasy.org/2008/06/16/new-datalogging-nxt-g-block/
A simple to use datalogging block. Nothing fancy – it create a file on your NXT (a BINARY file, meaning it saves ALOT of space compared to regular File Access Block) and writes up to 4 inputs. Each “record” is prefixed with a 1 byte “header” that tells the local machine later how many bytes each input took in the file. The ‘Upload’ button is used to load and decode the datalog file into a regular comma-delimited file you can open in e.g. Microsoft Excel.