Beckhoff ADS.net and VS2008

smuraski

Member
Join Date
Jul 2009
Location
NC
Posts
6
Does anyone have any experience accessing a Beckhoff PLC from a VS2008 app using ADS.net?

I can connect to a local instance of TwinCAT but I cannot connect to a remote. I get an error that the target port could not be found. Thanks.
 
Have you added the remote to the AMS Router list?
Rightclick the Twincat icon in taskbar and then PROPERTIES.
Under AMS Router tab add the remote AMS Net id!

Matic
 
Yes...did that...I am thinking that it may be something in windows...the VS2008 PC is Vista and the TwinCAT PC is XP...
 
Both...TwinCat exists on both machines...I can connect to the Vista TwinCAT which is local, I can "connect" to the remote TwinCAT on the XP machine, but when Itry to access any data on the remote TwinCAT I get the error...same network subnet, can ping, etc.
 
I had a similar problem to that, but I don't know if it applies to you.
I had two computers(XP) with a visualisation program(VB2008 based) and Twincat on both of them. They were connected via LAN. Only one(master) computer has a connection to a EtherCAT terminal.
The problem was that both Twincat programs were in Runtime mode and that caused a conflict. I had to stop the Runtime mode on the "slave" computer and from then on everything workes fine!

Let me know if this helps!
 
Thanks for the help, but still no access tot he remote TwinCAT...I'll try Beckhoff for an answer...I hope...just evaluating the platform right now using the trial license from their web site...Thanks again for trying.
 
If I setup routing tables in the system manager I can connect. If I use the TxAmsRemoteMgr.exe to set the routes, I cannot read/write. According to Beckhoff, I do no need TwinCAT installed on my .net machine in order to access TwinCat on another machine...yet this appears to be a requirement???
 
According to Beckhoff, I do no need TwinCAT installed on my .net machine in order to access TwinCat on another machine...yet this appears to be a requirement???
You definitely do not need TwinCAT installed on the client to access the remote TwinCAT. However the routes must be setup on both PCs. Using TcAmsRemoteMgr should work if the remote connections are setup on both computers. Essentially the only thing it is doing is writing a registry entry to HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\Remote\....

The entries must exist in each opposing PC's registry. It's sort of like a security feature to prevent a client from accessing the server unless the server is configured also. I actually have a piece of VB code that performs the entry automatically on both ends from the client side, so you can deploy an application on a PC without having to go through the configurations. It works by mimmicing the actions the System Manager does when you do a Broadcast Search->Add Route
 
Would you be willing to share the VB code...I did not see anything in the .net docs indicating the regitry entries were required...seems like an important piece of info that I must have missed???
 
The code is part of a larger .NET class, so it's kind of complex to follow that portion, but I'm more than willing to share it with you. Private message me an email address and I will send it to you.

The registry entries are not documented because they are more of a "behind the scene" part of TwinCAT.
 
Is this remote capability already in your AdvancedHMI or do I havo to add it manually?
I didn't include the automatic routing registration in the AdvancedHMI driver because I have to work out a small issue with it. If the TwinCAT server is not able to be reached, the application will essentially freeze up for several minutes. The registration process really needs to be done on a background worker thread.
 

Similar Topics

Hi, I tried to implement the TwinCAT ADS TCPIP communication with .NET Studio. I tried with the sample code provided within the INFOSYS help...
Replies
10
Views
25,640
TwinCat3 Beckhoff "Add route to remote system failed ADS Error 1804 (0x70C)" Hi everyone, I have a problem connecting with a Beckhoff CX5120...
Replies
4
Views
40,391
Hello all, I ran in to some trouble. I created 2 virtual machines to try out ADS communicating One machine is a PLC (TC2 32bit (runtime)), other...
Replies
3
Views
20,030
I want to read variables from the PLC with my C# programm. Is it possible to run my c# programm on a computer without the TwinCat System...
Replies
2
Views
2,819
Hello all: I am in the process of writing some drivers on a PC that will communicate with a Beckhoff PLC via AMS/ADS :banghead: . I can request a...
Replies
9
Views
4,596
Back
Top Bottom