Trend Display limitations: sampling intervals and zoom issues

Trend Display limitations: sampling intervals and zoom issues
none 5.0 1
  • HMI Model: cMT3162X V2
  • EasyBuilder Pro Version: 6.10.01.609

Hello,

We are trying to implement a single Trend Display in our application and we would like to use it to visualize all relevant process variables, such as temperatures, RPM, pressures, levels, etc.

Since each of these variables has different characteristics, we would like to configure different sampling intervals depending on the type of variable (for example, faster sampling for dynamic signals and slower sampling for more stable variables).

However, we have encountered the following issue: all variables are associated with a single trend object, and it is only possible to define one sampling interval for that object. This significantly limits the flexibility when trying to optimize data acquisition.

On the other hand, we are also experiencing an issue with the zoom function of the trend graph. When displaying variables with values greater than 100, the zoom does not work properly. It seems to only behave correctly within the range of 0–100.

Thank you in advance.

Hi @jmcascales ,

Thank you for your question. Currently, a single Trend Display object can only use one sampling interval. If you need different variables to be recorded at different rates, there are a few possible approaches:

One option is to use a macro to control the update rate of the values being sampled. This can be done by creating separate macros for variables that require different update frequencies, and use Periodical Execution to write values to the addresses used by the Data Sampling object.

For example, if temperature changes slowly, you could execute a macro less frequently, and only update the sampled value at that interval:

macro_command main()
	short temp

	GetData(temp, "Local HMI", LW, 100, 1)
	
	// LW-0: Read address for "Temperature" channel in Data Sampling object
	SetData(temp, "Local HMI", LW, 0, 1)
end macro_command

By adjusting the execution period of each macro, you can effectively record different variables at different rates while maintaining a single Data Sampling configuration.

Another approach is to create multiple Trend Display objects, each configured with its own sampling interval. You can then layer them on top of one another and enable a transparent background for each display.

To do this, navigate to the Trend tab of the Trend Display’s Properties, and enable the Transparent option. This allows multiple trend objects to be overlaid in the same window, creating the appearance of a single trend display while each trend uses its own sampling interval.

Would either of these approaches work for your project configuration?

Thank you very much for your response.

Regarding the first option, I don’t think it will work in my case because even if I set different sampling times in the macro, I still need to define a sampling time in the Data Sampling object. Therefore, it will always operate with the fastest sampling time configured. Also, my goal is to visualize everything in a Trend Display viewer.

As for the second option, I will try it. I’m not sure what will happen when I want to use the tools in the top right corner, but I assume it will only allow me to use those from the Trend Display that is on the top layer.

I also have a few more questions, but I will post them in a separate thread.