Snapshot Recorder


Operator Menu Location: Data Logging and Recording


Operator Bitmap:


Functional Description:
The Snapshot Recorder logs signal data to non-volatile memory for long-term storage. It records event-triggered signal "snapshots" of defined durations. When triggered, the operator will record signal samples for a user-defined time-period following the trigger event as well as signal samples that preceded the event.

 
The operator records data only while its enable input E is HIGH. If E is LOW the operator ignores its signal inputs. The operator begins logging data to non-volatile memory when trigger input T switches from LOW to HIGH. Once triggered, the operator records an entire snapshot (even if trigger input T switches back to LOW). After snapshot recording completes, input T must switch to LOW and then back to HIGH to trigger another snapshot recording (i.e., input is edge-triggered).


While the operator is enabled but not triggered, it records all signal data in RAM. The number of samples it maintains in RAM is determined by the operator property Number of Samples Before Trigger. When the operator is triggered these signal samples stored in RAM are copied to non-volatile memory. Post trigger event samples are then appended to complete the snapshot.


Reset input R clears all recorded information in the data log (non-volatile memory) as well as any recent samples stored in RAM.


The operator can record a number of signals in each sample---the user defines how many signals are to be recorded. The sampling frequency and total number of samples to store in each snapshot are also properties of the operator.

The operator time-stamps every signal sample within a snapshot that it records. The time-stamp is based on the underlying hardware's real-time clock and includes the date (MM/DD/YYY) and time (HH:MM:SS.MMM).


The operator can record multiple snapshot events (the number of snapshots to record is a property of the operator). Once the operator has recorded all of the required snapshots (i.e., has filled up its memory buffer) it sets its output pin HIGH. Output remains LOW until all snapshots are recorded. The operator can be configured to overwrite the oldest snapshots if triggered while full.
Operator output indicates the number of snapshots that have been recorded, including a snapshot recording that may be in progress. If the operator is reset (e.g., R = HIGH), the snapshot count output will be reset to 0.


To retrieve the data set recorded by the operator, select the Query Data Recorder Resources item from the Communications menu in Design Pad or Schema Viewer (while establishing a wired or wireless connection with the hardware). The application will retrieve all data sets stored in the target hardware and identify each set with the name assigned to the operator. Once the data set is selected, the application will retrieve the log file from the hardware and prompt the user to save to disk on the PC. The format of the file is tab-delimited text, permitting import to data analysis and charting programs such as Microsoft Excel.


User-Defined Properties:
Data Set Name. The name used to identify the data set recorded by this operator.


Number of Digital Inputs. The quantity of boolean type input signals to be recorded.


Number of Analog Inputs. The quantity of float type input signals to be recorded.


Number of Snapshots to Store. The quantity of signal data sets (snapshots) to be recorded.


Overwrite Old Snapshots When Full? . When the data recorder has stored all of the requested snapshots, it can either discard the oldest snapshot to record a new one, or stop recording any new snapshots.


Record Interval. The time (in milliseconds) that must elapse between consecutive recorded samples. The default value is 60,000 milliseconds, specifying that signals are to be recorded once every minute.


Number of Samples per Snapshot. The total number of samples to be recorded in a single snapshot data set. The default value is 1,440; with a Record Interval value of one minute (60,000 milliseconds), this setting specifies that the operator is to maintain one day (60ï‚´24=1,440) of data per snapshot.

Number of Samples Before Trigger Event. The number of signal samples temporally preceding the trigger event that is to be recorded in the snapshot. This value must be less than the total number of samples to store in the snapshot (previous property).


Display Enable Input. This property determines if input pin E is visible in the schema diagram. Design Pad issues a warning upon processing the schema when the pin is visible but not connected. The warning message is not issued when the pin is not visible (when this property is not checked).


Display Analog Input. This property determines if input pin R is visible in the schema diagram. Design Pad issues a warning upon processing the schema when the pin is visible but not connected. The warning message is not issued when the pin is not visible (when this property is not checked).


Display Memory Full Output. This property determines if output pin is visible in the schema diagram. Design Pad issues a warning upon processing the schema when the pin is visible but not connected. The warning message is not issued when the pin is not visible (when this property is not checked).


Display Snapshot Count Output. This property determines if input pin is visible in the schema diagram. Design Pad issues a warning upon processing the schema when the pin is visible but not connected. The warning message is not issued when the pin is not visible (when this property is not checked).


Comments:
The amount of non-volatile memory consumed by each sample is

where is the number of analog inputs, is the number of digital inputs, and where  denotes the ceiling operation (meaning round up to the nearest whole number). The elements of the formula suggest that each analog input sample requires 4 bytes, digital input samples are packaged into single 8-bit byte chunks, and the time stamp requires 6 bytes.
•The total amount of non-volatile memory consumed by the operator is

where is the number of snapshots, is the total number of samples per snapshot, and is the sector-size of the non-volatile memory medium (typically bytes for Chameleon modules). The last element of the formula above includes a 3-byte sector stamp used for internal file management purposes. The result of the computation above should be rounded up to the nearest bytes. For example, if , , , , and , then


The total memory consumed is obtained by rounding up 92543 to the nearest integer divisible by 512; the result is 92672.
•If the operator is triggered shortly after it was reset, it may not have all samples preceding the trigger event that the user indicated must be recorded.
•If enable input E switches to LOW after the operator is triggered but before a snapshot has been fully captured, the operator will cease recording data until re-enabled. When it is re-enabled it will record any remaining samples it did not store prior to disabling.
•Multiple data recorders can be included in the same schema / hardware module. The limiting factor is the amount of non-volatile memory (e.g., flash memory) available in the target hardware module.


See Also: Snapshot Recorder