Working With Arrays And Charting


ledbelly2142

Recommended Posts

I am trying to use display the history of an existing channel with an expression and can't get the syntax correct.

 

I have a channe "mychan" that I want to divide by 4 and show the history with the expression.

 

The General Math Functions and Operations help file indicates that the math.divide() function will work with arrays. Unlike the "Math" function that will not work with arrays.

 

Here is what I have tried in the trend graph expression:

 

math.divide(mychan()/4)

math(mychan()/4)

and some others with and without the ";" at the end of the expression

 

The channel "mychan" will display it's historical array in the trend graph by itself, just not with any math expression added to it.

 

I can display the instant changing numerical value with a simple expression: mychan()/4, but does not work with historical data points (array).

 

What should the expression syntax be with in order to show a math expression with historical data?

 

Thanks

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.