L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 93

Advertising
background image

L-force | PLC Designer

We Write a Little Program



DMS 3.2 EN 02/2011 TD29

91

Declaration LIGHT1 and LIGHT2

These deliver the Boolean value of each of the six lights to the above mentioned six
outputs for each step of the block SEQUENCE. We are not, however, declaring the
output variables which are foreseen within the PLC_PRG block but under Resources

for Global Variables instead. The Boolean input variable IN, which is used to set the
variable START in the block SEQUENCE to TRUE, can be set in the same way. ON is also
allocated to an IEC address.

Select the tab Resources and open the list Global Variables.

Make the declaration as follows:

Declaration of the Input-/Output Variables for a CAN-Configuration

The name of the variable (e.g. IN) is followed, after AT, by a percent sign which begins
the IEC address. I stands for input, Q for output, B (used in this example) stands for
byte and the individual bits of the module are addressed using 0.0 (0.1, 0.2, etc.). We
will not do the needed controller configuration here in this example, because it
depends on which target package you have available on your computer. Please see PLC

configuration for further information.

We now want to finish off the block PLC_PRG.

For this we go into the editor window. We have selected the Continuous Function
Chart editor and we consequently obtain, under the menu bar, a CFC symbol bar with
all of the available elements (see The Continuous Function Chart Editor).

Advertising