Herunterladen Inhalt Inhalt Diese Seite drucken

IFM Electronic ecomot mobile R 360 Serie Starterset-Handbuch Seite 207

Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

Assignment
At first you cannot see any difference to the simulation mode. But the simulator
has not even been used yet! The state of the inputs does not influence the state
of the variables A, B and C! This would not be possible anyhow since no
assignment has been made. In our example it would make sense to assign A
and B to inputs and C to an output.
But how can the controller start processing the program without this
assignment? A, B and C were declared as BOOL. This is a declaration for bits
that are not assigned to any input or output. In a PLC such bits are a useful tool.
They are flags. That means that the program is only processed in the flag
range. It is also possible to assign a defined address to a flag. If this
assignment is not made by the programmer, it is done automatically by the
program. In many cases it is of no importance which flag address is used.
So the project still needs some modification before it can be tested with the
simulator.
To demonstrate the process again, we will simply delete the declarations. The
Declarations
common editing functions can be used: Mark and Delete. The new declarations
are entered automatically so that the blank lines can also be deleted.
Figure 99: Edit Declarations
Once again
If variable A is entered again in P_AND (PRG-FBD) of the AND function, the
declaration window will open again (if the Autodeclare option is active). A can
now be assigned to a physical address.
Figure 100: Declaration of an Input
Local or global? The class VAR is left unchanged. Thus the variable is declared to be local, as
stated above. If this input is used in several POUs, it may be easier to declare it
to be global (class VAR_GLOBAL). The advantage is that it only has to be
declared once. The disadvantage is that it does not appear on the list of
variables of the POU during the program test (
window Global Variables has to be opened. To do so, click on the Resources
tab in the navigation bar
clicking on Global_Variables.
Below (or above)
R
Figure 23) and then the window opens by double
opens:
The start
Figure 57). The separate
3-41

Werbung

Kapitel

Inhaltsverzeichnis
loading

Inhaltsverzeichnis