30.5.10 Inserting Function Block Instruction - Using FBs

Once you have created Function Blocks (FBs), you can use them as Function Block instructions in logic programs.

You can insert FBs into logic programs by:

Dragging and Dropping from the Screen List Window

You can insert FBs you have created by dragging and dropping them from the [Screen List] window to the Logic Screen.

  1. Open the [Screen List] window and select the FB you want to insert in the logic program.

  2. With the FB selected, drag it to the logic program's rung. The cursor changes to indicating the place where you can drop the FB.

  3. You have inserted FB in the logic program.

  4. You can now set addresses and/or variables for the inserted FB.

Dragging and Dropping from a Package

You can insert FBs registered in a package by dragging and dropping them to the Logic Screen.

  1. Open the [Package] window with the Logic Screen open.

  2. Select the package file in which the desired FB is registered, and select [Function Block] from [Type].

  3. Select the FB from the package, and place it in the Logic Screen by dragging and dropping it. The cursor changes to indicating the place where you can drop the FB.

Setting Operands for Function Block Instructions

When a Function Block (FB) is placed in the Logic Screen, input variables created within the FB are displayed as S operands, and output variables are displayed as D operands. For basic procedures for setting operands, refer to the following.

30.6 Assigning Addresses to Instructions

For operands, you specify addresses or variables that match with the variable types of input variables or output variables.

The values stored in the addresses or variables set for S operands are passed to input variables, and used in FBs. The values of output variables in FBs are stored in the addresses or variables set for D operands.

Double-clicking the FB inserted in the Logic Screen opens the operand list, where you can set addresses/variables.