Example: Creating library with blocks incl. help files
If you are creating a custom library with blocks, you might want to include the external HTML block help within this library as well, When a user needs information on a block from the library, the user will be able to open the local HTML help for the block. Conditions for successfully opening the block help are:
-
defining the files for the external block help within the library configuration – by using the statement
FILE := ...
-
correctly filing these help files within the library – This is achieved by the keyword
SOURCEPATH
within the library configuration. See "Declaration of the contents of the library", if you need details on this keyword.
The following example of a library configuration illustrates the required filing of the help files.
Example for a libary configuration with external block help | |
---|---|
The following example results in a created library:
|
Details, why the files for the external block help have been specified as above:
-
Each statement
FILE := ...
that is following one of the statementsIEC := ...
in the above example is specifying a file for the external block help. These files are the HTML-files, PNG-files and CSS-files that have been generated when the external block help has been created. -
These files have been generated within the project folder
.olh
that is located in parallel to the object containing the block and is not visible within the project explorer by default.
Example: If the object containing the block is located within the project foldersrc
, the files have been generated within the project foldersrc\.olh
. When the library is generated, the files from this foldersrc\.olh
should be used. -
However, the files for the external block help must not be filed under the folder
Motors\src\.olh
within the generated library, but under the folderMotors\.olh\
– Thus, the keywordSOURCEPATH
with the additional pathsrc
is used. Now the respective file is searched for within the foldersrc\.olh
of the current project, but it is filed within the folder.olh
in parallel to the object containing the block regarding the library.,
Good to know |
---|
If you are using the statement |