Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net
2.9.2
Prefix Reserved
dotnet add package Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net --version 2.9.2
NuGet\Install-Package Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net -Version 2.9.2
<PackageReference Include="Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net" Version="2.9.2" />
<PackageVersion Include="Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net" Version="2.9.2" />
<PackageReference Include="Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net" />
paket add Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net --version 2.9.2
#r "nuget: Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net, 2.9.2"
#:package Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net@2.9.2
#addin nuget:?package=Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net&version=2.9.2
#tool nuget:?package=Beckhoff.TwinCAT.TcEventLoggerAdsProxy.Net&version=2.9.2
Description
The package 'Beckhoff.TwinCAT.EventloggerAdsProxy' contains a client for interacting with the TwinCAT 3 Eventlogger. It includes everything to develop own .NET Core applications (e.g. HMI, Datalogger) to communicate with TwinCAT devices.
Requirements
- Operating System: TwinCAT/BSD, Windows 10, Windows 11
Documention
The actual version of the documentation is available in the Beckhoff Infosys. Beckhoff Information System
Getting Started
using TcEventLoggerAdsProxyLib;
using System.Globalization;
var logger = new TcEventLogger();
logger.MessageSent += (TcMessage message) => Console.WriteLine("Received Message: " + message.GetText(CultureInfo.CurrentCulture.LCID));
logger.AlarmRaised += (TcAlarm alarm) => Console.WriteLine("Alarm Raised: " + alarm.GetText(CultureInfo.CurrentCulture.LCID));
logger.AlarmCleared += (TcAlarm alarm, bool bRemove) => Console.WriteLine((bRemove ? "Alarm Cleared and was Confirmed: " : "Alarm Cleared: ") + alarm.GetText(CultureInfo.CurrentCulture.LCID));
logger.AlarmConfirmed += (TcAlarm alarm, bool bRemove) => Console.WriteLine((bRemove ? "Alarm Confirmed and was Cleared: " : "Alarm Confirmed: ") + alarm.GetText(CultureInfo.CurrentCulture.LCID));
logger.Connect(); //connect to localhost
Console.Write("Press 'x' or CTRL+C to quit");
while (true)
{
if (Console.ReadKey(true).Key == ConsoleKey.X) break;
}
Send Message
using TcEventLoggerAdsProxyLib;
var logger = new TcEventLogger();
logger.Connect(); //connect to localhost
var cls = Guid.Parse("{E0777B97-0929-4CC3-8996-A3555C4C663B}");
var id = 123u;
var severity = SeverityLevelEnum.Error;
var source = new TcSourceInfo
{
Name = "SendTcMessageSample",
Guid = Guid.Parse("{E0858882-E4F2-4B42-8729-1753BCC26FD0}"),
Id = 999
};
var event_args = new TcArguments
{
"X_Axis",
123
};
Console.Write("Press 's' to send and 'x' or CTRL+C to quit");
while (true)
{
var input = Console.ReadKey(true);
if (input.Key == ConsoleKey.S)
logger.SendTcMessage(cls, id, severity, "{ axis : { name : 'X-Axis', index : 2 }", source, event_args);
else if (input.Key == ConsoleKey.X) break;
}
Localized Source Name
To access localized source names, cast Message, Alarm or LoggedEvent to ITcSourceInfoLocalization. Use either the As<type> method or (from .NET 5.0) the direct as cast operator. Returns null if the function is not supported by the runtime.
var localizedSource = message.As<ITcSourceInfoLocalization>();
var localizedName = localizedSource?.GetLocalizedSourceName(CultureInfo.CurrentCulture.LCID);
// .NET 5.0+ alternative:
var localizedName2 = (message as ITcSourceInfoLocalization)?.GetLocalizedSourceName(CultureInfo.CurrentCulture.LCID);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net47 is compatible. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.