There are two types of data logging applications available, a Free Running "Standard" Data Logger and a Snapshot Data Logger. The free running or "Standard" data logger logs data on a recurring timer straight to Flash whereas the snapshot logger temporarily stores data in RAM then copies it to Flash memory when an event occurs. In both cases the data is stored in a csv file which can be copied to a USB Flash drive.
General Guidelines
Data logging can consume a lot of system resources, primarily Flash memory which has a limited lifespan based on number of write cycles so should be used only as necessary to meet the project requirements. The data logging application will calculate how much memory is consumed and from that you can calculate how long it will take to reach the maximum limits. The general recommendation is to set the maximum file size to no greater than 250 Mbytes for a individual file and limit the combined size of all files to no more than half of available Flash memory. This will allow plenty of room for file manipulation.
When selecting data log rates, the standard logger should not store data at a rate faster than 1000mSec. If faster logging is needed then use the Snapshot data logger.
As an example with a data rate of 1 second, a 250Mbyte file can store 31 days of continuous data logs with 10 variables selected. Another way to express this is you can store 750 engine hours worth of data.
Free Running (Standard) Data Logger
Step 1 - Add a new data logger and select "standard" mode
Step 2 - Set the log interval in milliseconds, it is recommended to set this value no lower than 1000mSec.
Step 3 - Set the maximum log size, 250MB is the recommended maximum.
Step 4 - Select the variables you wish to include in the data log from the list. A time stamp is available if the display has the Real Time Clock option. Do not select "Add Time Stamp" and the individual RTC variables, it will duplicate the data.
Step 5 - Start/Stop the data log by calling the Datalogger->Start(Empty) and Datalogger->Stop(Empty)action
Step 6 - Output the data log CSV file. Call the action Datalogger->Output(Empty) to copy the file to a USB Flash drive. The Output action will only copy the "Standard" data log.
Step 7 - Monitor the output status events (Datalogger.OutputComplete & Datalogger.OutputError) to verify the file was copied to USB successfully.
Step 8 - To Clear the data log call the action Datalogger->Clear(Empty). When the data log is full the event Datalogger.FileFull will fire allowing you to take action like notify the operator or stop further data logging. To keep a running log and overwrite old data with new data, select " When out of space delete old log entries". The variable Datalogger.FileSIze can be monitored to see how large the data log file is.
Snapshot Data Logger
Step 1 - Add a new data logger and select "Snapshot" mode.
Step 2 - Set the log interval in milliseconds, 20mSec is the minimum value.
Step 3 - Select how many samples you want to store in RAM memory, this will become a record. This also determines how many seconds or minutes worth of data you are collecting.
Step 4 - Select how many records you want to store in the CSV file, the maximum is 180. Take note of the file size calculations as you make these selections.
Step 5 - Start the data log by calling the Datalogger->Start(filename). Data will be collected in RAM memory in a first in first out buffer.
Step 6 - Store the data as a record in the CSV file by calling Datalogger->Store(filename). The data will now be located in the csv file in Flash Memory. Use a recurring event to fire this action or have it fired from a active fault.
Step 7 - Stop Data logging by calling the action Datalogger->Stop(filename).
Step 8 - Output the CSV file to USB by calling the action Datalogger->Export(filename).
Step 9 - Clear the data log csv file if desired by calling Datalogger->Clear(filename).
Comments
0 comments
Please sign in to leave a comment.