Command ‘Edit Parameters’¶
Function: This command opens the Edit Parameters dialog box, where you change the constant input parameters of a function block.
Call: Main menu Parameter function block.
, or , click theRequirements: A CFC editor is active. An instantiated function block has VAR_INPUT CONSTANT variables in its declaration.
Note
This functionality applies only to blocks that are inserted in a CFC with CODESYS >= V3.5 SP4.
CODESYS displays blocks with VAR_INPUT CONSTANT variables by the word Parameter in the lower left corner of the block.
Dialog Box ‘Edit Parameters’
Parameters | Name of the variable |
Type | Data type of the variables |
Value | Click into the field to type a value. |
Initial Value | Initialization Value |
Category | Additional information about the parameters; these values are defined by attributes and cannot be changed in this dialog box.
|
Unit | |
Min | |
Max | |
Delete Prepared Parameters | This command is active when you write a prepared value ( | ).
When you exit the field and the dialog box by clicking OK, the value changes are applied to the project.
Example of a block with constant inputs
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
Note
This functionality and the declaration of variables with keyword VAR_INPUT CONSTANT
applies only to the CFC editor. In the FBD editor, CODESYS always shows all input parameters on the block, regardless of whether or not they are declared as VAR_INPUT
or VAR_INPUT CONSTANT
. CODESYS also does not make a distinction about this in text editors.
See also