Temporary Plot Functions

Help Contents

Introduction

Temporary Plot Functions functions allow an Operator Action to create and open a Temporary Plot.

Plot Functions

These Temporary Plot functions are supported:

FunctionDescription
PlotAddPen Adds a pen to a temporary plot. The pen color is selected automatically.
PlotAddPenEx Adds a pen to a temporary plot. The pen color is set by the function call.
PlotNewTrend Starts a new temporary trend plot.
PlotNewValueDuration Starts a new temporary value duration plot.
PlotOpen Opens a temporary plot.
PlotPenSetFixedAnalogScale Configures a pen to use an analog scale with a fixed range.
PlotSetFixedXAxis Sets the X Axis to display a fixed interval.
PlotSetMovingXAxis Sets the X Axis to track the current time.
PlotSetTitle Sets the title of a temporary plot.

All of these functions can be called from a Structured Text Function Call.

Example

  1. Open a trend with two pens:
    PlotNewTrend();
    PlotSetTitle( "River Flow and Level" );
    PlotAddPen( "River Monitor.Flow", "Flow" );
    PlotAddPen( "Rover Monitor.Level", "Level" );
    PlotOpen();
  2. Open a trend using an SQL query as a data source
    (* Start a new trend *)
    PlotNewTrend();
    
    (* Set the trend title *)
    PlotSetTitle("Central England Temperature Record");
    
    (* Add a pen where the data is from an SQL query *)
    PlotAddPen( 
    	"SELECT * FROM DatabaseTable.PlotDataSource",
    	"CET Record" );
    
    (* Set the X Axis to start at a fixed point in time and span 100 years *)
    PlotSetFixedXAxis( D#1920-01-01, T#365d * 100 );
    
    (* Open the trend *)
    PlotOpen();
    

    Note: This example is taken from the "Dynamic Plot Example" installed with the product. See Import Example for information on how to load this and other samples.

Further Information

Operator Actions

To learn where you can use these functions.

Glossary

For the meaning of terms used in Fernhill SCADA.