Includes

XFL Includes

A Flowchart may include “sub-Flowcharts” defined in separate files. This allows for Flowchart fragments to be reused.

Flowchart include mechanism allows for reuse of common procedures defined in other Flowcharts. All the procedures defined in the included files are automatically imported into the top Flowchart. See more about XFL procedures in Procedure Blocks.

All sheets of an included Flowchart file are virtually added to the “includer”, with added sheet names having the name of the including file added to them to avoid the name space conflict. All Blocks on the included sheets and their connections are added as is, except Timer Blocks and Reference Blocks. The names of the latter two are modified by adding file name of the included file. All States and Variables are merged into a single list, while Timer Blocks and Reference Blocks remain local to the included file.
This mechanism could be used for inclusion of variables only. For that the included Flowchart should have a NULL State only, no Blocks, and the definitions of variables to be added to the “includer”.

XFL Includes are added via Edit >> XFL Includes… dialog.

Text Includes

Text Includes mechanism allows extending a set of variables defined in a Flowchart. The variables are defined in the plain ASCII text files and imported into a Flowchart. The files are linked to the script via the bottom pane of Variables List dialog.


A text include file contains variables’ definitions. The definitions are imported on a Flowchart open in an editor and on start of execution. One can learn what variables were imported and from what source by looking at Definition Source column in the top pane of the dialog.

NOTE:

A definition or initial value a variable imported from a text include file can
not be modified through Variables List dialog or XFL editor in general. The
modifications should be done in the include file itself.

File Format

[scope] typeName varName = initialValue

Where:

typeName ::= integer | boolean | charStr | octetStr | bitStr | objId

initialValue ::= 123 | true/false | [“]abcd147[“] | 5A B8 FF | 011011 | {0 1 55 2}

scope ::= global | instance

The default scope is global. If a variable scope is omitted in a variable definition, it’s global.

Example:

integer myInt1 = 147 // global integer variable

instance charStr myStr2 = sdfsdf114124 // local character string variable

global octetStr myHexData = DE AD BE EF** // global octet string variable

A capability to support any proprietary format of text include file is available. This can be useful when there is a large number of legacy constant definitions in textual form—they could be plugged into an XFL script without modifications.

Variables