Herunterladen Inhalt Inhalt Diese Seite drucken

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

Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

A small ecolog CoDeSys project as a start
Local
In the fields class and type the default settings were simply adopted. We just
want to point out that the variables in the example were declared locally. That
means that the declaration only applies to the POU in which it is located, here in
the program And. If a variable, e.g. an input, is to be used in several POUs it is
easier to declare it as a global variable. Using the selection field type helps to
avoid invalid declarations. During declaration the 'Autodeclaration' option also
helps to prevent syntax errors which may cause confusing error messages in
compilation, especially at the beginning.
This completes our little POU.
Activating
The program P_AND is to be activated in PLC_PRG. For this purpose activate
the window of PLC_PRG (Figure 51) and call menu item 'Insert' 'Box'(Figure
P_AND in
PLC_PRG
52).
1. Open
PLC_PRG by
double
clicking
Figure 51: Enter program call in PLC_PRG
At first the default box, the AND operator, is added. By clicking on F2 the Input
assistant opens. Select the 'User defined Programs' option on the left (Figure
52) . Then select AND and
in network 0001 of PLC_PRG.
3-12
in the box on the right. You activate P_AND
Box
2. Enter the
program call

Werbung

Kapitel

Inhaltsverzeichnis
loading

Inhaltsverzeichnis