0% found this document useful (0 votes)
32 views325 pages

TF85xx TC3 Plastic Application EN

FRAMEWORK LIBRARIE PLASTI APPLICATION

Uploaded by

Douglas Costa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views325 pages

TF85xx TC3 Plastic Application EN

FRAMEWORK LIBRARIE PLASTI APPLICATION

Uploaded by

Douglas Costa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 325

Manual | EN

TF85xx
TwinCAT 3 | Plastic Application

2024-04-30 | Version: 1.1.0


Table of contents

Table of contents
1 Foreword .................................................................................................................................................... 7
1.1 Notes on the documentation ............................................................................................................. 7
1.2 For your safety .................................................................................................................................. 7
1.3 Notes on information security............................................................................................................ 9

2 Introduction ............................................................................................................................................. 10

3 Version of the documented software .................................................................................................... 12

4 PLC concept and strategy ...................................................................................................................... 13


4.1 HMI interface ................................................................................................................................... 13
4.2 Modification and extension by inheritance ...................................................................................... 14
4.3 Use of interfaces ............................................................................................................................. 14
4.4 Initialization and cycle methods ...................................................................................................... 15
4.5 Data handling .................................................................................................................................. 16
4.6 Project structure .............................................................................................................................. 18

5 PLC-API - Class overview....................................................................................................................... 25


5.1 Base - Base classes........................................................................................................................ 25
5.1.1 FB_Base .......................................................................................................................... 25
5.1.2 FB_BaseHmi .................................................................................................................... 26
5.1.3 FB_BaseMd ..................................................................................................................... 27
5.1.4 FB_BaseMdHmi ............................................................................................................... 29
5.2 Runtime - Handling of initialization and cycle calls ......................................................................... 30
5.2.1 FB_BaseRuntime ............................................................................................................. 30
5.2.2 I_RuntimeInterface........................................................................................................... 32
5.3 Motion - Motion objects ................................................................................................................... 33
5.3.1 FB_Motion........................................................................................................................ 33
5.3.2 FB_Axis............................................................................................................................ 39
5.3.3 FB_PtpMotion .................................................................................................................. 43
5.3.4 FB_PtpMotionHmi ............................................................................................................ 47
5.3.5 FB_BaseCammingHmi..................................................................................................... 50
5.3.6 FB_Extruder ..................................................................................................................... 51
5.3.7 FB_Clamp ........................................................................................................................ 54
5.3.8 FB_Carriage..................................................................................................................... 57
5.4 ManualFunction - Manual functions ................................................................................................ 58
5.4.1 FB_ManualFunctionHmi................................................................................................... 58
5.4.2 FB_Manual....................................................................................................................... 62
5.4.3 FB_ManualMotion ............................................................................................................ 64
5.4.4 FB_ManualBaseWork ...................................................................................................... 65
5.4.5 FB_ManualPower............................................................................................................. 67
5.4.6 FB_ManualTurnrate ......................................................................................................... 69
5.4.7 FB_ManualWheel............................................................................................................. 70
5.5 Temperature - TF8540 Temperature Interface ............................................................................... 72
5.5.1 FB_Temperature .............................................................................................................. 72
5.5.2 FB_TemperatureHmi........................................................................................................ 79
5.5.3 FB_TemperatureGroup .................................................................................................... 81

TF85xx Version: 1.1.0 3


Table of contents

5.5.4 FB_TemperatureGroupHmi.............................................................................................. 85
5.5.5 FB_TempChannelBase.................................................................................................... 87
5.5.6 FB_TempChannel ............................................................................................................ 88
5.5.7 FB_TempChannelHmi...................................................................................................... 89
5.5.8 FB_TempSupply .............................................................................................................. 90
5.5.9 FB_TempSupplyLine........................................................................................................ 90
5.5.10 FB_TempSchedule .......................................................................................................... 91
5.5.11 FB_TempScheduleHmi .................................................................................................... 92
5.5.12 FB_TimerTempHmi.......................................................................................................... 92
5.5.13 T_SHA256........................................................................................................................ 94
5.6 Recipe - recipe management .......................................................................................................... 94
5.6.1 FB_PlcStateToHmi........................................................................................................... 94
5.6.2 I_RecipeState................................................................................................................... 96
5.6.3 FB_Recipe ....................................................................................................................... 96
5.6.4 FB_TempRecipe .............................................................................................................. 98
5.6.5 FB_MoveClusterRecipe ................................................................................................... 99
5.7 MachineData - Machine data ........................................................................................................ 102
5.7.1 FB_MdBaseContainer.................................................................................................... 104
5.7.2 FB_MdBaseComponent................................................................................................. 106
5.7.3 FB_MdCollection............................................................................................................ 106
5.8 OperationData - Production data and statistics............................................................................. 107
5.8.1 FB_ProductionCounter................................................................................................... 107
5.8.2 FB_EnergyMeasurement ............................................................................................... 110
5.9 Alarms - Handling of the Tc3_EventLogger .................................................................................. 116
5.9.1 FB_AlarmHandler........................................................................................................... 116
5.9.2 FB_AppMessage............................................................................................................ 117
5.10 Logging - Recording user input ..................................................................................................... 117
5.10.1 CSV................................................................................................................................ 117
5.10.2 UserLogging................................................................................................................... 125
5.11 Analog - analog value scaling ....................................................................................................... 129
5.11.1 FB_ScaleAnalogHmi ...................................................................................................... 129
5.11.2 FB_Monitoring................................................................................................................ 130
5.11.3 FB_Setpoints.................................................................................................................. 132
5.12 Time - Time-related functions ....................................................................................................... 133
5.12.1 FB_TimerHmi ................................................................................................................. 133
5.12.2 FB_TimerTon ................................................................................................................. 134
5.12.3 FB_TimerTof .................................................................................................................. 134
5.12.4 FB_TimerTp ................................................................................................................... 135
5.12.5 FB_TimerWeekdayHmi .................................................................................................. 136
5.12.6 FB_TimerWeekdayMaster ............................................................................................. 137
5.12.7 FB_Time......................................................................................................................... 138
5.12.8 F_GetLocalSystemtime.................................................................................................. 139
5.12.9 F_GetLocalSystemtimeEx.............................................................................................. 139
5.12.10 F_SecondsToTime() ...................................................................................................... 140
5.12.11 F_TimeToSeconds() ...................................................................................................... 140
5.13 BlowMolding - Blow molding specific classes ............................................................................... 141

4 Version: 1.1.0 TF85xx


Table of contents

5.13.1 FB_Blowing .................................................................................................................... 141


5.13.2 FB_IntervalBlowing ........................................................................................................ 142
5.13.3 FB_Blowpin .................................................................................................................... 143
5.13.4 FB_BlowMoldingExtruder............................................................................................... 147
5.13.5 FB_Wtc .......................................................................................................................... 148
5.13.6 FB_WtcTimer ................................................................................................................. 151
5.13.7 FB_WtcAccumulator ...................................................................................................... 152
5.13.8 FB_WtcAccumulatorHmi ................................................................................................ 155
5.14 Utilities........................................................................................................................................... 157
5.14.1 FB_AdaptableSequence ................................................................................................ 157
5.14.2 FB_CP22xx_1025 .......................................................................................................... 162
5.14.3 FB_CreateDirRecurse.................................................................................................... 170
5.14.4 FB_FlexValue................................................................................................................. 171
5.14.5 FB_LatchTrigger ............................................................................................................ 172
5.14.6 FB_LibVersion................................................................................................................ 173
5.14.7 FB_LibVersionBeta ........................................................................................................ 174
5.14.8 FB_LimitMemory ............................................................................................................ 175
5.14.9 FB_Parameter................................................................................................................ 177
5.14.10 FB_ScaleHmi ................................................................................................................. 178
5.14.11 FB_TableGeneratorAsciiFile .......................................................................................... 179
5.14.12 FB_TrendHmi................................................................................................................. 179
5.14.13 FB_Trigger ..................................................................................................................... 184
5.14.14 F_BaseDirectory ............................................................................................................ 185
5.14.15 F_CutDecimals............................................................................................................... 185
5.14.16 F_GetCycleTime().......................................................................................................... 186
5.14.17 F_Round ........................................................................................................................ 186
5.14.18 F_TryDivide() ................................................................................................................. 187
5.14.19 T_PlasticStatus .............................................................................................................. 187
5.15 Setting parameters - Tc3_PlasticBaseAppStaticParams .............................................................. 188

6 HMI project structure ............................................................................................................................ 190


6.1 References .................................................................................................................................... 190
6.2 Themes ......................................................................................................................................... 192
6.3 Contents ........................................................................................................................................ 192
6.3.1 Start page....................................................................................................................... 198
6.3.2 Navigation ...................................................................................................................... 200
6.3.3 Info ................................................................................................................................. 201
6.3.4 Manual functions ............................................................................................................ 202
6.3.5 Axes ............................................................................................................................... 204
6.3.6 Extruder.......................................................................................................................... 209
6.3.7 Parameter ...................................................................................................................... 215
6.3.8 Process .......................................................................................................................... 221
6.3.9 System ........................................................................................................................... 227
6.3.10 Temperature................................................................................................................... 237
6.3.11 WTC ............................................................................................................................... 249
6.4 Localization ................................................................................................................................... 258
6.5 View .............................................................................................................................................. 258

TF85xx Version: 1.1.0 5


Table of contents

7 Samples / instructions .......................................................................................................................... 262


7.1 PLC samples / instructions............................................................................................................ 262
7.1.1 General .......................................................................................................................... 262
7.1.2 Object orientation ........................................................................................................... 265
7.1.3 Axes ............................................................................................................................... 272
7.1.4 Data management.......................................................................................................... 277
7.1.5 Temperature control....................................................................................................... 278
7.1.6 Central operating function .............................................................................................. 284
7.2 Commissioning of the temperature control ................................................................................... 286
7.3 Creating and using the ZoneImageLayoutConfig server symbol .................................................. 291
7.4 Logging user changes ................................................................................................................... 292
7.5 Optimizing mappings in the TwinCAT HMI project........................................................................ 293
7.6 Using the CP2219-1025-0030 Industrial Panel PC ....................................................................... 295

8 Appendix ................................................................................................................................................ 298


8.1 PLC-API (obsolete) ....................................................................................................................... 298
8.1.1 F_TryDevide() ................................................................................................................ 298
8.1.2 FB_TrafoTableGenerator ............................................................................................... 299
8.1.3 FB_MonitoringZone........................................................................................................ 305
8.1.4 FB_TempCtrl.................................................................................................................. 306
8.1.5 FB_TempCtrlHmi ........................................................................................................... 313
8.1.6 FB_TempGroup ............................................................................................................. 314
8.1.7 FB_TempGroupHmi ....................................................................................................... 315
8.1.8 FB_TempGroupOpModeHmi ......................................................................................... 317
8.1.9 FB_TempZone ............................................................................................................... 317
8.1.10 FB_TempZoneHmi......................................................................................................... 318
8.1.11 FB_AxisSpecific ............................................................................................................. 319
8.1.12 FB_WtcTimeMaster ....................................................................................................... 320
8.1.13 FB_WtcAccuMaster ....................................................................................................... 321
8.1.14 FB_ManualPtp ............................................................................................................... 322
8.1.15 PlasticStatusHmi ............................................................................................................ 323

6 Version: 1.1.0 TF85xx


Foreword

1 Foreword

1.1 Notes on the documentation


This description is intended exclusively for trained specialists in control and automation technology who are
familiar with the applicable national standards.
For installation and commissioning of the components, it is absolutely necessary to observe the
documentation and the following notes and explanations.
The qualified personnel is obliged to always use the currently valid documentation.

The responsible staff must ensure that the application or use of the products described satisfies all
requirements for safety, including all the relevant laws, regulations, guidelines, and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under
development.
We reserve the right to revise and change the documentation at any time and without notice.
No claims to modify products that have already been supplied may be made on the basis of the data,
diagrams, and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, TwinCAT/BSD®, TC/BSD®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®,
Safety over EtherCAT®, TwinSAFE®, XFC®, XTS® and XPlanar® are registered and licensed trademarks of
Beckhoff Automation GmbH.
If third parties make use of designations or trademarks used in this publication for their own purposes, this
could infringe upon the rights of the owners of the said designations.

Patents

The EtherCAT Technology is covered, including but not limited to the following patent applications and
patents:
EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702
and similar applications and registrations in several other countries.

EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.


The distribution and reproduction of this document as well as the use and communication of its contents
without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event that a patent, utility
model, or design are registered.

1.2 For your safety


Safety regulations

Read the following explanations for your safety.


Always observe and follow product-specific safety instructions, which you may find at the appropriate places
in this document.

TF85xx Version: 1.1.0 7


Foreword

Exclusion of liability

All the components are supplied in particular hardware and software configurations which are appropriate for
the application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.

Personnel qualification

This description is only intended for trained specialists in control, automation, and drive technology who are
familiar with the applicable national standards.

Signal words

The signal words used in the documentation are classified below. In order to prevent injury and damage to
persons and property, read and follow the safety and warning notices.

Personal injury warnings

DANGER
Hazard with high risk of death or serious injury.

WARNING
Hazard with medium risk of death or serious injury.

CAUTION
There is a low-risk hazard that could result in medium or minor injury.

Warning of damage to property or environment

NOTICE
The environment, equipment, or data may be damaged.

Information on handling the product

This information includes, for example:


recommendations for action, assistance or further information on the product.

8 Version: 1.1.0 TF85xx


Foreword

1.3 Notes on information security


The products of Beckhoff Automation GmbH & Co. KG (Beckhoff), insofar as they can be accessed online,
are equipped with security functions that support the secure operation of plants, systems, machines and
networks. Despite the security functions, the creation, implementation and constant updating of a holistic
security concept for the operation are necessary to protect the respective plant, system, machine and
networks against cyber threats. The products sold by Beckhoff are only part of the overall security concept.
The customer is responsible for preventing unauthorized access by third parties to its equipment, systems,
machines and networks. The latter should be connected to the corporate network or the Internet only if
appropriate protective measures have been set up.

In addition, the recommendations from Beckhoff regarding appropriate protective measures should be
observed. Further information regarding information security and industrial security can be found in our
https://www.beckhoff.com/secguide.

Beckhoff products and solutions undergo continuous further development. This also applies to security
functions. In light of this continuous further development, Beckhoff expressly recommends that the products
are kept up to date at all times and that updates are installed for the products once they have been made
available. Using outdated or unsupported product versions can increase the risk of cyber threats.

To stay informed about information security for Beckhoff products, subscribe to the RSS feed at https://
www.beckhoff.com/secinfo.

TF85xx Version: 1.1.0 9


Introduction

2 Introduction
The TwinCAT 3 Plastic Application represents the third implementation level of the industry solution for
plastics machines from Beckhoff Automation. In this level, the technology-specific functions of the
TwinCAT 3 Plastic Framework (second level) are implemented in production-specific execution.

Various production part processes can be listed as examples of production-specific functions:


• Blow molding application: wall thickness control (WTC)
• Injection molding application: injection process (Injection Unit)
• Extrusion application: constant extrusion (extruder)

In the TwinCAT 3 Plastic Application, precisely these production part processes are implemented and
preconfigured as examples. The source code for the Plastic Application is provided free of charge, which
makes it possible to edit and extend the solution in any way. Therefore, the Base Application is ideal as a
basis for starting a new project.

Concrete structure

In addition to the vertical division into Sample Code and Plastic Base Application, the project can also be
differentiated horizontally: PLC and HMI.

10 Version: 1.1.0 TF85xx


Introduction

For the horizontal division, there are two projects on the PLC side, which implement the functions of the
Plastic Application in a coordinated manner.

In the vertical distinction, both projects are divided into a general part (Plastic Base Application) and a
machine-specific part (Type specific PLC project). This division ensures that even after the start of a project,
the further development of the Plastic Application can be benefited from.

Editing the Plastic Base Application not recommended


Editing the Plastic Base Application is quite possible. However, the option of support from Beckhoff
Automation in terms of adaptations and extensions is thereby forfeited. Normally, you only edit the
machine-specific part (Sample Code) and use the Plastic Base Application as a library.

Currently, the Plastic Application supports the following machine types:


• Blow molding machines
• Extrusion machines

Further machine types are planned for future development.

TF85xx Version: 1.1.0 11


Version of the documented software

3 Version of the documented software


Project:

TwinCAT 3 Plastic Application


V12.7.0

Dependencies:

Name License number Version


TwinCAT 3 / >= 3.1.4024.42 (min.)
>= 3.1.4024.54 (recommended)
TwinCAT 3 HMI TF2000 12.760.59
TC3 Plastic TC HMI Controls TF8550 12.12.0
TC3 Plastic Technology Functions TF8560 3.12.5.0

TwinCAT HMI Version


Only use the minor version of the TwinCAT 3 HMI specified here. Experience shows that minor
updates may cause incompatibilities with the TwinCAT Plastic Application HMI project.

12 Version: 1.1.0 TF85xx


PLC concept and strategy

4 PLC concept and strategy


The PLC of the Plastic Application implements the control functions of the Plastic Framework (TF8540 &
TF8560) in a manufacturing-oriented approach. The framework (in particular TF8560) itself is detached from
this approach and implements core functions (CoreFunctions) for plastics technology. For example, a
general point to point movement or cam plates are provided. In addition, the general axis interface
I_AxisBase offers the possibility to implement the production-oriented application algorithms without
specifying the drive technology. This results in the classes (FBs) of the Plastic Base Application library.

As an example of the concept, the wall thickness control (WTC) can be considered here:
This component of a blow molding machine is fundamentally based on the cam core function provided by
TF8560 (Camming). For the user, this is often of secondary importance, since he wants to integrate the
functions based on it, such as Start wall thickness profile or Move to test position, into his procedure.
This step is pre-implemented by the Plastic Base Application so that the scope of tasks to be completed to
the finished machine is minimized as much as possible.

Other concept points are discussed in more detail in the following subsections:

Topic Description
PLC and HMI [} 13] Communication path between PLC and HMI
Inheritance [} 14] Use of inheritance for more efficient use of redundant code and easier function
extension
Interfaces [} 14] Structure of interface in Plastic Base Application and programming with
interfaces to extend control flexibility
Initialization & Cycle Initialization of references, parameters and data
Methods [} 15]
Data handling [} 16] Data handling at machine and product level
Project structure [} 18] Explanation of the TwinCAT project

4.1 HMI interface


The communication between PLC and HMI is conceptually considered in the Plastic Application. This
ensures that controlled access of the HMI to the PLC is possible. In addition, it is also quickly apparent in
PLC programming that the respective sections are input and/or output values of the HMI.

The concept is for each class with information exchange to be given a second class, which assumes
precisely this function. This results in the parallel-class model. In addition to the main class (FB_Xyz), there
is a parallel class of type FB_XyzHmi for each added class. The parallel class is linked to the main class via
an interface. In the instantiation, the instance of the parallel class must be passed to the instance of the main
class for this purpose. Depending on the use case, the main class of the parallel class can also be passed in
this step.

This arrangement results in a division of control data and user input/display values. In addition, controls from
the T8550 Plastic TC HMI Controls are implicitly supported, greatly improving the integrity of the project. In
the same way, recipe management can be optimally linked to and used with the PLC.

TF85xx Version: 1.1.0 13


PLC concept and strategy

4.2 Modification and extension by inheritance


In the vertical division of the project structure into Plastic Base Application and Sample Code, the extension
is implemented using IEC 61131-3 inheritance. This means that the machine-specific part (Sample Code) is
freely adaptable, but can build on the implemented algorithms of the Plastic Base Application.

The consistent use of inheritance for changes to the machine controller also enables updates to the Plastic
Base Application to be applied directly by Beckhoff Automation.

Editing the Plastic Base Application not recommended


Editing the Plastic Base Application is quite possible. However, the option of support from Beckhoff
Automation in terms of adaptations and extensions is thereby forfeited. Normally, you only edit the
machine-specific part (Sample Code) and use the Plastic Base Application as a library.

Concept of object-oriented programming


It is recommended to deal in detail with the concept of object-oriented programming according to
IEC 61131-3 in order to be able to use the advantages effectively. Further information on object-
oriented programming can be found in the documentation for TwinCAT 3 PLC programming

In Plastic Application, there are a total of four cases where an inheriting class (EXTENDS) can extend, modify
or remove the inherited class:
• Runtime memory in the class variable declaration
◦ Extension possible with EXTENDS
• Add, overwrite and extend properties or methods
◦ Extension possible with SUPER^. call
• Extend, modify and disable inner procedures
◦ Extension possible with FB_AdaptableSequence [} 157]
• Extend and modify HMI parallel class
◦ Extending the interface and the parallel class with EXTENDS possible

4.3 Use of interfaces


The Plastic Base application, like the TF8560 Plastic Technology Functions, is based on working with
interfaces. For this purpose, a standard interface exists on the part of the Plastic Base Application for almost
every class, which provides access to the relevant properties and methods.

14 Version: 1.1.0 TF85xx


PLC concept and strategy

For many practical use cases in programming, access via an interface turns out to be much clearer. For
example, methods for internal communication between two classes as well as other properties are not
visible.

When extending a class using inheritance (see section Inheritance [} 14]), it is also possible to extend the
corresponding standard interface. This can be accomplished in a comparable way to inheriting a class with
the keyword EXTENDS.

4.4 Initialization and cycle methods


Since the Plastic Base Application concept frequently works with reference values such as interfaces, it must
be ensured that the reference values used have a valid assignment. In order not to additionally burden the
runtime by the constant validation of these assignments, the Plastic Base Application implements a concept
for the initialization of an object.

The access of invalid reference values mainly concerns the call of cycle methods of a Plastic Base
Application object. For this reason, an object must have been successfully initialized before the cycle method
may be executed.

TF85xx Version: 1.1.0 15


PLC concept and strategy

Handling with the FB_BaseRuntime class recommended


All the initialization steps and cycle calls described below can be implemented using
FB_BaseRuntime. This means that objects only have to be passed to the runtime. If the initialization
steps fail, corresponding information is output via the TcEventLogger.

SetHMI() method

By means of the SetHMI() method an HMI parallel class can be passed to the main class. The method must
always be executed before the Init() method, unless the class also works without HMI parallel class.

Error code Abbreviation Description


0x701 SrvNotSupported The class does not support HMI parallel class.
0x71B InvalidInterface The passed interface is invalid.

Init() method

The Init() method is used to check the initialization state in addition to setting and configuring reference value
assignments. Accordingly, when initializing an object, the HRESULT return value of the method must be
checked. If the execution of the Init() method is unsuccessful, an error exists in the structure of the program
codes. This error must be solved on code level.

Use of the BaseState


Redundantly to the return value of the Init() method, the BaseState of the base class FB_Base can
also be checked for a value greater than E_BaseState.eInit.

Cyclic() method

The Cyclic() cycle method acts as an object-oriented version of a class instance call. I.e., the method is
usually called once per cycle to process procedures and/or updates. The routines implemented in the
Cyclic() method are mostly medium priority mechanisms. Therefore, this method is suitable for the
implementation of a predefined command sequence or the processing of control commands from the HMI
(e.g. the implementation of manual functions).

ParamInit() method

The ParamInit() method is used to initialize parameters. I.e., in this method, hardcoded default values are
defined with which commissioning is started without preconfigured machine data. Since asynchronous
communication may also be required in this method, execution may continue over several cycles until the
HRESULT return value signals the success of the operation. It is recommended to add a timeout to detect a
failure of the execution.

Loading the machine data


If loading machine data from a file is desired when starting the machine, this is not possible in the
ParamInit() method. Therefore, implement a separate procedure that starts following the successful
execution of ParamInit(). This is implemented by the FB_BaseRuntime class in the Plastic
Application project.

CoreCyclic() method

The special modification of a Cyclic() method as CoreCyclic() can be found again with individual classes
such as FB_Axis. This method handles particularly real-time critical tasks such as calling the cycle method of
a TF8560 axis. Since such an axis also contains control algorithms, it is recommended to choose the cycle
time as small as possible (standard 2 ms).

4.5 Data handling


The concept for the Plastic Application data handling is split into several levels.

16 Version: 1.1.0 TF85xx


PLC concept and strategy

Essentially, the Plastic Base Application implements three levels for loading parameters and other data.
These levels are executed one after the other during the start-up phase and can partly be executed again
after the start.

Standard parameterization (in code)- ParamInit()

After successful execution of the Init() method, the default parameters defined in the code are loaded.
Therefore, this level is considered to be the foundation, but can be overwritten by any subsequent instance.

Design-\commissioning-dependent data in a binary file - MachineData (machine data)

Machine data includes data that is set only once during the construction, commissioning or modification of
the machine. Since this data can influence the machine behavior, the file is stored in binary format and
roughly secured against external manipulation by a CRC checksum. The management of the machine data
is completely handled by the PLC, but can be set and/or loaded/saved through the HMI.

The implemented machine data handling is based on the TF8560 utilities. The PLC code part is split into two
classes: containers and components.

Containers are integrated into many objects of the Plastic Base Application and serve as a collection object
for the data of a file. A class that contains machine data either has its own container or has a component that
can be added to a container. The classes with their own container inherit from the class FB_BaseMd and
provide an interface to it. In the inheritance structure, multiple components (per inheritance level) are added
to the container. This also allows the scope of the machine data to be further expanded in the end
application.

Since the indices of the parameters must not be chosen arbitrarily for this purpose, the parameters are
stored in the Plastic Base Application according to a defined scheme. This also ensures that the parameters
can be prepared outside the controller in a program that will be provided in the future.

Product data / machine data - HMI-Recipe

The parameters to be regularly reset for the variation of the production process are summarized under the
recipe data. This includes, for example, the set temperatures of the temperature zones, timings, production
speeds, etc... The recipe data is managed collectively by the HMI and can be expanded as required in
engineering. For more detailed information on recipe management, please refer to the chapter Recipe
management [} 229].

TF85xx Version: 1.1.0 17


PLC concept and strategy

4.6 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

18 Version: 1.1.0 TF85xx


PLC concept and strategy

◦ 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

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


CX2033 None
CX2043 None
C6030 (Basis) None
CP2219-1025-0030 None

System > Type System

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

TF85xx Version: 1.1.0 19


PLC concept and strategy

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 > PLC > PLC Project > Version > Global_Version

20 Version: 1.1.0 TF85xx


PLC concept and strategy

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!

TF85xx Version: 1.1.0 21


PLC concept and strategy

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 [} 72].Groups(x)
[} 81].EnableConfigConfirmation
◦ Init: Initializes interfaces of the class
◦ InitTrend: Defines the configuration of the FB_TrendHmi [} 179] instance
◦ Md: Handshake for saving and loading the machine data overview [} 216]
◦ ParamInit: Parameter initialization (here for temperature and monitoring)
◦ Reset: Acknowledgement of errors

22 Version: 1.1.0 TF85xx


PLC concept and strategy

◦ 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


• Class overview [} 25]
• Extension by inheritance [} 14]

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 [} 162] must be connected to
the I/O.

TF85xx Version: 1.1.0 23


PLC concept and strategy

24 Version: 1.1.0 TF85xx


PLC-API - Class overview

5 PLC-API - Class overview

5.1 Base - Base classes

5.1.1 FB_Base

FB_Base is the base class for most of the available classes of the Plastic Base Application.

Internal functions:
• Standard Error and Reset
• Creation of an instance default name
• Provision of the event interface

Syntax:
FUNCTION_BLOCK FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.

TF85xx Version: 1.1.0 25


PLC-API - Class overview

Type Description
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.1.1.1 E_BaseState
Base State for the state of a Plastic Base Application object.

Syntax:
{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_BaseState :
(
eFailed := -9999, // Init routine failed
eReinit := -100, // Object has to be reinitialized

eNotHandled := 0, // It starts Here

eInit, // FB_Init is succeeded


eReady, // Init is succeeded
eIdle, // ParamInit is succeeded
eBusy, // implementation usable busy flag

eError := 1000 // implementation usable error flag


);
END_TYPE

Values

Name Description
eFailed Init procedure failed.
eReinit Object must be re-initialized.
eNotHandled Object was not handled.
eInit FB_init was executed successfully.
eReady Init was executed successfully.
eIdle ParamInit was executed successfully.
eBusy Implementation-available busy flag.
eError Implementation-available error flag.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.1.2 FB_BaseHmi

26 Version: 1.1.0 TF85xx


PLC-API - Class overview

FB_BaseHmi is the base class of all HMI parallel classes. The provided Init(ipBase) method predefines that
the parallel object is passed via the I_Base interface.

Syntax:
FUNCTION_BLOCK FB_BaseHmi EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_BaseHmi Standard interface on FB_BaseHmi.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.1.3 FB_BaseMd

Extends the base class FB_Base by the functions of the machine data handling. The structure of the
machine data is explained in more detail in the chapter Machine data [} 102].

Syntax:
FUNCTION_BLOCK FB_BaseMd EXTENDS FB_Base

TF85xx Version: 1.1.0 27


PLC-API - Class overview

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms)

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

28 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.1.4 FB_BaseMdHmi

HMI class in parallel with the base machine data class FB_BaseMd. Is necessary for loading and saving the
machine data via the HMI.

Syntax:
FUNCTION_BLOCK FB_BaseMdHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Local HMI variables

Name Data type Description


fbParamHandle FB_MdHandleHmi Handling interface for loading and saving machine
data.

Methods

Name Description
Reset() Resets the error state of the class.
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_BaseMdHmi Standard interface on FB_BaseMdHmi.
I_BaseEmpty For extension without standard interface.

TF85xx Version: 1.1.0 29


PLC-API - Class overview

Type Description
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.2 Runtime - Handling of initialization and cycle calls


Advantage / Benefit

The FB_BaseRuntime [} 30] class of the Plastic Base Application is used to simplify cycle calls and
automated initialization of control objects. This greatly simplifies several steps such as creating, initializing,
checking return values, generating error messages, cyclic calls, etc.

Requirements

For an object to be attached to the runtime, one of the following interfaces must be implemented.

Interfaces

Name Description
I_RuntimeInterface General interface for an attachable control object.
I_OneTaskInterface Interface with an executable method.
I_TwoTaskInterface Interface with two executable methods.
I_TempTaskInterface Interface with a slow executable method.

5.2.1 FB_BaseRuntime

The class automates the initialization and cyclic calls of instantiated control objects such as axes, sequence
algorithms, temperature controllers, etc.

Internal functions:
• Initialization (Init(), ParamInit() and MdInit())
• Cycle calls (3-tasks)
• PlcMcManager support function (when using hydraulic axes)
• Software version check

Syntax:
FUNCTION_BLOCK FB_BaseRuntime EXTENDS FB_Base

Properties

Name Type Access Initial value Description


DisableMdFillCollections BOOL Get, Set FALSE Blocks the filling of attached
FB_MdCollection [} 106]
instances.

30 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


DisableMdInit BOOL Get, Set FALSE Blocks the automatic loading
of the machine data by the
runtime.
DisableRecipe BOOL Get, Set FALSE Locks the recipe handling of
objects that support the
interface I_Recipe [} 96].
MdInitExecuted BOOL Get FALSE Loading of the machine data
was performed for all objects.
NumRuntimeObjects INT Get 0 Number of appended runtime
objects.

Methods

Name Description
Append() [} 32] Appends a control object to the runtime.
Clear() Deletes the list of appended control objects.
MdLoadAll() Starts the loading process of all appended control objects with machine
data container.
MdSaveAll() Starts the saving process of all appended control objects with machine
data container.
SetParamInitTimeout(iObject, Changes the timeout of the ParamInit() function of an appended
fTimeout) control object.

Cycle methods

Name Description Cycle time (rec-


ommended)
CoreCyclic() Fast cycle method for control objects with I_TwoTaskInterface. 2 ms
Cyclic() Normal cycle method for control objects with I_OneTaskInterface or 10 ms
I_TwoTaskInterface.
TemperatureCyclic() Slow cycle method for control objects with I_TempTaskInterface. 25 ms

The cycle methods must be called with programs (PRG) assigned to different tasks, so that the runtime can
assign the appended objects to the individual tasks.

Possible events

ID Description Alarm/Message
1xx Recipe Message
10xx Initialization Alarm + Message
11xx Parameterization Alarm + Message
12xx Version incompatibility Alarm
20xx Machine data Alarm + Message

Interfaces

Type Description
I_BaseRuntime Standard interface on FB_BaseRuntime.

TF85xx Version: 1.1.0 31


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.2.1.1 Append()

Appends a control object to the runtime.

Syntax:
METHOD Append : VOID
VAR_INPUT
iObj: I_RuntimeInterface;
iObjHmi: I_BaseHmi;
END_VAR

Inputs

Name Type Description


iObj I_RuntimeInterface Object to be attached to the runtime.
iObjHmi I_BaseHmi Associated HMI object which is to be linked to the object.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.2.2 I_RuntimeInterface
Represents the general interface for a runtime-compatible control object.

Syntax:
INTERFACE I_RuntimeInterface

Methods

Name Description
Init() Method for checking the initialization of an object
ParamInit() Method for standard parameterization of an object
SetHMI(ipBaseHmi) Method for passing a parallel HMI object

All methods are checked by the FB_BaseRuntime class for the HRESULT return value.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

32 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.3 Motion - Motion objects

5.3.1 FB_Motion

Represents the standard class for all motion objects, based on TF8560 motion objects.

Syntax:
FUNCTION_BLOCK FB_Motion EXTENDS FB_BaseMd

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific Get - Technology-specific functions/
[} 35] values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.

TF85xx Version: 1.1.0 33


PLC-API - Class overview

Name Description
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms)
CoreCyclic() Cycle method with short cycle time (default: 2 ms).

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Motion Standard interface on FB_Motion
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.1.1 CheckAxisState()

Checks the current state of the TF8560 axis.

Syntax:
METHOD CheckAxisState : BOOL
VAR_INPUT
eState: BOOL;
bSendEvent: BOOL;
END_VAR

34 Version: 1.1.0 TF85xx


PLC-API - Class overview

Inputs

Name Type Description


eState E_AxisState Axis condition to be checked
bSendEvent BOOL Logging an event when the checked state does not match.

Outputs

Name Type Description


CheckAxisState BOOL Is TRUE if the axis state matches.

Possible events

ID Description Alarm/Message
1000 Axis is not in state ‘{0}’ Message

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.3.1.2 FB_MotionSpecific

The class implements technology-specific functions of a TF8560 motion object.

Syntax:
FUNCTION_BLOCK FB_MotionSpecific EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Actuator [} 36] I_ActuatorFunctions Get - Actuator-specific functions
Hydraulic [} 36] I_HydraulicFunctions Get - Hydraulic-specific functions
Nc [} 37] I_NcFunctions Get - NC-specific (servo-electric)
functions
Trafo [} 38] I_TrafoFunctions Get - Transformation-specific
functions

Interfaces

Type Description
I_MotionSpecific Standard interface on FB_MotionSpecific

TF85xx Version: 1.1.0 35


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.1.2.1 FB_ActuatorFunctions

Implements specific functions for a TF8560 actuator.

Syntax:
FUNCTION_BLOCK FB_ActuatorFunctions EXTENDS FB_Base

Properties

Name Type Access Initial value Description


AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
IsActuator BOOL Get FALSE Actuator functions are
supported by the assigned
object type.
IsBase BOOL Get FALSE Actuator is in the base
position
IsWork BOOL Get FALSE Actuator is in the working
position

Interfaces

Type Description
I_ActuatorFunctions Standard interfaces on FB_ActuatorFunctions
I_AttachableMdInterface Interface for containerless machine data components

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.1.2.2 FB_HydraulicFunctions

Implements hydraulic-specific functions of a TF8560 axis.

Syntax:
FUNCTION_BLOCK FB_HydraulicFunctions EXTENDS FB_Base

36 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description


AutoIdentFinished BOOL Get FALSE The executed characteristic
curve measurement was
completed successfully.
IsHydraulic BOOL Get FALSE Hydraulic functions are
supported by the assigned
axis type.

Methods

Name Description
AutoIdent() Characteristic measurement of a hydraulic axis.

Interfaces

Type Description
I_HydraulicFunctions Standard interface on FB_HydraulicFunctions

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.3.1.2.3 FB_NcFunctions

Implements specific functions for an NC-based TF8560 axis.

Syntax:
FUNCTION_BLOCK FB_NcFunctions EXTENDS FB_Base

Properties

Name Type Access Initial value Description


AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
IsNc BOOL Get FALSE NC functions are supported by
the assigned axis type.

Interfaces

Type Description
I_NcFunctions Standard interface on FB_NcFunctions
I_AttachableMdInterface Interface for containerless machine data components

TF85xx Version: 1.1.0 37


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.3.1.2.4 FB_TrafoFunctions

Implements specific functions for a transforming TF8560 axis.

Syntax:
FUNCTION_BLOCK FB_TrafoFunctions EXTENDS FB_Base

Properties

Name Type Access Initial value Description


AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
IsTrafo BOOL Get FALSE Transformer functions are
supported by the assigned
axis type.
LowerLimit LREAL Get, Set 0.0 Lower limit of the real
transformation
ParamList I_Parameter Get - Internal list for storing the
TableGenerator parameters in
the machine data
Table I_CammingLookUp Get - Interface to the instance of the
table
TableGenerator I_TrafoTableGenerator Get, Set NULL Interface to a TableGenerator
class to be assigned
UpperLimit LREAL Get, Set 0.0 Upper limit of the real
transformation

Methods

Name Description
AssignTableToAxis() Assigns the internal table to the axis instance (means activating the
transformation curve)
ConvDriveEndsToLoadEnds() Calculates the resulting software end positions of the load side using the
transformation table
CopyTableDriveEnds() Copies the start and end position of the TableGenerator class to the
software end positions of the drive axis.
FillDebugTable() Copies the contents of the internal table into a two-dimensional array
ParamListToTableGenerator() Copies the internal parameter list to the parameters of the
TableGenerator
TableGeneratorToParamList() Copies the parameters of the TableGenerator into the internal parameter
list

38 Version: 1.1.0 TF85xx


PLC-API - Class overview

Possible events

ID Description Alarm/Message
201 Calling the TableGenerator property without previous assignment Message

Interfaces

Type Description
I_TrafoFunctions Standard interface on FB_TrafoFunctions
I_AttachableMdInterface Interface for containerless machine data components

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.5)

5.3.2 FB_Axis

Represents the standard class for all axis objects based on TF8560 axes.

Syntax:
FUNCTION_BLOCK FB_Axis EXTENDS FB_Motion

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Axis
Axis I_AxisBase Get - Interface to the assigned
TF8560 axis.
Homing I_Homing [} 41] Get - Homing functions
1
BaseAxisInterfaces I_AxisBase Get NULL Alias of Axis.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific [} 35] Get - Technology-specific functions/
values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.

TF85xx Version: 1.1.0 39


PLC-API - Class overview

Name Type Access Initial value


Description
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>
1
Obsolete

Methods

Name Description
Reset() Resets the error state of the class.
FB_Axis
SetPosition(bCommand) Setting the axis position with the FB_AxisHmi.Setpoistion.
1
SetAxisRef() Assignment method for the TF8560 axis.
Alternative: .SetMotionRef().
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()
1
Obsolete

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm
10 Axis Errors Alarm
20 Axis command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Axis Standard interface on FB_Axis.
I_Motion Standard interface on FB_Motion

40 Version: 1.1.0 TF85xx


PLC-API - Class overview

Type Description
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.2.1 FB_Homing

The Homing class implements standard procedures for homing an axis.

Syntax:
FUNCTION_BLOCK FB_Homing EXTENDS FB_Base

Properties

Name Type Access Initial value Description


AbsoluteSwitch BOOL Set FALSE Input value of an absolute
position switch
AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
ExternalStates I_AdaptableSeqExt Get, Set NULL Interface to an object with
additional homing procedure
steps

Methods

Name Description
DoAbort() Cancels the currently active homing.
DoAbsSwitch() Starts axis homing against an absolute position switch.
DoAbsSwitchSequence() Starts a sequence of DoAbsSwitch() and DoFinish().
DoBlock() Starts homing against an end stop.
DoBlockDetect() Starts the position detection at an end stop.
DoBlockSequence() Starts a sequence of DoBlock(), DoBlockDetect() and DoFinish().
DoFinish() Starts the termination of homing.
DoSetZero() Sets the current position of the axis to 0

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
HomingStates() [} 42] State machine of the homing procedures

TF85xx Version: 1.1.0 41


PLC-API - Class overview

Event-driven methods (callback methods)

Name Description
ExtAdaptSeq() Dummy method() for use without "ExternalStates"

Possible events

ID Description Alarm/Message
4000 Homing not allowed Alarm
4001 Homing failed Alarm
4002 Save homing was successful Message
4003 Save homing was not successful Message

Interfaces

Type Description
I_Homing Standard interface on FB_Homing
I_AttachableMdInterface Interface for containerless machine data components
I_AdaptableSeqExt Interface for providing external homing procedures

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.3.2.1.1 HomingStates()
Instance type Instance Name
Master fbHomingStates
Slaves aBaseSeqMembers[E_HomingState.eLength]

42 Version: 1.1.0 TF85xx


PLC-API - Class overview

State diagram:

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.3.3 FB_PtpMotion

Implements a segment logic for PTP-based movements. The TF8550 Control Arrow Motion Graph is
supported via the FB_PtpMotionHmi class.

Syntax:
FUNCTION_BLOCK FB_PtpMotion EXTENDS FB_Axis

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_PtpMotion
ClampOnlyLastSeg BOOL Get, Set TRUE Clamping is only possible in
the last segment.
PtpMoveFinished BOOL Get FALSE The PTP movement was
executed successfully.
StackSegmentCount BOOL Get, Set TRUE Aborted segments are taken
into account in the subsequent
command.

TF85xx Version: 1.1.0 43


PLC-API - Class overview

Name Type Access Initial value Description


UseClamping BOOL Get, Set TRUE Commanded PTP movements
should use the set clamping.
UseManualSpeed BOOL Get, Set FALSE Commanded PTP movements
should be executed at manual
speed.
FixedMoveDirection1 BOOL Get, Set TRUE Fixes the direction of
movement for cluster 1
(negative) and 2 (positive).
Alternatively:
FB_PtpMotionHmi.AxisMove.M
oves[].Direction [} 48]
PtpMoveStopDone1 BOOL Get FALSE The PTP movement was
successfully stopped.
FB_Axis
Axis I_AxisBase Get - Interface to the assigned
TF8560 axis.
Homing I_Homing [} 41] Get - Homing functions
1
BaseAxisInterfaces I_AxisBase Get NULL Alias of Axis.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific [} 35] Get - Technology-specific functions/
values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>
1
Obsolete

Methods

Name Description
Reset() Resets the error state of the class.
FB_PtpMotion
[PROTECTED] Forms the difference of two segment positions.
CmpSegPos(iSeg1, iSeg2)
ContinuePtp(bCommand) Continues a paused MovePtp() command.
MovePtp() [} 46] Starts/stops a PTP movement with the parameterization from the HMI.
ResetPtp() Resets the saved progress of the MovePtp() command.
FB_Axis
SetPosition(bCommand) Setting the axis position with the FB_AxisHmi.Setpoistion.
1
SetAxisRef() Assignment method for the TF8560 axis.

44 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
Alternative: .SetMotionRef().
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()
1
Obsolete

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
PtpSeq() [} 46] Procedure for loading a PTP movement.

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm
200x PTP command error Message
10 Axis Errors Alarm
20 Axis command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_PtpMotion Standard interface on FB_PtpMotion.
I_Axis Standard interface on FB_Axis.
I_Motion Standard interface on FB_Motion
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

TF85xx Version: 1.1.0 45


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.3.1 PtpSeq()
Instance type Instance Name
Master fbPtpSeq
Slaves aBaseSeqMembers[E_PtpBaseSeq.eLength]

State diagram:

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.3.3.2 MovePtp()

Triggers the processing of the configured PTP segments.

Syntax:
METHOD MovePtp : HRESULT
VAR_INPUT
bCommand: BOOL; // TRUE to start move, FALSE to abort running move or rewind old command
MoveIdx: INT; // Selected cluster of segments (By default: Cluster 1 -
negative direction / Cluster 2 - positive direction)
SegmentCount: INT; // Segments to move (0 to move all segments)
END_VAR

Inputs

Name Type Description


bCommand BOOL TRUE to trigger a movement,
FALSE to cancel a current movement or to cancel a
pending command.
MoveIdx INT Selected cluster (grouped PTP segments).

46 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Description


In the default initialization, cluster 1 comprises the
movements in the negative direction and cluster 2
those in the positive direction.
SegmentCount INT Number of segments to be driven. A 0 ensures that all
segments of a cluster are driven.

Outputs

Name Type Description


MovePtp HRESULT Return value with feedback on the success of the
execution.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.5)

5.3.4 FB_PtpMotionHmi

HMI parallel class of FB_PtpMotion class.

Syntax:
FUNCTION_BLOCK FB_PtpMotionHmi EXTENDS FB_AxisHmi

Properties

Name Type Access Initial value Description


ActiveMove INT Get, Set 0 Index of the active cluster.
ActiveSegment INT Get, Set 0 Index of the active segment.
AxisMove REFERENCE Get - Motion configuration object.
TO
FB_AxisMoveH
mi [} 48]
EnableRecipe BOOL Get, Set FALSE Enables recipe handling via I_Recipe
[} 99].

Interfaces

Type Description
I_PtpMotionHmi Standard interface on FB_PtpMotionHmi.
I_Recipe Interface for managing structured recipe values.

TF85xx Version: 1.1.0 47


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.4.1 FB_AxisMoveHmi

Combines all Move Clusters.

Syntax:
FUNCTION_BLOCK FB_AxisMoveHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Moves [} 48] REFERENCE Get - Move Cluster
TO ARRAY[]
OF
FB_MoveCfg
Hmi

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.3.4.1.1 FB_MoveCfgHmi

Summarizes the information of a Move Cluster.

Syntax:
FUNCTION_BLOCK FB_MoveCfgHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Cams [} 49] REFERENCE Get - Cluster cams.
TO ARRAY[]
OF
FB_CamCfgH
mi
ClampingPoint LREAL Get, Set 0.0 Position from which clamping starts.
ClampingVelocity LREAL Get, Set 0.0 Pre-controlled velocity at which the
clamping is performed.

48 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


Direction INT Get, Set 0 Intended direction of the cluster:
• > 0 – Positive direction
• = 0 – Undefined direction
• < 0 – Negative direction
EndFunction INT Get, Set 0 ID of the Move Cluster start function.
InUse BOOL Get, Set FALSE Cluster is used.
ManualVelocity LREAL Get, Set 0.0 Manual velocity of the cluster.
Segments [} 50] REFERENCE Get - Segments of the cluster.
TO ARRAY[]
OF
FB_SegCfgH
mi
StartFunction INT Get, Set 0 ID of the Move Cluster end function.
ClampingDistance1 LREAL Get, Set 0.0 Position from which clamping starts.
1
Obsolete (alternatively .ClampingPoint)

Methods

Name Description
GetLastSegInUse() Returns the last segment whose .InUse property is = TRUE.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.1)

5.3.4.1.1.1 FB_CamCfgHmi

Summarizes the information of a cam.

Syntax:
FUNCTION_BLOCK FB_CamCfgHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


CamActive BOOL Get, Set FALSE Cam is active.
Hysteresis LREAL Get, Set 0.0 Threshold width.
Threshold LREAL Get, Set 0.0 Threshold value

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

TF85xx Version: 1.1.0 49


PLC-API - Class overview

5.3.4.1.1.2 FB_SegCfgHmi

Summarizes the information of a segment.

Syntax:
FUNCTION_BLOCK FB_SegCfgHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Acceleration LREAL Get, Set 0.0 Acceleration of the segment.
Decelration LREAL Get, Set 0.0 Deceleration of the segment.
IgnoreOnce BOOL Get, Set FALSE Ignores the segment once (at the next
command).
InUse BOOL Get, Set FALSE Segment is used.
Jerk LREAL Get, Set 0.0 Jerk of the segment.
Limiting LREAL Get, Set 0.0 Pressure/torque limitation of the segment.
Position LREAL Get, Set 0.0 Target position of the segment.
SegFunction INT Get, Set 0 ID of the segment function.
Velocity LREAL Get, Set 0.0 Velocity of the segment.

Methods

Name Description
GetPtpLookup() Returns the segment as a variable of type ST_LookUpPtpPoint.

Interfaces

Name Description
I_SegCfgHmi Standard interface on FB_SegCfgHmi.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.3.5 FB_BaseCammingHmi

Extends the FB_AxisHmi class for camming based axes with the necessary interface to the TF8550
CurveEditor.

Syntax:
FUNCTION_BLOCK FB_BaseCammingHmi EXTENDS FB_AxisHmi

50 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description


ActivateCurve BOOL Get, Set FALSE Command of the HMI to take over the cam
plate on control level
CurrentIndex UDINT Get 0 Indicates the current index of the cam plate
where the drive position is located.

Methods

Name Description
GetActPoint() Returns an actual value of the displayed curve.
GetSetPoint() Returns a setpoint of the displayed curve.
SetActPoint() Sets an actual value of the displayed curve.
SetSetPoint() Sets a setpoint of the displayed curve.

Interfaces

Type Description
I_BaseCammingHmi Standard interface on FB_BaseCammingHmi

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.3.6 FB_Extruder

Inherits from the FB_Axis class and implements further functions for a continuous movement of an extruder.

Syntax:
FUNCTION_BLOCK FB_Extruder EXTENDS FB_Axis

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Extruder
GuidingValue LREAL Get 0.0 Contains the current turn rate
for a master/slave connection
of two FB_Extruder objects.
MasterExtruder I_Extruder Get, Set NULL Used to assign a master
extruder.
FB_Axis
Axis I_AxisBase Get - Interface to the assigned
TF8560 axis.
Homing I_Homing [} 41] Get - Homing functions

TF85xx Version: 1.1.0 51


PLC-API - Class overview

Name Type Access Initial value Description


BaseAxisInterfaces1 I_AxisBase Get NULL Alias of Axis.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific [} 35] Get - Technology-specific functions/
values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>
1
Obsolete

Methods

Name Description
Reset() Resets the error state of the class.
FB_Extruder
DoBasicRpm(bExecute) Starts a rotary motion with the base speed set in the HMI.
DoNominalRpm(bExecute) Starts a rotary motion at the production speed set in the HMI.
DoTurnrateDown(bExecute) Reduces the speed (continuously).
DoTurnrateUp(bExecute) Increases the speed (continuously).
FB_Axis
SetPosition(bCommand) Setting the axis position with the FB_AxisHmi.Setpoistion.
1
SetAxisRef() Assignment method for the TF8560 axis.
Alternative: .SetMotionRef().
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.

52 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()
1
Obsolete

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
PowerStates() [} 53] Procedure for executing the continuous rotary motion

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm
100x Axis switch on/off failed. Message
5000 Start of constant feed (VelocityFeed) failed. Message
10 Axis Errors Alarm
20 Axis command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Extruder Standard interface on FB_Extruder.
I_Axis Standard interface on FB_Axis.
I_Motion Standard interface on FB_Motion
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.3.6.1 PowerStates()
Instance type Instance Name
Master fbPowerStates
Slaves aSeqBaseMembers[E_ExtruderPowerStates.eLength]

TF85xx Version: 1.1.0 53


PLC-API - Class overview

State diagram:

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.3.7 FB_Clamp

Implements specific functions for a clamping unit.


• Adds a closing segment to the PTP movement, which is permanently parameterized in the machine
data.

Syntax:
FUNCTION_BLOCK FB_Clamp EXTENDS FB_PtpMotion

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Clamp
LockingAvailable BOOL Get FALSE Locking of the clamping unit is
available.

DisableLockSegment1 BOOL Get, Set FALSE Disables the use of the locking
point segment for NC clamp
axes.
Alternative: .UseClamping
= FALSE
FB_PtpMotion
ClampOnlyLastSeg BOOL Get, Set TRUE Clamping is only possible in
the last segment.
PtpMoveFinished BOOL Get FALSE The PTP movement was
executed successfully.
StackSegmentCount BOOL Get, Set TRUE Aborted segments are taken
into account in the subsequent
command.
UseClamping BOOL Get, Set TRUE Commanded PTP movements
should use the set clamping.

54 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


UseManualSpeed BOOL Get, Set FALSE Commanded PTP movements
should be executed at manual
speed.
FixedMoveDirection1 BOOL Get, Set TRUE Fixes the direction of
movement for cluster 1
(negative) and 2 (positive).
Alternatively:
FB_PtpMotionHmi.AxisMove.M
oves[].Direction [} 48]
PtpMoveStopDone1 BOOL Get FALSE The PTP movement was
successfully stopped.
FB_Axis
Axis I_AxisBase Get - Interface to the assigned
TF8560 axis.
Homing I_Homing [} 41] Get - Homing functions
1
BaseAxisInterfaces I_AxisBase Get NULL Alias of Axis.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific [} 35] Get - Technology-specific functions/
values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>
1
Obsolete

Methods

Name Description
Reset() Resets the error state of the class.
FB_PtpMotion
[PROTECTED] Forms the difference of two segment positions.
CmpSegPos(iSeg1, iSeg2)
ContinuePtp(bCommand) Continues a paused MovePtp() command.
MovePtp() [} 46] Starts/stops a PTP movement with the parameterization from the HMI.
ResetPtp() Resets the saved progress of the MovePtp() command.
FB_Axis
SetPosition(bCommand) Setting the axis position with the FB_AxisHmi.Setpoistion.
1
SetAxisRef() Assignment method for the TF8560 axis.
Alternative: .SetMotionRef().

TF85xx Version: 1.1.0 55


PLC-API - Class overview

Name Description
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
PtpSeq() [} 57] Procedure for loading a PTP movement (extended)

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm
200x PTP command error Message
10 Axis Errors Alarm
20 Axis command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Clamp Standard interface on FB_Clamp.
I_PtpMotion Standard interface on FB_PtpMotion.
I_Axis Standard interface on FB_Axis.
I_Motion Standard interface on FB_Motion
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

56 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.7.1 PtpSeq()
Clamp PTP variant only active with NC transformer axes
fbProvideLockSegment is only inserted when an NC transformer axis is used! For hydraulic
axes, the normal clamping of the FB_PtpMotion class is used.

Instance type Instance Name


Master fbPtpSeq
Slaves fbProvideLockSegment

State diagram:

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.3.8 FB_Carriage

Implements additional functions for the operation of a carriage movement (e.g. using a crank drive).

Syntax:
FUNCTION_BLOCK FB_Carriage EXTENDS FB_PtpMotion

TF85xx Version: 1.1.0 57


PLC-API - Class overview

Methods

Name Description
DynamicScaler() Scales the axis dynamics based on the velocity in relation to the
maximum velocity.
The methods are implemented as PRIVATE. The call in the cycle
method is activated via the properties of FB_CarriageHmi.
SmoothStart() Enables startup with reduced dynamics in the range outside the end
positions.
The methods are implemented as PRIVATE. The call in the cycle
method is activated via the properties of FB_CarriageHmi.

Interfaces

Type Description
I_Carriage Standard interface on FB_Carriage

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.4 ManualFunction - Manual functions

5.4.1 FB_ManualFunctionHmi

The class is used to connect to a TF8550 ManualOperation control.

Syntax:
FUNCTION_BLOCK FB_ManualFunctionHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_ManualFunctionHmi
Cmd I_ManualFunctionCmd Get - Commands from the HMI.
Hmi [} 60]
DoSelect BOOL Get, Set FALSE Manual function should be
selected for the central
operating function.
IsSelectable BOOL Get, Set FALSE The central operating function
can be selected to take over
control.
IsSelected BOOL Get, Set FALSE The central operating function
is connected and controls this
manual function.

58 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


SelectCmd T_ManualSelectCmd Get, Set 0x0 Command of the central
[} 61] operating function.
SelectState T_ManualSelectState Get, Set 0x0 State of the central operating
[} 62] function.
SelectSupported BOOL Get, Set FALSE A central operating function is
available for this manual
function.
State I_ManualFunctionState Get - Feedback signals to the HMI.
Hmi [} 60]
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Central operating function


The "Central operating function" provides for the use of an incremental encoder to operate the
manual function. This is available, for example, in the class for the Beckhoff BlowMolding Panel PC
(FB_CP22xx-1025 [} 162]). Use with another input device is also conceivable, but must be
implemented in the project on a user-defined basis.

Local HMI variables

Name Data type Description


fbCmd FB_ManualFunctionCmdH Commands from the HMI.
mi [} 60]
fbState FB_ManualFunctionState Feedback signals to the HMI.
Hmi [} 60]

Methods

Name Description
Reset() Resets the error state of the class.
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

TF85xx Version: 1.1.0 59


PLC-API - Class overview

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ManualFunctionHmi Standard interface on FB_ManualFunctionHmi.
I_BaseHmi Standard interface on FB_BaseHmi.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.1.1 FB_ManualFunctionCmdHmi

Summarizes the commands of the HMI in FB_ManualFunctionHmi.

Syntax:
FUNCTION_BLOCK FB_ManualFunctionCmdHmi

Properties

Name Type Access Initial value Description


ToBasePos BOOL Get, Set FALSE Command to move to the
base position
ToWorkPos BOOL Get, Set FALSE Command for controlling the
working position

Interfaces

Type Description
I_ManualFunctionCmdHmi Standard interface on FB_ManualFunctionCmdHmi

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.4.1.2 FB_ManualFunctionStateHmi

Summarizes the feedback signals of the HMI in FB_ManualFunctionHmi.

60 Version: 1.1.0 TF85xx


PLC-API - Class overview

Internal functions:
• The MovingToXy properties set automatically when the respective signal of the
FB_ManualFunctionCmd [} 60] is set.

Syntax:
FUNCTION_BLOCK FB_ManualFunctionCmdHmi

Properties

Name Type Access Initial value Description


BaseState T_PlasticStatus [} 187] Get 0x00 Status of the base position.
EnableBasePos BOOL Get, Set FALSE Enables the base position
button.
EnableWorkPos BOOL Get, Set FALSE Enables the working position
button.
FaultBasePos BOOL Get, Set FALSE Indicates a fault in the base
position.
FaultWorkPos BOOL Get, Set FALSE Indicates a fault in the working
position.
InBasePos BOOL Get, Set FALSE Indicates that the base
position has been reached.
InWorkPos BOOL Get, Set FALSE Indicates that the working
position has been reached.
MovingToBasePos BOOL Get, Set FALSE Signals the mowing to the
base position.
MovingToWorkPos BOOL Get, Set FALSE Signals the moving to the
working position.
WorkState T_PlasticStatus [} 187] Get 0x00 Status of the working position.

Interfaces

Type Description
I_ManualFunctionStateHmi Standard interface on FB_ManualFunctionStateHmi.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.1.3 T_ManualSelectCmd
Command variable for the choice of a central operating function.

Syntax:
TYPE T_ManualSelectCmd : BYTE; END_TYPE

Values

bit Description
0 Selecting
1 Reserved

TF85xx Version: 1.1.0 61


PLC-API - Class overview

bit Description
2 Reserved
3 Reserved
4 Reserved
5 Reserved
6 Reserved
7 Reserved

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.1.4 T_ManualSelectState
Status variable for using a central operating function.

Syntax:
TYPE T_ManualSelectState : BYTE; END_TYPE

Values

bit Description
0 A central operating function is available.
1 The central operating function can be selected.
2 The central operating function is connected and controls this manual function.
3 Reserved
4 Reserved
5 Reserved
6 Reserved
7 Reserved

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.2 FB_Manual

Implements an abstract basis for standardized manual functions.

Class is abstract
Since the class is defined as ABSTRACT, the class cannot be instantiated and must be implemented
using inheritance.

62 Version: 1.1.0 TF85xx


PLC-API - Class overview

Internal functions:
• Provides triggers for the buttons in both directions

Syntax:
FUNCTION_BLOCK ABSTRACT FB_Manual EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Manual
Enable BOOL Get, Set FALSE Releases the manual function.
TrigCmdBasePos I_Trigger [} 184] Get - Trigger on the base position
command.
TrigCmdWorkPos I_Trigger [} 184] Get - Trigger on the working
position command.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ManualFunction Universal interface to a manual function.
I_ManualDev Extended interface to a manual function.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

TF85xx Version: 1.1.0 63


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.3 FB_ManualMotion

Implements an abstract basis for standardized manual motion functions.

Class is abstract
Since the class is defined as ABSTRACT, the class cannot be instantiated and must be implemented
using inheritance.

Internal functions:
• Signals the error state of a motion object.

Syntax:
FUNCTION_BLOCK ABSTRACT FB_ManualMotion EXTENDS FB_Manual

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Manual
Enable BOOL Get, Set FALSE Releases the manual function.
TrigCmdBasePos I_Trigger [} 184] Get - Trigger on the base position
command.
TrigCmdWorkPos I_Trigger [} 184] Get - Trigger on the working
position command.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.

64 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ManualFunction Universal interface to a manual function.
I_ManualDev Extended interface to a manual function.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.4 FB_ManualBaseWork

Implements a ready-made version of a manual function for controlling the end positions of a motion object.

Internal functions:
• Signals the active movement of a motion object.
• Signals that the end position of a motion object has been reached.

Syntax:
FUNCTION_BLOCK FB_ManualBaseWork EXTENDS FB_ManualMotion

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Manual
Enable BOOL Get, Set FALSE Releases the manual function.
TrigCmdBasePos I_Trigger [} 184] Get - Trigger on the base position
command.

TF85xx Version: 1.1.0 65


PLC-API - Class overview

Name Type Access Initial value Description


TrigCmdWorkPos I_Trigger [} 184] Get - Trigger on the working
position command.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_ManualBaseWork
Init(iMotion, Initializes the manual function with a motion object and the associated
iManualFunctionHmi) HMI.
SetWorkBasePos() [} 67] Configuration of the end positions to display the status.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ManualBaseWork Standard interface on FB_ManualBaseWork.
I_ManualFunction Universal interface to a manual function.
I_ManualDev Extended interface to a manual function.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

66 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.4.4.1 SetWorkBasePos()

Configures the end positions for indication in the TF8550 ManualOperation control.

Syntax:
METHOD SetWorkBasePos
VAR_INPUT
fWorkPos: LREAL; // Workpos to watch
fBasePos: LREAL; // Basepos to watch
fTolerance: LREAL; // > 0 for reacting on actuals with tolerance, = 0 for reacting on
setpoints
END_VAR

Inputs

Name Type Description


fWorkPos LREAL Target position of the working position.
fBasePos LREAL Target position of the base position.
fTolerance LREAL > 0 to indicate an active movement per actual position.
= 0 to indicate an active movement above the set position.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.5 FB_ManualPower

Implements a predefined version of a manual function for switching on the axis control.

Internal functions:
• Switches the power enable depending on the current Power.Status.
• Automatically gives both or the configured direction enables.

Syntax:
FUNCTION_BLOCK FB_ManualPower EXTENDS FB_ManualMotion

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Manual
Enable BOOL Get, Set FALSE Releases the manual function.

TF85xx Version: 1.1.0 67


PLC-API - Class overview

Name Type Access Initial value Description


TrigCmdBasePos I_Trigger [} 184] Get - Trigger on the base position
command.
TrigCmdWorkPos I_Trigger [} 184] Get - Trigger on the working
position command.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_ManualPower
Init(ipAxis, ipAxisHmi) Initializes the manual function with the interfaces of an axis.
SetFeedEnableUse() Configures the direction enable of the axis control.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ManualFunction Universal interface to a manual function.
I_ManualDev Extended interface to a manual function.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

68 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.4.6 FB_ManualTurnrate

Implements a standard limit and display for tactile manual functions to adjust the turn rate of an axis.

Internal functions:
• Forwards the signal of the pressed button.
• Limits the pressing of buttons to adjustable limits.

Syntax:
FUNCTION_BLOCK FB_ManualTurnrate EXTENDS FB_ManualMotion

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_ManualTurnrate
CmdFaster BOOL Get FALSE Passes the command of the
pressed button in the working
position.
CmdSlower BOOL Get FALSE Passes the command of the
pressed button in the base
position.
FB_Manual
Enable BOOL Get, Set FALSE Releases the manual function.
TrigCmdBasePos I_Trigger [} 184] Get - Trigger on the base position
command.
TrigCmdWorkPos I_Trigger [} 184] Get - Trigger on the working
position command.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_ManualTurnrate
Init(ipAxis, Initializes the manual function with the interface to an axis and the HMI.
ipManualFunctionHmi)
SetTurnrateLimits() Configures the minimum and maximum number of revolutions and the
use of the limit options.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.

TF85xx Version: 1.1.0 69


PLC-API - Class overview

Name Description
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ManualFunction Universal interface to a manual function.
I_ManualDev Extended interface to a manual function.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.7 FB_ManualWheel

Implements the handling of a central operating unit as incremental encoder of a Beckhoff BlowMolding
Panel, implemented as FB_CP22xx-1025 [} 162].

Syntax:
FUNCTION_BLOCK FB_ManualWheel EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_ManualWheel
Enable BOOL Get, Set FALSE Enables the manual function.
ExternalStates I_AdaptableSeqExt Get, Set NULL Interface to an object with the
[} 162] implementation of the control.
FB_Base

70 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value


Description
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_ManualWheel
AppendManual(iManual) Append a manual function for selection management.
Init(iWheel) Initialization with the wheel [} 166] of an FB_CP22xx-1025 [} 162].
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
States() [} 72] Procedure for selecting and changing the operation via the incremental
encoder

Event-driven methods (callback methods)

Name Description
ExtAdaptSeq() Dummy method() for the support of the interface I_AdaptableSeqExt
[} 162].

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_AdaptableSeqExt Interface for providing external implementation of the control.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

TF85xx Version: 1.1.0 71


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.4.7.1 States()
Instance type Instance Name
Master fbList
Slaves fbReady, fbIdle, ExternalStates

State diagram:

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.5 Temperature - TF8540 Temperature Interface

5.5.1 FB_Temperature

Main class of temperature control to manage all temperature channels and groups.

Internal functions:
• Handling of the TcPfw temperature control (TF8540)

72 Version: 1.1.0 TF85xx


PLC-API - Class overview

• Integrated data handling of grouping settings


• Management of individual sub-elements such as:
◦ Temperature groups
◦ Supply channels
◦ Scheduler

Syntax:
FUNCTION_BLOCK FB_Temperature EXTENDS FB_BaseMd

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Temperature
DisableAlarms BOOL Get, Set FALSE Suppresses alarms triggered
by errors of a temperature
channel.
DisableMessages BOOL Get, Set FALSE Suppresses debug messages
of the TF8540 library.
EnableCallback BOOL Get, Set TRUE Enables communication with
the I/O components.
EnableConfig BOOL Get, Set TRUE Enables the configuration of
all temperature channels.
EnableLooptest BOOL Get, Set FALSE Enables current monitoring of
all zones.
LibScopeVars REFERENCE TO Get - Access to an overview of
FB_Scope_TempCtrlV TF8540 live data.
ariables
Timer I_TempSchedule [} 91] Get NULL Access to the connected
scheduler.
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Temperature
Channels(x) Returns an interface to the xth temperature channel of TF8540.
CreateDefaultParams() [} 75] Creates a default parameterization for all temperature channels.
EnableAll() [} 76] Enables all temperature channels on the PLC side.
Groups(x) Returns an interface to the xth temperature group

TF85xx Version: 1.1.0 73


PLC-API - Class overview

Name Description
LinkGroup() [} 76] Assigns a linear arrangement of temperature channels to a group.
LinkSupply() [} 77] Assigns a group to a supply channel.
LinkZone() [} 78] Assigns a temperature channel to a group.
SetScheduler(iScheduler) Assigns a schedule to the temperature control.
StandbyAll() [} 78] Sets all temperature channels to standby.
Supply(x) Returns an interface to the xth supply unit.
SupplyLines(x) Returns an interface to the xth supply channel.
UnlinkGroup(x) Removes all temperature channels from the xth group.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Exceptions avoidance
The list access functions (e.g. Channels(x), Groups(x), etc...) return a pseudo variable if the
requested index is invalid. In addition, a message is thrown in the EventLogger.

Cycle methods

Name Description
Cyclic() Slow cycle method (default 25 ms)

Possible events

ID Description Alarm/Message
20x Invalid interface queried Message

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Temperature Standard interface on FB_Temperature.
I_TempTaskInterface Runtime interface for a slow PLC task.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

74 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.5.1.1 CreateDefaultParams()

Creates a default parameterization for all temperature channels

Syntax:
METHOD CreateDefaultParams : HRESULT
VAR_INPUT
bAllInUse: BOOL;
eSensor: E_TcPfw_TempSensType;
eTerminal: E_TcPfw_TerminalType;
nChPerTerm: INT;
eOutHeating: E_TcPfw_TctrlOutSelect;
eOutCooling: E_TcPfw_TctrlOutSelect;
fSetpoint: LREAL;
fStandbySetp: LREAL;
fPwmCycleTime: LREAL;
END_VAR

Inputs

Name Type Description Recommended standard


bAllInUse BOOL All channels are initialized as "InUse". TRUE
eSensor E_TcPfw_TempS Sensor type - NoSensor in simulation mode eTcPfwTempSensT_NoSensor
ensType
eTerminal E_TcPfwTerminal Terminal type - NoTerminal in simulation eTcPfwTermT_NoTerminal
Type mode
nChPerTer INT Number of channels per terminal 8
m
eOutHeatin E_TcPfw_TctrlOu Output type of the heating output - eTcPfwTcOut_PWM
g tSelect NoSignal, to disable the heating function
(e.g. for measuring zones)
eOutCoolin E_TcPfw_TctrlOu Cooling output type eTcPfwTcOut_NoSignal
g tSelect
fSetpoint LREAL Temperature setpoint for all channels 180.0
fStandbySet LREAL Temperature setpoint for standby 18.0
p temperature of all channels
fPwmCycle LREAL PWM cycle time for all outputs (dutyCycle = 1.0
Time fPwmCycleTime * 0.1)

Outputs

Name Type Description


CreateDefaultParams HRESULT Return value with feedback on the success of the execution

TF85xx Version: 1.1.0 75


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.1.2 EnableAll()

Enables all temperature channels on the PLC side.

Syntax:
METHOD EnableAll
VAR_INPUT
bCmd: BOOL;
bGroups: BOOL;
END_VAR

Inputs

Name Type Description


bCmd BOOL TRUE to grant the release, FALSE to withdraw the release.
bGroups BOOL The enable only takes into account channels that are
assigned to a group.

Outputs

Name Type Description


EnableAll HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.1.3 LinkGroup()

Assigns a number of temperature channels to a group.

Syntax:
METHOD LinkGroup : HRESULT
VAR_INPUT
nStartIdx: INT;
nEndIdx: INT;
nGroupIdx: INT;
bOverwrite: BOOL;
END_VAR

76 Version: 1.1.0 TF85xx


PLC-API - Class overview

Inputs

Name Type Description


nStartIdx INT Index of the first channel to be assigned
nEndIdx INT Index of the last channel to be assigned
nGroupIdx INT Index of the group to which the channels are to be
assigned
bOverwrite1 BOOL Zones are assigned even if the group contains already
assigned zones.
1
Obsolete and will be ignored

Outputs

Name Type Description


LinkGroup HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.1.4 LinkSupply()

Assigns a supply unit to a group.

Syntax:
METHOD LinkSupply : HRESULT
VAR_INPUT
nGroupIdx: INT;
nSupplyIdx: INT;
nLine: INT;
END_VAR

Inputs

Name Type Description


nGroupIdx INT Index of the group to which a supply unit is to be assigned
nSupplyIdx INT Index of the supply unit to be assigned to the group
nLine INT Supply channel to which the group members are connected
• 1; 2; 3 - phase L1, L2 or L3
• 4 – Between phases without connection to N

Outputs

Name Type Description


LinkSupply HRESULT Return value with feedback on the success of the execution

TF85xx Version: 1.1.0 77


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.1.5 LinkZone()

Assigns a single temperature channel (zone) to a group.

Syntax:
METHOD LinkZone : HRESULT
VAR_INPUT
nLinearIdx: INT;
nGroupIdx: INT;
nGroupMemberIdx: INT;
bOverwrite: BOOL;
END_VAR

Inputs

Name Type Description


nLinearIdx INT Index of the channel to be assigned
nGroupIdx INT Index of the group to which the channel is to be assigned
nGroupMemberIdx1 INT Index in the target group
bOverwrite BOOL Zone is assigned even if the index is already occupied in
the target group.
1
Obsolete, will be ignored

Outputs

Name Type Description


LinkZone HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.1.6 StandbyAll()

Sets all temperature channels to standby temperature.

78 Version: 1.1.0 TF85xx


PLC-API - Class overview

Syntax:
METHOD StandbyAll : HRESULT
VAR_INPUT
bCmd: BOOL;
bGroups: BOOL;
END_VAR

Inputs

Name Type Description


bCmd BOOL TRUE to enable the standby temperature, FALSE to
disable.
bGroups BOOL The function only considers channels that are assigned to a
group.

Outputs

Name Type Description


StandbyAll HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.2 FB_TemperatureHmi

HMI parallel class to the FB_Temperature.

Syntax:
FUNCTION_BLOCK FB_TemperatureHmi EXTENDS FB_BaseMdHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_TemperatureHmi
AlarmAbsoluteHigh BOOL Get FALSE A channel (InUse = TRUE)
has exceeded the absolute
temperature maximum.
AlarmAbsoluteLow BOOL Get FALSE One channel (InUse = TRUE)
has fallen below the absolute
temperature minimum.
AlarmHighHigh BOOL Get FALSE At least one channel with
active control has exceeded
the HighHigh tolerance.
AlarmHigh BOOL Get FALSE At least one channel with
active control has exceeded
the High tolerance.

TF85xx Version: 1.1.0 79


PLC-API - Class overview

Name Type Access Initial value Description


AlarmLow BOOL Get FALSE At least one channel with
active control has fallen below
the Low tolerance.
AlarmLowLow BOOL Get FALSE At least one channel with
active control has fallen below
the LowLow tolerance.
CountPfwChannels LREAL Get 20.0 Number of available TF8540
temperature channels.
EnableRecipe BOOL Get, Set TRUE Enables recipe handling via
I_Recipe [} 98].
TempAmbient LREAL Get, Set 18.0 Standard ambient temperature
(for simulation).
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Local HMI variables

Name Data type Description


fbParamHandle FB_MdHandleHmi Handling interface for loading and saving machine
data.
aChannels ARRAY [] OF Array to the temperature channels.
FB_TempChannelHmi
[} 89]
aGroups ARRAY [] OF Array to the groups.
FB_TemperatureGroupH
mi [} 85]
aRecipe ARRAY [] OF Array of the recipe values of all temperature channels.
FB_TempRecipe [} 98]
fbParamTempChannel ARRAY [] OF Array to the machine data of a temperature channel.
FB_MdTempChannelHmi
Only intended for use with the FillParamTable
function.
fbParamTempSupply ARRAY [] OF Array to the machine data of a temperature supply
FB_MdTempSupplyHmi channel.
Only intended for use with the FillParamTable
function.

Methods

Name Description
Reset() Resets the error state of the class.
FB_TemperatureHmi
Groups(x) Returns an interface to the xth temperature group (HMI class).
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.
FB_Base

80 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Exceptions avoidance
The list access functions (e.g. Channels(x), Groups(x), etc...) return a pseudo variable if the
requested index is invalid. In addition, a message is thrown in the EventLogger.

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_TemperatureHmi Standard interface on FB_TemperatureHmi.
I_Recipe Interface for managing structured recipe values.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.5.3 FB_TemperatureGroup

Class for group control of the temperature channels.

Syntax:
FUNCTION_BLOCK FB_TemperatureGroup EXTENDS FB_BaseMd

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_TemperatureGroup
AlarmAbsoluteHigh BOOL Get FALSE Group (at least one channel)
has exceeded the absolute
maximum temperature.
AlarmAbsoluteLow BOOL Get FALSE Group (at least one channel)
has fallen below the absolute
temperature minimum.

TF85xx Version: 1.1.0 81


PLC-API - Class overview

Name Type Access Initial value Description


AlarmHighHigh BOOL Get FALSE Group (at least one channel)
has exceeded the HighHigh
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmHigh BOOL Get FALSE Group (at least one channel)
has exceeded the High
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmLow BOOL Get FALSE Group (at least one channel)
has fallen below the Low
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmLowLow BOOL Get FALSE Group (at least one channel)
has fallen below the LowLow
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmNoResponse BOOL Get FALSE Temperature value of the
group (at least one channel)
does not respond to the
control.
AttachableMdInterface I_MdComponent Get - Interface to the machine data
component.
ConfigHash T_SHA256 [} 94] Get 0x0 Hash value of the current
group configuration.
ConfigID UINT Get 0 ID of the group configuration
(incremental).
EnableConfigConfirmati BOOL Get FALSE Confirmation is required to
on load a new configuration.
EnableLimitAlarms BOOL Get, Set FALSE Exceeding a tolerance value/
limit triggers an alarm.
Fault BOOL Get FALSE Group (at least one channel)
has an error.
Index INT Get 0 Index (ID) of the group.
IsActive BOOL Get FALSE Group (at least one channel)
is actively controlled.
IsEnabled BOOL Get FALSE All channels of the group are
enabled.
IsStandby BOOL Get FALSE All channels of the group are
in standby mode.
LoadHash T_SHA256 [} 94] Get 0x0 Hash value of the last
configuration loaded from a
file.
ZonesCount INT Get 0 Number of zones in the group.
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.

82 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_TemperatureGroup
EnablePLC(bCmd) Enables all zones of the group on the PLC side.
Force(bHeating, bCooling) Forces all zones of the group to heating/cooling 100%.
UpdateGroup() Updates the internal listing of the assigned groups.
Zones(x) Returns an interface to the xth zone [} 87] of the group.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Exceptions avoidance
The list access functions (e.g. Channels(x), Groups(x), etc...) return a pseudo variable if the
requested index is invalid. In addition, a message is thrown in the EventLogger.

Procedure controlling methods (FB_AdaptableSequence [} 157])

Type Description
GroupStates() [} 84] Procedure for loading, executing and saving tuning.

Possible events

ID Description Alarm/Message
20x Invalid interface queried Message
401x Temperature operation monitoring Alarm
402x Tuning parameters loading process Alarm + Message
403x Tuning parameters saving process Alarm + Message
404x File operation not available Alarm

TF85xx Version: 1.1.0 83


PLC-API - Class overview

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_TemperatureGroup Standard interface on FB_TemperatureGroup.
I_AttachableMdInterface Interface for containerless machine data components.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.5.3.1 GroupStates()
Instance type Instance Name
Master fbGroupStates
Slaves aBaseSeqMembers[E_GroupStates.eLength]

State diagram:

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

84 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.5.4 FB_TemperatureGroupHmi

HMI parallel class to the FB_TemperatureGroup class.

Syntax:
FUNCTION_BLOCK FB_TemperatureGroupHmi EXTENDS FB_BaseMdHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_TemperatureGroupHmi
AlarmAbsoluteHigh BOOL Get FALSE Group (at least one channel)
has exceeded the absolute
maximum temperature.
AlarmAbsoluteLow BOOL Get FALSE Group (at least one channel)
has fallen below the absolute
temperature minimum.
AlarmHighHigh BOOL Get FALSE Group (at least one channel)
has exceeded the HighHigh
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmHigh BOOL Get FALSE Group (at least one channel)
has exceeded the High
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmLow BOOL Get FALSE Group (at least one channel)
has fallen below the Low
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmLowLow BOOL Get FALSE Group (at least one channel)
has fallen below the LowLow
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmState T_PlasticStatus [} 187] Get 0 Alarm Status for display with a
TcHMI StateIndicator.
BootAsScheduled BOOL Get, Set FALSE The temperature group is to
start in the scheduled
operation mode.
ConfigConfirm BOOL Get, Set FALSE Confirm the configuration
found.
ConfigConfirmRequired BOOL Get, Set FALSE A configuration found requires
confirmation.

TF85xx Version: 1.1.0 85


PLC-API - Class overview

Name Type Access Initial valueDescription


ConfigHash T_SHA256 [} 94] Get 0x0 Hash value of the loaded
group configuration.
ConfigNote STRING(127) Get, Set ‘‘ Note on the loaded group
configuration.
ConfigReject BOOL Get, Set FALSE Reject the configuration found.
DoTune BOOL Get, Set FALSE Starts tuning of all active
zones of the group.
GroupName STRING Get, Set <SourcePath> Alias of the .Name property.
Index INT Get 0 Index (ID) of the group.
IsOff BOOL Get FALSE Group is switched off.
IsOn BOOL Get FALSE Group is switched on.
IsScheduled BOOL Get FALSE Group is in scheduled
operation mode.
IsStandby BOOL Get FALSE Group is in standby mode.
Name STRING Get, Set <SourcePath> Temperature group name.
SetOff BOOL Get, Set FALSE Switch off group.
SetOn BOOL Get, Set FALSE Switch on group.
SetScheduled BOOL Get, Set FALSE Set group to scheduled mode.
SetStandby BOOL Get, Set FALSE Set group to standby mode.
TuningActive BOOL Get FALSE The tuning of the group is
active.
TuningDone BOOL Get FALSE The tuning of the group is
completed.
TuningFailed BOOL Get FALSE The tuning of the group has
failed.
ZonesCount INT Get 0 Number of zones in the group.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_TemperatureGroupHmi
[INTERN] Queries whether a property to be saved persistently has been set (.Set).
_CollectRemainingSave()
[INTERN] UpdateState() Sets the active operation mode
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()

86 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_TemperatureGroupHmi Standard interface on FB_TemperatureGroupHmi.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.5.5 FB_TempChannelBase

Base class for a single temperature channel.

Syntax:
FUNCTION_BLOCK FB_TempChannelBase EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_TempChannelBase
Index INT Get, Set 0 References a
PlasticBaseApplication
channel to a TF8540 zone.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Class contains significantly more properties than listed


The properties of the FB_TempChannelBase class overlap with the TF8540 Global Variables
aaaPfwTempToHmi, aaaPfwTempMparamFromHmi, aaaPfwTempPparamFromHmi and
stPfwTempCtrl. For more information on overlapping features, it is recommended to use the TF8540
documentation.

TF85xx Version: 1.1.0 87


PLC-API - Class overview

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_TempZoneHmi Interface compatible with FB_TempZoneHMI.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.6 FB_TempChannel

Class for single control of a temperature channel.

Syntax:
FUNCTION_BLOCK FB_TempChannel EXTENDS FB_TempChannelBase

Properties

Name Type Access Initial valueDescription


AlarmNoResponse BOOL Get FALSE Temperature value of the
channel does not respond to
the control.
AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
ConfigID UINT Get, Set 0 ID of the active group
configuration
EnableLimitAlarms BOOL Get, Set FALSE Exceeding a tolerance value/
limit triggers an alarm.
Error BOOL Get FALSE Alias to 'Fault'
ExtruderID INT Get, Set 0 ID of the extruder used
Fault BOOL Get FALSE An error has occurred in this
temperature channel
GroupID INT Get, Set 0 ID of the assigned group
IsActive BOOL Get FALSE Channel is actively controlled
IsEnabled BOOL Get FALSE Channel is enabled
IsLinked BOOL Get FALSE Channel is assigned to a
group
IsStandby BOOL Get FALSE Channel is in standby mode
SupplyID INT Get 0 ID of the supply channel used
TuningLastExecution DATE_AND_TIME Get, Set DT#1900-01-0 Date of the last successful
1T00:00:00Z execution of a tuning
TuningRequired BOOL Get, Set TRUE The current configuration
requires autotuning

88 Version: 1.1.0 TF85xx


PLC-API - Class overview

Methods

Type Description
EnablePLC() Enables the temperature channel on the PLC side
Force() Forces the temperature channel to heating/cooling 100%.
Standby() Sets the temperature channel to standby

Possible events

ID Description Alarm/Message
400x Temperature operation monitoring Alarm

Interfaces

Type Description
I_TempChannel Standard interface on FB_TempChannel
I_AttachableMdInterface Interface for containerless machine data components
I_TempZone Compatible interface with FB_TempZone

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.7 FB_TempChannelHmi

HMI parallel class to the FB_TempChannel class

Syntax:
FUNCTION_BLOCK FB_TempChannelHmi EXTENDS FB_TempChannelBase

Properties

Name Type Access Initial value Description


GroupID INT Get, Set 0 ID of the assigned group

Interfaces

Type Description
I_TempChannelHmi Standard interface on FB_TempChannelHmi

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

TF85xx Version: 1.1.0 89


PLC-API - Class overview

5.5.8 FB_TempSupply

Implements a supply unit of temperature control

Syntax:
FUNCTION_BLOCK FB_TempSupply EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Index INT Get, Set 0 Supply unit index

Methods

Type Description
Line(x) Returns the xth supply channel of the supply group

Exceptions avoidance
The list access functions (e.g. Channels(x), Groups(x), etc...) return a pseudo variable if the
requested index is invalid. In addition, a message is thrown in the EventLogger.

Interfaces

Type Description
I_TempSupply Standard interface on FB_TempSupply

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.9 FB_TempSupplyLine

Implements a supply unit of temperature control

Syntax:
FUNCTION_BLOCK FB_TempSupplyLine EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


ActSupplyCurrent LREAL Get 0.0 Actual current of the channel
ActSupplyLoad LREAL Get 0.0 Actual output of the channel
AttachableMdInterface I_MdComponent Get - Interface to the machine data
component

90 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


CalcErrorCurrent LREAL Get 0.0 Calculated error current of the
channel
CalcSupplyLoad LREAL Get 0.0 Calculated output of the
channel
CalcSupplyMatch LREAL Get 0.0 Deviation of the calculated
and actual output of the
channel
Frequency LREAL Get 0.0 Channel frequency
PwmCycleTime LREAL Get, Set 0.0 Cycle time of the PWM signal
PwmFactorC INT Get, Set 0 Factor PWM cycle time from
cooling to heating
PwmMaxOnTime LREAL Get, Set 0.1 Maximum PWM switch-on
time
PwmMaxOnTimeC LREAL Get, Set 0.1 Maximum PWM switch-on
time of the cooling system
PwmMaxRampLoad LREAL Get, Set 0.0 Reserved
PwmMinOnTime LREAL Get, Set 0.0 Minimum PWM switch-on time
SupplyID INT Get, Set 0 ID of the channel

Interfaces

Type Description
I_TempSupplyLine Standard interface on FB_TempSupplyLine
I_AttachableMdInterface Interface for containerless machine data components

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.10 FB_TempSchedule

Class for the use of weekday timers in connection with temperature control

Syntax:
FUNCTION_BLOCK FB_TempSchedule EXTENDS FB_TimerWeekdayMaster

Methods

Type Description
MemberSchedule(x) Returns an interface to the first timer assigned to the group (member) x
MemberScheduledActive(x) Returns an interface to the first timer assigned to the group (member) x
and currently active

Exceptions avoidance
The member access functions return a dummy instance in the absence of an overlap with member
x.

TF85xx Version: 1.1.0 91


PLC-API - Class overview

Interfaces

Type Description
I_TempSchedule Standard interface on FB_TempSchedule
I_OneTaskInterface Runtime interface for a PLC task

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.11 FB_TempScheduleHmi

HMI parallel class to FB_TempSchedule class.

Syntax:
FUNCTION_BLOCK FB_TempScheduleHmi EXTENDS FB_BaseMdHmi

Properties

Name Type Access Initial value Description


Timer 1 REFERENCE TO Get - Interface to the individual
ARRAY[] OF dates of the schedule
FB_TimerWeekdayHmi
1
Obsolete

Methods

Type Description
Timers(x) Returns an interface to the xth timer

Exceptions avoidance
The list access functions (e.g. Channels(x), Groups(x), etc...) return a pseudo variable if the
requested index is invalid. In addition, a message is thrown in the EventLogger.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.12 FB_TimerTempHmi

Extension of FB_TimerWeekdayHmi with additional temperature-relevant attributes.

92 Version: 1.1.0 TF85xx


PLC-API - Class overview

Syntax:
FUNCTION_BLOCK FB_TimerTempHmi EXTENDS FB_TimerWeekdayHmi

Properties

Name Type Access Initial value Description


AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
MembersCount INT Get 0 Number of assigned members
(groups)
Standby BOOL Get, Set FALSE Timer is to be evaluated as
standby operation

Methods

Type Description
Clear() Empties the list of members (groups)
Exists(x) Checks whether member (group) x is assigned to the timer
Members() [} 93] Returns an interface to the member
Subscribe(x) Makes group x become a member of the timer

Interfaces

Type Description
I_TimerTempHmi Standard interface on FB_TimerTempHmi

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.12.1 Members()

Returns an interface to the idx member (group)

Syntax:
METHOD Members : I_TemperatureGroup
VAR_INPUT
idx: INT;
iTemp: I_Temperature;
END_VAR

Inputs

Name Type Description


Idx INT Index of the member in the list all members
iTemp I_Temperature Reference of the temperature control to determine the
temperature group instance

TF85xx Version: 1.1.0 93


PLC-API - Class overview

Outputs

Name Type Description


Members I_TemperatureGroup Requested temperature group

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.5.13 T_SHA256
Data type that can store a hash value of type SHA-256 (256 bits).

Syntax:
TYPE T_SHA256 : ARRAY[0..3] OF LWORD; END_TYPE

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.6 Recipe - recipe management


The recipe management of the TF8550 Recipe Helper is based on the implementation of the
FB_PlcStateToHmi [} 94] class and the implemented handshake procedure. For this purpose, the class is
already instantiated in the GVL HmiCommunication.
{attribute 'qualified_only'}
VAR_GLOBAL

// ==============================================
// communication PLC <> HMI

fbPlcStateToHmi: FB_PlcStateToHmi;

// ==============================================

END_VAR

5.6.1 FB_PlcStateToHmi

Implements the handshake procedure for the TF8550 recipe management on the PLC side.

Syntax:
FUNCTION_BLOCK FB_PlcStateToHmi EXTENDS FB_BaseHmi

94 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description PLC /


HMI1
AxesInitialised BOOL Get, Set FALSE Axes have been initialized, the PLC
recipe may be initialized.
ClientID UINT Get, Set 0 ID of the currently connected HMI
HMI client.
DataReqFailed BOOL Get, Set FALSE Errors in communication. The PLC
PLC is waiting for a reset.
DataRequestPlc BOOL Get, Set FALSE Requesting data during the PLC
start-up phase or a product
change.
DataRequestPlcActiveH BOOL Get, Set FALSE Writing recipe data to the PLC HMI
mi active.
DataRequestPlcQuitHm BOOL Get, Set FALSE Writing of recipe data to the HMI
i PLC completed.
DataValidPlc BOOL Get, Set FALSE The recipe data has been PLC
loaded completely.
LiveSignHMI UINT Get, Set 0 Changing value of the HMI HMI
client to signal an active
connection.
PlcInitialized BOOL Get, Set FALSE Alias to AxesInitialized. PLC
ProductChangeConfirm BOOL Get, Set FALSE The request to change the PLC
Plc product is accepted.
ProductChangeEnable BOOL Get, Set FALSE Signals the possibility to PLC
change the recipe to the HMI.
ProductRequestHmi BOOL Get, Set FALSE Requests of a product change. HMI
Reset BOOL Get, Set FALSE Request for reinitialization of HMI
the recipe.
SaveDataQuitPlc BOOL Get, Set FALSE Confirms the processing of a HMI
recipe storage.
SaveDataRequestPlc BOOL Get, Set FALSE Request to save the recipe. PLC
VersionBaseApplication STRING Get 'v0.0.0.0' Plastic Base Application PLC
version.
VersionPlasticFunctions STRING Get 'v0.0.0.0' Plastic Technology Functions PLC
version (TF8560).
1
The PLC/HMI column describes the assignment of the write access.

Methods

Name Description
DeclareBeta() Adds a beta label to the display version of the Plastic Base Application.

Interfaces

Type Description
I_RecipeState Interface for the handshake variables to be processed in the main
procedure.

TF85xx Version: 1.1.0 95


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.6.2 I_RecipeState
Interface to the PLC variables of the TF8550 Beckhoff.TwinCAT.HMI.Plastic.RecipeHelper class
FB_PlcStateToHmi

Syntax:
INTERFACE I_RecipeState EXTENDS I_BaseEmpty

Properties

Name Type Access Initial value Description


DataRequestPlc BOOL Get FALSE Requesting data during the start-up
phase or a product change.
DataValidPlc BOOL Get FALSE The recipe data has been loaded
completely.
PlcInitialized BOOL Get, Set FALSE Data has been initialized, the recipe may
be initialized.
ProductChangeEnable BOOL Get, Set FALSE Signals the possibility to change the
recipe to the HMI.
Reset BOOL Get, Set FALSE Request for reinitialization of the recipe

Methods

Name Description
DeclareBeta() Adds a beta label to the display version of the Plastic Base Application.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.6.3 FB_Recipe

Recipe management class for summarizing structured recipe values. These are used in integrated TcHMI
controls.

Class is abstract
Since the class is defined as ABSTRACT, the class cannot be instantiated and must be implemented
using inheritance.

Syntax:
FUNCTION_BLOCK ABSTRACT FB_Recipe EXTENDS FB_Base

96 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Recipe
EnableRecipe BOOL Get FALSE Enables the handling of this
recipe management class.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Recipe
Lock() Locks the recipe variables
• The next execution of .Update() writes the recipe values to the PLC.
• Can be called/executed from the HMI.
Reset() Resets the lock state.
Update() [ABSTRACT] Updates the recipe variables to the current PLC value.
• Can be called/executed from the HMI.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Recipe Standard interface on FB_Recipe.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

TF85xx Version: 1.1.0 97


PLC-API - Class overview

5.6.4 FB_TempRecipe

Recipe management class of temperature control.

Syntax:
FUNCTION_BLOCK FB_TempRecipe EXTENDS FB_Recipe

Local HMI variables

Name Data type Description


Setpoint LREAL Temperature set point
Standby LREAL Temperature standby setpoint
ThresholdM LREAL Negative inner tolerance
ThresholdMM LREAL Negative external tolerance
ThresholdP LREAL Positive inner tolerance
ThresholdPP LREAL Positive external tolerance

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Recipe
EnableRecipe BOOL Get FALSE Enables the handling of this
recipe management class.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_TempRecipe
Init(iChannel) Initialization with the interface to a temperature channel.
FB_Recipe
Lock() Locks the recipe variables
• The next execution of .Update() writes the recipe values to the PLC.
• Can be called/executed from the HMI.
Reset() Resets the lock state.
Update() [ABSTRACT] Updates the recipe variables to the current PLC value.
• Can be called/executed from the HMI.
FB_Base

98 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Recipe Standard interface on FB_Recipe.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.6.5 FB_MoveClusterRecipe

Recipe management class of a PTP axes.

Syntax:
FUNCTION_BLOCK FB_MoveClusterRecipe EXTENDS FB_Recipe

Local HMI variables

Name Data type Description


StartFunction INT ID of the start function of the cluster.
EndFunction INT ID of the end function of the cluster.
Segments ARRAY[] OF Array of segments of the cluster.
FB_MoveSegRecip
e [} 100]

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Recipe
EnableRecipe BOOL Get FALSE Enables the handling of this
recipe management class.
FB_Base

TF85xx Version: 1.1.0 99


PLC-API - Class overview

Name Type Access Initial value


Description
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_MoveClusterRecipe
Init(iCluster) Initialization with the interface on a cluster.
FB_Recipe
Lock() Locks the recipe variables
• The next execution of .Update() writes the recipe values to the PLC.
• Can be called/executed from the HMI.
Reset() Resets the lock state.
Update() [ABSTRACT] Updates the recipe variables to the current PLC value.
• Can be called/executed from the HMI.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Recipe Standard interface on FB_Recipe.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.6.5.1 FB_MoveSegRecipe

100 Version: 1.1.0 TF85xx


PLC-API - Class overview

Recipe management class of a PTP segment.

Syntax:
FUNCTION_BLOCK FB_MoveSegRecipe EXTENDS FB_Recipe

Local HMI variables

Name Data type Description


Acceleration LREAL Acceleration of the segment.
Deceleration LREAL Deceleration of the segment.
InUse BOOL Segment is used.
Jerk LREAL Jerk of the segment.
Limiting LREAL Limitation (torque/pressure) of the segment.
Position LREAL Target position of the segment.
Segfunction INT ID of the segment function.
Velocity LREAL Velocity of the segment.

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Recipe
EnableRecipe BOOL Get FALSE Enables the handling of this
recipe management class.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_MoveSegRecipe
Init(iSegment) Initialization with the interface to a segment.
FB_Recipe
Lock() Locks the recipe variables
• The next execution of .Update() writes the recipe values to the PLC.
• Can be called/executed from the HMI.
Reset() Resets the lock state.
Update() [ABSTRACT] Updates the recipe variables to the current PLC value.
• Can be called/executed from the HMI.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.

TF85xx Version: 1.1.0 101


PLC-API - Class overview

Name Description
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Recipe Standard interface on FB_Recipe.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.7 MachineData - Machine data


Base

The \MachineData\Base\ subfolder contains the base classes of the machine data handling.

Classes

Name Description
FB_MdBaseContainer [} 104] Represents the base container for machine data.
FB_MdBaseComponent Represents the base class for machine components.
[} 106]

Components

The \MachineData\Components\ subfolder contains all the machine data components that have already
been implemented. All included components inherit from the FB_MdBaseComponent class and have an
enumeration that defines the index (without offset) of the individual parameters.

Classes

Name Use Description


FB_MdFileInfo FB_MdBaseContainer [} 104] Contains the information of a saved file.
FB_MdActuator FB_ActuatorFunctions [} 36] Contains actuator-specific parameters.
FB_MdAnalogValue FB_Monitoring [} 130] Contains scaling parameters for analog
FB_Setpoints [} 132] values.
FB_Blowing [} 141]
FB_MdBlowpin FB_Blowpin [} 143] Contains blowpin-specific parameters.
FB_MdClamp FB_Clamp [} 54] Contains clamp-specific parameters.
FB_MdWtc FB_Wtc [} 148] Contains Wtc-specific parameters.

102 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Use Description


FB_MdWtcTimer FB_WtcTimer [} 151] Contains WtcTimer-specific parameters.
FB_MdAxis FB_Axis [} 39] Contains general axis parameters.
FB_MdContinuousMotion FB_Extruder [} 51] Contains parameters for axes with
continuous rotary motion.
FB_MdHoming FB_Homing [} 41] Contains setting parameters for homing
procedures.
FB_MdNc FB_NcFunctions [} 37] Contains NC-specific parameters.
FB_MdPtpMotion FB_PtpMotion [} 43] Contains parameters for PTP-based
motion.
FB_MdTrafo FB_TrafoFunctions [} 38] Contains parameters for transforming
axes.
FB_MdTempChannel FB_TempChannel [} 88] Contains parameters for a temperature
channel.
FB_MdTempGroup FB_TemperatureGroup [} 81] Contains data of the temperature group.
FB_MdTempGrouping FB_TemperatureGroup [} 81] Extends FB_MdTempChannel with a
read mode for reading the configuration
files.
FB_MdTempSupply FB_TempSupply [} 90] Contains parameters for a temperature
supply unit.
FB_MdTempTimer FB_TempTimer [} 92] Contains additional information for the
TimeSchedule of a temperature zone.
FB_MdTempZone FB_TempZone [} 317] Contains parameters of a TF8540
temperature zone.
Is the basis for FB_TempChannel.
FB_MdWeekdayTiming FB_TimerWeekdayHmi [} 136] Contains data about the TimeSchedule of
the Weekday Timer.

Create your own machine data components


The standard of TF8560 machine data applies for creating your own machine data components. A
new component must implement the abstract methods MdNextParameter() and
MdSetParameter() and set some internal variables. For this it is recommended to use the
existing classes as a template and to follow the instructions of the TF8560 documentation.

Hmi

In the \MachineData\Hmi\ subfolder, classes are defined that summarize the data stored per component for
the HMI.

Use is not recommended


The Md-HMI function blocks are only to be used for the automated creation of parameter pages in
the HMI. As these function blocks only provide reference access to other objects, it is
recommended to use the parameters directly at the source locations.
• The source location can be determined using the MdXyzParameter() methods of the
associated MD function block.
• Result sample: Instead of FB_MdAxisHmi.DriveReversed you use the axis interface
I_AxisBase.MotionParams.DriveReversed directly.

Subitems

The \MachineData\Subitems\ subfolder contains several classes, interfaces and enumerations that
contribute to the functionality of the machine data classes.

TF85xx Version: 1.1.0 103


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.7.1 FB_MdBaseContainer

The class extends the TF8560 FB_MdContainer by the machine data encoding of the TwinCAT 3 Plastic
Application. In addition, errors that occur can be evaluated using Boolean values and file storage is
simplified.

Syntax:
FUNCTION_BLOCK FB_MdBaseContainer EXTENDS FB_MdContainer

Properties

Name Type Access Initial value Description


Aborted BOOL Get FALSE The error that occurred was
caused by an abort
AllowFolderCreation BOOL Get, Set TRUE Allows the container to create
the folder structure for storing
the machine data.
CrcInvalid BOOL Get FALSE The error that occurred was
caused by an incorrect CRC
checksum.
Created I_Time [} 138] Get - Time of the first creation of a
file
Details I_MdBaseContainerDet Get THIS^ Summarizes the properties of
ails the file details.
ErrorDetails I_MdBaseContainerErr Get THIS^ Summarizes the properties of
ors the error information.
ErrorId UDINT Get 0 Error ID of the last occurred
error
FileAccessDenied BOOL Get FALSE The error that occurred was
caused by missing file access
rights.
FileNotfound BOOL Get FALSE The error that occurred was
caused by the absence of the
file.
IgnoreMissmatches BOOL Get, Set FALSE Forces the container to load a
file despite version collision.
LastStored I_Time [} 138] Get - Time of the last storage
process
MissmatchBaseApp BOOL Get FALSE The version conflict that has
occurred is in the versions of
the TwinCAT Base Application
library.
MissmatchDetected BOOL Get FALSE The error that occurred was
caused by a version conflict.

104 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial valueDescription


MissmatchIdxFormat BOOL Get FALSE The version of the index
coding causes the version
conflict that occurred.
StoreCount UDINT Get 0 Counts the iterations of file
write operations since the file
was created.
UnknownParameter BOOL Get FALSE The occurred error was
caused by an unknown
parameter in the file.
VersionBaseApp I_LibVersion [} 173] Get - Version of the Plastic Base
Application library
VersionBaseAppLoaded I_LibVersion [} 173] Get - Version of the Plastic Base
Application library from the
loaded file
VersionIdxFormat I_IdxFormatVersion Get - Index coding version
CreationDate1 DATE_AND_TIME Get DT#1970-1-1- Date of the first creation of a
0:0:0 file
Alternatively: Created.DnT
StoreDate1 DATE_AND_TIME Get DT#1970-1-1- Date of the last saving
0:0:0 process
Alternatively:
LastStored.DnT
1
obsolete

Methods

Name Description
AbortLoading() Cancels the loading process of a file
AbortSaving() Cancels the saving process of a file
AddComponent(iNew) Adds another component to the container.
[INTERN] CompareFileVersion() Compares the passed versions with the defined version in the source
code.
CreateFilepath(sNamespace) Creates a new file path based on the container name
[INTERN] OverwriteFromFile() Used by the FB_MdFileInfo class to update the loaded version in the
container.

Interfaces

Type Description
I_MdBaseContainer Standard interface on FB_MdBaseContainer
I_MdBaseContainerDev Extended interface with access to the methods marked as "[INTERN]"
I_MdBaseContainerDetails Interface to the properties with file-related information (e.g.
CreationDate)
I_MdBaseContainerErrors Interface to the properties with error information

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

TF85xx Version: 1.1.0 105


PLC-API - Class overview

5.7.2 FB_MdBaseComponent

The class extends the standard component FB_MdComponent of the TF8560 utilities by functions of the
index coding of the Plastic Base Application.

Syntax:
FUNCTION_BLOCK FB_MdBaseComponent EXTENDS FB_MdComponent

Properties

Name Type Access Initial value Description


LinkedContainer I_MdBaseContainer Get NULL Points to the container to
which the component was
appended.

Methods

Name Description
ConfigCompType() Used with inheriting classes to initialize the encoding offset to
E_StandardCompType.
ConfigCompTypeEx() Used with the inheriting class to initialize the encoding offset.

Both methods are declared as PROTECTED and can only be used within the class.

Interfaces

Type Description
I_MdBaseComponent Standard interface on FB_MdBaseComponent

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.7.3 FB_MdCollection

The class can store a collection of components of a class type. When attaching the class to
FB_BaseRuntime, components of objects implementing the interface I_AttachableMdInterface can
be collected and attached to the collection.

Syntax:
FUNCTION_BLOCK FB_MdCollection EXTENDS FB_Base

106 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description


MachineData I_MdBaseContainer Get - Interface to the internal
machine data container

Methods

Name Description
AddComponent() Adds a component to the collection:
• Automatically increments .ComponentIndex of the attached
components
• Refuses components that do not match the prototype
CheckType() [PROTECTED] Returns an ID used among the supported types
SetPrototype() Fixes the type of the component to be collected by the runtime

Interfaces

Type Description
I_MdCollection Standard interface on FB_MdCollection
I_OneTaskInterface Runtime interface for a PLC task

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.8 OperationData - Production data and statistics

5.8.1 FB_ProductionCounter

Implements a general counter for production-dependent data such as a piece counter or a production time
counter.

Syntax:
FUNCTION_BLOCK FB_ProductionCounter EXTENDS FB_BaseMd

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_ProductionCounter
SavingInterval LREAL Get, Set 10.0 [min] Interval for saving the counter
value in a machine data file.
SinceLastReset I_ProductionDataComp Get - Counter value since the last
onent [} 109] execution of the Reset()
method.

TF85xx Version: 1.1.0 107


PLC-API - Class overview

Name Type Access Initial value Description


SinceProducing I_ProductionDataComp Get - Counter value since the start
onent [} 109] of the current counting
process.
SinceStart I_ProductionDataComp Get - Counter value since machine
onent [} 109] start.
Total I_ProductionDataComp Get - Counter value since the
onent [} 109] beginning of the machine
production time.
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_ProductionCounter
NewPart(bCLK) Logs a new part for the part counter.
Producing(bIsProducing) Indicates that production is actively running.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms)

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ProductionCounter Standard interface on FB_ProductionCounter.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.

108 Version: 1.1.0 TF85xx


PLC-API - Class overview

Type Description
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.8.1.1 FB_ProductionCounterComponent

Contains the counter data for a defined period.

Syntax:
FUNCTION_BLOCK FB_ProductionDataComponent EXTENDS FB_MdBaseComponent

Properties

Name Type Access Initial value Description


OperationTime LREAL Get, Set 0.0 Production time
Parts ULINT Get, Set 0 Number of items
PartsPerHour LREAL Get, Set 0 Parts per hour.
TimePerCycle LREAL Get, Set 0.0 Production cycle time
ComponentType USINT Get 0 Type of component as
identifier.
Connected BOOL Get FALSE Component is connected with
its access dependencies.

Methods

Name Description
Connect() Connects references to the class.

Event-driven methods (callback methods)

Name Description
MdNextParameter() Container call to save the parameters to a file.
MdSetParameter() Container call to load the parameters into the runtime.

Interfaces

Type Description
I_ProductionCounterComponent Standard interface on FB_ProductionCounterComponent.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

TF85xx Version: 1.1.0 109


PLC-API - Class overview

5.8.2 FB_EnergyMeasurement

Implements the measurement of a power measurement terminal over time. This allows the machine's energy
consumption to be analyzed.

Internal functions:
• Calculates the energy used over several time periods
• Saves "energy meter readings" persistently in a machine data file
• Logs the hourly meter readings in a CSV file

Syntax:
FUNCTION_BLOCK FB_EnergyMeasurement EXTENDS FB_BaseMd

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_EnergyMeasurement
Custom I_EnergyCalcQuery Get - Energy meter reading since
[} 112] the last execution of the reset
option
MaxMemory LREAL Get, Set 0.05 [MB] Storage limitation for the
hourly stored energy meter
reading
PerDay I_EnergyCalcQuery Get - Energy meter reading of the
[} 112] day
PerHour I_EnergyCalcQuery Get - Energy meter reading of the
[} 112] hour
PerPart I_EnergyCalcQuery Get - Energy meter reading per part
[} 112]
SavingInterval LREAL Get, Set 120.0 [s] Interval for saving the energy
meter readings in a machine
data file
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

110 Version: 1.1.0 TF85xx


PLC-API - Class overview

Methods

Name Description
Reset() Resets the error state of the class.
FB_EnergyMeasurement
AddInput(iNew) Adds an I/O element with energy measurement values
Input(x) Returns an interface to the xth I/O element of the energy measurement
NewPart(bCLK) Logs a new part to evaluate the energy per part
Producing(bIsProducing) Indicates that production is active.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Exceptions avoidance
The list access functions (e.g. Channels(x), Groups(x), etc...) return a pseudo variable if the
requested index is invalid. In addition, a message is thrown in the EventLogger.

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms)

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_EnergyMeasurement Standard interfaces on FB_EnergyMeasurement
I_OneTaskInterface Runtime interface for a PLC task
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

TF85xx Version: 1.1.0 111


PLC-API - Class overview

5.8.2.1 FB_EnergyCalc

Contains the energy meter data for a defined period. The current and previous time periods are always
saved.

Syntax:
FUNCTION_BLOCK FB_EnergyCalc EXTENDS FB_MdBaseComponent

Properties

Name Type Access Initial value Description


ActivePower LREAL Get, Set 0.0 Currently active power
consumption.
EnergyIdle LREAL Get 0.0 Energy outside of production.
EnergProduction LREAL Get 0.0 Energy during production.
LastEnergyIdle LREAL Get 0.0 Last energy outside of
production.
LastEnergProduction LREAL Get 0.0 Last energy during production.
LastStartTime I_Time [} 138] Get - Last start time.
NextDay BOOL Get FALSE A new day has begun since
the current start time.
NextHour BOOL Get FALSE A new hour has begun since
the current start time.
ProductionActive BOOL Get, Set FALSE Production is currently active.
StartTime I_Time Get - Start time (point)
ComponentType USINT Get 0 Type of component as
identifier.
Connected BOOL Get FALSE Component is connected with
its access dependencies.

Methods

Name Description
Connect() Connects references to the class.
Enable(bExecute) Switches the recording on.
Init(iTimeRef) Initializes the class with the reference to a system time.
Latch(bCmd) Starts a new measurement start time.

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms)

Event-driven methods (callback methods)

Name Description
MdNextParameter() Container call to save the parameters to a file.
MdSetParameter() Container call to load the parameters into the runtime.

112 Version: 1.1.0 TF85xx


PLC-API - Class overview

Interfaces

Type Description
I_EnergyCalc Standard interface on FB_EnergyCalc.
I_EnergyCalcQuery Reduced query interface to FB_EnergyCalc.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.8.2.2 FB_EL3443

Defines the standard scope of a Beckhoff EL3443 power measurement terminal.

Syntax:
FUNCTION_BLOCK FB_EL3443 EXTENDS FB_InputBase

I/O variables

Name Type Access Description


fbL1 FB_EmPhaseGuarded Input Information on phase L1.
[} 115]
fbL2 FB_EmPhaseGuarded Input Information on phase L2.
[} 115]
fbL3 FB_EmPhaseGuarded Input Information on phase L3.
[} 115]
fPowerFactor REAL Input Power factor λ
fPowerQualityFactor REAL Input Quality of the power supply
fActivePower REAL Input Active power P
fFrequency REAL Input Frequency
fL1L2_Voltage REAL Input Voltage between L1 and L2.
fL2L3_Voltage REAL Input Voltage between L2 and L3.
fL3L1_Voltage REAL Input Voltage between L3 and L1.
WcState BIT Input Working Counter State
AdsAddr AMSADDR Input ADS address of the I/O element for
asynchronous communication.
Toggle BIT Input Bit switching with the update rate of the
mapping.
InfoDataState UINT Input Numerical information on the state of the
EtherCAT slave (see State).

TF85xx Version: 1.1.0 113


PLC-API - Class overview

Properties

Name Type Access Initial value Description


ActivePower LREAL Get 0.0 Active power P
Frequency LREAL Get 0.0 Frequency
L1 I_EmPhase [} 114] Get - Information on phase L1.
L2 I_EmPhase [} 114] Get - Information on phase L2.
L3 I_EmPhase [} 114] Get - Information on phase L3.
PowerFactor LREAL Get 0.0 Power factor λ
PowerQualityFactor LREAL Get 0.0 Quality of the power supply.
VoltageL1L2 LREAL Get 0.0 Voltage between L1 and L2.
VoltageL2L3 LREAL Get 0.0 Voltage between L2 and L3.
VoltageL3L1 LREAL Get 0.0 Voltage between L3 and L1.

Interfaces

Type Description
I_EL3443 Standard interface on FB_EL3443.
I_InputEnergy General interface for power measuring elements.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.8.2.2.1 FB_EmPhase

Defines the minimum amount of information for a measured phase.

Syntax:
FUNCTION_BLOCK FB_EmPhase

I/O variables

Name Type Access Description


fCurrent REAL Input Current of the phase.
fVoltage REAL Input Voltage of the phase.

Properties

Name Type Access Initial value Description


Current LREAL Get 0.0 Current of the phase.
Voltage LREAL Get 0.0 Voltage of the phase.

114 Version: 1.1.0 TF85xx


PLC-API - Class overview

Interfaces

Type Description
I_EmPhase Standard interface on FB_EmPhase.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.8.2.2.2 FB_EmPhaseGuarded

Defines the extended scope of information for a measured phase.

Syntax:
FUNCTION_BLOCK FB_EmPhaseGuarded EXTENDS FB_EmPhase

I/O variables

Name Type Access Description


fCurrent REAL Input Current of the phase.
fVoltage REAL Input Voltage of the phase.
bVoltageGuardWarning BOOL Input Voltage guard warning
bVoltageGuardError BOOL Input Voltage guard error
bCurrentGuardWarning BOOL Input Current guard warning
bCurrentGuardError BOOL Input Current guard error

Properties

Name Type Access Initial value Description


Current LREAL Get 0.0 Current of the phase.
Voltage LREAL Get 0.0 Voltage of the phase.
VoltageGuardWarning BOOL Get FALSE Voltage guard warning
VoltageGuardError BOOL Get FALSE Voltage guard error
CurrentGuardWarning BOOL Get FALSE Current guard warning
CurrentGuardError BOOL Get FALSE Current guard error

Interfaces

Type Description
I_EmPhase Standard interface on FB_EmPhase.
I_EmPhaseGuarded Standard interface on FB_EmPhaseGuarded.

TF85xx Version: 1.1.0 115


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.9 Alarms - Handling of the Tc3_EventLogger

5.9.1 FB_AlarmHandler

The class implements a handling of pending alarms to influence the process sequence. This means, for
example, that an alarm with the severity "Error" can be responded to by stopping the machine directly.

Syntax:
FUNCTION_BLOCK FB_AlarmHandler EXTENDS FB_ListenerBase2

Properties

Name Type Access Initial value Description


AlarmCritical BOOL Get FALSE A critical alarm is present.
AlarmError BOOL Get FALSE There is an error alarm.
AlarmWarning BOOL Get FALSE There is a warning alarm.
AlarmInfo BOOL Get FALSE There is an information alarm
pending.
Error BOOL Get FALSE The handler is in an error
state.

Methods

Name Description
ClearAlarms() Confirms and clears all pending alarms.

Interfaces

Type Description
I_AlarmHandler Standard interface on FB_AlarmHandler
I_OneTaskInterface Runtime interface for a PLC task

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

116 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.9.2 FB_AppMessage

This class is part of the FB_Base class and provides an interface to the EventLogger for almost every
TwinCAT 3 Plastic Base Application object.

Syntax:
FUNCTION_BLOCK FB_AppMessage EXTENDS FB_TcMessage

Methods

Name Description
ClearAlarm() Clears a specific alarm.
ConfirmAlarm() Acknowledges a specific alarm.
Reset() Resets all alarms generated by this instance.
SendAlarm() Triggers an alarm.
SendEqualMessage() Logs a message in the EventLogger.
SendHresult() Logs a message in the EventLogger with the hexadecimal
representation of the error code.
SendMessage() Logs a message in EventLogger, unless the message has been sent
before.

Interfaces

Type Description
I_AppMessage Standard interface on FB_AppMessage.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.2)

5.10 Logging - Recording user input

5.10.1 CSV

5.10.1.1 FB_CsvBase

The base class for CSV-based classes.

Class is abstract
Since the class is defined as ABSTRACT, the class cannot be instantiated and must be implemented
using inheritance.

Syntax:
FUNCTION_BLOCK ABSTRACT FB_CsvBase EXTENDS FB_Base

TF85xx Version: 1.1.0 117


PLC-API - Class overview

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_CsvBase
Busy BOOL Get FALSE The function is currently being
executed.
ErrorId UDINT Get FALSE ADS error code of the error
that has occurred.
FileMode E_FileMode [} 119] Get, Set eModeTextAp Mode in which the CSV files
pend are used.
FileName T_MaxString Get, Set ‘.csv‘ File name in the Plastic Base
Application Standard
directory.
NetId AMSNETID Get, Set [0,0,0,0,0,0] AMS (ADS) network ID.
NetIdString T_AmsNetID Get, Set ‘0.0.0.0.0.0‘ AMS (ADS) network ID.
Timeout LREAL Get, Set 0.0 [s] Time-out period of the system
response of this function.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - 1 time per cycle (default 10 ms).

Procedure controlling methods (FB_AdaptableSequence [} 157])

Type Description
CsvStates() [} 119] Procedure for processing CSV commands.

118 Version: 1.1.0 TF85xx


PLC-API - Class overview

Possible events

ID Description Alarm/Message
8001 CSV object is in error state Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_CsvBase Standard interface on FB_CsvBase.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.1.1.1 CsvStates()
Instance type Instance Name
Master fbCsvStates
Slaves aBaseSeqMembers[E_CsvStates.eLength]

State diagram:

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.1.1.2 E_FileMode
Enumeration of file modes for CSV-based functions.

TF85xx Version: 1.1.0 119


PLC-API - Class overview

Syntax:
{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_FileMode :
(
eModeTextAppend := FOPEN_MODEAPPEND OR FOPEN_MODETEXT,
eModeTextRead := FOPEN_MODEREAD OR FOPEN_MODETEXT
)UDINT;
END_TYPE

Values

Name Description
eModeTextAppend Open file in text mode and append information.
eModeTextRead Open and read file in text mode.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.1.1.3 I_CsvField
Interface to a CSV field of the internal buffer of FB_CsvBase.

Syntax:
INTERFACE I_CsvField

Properties

Name Type Access Initial value Description


NewLine BOOL Get, Set FALSE The CSV field is in a new line.
Next I_CsvField Get <Local> + 1 Interface to the next CSV field.
Value LREAL Get, Set T_MaxString Value of the CSV field.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.1.2 FB_CsvLogger

Implements the logging of values in a CSV file.

Syntax:
FUNCTION_BLOCK FB_CsvLogger EXTENDS FB_CsvBase

120 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_CsvBase
Busy BOOL Get FALSE The function is currently being
executed.
ErrorId UDINT Get FALSE ADS error code of the error
that has occurred.
FileMode E_FileMode [} 119] Get, Set eModeTextAp Mode in which the CSV files
pend are used.
FileName T_MaxString Get, Set ‘.csv‘ File name in the Plastic Base
Application Standard
directory.
NetId AMSNETID Get, Set [0,0,0,0,0,0] AMS (ADS) network ID.
NetIdString T_AmsNetID Get, Set ‘0.0.0.0.0.0‘ AMS (ADS) network ID.
Timeout LREAL Get, Set 0.0 [s] Time-out period of the system
response of this function.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_CsvLogger
Field(sValue) Logging a textual value.
This function can be called in a chain.
Float(fValue, nDecimals) Logging a floating point value, specifying the decimal places.
This function can be called in a chain.
NewLine() Logging a line break.
This function can be called in a chain.
Timestamp() Logging the current system time.
This function can be called in a chain.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

TF85xx Version: 1.1.0 121


PLC-API - Class overview

Cycle methods

Name Description
Cyclic() Cycle method - 1 time per cycle (default 10 ms).

Procedure controlling methods (FB_AdaptableSequence [} 157])

Type Description
CsvStates() [} 122] Procedure for processing CSV commands (extended).

Possible events

ID Description Alarm/Message
8001 CSV object is in error state Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_CsvLogger Standard interface on FB_CsvLogger.
I_CsvLoggerCmd Chaining interface for logging commands.
I_CsvBase Standard interface on FB_CsvBase.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.1.2.1 CsvStates()
Instance type Instance Name
Master fbCsvStates
Slaves aBaseSeqMembers[E_CsvStates.eLength]

State diagram:

122 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.1.3 FB_CsvReader

Implements the reading of values from a CSV file.

Syntax:
FUNCTION_BLOCK FB_CsvReader EXTENDS FB_CsvBase

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_CsvReader
Done BOOL Get FALSE The read process has reached
the end of the file.
Field T_MaxString Get ‘‘ Read value as a textual string.
Float LREAL Get 0.0 Read value as a floating point
number.
NewLine BOOL Get FALSE Read value appears in a new
line.
NumFields UDINT Get UDINT Number of values already
loaded.
FB_CsvBase
Busy BOOL Get FALSE The function is currently being
executed.
ErrorId UDINT Get FALSE ADS error code of the error
that has occurred.
FileMode E_FileMode [} 119] Get, Set eModeTextAp Mode in which the CSV files
pend are used.
FileName T_MaxString Get, Set ‘.csv‘ File name in the Plastic Base
Application Standard
directory.
NetId AMSNETID Get, Set [0,0,0,0,0,0] AMS (ADS) network ID.
NetIdString T_AmsNetID Get, Set ‘0.0.0.0.0.0‘ AMS (ADS) network ID.
Timeout LREAL Get, Set 0.0 [s] Time-out period of the system
response of this function.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.

TF85xx Version: 1.1.0 123


PLC-API - Class overview

Name Type Access Initial value Description


[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_CsvLogger
Init() Initializes the class.
Next() Loads the next value for reading and returns this as the return value.
Read(bExecute) Triggers the read process of the file.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - 1 time per cycle (default 10 ms).

Procedure controlling methods (FB_AdaptableSequence [} 157])

Type Description
CsvStates() [} 125] Procedure for processing CSV commands (extended).

Possible events

ID Description Alarm/Message
8001 CSV object is in error state Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_CsvBase Standard interface on FB_CsvBase.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

124 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.10.1.3.1 CsvStates()
Instance type Instance Name
Master fbCsvStates
Slaves fbStateDone, aBaseSeqMembers[E_CsvStates.eLength]

State diagram:

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.2 UserLogging

5.10.2.1 FB_UserLogging

Implements the logic of the logging database of the TF8550 UserLogging

Internal functions:
• Automatically creates one file per day.
• Limits the maximum number of logging entries.

Syntax:
FUNCTION_BLOCK FB_UserLogging EXTENDS FB_CsvLogger

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_CsvBase
Busy BOOL Get FALSE The function is currently being
executed.
ErrorId UDINT Get FALSE ADS error code of the error
that has occurred.

TF85xx Version: 1.1.0 125


PLC-API - Class overview

Name Type Access Initial value Description


FileMode E_FileMode [} 119] Get, Set eModeTextAp Mode in which the CSV files
pend are used.
FileName T_MaxString Get, Set ‘.csv‘ File name in the Plastic Base
Application Standard
directory.
NetId AMSNETID Get, Set [0,0,0,0,0,0] AMS (ADS) network ID.
NetIdString T_AmsNetID Get, Set ‘0.0.0.0.0.0‘ AMS (ADS) network ID.
Timeout LREAL Get, Set 0.0 [s] Time-out period of the system
response of this function.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_CsvLogger
Field(sValue) Logging a textual value.
This function can be called in a chain.
Float(fValue, nDecimals) Logging a floating point value, specifying the decimal places.
This function can be called in a chain.
NewLine() Logging a line break.
This function can be called in a chain.
Timestamp() Logging the current system time.
This function can be called in a chain.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - 1 time per cycle (default 10 ms)

Procedure controlling methods (FB_AdaptableSequence [} 157])

Type Description
CsvStates() [} 127] Procedure for processing the logging (extended)

126 Version: 1.1.0 TF85xx


PLC-API - Class overview

Possible events

ID Description Alarm/Message
8001 CSV object is in error state Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_UserLogging Standard interface on FB_UserLogging.
I_CsvLogger Standard interface on FB_CsvLogger.
I_CsvLoggerCmd Chaining interface for logging commands.
I_CsvBase Standard interface on FB_CsvBase.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.2.1.1 CsvStates()
Instance type Instance Name
Master fbCsvStates
Slaves aBaseSeqMembers[E_CsvStates.eLength]
aUserLogSeq[E_UserLogStates.eLength]

State diagram:

TF85xx Version: 1.1.0 127


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.10.2.2 FB_UserLoggingHmi

HMI parallel class to the FB_UserLogging.

Syntax:
FUNCTION_BLOCK FB_UserLoggingHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_UserLoggingHmi
MaxDays UDINT Get, Set 360 Maximum number of days
(files).
MaxMemory LREAL Get, Set 1000 [MB] Maximum memory size of the
logging files.
SubDirectory STRING Get, Set ‘UserLog‘ Subdirectory of the logging
files in the Plastic Base
Application standard directory.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_UserLoggingHmi
Logg(...) Logging a changed parameter from the HMI.
This method can be called from the HMI.
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.

128 Version: 1.1.0 TF85xx


PLC-API - Class overview

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_UserLoggingHmi Standard interface on FB_UserLoggingHmi.
I_BaseHmi Standard interface on FB_BaseHmi.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.11 Analog - analog value scaling

5.11.1 FB_ScaleAnalogHmi

Implements functions for scaling analog values with parameterization via the HMI.

Syntax:
FUNCTION_BLOCK FB_ScaleAnalogHmi EXTENDS FB_ScaleHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_ScaleAnalogHmi
ScalingElectricalMax LREAL Get, Set 10.0 Maximum of the electrical
voltage input.
ScalingElectricalMin LREAL Get, Set 0.0 Minimum of the electrical
voltage input.
ScalingRawMax LREAL Get, Set 32767 Maximum of the raw analog
measured value (bit).
ScalingRawMin LREAL Get, Set 0 Minimum of the raw analog
measured value (bit).
ScalingValueMax LREAL Get, Set 100.0 Maximum of the scaled end
unit.
ScalingValueMin LREAL Get, Set 0.0 Minimum of the scaled end
unit.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.

TF85xx Version: 1.1.0 129


PLC-API - Class overview

Name Type Access Initial value


Description
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.

FB_ScaleAnalogHmi
ElectricalToRaw(fElectrical) Scales the electrical voltage to the raw analog measured value (bit/
numeric).
ElectricalToValue(fElectrical) Scales the electrical voltage to the unit of the final scaling.
RawToElectrical(nRaw) Scales the raw analog measured value (bit/numeric) to the electrical
voltage.
RawToValue(nRaw) Scales the raw analog measured value (bit/numeric) to the unit of the
final scaling.
ValueToElectrical(fValue) Scales the unit of the final scaling to the electrical voltage.
ValueToRaw(fValue) Scales the unit of the final scaling to the raw analog measured value (bit/
numeric).
FB_ScaleHmi
[PROTECTED] XtoY(...) Scales a value x to a value y, using the minimum and maximum value of
both scales
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ScaleAnalogHmi Standard interface on FB_ScaleAnnalogHmi.
I_ScaleAnalogScalings Interface to the scaling minima and maxima.
I_BaseHmi Standard interface on FB_BaseHmi.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.11.2 FB_Monitoring

Implements a monitoring function for analog signals. The threshold values for monitoring can be set variably
on the HMI.

130 Version: 1.1.0 TF85xx


PLC-API - Class overview

Syntax:
FUNCTION_BLOCK FB_Monitoring EXTENDS FB_Base

Properties

Name Type Access Initial value Description


AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
AutoClearAlarms BOOL Get, Set FALSE Triggered alarms are
automatically cleared after the
cause has been eliminated.
EnableAlarms BOOL Get, Set FALSE Falling below/exceeding the
limit triggers pre-implemented
alarms.
Input I_InputBase Get, Set NULL Interface of the analog signal
to be read
Value LREAL Get, Set 0 Returns the scaled analog
value. Can be set if no input
has been assigned.

Possible events

ID Description Alarm/Message
300x Exceeding/falling below the set tolerances Alarm

Interfaces

Type Description
I_Monitoring Standard interface on FB_Monitoring
I_AttachableMdInterface Interface for containerless machine data components
I_OneTaskInterface Runtime interface for a PLC task

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.11.2.1 FB_MonitoringTemp

Implements monitoring of a temperature channel with direct connection to TF8540. The adjustable limits are
synchronized with the temperature zone.

Syntax:
FUNCTION_BLOCK FB_MonitoringTemp EXTENDS FB_Monitoring

Properties

Name Type Access Initial value Description


TempChannel I_TempChannel Get, Set NULL Assigned temperature channel

TF85xx Version: 1.1.0 131


PLC-API - Class overview

Interfaces

Type Description
I_MonitoringTemp Standard interface on FB_MonitoringTemp

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.11.2.2 FB_MonitoringIPC

Implements the monitoring of the CPU temperature of a Beckhoff IPC.

Syntax:
FUNCTION_BLOCK FB_MonitoringIPC EXTENDS FB_Monitoring

Properties

Name Type Access Initial value Description


RefreshRate LREAL Get, Set 5.0 Rate [s] of the asynchronous
request of the IPC value

Interfaces

Type Description
I_MonitoringIPC Standard interface on FB_MonitoringIPC

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.11.3 FB_Setpoints

Implements scaling of analog setpoints that can be adjusted via the HMI.

Syntax:
FUNCTION_BLOCK FB_Setpoints EXTENDS FB_Base

132 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description


AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
Output I_OutputBase Get, Set NULL Interface of the analog output
to be assigned

Interfaces

Type Description
I_Setpoints Standard interface on FB_Setpoints
I_AttachableMdInterface Interface for containerless machine data components
I_OneTaskInterface Runtime interface for a PLC task

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.12 Time - Time-related functions

5.12.1 FB_TimerHmi

HMI interface for IEC 61131-3 timer to set process timings.

Syntax:
FUNCTION_BLOCK FB_TimerHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


ActualValue LREAL Get, Set 0.0 Current time value in seconds
LatchedValue LREAL Get, Set 0.0 Stored time value of the last
execution in seconds
Out BOOL Get, Set FALSE Timer output (depending on
TON, TOF, TP)
SetValue LREAL Get, Set 0.0 Preset time setpoint in
seconds

Interfaces

Type Description
I_TimerHmi Standard interface on FB_TimerHmi

TF85xx Version: 1.1.0 133


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.12.2 FB_TimerTon

Implements IEC 61131-3 timer function with integrated interface for PLC and HMI.

Syntax:
FUNCTION_BLOCK FB_TimerTon EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Elapsed LREAL Get 0.0 Current time value in seconds
Latched LREAL Get 0.0 Stored time value of the last
execution in seconds
Preset LREAL Get, Set 0.0 Preset time value in seconds
Et TIME Get T#0ms Current time value in
milliseconds
In BOOL Get, Set FALSE Activation input
L TIME Get T#0ms Stored time value of the last
execution in milliseconds
Pt TIME Get, Set T#0ms Preset time value in
milliseconds
Q BOOL Get FALSE Timer output

Interfaces

Type Description
I_Timer General interface for IEC 61131-3 timer

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.12.3 FB_TimerTof

Implements IEC 61131-3 timer function with integrated interface for PLC and HMI.

Syntax:
FUNCTION_BLOCK FB_TimerTof EXTENDS FB_Base

134 Version: 1.1.0 TF85xx


PLC-API - Class overview

Properties

Name Type Access Initial value Description


Elapsed LREAL Get 0.0 Current time value in seconds
Latched LREAL Get 0.0 Stored time value of the last
execution in seconds
Preset LREAL Get, Set 0.0 Preset time value in seconds
Et TIME Get T#0ms Current time value in
milliseconds
In BOOL Get, Set FALSE Activation input
L TIME Get T#0ms Stored time value of the last
execution in milliseconds
Pt TIME Get, Set T#0ms Preset time value in
milliseconds
Q BOOL Get FALSE Timer output

Interfaces

Type Description
I_Timer General interface for IEC 61131-3 timer

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.12.4 FB_TimerTp

Implements IEC 61131-3 timer function with integrated interface for PLC and HMI.

Syntax:
FUNCTION_BLOCK FB_TimerTp EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Elapsed LREAL Get 0.0 Current time value in seconds
Latched LREAL Get 0.0 Stored time value of the last
execution in seconds
Preset LREAL Get, Set 0.0 Preset time value in seconds
Et TIME Get T#0ms Current time value in
milliseconds
In BOOL Get, Set FALSE Activation input
L TIME Get T#0ms Stored time value of the last
execution in milliseconds
Pt TIME Get, Set T#0ms Preset time value in
milliseconds
Q BOOL Get FALSE Timer output

TF85xx Version: 1.1.0 135


PLC-API - Class overview

Interfaces

Type Description
I_Timer General interface for IEC 61131-3 timer

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.12.5 FB_TimerWeekdayHmi

HMI interface for a weekday timer for use with the TF8550 Control TimeScheduler.

Syntax:
FUNCTION_BLOCK FB_TimerWeekdayHmi EXTENDS FB_TimerHmi

Properties

Name Type Access Initial value Description


AttachableMdInterface I_MdComponent Get - Interface to the machine data
component
Duration LREAL Get 0.0 Time difference between start
and end time
EndTime LREAL Get, Set 0.0 End time in seconds
StartTime LREAL Get, Set 0.0 Start time in seconds
Weekday E_Weekday [} 136] Get, Set eNone Weekday of the start time

Interfaces

Type Description
I_TimerWeekday Standard interface on FB_TimerWeekdayMaster
I_TimerWeekdayHmiQuery Interface for internal queuing of multiple weekday timers
I_AttachableMdInterface Interface for containerless machine data components

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.12.5.1 E_Weekday
Enumeration of the weekdays on which a schedule is to start.

Syntax:
TYPE E_Weekday :
(
// invalid - inactive

136 Version: 1.1.0 TF85xx


PLC-API - Class overview

eNone := 2#0000_0000,

// One day
eMonday := 2#0000_0001,
eTuesday := 2#0000_0010,
eWednesday := 2#0000_0100,
eThursday := 2#0000_1000,
eFriday := 2#0001_0000,
eSaturday := 2#0010_0000,
eSunday := 2#0100_0000

Values

Name Description
eNone Inactive or no weekday
eMonday Monday
eTuesday Tuesday
eWednesday Wednesday
eThursday Thursday
eFriday Friday
eSaturday Saturday
eSunday Sunday

5.12.6 FB_TimerWeekdayMaster

Implements a weekday timer, compatible with IEC 61131-3 timers.

Syntax:
FUNCTION_BLOCK FB_TimerWeekdayMaster EXTENDS FB_BaseMd

Properties

Name Type Access Initial value Description


Elapsed LREAL Get 0.0 Current time value in seconds
Latched LREAL Get 0.0 Stored time value of the last
execution in seconds
Preset LREAL Get, Set 0.0 Preset time value in seconds
Et TIME Get T#0ms Current time value in
milliseconds
In BOOL Get, Set FALSE Activation input
L TIME Get T#0ms Stored time value of the last
execution in milliseconds
Pt TIME Get, Set T#0ms Preset time value in
milliseconds
Q BOOL Get FALSE Timer output

Interfaces

Type Description
I_TimerWeekday Standard interface on FB_TimerWeekdayMaster

TF85xx Version: 1.1.0 137


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.12.7 FB_Time

Class (FB) saves a point in time. The class makes it possible to interpret the time in various partial
information and data types.

Syntax:
FUNCTION_BLOCK FB_Time

Properties

Name Type Access Initial value Description


Day WORD Get 0 (1 - 32) Day of the month.
DayOfWeek WORD Get 0 (0 - 6) Day of the week
0 = Sunday, 1 = Monday,
etc…
DnT DATE_AND_TIME Get DT#1970-1-1- Time as IEC data type.
0:0:0
Filetime ULINT Get, Set 0 Time as T_FILETIME64.
Hour WORD Get 0 (1 - 23) Hour of the day.
Milisecond WORD Get 0 (1 – 999) Millisecond of the second.
Minute WORD Get 0 (0 – 59) Minute of the hour.
Month WORD Get 0 (1 – 12) Month of the year.
Second WORD Get 0 (0 – 59) Second of the minute.
Text STRING(24) Get „1601-00-00-0 Time as a textual string.
0:00:00“
TimeOfDay LREAL Get 0 [s] Time of day in seconds.
Timestruct TIMESTRUCT Get, Set 0x0 Time as system time
structure.
ValidTime BOOL Get FALSE Time is valid (> 0).
Weekday E_Weekday [} 136] Get eNone Day of the week
Year WORD Get 0 (1970 – Year
2106)

Methods

Type Description
DiffTo(iDiff) Returns a timespan [s] between this and the transferred time.
Now() Sets this class equal to the current system time and returns an interface
to it.

138 Version: 1.1.0 TF85xx


PLC-API - Class overview

Interfaces

Type Description
I_Time Standard interface on FB_Time.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.12.8 F_GetLocalSystemtime

Returns the local system time, taking into account the time zone. Is suitable for creating system time-related
timestamps.

Syntax:
FUNCTION F_GetLocalSystemtime : ULINT

Outputs

Name Type Description


F_ ULINT System time, based on the definition of T_FILETIME
GetLocalSystemtime

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.12.9 F_GetLocalSystemtimeEx

Returns the system time of a device with AMS-NetID, taking into account the time zone. Is suitable for
creating system time-related timestamps.

Syntax:
FUNCTION F_GetLocalSystemtimeEx : ULINT

Inputs

Name Type Description


sNetID T_AmsNetID Net-ID of the system to be read

TF85xx Version: 1.1.0 139


PLC-API - Class overview

Outputs

Name Type Description


F_ ULINT System time, based on the definition of T_FILETIME
GetLocalSystemtimeEx

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.12.10 F_SecondsToTime()

Converts a time in seconds of type LREAL to milliseconds of type TIME.

Syntax:
FUNCTION F_SecondsToTime : TIME
VAR_INPUT
fTime: LREAL;
END_VAR

Inputs

Name Type Description


fTime LREAL Time value in seconds as floating point number

Outputs

Name Type Description


F_SecondsToTime TIME Time value in milliseconds

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.12.11 F_TimeToSeconds()

Converts a time in milliseconds of type TIME to seconds of type LREAL.

Syntax:
FUNCTION F_SecondsToTime : LREAL
VAR_INPUT
tTime: TIME;
END_VAR

140 Version: 1.1.0 TF85xx


PLC-API - Class overview

Inputs

Name Type Description


tTime TIME Time value in milliseconds

Outputs

Name Type Description


F_TimeToSeconds LREAL Time value in seconds as floating point number

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.13 BlowMolding - Blow molding specific classes

5.13.1 FB_Blowing

Implements a typical blowing sequence in two blowing phases with adjustable pressure.

Syntax:
FUNCTION_BLOCK FB_Blowing EXTENDS FB_Base

Properties

Name Type Access Initial value Description


AttachableMdInteface I_MdComponent Get - Interface to the machine data
component
Done BOOL Get FALSE The blowing process was
carried out successfully.
EnableOutput BOOL Get, Set FALSE Releases the output of the
blowing pressure.
Output I_OutputBase Get, Set NULL Represents the interface to
the analog output.

Methods

Name Description
Start() Starts the blowing process.

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
BlowSeq() [} 142] Procedure for blowing pressure output

TF85xx Version: 1.1.0 141


PLC-API - Class overview

Interfaces

Type Description
I_Blowing Standard interface on FB_Blowing
I_AttachableMdInterface Interface for containerless machine data components

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.13.1.1 BlowSeq()
Instance type Instance Name
Master fbBlowSeq
Slaves aBaseSeqMembers[E_BlowingSequence.eLength]

State diagram:

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.13.2 FB_IntervalBlowing

Extends the FB_Blowing class with an alternating blowing interval during the main blowing phase.

Syntax:
FUNCTION_BLOCK FB_IntervalBlowing EXTENDS FB_Blowing

Properties

Name Type Access Initial value Description


EnableInterval BOOL Get, Set - Turns on the interval
extension.

142 Version: 1.1.0 TF85xx


PLC-API - Class overview

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
BlowSeq() [} 143] Procedure for blowing pressure output (advanced)

Interfaces

Type Description
I_IntervalBlowing Standard interface on FB_IntervalBlowing

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.13.2.1 BlowSeq()
Instance type Instance Name
Master fbBlowSeq
Slaves fbStateBlowing
fbStateInterval1
fbStateInverval2

State diagram:

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.13.3 FB_Blowpin

Implements blowpin-specific functions.

Syntax:
FUNCTION_BLOCK FB_Blowpin EXTENDS FB_PtpMotion

TF85xx Version: 1.1.0 143


PLC-API - Class overview

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Blowpin
DisableHoldingTorque1 BOOL Get, Set FALSE Locks the holding torque for
NC blowpin axes.
Alternative: .UseClamping
= FALSE
FB_PtpMotion
ClampOnlyLastSeg BOOL Get, Set TRUE Clamping is only possible in
the last segment.
PtpMoveFinished BOOL Get FALSE The PTP movement was
executed successfully.
StackSegmentCount BOOL Get, Set TRUE Aborted segments are taken
into account in the subsequent
command.
UseClamping BOOL Get, Set TRUE Commanded PTP movements
should use the set clamping.
UseManualSpeed BOOL Get, Set FALSE Commanded PTP movements
should be executed at manual
speed.
FixedMoveDirection1 BOOL Get, Set TRUE Fixes the direction of
movement for cluster 1
(negative) and 2 (positive).
Alternatively:
FB_PtpMotionHmi.AxisMove.M
oves[].Direction [} 48]
PtpMoveStopDone1 BOOL Get FALSE The PTP movement was
successfully stopped.
FB_Axis
Axis I_AxisBase Get - Interface to the assigned
TF8560 axis.
Homing I_Homing [} 41] Get - Homing functions
1
BaseAxisInterfaces I_AxisBase Get NULL Alias of Axis.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific [} 35] Get - Technology-specific functions/
values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.

144 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>
1
Obsolete

Methods

Name Description
Reset() Resets the error state of the class.
FB_PtpMotion
[PROTECTED] Forms the difference of two segment positions.
CmpSegPos(iSeg1, iSeg2)
ContinuePtp(bCommand) Continues a paused MovePtp() command.
MovePtp() [} 46] Starts/stops a PTP movement with the parameterization from the HMI.
ResetPtp() Resets the saved progress of the MovePtp() command.
FB_Axis
SetPosition(bCommand) Setting the axis position with the FB_AxisHmi.Setpoistion.
1
SetAxisRef() Assignment method for the TF8560 axis.
Alternative: .SetMotionRef().
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
PtpSeq() [} 146] Procedure for loading a PTP movement (extended).

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm
200x PTP command error Message

TF85xx Version: 1.1.0 145


PLC-API - Class overview

ID Description Alarm/Message
10 Axis Errors Alarm
20 Axis command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Blowpin Standard interface on FB_Blowpin.
I_PtpMotion Standard interface on FB_PtpMotion.
I_Axis Standard interface on FB_Axis.
I_Motion Standard interface on FB_Motion
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.13.3.1 PtpSeq()
Blowpin PTP variant only active for NC axes
fbSeqProvideClamping is only inserted when using an NC axis. For hydraulic axes, the normal
clamping of the FB_PtpMotion class is used.

Instance type Instance Name


Master fbPtpSeq
Slaves fbSeqProvideClamping

State diagram:

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

146 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.13.4 FB_BlowMoldingExtruder

Implements specific functions for extruders in the blow molding process.

Syntax:
FUNCTION_BLOCK FB_BlowMoldingExtruder EXTENDS FB_Extruder

Properties

Name Type Access Initial value Description


ParisonLengthControl I_ParisonLengthContro Get - Interface to the integrated
[} 147] l parison length control

Interfaces

Type Description
I_BlowMoldingExtruder Standard interface on FB_BlowMoldingExtruder

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.13.4.1 FB_ParisonLengthControl

Implements parison length control in the typical use case of the blow molding process.

Syntax:
FUNCTION_BLOCK FB_ParisonLengthControl EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Photocell BOOL Set FALSE Input for the signal of the
photocell
TurnrateDown BOOL Get FALSE Control output for lowering the
turnrate
TurnrateUp BOOL Get FALSE Control output for raising the
turnrate
WtcStart BOOL Get, Set FALSE Input signal for the start of a
new cycle

TF85xx Version: 1.1.0 147


PLC-API - Class overview

Methods

Name Description
Activate() Activates the parison length control.

Interfaces

Type Description
I_ParisonLengthControl Standard interface on FB_ParisonLengthControl

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.13.5 FB_Wtc

Implements wall thickness control for the extruded hose in blow molding applications.

Syntax:
FUNCTION_BLOCK FB_Wtc EXTENDS FB_Axis

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Axis
Axis I_AxisBase Get - Interface to the assigned
TF8560 axis.
Homing I_Homing [} 41] Get - Homing functions
1
BaseAxisInterfaces I_AxisBase Get NULL Alias of Axis.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific [} 35] Get - Technology-specific functions/
values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.

148 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>
1
Obsolete

Methods

Name Description
Reset() Resets the error state of the class.
FB_Wtc
CamIn(bCmd) Loads the current curve and starts camming.
DieWaitPosition(bCmd) Commands the WTC to the waiting position.
Power(bCmd) Activates the axis including the connection to the cam plate.
SetMaster(iMaster) Sets the current master to be used by the WTC.
Notice If the WTC is not in the idle state, the new master is
considered requested and is only assigned when idle.
Testposition(bCmd) Commands the WTC to the test position.
FB_Axis
SetPosition(bCommand) Setting the axis position with the FB_AxisHmi.Setpoistion.
1
SetAxisRef() Assignment method for the TF8560 axis.
Alternative: .SetMotionRef().
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
WtcStates() [} 150] Procedure for executing commands and coupling and decoupling from
the cam plate.

TF85xx Version: 1.1.0 149


PLC-API - Class overview

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm
100x Axis switch on/off failed. Message
300x Failed to switch on/off the cam plate. Message
10 Axis Errors Alarm
20 Axis command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Wtc Standard interface on FB_Wtc.
I_Axis Standard interface on FB_Axis.
I_Motion Standard interface on FB_Motion
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.13.5.1 WtcStates()
Instance type Instance Name
Master fbWtcStates
Slaves aBaseSeqMembers[E_WtcState.eLength]

State diagram:

150 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.2)

5.13.6 FB_WtcTimer

Implements a timer as master for WTC camming.

Syntax:
FUNCTION_BLOCK FB_WtcTimer EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_WtcTimer
ActualTime LREAL Get 0.0 [s] Elapsed time since start of
WTC cycle in seconds.
ActualTimeLatched LREAL Get 0.0 [s] Stored time of the last WTC
cycle in seconds.
AttachableMdInterface I_MdComponent Get - Interface to the machine data
component.
FirstStart BOOL Get FALSE WTC is in its first cycle since
the last launch.
GuidingValue LREAL Get 0.0 Time value as resulting
camming master value.
MaxMeasureTime LREAL Get 0.0 [s] Maximum overflow time of the
timer.
MaxMeasureTimeFactor LREAL Get, Set 1.5 Overflow factor for the set
target time.
ProfileStarted BOOL Get FALSE TRUE if the timer has been
started.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_WtcTimer
ProfileStartAck(bAck) Resets the ProfileStarted feedback signal.

TF85xx Version: 1.1.0 151


PLC-API - Class overview

Name Description
Start(bCommand) Starts the timer.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_WtcTimer Standard interface on FB_WtcTimer.
I_WtcMaster General interface of a WTC master axis.
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_AttachableMdInterface Interface for containerless machine data components.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.13.7 FB_WtcAccumulator

Implements an accumulator as the master for a WTC.

Syntax:
FUNCTION_BLOCK FB_WtcAccumulator EXTENDS FB_Axis

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_WtcAccumulator
AbortOnMissingVolume BOOL Get, Set TRUE The accumulator cancels the
command to push-out if the
filling volume is not reached.
FillinBusy BOOL Get FALSE The accumulator is filled.
FillingDone BOOL Get FALSE Filling of the accumulator has
been completed.

152 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


FillVolumeReached BOOL Get FALSE The filling volume has been
reached.
GuidingValue LREAL Get 0.0 Position as resulting camming
master value.
PushoutAborted BOOL Get FALSE The push-out process was
aborted.
PushoutBusy BOOL Get FALSE The push-out process is
running.
PushoutDone BOOL Get FALSE The push-out process is
complete.
UsePassiveFilling BOOL Get, Set TRUE Use passive filling:
The controller enable is
canceled for the filling
process, as the accumulator is
filled by the back pressure of
the extruder.
FB_Axis
Axis I_AxisBase Get - Interface to the assigned
TF8560 axis.
Homing I_Homing [} 41] Get - Homing functions
1
BaseAxisInterfaces I_AxisBase Get NULL Alias of Axis.
FB_Motion
Motion I_MotionBase Get NULL Interface to the assigned
TF8560 motion object.
ErrorAlarmTL TcEventSeverity Get, Set Error (3) Severity of the alarm that the
axis triggers in the error state.
Specific I_MotionSpecific [} 35] Get - Technology-specific functions/
values
FB_BaseMd
MachineData I_MdBaseContainer Get - Interface for machine data
[} 104] handling.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>
1
Obsolete

Methods

Name Description
Reset() Resets the error state of the class.
FB_WtcAccumulator
Filling(bCommand) Starts the filling process of the accumulator.
Pushout(bCommand) Starts the push-out process of the filling volume.
FB_Axis
SetPosition(bCommand) Setting the axis position with the FB_AxisHmi.Setpoistion.
1
SetAxisRef() Assignment method for the TF8560 axis.

TF85xx Version: 1.1.0 153


PLC-API - Class overview

Name Description
Alternative: .SetMotionRef().
FB_Motion
CheckAxisState() [} 34] Checks the current state of the axis.
FeedEnable(bFeedEnableP, Enable of a direction of movement.
bFeedEnableN)
JogNegative(bCommand) Starts/stops a jog movement in negative direction.
JogPositive(bCommand) Starts/stops a jog movement in positive direction.
Power(bCommand) Switching on the drive control.
SetMotionRef(iMotion) Assignment method for the TF8560 motion object.
FB_BaseMd
[PROTECTED] AddMdComp() Adds a component of type I_MdComponent to the machine data
container.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()
1
Obsolete

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
AccuStates() [} 155] Procedure for processing the states of the accumulator.

Possible events

ID Description Alarm/Message
11 Object error state Alarm
21 Command rejected Alarm
7000 Insufficient filling volume Alarm
10 Axis Errors Alarm
20 Axis command rejected Alarm

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_WtcAccumulator Standard interface on FB_WtcAccumulator.
I_WtcMaster General interface of a WTC master axis.
I_Axis Standard interface on FB_Axis.
I_Motion Standard interface on FB_Motion
I_TwoTaskInterface Runtime interface for two PLC tasks.
I_BaseMd Standard interface on FB_BaseMd.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

154 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.13.7.1 AccuStates()
Instance type Instance Name
Master fbAccuStates
Slaves aBaseSeqMembers[E_WtcAccuState.eLength]

State diagram:

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.13.8 FB_WtcAccumulatorHmi

HMI parallel class of FB_WtcAccumulator class.

Syntax:
FUNCTION_BLOCK FB_AccumulatorHmi EXTENDS FB_AxisHmi

Properties

Name Type Access Initial value Description


ActStartVolume LREAL Get, (Set) 0.0 Last used start volume (depending on
PushoutMode).

TF85xx Version: 1.1.0 155


PLC-API - Class overview

Name Type Access Initial value Description


ActTargetVolume LREAL Get, (Set) 0.0 Last used target volume (depending on
PushoutMode).
BufferVolume LREAL Get, Set 5.0 Buffer volume, which is always kept in
stock.
DelayPushout I_TimerHmi Get - Delay between starting and executing the
[} 133] push-out process.
FillingDone BOOL Get FALSE The filling process is complete.
FillVelocity LREAL Get, Set 10.0 Filling velocity for an active filling process.
ManualFillPush I_ManualFunct Get - HMI for the implementation of a manual
ionHmi [} 58] function.
PushoutDone BOOL Get FALSE The push-out process is complete.
PushoutLimiting LREAL Get, Set 0.0 Limitation (pressure/torque) for the push-
out process.
PushoutMode E_PushoutMo Get, Set eAdapted Mode of the push-out process.
de [} 156]
PushoutVolume LREAL Get, Set 50.0 The volume to be pushed out for a push-
out process.
The filling volume results from
PushoutVolume and BufferVolume.

Interfaces

Type Description
I_WtcAccumulatorHmi Standard interface on FB_WtcAccumulatorHmi.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.13.8.1 E_PushoutMode
Push-out mode for the push-out process of a WTC accumulator.

Syntax:
{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_PushoutMode :
(
eInvalid := 0,
eExact,
eAdapted,
eSpareFirst,
eSpareLast,
eComplete
);
END_TYPE

Values

Name Description
eInvalid Invalid setting.
eExact The precisely configured volume is pushed out.

156 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
Notice If the option AbortOnMissingVolume is not used, the fill level must
be checked in the sequence program.
eAdapted The available volume (except buffer) is pushed out.
eSpareFirst The excess is pushed out first and then the exact volume.
eSpareLast The exact volume is pushed out first and then the excess.
eComplete The entire volume is pushed out.
The "entire" volume includes the BufferVolume .

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14 Utilities

5.14.1 FB_AdaptableSequence

Allows variable extension of implemented procedures of a class. The class itself is used to manage all
sequences and to indicate the state of a single sequence with reference to the management (master).

Syntax:
FUNCTION_BLOCK FB_AdaptableSequence

Properties

Name Type Access Initial value Description


ActiveSeq I_AdaptableSeqItf Get THIS^ Interface to the current step of
the procedure.
Done BOOL Get, Set FALSE Indicates successful
processing of a procedure
step.
Failed BOOL Get, Set FALSE Indicates the failed execution
of a procedure step.
Index BOOL Get 0 Index of the class in relation to
the overall procedure.
IsActive BOOL Get FALSE The class is active as the
current sequence.
IsMaster BOOL Get TRUE The class is the management
object of a procedure.
Length INT Get 0 Length of the list of appended
procedure steps.
Next I_AdaptableSeqItf Get NULL Interface to the next step of
the procedure.
Tag I_FlexValue [} 171] Get <Local> Arbitrary value for saving
user-defined information.

TF85xx Version: 1.1.0 157


PLC-API - Class overview

Methods

Name Description
Append(iNew) Appends a step to the procedure.
Check() [} 158] Checks whether the current step of the procedure has been processed.
Clear() [} 159] Deletes all sequences from the master.
Exists() [} 159] Checks whether a sequence is included in the master.
Idx() [} 160] Returns the xth step from the procedure.
Insert() [} 160] Inserts a step in the procedure.
Jump() [} 161] Requests jumping to a sequence that does not follow.
Reset() Slave: Resets the state of the procedure step.
Master: Resets the progress of the entire procedure.
[INTERN] SetMaster(ipMaster) Assigns a master to the procedure step.
Notice Used by the Insert() method and does not need to be called
separately.

Interfaces

Type Description
I_AdaptableSeqItf Interface for implementation as slave.
I_AdaptableSeqState Interface for reading the sequence state.
I_AdaptableSeqQuery Advanced interface for editing by the master.
I_AdaptableSeqMaster Interface for implementation as master.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.1.1 Check()

Checks whether the current step of the procedure has been processed. If this is the case, the method also
causes switching to the next sequence.

Use is already integrated


This method is already implemented for existing instances in the TwinCAT 3 Plastic Base
Application. It is not recommended to use this method for checking within a sequence. A call of the
function is only necessary when a procedure is restarted.

Syntax:
METHOD Check : BOOL

158 Version: 1.1.0 TF85xx


PLC-API - Class overview

Outputs

Name Type Description


Check BOOL TRUE if the current step has been completed and the next
step is initiated.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.1.2 Clear()

Deletes all sequences from the master.

Syntax:
METHOD Clear : HRESULT

Outputs

Name Type Description


Clear HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.1.3 Exists()

Checks whether a process step is included in the master.

Syntax:
METHOD Exists : HRESULT
VAR_INPUT
iSeq: I_AdaptableSeqItf;
END_VAR

Inputs

Name Type Description


iSeq I_AdaptableSeqItf Process step to be checked

TF85xx Version: 1.1.0 159


PLC-API - Class overview

Outputs

Name Type Description


Exists HRESULT Return value with feedback on the success of the check

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.1.4 Idx()

Returns the xth step from the procedure.

Syntax:
METHOD Idx : I_AdaptableSeqItf
VAR_INPUT
nIdx: INT;
END_VAR

Inputs

Name Type Description


nIdx INT The requested index

Outputs

Name Type Description


Idx I_AdaptableSeqItf Found step of the procedure

Invalid indexes
To avoid exceptions caused by an invalid value on input nIdx, the function returns the master in
case of an error. Therefore, the method should be treated comparable to an array index by
considering the total length of the sequence list.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.1.5 Insert()

Adds another step to the procedure.

160 Version: 1.1.0 TF85xx


PLC-API - Class overview

Syntax:
METHOD Insert : HRESULT
VAR_INPUT
iCurrent: I_AdaptableSeqItf;
iNew: I_AdaptableSeqItf;
bOverwrite: BOOL;
END_VAR

Inputs

Name Type Description


iCurrent I_AdaptableSeqItf The current participant to be moved behind the new
participant.
iNew I_AdaptableSeqItf New participant to be added
bOverwrite BOOL TRUE if the current participant is not to be moved but
replaced.

Outputs

Name Type Description


Insert HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.1.6 Jump()

Requests jumping to a sequence that does not follow.

Request does not lead directly to execution


When the method is executed, only the request is stored in the master. To execute the jump, the
Done or Failed property of the active process step must be set and the Check() method must be
called.

See the Check() [} 158] method for more important notes.

Syntax:
METHOD Jump : HRESULT
VAR_INPUT
iTarget: I_AdaptableSeqItf;
END_VAR

Inputs

Name Type Description


iTarget I_AdaptableSeqItf Sequence to be jumped to

TF85xx Version: 1.1.0 161


PLC-API - Class overview

Outputs

Name Type Description


Jump HRESULT Return value with feedback on the success of the request

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.1.7 I_AdaptableSeqExt
Allows the implementation of procedure steps outside the procedure-implementing class.

Syntax:
INTERFACE I_AdaptableSeqExt EXTENDS I_BaseEmpty

Event-driven methods (callback methods)

Name Description
ExtAdaptSeq(bInit, iMaster) Called from the implemented procedure to process the procedure steps
outside.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.14.2 FB_CP22xx_1025

The class implements the I/O functions of the Beckhoff BlowMolding Panel CP2219-1025-0030.

Internal functions:
• Handling of the push buttons (incl. control of the colors).
• Processing the incremental encoder (incl. LED ring).
◦ See the explanation of the integration into the application here [} 284].
• Control of the info LED.

Syntax:
FUNCTION_BLOCK FB_CP22xx_1025 EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_CP22xx_1025

162 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


Button1 I_ButtonRGB [} 165] Get <Local> Push button 1 (Start)
Button2 I_ButtonRGB [} 165] Get <Local> Push button 2 (stop)
Button3 I_ButtonRGB [} 165] Get <Local> Push button 3 (acknowledge)
EStop I_Button [} 164] Get <Local> Emergency stop
Status I_RGBLed [} 168] Get <Local> Status LED
Wheel I_CP22xx_Wheel [} 166] Get <Local> Incremental encoder
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms).

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_CP22xx_1025 Standard interface on FB_CP22xx_1025.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

TF85xx Version: 1.1.0 163


PLC-API - Class overview

5.14.2.1 FB_Button

Implements a push button from a control panel.

Syntax:
FUNCTION_BLOCK FB_Button EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Button
Press I_InputDigital Get <Local> Digital input for button
actuation.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms).

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_Button Standard interface on FB_Button.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

164 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.2.2 FB_ButtonRGB

Implements a push button from a control panel with RGB indicator light.

Syntax:
FUNCTION_BLOCK FB_ButtonRGB EXTENDS FB_Button

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_ButtonRGB
Lamp I_RGBLed [} 168] Get <Local> Indicator lamp as RGB LED.
FB_Button
Press I_InputDigital Get <Local> Digital input for button
actuation.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

TF85xx Version: 1.1.0 165


PLC-API - Class overview

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms).

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_ButtonRGB Standard interface on FB_ButtonRGB.
I_Button Standard interface on FB_Button.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.2.3 FB_CP22xx_Wheel

Implements the CP22xx_1025 specific incremental encoder including the 10-segment LED ring.

Syntax:
FUNCTION_BLOCK FB_CP22xx_Wheel EXTENDS FB_ScaleHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_CP22xx_Wheel
Enc I_CP22xx_WheelEnc Get THIS^ Selective access to the
encoder functions.
FillMode BOOL Get, Set FALSE The LEDs fill up from
GuidingMid to
GuidingValue.
GuidingMax LREAL Get, Set 100.0 Maximum value of the
GuidingValue.
GuidingMid LREAL Get, Set 0.0 Value from which the LEDs fill.
Only active with FillMode.
GuidingMidWindow LREAL Get, Set 1.0 Tolerance window in which
the LEDs indicate a center
position.
Only active with FillMode.

166 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


GuidingMin LREAL Get, Set 0.0 Minimum value of the
GuidingValue.
GuidingValue LREAL Get, Set 0.0 Control value for the LED
display.
Leds I_CP22xx_WheelLed Get THIS^ Selective access to the LED
functions.
LimitOverflow BOOL Get, Set FALSE Limits the current position to
the limit values. The internal
overflow is deleted directly.
ModuloFactor LREAL Get, Set 24.0 Mask of the modulo position.
By default, the factor is set
to one revolution of the
encoder.
ModuloPos LREAL Get, Set 0.0 Modulo position
Position LREAL Get 0.0 Current position of the
encoder.
PositionMax LREAL Get, Set 0.0 Maximum position of the
encoder
Only active with
LimitOverflow
PositionMin LREAL Get, Set Minimum position of the
encoder.
Only active with
LimitOverflow.
PositionOffset LREAL Get, Set 0.0 Position offset of the encoder .
PositionRaw UDINT Get, Set 0.0 Raw position of the encoder.
PositionScale LREAL Get, Set 0.25 Scaling factor of the encoder
position.
Press I_InputDigital Get <Local> Digital input from pressing the
incremental encoder.
Velocity LREAL Get 0.0 Current velocity of the
encoder (filtered).
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_CP22xx_Wheel
SetPosition(fSetPos) Sets the encoder position to the transferred position value.
SetZero() Sets the encoder position to 0.
FB_ScaleHmi
[PROTECTED] XtoY(...) Scales a value x to a value y, using the minimum and maximum value of
both scales
FB_BaseHmi

TF85xx Version: 1.1.0 167


PLC-API - Class overview

Name Description
Init(ipBase) Default initialization method to pass the base class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms).

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_CP22xx_Wheel Sum interface on FB_CP22xx_Wheel.
I_CP22xx_WheelEnc Encoder functions of the FB_CP22xx_Wheel.
I_CP22xx_WheelLed LED functions of the FB_CP22xx_Wheel.
I_BaseHmi Standard interface on FB_BaseHmi.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.2.4 FB_RGBLed

Implements a push button from a control panel.

Syntax:
FUNCTION_BLOCK FB_RGBLed EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_RGBLed
Black BOOL Get, Set TRUE LED is off.

168 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Type Access Initial value Description


Blue BOOL Get, Set FALSE LED lights up blue.
Cyan BOOL Get, Set FALSE LED lights up cyan.
Green BOOL Get, Set FALSE LED lights up green.
LedBlue I_InputDigital Get <Local> Digital output of the blue
component of the RGB LED.
LedGreen I_InputDigital Get <Local> Digital output of the green
component of the RGB LED.
LedRed I_InputDigital Get <Local> Digital output of the red
component of the RGB LED.
Pink BOOL Get, Set FALSE LED lights up pink.
Red BOOL Get, Set FALSE LED lights up red.
White BOOL Get, Set FALSE LED lights up white.
Yellow BOOL Get, Set FALSE LED lights up yellow.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method - Call once per PLC cycle (default 10 ms).

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_RGBLed Standard interface on FB_RGBLed.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

TF85xx Version: 1.1.0 169


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.3 FB_CreateDirRecurse

Implements the FB_CreateDir function and calls it several times until all components of the transferred path
have been created.

Syntax:
FUNCTION_BLOCK FB_CreateDirRecurse EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_CreateDirRecurse
Busy BOOL Get FALSE The function is currently being
executed.
Error BOOL Get FALSE An error has occurred.
ErrorId UDINT Get FALSE ADS error code of the error
that has occurred.
Execute BOOL Get, Set FALSE Starts the execution of the
function.
NetId AMSNETID Get, Set [0,0,0,0,0,0] AMS (ADS) network ID.
NetIdString T_AmsNetID Get, Set ‘0.0.0.0.0.0‘ AMS (ADS) network ID.
PathName T_MaxString Get, Set ‘‘ Path to be created.
Timeout LREAL Get, Set 0.0 [s] Time-out period of the system
response of this function.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.

170 Version: 1.1.0 TF85xx


PLC-API - Class overview

Name Description
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_CreateDirRecurse Standard interfaces on FB_CreateDirRecurse.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.4 FB_FlexValue

Class (FB) comparable to the structured data type ST_FlexValue from TF8560. Represents a variable
without a specified data type.

Syntax:
FUNCTION_BLOCK FB_FlexValue

Properties

Name Type Access Initial value Description


Value U_FlexValue Get 0 Value as Union (all types).
ValueType E_FlexValue Get eBOOL Last assigned value data type
(except if assigned via
structure).
_BOOL BOOL Get, Set FALSE Value as BOOL.
_IBASE I_Base [} 25] Get, Set NULL Value as interface I_Base.
_INT INT Get, Set 0 Value as INT.
_LREAL LREAL Get, Set 0.0 Value as LREAL.

TF85xx Version: 1.1.0 171


PLC-API - Class overview

NOTICE
Online Change handling
The interpretation of the _IBASE value is not handled during an Online Change! It must be ensured that the
return value of the interface is a valid instance of a class!

Interfaces

Type Description
I_FlexValue Standard interface on FB_FlexValue.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.5 FB_LatchTrigger

Extends the FB_Trigger class by a memory function of the edges.

Syntax:
FUNCTION_BLOCK FB_LatchTrigger EXTENDS FB_Trigger

Properties

Name Type Access Initial value Description


LF BOOL Get FALSE A falling edge was present at
the input signal.
LR BOOL Get FALSE A rising edge was present at
the input signal.

Methods

Name Description
Reset() Resets LF and LR.

Interfaces

Type Description
I_LatchTrigger Standard interface on FB_LatchTrigger

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

172 Version: 1.1.0 TF85xx


PLC-API - Class overview

5.14.6 FB_LibVersion

Defines the structure of the version number of a library.

Syntax:
FUNCTION_BLOCK FB_LibVersion

Properties

Name Type Access Initial value Description


Version STRING Get 'v0.0.0.0' Version number as a textual
string.
FB_LibVersion
Build UDINT Get 0 Third digit of the version
number.
Major UDINT Get 0 First digit of the version
number.
Minor UDINT Get 0 Second digit of the version
number.
Released BOOL Get FALSE Version is marked as
'Released'.
Revision UDINT Get 0 Fourth digit of the version
number.
Version3 STRING Get 'v0.0.0' Version without the first digit
of the version number.

Methods

Name Description
Copy(iVersion) Adopts another version in this class.
FB_LibVersion
Increase(nPlace) Increases the version, depending on the transferred position.
IsEqualTo(iCompare) Compares if another version matches.
IsNewerThan(iCompare) Checks if this version is newer than the passed comparison version.
IsOlderThan(iCompare) Checks if this version is older than the passed comparison version.
SetVersion(…) Sets the version number.
SetVersionStruct(stVersion) Sets the version number based on a version of type ST_LibVersion.

Interfaces

Type Description
I_LibVersion Standard interface on FB_LibVersion.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

TF85xx Version: 1.1.0 173


PLC-API - Class overview

5.14.7 FB_LibVersionBeta

Defines the structure of the version number of a library, plus a beta tag. The property
FB_LibVersionBeta.Version thus presents itself as 'v5.3.32.9-beta554', for example.

Syntax:
FUNCTION_BLOCK FB_LibVersionBeta EXTENDS FB_LibVersion

Properties

Name Type Access Initial value Description


Version STRING Get 'v0.0.0.0' Version number as a textual
string.
FB_LibVersionBeta
BetaIteration UDINT Get, Set 0 Determines the beta iteration
of the version.
FB_LibVersion
Build UDINT Get 0 Third digit of the version
number.
Major UDINT Get 0 First digit of the version
number.
Minor UDINT Get 0 Second digit of the version
number.
Released BOOL Get FALSE Version is marked as
'Released'.
Revision UDINT Get 0 Fourth digit of the version
number.
Version3 STRING Get 'v0.0.0' Version without the first digit
of the version number.

Methods

Name Description
Copy(iVersion) Adopts another version in this class.
FB_LibVersion
Increase(nPlace) Increases the version, depending on the transferred position.
IsEqualTo(iCompare) Compares if another version matches.
IsNewerThan(iCompare) Checks if this version is newer than the passed comparison version.
IsOlderThan(iCompare) Checks if this version is older than the passed comparison version.
SetVersion(…) Sets the version number.
SetVersionStruct(stVersion) Sets the version number based on a version of type ST_LibVersion.

Interfaces

Type Description
I_LibVersion Standard interface on FB_LibVersion.
I_LibVersionBeta Standard interface on FB_LibVersionBeta.

174 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.14.8 FB_LimitMemory

The class analyzes the size of files in a directory. By setting limits, the files can be cleaned up as required by
deleting the oldest variants.

Syntax:
FUNCTION_BLOCK FB_LimitMemory EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_LimitMemory
Busy BOOL Get FALSE The function is currently being
executed.
Done BOOL Get FALSE The execution was successful.
ErrorId UDINT Get FALSE ADS error code of the error
that has occurred.
Filter T_MaxString Get, Set ‘‘ File filter that can contain
placeholders (* and ?).
LimitsExceeded BOOL Get FALSE The check has shown that the
set limits have been
exceeded.
MaxFiles UDINT Get, Set 0 Maximum number of files in
the directory.
MaxMemory LREAL Get, Set 0 [MB] Maximum memory size of the
files in the directory.
MemorySize LREAL Get 0 [MB] Current memory size of the
files in the directory.
NetId AMSNETID Get, Set [0,0,0,0,0,0] AMS (ADS) network ID
NetIdString T_AmsNetID Get, Set ‘0.0.0.0.0.0‘ AMS (ADS) network ID
NumFiles UDINT Get 0 Current number of files in the
directory.
Path T_MaxString Get ‘‘ Path to the target directory.
Timeout LREAL Get, Set 0.0 [s] Time-out period of the system
response of this function.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.

TF85xx Version: 1.1.0 175


PLC-API - Class overview

Name Type Access Initial value Description


[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_LimitMemory
Check(bExecute) Checks the size of the directory.
CheckWithClean(bExecute) Triggers the commands Check() and Clean() in succession.
Clean(bExecute) Cleans up the excess, starting with the oldest files.
FB_Base
SetHMI(ipBase) General assignment method for an FB_BaseHmi extending class.
Notice This method always fails in the FB_Base implementation.
Overwriting is therefore absolutely necessary.
[PROTECTED] Extracts the first part of the instance path as an object namespace.
_QueryNamespace()
[PROTECTED] Extracts the last part of the instance path as the object name.
_QueryObjectName()

Cycle methods

Name Description
Cyclic() Cycle method

Procedure controlling methods (FB_AdaptableSequence [} 157])

Name Description
States() [} 176] Procedure for executing the file check and cleanup.

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_LimitMemory Standard interface on FB_LimitMemory.
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.8.1 States()
Instance type Instance Name
Master fbStates
Slaves aBaseSeqMembers[E_LimitMemoryStates.eLength]

176 Version: 1.1.0 TF85xx


PLC-API - Class overview

State diagram:

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.9 FB_Parameter

Allows concatenation of multiple 64-bit floating point (LREAL) values with assignable name.

Syntax:
FUNCTION_BLOCK FB_Parameter EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Name STRING Get, Set '‘ Name of the parameter
Next I_Parameter Get, Set NULL Next item in the list
Root I_Parameter Get, Set THIS^ First element of the list
Value LREAL Get, Set 0.0 Value of the parameter

Methods

Name Description
Idx() Returns the element of the xth position of the list.

Exceptions avoidance
The Idx() function returns the first element (root) of the list on invalid requested index.

TF85xx Version: 1.1.0 177


PLC-API - Class overview

Interfaces

Type Description
I_Parameter Standard interface on FB_Parameter
I_ParameterQuery Extension of the I_Parameter interface with set access to next and root
properties

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.14.10 FB_ScaleHmi

Used as a common basis for scaling values.

Syntax:
FUNCTION_BLOCK FB_ScaleHmi EXTENDS FB_BaseHmi

Properties

Name Type Access Initial value Description


Name STRING Get, Set <SourceName Specifies the name of the
> class instance.
FB_Base
BaseState E_BaseState [} 26] Get eNotHandled Initialization state of the class
instance.
Error BOOL Get FALSE Class is in an error state.
ResultMessage I_AppMessage [} 117] Get - Access to the class internal
EventLogger.
[PROTECTED] _Name STRING Get <SourceName .Name without leading 'fb'.
>

Methods

Name Description
Reset() Resets the error state of the class.
FB_ScaleHmi
[PROTECTED] XtoY(...) Scales a value x to a value y, using the minimum and maximum value of
both scales
FB_BaseHmi
Init(ipBase) Default initialization method to pass the base class.

Interfaces

Type Description
I_Base Standard interface on FB_Base.
I_BaseHmi Standard interface on FB_BaseHmi.

178 Version: 1.1.0 TF85xx


PLC-API - Class overview

Type Description
I_BaseEmpty For extension without standard interface.
I_BaseDev Covers all methods and properties of the base class.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.11 FB_TableGeneratorAsciiFile

Implements a file read mechanism for a user-defined transformation table.

Formatting the file:

Drive Load
0.0 100.0
1.0 110.0
2.0 121.0
3.0 131.0
4.0 142.0

Drive points must be equidistant


The points of the drive side must be equidistant! Otherwise, all points between start and end will
shift to equidistant distances, resulting in unwanted inaccuracy.

Syntax:
FUNCTION_BLOCK FB_TableGeneratorAsciiFile EXTENDS Tc3_PlasticFunctions.FB_TrafoTableGenerator

Properties

Name Type Access Initial value Description


FilePath STRING Get, Set ‘‘ File path on the target system to the stored
description file
LoadHighEnd LREAL Get 0 Read highest point of the load side
LoadLowEnd LREAL Get 0 Read lowest point of the load side

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.14.12 FB_TrendHmi

TF85xx Version: 1.1.0 179


PLC-API - Class overview

Support class for the TwinCAT HMI SQLiteTrend with pre-implemented views. The TF8550 function
TcHmi.Functions.Plastic.UpdateTrend() is required for use. The selected view is additionally determined by
the property SelectedView. The following objects with corresponding interface can be attached to the
trend:

Type Display value


I_ExtruderHmi Actual turnrate of the extruder [RPM]
I_MonitoringHmi Monitoring value [any]
I_TempChannel Actual temperature of a temperature channel [°C]
I_Temperature Actual temperature of each grouped temperature channel [°C]
I_TempCtrlHmi 1 Temperature of each zone [°C]
1
Obsolete

Internal functions:
• The first x views are pre-reserved for displaying the temperature groups
◦ Default x := 5
◦ Automatically adapting to the set number of groups [} 188]
◦ When the FB_Temperature [} 72] group configuration is changed, the views are automatically
adapted as well
• All values attached via Append() are available for configuration by the ConfigXyz() methods

Syntax:
FUNCTION_BLOCK FB_TrendHmi EXTENDS FB_Base

Properties

Name Type Access Initial value Description


SelectedView INT Get, Set 0 Selected view

Methods

Name Description
Append() [} 181] Append a value to be recorded in the trend and selected in views.
AppendTempChannels() [} 181] Append the temperature zones of an FB_Temperature instance
CheckSupport() [PROTECTED] Checks the support of the appended object
ConfigDisplayName() [} 182] Overwrites the instance name of a display value.
ConfigDisplayLocalisation() [} 183] Overwrites the instance name with a localization key.
ConfigDisplayLocalisationNuget() Overwrites the instance name with a localization key from the
TF8550.Localisation package.
ConfigView() [} 183] Configures a value in a selectable view.
Idx() Returns the object at the xth position.
AppendTempZones() 1 Append the temperature zones of an FB_TempCtrl instance.
1
Obsolete

Exceptions avoidance
The Idx() function returns the first element (root) of the list on invalid requested index.

180 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.14.12.1 Append()

Appends a value to the trend.

Syntax:
METHOD Append : HRESULT
VAR_INPUT
iObj: I_Base;
nStandardView: INT;
nYAxisID: INT;
END_VAR

Inputs

Name Type Description


iObj I_Base Object to be included in the trend
nStandardView INT Standard view in which the value is displayed
nYAxisID INT Y-axis in the HMI on which the value is displayed

The YAxisID is predefined for the following units:

ID Unit Description
1 °C Temperature
2 A Current
3 Bar Pressure
4 RPM Turnrate

Outputs

Name Type Description


Append HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.12.2 AppendTempChannels()

Appends the temperature configuration to the trend. If the group configuration of all zones changes, this is
automatically taken over by FB_TrendHmi.

TF85xx Version: 1.1.0 181


PLC-API - Class overview

Syntax:
METHOD AppendTempChannels : HRESULT
VAR_INPUT
ipTemp: I_Temperature;
nYAxisID: INT;
END_VAR

Inputs

Name Type Description


ipTemp I_Temperature Instance of the temperature control class (FB)
nYAxisID INT Y-axis in the HMI on which the value is displayed

The YAxisID is predefined for the following units:

ID Unit Description
1 °C Temperature
2 A Current
3 Bar Pressure
4 RPM Turnrate

Outputs

Name Type Description


AppendTempChannels HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

5.14.12.3 ConfigDisplayName()

Adjusts the display name for a trend value.

Syntax:
METHOD ConfigDisplayName : HRESULT
VAR_INPUT
iObj: I_Base;
sName: STRING(255);
bAppend: BOOL;
END_VAR

Inputs

Name Type Description


iObj I_Base Object whose name is to be adjusted
sName STRING(255) String to be displayed
bAppend BOOL Passed string is to be appended to the existing display
name.

182 Version: 1.1.0 TF85xx


PLC-API - Class overview

Outputs

Name Type Description


ConfigDisplayName HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.12.4 ConfigDisplayLocalisation()

Adjusts the display name for a trend value.

Syntax:
METHOD ConfigDisplayName : HRESULT
VAR_INPUT
iObj: I_Base;
sLocalisation: STRING(255);
bAppend: BOOL;
END_VAR

Inputs

Name Type Description


iObj I_Base Object whose name is to be adjusted
sLocalization STRING(255) Localization key to be displayed
bAppend BOOL Passed localization key is to be appended to the existing
display name.

Outputs

Name Type Description


ConfigDisplayLocalisati HRESULT Return value with feedback on the success of the execution
on

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.12.5 ConfigView()

Changes the composition of a selectable view.

TF85xx Version: 1.1.0 183


PLC-API - Class overview

Syntax:
METHOD ConfigView : HRESULT
VAR_INPUT
iObj: I_Base;
nViewIdx: INT;
bShow: BOOL;
END_VAR

Inputs

Name Type Description


iObj I_Base Object to be adjusted in a view
nViewIdx INT View (ID) to be customized
bShow BOOL Object is displayed (TRUE).

Outputs

Name Type Description


ConfigView HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.13 FB_Trigger

Combines triggers of type R_TRIG and F_TRIG with object-oriented interface.

Syntax:
FUNCTION_BLOCK FB_Trigger

Properties

Name Type Access Initial value Description


CLK BOOL Get, Set FALSE Sampled input signal
FQ BOOL Get FALSE Input signal has a falling edge.
Q BOOL Get FALSE Input signal has a rising or
falling edge.
RQ BOOL Get FALSE Input signal has a rising edge.

Methods

Name Description
Cyclic() Cycle method by which the signal is sampled

Interfaces

Type Description
I_Trigger Standard interface on FB_Trigger

184 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.14 F_BaseDirectory

Creates the path to the default directory of the Plastic Base Application.

Syntax:
FUNCTION F_BaseDirectory : T_MaxString

Outputs

Name Type Description


F_BaseDirectory T_MaxString Path to the default directory.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.15 F_CutDecimals

Truncates the decimal places of a floating point number.

Syntax:
FUNCTION F_CutDecimals : LREAL

Inputs

Name Type Description


fValue LREAL Value whose decimal places are truncated.
nDecimals UINT Number of decimal places to be retained.

Outputs

Name Type Description


F_CutDecimals LREAL Value with truncated decimal places.

TF85xx Version: 1.1.0 185


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.16 F_GetCycleTime()

Returns the cycle time of the calling task as LREAL floating point value in seconds.

Syntax:
FUNCTION F_GetCycleTime : LREAL

Outputs

Name Type Description


F_GetCycleTime LREAL Cycle time in seconds as floating point value

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

5.14.17 F_Round

Rounds the decimal places of a floating point number.

Syntax:
FUNCTION F_Round : LREAL

Inputs

Name Type Description


fValue LREAL Value whose decimal places are truncated.
nDecimals UINT Number of decimal places to be retained.

Outputs

Name Type Description


F_Round LREAL Value with rounded decimal places.

186 Version: 1.1.0 TF85xx


PLC-API - Class overview

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.14.18 F_TryDivide()

Divides two values without throwing an exception.

Return value mathematically invalid


The function defines the mathematically invalid case x / 0 as 0. This is a mathematically invalid
result, but is sufficient for many use cases. Check for your use case whether this definition does not
lead to unforeseen misbehavior.

Syntax:
FUNCTION F_TryDivide : HRESULT
VAR_INPUT
fNominator: LREAL;
fDenominator: LREAL;
refResult: REFERENCE TO LREAL;
END_VAR

Inputs

Name Type Description


fNominator LREAL Value to be divided
fDenominator LREAL Value by which to divide
refResult REFERENCE TO Result of the division
LREAL

Outputs

Name Type Description


F_TryDivide HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.4)

5.14.19 T_PlasticStatus
Status variable for linking to a TF8550 StateIndicator. This variable is interpreted bit by bit.

Syntax:
TYPE T_PlasticStatus : BYTE; END_TYPE

TF85xx Version: 1.1.0 187


PLC-API - Class overview

Values

bit Description
0 Successful (Green)
1 Warning (Orange)
2 Error (Red)
3 Reserved
4 Reserved
5 Reserved
6 Reserved
7 State is invalid

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

5.15 Setting parameters - Tc3_PlasticBaseAppStaticParams


Static parameter list of the Tc3_PlasticBaseApplication.

Syntax:
{attribute 'qualified_only'}
VAR_GLOBAL CONSTANT
// ===============================================================
// available

// Static motion paramters


{attribute 'TcHmiSymbol.Hide'}
cnMaxTrafoPoints: INT:=181;
{attribute 'TcHmiSymbol.Hide'}
cnNoOfCammmingPoints: INT:=400;
{attribute 'TcHmiSymbol.Hide'}
cnMaxPtpPoints: INT:=6;
{attribute 'TcHmiSymbol.Hide'}
cnMaxMoveCluster: INT:=2;
{attribute 'TcHmiSymbol.Hide'}
cnMaxPtpCams: INT:=5;

// Static temperature parameters


{attribute 'TcHmiSymbol.Hide'}
cnTempGroups: INT := 5;
{attribute 'TcHmiSymbol.Hide'}
cnTempTimers: INT := 30;

// Trend
{attribute 'TcHmiSymbol.Hide'}
cnTrendSize: INT := 50;

// Logger
{attribute 'TcHmiSymbol.Hide'}
cnLoggerBufferSize: UINT := 100;

// Runtime handling
{attribute 'TcHmiSymbol.Hide'}
cnRuntimeObjects: INT := 100;
// maximum of global alarms active at the same time
{attribute 'TcHmiSymbol.Hide'}
cnMaxAlarms: UINT := 50;

// Data on FileSystem
{attribute 'TcHmiSymbol.Hide'}
csHardDisk: STRING := 'C:';
{attribute 'TcHmiSymbol.Hide'}
csDataFolderName: STRING := 'Data\Machine';

188 Version: 1.1.0 TF85xx


PLC-API - Class overview

{attribute 'TcHmiSymbol.Hide'}
csMachineName: STRING := 'Beckhoff';

// obsolete support
{attribute 'TcHmiSymbol.Hide'}
cbSupportObsoleteVars: BOOL := FALSE;

// ===============================================================
// obsolete

{attribute 'hide'}
cnNoOfTrafoPoints: INT := cnMaxTrafoPoints;
{attribute 'hide'}
cnTempZonesPerGroup: INT := 20;

// ===============================================================
END_VAR

Values

Name Description Default


cnMaxTrafoPoin Maximum number of transformation points for the buffer for loading a table 181
ts from a file.
cnNoOfCammin Standard number of points on a cam plate (e.g. for using the TF8550 400
gPoints CurveEditor).
cnMaxPtpPoints Maximum number of PTP segments. 6
cnMaxMoveClus Maximum number of clusters (Grouped PTP segments). 2 (Work-/
ter Basepos)
cnMaxPtpCams Maximum number of PTP cams per cluster. 5
cnTempGroups Number of available temperature groups. 5
cnTempTimers Number of weekly timings for scheduling the temperature control. 30
cnTrendSize Maximum number of trend values that can be historized. 50
cnLoggerBufferS Size of the buffer of FB_CsvBase [} 117] derived logger classes. 100
ize
cnRuntimeObjec Number of control objects that can be appended to the runtime. 100
ts
cnMaxAlarms Maximum number of alarms that can be active at the same time. 50
csHardDisk Machine data: Target drive. C:
csDataFolderNa Machine data: Target folder on the target drive. Data\Machine
me
csMachineName Machine data: Abbreviation for the identification of a machine data file. Beckhoff
cbSupportObsol Supports the previous handling of hidden internal variables of a class, FALSE
eteVars which are no longer used by the current algorithm due to changes.

Requirements

Development environment Target platform PLC libraries to include


TwinCAT >= v3.1.4024.54 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.7.0)
(recommended)
TwinCAT >= v3.1.4024.42
(required)

TF85xx Version: 1.1.0 189


HMI project structure

6 HMI project structure


The Plastic Application HMI project is a project developed in TwinCAT HMI with basic functionalities for
creating user interfaces for plastics processing machines. The project structure is based on the standard of a
TwinCAT HMI project.

Use and further development of the Plastic Application HMI

Since the Plastic Application HMI project does not provide a fully comprehensive user interface for every
plastics processing machine, the project must be adapted to specific machines. For this purpose, the project
can be extended and modified as desired.

Update capability of the Plastic Application HMI


Editing the Plastic Application HMI can lead to an impairment of the update capability. This may
affect the support provided by Beckhoff Automation.

6.1 References
NuGet packages can be added to the project under the References folder via the NuGet package
management system.

TF8550 | Plastic HMI Framework

The following NuGet packages from the product can be used specifically for plastics processing machines:

NuGet package Description


Beckhoff.TwinCAT.HMI.Plastic.Controls Addition to the NuGet package
Beckhoff.TwinCAT.HMI.Controls to extend the
toolbox with specific controls for plastic processing
machines (e.g. ArrowMotionGraph, CamControl,
PfwSingleTempControl etc.).
Beckhoff.TwinCAT.HMI.Plastic.Functions Complementary functions for the project.
Beckhoff.TwinCAT.HMI.Plastic.Images Contains the icons and graphics used in the Plastic
Application HMI project, as well as other resources
for plastic processing machines.
Beckhoff.TwinCAT.HMI.Plastic.Localizations Contains the language keys used in the Plastic
Application HMI project with translations in English
and German specifically for plastics processing
machines.
Beckhoff.TwinCAT.HMI.Plastic.RecipeHelper Addition to the NuGet package
Beckhoff.TwinCAT.HMI.RecipeManagement to
extend the Recipe Management extension.
Beckhoff.TwinCAT.HMI.Plastic.Temperature Addition to the NuGet package
Beckhoff.TwinCAT.HMI.Plastic.Controls to extend the
toolbox with controls and functions in the temperature
area.
Beckhoff.TwinCAT.HMI.Plastic.Themes Adds a Plastic theme to the themes and includes
special design adjustments for the Plastic Application
HMI project.

Using TwinCAT HMI with the TF8550 NuGet packages

The NuGet packages of the TF8550 product can be integrated into any TwinCAT HMI project. For this
purpose, the corresponding license for TF8550 is required in the PLC. The package provides the NuGet
packages described in chapters. The NuGet packages can be included via the NuGet package management
system. To do this, the package source under which the NuGet packages are located must be included.
After that, the NuGet packages can be located and installed via the search. The installed NuGet packages
are available in the project after a restart of the project.

190 Version: 1.1.0 TF85xx


HMI project structure

The Configurator control is part of the Beckhoff.TwinCAT.HMI.Plastic.Controls NuGet package


and can be dragged onto a view or content via the toolbox. The control is used to set specific functions and
the appearance of some other controls that are in the same NuGet package. The control only needs to exist
with the desired parameters, but has no other functionality and therefore does not need to be visible.

Requirements for TC3 Plastic Application

Version TE2000 | TwinCAT 3 HMI Engineering TF8550 | Plastic HMI Framework


V12.7.0 v12.760.59 v12.12.0
• Beckhoff.TwinCAT.HMI.Controls • Beckhoff.TwinCAT.HMI.Plastic.Controls
(12.760.59) (12.12.0)
• Beckhoff.TwinCAT.HMI.EventLogger • Beckhoff.TwinCAT.HMI.Plastic.Functions
(19.0.120) (12.12.0)
• Beckhoff.TwinCAT.HMI.Framework • Beckhoff.TwinCAT.HMI.Plastic.Images
(12.760.59) (12.12.0)
• Beckhoff.TwinCAT.HMI.Functions • Beckhoff.TwinCAT.HMI.Plastic.Localizations
(12.760.59) (12.12.0)
• Beckhoff.TwinCAT.HMI.RecipeManagement • Beckhoff.TwinCAT.HMI.Plastic.RecipeHelpe
(19.0.120) r (12.12.0)
• Beckhoff.TwinCAT.HMI.ResponsiveNavigati • Beckhoff.TwinCAT.HMI.Plastic.Temperature
on (12.760.59) (12.12.0)
• Beckhoff.TwinCAT.HMI.SqliteHistorize • Beckhoff.TwinCAT.HMI.Plastic.Themes
(19.0.120) (12.12.0)
v12.6.0 v12.760.44 v12.8.0
• Beckhoff.TwinCAT.HMI.Controls • Beckhoff.TwinCAT.HMI.Plastic.Controls
(12.760.44) (12.8.0)
• Beckhoff.TwinCAT.HMI.EventLogger • Beckhoff.TwinCAT.HMI.Plastic.Functions
(19.0.102) (12.8.0)
• Beckhoff.TwinCAT.HMI.Framework • Beckhoff.TwinCAT.HMI.Plastic.Images
(12.760.44) (12.8.0)
• Beckhoff.TwinCAT.HMI.Functions • Beckhoff.TwinCAT.HMI.Plastic.Localizations
(12.760.44) (12.8.0)
• Beckhoff.TwinCAT.HMI.RecipeManagement • Beckhoff.TwinCAT.HMI.Plastic.RecipeHelpe
(19.0.102) r (12.8.0)
• Beckhoff.TwinCAT.HMI.ResponsiveNavigati • Beckhoff.TwinCAT.HMI.Plastic.Temperature
on (12.760.44) (12.8.0)
• Beckhoff.TwinCAT.HMI.SqliteHistorize • Beckhoff.TwinCAT.HMI.Plastic.Themes
(19.0.102) (12.8.0)
v12.5.1 v12.758.8 v12.6.0
• Beckhoff.TwinCAT.HMI.Controls (12.758.8) • Beckhoff.TwinCAT.HMI.Plastic.Controls
• Beckhoff.TwinCAT.HMI.EventLogger (12.6.0)
(19.0.0) • Beckhoff.TwinCAT.HMI.Plastic.Functions
• Beckhoff.TwinCAT.HMI.Framework (12.6.0)
(12.758.8) • Beckhoff.TwinCAT.HMI.Plastic.Images
• Beckhoff.TwinCAT.HMI.Functions (12.6.0)
(12.758.8) • Beckhoff.TwinCAT.HMI.Plastic.Localizations
• Beckhoff.TwinCAT.HMI.RecipeManagement (12.6.0)
(19.0.0) • Beckhoff.TwinCAT.HMI.Plastic.RecipeHelpe
• Beckhoff.TwinCAT.HMI.ResponsiveNavigati r (12.6.0)
on (12.758.8) • Beckhoff.TwinCAT.HMI.Plastic.Temperature
• Beckhoff.TwinCAT.HMI.SqliteHistorize (12.6.0)
(19.0.0) • Beckhoff.TwinCAT.HMI.Plastic.Themes
(12.6.0)

TF85xx Version: 1.1.0 191


HMI project structure

6.2 Themes
In the folder Themes you will find the Plastic theme. The Plastic theme references the
Beckhoff.TwinCAT.HMI.Plastic.Themes NuGet package and includes design adaptations of existing
controls and classes used in the Plastic Application HMI project. The file can be customized to change the
design as desired, as long as it has been loaded into the project.

Update capability of the Plastic Application HMI


Editing the Plastic Application HMI can lead to an impairment of the update capability. This may
affect the support provided by Beckhoff Automation.

Available from version 12.5.1

6.3 Contents
The folder Contents contains in further subfolders all existing pages or .content files of the project. The
contents are built according to certain structures. These are only recommendations.

The folder Contents/Navigation contains all Contents categorized in folders that can be found in the
navigation of the Plastic Application HMI project.

192 Version: 1.1.0 TF85xx


HMI project structure

TF85xx Version: 1.1.0 193


HMI project structure

The Contents/Popup folder contains all contents that appear as pop-up windows in the Plastic Application
HMI project.

The folder Contents/Slider contains all contents categorized in folders that are applied in the slider area of
the Plastic Application HMI project.

194 Version: 1.1.0 TF85xx


HMI project structure

The subfolders of the two folders Contents/Navigation and Contents/Slider have the same structure in order
to recognize the affiliation of the contents from the slider area and the contents of the main area (contained
in the navigation).

As desired, additional files of the type .content can be created or the existing contents can be deleted or
edited.

Update capability of the Plastic Application HMI


Editing the Plastic Application HMI can lead to an impairment of the update capability. This may
affect the support provided by Beckhoff Automation.

TF85xx Version: 1.1.0 195


HMI project structure

Naming controls

The naming (Identifier) of the controls within a content is done according to a special scheme to avoid
duplicate naming, as this leads to errors.

The naming in the Plastic Application HMI project follows the following scheme:
ContentName_XYZ_ControlType

1. ContenName
The name, i.e. the ID of the content (the identifier of the control of type
TcHmi.Controls.System.TcHmiContent).
◦ Example: Temperature_Parameter_Settings
2. XYZ
Any description of the control is possible. The hierarchical arrangement within the content can be
observed.
◦ Example: Group1_Active_On
3. ControlType
Type of the control. An abbreviation is used.
◦ Example: For the control of type TcHmi.Controls.Beckhoff.TcHmiButton the abbreviation
Button would be used.

Result: "Temperature_Parameters_Settings_Group1_Active_On_Button" is the ID of the described button


on the content Temperature_Parameter_Settings.content with the previously described scheme.

Overview of controls with possible abbreviations

Control type Abbreviation


TcHmi.Controls.Beckhoff.TcHmiButton Button
TcHmi.Controls.Beckhoff.TcHmiCheckbox Checkbox
TcHmi.Controls.Beckhoff.TcHmiCombobox Combobox
TcHmi.Controls.Beckhoff.TcHmiDatagrid Datagrid
TcHmi.Controls.Beckhoff.TcHmiEllipse Ellipse
TcHmi.Controls.Beckhoff.TcHmiEventGrid EventGrid
TcHmi.Controls.Beckhoff.TcHmiEventLine EventLine
TcHmi.Controls.Beckhoff.TcHmiLine Line
TcHmi.Controls.Beckhoff.TcHmiLinearGauge LinearGauge
TcHmi.Controls.Beckhoff.TcHmiLocalizationSelect LocalizationSelect
TcHmi.Controls.Beckhoff.TcHmiRadialGauge RadialGauge
TcHmi.Controls.Beckhoff.TcHmiRadioButton RadioButton
TcHmi.Controls.Beckhoff.TcHmiRectangle Rectangle
TcHmi.Controls.Beckhoff.TcHmiObjectBrowser ObjectBrowser
TcHmi.Controls.Beckhoff.TcHmiStateImage StateImage
TcHmi.Controls.Beckhoff.TcHmiTextblock Text block
TcHmi.Controls.Beckhoff.TcHmiTextbox Text box
TcHmi.Controls.Beckhoff.TcHmiToggleButton ToggleButton
TcHmi.Controls.Beckhoff.TcHmiToggleSwitch ToggleSwitch
TcHmi.Controls.Beckhoff.TcHmiTrendLineChart TrendLineChart
TcHmi.Controls.Beckhoff.TcHmiUserManagement UserManagement
TcHmi.Controls.FavoriteBarControl.FavoriteBarControl FavoriteBar /
FavoriteBarControl
TcHmi.Controls.Plastic.ArrowMotionGraphControl ArrowMotionGraph /
ArrowMotionGraphControl
TcHmi.Controls.Plastic.BlowPressureChart BlowPressureChart
TcHmi.Controls.Plastic.CamControl Cam / CamControl

196 Version: 1.1.0 TF85xx


HMI project structure

Control type Abbreviation


TcHmi.Controls.Plastic.Configurator Configurator
TcHmi.Controls.Plastic.CurveEditorControl CurveEditor /
CurveEditorControl
TcHmi.Controls.Plastic.InputBox InputBox
TcHmi.Controls.Plastic.ManualOperation ManualOperation
TcHmi.Controls.Plastic.MeasurementUnitSelector MeasurementUnitSelector
TcHmi.Controls.Plastic.MonitoringControl Monitoring / MonitoringControl
TcHmi.Controls.Plastic.PfwSingleTempControl PfwSingleTempControl
TcHmi.Controls.Plastic.PfwTempParameters PfwTempParameters
TcHmi.Controls.Plastic.ProcessScheduler ProcessScheduler
TcHmi.Controls.Plastic.StateIndicator StateIndicator
TcHmi.Controls.Plastic.Table Table
TcHmi.Controls.Plastic.TimerControl Timer / TimerControl
TcHmi.Controls.Plastic.UserLoggingViewer UserLoggingViewer
TcHmi.Controls.Plastic.ZoneConfiguration ZoneConfiguration
TcHmi.Controls.Plastic.ZoneGrouping ZoneGrouping
TcHmi.Controls.Plastic.ZoneImageLayout ZoneImageLayout
TcHmi.Controls.ResponsiveNavigation.TcHmiBreadcrumb Breadcrumb
TcHmi.Controls.ResponsiveNavigation.TcHmiNavigationBar NavigationBar
TcHmi.Controls.ResponsiveNavigation.TcHmiNavigationContent NavigationContent
TcHmi.Controls.System.TcHmiContainer Container
TcHmi.Controls.System.TcHmiContent Content
TcHmi.Controls.System.TcHmiGrid Grid
TcHmi.Controls.System.TcHmiPopup Popup
TcHmi.Controls.System.TcHmiRegion Region
TcHmi.Controls.System.TcHmiView View

Standard Content structure

Most contents are built using grids. The grids make it easier to align the other controls that are in that grid to
allow for the tile design that is consistent throughout the project. The contents or controls added to the grid
are also arranged in smaller grids to make it easier to align the controls contained within a tile. The grid,
which is to represent a tile, can be assigned the CSS class from the
Beckhoff.TwinCAT.HMI.Plastic.Themes NuGet package with the name Tiles via the ClassNames
property of the Common category to color the background color white, round the corners and add a slight
shadow. Using the CSS class TilesHeadline from the same NuGet package, you can quickly customize
the appearance of the text block for the tile heading. The class colors the background of the text block in an
appropriate shade of gray, the text color becomes white and the corners are adjusted according to the tile. A
height of 45 px is usually used for the heading text block.

Use of grids

When using grids in grids, pay attention to the Z-index of the controls. If a control (e.g. a TcHmiGrid) is
located within a TcHmiGrid control and its size exceeds the specified range of the corresponding location in
the grid, this may mean that some contained controls (such as TcHmiButton controls) can no longer be
operated. Thus, the Zindex property of the Layout category of the control that is inside a grid should be
given a higher value. For the outer grid, for example, the Zindex property can be set to 0.

Special case: Creation of multiple pages in one content

The content intended for the slider area can be larger than the actual available space. Thus, for example, the
width of the content can be twice as wide as the actual available space of the TcHmiRegion control if a
second page is to be created. By changing the Left properties from the Layout category, the included grid
that fills the entire content will be shifted accordingly to display the specific content that is desired. This can
be done, as in the Plastic Application HMI project, using controls of type TcHmiRadioButton.

TF85xx Version: 1.1.0 197


HMI project structure

Example: Manual functions [} 202]

Available from version 12.6.0

6.3.1 Start page


Home.content

The start page of the user interface consists of a collection of important data and information. The page
contains the following components:

1. Display of the most important process data


2. Display of the most important production data
3. Field for entering notes
4. Switching using the radio button to display the machine graphic with the most important actual values
5. Switching using the radio button to display the trend values of the main extruder

1 2 3

4 5

198 Version: 1.1.0 TF85xx


HMI project structure

TF85xx Version: 1.1.0 199


HMI project structure

Available from version 12.6.0

6.3.2 Navigation
Navigation.content

The navigation page is called in the slider area via the 1st tab. It consists of controls from the NuGet
package Beckhoff.TwinCAT.HMI.ResponsiveNavigation. The TcHmiNavigationBar control is used
to define the pages that appear in the navigation and to display the top categories. In addition, the following
controls must be set:
• TcHmiNavigationContent: Display the available pages in the navigation depending on the selected
category in the TcHmiNavigationBar control (also located on the Navigation.content)
• TcHmiRegion: Area for displaying the selected content (main content of View [} 258])
• TcHmiBreadcrumb: Display of the breadcrumb (located directly on the View [} 258])

The MenuData property of the Common category of the TcHmiNavigationBar control is used to determine the
navigation content. This property can be connected to the NavBarMenuData property of the Configurator
control. This means that all settings related to navigation can be made in the NavigationConfig property
of the Configurator control and do not have to be set multiple times.

200 Version: 1.1.0 TF85xx


HMI project structure

Available from version 12.6.0

6.3.3 Info
Info.content

The info page contains the most important machine data. This page is displayed in the slider area with the
info tab (2nd tab). The page must be adapted to the specific machine. The variables are assigned to the
corresponding machine components with the help of icons. The page contains the following components:

1. One of the temperatures is outside of the set tolerance.


2. Torque and position of the carriage.
3. Torque and position of the clamping unit.
4. Torque and position of the blow pin.
5. Blowing time and blowing pressure of the blowing process.
6. Melt temperature, melt pressure, current, and turn rate of the main extruder.
7. Current and turn rate of the co-extruder.
8. Index and position of the WTC.
9. Index and position of the accumulator (only visible when the accumulator is in use).

1 2 3 4 5

6 7 8 9

Available from version 12.5.1

TF85xx Version: 1.1.0 201


HMI project structure

6.3.4 Manual functions


ManualFunctions.content

The manual function page contains all manual functions and must be adapted to the specific machine. This
page is displayed in the slider area with the Manual tab (3rd tab). With the help of the ManualOperation
controls and the instances of the type FB_ManualFunctionHmi [} 58], controls for manual functions can easily
be created. The content is divided into three pages.

The first page contains the following components:

1. Changing the operation mode and resetting the entire application.


2. Switching the automatic mode on and off and moving the axes to the base position.
3. Select temperature mode of group 1.
4. Select temperature mode of group 2.
5. Select temperature mode of group 3.

1 2 3 4 5

1 2 3 4 5

The second page contains the following components:

1. Switching on the main extruder and increasing and decreasing the turn rate.
2. Switching on the co-extruder and increasing and decreasing the turn rate.
3. Movement of the carriage.
4. Movement of the clamping unit.
5. Movement of the blow pin.

202 Version: 1.1.0 TF85xx


HMI project structure

1 2 3 4 5

1 2 3 4 5

The third page contains the following components:

1. Switching on the WTC.


2. Switching on the accumulator, filling the accumulator and pushing out the accumulator filling (only
visible when the accumulator is in use).
3. Cut hose.
4. Drive removal backwards and forwards.

1 2 3 4

1 2 3 4

TF85xx Version: 1.1.0 203


HMI project structure

Available from version 12.6.0

6.3.5 Axes
The folders named Axes (Contents/Navigation/Axes and Contents/Slider/Axes) contain all contents needed
for the axes of the machine. This includes a subfolder for each of the three axes included in the project (blow
pin [} 204], carriage [} 208] and clamping unit [} 208]) as well as a common oscilloscope page [} 209] for all
axes.

6.3.5.1 Blow pin


The folders named Blowpin (Contents/Navigation/Axes/Blowpin and Contents/Slider/Axes/Blowpin) contain
all contents needed for the blow pin.

Content Description
Blowpin.content [} 204] The main page of the blow pin.
Blowpin_Settings.content [} 204] Displayed in the slider area under the 4th tab when
Blowpin.content is in the main area.
Blowpin_Homing.content [} 206] The homing page of the blow pin.
Blowpin_Homing_Settings.content [} 206] Displayed in the slider area under the 4th tab when
Blowpin_Homing.content is in the main area.

6.3.5.1.1 Movement

Blowpin.content

The main page of the blow pin consists on the one hand of the use of the ArrowMotionGraph control and is
used to set and display the blow pin movement in segments. The control allows the adjustment of velocity
and position, acceleration and deceleration, as well as in both directions of movement with up to 5 segments
each.

On the other hand, the blow pin main page contains the cam control twice, once for each direction of
movement of the axis. The two controls are used to set and display the cams by entering the length and
position per segment. Up to 5 segments can be added per control.

204 Version: 1.1.0 TF85xx


HMI project structure

Blowpin_Settings.content

In addition to the main page of the blow pin there is a supplementary page for the slider area. The content is
divided into two pages.

The first page contains the following components:

1. Activating and resetting the settings and add and remove segments of the blow pin movement
2. Activating and resetting the settings of the cams in the downward movement of the blow pin
3. Activating and resetting the settings of the cams in the upward movement of the blow pin
4. Area for navigation to other related pages

TF85xx Version: 1.1.0 205


HMI project structure

1 2 4

The second page contains the following components:

1. Setting velocity values


2. Setting torques for clamping

1 2

Available from version 12.6.0

6.3.5.1.2 Homing

Blowpin_Homing.content

The homing page for the blow pin consists of the following components:

1. Homing block
2. Homing block detection
3. Homing finish
4. Encoder zero offset shift

Using the function UpdateAxesHomingUnits from the Beckhoff.TwinCAT.HMI.Plastic.Functions


NuGet package, certain units of the values are converted to angle unit groups if it is a transformed axis.

206 Version: 1.1.0 TF85xx


HMI project structure

1 2

3 4

Blowpin_Homing_Settings.content

Supplementary to the homing page of the blow pin, there is page for the slider area. This page contains the
following components:

1. Homing status display


2. Homing functions
3. Aborting the homing
4. Activation of the storage option

TF85xx Version: 1.1.0 207


HMI project structure

1 2 3

Available from version 12.6.0

6.3.5.2 Carriage
The folders named Carriage (Contents/Navigation/Axes/Carriage and Contents/Slider/Axes/Carriage)
contain all contents needed for the carriage.

Content Description
Carriage.content The main page of the carriage.
Carriage_Settings.content Displayed in the slider area under the 4th tab when
Carriage.content is in the main area.
Carriage_Homing.content The homing page of the carriage.
Carriage_Homing_Settings.content Displayed in the slider area under the 4th tab when
Carriage_Homing.content is in the main area.

The contents have almost the same structure as the contents of the Blow pin [} 204] axis.

6.3.5.3 Clamping unit


The folders named Clamp (Contents/Navigation/Axes/Clamp and Contents/Slider/Axes/Clamp) contain all
the contents required for the clamping unit.

Content Description
Clamp.content The main page of the clamping unit.
Clamp_Settings.content Displayed in the slider area under the 4th tab when
Clamp.content is in the main area.
Clamp_Homing.content The homing page of the clamping unit.
Clamp_Homing_Settings.content Displayed in the slider area under the 4th tab when
Clamp_Homing.content is in the main area.

The contents have almost the same structure as the contents of the blow pin [} 204] axis.

208 Version: 1.1.0 TF85xx


HMI project structure

6.3.5.4 Oscilloscope

Scope.content

The oscilloscope page is used to display the following historized symbol values per axis:
• Actual value of the position.
• Actual value of the velocity.
• Actual value of the torque.

The function UpdateScope is triggered from the Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet


package with the TcHmiToggleButton controls. The function ensures that the TcHmiTrendLineChart control
adapts to the selected axis:

1. Blow pin
2. Carriage
3. Clamp
4. WTC
5. Accumulator (only visible when the accumulator is in use)

In addition, an icon for the respective axis can be displayed via the TcHmiStateImage control.

1 2 3 4 5

Available from version 12.6.0

6.3.6 Extruder
The folders named Extruder (Contents/Navigation/Extruder and Contents/Slider/Extruder) contain all the
contents needed for the extruders.

Content Description
Extruder.content [} 210] The extruder overview page.
MainExtruder.content [} 211] The page for the main extruder.

TF85xx Version: 1.1.0 209


HMI project structure

Content Description
CoExtruder.content [} 213] The page for the co-extruder.
Trend.content [} 214] The trend page for extruders and temperature zones.
Trend_Settings.content [} 214] Displayed in the slider area under the 4th tab when
Trend.content is in the main area.

6.3.6.1 Overview

Extruder.content

The page provides an overview of all extruders and can be expanded as required depending on the number
of extruders. Click on the name in the top left-hand corner to go to the corresponding page
(MainExtruder.content or CoExtruder.content).

1. Main extruder:
◦ Name of the main extruder (MainExtruder)
◦ Temperature status of the main extruder
◦ Illustration of the main extruder
◦ Actual value display of the turn rate as a value and setpoint and actual value display of the turn
rate in the graph
◦ Reduce and increase turn rate
◦ Display of melt pressure, melt temperature and current as a value and in the graph
2. Co-extruder:
◦ Name of the co-extruder (CoExtruder)
◦ Temperature status of the co-extruder
◦ Illustration of the co-extruder
◦ Actual value display of the turn rate as a value and setpoint and actual value display of the turn
rate in the graph
◦ Reduce and increase turn rate
◦ Switching synchronous mode on and off
◦ Display of the gear factor
◦ Display of the current as a value and in the graph

210 Version: 1.1.0 TF85xx


HMI project structure

Available since version 12.7.0

6.3.6.2 Main extruder

MainExtruder.content

The main extruder page contains the following components:

1. Display of the melt pressure as a value and in the graph.


2. Display of the melt temperature as a value and in the graph.
3. Display of the current as a value and in the graph.
4. Illustration of the main extruder with the associated temperature zones for displaying the actual values
and setting option for the setpoints (is configured via the Layout [} 246] page of the temperatures).
5. Area for displaying and setting the turn rate
◦ Display of the set turn rate.
◦ Button for copying the currently set turn rate to the production turn rate.
◦ Display and setting of the production turn rate.
◦ Button for selecting the production turn rate.
◦ Display and setting of the basic turn rate.
◦ Button for selecting the basic turn rate.
◦ Display of actual value as numerical value and in graph with reference to basic and production turn
rate.
6. Area for navigation to other related pages.
7. Setting the material from the main extruder.

TF85xx Version: 1.1.0 211


HMI project structure

1 2 3

5 6

MainExtruder_Settings.content

In addition to the main extruder page, there is also an additional page for the slider area. The page enables
parison length control settings.

Available from version 12.6.0

212 Version: 1.1.0 TF85xx


HMI project structure

6.3.6.3 Co-extruder

CoExtruder.content

The co-extruder page contains the following components:

1. Display of the current as a value and in the graph.


2. Area for switching on the synchronous mode and setting the gear factor.
3. Illustration of the co-extruder with the associated temperature zones for displaying the actual values
and setting option for the setpoints (is configured via the Layout [} 246] page of the temperatures).
4. Area for displaying and setting the turn rate
◦ Display of the set turn rate.
◦ Button for copying the currently set turn rate to the production turn rate.
◦ Display and setting of the production turn rate.
◦ Button for selecting the production turn rate.
◦ Display and setting of the basic turn rate.
◦ Button for selecting the basic turn rate.
◦ Display of actual value as numerical value and in graph with reference to basic and production turn
rate.
5. Area for navigation to other related pages.
6. Setting the material from the co-extruder.

1 2

4 5

TF85xx Version: 1.1.0 213


HMI project structure

Available from version 12.6.0

6.3.6.4 Trend

Trend.content

The trend page is used to display curves of extruder and temperature values in a trend graph (Historized
Symbols). Using the function UpdateTrend from the Beckhoff.TwinCAT.HMI.Plastic.Functions
NuGet package and the FB_TrendHmi [} 179], the TcHmiTrendLineChart control is adjusted depending on
the TcHmiToggleButton control clicked. In addition, an icon for the selection can be displayed via the
TcHmiStateImage control.

Trend_Settings.content

This content can be used to adjust the colors of the curves. The hexadecimal color code is entered via
TcHmiInput controls. The TcHmiButton control triggers the function ResetTrendAxisColors from the
Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package to be able to overwrite the changes with
standard colors again.

214 Version: 1.1.0 TF85xx


HMI project structure

Available from version 12.5.1

6.3.7 Parameter
The folders named Parameters (Contents/Navigation/Parameters and Contents/Slider/Parameters) contain
all contents needed for the configuration of the machine data.

Content Description
Parameters.content [} 216] The overview page of the machine data.
Parameters_Actuators.content The configuration page of the machine data for the
actuators.
Parameters_Blowpin.content [} 218] The configuration page of the machine data for the
blow pin.
Parameters_Carriage.content The configuration page of the machine data for the
carriage.
Parameters_Clamp.content The configuration page of the machine data for the
clamping unit.
Parameters_CoExtruder.content The configuration page of the machine data for the
co-extruder.
Parameters_MainExtruder.content The configuration page of the machine data for the
main extruder.
Parameters_Monitoring.content The configuration page of the machine data for the
monitoring values.
Parameters_Setpoints.content The configuration page of the machine data for the
setpoints.
Parameters_Temperature.content [} 220] The configuration page of the machine data for the
temperature zones and the temperature supply.
Parameters_Wtc.content The configuration page of the machine data for the
WTC.
Parameters_Settings.content Displayed in the slider area under the 4th tab when
one of the configuration pages is in the main area.

A configuration page is built using the Table control. The control offers the possibility to create various
variables in different data types with units and to distribute them to different subpages. With the help of the
function FillParamTable from the Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package, the
table control can be automatically filled with the appropriate values based on the parameters passed.
Changes in the PLC are automatically applied to the table. Additional rows can be added by adjusting the
FirstTable attribute of the table control.

TF85xx Version: 1.1.0 215


HMI project structure

Parameters_Settings.content

The content specially made for the slider area serves as a supplement. It can be selected via the 4th tab of
the slider area when the main area displays one of the configuration pages. Included is information about the
saved file and functions for loading and saving this data. The displayed texts and functions of the buttons are
automatically adapted depending on the displayed configuration page in the main area of the user interface
using the function UpdateParametersSettingsControlsEx from the
Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package. To do this, the corresponding symbols
are set in the NavigationConfig property of the Configurator control under the slider symbols for each table
or sub-table. You can also choose whether the tables in the main area should display the parameters as one
page with a scrollbar or as several pages with a predefined number of parameters per page.

Available from version 12.6.0

6.3.7.1 Overview

Parameters.content

This page serves as an overview page for the machine data. All machine data can be loaded or saved at
once. New machine data must be added manually. The following information about the individual machine
data is displayed in the table (in some cases the table can be sorted accordingly):
• The descriptive name of the file (sortable)
• The creation date of the file (sortable)
• The date on which the file was last stored (sortable)
• The total number of storage operations
• The loading status of the file
• The saving status of the file

216 Version: 1.1.0 TF85xx


HMI project structure

TF85xx Version: 1.1.0 217


HMI project structure

Available since version 12.7.0

6.3.7.2 Blow pin

Parameters_Blowpin.content

The configuration page of the machine data for the blow pin consists of three sub-pages. The variables are
categorized by subheadings. The FillParamTable function automatically fills and updates the table when there
are changes in the PLC.

218 Version: 1.1.0 TF85xx


HMI project structure

TF85xx Version: 1.1.0 219


HMI project structure

6.3.7.3 Temperature

Parameters_Temperature.content

The machine data configuration page for temperature consists of two table controls that are toggled using
the TcHmiToggleSwitch control:

1. Parameterization of the temperature channels.


2. Parameterization of the temperature supply.

Using the functions FillParamTable and UpdateTemperatureParametersTableNumberEx from the


Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package, the tables are automatically filled and
the number of temperature zones is determined from the PLC in order to adjust the table control accordingly.

220 Version: 1.1.0 TF85xx


HMI project structure

6.3.8 Process
The folders named Process (Contents/Navigation/Process and Contents/Slider/Process) contain all contents
needed for the process of the machines.

Content Description
Blowing.content [} 221] The page for the blowing process.
Monitoring.content [} 222] The page for monitoring values.
Setpoints.content [} 224] The page for setpoints.
Timer.content [} 225] The page for time values.
EnergyMeasurement.content [} 226] The page for energy measurement.

6.3.8.1 Blowing

Blowing.content

The blowing page consists of the following components:

1. Enable or disable the pressure output


2. Choice of blowing method between standard and interval blowing
3. Blow curve mapped in BlowPressureChart control
4. Pressure settings at the specific times
5. Setting delays and times using timer controls

TF85xx Version: 1.1.0 221


HMI project structure

1 2

4 5

Available from version 12.5.1

6.3.8.2 Monitoring

Monitoring.content

The monitoring page is built using the Monitoring control from the
Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package and instances of type
FB_MonitoringHmi. It contains one area per value for displaying the current value and for setting the
threshold values. In addition, the set and measured values are illustrated in a graph. The values currently
included are the following:

1. Melt temperature of the main extruder


2. Melt pressure of the main extruder
3. Current of the main extruder
4. Current of the co-extruder

222 Version: 1.1.0 TF85xx


HMI project structure

5. Control cabinet temperature


6. CPU temperature
7. Hydraulic system pressure

TF85xx Version: 1.1.0 223


HMI project structure

1 2

3 4

5 6

Available from version 12.6.0

6.3.8.3 Setpoints

Setpoints.content

The setpoint page offers the possibility of setting setpoints. Currently, the setpoint of the hydraulic system
pressure is included.

224 Version: 1.1.0 TF85xx


HMI project structure

Available from version 12.5.1

6.3.8.4 Times

Timer.content

The timer page is used for setting and monitoring times. Timer controls and the FB_TimerHmi [} 133] can be
used to create controls for times.

Available from version 12.5.1

TF85xx Version: 1.1.0 225


HMI project structure

6.3.8.5 Energy measurement

EnergyMeasurement.content

This page provides an overview of energy measurement. It consists of the following components:

1. Display of the power, energies depending on the operation mode and date of the last reset with button
for resetting.
2. Display of the voltages and currents per phase or voltages between the phases as well as the
frequency.
3. Display of the power factor as a value and in the graph.
4. Display of the power quality factor as a value and in the graph.
5. Table for displaying the energy per hour in idle and production mode.

1 2

3 4

226 Version: 1.1.0 TF85xx


HMI project structure

1 2

3 4

Available since version 12.7.0

6.3.9 System
The folders named System (Contents/Navigation/System and Contents/Slider/System) contain all system
relevant contents of the machine.

Content Description
Administration.content [} 228] The page for the administration.
Alarms.content [} 229] The page for events and alarms.
RecipeManagement.content [} 229] The recipe management page.
RecipeManagement_Settings.content [} 229] Displayed in the slider area under the 4th tab when
RecipeManagement.content is in the main area.
FileManagement.content [} 231] The page for file management.

TF85xx Version: 1.1.0 227


HMI project structure

Content Description
Materials.content [} 233] The page for the materials.
AddMaterial.content [} 233] Is displayed as a pop-up when a material is to be
added to Materials.content.
UserLogging.content [} 236] The page for user changes.

6.3.9.1 Administration

Administration.content

The administration page is used to manage and set the user interface and contains the following
components:

1. TcHmiUserManagement control to logout, change users, edit user properties and manage users
2. Area for changing the language with one TcHmiToggleButton control per language and flag
respectively
3. Area for displaying the software versions
4. MeasurementUnitSelector control for toggling the units in the Plastic Application HMI project

1 4

Available from version 12.5.1

228 Version: 1.1.0 TF85xx


HMI project structure

6.3.9.2 Events / Alarms

Alarms.content

The alarm and event page contains a TcHmiEventGrid control that displays all events and alarms
transmitted by the PLC by means of an appropriate configuration. The control offers further filter settings to
limit the display of events. The events can be viewed and acknowledged in more detail. Additionally
implemented TcHmiButton controls simplify the TcHmiEventGrid control with predefined filters. The page
contains the following components:

1. Button to display the pending alarms


2. Button to display all alarms so far
3. Button to display the messages
4. Button to reset the pending alarms
5. Area for listing the alarms and messages using the TcHmiEventGrid control

1 2 3 4

Available from version 12.6.0

6.3.9.3 Recipe management

RecipeManagement.content

The recipe management page consists of the following elements:

1. TcHmiDatagrid control as a table to display all recipes with the date of the last update
2. Area for the active recipe:

TF85xx Version: 1.1.0 229


HMI project structure

◦ Display of the name of the active recipe


◦ TcHmiButton control for saving the changes to the active recipe
◦ TcHmiButton control for saving the current values into a new recipe
◦ TcHmiTextbox control for entering the new recipe name
3. Area for the selected recipe:
◦ Display of the name of the selected recipe in the table
◦ TcHmiButton control for loading and activating the selected recipe
◦ TcHmiButton control for deleting the selected recipe

1 2

RecipeManagement_Settings.content

This content is displayed in the slider area and serves as a supplement. This consists of the following
elements:

1. Display of the recipe communication status


2. TcHmiButton control for resetting the recipe communication
3. Recipe file management area:
◦ TcHmiButton control for uploading recipes
◦ TcHmiButton control to download the selected recipe

230 Version: 1.1.0 TF85xx


HMI project structure

1 2 3

Available from version 12.5.1

6.3.9.4 File management

FileManagement.content

The file management page allows you to move, copy and delete certain files that can be accessed through
the TcHmiSrv setting using the virtual directories. The project only contains the appropriate settings for
Remote, so that this page is only fully functional after a publish to the target system.

Selection Virtual directory Path Comment


USB (1) /USB D: A pop-up window must be
displayed to confirm that a
USB drive is connected to
the device.
Machine data (2) /MachineData C:\Data\Machine This is very sensitive data,
so access should be
restricted as much as
possible.
Images (3) /Images/FileManagement ... Access to the subfolder
\Images\FileManagement FileManagement from
the Images folder of the
project, e.g. to insert
machine images for the
temperature pages.

TF85xx Version: 1.1.0 231


HMI project structure

1 2 3

1 2 3

232 Version: 1.1.0 TF85xx


HMI project structure

Available since version 12.7.0

6.3.9.5 Materials

Materials.content

This page is used to manage the materials that can be used for the extruders. It consists of the following
components:

1. Area for downloading and uploading the material list.


2. Area for adding and deleting materials.
3. Table for displaying the material list with the parameters ID, name and description (sortable).
4. Pop-up window for adding materials that appears when the add button is pressed.

1 2

TF85xx Version: 1.1.0 233


HMI project structure

1 2

AddMaterial.content

This page is displayed in the pop-up window and is used to add a material. The parameters of the material
can be entered there. In addition, an existing material, which may have come to the machine via a recipe,
can be imported using the checkbox and the choice in the combo box. When adding a new material, please
note that the ID must be unique. This information can be accessed via the information button. If the material
has been added, it will then be listed in the table.

234 Version: 1.1.0 TF85xx


HMI project structure

Available since version 12.7.0

TF85xx Version: 1.1.0 235


HMI project structure

6.3.9.6 User changes

UserLogging.content

This page is used to view the changes made to the machine by the user. Each change contains the following
parameters, which are saved:
• The timestamp of the change.
• The page on which the change was made.
• The name to describe the change (e.g. the symbol name of the changed symbol).
• The old value, i.e. before the change (if the value is unknown, a - is displayed).
• The new value, i.e. after the change.
• The name of the user who made the change.

The UserLoggingViewer control is used for display. This allows the following settings to be made:

1. Selection of the start date from which the files are to be displayed (using the pop-up window).
2. Selection of the end date up to which the files are to be displayed (using the pop-up window).
3. Display of the number of pages and the number of the displayed page from the defined time frame,
whereby the displayed page can be customized using the input field.
4. Button to display the previous page.
5. Button to display the next page.
6. Pop-up window for setting the date (start and end).

1 2 3 4 5

236 Version: 1.1.0 TF85xx


HMI project structure

1 2 3 4 5

Available since version 12.7.0

6.3.10 Temperature
The folders named Temperature (Contents/Navigation/Temperature and Contents/Slider/Temperature)
contain all contents needed for the temperature control on the machine.

TF85xx Version: 1.1.0 237


HMI project structure

Content Description
Temperature_Overview.content [} 238] The page for single zone monitoring of temperatures.
Temperature_Overview_Settings.content [} 238] Displayed in the slider area under the 4th tab when
Temperature_Overview.content is in the main
area.
Temperature_Configuration.content [} 241] The page for setting the temperature zone
parameters.
Temperature_Configuration_Settings.content [} 241] Displayed in the slider area under the 4th tab when
Temperature_Configuration.content is in the
main area.
Temperature_TimeScheduling.content [} 243] The page for time control of the temperature zones
and temperature groups.
Temperature_TimeScheduling_Settings.content Displayed in the slider area under the 4th tab when
[} 243] Temperature_TimeScheduling.content is in
the main area.
Temperature_Grouping.content [} 244] The page for grouping the temperature channels into
temperature groups.
Temperature_Layout.content [} 246] The page for creating layouts with temperature
zones.
Temperature_Layout_Settings.content [} 246] Displayed in the slider area under the 4th tab when
Temperature_Layout.content is in the main
area.

6.3.10.1 Overview

Temperature_Overview.content

This page is used for the temperature zone overview on the machine. Using the ZoneImageLayout control in
display mode, the configurations from the Layout [} 246] page can be displayed on this page and the
temperatures can be set. Clicking on the temperature group name in the top left corner of the two extruders
(MainExtruder [} 211] and CoExtruder [} 213]) navigates to the associated overview page.

238 Version: 1.1.0 TF85xx


HMI project structure

TF85xx Version: 1.1.0 239


HMI project structure

Temperature_Overview_Settings.content

In addition to the temperature overview page, there is a supplementary page in the slider area that is used to
navigate to other related pages.

240 Version: 1.1.0 TF85xx


HMI project structure

Available from version 12.6.0

6.3.10.2 Configuration

Temperature_Configuration.content

The configuration page of the temperatures contains the ZoneConfiguration control and is used for grouped
display and setting of the temperature zones. An instance of FB_TemperatureHmi [} 79] is required to use the
control.

TF85xx Version: 1.1.0 241


HMI project structure

Temperature_Configuration_Settings.content

This page serves as a supplement in the slider area and contains the following components:

1. Tuning of the temperature zone group and status display of tuning


2. Settings that should take effect at machine startup
3. Area for navigation to other related pages

1 2 3

242 Version: 1.1.0 TF85xx


HMI project structure

1 2 3

Available from version 12.6.0

6.3.10.3 Scheduling

Temperature_TimeScheduling.content

The page for scheduling the temperature zones and temperature groups contains a ProcessScheduler
control. The control requires an instance of the FB_TempScheduleHmi [} 92] for the TimerList property of
the Scheduler category.

Temperature_TimeScheduling_Settings.content

The page serves as a supplement in the slider area and includes the following functionalities:

1. Activate and reset the changes, add new elements, remove or edit the selected element
2. Selection of the timer via arrow keys, setting of the temperature group via the combo box and
selection of the standby mode via the checkbox
3. Area for navigation to other related pages

TF85xx Version: 1.1.0 243


HMI project structure

1 2 3

1 2 3

Available from version 12.6.0

6.3.10.4 Grouping

Temperature_Grouping.content

This page is used to group the temperature channels. Only the temperature channels that are enabled via
the temperature parameter page [} 215] are made available in the list. The page consists of the following
functions:

1. Adjustment of the temperature zone names


2. List of available temperature channels and display of grouped temperature channels of the selected
group (4)
3. Customization of the temperature group names
4. Display of the temperature groups with the grouped temperature zones and selection of the
temperature group by clicking for adjustment via the temperature zone list (2)
5. Activation of the change
6. Resetting the changes

244 Version: 1.1.0 TF85xx


HMI project structure

1 5 6 3

2 4

TF85xx Version: 1.1.0 245


HMI project structure

1 5 6 3

2 4

Available from version 12.6.0

6.3.10.5 Layout

Temperature_Layout.content

This page is used to create layouts that can be reused throughout the HMI. A background image can be
selected and customized for each layout added, and temperature zones can be selected and positioned on
the image as desired. Only the temperature zones that are assigned to a group via the temperature
grouping page [} 244] are made available in the list. The page consists of the following functions:

1. List of available grouped temperature zones


2. Activate the changes in the list with the button
3. Closing the temperature zone list by the arrow key
4. Display of the layout selected via the combo box in the slider area
5. Positioned display of selected temperature zones

246 Version: 1.1.0 TF85xx


HMI project structure

TF85xx Version: 1.1.0 247


HMI project structure

1
4

Temperature_Layout_Settings.content

The page serves as a supplement in the slider area and includes the following functionalities:

1. Switching on the configuration mode, selecting the layout via a combo box, activating and resetting the
changes
2. Select background image and edit background image properties via separate pop-up windows

1 2

248 Version: 1.1.0 TF85xx


HMI project structure

1 2

Available from version 12.6.0

6.3.11 WTC
The folders named Wtc (Contents/Navigation/Wtc and Contents/Slider/Wtc) contain all contents needed for
the wall thickness control (WTC) of the machine.

Content Description
Wtc.content [} 249] The main page of the WTC.
Wtc_Settings.content [} 249] Displayed in the slider area under the 4th tab when
Wtc.content is in the main area.
Wtc_Homing.content [} 252] The homing page of the WTC.
Wtc_Homing_Settings.content [} 252] Displayed in the slider area under the 4th tab when
Wtc_Homing.content is in the main area.
Accumulator.content [} 254] The main page of the accumulator.
Accumulator_Settings.content [} 254] Displayed in the slider area under the 4th tab when
Accumulator.content is in the main area.
Accumulator_Homing.content [} 254] The homing page of the accumulator.
Accumulator_Homing_Settings.content [} 254] Displayed in the slider area under the 4th tab when
Accumulator_Homing.content is in the main
area.

6.3.11.1 Curve

Wtc.content

The main content of the WTC adapts to the use of the accumulator and consists of the following
components:

1. Progress curve using the LinearGauge control.


2. WTC curve using the CurveEditor control.
3. Accumulator level indicator (only visible when the accumulator is in use).
4. Autostart function (only visible when the accumulator is not in use).
5. Area for settings and displays relating to the cycle time (only visible when the accumulator is not in
use).
6. Area for setting the accumulator values (only visible when the accumulator is in use).
7. Area for displaying the current position and setting a test position.
8. Area for navigation to a related page.

TF85xx Version: 1.1.0 249


HMI project structure

1 2 3 4 6

1 2 4

250 Version: 1.1.0 TF85xx


HMI project structure

1 2 3 6

Wtc_Settings.content

There is a supplementary page for the slider area in addition to the main page of the WTC. This content is
split into three pages.

The first page contains the following components:

1. Setting or displaying the basic thickness of the entire profile


2. Setting or displaying the index of the selected point
3. Setting or displaying the profile component
4. Setting or displaying the thickness of the selected point
5. Possibility to update the setting according to the currently selected nozzle
6. Switching the shift function on and off
7. Navigate between existing fix points and add and remove fix points
8. Undo changes, navigate between activated profiles and activation of the displayed profile

1 3 5 7 8

2 4 6

The second page contains the following components:

TF85xx Version: 1.1.0 251


HMI project structure

1. Add, remove, and edit marker points, and choose how to use them
2. Add, remove and edit fix points
3. Adjustment of die geometry by switching between Converging and Diverging, switching between Pin
move and Die move, and adjustment of tool stroke
4. Table for displaying the fix points

1 2 3 4

The third page contains the following components:

1. Setting or displaying the interpolation mode


2. Setting or displaying the product transition
3. Adjustment of the slopes
4. Adjustment of the editor options

1 3

2 4

Available from version 12.5.1

6.3.11.2 Homing

Wtc_Homing.content

The homing page for the WTC consists of the following components:

1. Homing block
2. Homing block detection
3. Homing finish
4. Encoder zero offset shift

Using the function UpdateAxesHomingUnits from the Beckhoff.TwinCAT.HMI.Plastic.Functions


NuGet package, certain units of the values are converted to angle unit groups if it is a transformed axis.

252 Version: 1.1.0 TF85xx


HMI project structure

1 2

3 4

Wtc_Homing_Settings.content

There is also a supplementary page for the slider area in addition to the homing page of the WTC. This page
contains the following components:

1. Homing status display


2. Homing functions
3. Aborting the homing
4. Activation of the storage option

TF85xx Version: 1.1.0 253


HMI project structure

1 2 3

Available from version 12.6.0

6.3.11.3 Accumulator

Accumulator.content

The main content of the accumulator consists of the following components:

1. Accumulator curve using the CurveEditor control.


2. Area for setting the accumulator values.
3. Area for displaying the current position.
4. Area for navigation to a related page.

254 Version: 1.1.0 TF85xx


HMI project structure

1
2

Accumulator_Settings.content

In addition to the main page of the accumulator, there is also an additional page for the slider area. This
content is split into three pages.

The first page contains the following components:

1. Setting or displaying the basic velocity of the entire profile.


2. Setting or displaying the index of the selected point.
3. Setting or displaying the profile component.
4. Setting or displaying the velocity of the selected point.
5. Option to update the setting according to the current maximum velocity.
6. Switching the shift function on and off.
7. Navigate between existing fix points and add and remove fix points.
8. Undo changes, navigate between activated profiles and activation of the displayed profile.

TF85xx Version: 1.1.0 255


HMI project structure

1 3 5 7 8

2 4 6

The second page contains the following components:

1. Add, remove and edit fix points.


2. Table for displaying the fix points.
3. Setting or display of the pushout mode.

1 2 3

The third page contains the following components:

1. Setting or displaying the interpolation mode.


2. Setting or displaying the product transition.
3. Adjustment of the slopes.
4. Adjustment of the editor options.

1 3

2 4

Accumulator_Homing.content

The homing page for the accumulator consists of the following components:

1. Homing block

256 Version: 1.1.0 TF85xx


HMI project structure

2. Homing block detection


3. Homing finish
4. Encoder zero offset shift

Using the function UpdateAxesHomingUnits from the Beckhoff.TwinCAT.HMI.Plastic.Functions


NuGet package, certain units of the values are converted to angle unit groups if it is a transformed axis.

1 2

3 4

Accumulator_Homing_Settings.content

There is an additional page for the slider area in addition to the homing page of the accumulator. This page
contains the following components:

1. Homing status display.


2. Homing functions.
3. Aborting the homing.
4. Activation of the storage option.

TF85xx Version: 1.1.0 257


HMI project structure

1 2 3

Available since version 12.7.0

6.4 Localization
The folder Localization manages the different languages that should be available in the project. New
languages can be added. In addition, new Localized Symbols can be created, for which the translation can
then be entered in all required languages.

Installing the Beckhoff.TwinCAT.HMI.Plastic.Localizations NuGet package provides the Plastic


Application HMI project with language keys that can be used in the project.

Update capability of the Plastic Application HMI


Editing the Plastic Application HMI can lead to an impairment of the update capability. This may
affect the support provided by Beckhoff Automation.

Available from version 12.5.1

6.5 View
A View is a file with the extension .view and contains the overall structure of the user interface. A project
can contain several Views. At the beginning it has to be defined in the engineering which View should be
used as Start View to build the HMI. The structure of the user interface is defined by the View selected as
Start View.

Update capability of the Plastic Application HMI


Editing the Plastic Application HMI can lead to an impairment of the update capability. This may
affect the support provided by Beckhoff Automation.

Portrait.view

Unless the Portrait.view file is modified, this user interface has a portrait aspect ratio (4:5) with a width
of 1024 px and a height of 1280 px. It consists of the following components:

1. Header:
◦ Application name (click on it to display the Home.content [} 198] in the main area).
◦ Currently loaded recipe (click on it to display the RecipeManagement.content [} 229] in the main
area).
◦ Current operation mode.

258 Version: 1.1.0 TF85xx


HMI project structure

◦ Date and time.


◦ Username (click on it to open submenu).
◦ Flag to display the selected language (click on it to open submenu).
◦ Screenshot function (enabled using the function TakeScreenShot from the
Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package).
◦ Logo
2. Favorites area: Contains user-specific favorite buttons for quick navigation of frequently used pages.
3. Event line: Display of the latest upcoming alarm and a click on it shows the Alarms.content [} 229] in
the main area.
4. Main area: Display of the selected content.
5. Slider area: With the help of the ToggleSliderArea, ShowSliderArea and HideSliderArea functions from
the Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package, the slider area can be shown and
hidden via the arrow keys, shown by clicking on a tab or hidden for desired contents in the main area
(e.g. Scope.content [} 209]). Clicking on one of the following tabs will display the corresponding
content in the slider area:
◦ 1st tab: Navigation.content [} 200] contains all available contents of the project compared to the
favorites area.
◦ 2nd tab: Info.content [} 201] displays the most important machine data.
◦ 3rd tab: ManualFunctions.content [} 202] contains the manual functions of the machine.
◦ 4th tab: Using the UpdateSliderContentRegionEx function from the
Beckhoff.TwinCAT.HMI.Plastic.Functions NuGet package, the 4th tab can optionally be displayed
and the icon and the content displayed in the slider area are updated depending on the content
displayed in the main area. Possible contents can be recognized by the name extension
_Settings.content.

TF85xx Version: 1.1.0 259


HMI project structure

Configurator control

The Configurator control serves as a general control for setting control-wide configurations. The instance of
the control only needs to exist and does not require visibility. The following attributes are required for further
setting of the HMI:
• UnitConfig (Link): Path to the JSON file with the corresponding unit switching scheme. The file is
supplied by default with the Beckhoff.TwinCAT.HMI.Plastic.Controls NuGet package, but it can also be
copied and modified so that a different path must be set.

260 Version: 1.1.0 TF85xx


HMI project structure

• NavigationConfig (Link): Setting of the navigation structure with additional information like icons,
slider content etc.
• RecipeHandshakeSymbol: Setting of the symbol for recipe management. An instance of
FB_PlcStateToHmi [} 94] is required for this.
• Temperature symbol: Setting the symbol for the temperatures. An instance of FB_TemperatureHmi
[} 79] is required for this.
• UserLoggerSymbol: Setting of the symbol for user changes. An instance of FB_UserLoggerHmi
[} 128] is required for this.

Available from version 12.6.0

TF85xx Version: 1.1.0 261


Samples / instructions

7 Samples / instructions

7.1 PLC samples / instructions

7.1.1 General

7.1.1.1 Set up new TwinCAT project


If you want to start a new TwinCAT project with the Plastic Application, you have several options to set up
the project. This sample shows the setup steps for a new project based on the supplied ApplicationSample.
1. Place the submitted project file Tc3_PlasticApplication_V12.5.0.zip in a folder with the shortest possible
project path.
In this example, the path C:\Projects\ is chosen.
Avoid long file paths - a too long file path can lead to errors when exporting the ZIP file or
opening the project. Therefore, avoid storing the project under long file paths such as the user
folders (C:\Users\{UserName}\Documents\TcXaeShell\).
2. Unpack the ZIP file.
3. Open the Tc3_PlasticApplicationPlc*.tsproj file in one of the subdirectories using TcXaeShell.
Blow molding machine:
Tc3_PlasticApplicationPlc\BlowMolding\Tc3_PlasticBaseApplication\Tc3_PlasticApplicationPlcBMM.tspr
oj
Extruder:
Tc3_PlasticApplicationPlc\Extruder\Tc3_PlasticBaseApplication\Tc3_PlasticApplicationPlcEXTR.tsproj
The warning message that appears when opening the project, stating that a tmc file was not
found, can be ignored. The missing file is created automatically when the project is created.
ð The project is ready to start.
You see two PLC projects:
The application and a simulation PLC. In its form, the simulation acts as a stand-alone project like the I/O
of a machine. Accordingly, the simulation can be mapped to the control PLC like a machine.

262 Version: 1.1.0 TF85xx


Samples / instructions

7.1.1.2 Set up empty project / extend existing project


In addition to the possibility of setting up a project on top of the supplied project, the Plastic Base Application
can be integrated into an existing or empty project. This is made possible by adding the Plastic Base
Application as a library to an existing or new project.
1. Install the library in the TwinCAT Library Manager. The file is located in the subdirectory
\Dependencies\Tc3_PlasticBaseApplication_V3.12.5.0.compiled-library

2. Add the library to the project

TF85xx Version: 1.1.0 263


Samples / instructions

7.1.1.3 Update Plastic Base Application subsequently in the project


If you want to integrate new features of following Plastic Base Application versions into your existing project,
the TwinCAT 3 Plastic Base Application offers the possibility of an update.
1. Install the newer version of the Plastic Base Application version in your Library Manager.

2. Change the fixed version of the library to the newly installed version.

3. When you create the project, check that the new library has been adopted correctly.

264 Version: 1.1.0 TF85xx


Samples / instructions

7.1.2 Object orientation

7.1.2.1 Adding a variable to a class (FB)


If the scope of the internal variables of a class (FB) is to be extended, proceed as follows. In the following
example, a variable is added to the default axis type FB_Axis.
1. Create a new class (FB) and remove VAR_INPUT and VAR_OUTPUT.
FUNCTION_BLOCK FB_CustomAxis
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
END_VAR
2. Add the class to be inherited to the class definition using the EXTENDS keyword.
FUNCTION_BLOCK FB_CustomAxis EXTENDS FB_Axis
VAR

END_VAR
3. Create the new variables in the VAR section.
FUNCTION_BLOCK FB_CustomAxis EXTENDS FB_Axis
VAR
bNewVariable1: BOOL;
nNewVariable2: INT;
fNewVariable3: LREAL;
END_VAR

4. Compile the project to check the implementation for correct syntax.


ð You have successfully added new variables to a class.

Example result in the logged in PLC:

7.1.2.2 Adding a property or method to a class (FB)


In many cases, the scope of methods and properties of a class should be changed. This includes adding
new elements as well as changing or removing existing elements. In the following samples, these three
procedures are explained using the standard axle type FB_Axis as an example.

The following steps must be completed in advance for all three procedures:
1. Create a new class (FB) and remove VAR_INPUT and VAR_OUTPUT.
FUNCTION_BLOCK FB_CustomAxis
VAR_INPUT
END_VAR
VAR_OUTPUT

TF85xx Version: 1.1.0 265


Samples / instructions

END_VAR
VAR
END_VAR
2. Add the class to be inherited to the class definition using the EXTENDS keyword.
FUNCTION_BLOCK FB_CustomAxis EXTENDS FB_Axis
VAR

END_VAR
3. So that you can also address the class and the added elements via an interface, create an interface with
the same name.
INTERFACE I_CustomAxis
4. Let the interface inherit from the interface of the inherited class.
INTERFACE I_CustomAxis EXTENDS I_Axis
5. Implement the interface in the previously created class (FB).
FUNCTION_BLOCK FB_CustomAxis EXTENDS FB_Axis IMPLEMENTS I_CustomAxis
VAR
END_VAR

Adding a new method/property


1. Add a new method/property to the class.

METHOD NewMethod : HRESULT


VAR
END_VAR

2. Copy the method into the created interface, if the method should be accessible from outside.

266 Version: 1.1.0 TF85xx


Samples / instructions

ð You have successfully added a new method and can start the implementation.

Extend or overwrite a method/property from the inherited class


1. Add a method/property to the class with the name of the method/property to be extended.

METHOD Power : HRESULT


VAR_INPUT
bCommand: BOOL;
END_VAR
VAR
END_VAR

2. If you want to extend the method/property rather than overwrite it, you must call the base implementation
at the appropriate place.
METHOD Power : HRESULT
VAR_INPUT
bCommand: BOOL;
END_VAR
VAR
nValue: INT;
END_VAR

IF bCommand THEN
nValue := 10;
END_IF

SUPER^.Power(bCommand);
3. Check the return value and the INPUT variables for consistency. You can view the base implementation
by selecting the SUPER^.MethodName() and then pressing the F12 key.
4. Implement their own lines of code in the method.

TF85xx Version: 1.1.0 267


Samples / instructions

ð You have successfully extended a method/property.

Removing a method/property from the inherited class

Removing a method/property is only possible indirectly


Note that you cannot completely remove a method/property! The steps described below only result
in the call of the "removed" method/property not causing a reaction.

1. Add a method/property to the class with the name of the method/property to be removed.

2. Leave the contents of the method/property empty and do not call the SUPER^.Method().
METHOD Power : HRESULT
VAR_INPUT
bCommand: BOOL;
END_VAR
VAR
END_VAR
3. Optional: Add {attribute ‘hide‘} to the method/property to hide the method/property in the
development environment.
ð You have successfully disabled a method/property.

7.1.2.3 Adapting inner procedures of a class (FB)


Some classes contain inner flows/procedures which are to be extended/changed by inheritance levels or
adapted by the application. This is realized with the FB_AdaptableSequence [} 157] class.
1. Create a new class (FB) and let it inherit from a class with inner procedure.

268 Version: 1.1.0 TF85xx


Samples / instructions

FUNCTION_BLOCK FB_AdaptableClass EXTENDS FB_Extruder


VAR
END_VAR
2. Overwrite the internal callback method with the integrated procedure.
In the case of the FB_Extruder class, the internal procedure is implemented in the PowerStates()
method.
METHOD PROTECTED PowerStates
VAR_INPUT
END_VAR
3. Add a query to the callback method for its process step, whether you want to extend an existing
sequence or add a new one, and if you have an existing implementation, whether you want to execute it
or skip it.
4. Evaluate whether calling the existing implementation before or after its new implementation makes
sense. Calling the SUPER^ method is only necessary if you continue to use the existing sequences.
// React on existing sequence state
IF aSeqBaseMembers[E_ExtruderPowerStates.eStartVeloFeed].IsActive THEN
;
// Call return to replace exisiting implementation
RETURN;
END_IF

// Define additional/replacing sequence state


IF fbSetProdTurnrate.IsActive THEN
;
RETURN;
END_IF
Platzieren Sie den SUPER^ Aufruf der Callback Methode.
5. Define the condition at which the sequence is completed.
// React on existing sequence state
IF aSeqBaseMembers[E_ExtruderPowerStates.eStartVeloFeed].IsActive THEN
// Set FB_AdaptableSequence interface locally
iSeq := aSeqBaseMembers[E_ExtruderPowerStates.eStartVeloFeed];

IF bAdditionalAction THEN
nSaveValueToThis := 10;
// command a jump to a state that is not the default "next" element
iSeq.Jump(fbSetProdTurnrate);
// feedback on finishing the sequence state
iSeq.Done := TRUE;
END_IF

// Call return to replace exisiting implementation


RETURN;
END_IF

// Define additional/replacing sequence state


IF fbSetProdTurnrate.IsActive THEN
// Set FB_AdaptableSequence interface locally
iSeq := fbSetProdTurnrate;

IF bAdditionalAction THEN
nSaveValueToThis := 10;
iSeq.Done := TRUE;
END_IF

RETURN;
END_IF

// Call implementation of other sequence steps


SUPER^.PowerStates();

6. [Only when adding]: Instantiate an instance of type FB_AdaptableSequence in the class with the name
of the sequence.
FUNCTION_BLOCK FB_AdaptableClass EXTENDS FB_Extruder
VAR
fbSetProdTurnrate: FB_AdaptableSequence;
END_VAR

7. Insert the sequence in the initialization at the desired position.

TF85xx Version: 1.1.0 269


Samples / instructions

IF NOT F_SucceededHr(SUPER^.Init(), Init) THEN


RETURN;
END_IF

fbPowerStates.Insert [} 160](
iCurrent := aSeqBaseMembers[E_ExtruderPowerStates.eMasterMode],
iNew := fbSetProdTurnrate,
bOverwrite := FALSE);

8. Apply the changes to your target system and restart the PLC.
ð You have successfully extended an inner procedure of a class.

7.1.2.4 Extending the HMI parallel class (FB)


In many use cases, the number of displayed values on the surface is to be extended. For this purpose, the
HMI parallel class can be extended so that the new values are accessible in the HMI environment at a
suitable location.
ü For the complete implementation the extension of the base class (FB) is necessary.
1. Perform steps 1 to 5 of Base class extension (FB) for the base class.
2. Create a new class (FB) and remove VAR_INPUT and VAR_OUTPUT.
FUNCTION_BLOCK FB_CustomAxisHmi
VAR
END_VAR

3. Add the class to be inherited to the class definition using the EXTENDS keyword.
FUNCTION_BLOCK FB_CustomAxisHmi EXTENDS FB_AxisHmi
VAR
END_VAR

4. So that you can also address the class and the added elements via an interface, create an interface with
the same name.
INTERFACE I_CustomAxisHmi
5. Let the interface inherit from the interface of the inherited class.
INTERFACE I_CustomAxisHmi EXTENDS I_AxisHmi
6. Implement the interface in the previously created class (FB).
FUNCTION_BLOCK FB_CustomAxisHmi EXTENDS FB_AxisHmi IMPLEMENTS I_CustomAxisHmi
VAR
END_VAR
7. Instantiate the interface in the base class (FB).
FUNCTION_BLOCK FB_CustomAxis EXTENDS FB_Axis IMPLEMENTS I_CustomAxis
VAR
iCustomAxisHmi: I_CustomAxisHmi;
END_VAR
8. Overwrite the SetHMI() method of the base class.
// Setter method for HMI-Class
METHOD SetHMI : HRESULT
VAR_INPUT
ipBaseHmi: I_BaseHmi; // interface on hmi object
END_VAR

IF NOT __QUERYINTERFACE(ipBaseHmi, iCustomAxisHmi) THEN


SetHMI := F_HresultFailure(E_AdsErr.DEVICE_INVALIDINTERFACE);
RETURN;
END_IF

SetHmi := S_OK;
9. Extend the Init() method and add a __QUERYINTERFACE() operation for the new interface.
METHOD Init : HRESULT

IF NOT __QUERYINTERFACE(iCustomAxisHmi, iAxisHmi) THEN

270 Version: 1.1.0 TF85xx


Samples / instructions

RETURN;
ELSIF NOT F_SucceededHr(SUPER^.Init(), Init) THEN
RETURN;
END_IF

Add a new setting or command value for the HMI


10. Add a new property to the HMI class.
PROPERTY NewHmiProperty : LREAL
11. Add the Monitoring attribute to the declaration to make the property visible to the HMI.
This makes the property visible even when the PLC is logged in.
{attribute ‘monitoring’ := ‘call’}
PROPERTY NewHmiProperty : LREAL
12. Copy the property to the interface with the same name.

13. Create a similarly named variable in the HMI class where the value can be cached.
FUNCTION_BLOCK FB_CustomAxisHmi EXTENDS FB_AxisHmi IMPLEMENTS I_CustomAxisHmi
VAR
fNewHmiProperty: LREAL;
END_VAR
14. Add the 'TcHmiSymbol.Hide' attribute to the declaration so that the variable is not seen by the HMI.
This ensures that the variable is not mistakenly used by the HMI instead of the property. If you set the
ADS mapping in the HMI to Use whitelisting, you can basically hide all variables. To continue showing
the HMI classes, you must add the {attribute 'TcHmiSymbol.ShowRecursively'} to the declaration.
FUNCTION_BLOCK FB_CustomAxisHmi EXTENDS FB_AxisHmi IMPLEMENTS I_CustomAxisHmi
VAR
{attribute 'TcHmiSymbol.Hide'}
fNewHmiProperty: LREAL;
END_VAR
15. Implement the property write and read operation in the Get and Set method.
ð You have successfully added a property.

Making an existing property of the base class accessible to the HMI


1. Instantiate an interface of the base class type in the HMI parallel class.
FUNCTION_BLOCK FB_CustomAxisHmi EXTENDS FB_AxisHmi IMPLEMENTS I_CustomAxisHmi
VAR
{attribute 'TcHmiSymbol.Hide'}
iCustomAxis: I_CustomAxis;
{attribute 'TcHmiSymbol.Hide'}
fNewHmiProperty: LREAL;
END_VAR

2. Add the Init() method to the HMI class.


// Init method for linking to a control class (FB)
METHOD Init : HRESULT
VAR_INPUT
ipBase: I_Base; // Base interface on linked control class (FB)
END_VAR

3. In the Init() method, perform a __QUERYINTERFACE() operation from the base interface passed to the
last interface instantiated.
Init := F_HresultFailure(E_AdsErr.DEVICE_NOTINIT);

RETURN(NOT __QUERYINTERFACE(ipBase, iCustomAxis));


RETURN(NOT F_SucceededHr(SUPER^.Init(ipBase), Init));

Init := F_HresultSuccess(NOERR);

4. [If inheriting from FB_BaseHmi] Implement the call to the HMI-Init() in the Init() method of the base
class.

TF85xx Version: 1.1.0 271


Samples / instructions

Init:=F_HresultFailure(E_AdsErr.DEVICE_NOTINIT);

IF iCustomAxisHmi = 0 THEN
RETURN;
ELSIF NOT F_SucceededHr(iCustomAxisHmi.Init(THIS^), Init) THEN
RETURN;
ELSIF NOT F_SucceededHr(SUPER^.Init(), Init) THEN
RETURN;
END_IF

5. Add a new property to the HMI class.


PROPERTY SecondNewHmiProperty : LREAL
6. Add the Monitoring attribute to the declaration to make the property visible to the HMI.
This makes the property visible even when the PLC is logged in.
{attribute ‘monitoring’ := ‘call’}
PROPERTY NewHmiProperty : LREAL
7. Copy the property to the interface with the same name.

8. Program the access to the property of the interface in the Get (and if necessary Set) method of the
property.
IF iCustomAxis <> 0 THEN
SecondNewHmiProperty := iCustomAxis.ExistingValue;
END_IF

9. For further properties with reference access, steps 1 to 4 are omitted accordingly.
ð You have successfully added a property with reference access to the main class.

7.1.3 Axes

7.1.3.1 Creating and initializing NC axis


There are several ways to create an NC axis. One possible procedure is shown below as an example.
1. Create the three instances of the following objects:
fbCarriageAxis (FB_AxisNcBase): TF8560 axis (here NC)
fbCarriage (FB_Carriage): Specifically implemented axis type (here carriage axis)
fbCarriageHmi (FB_CarriageHmi): Parallel HMI interface of the axis type (here carriage axis)
{attribute 'qualified_only'}
VAR_GLOBAL
{attribute 'TcHmiSymbol.Hide'}
{attribute 'TcContextName':='MotionTask'}
fbCarriageAxis: FB_AxisNcBase('', Tc3_PlasticBaseAppStaticParams.cnMaxPtpPoints, 0, 0
, 0);
{attribute 'TcHmiSymbol.Hide'}
fbCarriage: FB_Carriage;

fbCarriageHmi: FB_CarriageHmi;
END_VAR

272 Version: 1.1.0 TF85xx


Samples / instructions

2. Create/link an NC axis in the project to the created instance of the fbCarriage axis.

If the TF8560 axes from the PLC do not appear in the selection dialog, the project has not been
created. Only once the PLC project has been successfully created after the instance has been
created, the instances become visible in the mapping.
3. It is recommended that you create a PLC task with the same cycle time of the NC (default 2 ms) for the
drive control part (if an axis does not already exist).

4. Assign a TF8560 axis to the specific axis in the PLC.


Axes.fbCarriage.SetAxisRef(Axes.fbCarriageAxis);
5. Add the axis to the runtime.
Tasks.fbRuntime.Append(Axes.fbCarriage, Axes.fbCarriageHmi);

If you do not want to work with FB_BaseRuntime, the following further steps are necessary:
6. Assign the HMI interface to the specific axis.
Axes.fbCarriage.SetHMI(Axes.fbCarriageHmi);
7. Initialize the axis with a single call to the Init() method and check the return values.
IF NOT bInit THEN
bInit := TRUE;

Axes.fbCarriage.SetAxisRef(Axes.fbCarriageAxis);
Axes.fbCarriage.SetHMI(Axes.fbCarriageHmi);

hr := Axes.fbCarriage.Init();
bInitFailed := FAILED(hr);
END_IF
8. After successful initialization, call the CoreCyclic() method of the axis with a fast task.
IF NOT PRG_AxisApplication.bInitFailed THEN

Axes.fbCarriage.CoreCyclic();
END_IF
9. In parallel with the CoreCyclic() method, call the Cyclic() method in a slower task and initialize the
default parameterization using the ParamInit() method.

TF85xx Version: 1.1.0 273


Samples / instructions

VAR
bInit: BOOL;
bInitFailed: BOOL;
bParamInit: BOOL;
hr: HRESULT;
END_VAR

IF NOT bInit THEN


bInit := TRUE;

Axes.fbCarriage.SetAxisRef(Axes.fbCarriageAxis);
Axes.fbCarriage.SetHMI(Axes.fbCarriageHmi);

hr := Axes.fbCarriage.Init();
bInitFailed := FAILED(hr);

ELSIF NOT bInitFailed THEN


IF NOT bParamInit THEN
hr := Axes.fbCarriage.ParamInit();
bParamInit := SUCCEEDED(hr);
END_IF

Axes.fbCarriage.Cyclic();
END_IF

7.1.3.2 Creating and initializing NC transformation axis


Several steps are necessary to create a new NC transformation axis. One possible procedure is shown
below as an example.
1. Create the three instances of the following objects:
fbClampAxis (FB_AxisNcTrafoBase): TF8560 axis (here transformation NC)
fbClamp (FB_Clamp): Specifically implemented axis type (here clamping unit)
fbClampHmi (FB_ClampHmi): Parallel HMI interface of the axis type (here clamping unit).
{attribute 'qualified_only'}
VAR_GLOBAL
{attribute 'TcHmiSymbol.Hide'}
{attribute 'TcContextName':='MotionTask'}
fbClampAxis: FB_AxisNcTrafoBase('', Tc3_PlasticBaseAppStaticParams.cnMaxPtpPoints, Tc
3_PlasticBaseAppStaticParams.cnNoOfTrafoPoints, 0, 0, 0);
{attribute 'TcHmiSymbol.Hide'}
fbClamp: FB_Clamp;

fbClampHmi: FB_ClampHmi;
END_VAR
2. Create/link two NC axes in the project for the drive and load sides of the created instance of the
fbClamp axis.

If the TF8560 axes from the PLC do not appear in the selection dialog, the project has not been
created. Only once the PLC project has been successfully created after the instance has been
created, the instances become visible in the mapping.

274 Version: 1.1.0 TF85xx


Samples / instructions

3. Set the following parameterization on the NC axis of the load side:


• Axes > ClampLoad > Settings > Axis Type: = Standard
• Axes > ClampLoad > Enc > NC-Encoder > Type: = Encoder SSI
• Axes > ClampLoad > Enc > Parameter > Scaling Factor Numerator = 0.0001
• Axes > ClampLoad > Enc > Parameter > Scaling Factor Denominator = 1.0
• Axes > ClampLoad > Enc > Parameter > Position Bias = -1000.0
• Axes > ClampLoad > Enc > Parameter > Encoder Mode = POSVELOACC

And map the following variables additionally between NC and PLC:


• Axes > ClampLoad > Enc.Inputs.In.nDataIn1 <-->
GVL_Xyz.fbNcTrafoAxis.fbLocalNc.fbActuals.nDataIn1
• Axes > ClampLoad > Enc.Inputs.In.nState4 <-->
GVL_Xyz.fbNcTrafoAxis.fbLocalNc.fbActuals.nState4
4. It is recommended that you create a PLC task with the same cycle time of the NC (default 2 ms) for the
drive control part (if an axis does not already exist).

5. Additionally, instantiate a Table Generator in your application to create a transformation table.


VAR
fbTableGen: FB_TableGeneratorClampStandard_1;
END_VAR
6. Assign a TF8560 axis to the specific axis in the PLC.
Axes.fbClamp.SetAxisRef(Axes.fbClampAxis);
7. Assign the Table Generator to the specific axis in the PLC.
Axes.fbClamp.Specific.Trafo.TableGenerator := fbTableGen;
8. Define the geometry of the mechanics to use the transformation function. In the case of the clamping
unit, a standard clamping mechanism is parameterized in this sample.
Method DefineTable : HRESULT

// Assign geometries
fbTableGen.BaseDistance := 672.0; // [mm]
fbTableGen.DriveArm := 228.0; // [mm]
fbTableGen.LoadArm := 325.2; // [mm]
fbTableGen.ToolArm_1 := 602.52; // [mm]
fbTableGen.ToolArm_2 := 455.4; // [mm]
fbTableGen.ToolArm_3 := 114.0; // [mm]
fbTableGen.ToolArm_Angle := 216.0; // [mm]
fbTableGen.ToolOffset := 288.0; // [mm]
fbTableGen.DriveLowEnd := 0.0; // [°]
fbTableGen.DriveHighEnd := 180.0; // [°]

// calculate resulting point table


IF NOT fbTableGen.DefineTable() THEN
DefineTable:= F_HresultFailure(E_AdsErr.DEVICE_INVALIDPARM);
RETURN;
END_IF

TF85xx Version: 1.1.0 275


Samples / instructions

// copy parameter to machine data file


fbTableGen.WriteToParamList();

// activates table in TF8560 axis


F_SucceededHr(Axes.fbClamp.Specific.Trafo.AssignTableToAxis(FALSE), DefineTable);
// copies table drive ends to nc-Softends
F_SucceededHr(Axes.fbClamp.Specific.Trafo.CopyTableDriveEnds(FALSE, FALSE), DefineTable);
9. Add the axis to the runtime.
Tasks.fbRuntime.Append(Axes.fbClamp, Axes.fbClampHmi);

If you do not want to work with FB_BaseRuntime, the following further steps are necessary:
10. Assign the HMI interface to the specific axis.
Axes.fbClamp.SetHMI(Axes.fbClampHmi);
11. Initialize the axis with a single call to the Init() method and check the return value.
IF NOT bInit THEN
bInit := TRUE;

Axes.fbClamp.SetAxisRef(Axes.fbClampAxis);
Axes.fbClamp.SetHMI(Axes.fbClampHmi);

hr := Axes.fbClamp.Init();
bInitFailed := FAILED(hr);
END_IF
12. After successful initialization, call the CoreCyclic() method of the axis with a fast task.
IF NOT PRG_AxisApplication.bInitFailed THEN

Axes.fbClamp.CoreCyclic();
END_IF
13. In parallel with the CoreCyclic() method, call the Cyclic() method in a slower task and initialize the
default parameterization using the ParamInit() method.
VAR
bInit: BOOL;
bInitFailed: BOOL;
bParamInit: BOOL;
hr: HRESULT;

fbTableGen: FB_TableGeneratorClampStandard_1;
END_VAR

IF NOT bInit THEN


bInit := TRUE;

Axes.fbClamp.SetAxisRef(Axes.fbClampAxis);
Axes.fbClamp.Specific.Trafo.TableGenerator := fbTableGen;
Axes.fbClamp.SetHMI(Axes.fbClampHmi);

hr := Axes.fbClamp.Init();
bInitFailed := FAILED(hr);

ELSIF NOT bInitFailed THEN


IF NOT bParamInit THEN

hr := DefineTable();
bParamInit := SUCCEEDED(hr);
hr := Axes.fbClamp.ParamInit();
bParamInit := bParamInit AND SUCCEEDED(hr);
END_IF

Axes.fbClamp.Cyclic();
END_IF

7.1.3.3 Integrating manual function into an axis


A manual function can be created in several places in the application. The following sample explains how a
manual function for moving and switching on the axis can be integrated into it.
1. Extend an existing class by inheritance. In this sample, the FB_Carriage class is used for this purpose.
FUNCTION_BLOCK FB_CustomCarriage EXTENDS FB_Carriage

276 Version: 1.1.0 TF85xx


Samples / instructions

2. Instantiate the FB_ManualXyz manual function in the class of the axis. This is not necessary for the
manual function of the forward/backward movement, since this is already instantiated by the
FB_Carriage class.
FUNCTION_BLOCK FB_CustomCarriage EXTENDS FB_Carriage
VAR
fbManualPower: FB_ManualPower;
END_VAR
3. The FB_CarriageHmi class used here already provides an HMI interface for both manual functions. For
more manual functions, you need to extend the class with respective instances of the
FB_ManualFunctionHmi class.
4. Afterwards, the newly instantiated manual function must be initialized. For convenience, you can use the
F_SucceededHr() function to check the return value of the initialization function for success and copy it
to a local variable.
METHOD Init : HRESULT

IF NOT F_SucceededHr(fbManualPower.Init(THIS^, iCarriageHmi), Init) THEN


RETURN;
END_IF

Init := SUPER^.Init();
5. To process the inner algorithms of the manual functions, you must call the respective cycle methods in
Cyclic().
METHOD Cyclic

fbManualPower.Cyclic();
fbManualForBack.Cyclic();
6. In the same method you can additionally define when the manual function should be activated for use
and/or which method is called by the manual function.
fbManualPower.Enable := bManualMode OR bSetupMode OR bAutomaticMode;
fbManualPower.Cyclic();

fbManualForBack.Enable := bManualMode OR bSetupMode;


fbManualForBack.Cyclic();

IF bSetupMode THEN
IF fbManualForBack.TrigCmdWorkPos.RQ THEN
JogNegative(TRUE);
ELSIF fbManualForBack.TrigCmdWorkPos.FQ THEN
JogNegative(FALSE);
ELSIF fbManualForBack.TrigCmdBasePos.Q THEN
JogPositive(fbManualForBack.TrigCmdBasePos.Q);
END_IF

ELSIF bManualMode THEN


IF fbManualForBack.TrigCmdWorkPos.Q THEN
MovePtp(1, fbManualForBack.TrigCmdWorkPos.Q, 8);
ELSIF fbManualForBack.TrigCmdBasePos.Q THEN
MovePtp(2, fbManualForBack.TrigCmdBasePos.Q, 8);
END_IF
END_IF

7.1.4 Data management

7.1.4.1 Creating machine data


At the start time of a project, an initial set of machine data must be created so that the parameters
determined during commissioning can be persistently stored.

TF85xx Version: 1.1.0 277


Samples / instructions

Error messages in the EventLogger


All runtime objects attached to the FB_BaseRuntime will inevitably trigger an error message under
the following conditions:
• All Init() methods have been successfully executed
• No machine data file exists yet
• FB_BaseRuntime.DisableMdInit is not set

ü For the sequence of steps described below, the use of the FB_BaseRuntime is assumed.
1. Start the PLC runtime.
2. Call the FB_BaseRuntime.MdSaveAll() method once.
3. Wait for the saving process to be completed.
Depending on the amount of data to be saved, the processing time may vary. In PLC online mode
the variable bMdSaveAll can be monitored to check the completion of the saving process.
ð You have successfully generated a first set of machine data

7.1.4.2 Integrating recipe release


Since in certain operating scenarios (e.g. in automatic mode) no recipes are to be loaded into the PLC, the
release of the recipe management must be given by the PLC.
ü The recipe release requires an initialization after machine start. For this purpose, the property
FB_PlcStateToHmi.PlcInitialized must be set.
1. Write the Boolean condition on the following property: FB_PlcStateToHmi.ProductChangeEnable
ð If the Boolean condition is true, recipes can be loaded into the PLC.

7.1.5 Temperature control

7.1.5.1 Instantiating and initiating temperature control


For certain applications, only the temperature control should be used from the scope of the TwinCAT 3
Plastic Application. In this, but also in the normal use case, the temperature controller must be capable of
being instantiated and initiated individually for this purpose. In the following sample, we will go through this
process step by step.
1. Create a new task with a cycle time of 25 ms. This is not mandatory, but - based on experience -
recommended.

2. Create an instance of FB_Temperature and FB_TemperatureHmi and assign the mapping to the
newly created task.

278 Version: 1.1.0 TF85xx


Samples / instructions

{attribute 'qualified_only'}
VAR_GLOBAL
{attribute 'TcHmiSymbol.Hide'}
{attribute 'TcContextName':=‘TempTask‘}
fbTemperature: FB_Temperature;

fbTemperatureHmi: FB_ TemperatureHmi;


END_VAR
3. Initialize the temperature classes. The following options are available for this:
• We recommend the use of FB_BaseRuntime [} 30]. It is used to run through the initialization steps
automatically. To do this, you only need to create an instance of the runtime (if it does not already
exist), define the cycle calls and transfer the temperature classes to the runtime.
VAR_GLOBAL
fbRuntime: FB_BaseRuntime;
END_VAR

// Program with its task call referenced to PlcTask


PROGRAM PlcMain
// Build list of classes that should be called cyclically by the runtime
_Build();
// Standard call of Cyclic
fbRuntime.Cyclic();

// Program with its task call referenced to TempTask


PROGRAM TempMain
// Slow call for Temperature
fbRuntime.TemperatureCyclic()

// Method to define the runtime objects


METHOD _Build
VAR_INST
bBuild: BOOL; // Latch the Build only gets executed once
END_VAR

IF NOT bBuild THEN


bBuild := TRUE;

// Append temperature classes to be initialized and called by the runtime


fbRuntime.Append(fbTemperature, fbTemperatureHmi);
// Further objects to append
fbRuntime.Append(fbOtherObject, fbOtherObjectHmi);

END_IF
• Alternatively, you can also manually connect and initialize the objects. To do this, call the SetHMI()
and Init() methods of the FB_Temperature and check the return value for successful execution. If
this is the case, you can call the ParamInit() method for parameter initialization and the cycle
method.
VAR
bInit: BOOL;
bInitFailed: BOOL;
bParamInit: BOOL;
hr: HRESULT;
END_VAR

IF NOT bInit AND NOT bInitFailed THEN


hr := fbTempCtrl.SetHMI(fbTempCtrlHmi);
hr := fbTempCtrl.Init();
IF SUCCEEDED(hr) THEN
bInit := TRUE;
ELSE
bInitFailed := TRUE;
END_IF
ELSIF bInit THEN
IF NOT bParamInit THEN
hr := fbTempCtrl.ParamInit();
IF SUCCEEDED(hr) THEN

TF85xx Version: 1.1.0 279


Samples / instructions

bParamInit := TRUE;
END_IF
END_IF

fbTempCtrl.Cyclic();
END_IF

7.1.5.2 Mapping and configuration of temperature zones


A few individual steps must be taken in the engineering to commission the temperature control. After that,
setup and configuration is possible purely on the user interface. The following step-by-step instructions show
you the setting necessities in TwinCAT Engineering.
1. Configure the usable number of zones in the Tc2_PfwLib_Processing.
References > Tc2_PfwLib_Processing > Global Variables > TcPfw_Parameter_Scaling >
cnPfwTempCtrlLast

The library included in the Tc3_PlasticBaseApplication cannot be adjusted! It is necessary to add


the Tc2_PfwLib_Processing library to your project to adjust the number of temperature zones.
2. Link their analog inputs of the temperature sensors to the array .in_PfwTempCtrlInput[].

After setting the number of zones, the project must be created successfully so that the mapping
is updated, otherwise the mapping will not have the set number of zones.
3. Link your digital outputs of the heating and cooling relays to the array .out_pfwTempCtrlOutput[].

Cooling relays must be mapped to .SelOutNeg.


4. Group the linear arrangement of zones to match their application. You have the following options here:
• A contiguous section of the arrangement shall be assigned to a group of temperature zones. In this
sample, zones 1 to 10 are assigned to group 1.
hr := fbTemperature.LinkGroup(nStartIdx := 1, nEndIdx := 10, nGroupIdx := 1, bOverwrite := FAL
SE);
• The devices of a temperature zone group are scattered over the array and must be individually
assigned to the group. In this sample, zone 12 and zone 20 are assigned to group 2.
hr := fbTemperature.LinkZone(nLinearIdx := 12, nGroupIdx := 2, 0, bOverwrite := FALSE);
hr := fbTemperature.LinkZone(nLinearIdx := 20, nGroupIdx := 2, 0, bOverwrite := FALSE);

7.1.5.3 Commissioning of the temperature control


The commissioning of the temperature control includes both a TwinCAT Engineering and a part to be
executed at runtime. This sample summarizes the steps that are executed at runtime.

280 Version: 1.1.0 TF85xx


Samples / instructions

Commissioning via HMI recommended


This sample describes the procedure solely via the PLC path. Use the section Commissioning of
the temperature control [} 286] for commissioning using the HMI.

Before the subsequent steps, the preparation of the TwinCAT project has to be done according to the
example from section Mapping and configuration of temperature zones [} 280].

Set the appropriate input and output signal types and devices for all their temperature zones

Hardware parameterization without grouping


This step refers to the linear mapping of the TF8540 library. Already configured groupings are
ignored in this step.

1. Create a program section to assign the parameters once.


2. Assign the following parameters according to your hardware configuration.
// set cooling output type to 'no cooling'
fbTemperature.Channels(1).OutputSel_C := E_TcPfw_TctrlOutSelect.eTcPfwTcOut_NoSignal;
// set heating output type to 'pwm'
fbTemperature.Channels(1).OutputSel_H := E_TcPfw_TctrlOutSelect.eTcPfwTcOut_PWM;
// set sensor terminal type to 'EL3314'
fbTemperature.Channels(1).TempSensTerm := E_TcPfw_TerminalType.eTcPfwTermT_EL331x;
// set sensor type to 'ThermoCouple Typ K'
fbTemperature.Channels(1).SensorType := E_TcPfw_TempSensType.eTcPfwTempSensT_TC_K;
// set terminal channel of the sensor to 'Channel 1'
fbTemperature.Channels(1).TermChannel := 1;

3. Repeat step 2 for all channels used. If necessary, use a FOR loop or the FB_Temperature
[} 72].CreateDefaultParams() [} 75] method to assign an identical parameter for multiple zones.
FOR i := 3 TO MIN(5, fbTemperatureHmi.CountPfwChannels) DO
fbTemperature.Channels(i).OutputSel_C := E_TcPfw_TctrlOutSelect.eTcPfwTcOut_PWM;
END_FOR
4. Execute the created code segment once.
5. Log on to the controller.
6. Save the parameters on your target device via fbTemperature.MachineData.Save.

Check the reaction of the hardware inputs on the machine


1. Log on to the controller.
2. Go in the tree structure fbTemperature.aGroups[…].aZones[…] to the first used zone.
3. Heat the sensor of the zone via an external heat source.

TF85xx Version: 1.1.0 281


Samples / instructions

4. Observe via the value ActualTemperature whether the temperature change occurs in the expected
zone.
Repeat step 2 to 4 for each zone.

Check the response of the hardware outputs on the machine

Switching on a zone does not generate a power level


Make sure that at the time of this step the temperature control has been enabled by the PLC!
• To enable all zones execute the method FB_Temperature [} 72].EnableAll(…) [} 76].
• To enable exactly one group execute the method FB_Temperature [} 72].Groups(x)
[} 81].Enable(…).

1. Switch on a single temperature zone via fbTemperature.aGroups[…].Zones[…].Enable.


2. Check if in the same zone the value of the variable Heating = TRUE and the value of the variable
ActualTemperature changes.
3. Switch the zone off again as soon as possible to keep the temperature rise to a minimum.

282 Version: 1.1.0 TF85xx


Samples / instructions

4. Repeat steps 1 to 3 for each zone.

Start the automatic tuning of the control parameters


1. Activate the tuning of a group via fbTemperatureHmi.aGroups[…].DoTune = TRUE.
2. Execute step 1 for all groups to be commissioned.

Monitor the automatic tuning until it completes successfully


1. As soon as the value of the variable fbTemperatureHmi.aGroups[…].TuningActive is reset, the
tuning of the group is finished.

TF85xx Version: 1.1.0 283


Samples / instructions

2. The value of the variable fbTemperatureHmi.aGroups[…].TuningDone indicates whether the


tuning was successful.
ð You have successfully commissioned your temperature control.

7.1.6 Central operating function


A central operating function, such as the incremental encoder of the CP2219-1025-0030 [} 295] BlowMolding
Panel PC, can always be connected to exactly one task. The ManualOperation Control in the HMI allows you
to select this central operating function. On the PLC side, it must also be defined how the interaction should
take place logically.
1. Implement the interfaces I_AdaptableSeqExt [} 162] and an interface derived from I_RuntimeInterface
[} 32] in a class (here FB_Sample as an example). This class represents the location where you want to
program the manual function.
FUNCTION_BLOCK FB_Sample IMPLEMENTS I_AdaptableSeqExt, I_OneTaskInterface

2. Create an instance of FB_ManualWheels [} 70] in the FB_Sample.


3. Optional (if not already available): Also create general manual functions for axes, for example.
VAR
fbManualWheel: FB_ManualWheel;

fbManual1Hmi: FB_ManualFunctionHmi;
fbManual1: FB_ManualBaseWork;
fbManual2Hmi: FB_ManualFunctionHmi;
fbManual2: FB_ManualBaseWork;
END_VAR
4. Instantiate your class (here still FB_Sample).
5. Optional (if not already present): Also create instances of type FB_CP22xx_1025 [} 162] and
FB_CP22xx_1025Hmi for integration of the panel PC I/O.
VAR
fbSample: FB_Sample;

fbPanel: FB_CP22xx_1025;
fbPanelHmi: FB_CP22xx_1025Hmi;
END_VAR
6. Append the instance of FB_Sample to the runtime.
7. Optional (if not already present): Also append the instances of the panels to the runtime.
fbRuntime.Append(fbSample, 0);
fbRuntime.Append(fbPanel, fbPanelHmi);
8. Initialize manual functions (including those of the wheel) in the Init()-method of FB_Sample.
9. Then assign the class FB_Sample to the external implementation of the wheel manual function.
METHOD Init : HRESULT

F_SucceededHr(fbManual1.Init(fbAxis1, fbManual1Hmi), Init);


F_SucceededHr(fbManual2.Init(fbAxis2, fbManual2Hmi), Init);

284 Version: 1.1.0 TF85xx


Samples / instructions

F_SucceededHr(fbManualWheel.Init(fbPanel.Wheel), Init);

fbManualWheel.ExternalState := THIS^;
10. Insert the cycle call of the manual functions into a Cyclic()-method of FB_Sample.
11. Also specify when the manual function should be selectable.
METHOD Cyclic

fbManual.Enable1 := bManualMode OR bSetupMode


fbManual.Enable2 := bManualMode OR bSetupMode
fbManualWheel.Enable := bManualMode OR bSetupMode;

fbManualWheel.Cyclic();
fbManual1.Cyclic();
fbManual2.Cyclic();
12. Add a new method called ExtAdaptSeq() to the class FB_Sample so that it can be called from
fbManualWheel.
METHOD ExtAdaptSeq
VAR_INPUT
bInit: BOOL; // TRUE, if the external states should insert themse
lf to iMaster
iMaster: I_AdaptableSeqMaster; // Interface on the state master
END_VAR
13. In this new method, define an initialization with the transfer of the manual functions that are to be
selectable from the wheel.
IF bInit THEN
fbManualWheel.AppendManual(fbManual1);
fbManualWheel.AppendManual(fbManual2);
ELSE
// Wheel control logic will be placed here
END_IF
14. Program the logic of your manual function.
The following sample implements a Jog command with control of the Override via the position of the
wheel.
METHOD ExtAdaptSeq
VAR_INPUT
bInit: BOOL; // TRUE, if the external states should insert thems
elf to iMaster
iMaster: I_AdaptableSeqMaster; // Interface on the state master
END_VAR
VAR
iqAxis: I_Axis;
fOverride: LREAL;
iSeq: I_AdaptableSeqItf;
END_VAR
VAR_INST
iqAxisLast: I_Axis;
fbTrigCmd: FB_Trigger;
END_VAR

IF bInit THEN
// ...
ELSE
// fetch selected manual function
IF fbManual1.State.IsActive THEN
iqAxis := fbAxis1;
iSeq := fbManual1.State;
ELSIF fbManual2.State.IsActive THEN
iqAxis := fbAxis2;
iSeq := fbManual2.State;
ELSE
iqAxis := 0;
END_IF

// trigger on selecting and changing


fbTrigCmd.CLK := iqAxis <> 0 AND iqAxis = iqAxisLast;
fbTrigCmd.Cyclic();

// on selecting a function
IF fbTrigCmd.RQ THEN
// setup wheel behaviour, see FB_CP22xx_Wheel [} 166]
fbPanel.Wheel.Leds.GuidingMid := 0;

TF85xx Version: 1.1.0 285


Samples / instructions

fbPanel.Wheel.Leds.GuidingMidWindow := 1.0;
fbPanel.Wheel.Leds.GuidingMax := 100.0;
fbPanel.Wheel.Leds.GuidingMin := -100.0;
fbPanel.Wheel.Leds.FillMode := TRUE;
fbPanel.Wheel.Enc.LimitOverflow := TRUE;

fbPanel.Wheel.Enc.PositionScale := 2;
fbPanel.Wheel.Enc.SetZero();

fbPanelHmi.WheelClaimed := TRUE;

// on active usage
ELSIF fbTrigCmd.CLK THEN

// stop axis on wheel pressing


IF fbPanel.Wheel.Press.In THEN
fbPanel.Wheel.Enc.SetZero();
END_IF

// hold wheel --> deselect manual function


IF fbPanel.Wheel.Press.Q THEN
iSeq.Jump(iMaster.Idx(2)); // Idle, see FB_ManualWheel [} 70].States() [} 72]
iSeq.Done := TRUE;
RETURN;
END_IF

// avoid commanding opposite direction before axis has stopped


IF iqAxis.Axis.Jog.IsJoggingM THEN
fbPanel.Wheel.Enc.PositionMax := 0;
ELSIF iqAxis.Axis.Jog.IsJoggingP THEN
fbPannel.Wheel.Enc.PositionMin := 0;
ELSIF NOT iqAxis.Axis.Jog.IsStopping AND fbPanel.Wheel.Enc.Velocity = 0 THEN
fbPanel.Wheel.Enc.PositionMax := 100.0;
fbPanel.Wheel.Enc.PositionMin := -100.0;
END_IF

// apply override
fOverride := LIMIT(-100.0, fbPanel.Wheel.Enc.Position, 100.0);
fbPanel.Wheel.Leds.GuidingValue := fOverride;
iqAxis.Axis.Power.Override := ABS(fOverride);

// determine direction
IF fOverride > 0 THEN
iqAxis.JogPositive(TRUE);
ELSIF fOverride < 0 THEN
iqAxis.JogNegative(TRUE);
ELSE
iqAxis.JogNegative(FALSE);
iqAxis.JogPositive(FALSE);
END_IF

// on leaving the selection


ELSIF fbTrigCmd.FQ THEN
iqAxisLast.Axis.Power.Override := 100.0;
iqAxisLast.JogNegative(FALSE);
iqAxisLast.JogPositive(FALSE);

fbPanelHmi.WheelClaimed := FALSE;

fbPanel.Wheel.Leds.FillMode := FALSE;
fbPanel.Wheel.Leds.GuidingValue := -1000;
END_IF

iqAxisLast := iqAxis;
END_IF

7.2 Commissioning of the temperature control


The commissioning of the temperature control includes both a TwinCAT Engineering and a part to be
executed at runtime. This sample summarizes the steps that are executed at runtime.

Before the subsequent steps, the preparation of the TwinCAT project has to be done according to the
example from section Mapping and configuration of temperature zones [} 280].

286 Version: 1.1.0 TF85xx


Samples / instructions

Set the appropriate input and output signal types and devices for all their temperature zones

Hardware parameterization without grouping


This step refers to the linear mapping of the TF8540 library. Already configured groupings are
ignored in this step.

1. Log in with administrator rights (default user = 4th administrator, password = 4).
2. Navigate via the navigation (≡-symbol) to Temperature > Grouping.
3. Group thermally connected zones into one group each (in the order shown in the following diagram).

4. Navigate to Parameters > Temperature.


5. Set your hardware configuration for the first mapped zone in the marked parameters (1 - 5).
6. Repeat steps 4 and 5 for all zones to be used using the marked button (6).
7. Save your settings via the marked button (7).

TF85xx Version: 1.1.0 287


Samples / instructions

1
2

4
5

Check the reaction of the hardware inputs on the machine

1. Navigate via the navigation to Temperature > Configuration.


2. Heat the sensor of a zone via an external heat source.
3. Observe if the temperature change occurs in the expected zone.
4. Repeat steps 2 and 3 for each zone.

288 Version: 1.1.0 TF85xx


Samples / instructions

Check the response of the hardware outputs on the machine

Switching on a zone does not generate a power level


Make sure that at the time of this step the temperature control has been enabled by the PLC!
• To enable all zones execute the method FB_Temperature [} 72].EnableAll(…) [} 76].
• To enable exactly one group execute the method FB_Temperature [} 72].Groups(x)
[} 81].Enable(…).

1. Switch on an individual temperature zone via the slider (1).


2. Check if the power level (2) increases and the actual value (3) of the activated zone changes.
3. Switch the zone off again as soon as possible to keep the temperature rise to a minimum.
4. Repeat steps 1 to 3 for each zone.

TF85xx Version: 1.1.0 289


Samples / instructions

Start the automatic tuning of the control parameters

You should still be on the Temperature > Configuration page.

1. Select the fourth tab (1) in the slider area and start tuning using the corresponding button (2) of the
group.
2. Execute step 1 for all groups to be commissioned.

Monitor the automatic tuning until it completes successfully

1. As soon as the display element on the button is no longer yellow, the tuning is finished.
2. If the display element on the button is green, the tuning has been completed successfully.

You have successfully commissioned your temperature control.

290 Version: 1.1.0 TF85xx


Samples / instructions

7.3 Creating and using the ZoneImageLayoutConfig server


symbol
For storage and reuse [} 238] of layouts created on the Layout [} 246] page of the temperatures, one
instance of the ZoneImageLayoutConfig server symbol is required per layout.

Creation of the server symbol

For each required layout a single position in the ZoneImageLayoutConfigList array is needed

For this purpose it is recommended to create a dynamic array of this type. This is done in the TwinCAT HMI
configuration window:
1. Creation of the data type

2. Creation of a server symbol under the category TcHmiSrv of the corresponding data type

3. Setting the server symbol as persistent using the checkbox (Persist).


ð Server symbol is created.

TF85xx Version: 1.1.0 291


Samples / instructions

Using the server symbol in the configuration mode of the ZoneImageLayout control
1. Select ZoneImageLayout control in the Toolbox and drag it to a content.
2. Set Mode parameter under the category Configuration to Config.

3. For example, using a TcHmiCombobox control to configure the number of layouts available in LiveView
via the .onSelectionChanged event.

4. For this purpose, a new CASE can be created with the value 4 for the SelectedId parameter of the
combo box.
5. Copy and paste the CreateBinding function into the new CASE and select a different array location
such as ZoneImageLayoutConfigList[3] for the symbol transfer parameter.
ð Server symbol is used correctly in configuration mode.

Using the server symbol in display mode


1. Select ZoneImageLayout control in the Toolbox and drag it to a content.
2. Under the Configuration category, associate the ZoneImageLayoutConfig parameter with one of
the array locations of the ZoneImageLayoutConfigList server symbol and set the Mode parameter
to View.

3. The set width and height of the ZoneImageLayout control must be set in the server symbol
(LayoutHeight, LayoutHeightUnit, LayoutWidth and LayoutWidthUnit). To do this, right-click
on the server symbol in the TwinCAT HMI Configuration window and adjust the default value.
ð Server symbol is used correctly in display mode.

7.4 Logging user changes


To log user changes using TF8550 NuGet packages, the following steps must be observed and set in the
TwinCAT HMI project:

1. Setting the configurator control:


◦ Create an instance of type FB_UserLoggingHmi [} 128] in the PLC project if it does not already
exist.
◦ Map the PLC symbol in the HMI project.

292 Version: 1.1.0 TF85xx


Samples / instructions

◦ Include the symbol at UserLoggerSymbol property of the PlcSymbols category of the


Configurator control [} 258].
2. Logging controls from the TF8550 NuGet packages:
◦ Install NuGet package Beckhoff.TwinCAT.HMI.Controls or
Beckhoff.TwinCAT.HMI.Temperature.
◦ In the controls, set the LogChangesByUser property from the User Changes Logging
category to TRUE.
3. Logging further controls:
◦ Select a meaningful event of the control for which logging is to take place.
◦ Use the functionLogUserChanges or LogUserChangesSymbol from the NuGet package
Beckhoff.TwinCAT.HMI.Controls and set the transfer parameters.
4. Applying UserLoggingViewer control:
◦ Drag UserLoggingViewer control from the toolbox onto a content.
◦ Transfer the path containing the UserLog files to the control under the Path property of the File
Config category using the virtual directories.
◦ The files are created by default under the path C:\Data\Machine\UserLog (the path can be
adjusted via the PLC).

Available since version 12.7.0

7.5 Optimizing mappings in the TwinCAT HMI project


When mappings are created in the TwinCAT HMI project, a name is automatically assigned to the mapping.
It consists of the PLC used, the name of the GVL and the instance name of the FB. This symbol name is, for
example, PLC1.Blowpin.fbBlowpinHmi for the blow pin in the Plastic Application project. Since the
symbol names are used as bindings in the entire TwinCAT HMI project and the subordinate variables and
properties are accessed during a binding, this binding can become quite long. This makes it difficult to keep
an overview, wastes storage space and in some cases can have an impact on performance. The name of
the symbol should therefore be chosen carefully.

Creating and renaming mappings

1. In the TwinCAT HMI configuration window under the All Symbols tab, right-click on the instance to be
mapped and click on Map Symbol.

TF85xx Version: 1.1.0 293


Samples / instructions

2. Right-click on the icon again and then select Rename Mapping.

3. Rename the symbol name in the window that appears.

Symbol names used in the Plastic Application HMI project

The abbreviated symbol names shown in the following table are used in the Plastic Application HMI project:

GVL name Instance name of the FB Abbreviated symbol name


Alarms fbAlarmHandlerHmi AlarmHandler
Application fbBlowingHmi Blowing

294 Version: 1.1.0 TF85xx


Samples / instructions

GVL name Instance name of the FB Abbreviated symbol name


Application fbEnergyMeasurementHmi EnergyMeasurement
Application fbMachineHmi Machine
Application fbOperationModeHmi OperationMode
Application fbPanelHmi Panel
Application fbProductionCounterHmi ProductionCounter
Application fbSequenceHmi Sequence
Application fbTrendHmi Trend
Application fbUserLoggerHmi UserLogging
Blowpin fbBlowpinHmi Blowpin
Carriage fbCarriageHmi Carriage
Clamp fbClampHmi Clamp
Extruder fbCoExtruderHmi CoExtruder
Extruder fbMainExtruderHmi MainExtruder
Handling fbCutterHmi Cutter
Handling fbTakeoutHmi Takeout
HmiCommunication fbPlcStateToHmiHmi RecipeHandler
Monitoring fbCabinetTemperatureHmi CabinetTemperature
Monitoring fbCoExtruderCurrentHmi CoExtruderCurrent
Monitoring fbCpuTemperatureHmi CpuTemperature
Monitoring fbHydraulicSystemPressureHmi HydraulicSystemPressure
Monitoring fbMainExtruderCurrentHmi MainExtruderCurrent
Monitoring fbMainExtruderMeltPressureHmi MainExtruderMeltPressure
Monitoring fbMainExtruderMeltTemperatureHmi MainExtruderMeltTemperature
Monitoring fbMonitoringData Monitoring
Setpoints fbHydraulicSystemPressureHmi SetHydraulicSystemPressure
Setpoints fbSetpointsData Setpoints
Temperature fbTemperatureHmi Temperature
Temperature fbTempScheduleHmi TemperatureSchedule
Timer fbSampleTimerTof SampleTimerTof
Timer fbSampleTimerTone SampleTimerTone
Timer fbSampleTimerTp SampleTimerTp
Wtc fbAccumulatorHmi Accumulator
Wtc fbWtcHmi Wtc
Wtc fbWtcTimeMasterHmi WtcTimer

Available since version 12.7.0

7.6 Using the CP2219-1025-0030 Industrial Panel PC


The CP2219-1025-0030 Industrial Panel PC can be used as an extension to the Plastic Application project. It
contains a 19-inch display with a format of 1024x1280 px. The device also offers the following functions and
components, among others:
• USB 3.0 socket behind a rubber cap: Can be used for data exchange on the file management
[} 231] page.
• LED status bar: Indicates the general status of the machine (red: error, yellow: warning, blue:
information, green: automatic mode, flashing green: idle).

TF85xx Version: 1.1.0 295


Samples / instructions

• Emergency stop: Can be activated in an emergency to stop the machine and interrupt the current
flow.
• RFID (iDTRONIC): Can be integrated into the control, for example for user login.
• Button with LED (left): Used to start automatic mode (yellow flashing: homing is required, yellow:
during homing, green flashing: automatic mode can be started, green: automatic mode).
• Button with LED (center): Used to stop automatic mode (red flashing: during stop, red: is stopped).
• Button with LED (right): Can be used to acknowledge alarms (flashing blue: alarms are pending).
• Rotary encoder with LEDs: Can be used to manually move axes [} 202] and set the WTC curve
[} 249] (the individual green LED sections are controlled depending on the mode).

296 Version: 1.1.0 TF85xx


Samples / instructions

Integration into the Plastic Application project

The function blocks FB_CP22xx_1025 [} 162] and FB_CP22xx_1025Hmi can be used to fully integrate the
industrial panel PC into the control system.

Available since version 12.7.0

TF85xx Version: 1.1.0 297


Appendix

8 Appendix

8.1 PLC-API (obsolete)


This chapter lists the obsolete PLC elements. These are still available for compatibility purposes, a change
to the replacing elements is strongly recommended!

8.1.1 F_TryDevide()
Function is 'obsolete'
This function is marked as obsolete and should not be used anymore!

Alternative: F_TryDivide [} 187]

Original version:

Divides two values without throwing an exception.

Return value mathematically invalid


The function defines the mathematically invalid case x / 0 as 0. This is a mathematically invalid
result, but is sufficient for many use cases. Check for your use case whether this definition does not
lead to unforeseen misbehavior.

Syntax:
FUNCTION F_TryDevide : HRESULT
VAR_INPUT
fNominator: LREAL;
fDenominator: LREAL;
refResult: REFERENCE TO LREAL;
END_VAR

Inputs

Name Type Description


fNominator LREAL Value to be divided
fDenominator LREAL Value by which to divide
refResult REFERENCE TO Result of the division
LREAL

Outputs

Name Type Description


F_TryDevide HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

298 Version: 1.1.0 TF85xx


Appendix

8.1.2 FB_TrafoTableGenerator
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: TF8560 - Tc3_PlasticFunctions.FB_TrafoTableGenerator

Original version:

Represents the base class for generation algorithms of transformation cam plates.

Class is abstract
Since the class is defined as ABSTRACT, the class cannot be instantiated and must be implemented
using inheritance.

The following pre-implemented geometries are included:

1. FB_TableGeneratorClampStandard [} 301] - Geometry of a typical clamping unit


2. FB_TableGeneratorCrankStandard [} 303] - Geometry of a crank mechanism
3. FB_TableGeneratorScotchYoke [} 304] - Geometry of a scotch yoke

Syntax:
FUNCTION_BLOCK ABSTRACT FB_TrafoTableGenerator

Properties

Name Type Access Initial value Description


DriveHighEnd LREAL Get, Set 0.0 Upper limit of the drive
position
DriveLowEnd LREAL Get, Set 0.0 Lower limit of the drive
position
LookUp I_CammingLookUp Get, Set NULL Interface to the TF8560 to be
assigned
FB_CammingLookUp Table
ParameterList I_Parameter Get - List of geometry-specific
parameters
ParamValid BOOL Get FALSE The set parameters have valid
values.
Scope [} 300] I_TrafoScope Get - Diagnostic values from the
transformation table
calculation

Methods

Name Description
CalculateScope() Calculates the diagnostic values of the Scope property.
DefineTable() Starts the calculation of the transformation table.
ReadFromParamList() Reads parameters from the list of special parameters.
WriteToParamList() Writes local variables to the list of special parameters.

TF85xx Version: 1.1.0 299


Appendix

Methods are abstract


The methods are defined as ABSTRACT and must be implemented in inheriting classes.

Interfaces

Type Description
I_TrafoTableGenerator Standard interface on FB_TrafoTableGenerator

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.2.1 FB_TrafoScope
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: - (completely removed)

Original version:

Implements diagnostic values for the calculation of the transformation table

Syntax:
FUNCTION_BLOCK FB_TrafoScope

Properties

Name Type Access Initial value Description


HighLimitDefined BOOL Get, Set FALSE An upper limit is defined.
HighLimitDrive LREAL Get, Set 0.0 Upper limit of the drive
HighLimitLoad LREAL Get, Set 0.0 Upper limit of the load side
HighSideBlockpoint BOOL Get, Set FALSE An upper blocking of the
mechanics exists.
HighSideTurnpoint BOOL Get, Set FALSE An upper turning point of the
mechanics exists.
LowLimitDefined BOOL Get, Set FALSE A lower limit is defined.
LowLimitDrive LREAL Get, Set 0.0 Lower limit of the drive
LowLimitLoad LREAL Get, Set 0.0 Lower limit of the load side
LowSideBlockpoint BOOL Get, Set FALSE A lower blocking of the
mechanics exists.
LowSideTurnpoint BOOL Get, Set FALSE A lower turning point of the
mechanics exists.

300 Version: 1.1.0 TF85xx


Appendix

Interfaces

Type Description
I_TrafoScope Standard interface on FB_TrafoScope

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.2.2 FB_TableGeneratorClampStandard_1
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: TF8560 - Tc3_PlasticFunctions.FB_ClampTableGenerator

Original version:

Implements a calculation algorithm for a standard clamping unit mechanism.

Names of the dimension designations in the sketch


The dimension designations are the same as the names of the properties of the class to be
configured.

TF85xx Version: 1.1.0 301


Appendix

Syntax:
FUNCTION_BLOCK FB_TableGeneratorClampStandard_1 EXTENDS FB_TrafoTableGenerator

Properties

Name Type Access Initial value Description


BaseDistance LREAL Get, Set 0.0 Distance between the two stationary bearing
points in the center of the mechanism
DriveArm LREAL Get, Set 0.0 Lever arm attached to the drive

302 Version: 1.1.0 TF85xx


Appendix

Name Type Access Initial value Description


DriveStep LREAL Get, 0.0 Resulting resolution of the drive position in the
transformation table
LoadArm LREAL Get, Set 0.0 Transfer arm to the tool arms
ToolArm_1 LREAL Get, Set 0.0 Lower part of the lateral tool arm
ToolArm_2 LREAL Get, Set 0.0 Upper part of the lateral tool arm
ToolArm_3 LREAL Get, Set 0.0 Horizontal tool arm
ToolArm_Angle LREAL Get, Set 0.0 Angle between the two parts of the side tool
arm
ToolOffset LREAL Get, Set 0.0 Total offset between the bearing and the tool
clamping surface
In the recommended ToolOffset design, the
transformation results in the distance between
the tool clamping surfaces. To use the distance
of the tool opening, it is recommended to use
the ToolAdaption. This is configurable in the
machine data of each FB_PtpMotion based
axis.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.2.3 FB_TableGeneratorCrankStandard
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: TF8560 - Tc3_PlasticFunctions.FB_CrankTableGenerator

Original version:

Implements a calculation algorithm for a crank mechanism.

Constructive assumption
The calculation assumes that the motion axis of the load side is in alignment with the center of
rotation of the drive side. This is indicated in the sketch by the horizontal dashed line!

Names of the dimension designations in the sketch


The dimension designations are the same as the names of the properties of the class to be
configured.

TF85xx Version: 1.1.0 303


Appendix

Syntax:
FUNCTION_BLOCK FB_TableGeneratorCrankStandard EXTENDS FB_TrafoTableGenerator

Properties

Name Type Access Initial value Description


DriveArm LREAL Get, Set 0.0 Lever arm attached to the
drive
DriveStep LREAL Get 0.0 Resulting resolution of the
drive position in the
transformation table
LoadArm LREAL Get, Set 0.0 Transfer arm to the guided
load side

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.2.4 FB_TableGeneratorScotchYoke
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: TF8560 - Tc3_PlasticFunctions.FB_ScotchYokeTableGenerator

Original version:

304 Version: 1.1.0 TF85xx


Appendix

Implements a calculation algorithm for a scotch yoke mechanism.

Names of the dimension designations in the sketch


The dimension designations are the same as the names of the properties of the class to be
configured.

Syntax:
FUNCTION_BLOCK FB_TableGeneratorScotchYoke EXTENDS FB_TrafoTableGenerator

Properties

Name Type Access Initial value Description


DriveArm LREAL Get, Set 0.0 Radius of the eccentric
rotation
DriveStep LREAL Get 0.0 Resulting resolution of the
drive position in the
transformation table

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.3 FB_MonitoringZone
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_MonitoringTemp [} 131]

Original version:

Implements monitoring of a temperature zone with direct connection to TF8540. The adjustable limits are
synchronized with the temperature zone.

Syntax:
FUNCTION_BLOCK FB_MonitoringZone EXTENDS FB_Monitoring

TF85xx Version: 1.1.0 305


Appendix

Properties

Name Type Access Initial value Description


TempZoneHmi I_TempZoneHmi Get NULL [INTERNAL] Referencing to
the values of the assigned
zone

Methods

Name Description
SetTempZone() Sets the temperature zone to be monitored

Interfaces

Type Description
I_MonitoringZone Standard interface on FB_MonitoringZone

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.4 FB_TempCtrl
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_Temperature [} 72]

Original version:

Main class of temperature control to manage all temperature zones and groups.

Syntax:
FUNCTION_BLOCK FB_TempCtrl EXTENDS FB_BaseMd

Properties

Name Type Access Initial value Description


DisableAlarms BOOL Get, Set FALSE Suppresses alarms triggered
by errors in a temperature
zone.
DisableMessages BOOL Get, Set FALSE Suppresses debug messages
of the TF8540 library.
EnableCallback BOOL Get, Set TRUE Enables communication with
the I/O components.
EnableConfig BOOL Get, Set TRUE Enables the configuration of
all zones.

306 Version: 1.1.0 TF85xx


Appendix

Name Type Access Initial value Description


EnableLooptest BOOL Get, Set FALSE Enables current monitoring of
all zones.
Groups REFERENCE TO Get - Control of the individual
ARRAY[] OF groups.
FB_TempGroup
LibScopeVars REFERENCE TO Get - Access to an overview of
FB_Scope_TempCtrlV TF8540 live data.
ariables
RefMdTempSupply REFERENCE TO Get - Access to the array of
ARRAY [] OF machine data containers of all
FB_MdTempSupply supply units.
RefMdTempZone REFERENCE TO Get - Access to the array of
ARRAY[] OF machine data containers of all
FB_MdTempZone temperature zones.
Timer I_TempSchedule Get NULL Access to the connected
scheduler.

Methods

Name Description
CreateDefaultParams() [} 308] Creates a default parameterization for all temperature zones.
EnableAll() [} 309] Enables all temperature zones on the PLC side.
LinkGroup() [} 309] Assigns a linear arrangement of zones to a group.
LinkSupply() [} 310] Assigns a group to a supply unit.
LinkZone() [} 311] Assigns a zone to a group.
SetOpMode() [} 311] Configures the current operation mode.
SetScheduler() Assigns a schedule to the temperature control.
StandbyAll() [} 312] Sets all zones to standby.
UnlinkGroup() Removes all links to a group.

Interfaces

Type Description
I_TempCtrl Standard interface on FB_TempCtrl
I_TempCtrlMdRef Interface for the transfer of zone machine data
I_TempTaskInterface Runtime interface for a slow PLC task

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

TF85xx Version: 1.1.0 307


Appendix

8.1.4.1 CreateDefaultParams()

Creates a default parameterization for all temperature zones.

Syntax:
METHOD CreateDefaultParams : HRESULT
VAR_INPUT
bAllInUse: BOOL;
eSensor: E_TcPfw_TempSensType;
eTerminal: E_TcPfw_TerminalType;
nChPerTerm: INT;
eOutHeating: E_TcPfw_TctrlOutSelect;
eOutCooling: E_TcPfw_TctrlOutSelect;
fSetpoint: LREAL;
fStandbySetp: LREAL;
fPwmCycleTime: LREAL;
END_VAR

Inputs

Name Type Description Recommended standard


bAllInUse BOOL All zones are initialized as "InUse". TRUE
eSensor E_TcPfw_TempS Sensor type - NoSensor in simulation mode eTcPfwTempSensT_NoSensor
ensType
eTerminal E_TcPfwTerminal Terminal type - NoTerminal in simulation eTcPfwTermT_NoTerminal
Type mode
nChPerTer INT Number of channels per terminal 8
m
eOutHeatin E_TcPfw_TctrlOu Output type of the heating output - eTcPfwTcOut_PWM
g tSelect NoSignal, to disable the heating function
(e.g. for measuring zones)
eOutCoolin E_TcPfw_TctrlOu Cooling output type eTcPfwTcOut_NoSignal
g tSelect
fSetpoint LREAL Temperature setpoint for all zones 180.0
fStandbySet LREAL Temperature setpoint for standby 18.0
p temperature of all zones
fPwmCycle LREAL PWM cycle time for all outputs (dutyCycle = 1.0
Time fPwmCycleTime * 0.1)

Outputs

Name Type Description


CreateDefaultParams HRESULT Return value with feedback on the success of the execution

308 Version: 1.1.0 TF85xx


Appendix

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.4.2 EnableAll()

Enables all temperature zones on the PLC side.

Syntax:
METHOD EnableAll
VAR_INPUT
bCmd: BOOL;
bGroups: BOOL;
END_VAR

Inputs

Name Type Description


bCmd BOOL TRUE to grant the release, FALSE to withdraw the release.
bGroups BOOL The enable only takes into account zones that are assigned
to a group.

Outputs

Name Type Description


EnableAll HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.4.3 LinkGroup()

Assigns a set of zones to a group.

Syntax:
METHOD LinkGroup : HRESULT
VAR_INPUT
nStartIdx: INT;
nEndIdx: INT;
nGroupIdx: INT;
bOverwrite: BOOL;
END_VAR

TF85xx Version: 1.1.0 309


Appendix

Inputs

Name Type Description


nStartIdx INT Index of the first zone to be assigned from the linear
TF8540 library arrangement
nEndIdx INT Index of the last zone to be assigned from the linear
TF8540 library arrangement
nGroupIdx INT Index of the group to which the zones are to be assigned
bOverwrite BOOL Zones are assigned even if the group contains already
assigned zones.

Outputs

Name Type Description


LinkGroup HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.4.4 LinkSupply()

Assigns a supply unit to a group.

Syntax:
METHOD LinkSupply : HRESULT
VAR_INPUT
nGroupIdx: INT;
nSupplyIdx: INT;
END_VAR

Inputs

Name Type Description


nGroupIdx INT Index of the group to which a supply unit is to be assigned
nSupplyIdx INT Index of the supply unit to be assigned to the group

Outputs

Name Type Description


LinkSupply HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

310 Version: 1.1.0 TF85xx


Appendix

8.1.4.5 LinkZone()

Assigns a single zone to a group.

Syntax:
METHOD LinkZone : HRESULT
VAR_INPUT
nLinearIdx: INT;
nGroupIdx: INT;
nGroupMemberIdx: INT;
bOverwrite: BOOL;
END_VAR

Inputs

Name Type Description


nLinearIdx INT Index of the zone from the linear TF8540 library
arrangement that is to be assigned
nGroupIdx INT Index of the group to which the zone should be assigned
nGroupMemberIdx INT Index in the target group
bOverwrite BOOL Zone is assigned even if the index is already occupied in
the target group.

Outputs

Name Type Description


LinkZone HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.4.6 SetOpMode()

Defines the current OpMode of the temperature control.


• OpMode None (0)
◦ Temperature control does not accept commands
• OpMode Simple (1)
◦ Zones can be enabled and disabled via TmpCtrlHmi.Group[].Enable
• OpMode Standard (2)
◦ Zones are controlled via TempCtrlHmi.Groups[].OpModeActive
◦ Zones support standby via TempCtrlHmi.Groups[].OpModeStandby

TF85xx Version: 1.1.0 311


Appendix

Syntax:
METHOD SetOpMode : HRESULT
VAR_INPUT
OpMode: INT;
END_VAR

Inputs

Name Type Description


OpMode INT Selection parameters: 0 – None, 1 – Simple, 2 - Standard

Outputs

Name Type Description


SetOpMode HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.4.7 StandbyAll()

Sets all zones to standby temperature.

Syntax:
METHOD StandbyAll : HRESULT
VAR_INPUT
bCmd: BOOL;
bGroups: BOOL;
END_VAR

Inputs

Name Type Description


bCmd BOOL TRUE to enable the standby temperature, FALSE to
disable.
bGroups BOOL The function only considers zones that are assigned to a
group.

Outputs

Name Type Description


StandbyAll HRESULT Return value with feedback on the success of the execution

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

312 Version: 1.1.0 TF85xx


Appendix

8.1.5 FB_TempCtrlHmi
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_TemperatureHmi [} 79]

Original version:

HMI parallel class to the FB_TempCtrl.

Syntax:
FUNCTION_BLOCK FB_TempCtrlHmi EXTENDS FB_BaseMdHmi

Properties

Name Type Access Initial value Description


AlarmAbsoluteHigh BOOL Get FALSE A zone (InUse = TRUE) has
exceeded the absolute
temperature maximum.
AlarmAbsoluteLow BOOL Get FALSE One zone (InUse = TRUE)
has fallen below the absolute
temperature minimum.
AlarmHighHigh BOOL Get FALSE At least one zone with active
control has exceeded the
HighHigh tolerance.
AlarmHigh BOOL Get FALSE At least one zone with active
control has exceeded the High
tolerance.
AlarmLow BOOL Get FALSE At least one zone with active
control has fallen below the
low tolerance.
AlarmLowLow BOOL Get FALSE At least one zone with active
control has fallen below the
LowLow tolerance.
CountPfwZones LREAL Get 20.0 Number of available TF8540
temperature zones
Groups REFERENCE TO Get - Access to group-based
ARRAY[] OF information
FB_TempGroupHmi
ParamTempSupply REFERENCE TO Get - Parameter interface for
ARRAY[] OF parameterization via the HMI
FB_MdTempSupplyHm
i
ParamTempZone REFERENCE TO Get - Parameter interface for
ARRAY[] OF parameterization via the HMI
FB_MdTempZoneHmi
TempAmbient LREAL Get, Set 18.0 Standard ambient temperature
(for simulation)

TF85xx Version: 1.1.0 313


Appendix

Interfaces

Type Description
I_TempCtrlHmi Standard interface on FB_TempCtrlHmi

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.6 FB_TempGroup
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_TemperatureGroup [} 81]

Original version:

Class for group control of temperature control.

Syntax:
FUNCTION_BLOCK FB_TempGroup EXTENDS FB_Base

Properties

Name Type Access Initial value Description


AlarmAbsoluteHigh BOOL Get FALSE Group (at least one zone) has
exceeded the absolute
maximum temperature.
AlarmAbsoluteLow BOOL Get FALSE Group (at least one zone) has
fallen below the absolute
temperature minimum.
AlarmHighHigh BOOL Get FALSE Group (at least one zone) has
exceeded the HighHigh
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmHigh BOOL Get FALSE Group (at least one zone) has
exceeded the High tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmLow BOOL Get FALSE Group (at least one zone) has
exceeded the Low tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.

314 Version: 1.1.0 TF85xx


Appendix

Name Type Access Initial value Description


AlarmLowLow BOOL Get FALSE Group (at least one zone) has
exceeded the LowLow
tolerance.
Alarms to the tolerance values
are only active if the zones are
actively controlled.
AlarmNoResponse BOOL Get FALSE Temperature value of the
group (at least one zone) does
not respond to the control.
EnableLimitAlarms BOOL Get, Set FALSE Exceeding a tolerance value/
limit triggers an alarm.
Fault BOOL Get FALSE Group (at least one zone) has
an error.
IsActive BOOL Get FALSE Group (at least one zone) is
actively controlled.
IsEnabled BOOL Get FALSE All zones of the group are
enabled.
IsStandby BOOL Get FALSE All zones of the group are in
standby mode.
Zones REFERENCE TO Get - Control of the individual zones
ARRAY[] OF
FB_TempZone

Methods

Name Description
Enable() Enables all zones of the group on the PLC side.
Force() Forces all zones of the group to heating/cooling 100%.

Interfaces

Type Description
I_TempGroup Standard interface on FB_TempGroup

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.7 FB_TempGroupHmi
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_TemperatureGroupHmi [} 85]

Original version:

TF85xx Version: 1.1.0 315


Appendix

HMI parallel class to the FB_TempGroup class.

Syntax:
FUNCTION_BLOCK FB_TempGroupHmi EXTENDS FB_BaseMdHmi

Properties

Name Type Access Initial value Description


CountLinkedZones INT Get, Set 0 Number of assigned zones via
the 'Link()' methods of the
FB_TempCtrl
DoTune BOOL Get, Set FALSE Starts tuning of all active
zones of the group.
Enable1 BOOL Get, Set FALSE Releases the zones through
the HMI.
GroupIndex INT Get 0 Index of the group in the
FB_TempCtrlHmi array
GroupName STRING Get ‘‘ Temperature group name
OpModeActive2 REFERENCE TO Get - Interface for active switching
FB_TempGroupOpMod of a temperature group
eHmi
OpModeStandby2 REFERENCE TO Get - Interface for the standby
FB_TempGroupOpMod circuit of the temperature
eHmi group
TuningActive BOOL Get FALSE Tuning of at least one zone is
active.
TuningDone BOOL Get FALSE The tuning of the group is
completed.
Zones REFERENCE TO Get - Interface to the individual
ARRAY[] OF zones of a group
FB_TempZoneHmi
1
Only in OpMode 'Simple'
2
Only in OpMode 'Standard'

Methods

Name Description
SetZoneData() [INTERNAL] Connects the temperature zones of a group with the
machine data.

Interfaces

Type Description
I_TempGroupHmi Standard interface on FB_TempGroupHmi

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

316 Version: 1.1.0 TF85xx


Appendix

8.1.8 FB_TempGroupOpModeHmi
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: - (integrated in FB_TemperatureGroupHmi [} 85])

Original version:

Class for controlling the temperature operation mode (in FB_TempCtrl OpMode "Standard").

Syntax:
FUNCTION_BLOCK FB_TempGroupOpModeHmi

Properties

Name Type Access Initial value Description


Off BOOL Get, Set TRUE Switches the temperature
group off.
On BOOL Get, Set FALSE Switches the temperature
group on.
Timed BOOL Get, Set FALSE Switches the temperature
group to a time-based switch-
on.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.9 FB_TempZone
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_TempChannel [} 88]

Original version:

Class for single control of a temperature zone.

Syntax:
FUNCTION_BLOCK FB_TempZone EXTENDS FB_Base

TF85xx Version: 1.1.0 317


Appendix

Properties

Name Type Access Initial value Description


AlarmAbsoluteHigh BOOL Get FALSE Zone has exceeded the
absolute maximum
temperature.
AlarmAbsoluteLow BOOL Get FALSE Zone has fallen below the
absolute temperature
minimum.
AlarmHighHigh BOOL Get FALSE Zone has exceeded the
HighHigh tolerance.
Alarms to the tolerance values
are only active when the zone
is actively controlled.
AlarmHigh BOOL Get FALSE Zone has exceeded the high
tolerance.
Alarms to the tolerance values
are only active when the zone
is actively controlled.
AlarmLow BOOL Get FALSE Zone has exceeded the low
tolerance.
Alarms to the tolerance values
are only active when the zone
is actively controlled.
AlarmLowLow BOOL Get FALSE Zone has exceeded the
LowLow tolerance.
Alarms to the tolerance values
are only active when the zone
is actively controlled.
AlarmNoResponse BOOL Get FALSE Temperature value of the
zone does not respond to the
control.
EnableLimitAlarms BOOL Get, Set FALSE Exceeding a tolerance value/
limit triggers an alarm.
IsLinked BOOL Get FALSE Zone is connected to a group.

Interfaces

Type Description
I_TempZone Standard interface on FB_TempZone

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.10 FB_TempZoneHmi
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_TempChannelBase [} 87]

318 Version: 1.1.0 TF85xx


Appendix

Original version:

Access class for a single temperature zone via the HMI.

Syntax:
FUNCTION_BLOCK FB_TempZoneHmi

Properties

Name Type Access Initial value Description


Index INT Get, Set 0 References a
PlasticApplication zone to a
TF8540 zone.

Class contains significantly more properties than listed


The properties of the FB_TempZoneHmi class overlap with the TF8540 Global Variables
aaaPfwTempToHmi, aaaPfwTempMparamFromHmi and aaaPfwTempPparamFromHmi. For more
information on overlapping features, it is recommended to use the TF8540 documentation.

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.11 FB_AxisSpecific
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_MotionSpecific [} 35]

Original version:

The class implements technology-specific functions of a TF8560 axis.

Syntax:
FUNCTION_BLOCK FB_AxisSpecific EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Hydraulic [} 36] I_HydraulicFunctions Get - Hydraulic-specific functions
Nc [} 37] I_NcFunctions Get - NC-specific (servo-electric)
functions
Trafo [} 38] I_TrafoFunctions Get - Transformation-specific
functions

TF85xx Version: 1.1.0 319


Appendix

Interfaces

Type Description
I_AxisSpecific Standard interface on FB_AxisSpecific

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.12 FB_WtcTimeMaster
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_WtcTimer [} 151]

Original version:

Implements a timer as master for WTC camming.

Syntax:
FUNCTION_BLOCK FB_WtcTimeMaster EXTENDS FB_Base

Properties

Name Type Access Initial value Description


ActualTime LREAL Get 0.0 Elapsed time since start of
WTC cycle in seconds
ActualTimeLatched LREAL Get 0.0 Stored time of the last WTC
cycle in seconds
FirstStart BOOL Get FALSE WTC is in its first cycle since
the last launch.
GuidingValue LREAL Get 0.0 Time value as resulting
camming master value
ProfileStarted BOOL Get FALSE TRUE if the timer has been
started.

Methods

Name Description
ProfileStartAck() Resets the "ProfileStarted" feedback signal.
Start() Starts the timer.

Interfaces

Type Description
I_WtcTimeMaster Standard interface on FB_WtcTimeMaster

320 Version: 1.1.0 TF85xx


Appendix

Type Description
I_WtcMaster General interface of a WTC master axis

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.13 FB_WtcAccuMaster
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_WtcAccumulator [} 152]

Original version:

Implements an accumulator as the master for WTC camming.

Syntax:
FUNCTION_BLOCK FB_WtcAccuMaster EXTENDS FB_Axis

Properties

Name Type Access Initial value Description


FillingDone BOOL Get FALSE The accumulator has reached
the filling volume.
GuidingValue LREAL Get 0.0 Position as resulting camming
master value
PushoutDone BOOL Get FALSE The discharge is completed
(the remaining filling volume is
below the buffer volume).

Methods

Name Description
Filling() Starts the filling process of the accumulator.
Pushout() Starts the pushing-out the filling volume.

Interfaces

Type Description
I_WtcAccuMaster Standard interface on FB_WtcAccuMaster
I_WtcMaster General interface of a WTC master axis

TF85xx Version: 1.1.0 321


Appendix

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

8.1.14 FB_ManualPtp
Class is 'obsolete'
This class is marked as obsolete and should not be used anymore!

Alternative: FB_ManualBaseWork [} 65]

Original version:

Implements a predefined version of a manual function for controlling a PTP axis.

Syntax:
FUNCTION_BLOCK FB_ManualPtp EXTENDS FB_Base

Properties

Name Type Access Initial value Description


Enable BOOL Get, Set FALSE Releases the manual function.
TrigCmdBasePos I_Trigger Get - Trigger on the base position
command
TrigCmdWorkPos I_Trigger Get - Trigger on the working
position command

Methods

Name Description
Cyclic() Cycle method
SetWorkBasePos() Sets the base and working position for indication on the HMI

Interfaces

Type Description
I_ManualFunction Universal interface to a manual function

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.42 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.6.0)

322 Version: 1.1.0 TF85xx


Appendix

8.1.15 PlasticStatusHmi
Function is 'obsolete'
This function is marked as obsolete and should not be used anymore!

Alternative: T_PlasticStatus [} 187]

Original version:

Status variable for linking to an HMI StateIndicator. This variable is interpreted bit by bit.

Syntax:
TYPE PlasticStatusHmi : BYTE; END_TYPE

Values

bit Description
0 Successful (Green)
1 Warning (Orange)
2 Error (Red)
3 Reserved
4 Reserved
5 Reserved
6 Reserved
7 State is invalid

Requirements

Development environ- Target platform PLC libraries to include


ment
TwinCAT v3.1.4024.35 PC or CX (x64, x86) Tc3_PlasticBaseApplication (>= v3.12.5.0)

TF85xx Version: 1.1.0 323


More Information:
www.beckhoff.com/en-us/products/automation/twincat/tfxxxx-
twincat-3-functions/tf8xxx-industry-specific

Beckhoff Automation GmbH & Co. KG


Hülshorstweg 20
33415 Verl
Germany
Phone: +49 5246 9630
info@beckhoff.com
www.beckhoff.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy