This script logs RS232 data into a file. All data coming in on the RS232 interface are stored in a file called “logdata.txt”. Each line of data is stored with a leading time stamp. One ‘line’ of data stored into the log file either when (newline, 0x0A) is received, more then 50 Bytes of data are received or after the last bytes received more the 5 seconds are expired.
A typical logfile looks like this:
2008/11/04 11:09:33 460 xxxxxxxxxxxxxxxxxxx
2008/11/04 11:09:42 333 xxxxxxxxxxxxxxx
2008/11/04 11:09:55 124 xxxxxxxxxxxxxxxxxxxxxx
2008/11/04 11:10:01 803 xxxxxxxxxxxxxxxxxxxx
2008/11/04 11:10:16 006 xxxxxxxxxxxx
2008/11/04 11:10:25 180 xxxxxxxxxxxxxxxx
2008/11/04 11:10:29 414 xxxxxxxxxxxxxxxxxxxxxxxxxxxx
2008/11/04 11:10:34 395 xxxxxxxxxxxxxxxxx
| Script name: | mr2-7.txt |
| Current version: | v 7, dated from 26.11.2008 |
| Firmware: | v3.28 or higher required |
| Hardware: | Logger cube, logger box or logger module |
| History: | v7: fixed max file size problem when FAT32 v6: removed single from log v5: changed format of ms v1.4: added milliseconds v1.0: Initial release |
Power Up and Connect to your device as described
here in the User Manual section "First Steps".
Typically, this Script is not loaded when an Avisaro Logger product was purchased. Please see
here for details on how to load the script into the logger.
Configure the RS232 port, such as baudrate and stop bits, as described
here using SD memory cards.
The default settings of the RS232 interface are:
After setup, the Logger is ready to operate. All data from the RS232 interface is now logged onto the SD memory card.
When log process is finished, extract the SD card and insert into a "All-In-One" reader connected to a PC. The logfile is called "logdata.txt". This file can be opened in a regular text editor. Alternatively, the file can be inported into another program such as Excel, MathLab, ... .
All characters are logged - binary as well as ASCII. Exception: (0x0d, 0x0a) are removed from the data stream and reinserted to ensure proper formatting.
Key:
Is used to start and stop logging process.
The logging process is automatically started or stopped when a card is extracted or inserted.
The logging process is also automatically started when the device is powered up.
Green LED:
Indicates power up.
Red LED:
Indicates that the logging process is active.
To get more evently distributed time stamp, the "scheduling frequency" can be set to '0'. Use the command "sched 0 fix" to do so. See
here or details.