Trending and Plotting Functions and Statements

There are two statements within VTScada that perform plot operations: The first is the Plot statement, which plots an array of values against its index. This is the most common plot type and can be used to create a line plot, or a filled or bar plot (these types of plots are useful for filling rectangular tanks with the trend of the recent tank levels as an alternative to just a bar of the current tank level).

The second plot statement is the PlotXY statement, which plots the values in one array against the values in a second array. This can be useful for plotting one plant parameter against another, such as plotting production rate against conveyer speed. One problem arises when plotting such values: Because the values of both parameters normally increase and decrease, the plot will appear as somewhat of a scatter if the X values are not consistently increasing. To solve this problem, use the Sort statement to re-order the arrays so that the Y values correspond to increasing X values.

You can also use the PlotXY statement as an alternative line drawing statement with each of the array elements specifying a line segment endpoint.

VTScada enables you to configure various line styles and fill patterns for bar plots. The plots may also be arranged to plot from left to right, right to left, bottom to top, or top to bottom. There are a total of 8 possible orientations for line plots, and 16 for bar plots. Optionally, plots may be configured to display in a digital or discrete format. Instead of drawing a straight line between two points, a step or square-looking plot is drawn that shows discrete changes in level, rather than continuous changes. Another option enables a given bit number in the array to be plotted - this enables arrays of values that contain status bits packed into short or long values to be plotted directly without having to unpack them. A final option enables groups of consecutive array elements to be averaged and plotted as a single value on the screen. This enables a large amount of data to be plotted on a screen of limited resolution without producing a high degree of apparent scatter in the data and while improving the plot speed.