FBEUAOIUSFBAOI User block call (FB / AOI)
Also called: function block, FB, custom instruction, AOI, user-defined block
Calls a user block with its own instance (memory).
What it does
A user block groups reusable rungs, with parameters and internal variables. Each call uses an instance that keeps its memory from one scan to the next, like a timer.
When to use it
For equipment that appears several times (valve, motor, pump): one block, several instances.
Operands
| European mnemonic | American mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|---|
| Instance | Instance | Block instance | BLOCK | Input | Yes | Block instance: its memory. |
| EN | EN | Enable | BOOL | Input | Yes | Call condition. |
| Parameters | Parameters | Parameters | BOOL, INT, DINT, REAL, TIME / DINT | Input and output | No | Block parameters: inputs, outputs and in/outs. |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| Instance | Block instance | BLOCK | Input | Yes | Block instance: its memory. |
| EN | Enable | BOOL | Input | Yes | Call condition. |
| Parameters | Parameters | BOOL, INT, DINT, REAL, TIME | Input and output | No | Block parameters: inputs, outputs and in/outs. |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| Instance | Block instance | BLOCK | Input | Yes | Block instance: its memory. |
| EN | Enable | BOOL | Input | Yes | Call condition. |
| Parameters | Parameters | BOOL, INT, DINT, REAL | Input and output | No | Block parameters: inputs, outputs and in/outs. |
Example
Valve_1 (instance of block Valve) receives Cmd = S2 and returns Opened into H1.
Try it in the simulatorThe example opens in the free simulator; your own program stays as it was.
Behaviour in detail
- Rung at 0: the block does not run; its internal variables keep their value.
- Inputs are copied before the call, outputs after; in/out parameters (IN_OUT) are read then written back.
- Instance members can be read elsewhere in the program, for example Valve_1.Opened.
- A block cannot call itself.
European (IEC) and American styles
European: FB function block with its instance DB.
American: custom instruction (Add-On Instruction, AOI) with its instance tag.