In SIMOTION, different types of variables are distinguished:
● System variables
Each SIMOTION device and technology object has specific system variables. You can
access system variables within the SIMOTION device from all programs.
● I/O variables
An I/O variable is a symbolic variable name that is assigned to an I/O address of the
SIMOTION device or to the I/O. Thus, direct access to the peripherals is possible.
I/O variables are valid for all devices. All programs of the SIMOTION device have access
to them.
● Global device variables, unit variables and local variables are user-defined variables with
limited scope:
These global device variables can be accessed from all parts of the user program. They
can also be accessed from HMI devices.
Unit variables can be accessed by all programs, function blocks and functions defined within
the same source, e.g. ST source, MCC source, LAD/FBD source.
A source is a logic unit that you can create in your project and that can contain programs,
functions and function blocks.
Local variables can only be accessed within the program, the function or function block in
which they are defined.
If variables have been defined in the interface section of a source, they can be accessed
by other sources and external components, e.g. HMI systems.
Creating global device variables
Note
Global device variables can only be created in offline mode.
To create global device variables, proceed as follows:
1. Click the GLOBAL DEVICE VARIABLES element in the project navigator under the
SIMOTION device.
In the symbol browser, the Unit-global variables table is displayed.
2. In the Name column, click the first empty cell and enter the variable name, g_bo_start in
the example.
Press the <RETURN> or <TAB> key. The input focus moves to the Data type field.
Alternatively, you can click the field to move the input focus to it.
3. Enter the data type in the Data type field, BOOL in the example.
4. Press <RETURN> to confirm.
The variable is created and available in the project. In the symbol browser, a new line opens
for input.
Configuring/parameterizing
6.6 Programming the SIMOTION application
SIMOTION SCOUT
Configuration Manual, 11/2016
111
Содержание SIMOTION SCOUT
Страница 12: ...Preface 1 4 Hotline and Internet addresses SIMOTION SCOUT 12 Configuration Manual 11 2016 ...
Страница 32: ...Installation 4 4 Licenses SIMOTION SCOUT 32 Configuration Manual 11 2016 ...
Страница 64: ...User interface 5 11 Adding add ons to the workbench SIMOTION SCOUT 64 Configuration Manual 11 2016 ...
Страница 146: ...Configuring parameterizing 6 14 Writing the boot sector SIMOTION SCOUT 146 Configuration Manual 11 2016 ...
Страница 224: ...Product combinations 13 9 DCC programming system SIMOTION SCOUT 224 Configuration Manual 11 2016 ...
Страница 244: ...Index SIMOTION SCOUT 244 Configuration Manual 11 2016 ...