Configure log triggers

Supported hardware and firmware

Logging on trigger is supported on the x500 in firmware 3.11 and up. Please upgrade your firmware if you are running an older version.

Activate Cloud Logging and set up a data source

This article assumes you've already activated Cloud Logging (or started the 30 day free trial) and have set up a data source (including variables). View our corresponding guides if you haven't yet.

You can log your data at 3 different events, which you configure in the data tag itself:

  • A static interval.
  • When its value changes.
  • On custom trigger.

This article explains how you add a custom trigger to use in your data tags. Note that you can use the same log trigger in multiple data tags. For other information regarding the configuration of data tags, please view “Configure data tags“.

How does it work?

Let's say you have 5 variables in your PLC: machine state, product, temperature, phase, density. You can configure any variable as trigger, but let's take "temperature" as log trigger and set the log trigger condition to when 60°C is exceeded. You can then add 4 data tags for the remaining variables and configure the data tags to log on this log trigger. When the temperature exceeds 60°C the trigger condition is met and all 4 data tags will be logged once. For this to happen again, the trigger condition will have to be false first (below 60°C).

Practical uses

You can log a product's measurement data (weight, size, type, container, etc.) when the product passes a certain sensor. This allows you to look back, i.e. in a table format, and see every product's measurement data in a clear and easy overview. Another example is to log the machine state and critical data when an error happens. It could be that the machine is always in manual mode whenever an error happens. This allows you to analyse that situation.

Add log triggers

It is possible to use the same log trigger for different data tags. You are free to add countless log triggers.   

  • Go to the Fleet Manager which is accessible from the Apps menu in the top right corner if you are currently in a different X4 Remote app.
  • Open the main menu, go to devices, select the concerning device.
  • Click on the Data source you would like to add log triggers to, then click on log triggers.
  • You can choose to:
    • Manually add new triggers
    • Import log triggers from a file (or device)

Manually add new log triggers

When you press [Add trigger] you’ll see the window that is depicted below.

  • Please fill all the required fields, and click on press [Add]. The table below contains a description of all fields.
    Variable  Detail
    Name Add the name of the variable
    Variable This variable ensures that every variable in a data-source remains unique, even when you give multiple variables the same name.
    Condition To determine when a log trigger is met, a condition on when to trigger needs to be applied. You can do this by setting an condition (e.g. greater then >) and a value that applies to the condition.
    Threshold This is the value that applies to the trigger condition
    Description (optional) Add a description of the log trigger so that other users will know what to do when a condition is met.

Next step
Now that you've added a log trigger, you can use it as a condition to log your data. You'll need to change the concerning data tags' "log on" setting to "trigger" (Configure data tags).

Import log triggers from a file (or device)

You can easily and effortlessly copy variables from one device to another by exporting the concerning variables (view the “Manage log triggers” part of this article) and then importing them in your new device. Alternatively, you can manually prepare your triggers in the required CSV format to load them all at once into your configurator. The CSV file structure is explained in our Import log-triggers article.

When you press [Import from CSV-file] in the top right side of the screen, you’ll see a browse window.

  • Select a CSV file to import and press [Open].
  • When the file has been read, press [Add] to add all log-triggers to your data source.
  • You have now made the changes in X4 Remote, but these are not yet active in your device. You will need to push your changes to your device for them to take effect. Click [Push config to device] in the top right corner.

Temporary disconnect

After this next step, the config push, the device will temporarily disconnect to reconfigure its Cloud Logging settings and will automatically reconnect. This may take a minute.

Next step
Now that you've added a log trigger, you can use it as a condition to log your data. You'll need to change the concerning data tags' "log on" setting to "trigger" (Configure data tags).

Manage log triggers

You can view all defined data tags in the table at the Triggers page. Data tags can be selected by pressing the checkbox on the left, or you can select all by pressing the checkbox at the top. You can remove selected variables by clicking on the [remove selection] button at the top right corner of the screen.

 

İletişim formu