Instruction block parameters

This section introduces the parameters of an instruction block.
Instruction block parameters
Parameter
Description
Name
Identifies the parameter.
Naming conventions are as follows:
  • The name contains no more than 40 characters.
  • The name can contain letters, numbers, or underscores.
  • The name must start with a letter or an underscore.
  • The name cannot contain consecutive underscores.
Alias
Displays the short name used in the graphical language editors. The name can contain no more than 40 characters.
Data Type
Displays the data type of the parameter, including:
  • BOOL
  • BYTE
  • DATA
  • DINT
  • DWORD
  • INT
  • LINT
  • LWORD
  • LREAL
  • REAL
  • SINT
  • STRING
  • TIME
  • UDINT
  • UINT
  • USINT
  • WORD
  • USER ARRAYS
  • User-defined structures
For information about data types, see Data types overview.
Direction
Indicates the direction of the parameter:
  • VarInput
  • VarOutput
  • Var
Dimension
Displays the array dimension of the parameter.
The dimension is defined as a positive double integer (DINT) value.
The recommended maximum size limit for a multi-dimensional array is [1..400,1..40].
Examples:
  • [1..10] for a one dimensional arrays
  • [1..4,1..7] for a two dimensional arrays
Comment
Displays the comment for the parameter. The comment is free-format text.
Initial Value
Displays the value of a variable when the controller starts execution for the first time. For example, after a program download.
If the value is not retained, the initial value is the value of a variable after a controller power cycle.
The initial value can be the default value or the value that is defined by the user when creating the variable.
It uses the syntax corresponding to the
Data Type
.
Value (Online)
Displays the variable value that differs depending on the variable direction.
The value is available when monitoring the runtime downloads.
Values are:
  • Input: Forced
  • Output: Updated by the running code
  • Internal: Forced
Value (Offline)
Displays the variable value that differs depending on the variable direction.
The value is available when monitoring the runtime downloads.
Values are:
  • Input: Updated by the field value
  • Output: Forced
  • Internal: Updated by the consumer binding when one exists or else updated by the running code
Force
Indicates whether the parameter value is forced. Forcing operates differently for simple variables and function block parameters:
  • For simple variables, individual variables are forced directly.
  • For function block parameters, forcing a parameter ensures that the parameter value remains unchanged in the function block.
Attribute
Indicates the read and write access rights of the parameter:
  • Read
  • Write
  • Read/Write
String Size
Indicates the length of the string variable.
String Size
is available for the STRING data type.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal