Project examples

For deeper understanding, dealing with the TwinCAT EAP Configurator is illustrated by means of an example. Instead of creating the two project examples manually, they can be downloaded from the Beckhoff website. A description for creating the example projects manually from scratch can be found in the appendix under Creating the project examples.

The two TwinCAT projects Measuring and Operating should each control a machine, which together form a small production line. The project Measuring includes the configuration of the first machine, referred to as machine M below. It measures a particular product property (e.g. a length). The project Operating includes the configuration of the second machine, referred to as machine O below. It machines a product (e.g. a groove is milled, which matches the measured length).

The whole processing operation in the production line should run as follows (see illustration below): Machine M measures a product. When the measurement is completed, machine M is ready to output the measured value for machining the product. When a request from machine O is detected in machine M via the input variable in_Req, the measured value is written to the dedicated output variable out_Measure. (In the project example the measured values vary randomly between 4500 and 5500.) In addition, the current product ID is written to the variable out_ProductID, and the request from machine O is acknowledged using the variable out_Ack. Once the request has been processed, the input variable in_Req is reset, and the next product is measured.

Project examples 1:

Machine O uses its output variable out_Req to indicate that it is ready to machine the next product. The machine then waits for confirmation from Machine M that the next product with the required processing parameters is ready for machining. Machine O expects the confirmation in the variable in_Ack; the processing parameters are expected in the variables in_Measure and in_ProductID. When machine O receives an acknowledgement, the output variable out_Req is reset, and the product is machined. The next product is requested once the machining is complete. The duration of the machining depends on the measured value. (In this example: processing duration in milliseconds = value / 2, i.e. the processing duration varies between 2250 ms and 2750 ms).