Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SYPT PRO User Guide / SYPT PRO User Guide.doc
Скачиваний:
244
Добавлен:
03.03.2016
Размер:
17.32 Mб
Скачать

Inserting a Template into a Program

Templates can be inserted into the main DPL view of a DPL program in a number of ways.

To insert a template using the popup menu

1. Right-click inside a task, user-defined function block or subroutine and from the popop menu choose Templates.

2. A sub-menu is displayed. On this menu select a template category. A further submenu is displayed showing the templates in the category.

3. Select a template.

The selected template text is displayed in the DPL view.

4. Edit the inserted text to include your own variables and parameters and statements.

To insert a template using the DPL Editor Edit menu

1. Click inside a task, user-defined function block or subroutine.

2. On the Edit menu, choose Templates.

3. A sub-menu is displayed. On this menu select a template category. A further submenu is displayed showing the templates in the category.

4. Select a template.

The selected template text is displayed in the DPL view.

5. Edit the inserted text to include your own variables and parameters and statements.

To insert a template using the DPL Templates dialog

1. Right-click inside a task, user-defined function block or subroutine and from the popop menu choose Templates.

2. A sub-menu is displayed. On this menu choose Template Viewer.

3. Using the dropdown lists on the dialog, select a category and template.

4. PressInsert.

The selected template text is displayed in the DPL view.

5. Edit the inserted text to include your own variables and parameters and statements.

To insert a template using a shortcut key

1. Right-click inside a task, user-defined function block or subroutine and from the popop menu choose Templates.

2. Press the shortcut key for the template.

The selected template text is displayed in the DPL view.

3. Edit the inserted text to include your own variables and parameters and statements.

See Also

  • DPL Templates Dialog

  • Template Shortcut keys

  • Defining a Template

  • Templates

________________________________________________________________________________

Libraries

SYPT allows the creation of libraries of user-defined function blocks. Function blocks developed by the user can be packaged into binary archives and distributed for user in other DPL programs. The binary archive does not contain any DPL source code so the intellectual property of the library developer is protected.

The user-defined function blocks developed for libraries can be written in any of the languages supported by SYPT and they can make full use of the pre-defined set of function blocks supplied with SYPT.

SYPT includes a Library Manager component which can be used to package libraries for distribution and to import libraries into a SYPT installation. The manager also allows the function blocks exposed by libraries to be examined.

When a library is imported into a SYPT installation, its function blocks can be used in a program in the same way that the pre-defined set of function blocks can be used. The blocks will appear in the Select Function Block dialog and they will be available for use in DPL, QLD and LD/ FB languages. Descriptions and help information can be specified for function blocks and function blocks can be selectively hidden so that the blocks exposed by the library can be controlled.

Libraries have the following restrictions:-

1. They can only be developed and used on the SM-Applications and SM-Applications Lite modules.

2. A library cannot use function blocks from other user-defined libraries.

3. If a function block provided in a library has floating-point inputs or outputs, the library can only be used in a user program compiled with the same floating-point model as the library.

4. A library cannot be used if it exposes function blocks with the same names as function blocks in other libraries.

When developing or using libraries, the following tasks can be performed:

  • Creating a Library

  • Specifying a Library Description

  • Viewing Library Properties

  • Referencing and Using a Library

  • Removing a Reference To a Library

  • Managing Libraries

  • Exporting a Library

  • Importing a Library

See Also

  • Inserting Function Block Calls

________________________________________________________________________________