PlotAddPenEx Function

Help Contents

Introduction

Adds a pen to the current Temporary Plot definition.

Syntax

Informal Syntax:

PlotAddPenEx( Source, Label, Color, LineWidth )

Formal Syntax:

PlotAddPenEx( Source:=Expression, Label:=Expression, Color:=Expression, LineWidth:=Expression )

Parameters

Parameter Type Description
Source ANY_STRING The data source of the pen. Use one of the following:
  • The full name of a Data Point Tag which has historic storage enabled.
  • The full name of a Time Series Tag which has historic storage enabled.
  • An SQL query that returns exactly 2 columns. The first column must be a timestamp. The second column must be a value.
Label ANY_STRING The label displayed in the trend key. If this parameter is an empty string, the Source parameter is displayed in the trend key.
Color ANY_STRING or DWORD The color used for the pen. You can use a string value, or a DWORD value, for this parameter:
  • ANY_STRING - The parameter value is a Color Value.
  • DWORD - The parameter value is the red green and blue components of the color. Bits 0-7 is red, bits 8-14 is green and bits 15-23 is blue.
LineWidth ANY_INT The width of the pen. The valid range of this parameter is 1 to 5. A value less than 1 is rounded up to 1. A value more than 5 is rounded down to 5.

Return Value

None.

Remarks

Use this function to add a pen to the current Temporary Plot definition.

If the Label parameter is an empty string, the Source parameter is displayed in the trend key.

Plots a limited to 8 pens. If an Operator Action tries to add more than 8 pens to a trend, a runtime error will be reported.

Examples

  1. Adds a pen using the tag 'Measurements.Flow Rate' as the data source. The color of the pen is Red and the line width is 1.
    PlotAddPenEx( 'Measurements.Flow Rate', 'Flow Rate', 'Red', 1 );

Further Information

Operator Actions

To learn where you can use this function.

IEC 61131-3 Expressions

To learn about the different types of expression to use as function parameters.

Glossary

For the meaning of terms used in Fernhill SCADA.