File Save

  1. This dialog, which is invoked by clicking on the Save As... button, allows you to save the contents of the currently open tab in the Editor area in any of the following formats:
    • XML: Saves the contents of the XML tab as an IEC 61499 XML-encoded library element with a file suffix as defined in the Compliance Profile.
      • If you change the package of a LibraryElement, the new file location will be indexed in the map.ini file but the old XML file will still be in the original location! You will have to delete the old XML file by hand - this may be an advantage if you need to retrieve the old file, but it may lead to the wrong location if you delete map.ini in order to force the FBDK to re-initialize it based on the src directory contents.
    • Java: Saves the contents of the Java tab as a *.java file and compiles it to a *.class file.
      • If you are saving a function block type, the FB Type Validation tool will be run automatically before saving or compiling the Java source file. If any errors are found, the Save As Java operation will be canceled and the list of validation errors will be written to the Log tab.
      • Following compilation, a dialog box will open displaying the results of the compilation.
      • If you are using the FBDK as an Eclipse™ external tool, Java compilation does not occur at this point - it is deferred to the automatic Java compilation of the Eclipse IDE.
    • HTML: Saves the current library element as an HTML file containing skeleton documentation for the element, including links to any PNG files you may have saved (see below).
    • PNG: Saves the contents of the Worksheet as a *.png file in Portable Network Graphics (PNG) format. The size of the PNG image is trimmed to that required to display all of the graphic elements in the Worksheet, which may be larger or smaller than the size of the Viewport.
    • JUnit: Saves the contents of the JUnit tab as a Java source file for JUnit testing of the library element
      • The JUnit test framework for the FBDK is not yet publicly released.
  2. Some of these operations may be relatively lengthy (especially Java™ compilation) - sometimes on the order of several seconds. The progress bar on the right hand side of the toolbar above the Library Navigator will give you an indication which operation is ongoing.
  3. The directory in which the files are saved is determined by the package name. For instance, if the FBDK is located in the C:\Documents and Settings\JHC\fbdk2\ directory:
    • the XML file of the element shown above would be stored as
      C:\Documents and Settings\JHC\fbdk2\src\mach\LOAD_CTL.fbt;
    • the HTML file would be stored as
      C:\Documents and Settings\JHC\fbdk2\doc\fb\rt\mach\LOAD_CTL.htm;
    • the Java™ file would be stored as
      C:\Documents and Settings\JHC\fbdk2\java\fb\rt\mach\;
    • the class file would be stored as
      C:\Documents and Settings\JHC\fbdk2\lib\fb\rt\mach\LOAD_CTL.class;
    • the Worksheet contents would be saved as
      C:\Documents and Settings\JHC\fbdk2\doc\fb\rt\mach\images\LOAD_CTL.png
      (or other filenames depending on what is being displayed in the Worksheet at the time of saving the PNG file); and
    • the JUnit contents would be saved as
      C:\Documents and Settings\JHC\fbdk2\test\fb\rt\mach\
  4. If a file is already saved with the given library element name, e.g.,, it is copied into a backup file, e.g., myFBType.baknn, where nn is the lowest available number in the sequence {00..99}.
    • If all the backup numbers in the sequence 00..99 are occupied, no backup will be made, so it is a good idea to purge backed up files from time to time.