Parameter for Function Blocks
Section 3 Parameter Interface
30
3BSE042835-600
Parameter for Function Blocks
In function block types, a parameter can have the direction
In
,
Out
or
In_Out
. Use
the direction In or Out whenever possible. Parameters of direction
In_Out
must be
connected for function blocks.
The In_Out direction should be used only when specifically motivated (for example
forcing). Ample use of In_Out may produce confusing FBDs. Note that such a
parameter will be marked written for a Function Block, even for the components
that are only read. This may result in code loops during compilation for structured
data types, which can be avoided by setting the variable's attribute to nosort. If the
data type AnyType is used, the direction must be
In_Out
.
FD Port
The FD Port column is valid for parameters in function block types, control module
types, and diagram types. It is only significant for the types that are instantiated in a
Diagram editor.
The normal choice is
Yes
or
No
. The value specifies if the parameter shall be visible
when the function block type, control module type or diagram type is instantiated in
an FD code block. The configured value represents the default, which can be
changed on the instances.
Parameters with direction
in
are placed on the left side, and parameters with
direction
out
are placed on the right side. Parameters with direction
In_out
can be
placed on the left side, if the keyword
left
is added; else it is placed on both sides.
Similarly, parameters with direction
unspecified
can be placed on the left, right, or
on both sides. The
left
or
right
specification cannot be changed on the instance.
Parameters of bi-directional data types with no reverse defined components must be
either an Unspecified parameter (control module types only) or an In_Out
parameter.
The following list summarizes the use of the values in the FD Port column for
control module parameters with direction Unspecified and function block
parameters with direction In_Out:
•
No
- Not visible as a port.
•
No Left
- Not visible as a port. The parameter will be placed on the left side of
the object if the user decides to show it later on.
Содержание AC 800M
Страница 1: ...Power and productivity for a better worldTM AC 800M Library Object Style Guide System Version 6 0...
Страница 2: ......
Страница 3: ...AC 800M Library Object Style Guide System Version 6 0...
Страница 12: ...Related Documentation About This User Manual 12 3BSE042835 600...
Страница 18: ...Naming Convention Section 1 Libraries 18 3BSE042835 600...
Страница 108: ...SIL Mark Restrictions Section 6 Program Code Issues 108 3BSE042835 600...
Страница 116: ...Standard Library Parameters Appendix A Names and Abbreviations 116 3BSE042835 600...
Страница 119: ......