- 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 are saving a function block type, the FB Type Validation tool will be run
automatically before saving the XML file. If any errors are
found, the Save As XML operation will be canceled and the
list of validation errors will be written to the Log tab.
- 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.
- When 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 to report
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.
- The FBDK will automatically save a map file containing data sufficient
for the construction of an HTML MAP element for navigation of
the saved PNG file.
- 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.
- 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.
- 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\fbdk3\
directory:
- The XML file of the element shown above would be stored as
C:\Documents and
Settings\JHC\fbdk3\src\mach\LOAD_CTL.fbt
.
- The HTML file would be stored
as
C:\Documents and
Settings\JHC\fbdk3\doc\fb\rt\mach\LOAD_CTL.htm
.
- The Java™ file would be
stored as
C:\Documents and
Settings\JHC\fbdk3\java\fb\rt\mach\LOAD_CTL.java
.
- The class file would be stored
as
C:\Documents and
Settings\JHC\fbdk3\lib\fb\rt\mach\LOAD_CTL.class
.
- The diagram for the interface
of this FB type would be saved as
C:\Documents and Settings\JHC\fbdk3\doc\fb\rt\mach\images\LOAD_CTL.png
.
- The LD diagram for the REQ algorithm would be saved as
C:\Documents and Settings\JHC\fbdk3\doc\fb\rt\mach\images\LOAD_CTL.REQ.png.
- The ECC diagram would be saved as
C:\Documents and Settings\JHC\fbdk3\doc\fb\rt\mach\images\LOAD_CTL.ECC.png.
- The map file
for construction of the navigation map for the ECC would be
automatically generated along with the ECC.png file and stored
at
C:\Documents and Settings\JHC\fbdk3\doc\fb\rt\mach\maps\LOAD_CTL.ECC.map.
- The JUnit contents would be
saved as
C:\Documents and Settings\JHC\fbdk3\lib\fb\rt\mach\LOAD_CTLTest.java
.
- If a file is already saved with the
given library element name, e.g.,
myFBType.java
, 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.