Build and Test a Service Interface Function Block Type

  1. Start the FBEditor application by running the fbeditor.bat file.
  2. Create a new service interface FB type in the editor by:
  3. Edit the function block's elements:
  4. When your editing is complete, save your work with the Save As... button.
    It is a good idea to save your work from time to time while editing, too!
  5. Generate and compile a JavaTM source file with the Save As... button.
    Compiled code will run but do nothing useful.
  6. Use a text editor to fill in the skeleton service_XXX(...) methods in the generated java file, including any additional instance variables, supporting methods, etc., as required.
    Don't forget to set the QO.value field as appropriate and invoke the serviceEvent(this) method on the appropriate event output, e.g., INITO.serviceEvent(this) when leaving the service_INIT(...) method.
  7. Generate a JavaTM class file with an appropriate compiler .
  8. Test the FB type by clicking the 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: 2008-10-03.
©2006, 2008 Holobloc Inc
All rights reserved.
Java and JDK are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.