How can the rising or falling of a value be indicated in RTMC Pro by comparing the last value to the one before it?

The Last() function can be used to compare the current value of a variable with the last value that was loaded. To have the graphic display in a graph, create two separate traces that use an expression similar to the following:

alias("ln:cr1000.one_hour.temp_degf", temp); IIF(Last(temp) > temp, temp, NOPLOT)

This expression produces a point if the value is increasing; otherwise, it produces a NAN value, which is ignored by the plot. Specify a trace with the down arrow symbol and a different comparison to plot decreasing values.

This is easier if all that needs to be shown is the current state of the value compared to the previous. To do this, use an alarm that specifies up arrows and down arrows for the images associated with the on and off states.

This was helpful

FAQs Home