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.
pml_ui
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.
  1. In the
    Application View
    , right-click the required function or function block, and then click
    Parameters
    .
  2. To add an input parameter, click
    New Input
    , then define the properties for the parameter.
  3. To add an output parameter to a function block, click
    New Output
    , then define the properties for the parameter.
  4. To add a local variable, click
    New Variable
    , then define the properties for the variable.
Edit parameters and local variables
  1. In the
    Application View
    , right-click the required function or function block, and then click
    Parameters
    .
    The function or function block parameters are displayed.
  2. To edit a parameter, select the parameter, and then modify its properties.
  3. To edit a local variable, select the variable, and then modify its properties.
Delete parameters and local variables
  1. In the
    Application View
    , right-click the required function or function block, and then click
    Parameters
    .
  2. Right-click the parameter or local variable to remove, and then click
    Delete
    .
Cut, copy, and paste parameters and local variables
  1. In the
    Parameters
    view for a user-defined function or function block, cut or copy the required parameter or local variable:
  • To remove the parameter or local variable, select the item, right-click and then click
    Cut
    .
  • To copy the parameter or local variable, select the item, right-click and then click
    Copy
    .
  1. To paste a copied parameter or local variable, right-click in the
    Parameters
    view and then click
    Paste
    .
    Duplicated parameters or local variables are automatically placed in their respective area, such as input, output, or variable.
    TIP:
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.
  • To expand all parameters, in the parameters view, right-click and then click
    Expand All
    .
  • To collapse all parameters, in the parameters view, right-click and then click
    Collapse All
    .
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
Have questions or feedback about this documentation? Please submit your feedback here.
Normal