NXT Functions Datalog
From ROBOTC API Guide
NXT → Functions and Variables → Datalog
| The NXT has a data logging capability similar to that found in the RCX. This capability allows you to save variable and sensor values in a log during program execution. This is useful for collecting data during measurements. It is also useful for program debugging where you may want to analyze the value of a particular variable after a program has been run. There’s room for storage of about 5,000 data points.
The data points are stored into RAM. They can be subsequently copied to a NXT flash file. They are not immediately stored into a flash file during program execution because writing to a file in the flash memory can take 3 to 6 milliseconds which could disturb performance of the user application. There are utilities within the ROBOTC IDE to upload the datalog and display in a PC window. These can be found under the “debug display” and the “NXT -> Files Management” display. |
|
| |||||||
AddToDatalog
| void AddToDatalog(const long data) | ||||||
| (void) Adds an entry to the datalog. | ||||||
| ||||||
|
bHideDataFiles
| word bHideDataFiles | |
| (word) Boolean flag to indicate whether data files should be hidden or shown in the NXT GUI. Note that this is defined as a word but is treated as a bool. | |
|
nDatalogSize
| word nDatalogSize | |
| (word) The current size allocated to the datalog. | |
|
nMaxDataFiles
| word nMaxDataFiles | |
| (word) Maximum number of saved datalog files (DATAnnnn.RDT) allowed on a NXT. | |
|
nMaxDataFileSize
| word nMaxDataFileSize | |
| (word) Maximum size (in 100 byte units) of all datalog files saved on the NXT. | |
|
nUsedDatalogBytes
| const word nUsedDatalogBytes | |
| (word) The number of bytes currently containing data in the datalog. | |
|
SaveNxtDatalog
| void SaveNxtDatalog() | |
| (void) Saves the existing datalog from RAM memory into a NXT file named "DATAnnnn.rdt" where 'nnnn' is numeric and increases by one on every save. | |
|