发布于 2012-08-02 08:18:47
3楼
INTERFACE
// Interface statements (optional)
END_INTERFACE
An individual identifier of the section cannot be specified.
Optionally, interface statements exist in t he following order b etween reserved words INTERFACE
and END_INTERFACE.
1. Specification of utilized technology package. Syntax:
USEPACKAGE tp-name [AS namespace];
For more details, refer to the SIMOTION Basic Functions Function Manual.
2. Specification of utilized libraries.
Syntax:
USELIB library-name-list [AS namespace];
For more information, see "Using data types, functions and function blocks from
libraries (Page 230)".
3. Reference to other units in or der to use their exported components.
Syntax:
USES unit_name-list;
For more information, see "USES statement in an importing unit (Page 181)".
4. Declarations and specifications for the export
– Data type definitions (Page 176):
User-defined data types (UDT) that are valid in the entire ST source file and that are to be
exported
– Variable declarations (Page 177):
Unit variables and unit constant s valid in the entire ST source file and exported.
Permissible keywords: See table in "Variable declaration (Page 177)".
– Information regarding program or ganization units (POU) to be ex ported.
Syntax:
FUNCTION fc_name;
FUNCTION_BLOCK fb_name;
PROGRAM program_name;
All technology packages, libraries, imported units, data type declarations, variable declarations
and program organizatio n units listed in the interface section will be exported. For more
information on export, see "Interface section of an exporting unit (Page 179)".