Lambda Function

In the development and testing phase, lambda functions should be published as testing versions. These contain the configured symbols, as well as the Lambda Control with the four buttons.

Lambda Function 1:

This lambda function can be tested like any other algorithm in Analytics Workbench. If changes are necessary, the Lambda Control guides you through the further development. After clicking the first button, a wizard for configuring the lambda function opens. The wizard for existing lambda functions offers two modes.

Lambda Function 2:

The button Export Function offers the possibility to export lambda functions. For this purpose, the C++ project and the drivers of the lambda function are saved in a zip archive. Using the import function in the lambda template, the lambda function can be conveniently imported and integrated on another system. Via the mode Edit lambda function the already developed lambda function can be edited. The second button can be used to export the current lambda function. A Save File dialog opens for this purpose. This dialog can be used to specify the file location. Exporting starts after the selection. The exported lambda function can then be distributed to other systems. The other systems can import the lambda function from the lambda template using the wizard.
In the Edit lambda function mode, the symbols can be customized on the next page of the wizard.

Lambda Function 3:

In this example, another input named "NewSummand3" has been added. These changes are also included in the C++ file in the subsequent step.

Lambda Function 4:

The new variable is included in the structure from inputs and can be used in the program code. The program code from the previous version was taken over. If symbols have been removed across a version, the corresponding changes must be made in the program code.
The further steps in the development of the lambda function are analogous to the procedure for the lambda template.

Debugging Lambda Functions

To debug lambda functions, the tools of TwinCAT C++ have to be used. For this purpose a new TwinCAT project must be created and the C++ project of the lambda function must be inserted under the C++ node. All TwinCAT C++ debugging options are available (see Debugging). The Debug tab can be used to attach to the TcScopeSever process. Afterwards the analysis is to be started in the Workbench and the set breakpoints are reached in the C++ project.

Tidying up the toolbox

After some lambda functions have been developed and tested, the toolbox may be very full. To clean up the toolbox, the corresponding lambda functions must be deleted from the Modules folder. The folder can be found under the path <TwinCAT3Dir>/CustomConfig/Modules.