Parameters View
To access the parameters view for a user-defined function or function block
From the Application View, create a user-defined function or function block in the respective section. Right-click the function or function block, and then click
Parameters
.Use the
Parameters
view to manage parameter and local variables for user-defined functions and user-defined function blocks. This view provides a graphic display of the parameters and local variables.
In the
Parameters
view, define the properties of parameters and local variables:Property | Description |
---|---|
Name | Name of the parameter |
Alias | When supported by the application, the short name used in the graphical language editors for display only. Limited to four characters. |
Data Type | Data type of the parameter |
Dimension | When supported by the application, the dimension of the function block. The dimension is defined as a positive double integer (DINT) value. |
Attribute | Property of a parameter indicating its read and write access rights. Possible values are Read or Read/Write . |
Comment | Plain text |
Initial Value | When supported by the application, the value held by a variable when the virtual machine starts the execution of the application code. |
Modify the parameters for functions and function blocks. User-defined functions are limited to one output parameter with a modifiable data type.
From the
Parameters
view, perform these tasks:Task | Procedure |
---|---|
Create parameters and local variables | Create parameters for a currently opened user-defined function or function block. Functions can only have one output.
|
Edit parameters and local variables |
|
Delete parameters and local variables |
|
Cut, copy, and paste parameters and local variables |
|
Display data types for parameters or local variables | Expand and collapse the display of data types for all parameters and local variables of a currently opened user-defined function or function block.
|
TIP:
Update each instance of a function or function block after adding, removing, reordering, renaming, changing data type, or changing direction of parameters in all POUs using the instance. Identify these POUs with the Cross Reference Browser, then open each POU and reselect the modified instance using the Block Selector.
Provide Feedback