Download WizPLC 2.0 - User manual (English)

Transcript
POU PHASES − Declaration
➤
To write the POU PHASES declaration:
1. In the declaration part, declare an input variable STATE (between the
keywords VAR_INPUT and END_VAR) of Type INT. The variable
STATE will have five possible states, one for each phase (green,
yellow, yellow/red, red and off).
2. Declare four output variables for the traffic light, named RED,
YELLOW, GREEN and OFF. Declare these variables as shown in the
figure on the next page.
The declaration part of PHASES should now look like this:
Function Block PHASES - Declaration Part
A Sample Project 11-5