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

Sample Program In order to insert an operator in front of another operator, you must select the place where the input to which you want to attach the operator feeds into the box. Then use the command "Insert" "Operator". Otherwise you can setup these networks in the same way as the first network. Now our first POU has been finished. TRAFFICSIGNAL, according to the input of the value STATUS, controls whichever light color we wish. For the timer in the POU WAIT we need a POU from the standard library. Therefore, open the library manager with "Window" "Library Manager". Choose "Insert" "Additional library". The dialog box appears for opening files.

From the list of the libraries choose standard.lib. Now let us turn to the POU WAIT. This POU is supposed to become a timer with which we can determine the length of the time period of each TRAFFICSIGNAL phase. Our POU receives as input variable a variable TIME of the type TIME, and as output it produces a Boolean value which we want to call OK and which should be TRUE when the desired time period is finished. We set this value with FALSE by inserting at the end of the declaration (before the semicolon, however) " := FALSE ". For our purposes we need the POU TP, a clock generator. This has two inputs (IN, PT) and two outputs (Q, ET). TP does the following:

As long as IN is FALSE, ET is 0 and Q is FALSE. As soon as IN provides the value TRUE, the time is calculated at the output ET in milliseconds. When ET reaches the value PT, then ET is no longer counted. Meanwhile Q produces TRUE as long as ET is smaller than PT. As soon as the value PT has been reached, then Q produces FALSE again. In addition you will find a short description of all POUs from the standard library in the appendix. TX1200 34 Version: 1.3