How to call method blocks


General description

To execute the instructions contained within a block in a method, the block must be called by the program. When a block is called, the instructions in the block are executed in the order that they are written until the block is finished or the End_Block instruction is executed. Any settings made in a block are valid throughout the method until the settings are changed.


Types of calls

There are two types of calls:

  • Unconditional calls, which are made with a Block instruction.

  • Conditional calls, which are made with a Watch instruction. This makes it possible to call a specified block or an instruction when a particular monitor signal meets a given condition. As long as the condition is not met, the block is not activated.


Watch instructions

Watch instructions are indicated by a green line that show the start and duration of the watch. These instructions can use various conditions to respond to absolute signal values or to rate of signal changes.

The breakpoint when the Watch instruction is issued determines when the watch begins, not when the block is activated. Once set, a watch remains active until the condition is met or a new Watch instruction is issued for the same monitor. The watch is cancelled automatically when the condition is met. A watch can also be turned off with the Watch_off instruction.

See Method examples for more details on Watch instructions.


2005-06-15