Data Logging on the NA

Updated March 20, 2024

Overview

The NA Series includes a Data Logging feature that allows variables to be stored in a data log, and later viewed on the screen as a trend. A dataset is required in order to log data, a dataset contains a list of variables as well as the configuration of the trigger to log (interval or on a condition).

To start data logging for a dataset, there are two options, either to automatically start logging when starting up, or a manual start-up using an action or code.

It is possible to configure for each data set where it will be stored, either on the SD card, or on a mass storage device connected via USB.

Data Logging at Runtime

Data logging is carried out to an intermediate location in MRAM. Once dedicated MRAM space is used up, data will be transferred to a corresponding data set CSV file located on SD card or USB stick. In case of power down, MRAM is saved automatically. When duration of CSV Data Set file ends, that file is closed and saved, and a new file will be started.

Setting up a Data Set

To create a new data set, in the solution explorer click on Data Logging (right click) -> Add -> Data Set. The following will appear:

Each Data Set has the following properties:

  • Name – a unique name for this Data Set (Sysmac Studio naming rules apply).
  • Storage Type – fixed as CSV in version 1.0.
  • Target Device – SD Card or USB Memory Stick.
  • Target Folder – Location on the target device (refer to Notes below).
  • Update Type – Determines when Data Set values are logged (Regular Interval or On Condition).
  • Update Rate - Interval rate (only when Update Type is ‘Regular Interval’). 
  • Expression – Trigger Expression (only when Update Type is ‘On Condition’).
  • Automatically Start on HMI Device – automatically begin logging when device is powered on.
  • Start New Database File
    • Daily – Specifies new Data Set files should be started daily.
    • After Specific Time Period – Specifies new Data Set files should be started after a specific time period.
      • Time Period – Specifies the time period.
    • After Specific Number of Logs - Specifies new Data Set files should be started after a specific number of logs have been written to the existing one.
      • Number of Logs – Specifies the number of logs.

The user can change the order of variables on the list. This will change to order in which the variable and it’s values are being written to the csv file.

Data logging in VB script

The following actions and events are available for user, this are also accessible through the VB.NET:

 Function name Input argument Input data type Description
StartDataLogging DataSet Name String Starts data logging for the specified dataset.
StartDataLogging <None> <None> Starts data logging for all datasets.
StopDataLogging DataSet Name String Stops data logging for the specified dataset.
StopDataLogging <None> <None> Stops data logging for all datasets.
ClearDataLogBuffer DataSet Name String Clears the current log data, stored in MRAM, for the specified dataset.
ClearDataLogBuffer <None> <None> Clears the current data logging data,  stored in MRAM, for all datasets.
ExportDataLogBuffer DataSet Name String For the specified dataset, the current log data, stored in MRAM, will be exported to the currently active data log file.
ExportDataLogBuffer <None> <None> For all datasets, the current log data, stored in MRAM, will be exported to the associated active data log file.

 

Start a Conversation
This conversation is closed
Uploading...