Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Naming Functions

  • Last UpdatedJul 18, 2023
  • 2 minute read

The required name statement follows the FUNCTION Statement and precedes the arguments statement in a Plant SCADA function. The function name is used elsewhere in Plant SCADA to activate (call) the function to have it perform the statements it contains.

Replace the <FunctionName> placeholder in the following function example with an appropriate name for your function. See the section Function Naming Standards for details.

FUNCTION
<FunctionName> ( <Arguments> )
<Statement> ;
<Statement> ;
<Statement> ;
END

You can use up to 32 ASCII text characters to name your functions. You can use any valid name except for a Restricted Cicode Keywords. The case is ignored by the Plant SCADA compiler, so you can use upper and lower case to make your names clear. For example, MixerRoomPageDisplay is easier to read than mixerroompagedisplay or MIXERROOMPAGEDISPLAY.

FUNCTION
MixerRoomPageDisplay ( <Arguments> )
<Statement> ;
<Statement> ;
<Statement> ;
END

Your functions take precedence over any other entity in Plant SCADA with the same name:

  • Variable tags. When you call a function by the same name as a variable tag, the function has precedence. The variable tag can not be referred to because the function executes each time the name is used.

  • Built-in functions. You can give your function the same name as any built-in Cicode function. Your function takes precedence over the built-in function - the built-in function cannot be called. Because built-in Cicode functions cannot be changed, this provides a method of 'modifying' any built-in function to suit an application. For example, you might want to display the message "Press F1 for Help" whenever you display a page. You could simply write a new function called PageDisplay ( ). The body of the function would be the statements that display the page and prompt message:

    Prompt ( "Press F1 for Help" ) ;PageDisplay ( <Arguments> ) ;

Your function is invoked whenever you use the function name in Plant SCADA.

See Also

Writing Functions

Related Links
TitleResults for “How to create a CRG?”Also Available in