Chart

Create a new project or integrate into an already existing one.

For this tutorial, we:

  1. switched the Mervis IDE project into Full Mode

Axon
Neuron
Unipi 1.1

With all of the above set, continue according to the following guide:

Open the HMI template by double-clicking on it and then click on a spodní části levého panelu klikněte na HMI objects at the bottom of the left panel. A list of Mervis HMI elements will appear.

Drag and drop the Chart element to the HMI template open on the canvas.

As the element will stay selected, a list of its properties is displayed in the right column. Here, click on Chart Mappings and open its menu using this button: .

Chart Mappings dialogue window will open. The window could be divided into two parts:

  1. The upper part for setting a single or multiple Y-axes
  2. The lower part for setting up the individual chart lines and their properties, ie. variable mapping, name, controller or Y-axis the variable belongs to

As we need only a single Y-axis, we will leave the predefined Axis 1 unchanged. We can also set its minimal or maximal value. If the auto is left on, the Axis 1 will dynamically change according to values displayed.

At the bottom of the dialogue windows, click on Add to display further properties of this mapped variable.

The most important item here is Variable. Click on . A variable selection dialogue will open - select the required variable you want to use in the chart.

You can set additional properties, but these are out of this tutorial's scope for now. We will however add 3 more lines. In total, the chart will display 4 lines of real variables.

You can now deploy the project into the PLC. The chart will display values over time, but their history will not be stored.

For storing historical values from the chart, you need to create a history first, enable the storing of it or connect the PLC to the Mervis DB service.

If you added variables to the history, deploy the solution into the PLC. After that, you can check the Output tab where you can find info about historical data. History maximal length represents time over which it is possible to store data into the PLC's local history using the current number of variables of the given type.

The values are now stored in the history. Wait for 5 minutes and then open the chart page. Data should be visible now.

You can also tell by the chart containing points with each point representing one specific status loaded from the history. By default values are stored every 60 seconds, these points should be then separated by one minute on the X-axis.