[SOLVED] Synthetic Function does not execute

Hello,

I’m trying to create a Synthetic Variable whose role will be to record the data of another variable whose value is higher than a certain threshold.

In this example, “padep_102” is the name of the device which the variable “rms_z” containing the original unfiltered values belongs to. “predictivesettings” is the name of the device which owns the variable “runningthreshold” containing the threshold value.

Although the formula seems to be correct, the function is never executed. On the other hand, if I replace “runningthreshold (predictivesettings)” with a fixed threshold value the function is executed. It is as if the function refuse to use the value contained in “runningthreshold (predictivesettings)” for its calculations.

Do you have any idea what could cause this? Thanks :slight_smile:

Hi @bertrandgauvreau,

Thank you for sharing your question with the community,

Based on your explanation as the synthetic expression involves more than one variable is necessary that both variables, rms_s and runningthreshold have the same timestamp, otherwise you need to wrap up the expression with the fill_missing() function, as shown below:

fill_missing(where(value > threshold), value))

To learn more about Ubidots synthetic engine, please refer to the following article.

I hope this helps, but please let me know if you need anything else or if you have any other questions,
-Isabel

hurrah!

It works great :slight_smile: Thanks!

Have a nice day

1 Like