30.14.7.1 Package - Function Block

You can register Function Blocks (FBs) you have created by dragging and dropping them from the Screen List window to the package. The registered FB can be placed in the Logic Screen directly, or registered in the Screen List as a new FB.

When you are using an FB as an instruction within another FB, and try to register the parent Function Block in a package, you will be prompted whether or not to register the child Function Block at the same time.

Registering Function Block in Package

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

  2. Select a package file in the [Package] window. The FB will be registered in this package. (For example: Favorite)

    • If you select [New] when selecting a package file, you can create a new package file.

  3. For the package's [Type], select [Function Block].

  4. Select the Function Block you want to register in the package in the [Screen List] window, and drag and drop it to the Package.

  5. When another Function Block is used in the Function Block being registered, the following dialog box appears. Select the Function Block to be included in the package and click [OK].

    You can select a Function Block to be used as an instruction in the Function Block that will be registered in the package. Select all applicable FBs under normal conditions.

    • If you clear the check mark for an FB and proceed with registration, the unchecked FB's program will not be included in the package. However, the portion where the FB is called within the logic program remains in the package.

  6. Now, you have registered a Function Block in the package.

    • If you select an FB registered in a package and click [Change], you can modify the following FB attributes.

Using Function Block from a Package

  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 you want to use in the [Package] window, and drag and drop it to the [Screen List] window.

    • You can also insert the FB directly by dragging and dropping it from [Package] to the Logic Screen. In this case, the FB is also registered in the [Screen List] window.

  4. When the FB selected in the [Package] has the same name as one of the FBs registered in the [Screen List] window, the following dialog box opens where you can select either to overwrite existing one, or to register with a new name. When the dialog box does not appear, or when you have selected [Overwrite], proceed to Step 6.

    • When the Screen List contains the maximum allowed number of FBs (128), you cannot select [Change Name].

    • When you select [Overwrite], the existing FB is deleted and replaced with the FB you have dragged and dropped from the package. In this case, instructions inserted in the logic program are also replaced. Please check the operand settings and modify them as necessary.

  5. In the dialog box shown below, change the name of FB and click [Import]. You can check the names of all FBs registered in the Screen List in a list view.

  6. In the Logic Screen, place FBs registered in the Screen List window.