Beckhoff Automation GmbH & Co. KG TX1200 — 3 Sample Program

Sample Program Now two new actions and a new transition condition are to be implemented. At the step Count, the only thing that happens is that COUNTER is increased by one: The EXIT transition checks whether the counter is greater than a certain number, let us say 7: At Off the state of both lights is set at (OFF), the COUNTER is reset to 0, and a time delay of 10 seconds is set: In our hypothetical situation, night falls after seven TRAFFICSIGNAL cycles, for ten seconds the TRAFFICSIGNAL turns itself off, then we have daylight again, the traffic light unit turns itself on again, and the whole process starts again from the beginning. Now test your program.

For this you must compile it ("Project" "Rebuild all") login ("Online" "Login" and then load it "Online" "Download"). If you now select "Online" "Run", the chronological order of the individual steps of your main program can be followed. The window of the POU PLC_PRG has now changed to the monitor window. Click twice on the plus sign in the declaration editor, the variable display drops down, and you can see the values of the individual variables. TX1200 40 Version: 1.3