"curveValues"
Sets or queries the y values and statuses at certain times.
Synopsis
setValue(string shape, "curveValues", string curve, dyn_float Yvalue, dyn_time
ti, dyn_bit64 status);
getValue(string shapes, "curveValues", string curve, dyn_float Yvalue, dyn_time
ti, dyn_bit64 status );
shape.curveValues(string curve, dyn_float Yvalue, dyn_time ti, dyn_bit64
status);
Parameters
Parameter | Description |
---|---|
shape | Name of a trend object. |
curve | Name of a curve. |
Yvalue | Values of a curve. Note that when you query values, the function only returns the values of the specified curve. The function does not return all values of a trend. |
ti | Points in time when the values are set. |
status | The 64 bit status from the database (corresponds to _offline.._status). |
Description
Sets the Y values and statuses for a curve for the trend type value over value, at certain times. The function also returns the values and statuses of a curve. You can use the function for both setting and querying values and statuses.
Note that you have to specify the curve name in order to set or query values.
Example
The following example sets several values and statuses for the curve "curve1" at different times.
main()
{
dyn_float valX, valY;
dyn_time timeX, timeY;
dyn_bit64 status = makeDynBit64(0,0xFFFFFFFFFFFFFFFFul,0xF0F0F0F0F0F0F0F0ul, 0,0xF0F0F0F0F0F0F0F0ul,0xF0F0F0F0F0F0F0F0ul);
valY = makeDynFloat(10, 90, 10, 60, 60, 5);
valX = makeDynFloat(10, 50, 90, 10, 90, 5);
time now = getCurrentTime();
timeX = timeY = makeDynTime(now, now+1, now+2, now+3, now+4, now+5);
this.curveValues("curve1", valY, timeY, status);
this.curveValuesX("curve1", valX, timeX, status);
}
Note that you can query values only by using the getValue method. You cannot use the point notation.
In the following example the function returns the values of the trend curve "curve1".
main()
{
dyn_float value, value2;
dyn_time ti, ti2;
dyn_bit64 status, status2;
getValue("TREND1", "curveValues", "curve1", value, ti, status);
getValue("TREND1", "curveValuesX", "curve1", value2, ti2, status2);
DebugN("YValue", value);
DebugN("Time",ti);
DebugN("State",status);
DebugN("XValue", value2);
DebugN("Time",ti2);
DebugN("State",status2);
}
Assignment
Trend