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:
Selecting [Function Block] from [Insert Instructions] menu
30.5.1 Insert Instructions
By dragging and dropping from the Screen List window
By dragging and dropping from a package
You cannot insert FBs on shunts between the beginning and end of branches. If you want to insert an FB in a row where a branch exists, you must insert it before the beginning of the branch, or after the end of the branch.
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.
Open the [Screen List] window and select the FB you want to insert in the logic program.
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.
You have inserted FB in the logic program.
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.
Open the [Package] window with the Logic Screen open.
Select the package file in which the desired FB is registered, and select [Function Block] from [Type].
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.
The FB placed in the Logic Screen is registered in the [Screen List] window.
When there is an FB with the same name that already exists in the Screen List, a dialog box opens where you can select either to overwrite the existing FB or to change the name. When you want use an FB which is identical to one in the Screen List, you should place it by dragging and dropping the existing FB from the Screen List.
30.14.7.1 Package - Function Block
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.