How to Control Multiple Identical Machines with a Single TC 3 System

 How are identical machines controlled in a PLC? Typically, the approach involves encapsulating the logic into a Function Block (FB) and then creating multiple instances of this FB, each with its own unique set of Inputs and Outputs.

TwinCAT 3 offers an alternative approach: utilizing the same PLC program with multiple instances, where each instance controls a single machine.

The advantage of this method is that there is no need to add additional code. The variable names and addresses across all PLC instances remain identical, eliminating the need to consider address allocation or conflict issues.

Method:

  1. After successfully compiling the PLC project, TwinCAT 3 automatically generates instances with the same name as the project. These instances encapsulate all variables in the PLC that are designated as %I (inputs) or %Q (outputs).

  2.  add  Instance

  3.  You can add one or more instances.

  4. After adding Instance, each instance of the same PLC program will have identical Inputs and Outputs.

  5. All instances of the same PLC program are invoked by the same Task.

    Of course, on top of all machines, there may be other diverse equipment or global status and control signals that need to be handled similarly to conventional PLC projects.

    If you encounter any other issues during specific usage, please leave a message in the comment section.