
5 Programming
HIMax System
HI 801 001 E Rev. 4.01
Page 50 of 122
Type of variable
Project,
Configuration,
resource
User pro-
gram
Function
block
Function Use
VAR
•
(CONST,
RETAIN)
•
(CONST,
RETAIN)
Local
variable
VAR_INPUT
•
•
Input Variable
VAR_OUTPUT
•
(RETAIN)
•
Output variable
VAR_EXTERNAL
•
(CONST,
RETAIN)
•
(CONST,
RETAIN)
External to / from
other POU or
higher global levels
VAR_GLOBAL
•
(CONST,
RETAIN)
Global on a higher level
(project, configuration, re-
source)
VAR_TEMP
•
•
•
Temporary variable
• Variable type is supported for this program organization unit (POU) or can be defined at this level
CONST: constant that the user program cannot write (e.g., switch point)
RETAIN: With a warm start, a buffered value is taken, with a cold start, the initial value
Table 14: Types of Variables
5.2.2 Initial
Value
An initial value can be allocated to any variable. The variable adopts this value if no other
value was assigned by the program:
While starting the program
If a fault occurs in one of the following sources from which the variable derived its value.
Examples:
-
Physical input
-
Communication interface
-
User program in the STOP state
The value that the connected variables should adopt can be set for safe
ethernet
and
communication protocols.
i
HIMA recommends to assigning a safe value as initial value to all variables that receive
their value from a physical input or from communication!
Variables to which no initial value was assigned, have initial value 0 or FALSE if the
variables are of type BOOL.
5.2.3
System Variables and System Parameters
System variables
are pre-defined variables for processing properties or states of the HIMax
system in the user program. To do so, the global variables used in the user program are
assigned to system variables.
System parameters
are used to configure the properties of the controller (possible with
SILworX only). System parameters that can only have the values TRUE and FALSE are
also called
switches
.
System variables and system parameters are defined at different project levels. The system
variables and system parameters are configured in SILworX, either in the Properties dialog
box of the corresponding structure tree branching or in the detail view of the Hardware
Editor.
Содержание HIMax
Страница 1: ...SYSTEM HIMax System Manual...