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

Page 82

Advertising
background image

L-force | PLC Designer

We Write a Little Program

80

DMS 3.2 EN 02/2011 TD29



5.1.9

"TRAFFICSIGNAL" body

Now we determine the values of the output variables depending on the input STATUS
of the POU. To do this go into the body of the POU. Click on the field to the left beside
the first network (the gray field with the number 0001). You have now selected the
first network. Choose the menu item 'Insert' 'Box'.

In the first network a box is inserted with the operator AND and two inputs:

Click on the text AND, so that it appears selected and change the text into EQ. Select

then for each of the two inputs the three question marks and overwrite them with
"STATUS" respecively "1".

Click now on a place behind the EQ Box. Now the output of the EQ operation is
selected. Choose 'Insert' 'Assign'. Change the three question marks ??? to GREEN. You
now have created a network with the following structure:

STATUS is compared with 1, the result is assigned to GREEN. This network thus

switches to GREEN if the preset state value is 1.

For the other TRAFFICSIGNAL colors we need two more networks. To create the first
one execute command 'Insert' 'Network (after)' and insert an EQ-Box like described

above. Then select the output pin of this box and use again command 'Insert' 'Box'. In
the new box replace "AND" by "OR". Now select the first output pin of the OR-box and
use command 'Insert' 'Assign' to assign it to "GELB". Select the second input of the OR-
box by a mouse-click on the horizontal line next to the three question marks, so that it
appears marked by a dotted rectangle. Now use 'Insert' 'Box' to add a further EQ-box
like described above.

Advertising