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

Page 81

Advertising
background image

L-force | PLC Designer

We Write a Little Program



DMS 3.2 EN 02/2011 TD29

79

5.1.8

"TRAFFICSIGNAL" declaration

Let us now turn to the POU TRAFFICSIGNAL. In the declaration editor you declare as
input variable (between the keywords VAR_INPUT and END_VAR) a variable named
STATUS of the type INT. STATUS will have four possible conditions, that is one for the
TRAFFICSIGNAL phases green, yellow, yellow/red andred.

Correspondingly our TRAFFICSIGNAL has three outputs, that is RED, YELLOW and

GREEN. You should declare these three variables. Then the declaration part of our
function block TRAFFICSIGNAL will look like this:

Function block TRAFFICSIGNAL, declaration part

Advertising