"connectDirectly"
Connects a curve and a data point.
Synopsis
setValue(string shape, "connectDirectly", string Name,
string dp);
shape.connectDirectly(string Name, string dp);
Parameters
Parameter | Description |
---|---|
shape | Name of the object |
Name | Name of curve |
dp | Name of the data point supplying the Y value of the curve |
Description
This attribute is used to connect data points with a curve.
You cannot use "connectDirectly" if you are going to perform a mathematical operation on the variable value for the trend display. In this case, use a dpConnect() instead. However, the trend display is faster with "connectDirectly" than with a work function dpConnect(). It is not necessary to indicate the "curveHistory" of the variable.
Data point element names have to be defined with the complete string including "Config+Detail+Attribut", for example, "dp.e:_online.._value".
When passing an alias to "connectDirectly" it must end with the _value attribute. The RDB direct query will then pass the alias string as given and in addition a second string where the _value attribute is replaced with _status64, so that the database will get these two attributes.
-
Disconnect the momentarily connected value: TREND.disconnectDirectly("Value");
-
Remove the currently existing data from the trend: TREND.curveRemoveData("Value", getCurrentTime());
-
Now connect the new value with the trend: TREND.connectDirectly("Value", "<datapoint.element>:_online.._value");
To connect a curve with a new data point even though it is already connected, the correct order has to considered. Otherwise display errors inside the trend will occur.
Assignment
Trend