Promotic
WikipediaLinkedInYoutubeTwitterFacebook

SetValidityFce - method of object tvGraph

Description:
Sets text as validity function for tvGraph object.

Data points of the trend (see tvPoints) are checked by each object of the tvGraph type (there can be created more objects in the object of the tvTrend type, see tvTrend.AddGraph) and the time range where data points satisfy the validity function of one in graphs, is drawn just by the tvGraph object.

The SetValidityFce function needn't be called in most cases because the validity function is also set on creating the tvGraph object while calling the tvTrend.AddGraph where it is entered as a parameter.

Syntax:
SetValidityFce(sValidityFce As String) As Long
Calling:
oGraph.SetValidityFce sValidityFce
Parameters:
sValidityFce(String) In the following text the xx has the following meanings:

gt=greater than, ge=greater or equal, eq=equal to, le=less or equal, lt=less than.

In the following text the real number is set into val.

"LimitVal(xx;val)" - time interval of the trend is drawn if values of data points in the tvPoints object exceed (equal, under pass, see xx) the real value val.

Example: "LimitVal(gt;100)"

"LimitTrend(xx;t1)" - time interval of the trend is drawn if values of data points in the tvPoints object exceed (equal, under pass, see xx) values of data points of another trend whose tvTrend.ID is equal to t1.

Example: "LimitTrend(gt;t1)"

"LimitTrendCompare(xx;t1;val)" - time interval of the trend is drawn if values of data points of another trend (tvTrend.ID is equal to t1) exceed (equal, under pass, see xx) the real value val.

Example: "LimitTrendCompare(gt;t1;100)"

"AlwaysTrue" - time interval of the trend is always drawn
"AlwaysFalse" - time interval of the trend is never drawn
Return Values:
0 - syntax error, the validity function was not set
1 - the validity function "AlwaysFalse" was set correctly
2 - the other validity function was set correctly
Note:
Preset values of the validity function can be found in the Style > Validity configurator.
See also:
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Acx;
var oTrend = oTView.Trends("t1");
var oGraph = oTrend.AddGraph(1, 0, "");
var n = oGraph.SetValidityFce("LimitVal(gt;100)");

if (n > 0)
  //OK
Example2:
JavaScriptVBScriptSelect and copy to clipboard

oGraph.SetValidityFce("LimitTrend(gt;t1)");
Example3:
JavaScriptVBScriptSelect and copy to clipboard

oGraph.SetValidityFce("LimitTrendCompare(gt;t1;0)");
PROMOTIC 8.3.23 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice