Using the CSV_Include Project > CSV_Include Reference > CSV_Include Functions > CSV_TrendX_AddVariable

CSV_TrendX_AddVariable

Assigns a variable to the first available instant trend tag. An instant trend tag is available if no variable is currently being trended by it; that is, msTrendXVariable[iTrendNo] = "", where iTrendNo is the number of the instant trend.

Note:This function is to be called only on a Trends Server. To maintain redundancy the function is also called with the same arguments on the second/redundant Trends Server.

The variable is assigned a trend duration. The variable name is also added to the end of a queue storing currently assigned variables in the order in which they were assigned.

If there are no available trend tags then the variable is not assigned to be trended.

Syntax

CSV_TrendX_AddVariable(sVariable, iDuration, IupdateRedundantSrvr)

#sVariable:

Name of variable to be trended.

#iDuration:

Value to preset trend tag timer to. This determines the number of seconds that the variable will be trended for.

#iUpdateRedundantSrvr: