Skip to main content
Version: 25.1 (stable)

Trigger Messages Using Numeric Variables and Ranges

The easiest way to trigger a message in HELIO is to monitor a numeric variable and trigger a new message as soon as that variable moves out of a specific range.


1. Create a PLC Connection

Our first task is to create a PLC Connection connection and bring in some data variables that we can use to trigger our messages.

PLC Mode is Required!

Keep in mind that it is not possible to trigger messages using Placeholder Mode.

  1. Download & Start the Playground PLC

Setting up a PLC that we can connect to sounds pretty complex, right?

The HELIO Playground PLC Got Your Back

It's a software-based demo PLC that you can download for free and run on your development computer right away. A handy tool when you want to learn how to connect HELIO to an industrial machine that communicates using OPC-UA.

Download the latest version and start it.

  1. Add the Connection

Good job on getting the PLC set up and running. Let's keep going:

  1. Explore the Structure

Once you've got the connection all set up, feel free to take a look and explore the data tree of the Playground PLC.

2. Define The Variables

Next, we need a variable that we can monitor and trigger a Warn message when it rises above a certain threshold.

Fortunately, the Playground PLC already has a set of Temperature variables that we can use to do just that. Let's add them to our project.

  1. Locate the Temperature Variables

Locate the variable in the Data Source Explorer. You should spot it under:
Examples/Concrete/Temperature.

  1. Import the Variables

Let's bring the variables into our HMI Data so we can use them in our HMI. Since the ActualTemperature is controlled by the TargetTemperature value, let's just import the whole Temperature directory like this:

  1. Make TargetTemperature Writable

To be able to write change the temperature we need to make sure that we can actually write the TargetTemperature variable. loosen the restrictions of the variables, so that we can read and write them.

Your HMI Data Explorer should look something like this:

3. Setup the Trigger

In the previous step, we've defined Warn message with the code WARN-1.

Lets see if we can trigger it using our ActualTemperature variable.

  1. Add Your First Trigger

Switch to the Message Triggers View view, click the Add Type action and choose Process Variable as a trigger type.

  1. Configure the Trigger

Our first trigger is going to show our WARN-1 message whenever

  • Make sure choose ActualTemperature as the Source variable.
  • Enter WARN-1 as the Code that shall get triggered.
  • Set the Minimum to 0 and the Maximum to 90

4. Create a Page to Trigger Messages

Things are really starting to get interesting since we're about to start sending messages to our HMI. All we need to do is create a simple page to test everything out. With HELIO, it couldn't be easier. So, let's do this!

  1. Add a Parameter Page

First things first, we need to create a page. To keep it simple, we're just going to create a super simple Parameter Page.

So switch to the Content View and:

  1. Add a Little Magic to Adjust and Check the Temperature

Next, we need two elements so that we can actually adjust the TargetTemperature and observe the ActualTemperature:

  • Add a Magic Input element and connect it to the TargetTemperature variable
  • Add a Magic Output element and connect it to the ActualTemperature variable

5. Let's Trigger Some Messages

Let's Get Those Messages Fired Up!

  • Switch to PLC Mode to make sure you will be writing to the actual PLC
  • Switch to Test Mode so you can toggle the inputs.
  • Activate set the temperature to something above 90° and watch the Warn message appear

Your HMI should behave something like this:

Mission accomplished!

You've triggered your first message using an actual PLC.

Ready to learn more how to display all active and archived messages? Check out the next step of the guide…