Data capture

From Smart Box
Jump to navigation Jump to search

Smart Move includes the facility to save readings from the sensors to disk. This allows data to be gathered under certain conditions and at various times. The information is saved in a form which can be read by most spreadsheets and word processors. An example procedure for capturing data is shown in fig. 12.

fig. 12

How it works. The first line resets the internal clock to 0. Line two opens a file to save the readings to, in this case the file channel 1 is opened (you can open up to 10 files at once) and the file is given the name ‘data’. The repeat until loop then stores the reading from sensor A once every half a second, for ten seconds. The final line closes the disk file. You will be able to open this file with a word processor or spreadsheet to produce reports and graphs. The data is saved on disk as a text file with the file extension .dat. Consult the manual of your spreadsheet or word processor to see how to load a text file into your particular program.