- Start the FBDK.
- Import library elements if and as needed.
- Create a new basic FB type in
the editor by double-clicking on the Basic fb type of the
templatefolder in the Library Navigator.
- Edit the function block's elements:
- Edit the FB type's name and comment by double-clicking on the root node of the Element Navigator.
- Edit the FB type's properties by double-clicking on the corresponding entry in the Element Navigator:
- Edit the FB type's interface.
- Select the ECC item in the Navigation area to use the Workspace area for editing the ECC.
- Double-click on an algorithm in the Element Navigator to open an editing dialog for the algorithm.
- Edit the service sequences (if any).
- When your editing is complete, save
your work with the Save As... =>XML dialog.
It is a good idea to save your work from time to time while editing, too!
- Generate and compile a Java® source file with the Save As... =>Java dialog. The results of the compilation (including errors, if any) will be displayed in the Log tab of the Text panel, and a dialog will open indicating whether the compilation has succeeded or not.
- Test the FB
type by clicking the Run
menu item of the root node in the Element
Navigator. In the test window, you can set or clear the values of
the inputs, click on event input buttons and observe the resulting
event and variable outputs.
- The Run menu item will only be enabled if a
.classfile is available, either in a subdirectory of the
libfolder or in the
- You can open more than one test window a a time on the FB Type; each test window will have its own instance of the FB type and its own window number in parentheses in the title bar.
- The FB type is defined as Running as long as at least one test window is opened on an instance of it; this is indicated by outlining its interface in green.
- To prevent inconsistencies between running and edited versions, only the Run option will be enabled in the popup menu when the FB type is Running.
- After all the test windows have been closed, the FB type is no longer Running, and its interface outline returns to its normal appearance.
- If you change the code of the block and recompile, you will have to exit the FBEditor application and restart it in order to force a reload of the class file.
- The Run menu item will only be enabled if a compiled