TcForms 1.0.3
dotnet add package TcForms --version 1.0.3
NuGet\Install-Package TcForms -Version 1.0.3
<PackageReference Include="TcForms" Version="1.0.3" />
<PackageVersion Include="TcForms" Version="1.0.3" />
<PackageReference Include="TcForms" />
paket add TcForms --version 1.0.3
#r "nuget: TcForms, 1.0.3"
#:package TcForms@1.0.3
#addin nuget:?package=TcForms&version=1.0.3
#tool nuget:?package=TcForms&version=1.0.3
Description
The package 'TcForms' simplifies the development of functional WinForms applications for TwinCAT PLCs. It manages the ADS communication with PLC variables and links UI controls with minimal programming effort.
Requirements
- .NET 8.0
- A TwinCAT 3.1.4024.10 Build (XAE, XAR or ADS Setup) or later.
First Steps
Add Tc3_TcForms PLC-Library (from Sample Project) to your TwinCAT PLC project and call the FB_License function block to validate the CLIENT license. No license key is required on a development PC (see Licences and Pricing).
PROGRAM MAIN
VAR
fbTcFormsLicense : Tc3_TcForms.FB_License;
END_VAR
----
// TcForms License
fbTcFormsLicense(bExecute:=TRUE);
Create a Windows Forms App project with .NET 8.0. Add a file called config.ini to the project. Navigate to the properties of this file and select 'Build Action': Content and 'Copy to output': Copy if newer. Copy the following content into the config.ini file
[License]
Type=CLIENT
Key=
SymbolName=MAIN.fbTcFormsLicense
[TwinCAT]
AmsNetID=127.0.0.1.1.1
CycleTime=100
Add a TcControl (e.g. TcButton) to your Form and set the name of the variable to be linked under Properties->TwinCAT->PlcVariable. Add the following code to your Form class to link all TcControls of the form to the TwinCAT PLC.
using System.Windows.Forms;
using TcForms;
namespace WinFormsApp1
{
public partial class Form1 : Form
{
private TcControlLink tcControlLink = new();
public Form1()
{
InitializeComponent();
this.Load += Form1_Load;
this.FormClosing += Form1_FormClosing;
}
private void Form1_Load(object? sender, EventArgs e)
{
foreach (Control control in this.Controls)
{
if (control is ITcControl)
{
tcControlLink.Add(control);
}
}
}
private void Form1_FormClosing(object? sender, FormClosingEventArgs e)
{
foreach (Control control in this.Controls)
{
if (control is ITcControl)
{
tcControlLink.Remove(control);
}
}
}
}
}
Build and start the project to check the connection.
Sample Project
GitHub Sample Project 'TwinCAT-GUI'
Licences and Pricing
There are two license types: CLIENT and HOST. TcForms requires either a CLIENT OR a HOST license. The HOST license is applied to the PC running the WinForms application. The CLIENT license is applied to the PC running the TwinCAT PLC. On PCs without a Beckhoff serial number, the CLIENT license can be used without a license key as a trial license.
License Type | Description | Price |
---|---|---|
CLIENT | Applied on the PC that runs the TwinCAT PLC. Allows connection to multiple host PCs. Can be used without a license key as a trial license on non-Beckhoff PCs. | 75€ |
HOST | Applied on the PC that runs the WinForms application. Allows connection to mutliple client PCs. | 75€ |
To request a quote or place an order, contact tcforms@kloetzer-automation.de.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows7.0
- Beckhoff.TwinCAT.Ads (>= 6.2.347)
- INIParser (>= 1.0.1)
- System.Management (>= 9.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.3 | 145 | 6/2/2025 |