The CFC > Edit Parameters... command is available when, in the CFC editor, a POU box is selected which has constant input parameters, more specifically which is an instance of a function block containing VAR_INPUT CONSTANT variables in its declaration.
FUNCTION_BLOCK FB1
VAR_INPUT CONSTANT
{attribute 'parameterCategory':='General'}
{attribute 'parameterUnit':= 'm/s'}
{attribute 'parameterMinValue':= '0'}
{attribute 'parameterMaxValue':= '100'}
fbin1:INT;
fbin2:DWORD:=24354333;
fbin3:STRING:='abc';END_VAR
In CFC, you can identify POUs with constant inputs by a Parameter... box in the bottom left corner of the element. Click this box or execute the command Edit parameters... to open the dialog box Edit Parameters.
The Edit Parameters dialog box contains the following parameters:
Parameter |
Description |
---|---|
Parameter |
The name of the variable. |
Type |
The data type of the variable. |
Value |
The current value of the variable. |
Initial value |
The initialization value of the variable. |
Category |
These fields provide additional information about the parameters. The values are defined by attributes and cannot be changed in this dialog box oparameterCategory oparameterUnit oparameterMinValue oparameterMaxValue |
Type |
|
Value |
|
Initial value |
The command Delete Prepared Parameters is available when you write a prepared value (refer to the Debug > Write values command).
To edit the values, select the respective cell in the Value column, and click a second time or press the Enter key to open an edit field. Enter the value. After you have left the field and closed the dialog box with OK, the modified value is applied in the project.
NOTE: This functionality and the associated declaration of variables with keyword VAR_INPUT CONSTANT impacts the CFC editor. In the FBD editor, the INPUT variables are displayed in a box, whether declared as VAR_INPUT or VAR_INPUT CONSTANT. For text editors, this is irrelevant.
If you edit parameters in offline mode and the values of constants on the controller differ from the values in your application, then this is indicated by a red asterisk next to the parameter field. To save the values of the controller to your application, refer to the Save prepared Parameters to Project command.