Project structure
The individual components of the project tree are discussed in more detail below.
System > License

Licenses may be excluded from the project under the following conditions:
Number | Context | Exclusion option |
---|---|---|
TC1200 | PLC project | / |
TF2000 | TwinCAT HMI | Removing manually from the license list |
TF5000 | Electric NC axes | Removing NC task under MOTION |
TF5050 | Electric NC transformer axes | Removing NC transformer axes from the PLC |
TF5810 | Hydraulic axes | Removing Tc3_PlasticHydraulics reference and axes from PLC The Tc3_PlasticBaseApplicationElectric library avoids a required reference |
TF8540 | Temperature control | / |
TF8550 | HMI Plastic Controls | Removing NuGet packages and controls in HMI |
TF8560 | Plastic technology functions | / (used consistently in the Plastic Application) |
System > Tasks

The four created tasks follow the following strategies:
- AdministrativeTask - General control tasks of medium priority
- Standard cycle time: 10 ms
- Calling the HMI <> PLC Recipe communication
- Storage and loading routines
- Communication commissioning tool of hydraulic axes
- Cyclic processing of application routines like: manual functions, process sequence, etc..
- MotionTask - Real-time critical routines
- Standard cycle time: 2 ms (= NC task)
- Cycle methods of the motion axes
- Internal control mechanisms
- TemperatureTask - Inertial temperature control
- Standard cycle time: 25 ms
- Calling the temperature control
- SimTask -Simulation
- Standard cycle time: 2 ms
- Calling the cycle methods of the simulation
Notice | |
Correct cycle time for temperature control The cycle time of the temperature control should be asynchronous to the frequency of the AC supply voltage. A synchronous cycle time promotes instability of the control! |
System > Real-Time

In principle, systems from TwinCAT 3 platform level 50 Performance Plus are the minimum requirement for the PlasticApplication. The PLC tasks can be split according to the number of cores and the single core performance of the CPU. For development systems, the project configuration can be adopted; for end devices, the following configurations have been tested in the field:
CP/ IPC / CX | Restrictions on blow molding application |
---|---|
None | |
Restricted use:
| |
Limited recommended for extruder applications. |
System > Type System

The Type System contains the used EventClasses. These EventClasses contain the respective events that are used in the Plastic Application.
Motion

All exemplarily implemented NC axes (electrical) are created in the NC task. The designations of the axes are based on the manufacturing significance.
PLC > Version

The currently used version of the project can be determined in two ways:
- PLC > PLC > PLC Project > Properties (right click) > Common > Version:
PLC > Library references

The following libraries are installed in the project in addition to some general libraries from the general TwinCAT pool:
- Tc2_PfwLib_Processing
- Temperature control algorithms
- Tc3_PlasticBaseApplication
- Collection of application-oriented classes, explained in this documentation
- Tc3_PlasticFunctions
- Abstracted axis interface, actuators and other technology functions
- Tc3_PlasticHydraulic
- Hydraulic axes compatible with virtual axis interface
- Tc3_PlasticNc
- Electric NC-based axes compatible with the virtual axis interface
![]() | Error despite existing library For compatibility and maintenance purposes, the versions of the included libraries are fixed. If you have already worked with the mentioned libraries in past versions, you have to install the updated versions. These can be found in the delivered project folder at Dependencies. |
Notice | |
Adaptation to an older version not permitted Do not change the library versions set in the project to an older version. Incompatibilities and unpredictable behavior of the software may occur! |
PLC > Code

The control code is divided into three main folders.
> _Tasks: Instantiation of the runtime and definition of the task calls
> Application: Application programs
- Axes: Instantiations of the axes
- Machine: Instantiations of general machine components
- OperationModes: Operation mode class
- Sequence: Sequence program and operation mode-dependent manual functions
- GVL application: Instances for sequence program, operation mode, operating data, etc..
- FB_Machine: Main program for linking subprograms
- _Build: Build method, called outside the runtime context
- _Build_Xyz: Machine type-specific build definition
- AlarmSamples: Sample of the use of alarms
- BlowMolding: Specific links for blow molding machines
- Cyclic: Cycle method, can be regarded as a MAIN program
- Experimental: Test method for exemplary test procedures
- GroupingConfirm: Handshake for using the FB_Temperature.Groups(x)
.EnableConfigConfirmation
- Init: Initializes interfaces of the class
- InitTrend: Defines the configuration of the FB_TrendHmi instance
- Md: Handshake for saving and loading the machine data overview
- ParamInit: Parameter initialization (here for temperature and monitoring)
- Reset: Acknowledgement of errors
- SetHMI: Sets the interface to FB_MachineHmi
- TimerSample: Sample of the use of timers in the COP programming language
- FB_MachineHmi: HMI elements of the main program
- I_MachineHmi: Interface of the HMI elements of the main program
> Version: Automatically generated GVL with the used project version
![]() | Further information about the PLC code |
PLC > SimPlc

In the second PLC (SimPlc) a machine simulation is implemented. This can be connected to the main control via mapping (comparable to the I/O of a machine). This allows the PLC to be implemented without including simulation elements. In addition, simulation can also be extended with the elements of PLC programming. This offers the advantage that the control PLC from project preparation does not have to be adapted to operation with a real machine. Only the mapping to I/O components is required.
I/O > Devices > CP22xx_1025

The I/O part of the project includes the mapping of the operating elements of the BlowMolding Beckhoff panel CP2219-1025-0030. The following figure shows how the FB_CP22xx_1025 must be connected to the I/O.
