Questions tagged [twincat-ads-.net]

The TwinCAT.Ads DLL is a .NET class library, that provides classes to communicate with an ads device.

The class library is part of the TwinCAT AdsCommLib. The DLL allows for server-client based communication in a synchronous and asynchronous(event-based) manner.

Links

Related Tags

34 questions
6
votes
1 answer

Write array of struct using TwinCAT.Ads through C# application

I’m using TwinCAT.Ads (TwinCAT 3) for Beckhoff plc communication through c# application. Application is reading and writing few plc variables. I’m getting an error: “Unable to marshal object. Parameter name: value” while writing an array of…
V P
  • 91
  • 3
  • 10
3
votes
1 answer

In TwinCAT, is there a way to get the real time (isolated) CPU usage from outside of the PLC code?

The CPU usage of non-RT cores is available in MDP (either over ADS or UA), but I'm unable to find any way to get the CPU usage of isolated cores from user land (i.e. Windows). I feel like there should be an easy way to read this since TcXaeShell is…
Jay
  • 33
  • 4
3
votes
2 answers

Reading properties from TwinCAT function blocks using c#

We are using a C# application to read variables from a Beckhoff PLC through TwinCAT ADS v.3. If we attempt to utilize the same code to read properties the code fails with an exception. FUNCTION_BLOCK FB_Sample VAR SomeVariable : INT; …
froeschli
  • 2,692
  • 2
  • 28
  • 55
3
votes
1 answer

How to link Beckhoff TwinCAT 3 to a Visual Studio HMI created in C#?

I am quite new in TwinCAT 3 and .NET framework. I am trying just to create an HMI with a button and link it to a variable in TwinCAT 3. I am controlling by TwinCAT 3 a Beckhoff output card (EL2014) so I have created the following variable named…
Emm
  • 491
  • 5
  • 11
2
votes
1 answer

How to fix AdsError 1792 (0X700) for TwinCAT 3

I am using a Windows PC as my Development PC (XAE) and another Windows PC as my Remote PC (XAR). I have connected them successfully. It is shown in the picture below. But, this error appeared when I tried to Activate the configuration after…
Talha Bashir
  • 33
  • 1
  • 7
2
votes
0 answers

ADS symbol group and offset don't match ADS info

I'm trying to access data from a PLC input variable through an ADS Client using the variable's IndexGroup and IndexOffset. I used the SymbolLoaderFactory to get access to the symbol. With the symbol, I can use an ADS client to read it's data. But, I…
Vic
  • 55
  • 7
2
votes
1 answer

How to read a struct containing array of structs from TwinCat to C#

Using TwinCAT 3 ADS.Net for reading from PLC, I'm trying to read a struct containing array of structs, but the ReadAny command crashes with "Unable to marshal type" exception. Reading directly an array of structs works fine though. public object…
Udi Y
  • 258
  • 3
  • 12
1
vote
1 answer

Is it essential to have same TwinCAT versions (XAE on Engineering PC) and (XAR on Runtime PC)?

I have two PCs connected to each other in TwinCAT as shown in the picture. But, I am facing an error when I try to activate the configuration. Error is shown in the picture. There is a difference in the version of TwinCAT versions (XAE on…
Talha Bashir
  • 33
  • 1
  • 7
1
vote
2 answers

How to create a Twincat ADS route in WIndows without the Twincat System application?

I have a Windows application with Twincat ADS library to monitor a PLC. As far as I know this library works only after the creation of the ADS route in the Windows computer using the Twincat tool. Do you know if it is possibile to create the route…
Tobia
  • 9,165
  • 28
  • 114
  • 219
1
vote
1 answer

Read variables in Twincat 3 continously with the C# API

I want to read a lot of variables continuously (faster than 10 Hz) via the ADS client of C#. However, in the documentation the examples only read the variables one time. I found the Twincat-OCX module that has this functionality, but it is used for…
Lau
  • 1,353
  • 7
  • 26
1
vote
2 answers

Automatically re-create PollValues ​after a lost PLC connection or PLC program upload

I'm trying to write C# application where ADS client will automatically reconnect/renew reading/writing values and subscriptions when application lost connection with PLC or new version of PLC program will be downloaded. I'm using…
magino
  • 109
  • 9
1
vote
1 answer

How can I Add ADS Route in Twincat programmatically

How can I add ads route programmatically? I can add route only by TcAmsRemoteMgr.exe. The code that I only can find is https://github.com/nikvoronin/AdsRemote. But, it doesnt seem to work.
Fatih
  • 11
  • 2
1
vote
2 answers

Unable to Establish Route with Pyads (Python and TwinCAT 3)

I am trying to connect to TwinCAT using Pyads package in Python to communicate with the PLC. I already added the route in TwinCAT but when I try to connect on Python I receive the following error: "ADSError: target machine not found Missing ADS…
1
vote
1 answer

Twincat 3 Eventlogger c# reference

In the webinar there is an example written in c# on how to access events from the eventlogger (14 minutes in). In the example there is a type, TcEventlogger, however I'm not able to find the dll that contains this type. I have the latest version…
Erik W
  • 179
  • 1
  • 9
1
vote
2 answers

Detect code changes on Beckhoff PLC using C#

I have a Beckhoff PLC that's running a software developed with TwinCat3. Is there a way to retrieve the running software using C# application ? The TwinCAT.Ads library does not seem to offer such functionality. The plan is to be able to compare what…
skari
  • 45
  • 1
  • 8
1
2 3