Configure triggers

Activate Cloud Logging and set up a data source

This article assumes you’ve already 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 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 trigger and set the 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 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 analyze that situation.

Add triggers

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

  • Go to [Devices] in the main menu, select the concerning device, open its [Apps] tab, and [Open] the Cloud Logging app.
  • Press [Triggers], select the concerning data source if you’ve configured more than one, and press the add trigger-icon .

You can choose to:

Manually add new triggers

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

  • Select the concerning variable, enter a trigger name, a trigger condition, add a description, and press [Add].
Add trigger

Duplicate

You can easily duplicate this trigger if you’re adding triggers that are only slightly different. This way you’ll only have to make small adjustments.

Next step

Now that you’ve added a 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 triggers from a file (or device)

You can easily and effortlessly copy triggers from one device to another by exporting the concerning triggers (view the “Manage 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 cloud logger. The CSV file structure is explained in our “Import triggers: CSV file structure”-article.

When you press [Import from CSV-file], 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 the triggers.

Next step

Now that you’ve added a 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 triggers

Select the data source under [triggers]. You can view all defined triggers in a list view or table view

Multiple triggers can be selected by pressing the  icon on the left. These can then be removed, duplicated, or exported to a CSV file.