Mastering Forge #9: Generating Events

Welcome to the 9th tutorial on our series Mastering Forge.

In our previous article, Mastering Forge #8, we explored how to use reverse connections in Forge.

In this article, we will focus on Forge’s Event Generator Module. Event Generator is useful for enabling event-based communication when your data source doesn’t provide or even support events. You’ll learn to create reusable event templates and configure event generators to attach new events to objects.

If you prefer your tutorials in video format, you can watch our video tutorial on configuring event generators on YouTube.

During this tutorial, we’ll be using the following products:

Create Event Templates and Generators

To follow this tutorial, in Forge’s address space, create an object node and add a variable node for the object node. Then, map the variable to Prosys OPC UA Simulation Server’s Sinusoid variable. In this example, I created a WaterTank object node with a WaterLevel variable.

1. From the Dashboard, start the Event Generator Module.

Starting Event Generator Module

2. Navigate to Event Generator > Templates and press Add Template.

Adding Event Template

3. Here, you will create an event template that defines how the event is presented.

  • Start by giving the template a name.
  • Next, from the + icon, add two Event Property templates.
  • Fill in their Event Property and Template according to the figure below. Last, press Add.

4. Navigate to Generators and press + Add generator.

Adding Event Generator

5. Generators define the object the event relates to and how it is triggered.

  • First, give the generator a name.
  • Then, select an object node that will be the source for the event and the Template we created previously.
  • In the Template Variables, select the mapped variable (WaterLevel) to value.
  • For the Generation Triggers, choose the same variable as a trigger with the settings shown below. For Trigger conditions, use High Limit with 1.5 as Comparison value. This triggers the event only once after exceeding the 1.5 threshold. Finally, press Add.

6. Open Prosys OPC UA Browser and connect it to Forge. In the Objects folder, right-click the object for which you defined the event and select Monitor Events. The event should now appear once the variable’s value exceeds 1.5.

Monitoring Events from Prosys OPC UA Browser

Next Steps

This wraps up the 9th article of the Mastering Forge series. Here’s a recap of what we did in this tutorial:

  1. Started the Event Generator Module and created an Event Template.
  2. Configured an Event Generator that attaches the event to an object and defines its triggers.
  3. Used Prosys OPC UA Browser to monitor the object’s events.

In the next article, we will work with Forge’s OPC UA Publisher and Subscriber modules used for OPC UA’s PubSub communication.

If you want to learn more about Forge and its capabilities, you can request a detailed introduction by emailing sales@prosysopc.com or using our contact form. We’d be delighted to provide tailored information about Forge that aligns with your interests and requirements.

A headshot of Iivo Yrjölä

Iivo Yrjölä

Customer Integration & Support, Prosys OPC

Email: iivo.yrjola@prosysopc.com

Related Posts

Interested in this topic?

Get updated about new posts through our newsletter!
Scroll to Top