Build and Test a Basic Function Block Type

  1. Start the FBEditor.
  2. Create a new basic FB type in the editor by:
    • Opening a file containing an existing basic function block type; examples are the FLASHER4 FB type, or the X2Y2_ST.fbt and X2Y2_FBD.fbt files in the src\student folder, or
    • Clicking the New... => FB Type => Basic menu item. See the general info for a picture of how the screen will look.
  3. Edit the function block's elements:
  4. 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!
  5. Generate and compile a Java® source file with the Save As... =>Java dialog. A dialog window will open showing the Java source text and the compilation results.
  6. Test the FB type by clicking Run button. 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.
    • 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.
Last updated: 2011-02-12.
©2011 Holobloc Inc.
Licensed under the Academic Free License version 3.0.
Java is a registered trademark of Oracle Corporation and/or its affiliates.