Applies To:
  • CitectSCADA 3.00

Summary:
Question: The number of markers shown on plot lines do not have any correlation with the value I passed on nMarker argument of the PlotLine or PlotXYLine function. Is nMarker really the number of markers? 

Solution:
No, nMarker argument of the PlotLine and PlotXYLine functions does not set the number of markers on plot lines. It is the number of samples between markers. The number of markers can be calculated by the following formula:

number of markers = ((length - 1) / nMarker ) + 1

where we assume integer truncation on the result of division, ie, 9 / 2 = 4 , 7 / 3=2.

Example:

INT FrameWidth=3;
INT X1 = 0;
INT Y1 = 0;
INT X2 = 410;
INT Y2 = 230;
INT nMarker = 2;
INT length = 10;

PlotLine(hPlot,PenStyle,PenCol,PenWidth,MarkerStyle,MarkerCol,nMarker,Length,pTable,LoScale,HiScale,Mode);
hPlot=PlotOpen(hAn,"Display",1);
PlotGrid(hPlot,10,X1,Y1,X2,Y2,5,WHITE,9,WHITE,FrameWidth,GREY,BLACK,0);
PlotLine(hPlot, 0, Light_Red, 2, 7, Magenta, nMarker, length, Buf1[0], 0, 500,1)
PlotClose(hPlot);

The number of markers in the above example will be : ((10 - 1) / 2) + 1 = 5 If the nMarker were 1, then the number of markers would be ((10 - 1) / 1) + 1 = 10, or for nMarker = 3, ((10 -1) / 3) + 1 = 4

 

Keywords:
 

Attachments