DialogAddGraphicPage Function

Help Contents

Introduction

Adds a Graphic Page to the current dialog.

Syntax

Informal Syntax:

DialogAddGraphicPage( TagName, Width, Height, GlobalVariables )

Formal Syntax:

DialogAddGraphicPage( TagName:=Expression,
  Width:=Expression,
  Height:=Expression,
  GlobalVariables:=Expression )

Parameters

ParameterTypeDescription
TagName ANY_STRING The full tag name of the Graphic Page.
Width ANY_NUM The relative width of the Graphic Page compared to the operator interface window. This is expressed as a percentage of the operator interface window width. The value is clamped internally to the range 20 to 90. For best results use values in the range 45 to 85.
Height ANY_NUM The relative height of the Graphic Page compared to the operator interface window. This is expressed as a percentage of the operator interface window height. The value is clamped internally to the range 20 to 90. For best results use values in the range 45 to 85.
GlobalVariables ANY_STRING An optional set of values to write to global variables declared on the Graphic Page. The string uses this syntax:

bindings ::= [ binding { ';' binding } [ ';' ] ]

binding ::= variable ':=' literal

literal ::= Numeric Literal |
  String Literal |
  Time Literal |
  Date and Time of Day Literal

See Global Bindings Editor to see how to declare global variables in a Graphic Page.

Return Value

None.

Remarks

The Operator Actions of a Graphic Page displayed in a dialog are disabled.

Examples

  1. Open a dialog showing the Graphic Page "Example Graphic.Process Page" from the default project:
    DialogNew();
    DialogAddGraphicPage(
    	'Example Graphic.Process Page', 
    	65, 65,
    	'' );
    DialogOpen( 'Graphic Page', 0 );

    The above code sample would open the following dialog:

    A dialog showing a live SCADA graphic page.
  2. Open a dialog showing the Graphic Page "Faceplate" setting global variables in the Graphic Page:
    DialogNew();
    DialogAddGraphicPage( 
        'Faceplate', 
        65, 65, 
        'Voltage:=243;Current:=15;Temperature:=45' );
    DialogOpen( 'Pump Status', 1 );

    To receive the parameters 'Voltage:=243;Current:=15;Temperature:=45', the Graphic Page should have this declaration in its GlobalBindings:

    VAR_GLOBAL
        Voltage : LREAL; Current : LREAL; Temperature := LREAL;
    END_VAR

Further Information

Operator Actions

To learn where you can use this function.

Glossary

For the meaning of terms used in Fernhill SCADA.