Methods

A
method
is an action or subprogram that an event performs under certain circumstances.
An event performs a method when:
  • an event configured in
    FactoryTalk Optix Studio
    occurs at runtime
  • an event required by a runtime C# script occurs at runtime
  • a request from an OPC UA client occurs at runtime
  • a C# script runs at design time
You can associate multiple methods with a single event. When the event occurs, the methods are performed in the order in which they were added to the event at design time. A method can have properties or input or output arguments. Use input arguments to specify values that the method displays when the event occurs, such as incrementing the value of a graphic object. Output arguments are values that the method returns. As with variables, the value of an argument can be fixed or dynamic
There are two types of methods -- local and global.

Local methods

Local methods are used in a single project and are defined by object type and their instances.
Acknowledge all
is an example of a local method for an alarm. Objects that define methods include:
  • alarms
  • logged
  • database
  • some graphic objects

Global methods

Global methods are available in
FactoryTalk Optix Studio
regardless of the project node. Global methods include: 
  • variable
  • core
  • alarm
  • UI
  • recipe
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.