DspMarkerNew
Creates a new trend marker. A trend marker is used to show cursor values or limits on a trend. You can use up to 10 markers on a single trend or chart.
If you add markers to a trend or chart that CitectSCADA is animating, you need to repaint them using the trend paint event (OnEvent(Window,22)). (Otherwise CitectSCADA will delete any markers displayed when the trend is updated.)
Syntax
DspMarkerNew(AN, Mode, Color)
AN:
The animation-point number.
Mode:
The mode of the marker:
0 - A vertical marker
1 - A horizontal marker
Color:
The color of the marker (flashing color not supported). Select a color from the list of Predefined Color Names and Codes or create an RGB color using the function MakeCitectColour.
Return Value
The marker handle, or -1 if the function is unsuccessful. The marker handle identifies the table where data on the associated marker is stored.
Related Functions
Example
INT offset; ! offset of marker
INT hMarker; ! marker handle
hMarker = DspMarkerNew(40, 0, WHITE);
! create a new marker, vertical WHITE
offset = 100;
DspMarkerMove(40, hMarker, offset);
! Moves marker to offset 100
OnEvent(22, MyTrendPaint);
! set trend paint event, needs to stop event when change pages
! this function is called when CitectSCADA updates the trend
INT
FUNCTION
MyTrendPaint()
DspMarkerMove(40, hMarker, offset);
RETURN 0;
END
See Also