Revision as of 16:49, 12 February 2020 by Registered User

In some circumstances, it might be useful to retrieve some data from a previous acquisition. Hence, it is possible to store the acquired data from a live acquisition in a local file and then to import this local file later in a chart.

1. Activating the data log

The log can be activated from "processing" node configuration panel by using the "Log Data" parameter.

This parameter supports various options :

  • No log: (default) the values are not logged.
  • Log all values: All the values read from the MCU target are logged.
  • Log only changes: Only the changes for each variable are logged. This options allows to reduce the size of the resulting file.
Processing Panel Log option.png

A new Log file is created each time an acquisition is started on a specific variable group. The file is made available under a predefined directory path. The directory path could be configured in settings.js file, and the resulting log file names follow hereafter convention : "Log_groupname_timestamp.stcm".

2. Import the data log

After having logged some acquisition data, it is possible to import any one of the resulting file in the chart node provided in STMicroelectronics palette category.

ImportLog.gif

In dashboard view, when clicking on the IMPORT DATA button of the chart, a modal window will popup from which a specific file can be selected. All the files with stcm extension will be displayed in alphabetical order. After having selected a specific file, and click on IMPORT button, the chart is filled with the data from the selected file.


3. Data Log format

The stcm file is a text file containing several lines, each line representing a set of consecutive values for one variable.
Each line follows hereafter template (json object):

{"groupname":"Snapshot","variabledata":[{"x":1578586445584},{"y":36045,"x":1578586445609}{"y":39170,"x":1578586445634}],"variablename":"g_counter1"}

It contains 3 different keys/values  :

  • groupname : the name of the variables node on which the acquisition has been started,
  • variabledata: an array of duplet (x:timestamp, y:value). The number of element in the array will depend on the sampling frequency set in variables node configuration panel. For snapshot & trigger acquisitions, the first duplet does not contain "y" value. This mechanism is used to keep the information of when the end-user has started the acquisition which might be different from the actual data acquisition. This information is used by the the chart to initialize the timeline.
  • variablename: the variable name.

Moreover, if N variables are logged in the the processing nodes, the resulting file will contains several "groups" of N lines with one line per variable.

For instance, for the following list of variables (including expression and statistic) defined in processing node:

Processing Panel list of Variables.png

the log file will contain several groups of 8 lines (1 line for each of the 8 variables):

{"groupname":"Snapshot","variabledata":[{"x":1578586445584},{"y":36045,"x":1578586445609},{"y":39170,"x":1578586445634}],"variablename":"g_counter1"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445584},{"y":554562,"x":1578586445609},{"y":554568,"x":1578586445634}],"variablename":"g_counter2"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445584},{"y":27655.75,"x":1578586445609},{"y":32343.25,"x":1578586445634}],"variablename":"g_counterDouble"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445584},{"y":27655.75,"x":1578586445609},{"y":32343.25,"x":1578586445634}],"variablename":"g_counterFloat"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445584},{"y":-58839,"x":1578586445609},{"y":-55713,"x":1578586445634}],"variablename":"g_counterLong"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445584},{"y":50,"x":1578586445609},{"y":56,"x":1578586445634}],"variablename":"g_counterShort"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445609,"y":35435},{"x":1578586445634,"y":36186.2}],"variablename":"stat_avg_counter1"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445609,"y":590607},{"x":1578586445634,"y":593738}],"variablename":"expression1"}
{"groupname":"Snapshot","variabledata":[{"y":42296,"x":1578586445659},{"y":45422,"x":1578586445684}],"variablename":"g_counter1"}
{"groupname":"Snapshot","variabledata":[{"y":554574,"x":1578586445659},{"y":554580,"x":1578586445684}],"variablename":"g_counter2"}
{"groupname":"Snapshot","variabledata":[{"y":37032.25,"x":1578586445659},{"y":41721.25,"x":1578586445684}],"variablename":"g_counterDouble"}
{"groupname":"Snapshot","variabledata":[{"y":37032.25,"x":1578586445659},{"y":41721.25,"x":1578586445684}],"variablename":"g_counterFloat"}
{"groupname":"Snapshot","variabledata":[{"y":-52587,"x":1578586445659},{"y":-49462,"x":1578586445684}],"variablename":"g_counterLong"}
{"groupname":"Snapshot","variabledata":[{"y":62,"x":1578586445659},{"y":68,"x":1578586445684}],"variablename":"g_counterShort"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445659,"y":36945.1},{"x":1578586445684,"y":38016.6}],"variablename":"stat_avg_counter1"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445659,"y":596870},{"x":1578586445684,"y":600002}],"variablename":"expression1"}
{"groupname":"Snapshot","variabledata":[{"y":45422,"x":1578586445684},{"y":1669,"x":1578586445734}],"variablename":"g_counter1"}
{"groupname":"Snapshot","variabledata":[{"y":554580,"x":1578586445684},{"y":554594,"x":1578586445734}],"variablename":"g_counter2"}
{"groupname":"Snapshot","variabledata":[{"y":41721.25,"x":1578586445684},{"y":-8909.75,"x":1578586445734}],"variablename":"g_counterDouble"}
{"groupname":"Snapshot","variabledata":[{"y":41721.25,"x":1578586445684},{"y":-8909.75,"x":1578586445734}],"variablename":"g_counterFloat"}
{"groupname":"Snapshot","variabledata":[{"y":-49462,"x":1578586445684},{"y":-43214,"x":1578586445734}],"variablename":"g_counterLong"}
{"groupname":"Snapshot","variabledata":[{"y":68,"x":1578586445684},{"y":82,"x":1578586445734}],"variablename":"g_counterShort"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445684,"y":38782.2},{"x":1578586445734,"y":34860}],"variablename":"stat_avg_counter1"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445684,"y":600002},{"x":1578586445734,"y":556263}],"variablename":"expression1"}
{"groupname":"Snapshot","variabledata":[{"y":4733,"x":1578586445759},{"y":7786,"x":1578586445784}],"variablename":"g_counter1"}
{"groupname":"Snapshot","variabledata":[{"y":554600,"x":1578586445759},{"y":554606,"x":1578586445784}],"variablename":"g_counter2"}
{"groupname":"Snapshot","variabledata":[{"y":-4313.75,"x":1578586445759},{"y":267.25,"x":1578586445784}],"variablename":"g_counterDouble"}
{"groupname":"Snapshot","variabledata":[{"y":-4312.25,"x":1578586445759},{"y":267.25,"x":1578586445784}],"variablename":"g_counterFloat"}
{"groupname":"Snapshot","variabledata":[{"y":-40150,"x":1578586445759},{"y":-37096,"x":1578586445784}],"variablename":"g_counterLong"}
{"groupname":"Snapshot","variabledata":[{"y":88,"x":1578586445759},{"y":94,"x":1578586445784}],"variablename":"g_counterShort"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445759,"y":30931.6},{"x":1578586445784,"y":26995.9}],"variablename":"stat_avg_counter1"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445759,"y":559333},{"x":1578586445784,"y":562392}],"variablename":"expression1"}
{"groupname":"Snapshot","variabledata":[{"y":10912,"x":1578586445809},{"y":14038,"x":1578586445834}],"variablename":"g_counter1"}
{"groupname":"Snapshot","variabledata":[{"y":554612,"x":1578586445809},{"y":554619,"x":1578586445834}],"variablename":"g_counter2"}
{"groupname":"Snapshot","variabledata":[{"y":4956.25,"x":1578586445809},{"y":9645.25,"x":1578586445834}],"variablename":"g_counterDouble"}
{"groupname":"Snapshot","variabledata":[{"y":4956.25,"x":1578586445809},{"y":9645.25,"x":1578586445834}],"variablename":"g_counterFloat"}
{"groupname":"Snapshot","variabledata":[{"y":-33970,"x":1578586445809},{"y":-30844,"x":1578586445834}],"variablename":"g_counterLong"}
{"groupname":"Snapshot","variabledata":[{"y":100,"x":1578586445809},{"y":-94,"x":1578586445834}],"variablename":"g_counterShort"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445809,"y":23372.8},{"x":1578586445834,"y":24749.3}],"variablename":"stat_avg_counter1"}
{"groupname":"Snapshot","variabledata":[{"x":1578586445809,"y":565524},{"x":1578586445834,"y":568657}],"variablename":"expression1"}