Beckhoff ADS .NET Communicatiom

addicted

Member
Join Date
Apr 2008
Location
Karachi
Posts
24
Hi,

I tried to implement the TwinCAT ADS TCPIP communication with .NET Studio. I tried with the sample code provided within the INFOSYS help.

1st I tried with the studio and twincat on the same computer. It ran perfect. i was able to read all values in .NET of an array defined in twincat.
Fig:
success_dotNET.jpg


But I tried to make the communication with twincat and .NET studio on two different systems on LAN, i received error "time out has elapsed"
Fig:
Ads_Error.jpg


What is my mistake??

Help,

Faisal,
OX-Automation Systems
OXAS.org , Pakistan
 
Are you able to program the remote system with TwinCAT using the same computer that you are running your C# application on?


The reason I ask is both systems must be registered in each others AMS router table. If you can get online with TwinCAT, that validates they are registered properly.
 
hey Archie,

Good to see you again man. Well actually i did tried adding the AMS Router info in both the computers which ended up with a dialog box saying "....(bla bla something) access denied..." but however info was added.

Then I went to the PLC Control Software and tried to choose the runtime of my other pc which couldn't initialized.

feel helpless.

-------------------------------
Faisal,
OX-Automation Systems
OXAS.org , Pakistan
 
Its good to see that you are getting a little deeper into the TwinCAT stuff. The best way I find to make sure the router information is in both PC's is to use System Manager. Do a Choose Target->Search->Broadcast Search->Add Route

You will need a login with Administrator priveledges since it writes entries into the registry. Once that is successful, you will see an X in the connected column.

BeckhoffAMSRouter.PNG
 
You know what!! It worked perfectly....... Thanks Archie once again...

However, there are few queries in my mind regarding this method of route making:

- Additional TwinCAT copy installation is also required on the .NET Studio developement PC.

- Would route still be working if TwinCAT uninstalled from the .NET Devel. PC after route addition?

Thanks and respects....
 
addicted said:
- Additional TwinCAT copy installation is also required on the .NET Studio developement PC.

- Would route still be working if TwinCAT uninstalled from the .NET Devel. PC after route addition?
There are about 3 ways to tackle this problem.

1) Install TwinCAT on the PC as a trial version and leave it in config mode. The trial is only for the run time, so as long as it stays in config, it will not expire.

2) Install the ADS commiunication library on the PC and use TcAmsRemoteMgr.exe to set up router. You will have to set it up manually on the PC and then on the PC that is running TwinCAT.

3) Private message me an email address and I will send you a VB subroutine that lets your application silently do the registering on both PC's. It's fairly easy to convert it to C#
 
Also if you only need Twincat ADS/AMS router you can install Twincat CP, this is free of charge... and with him you get ADS router.
You just need to enter in the AMS router all of your AMS addresses of devices(PLC, PCs, CPs etc) and RESTART your computer. After that you can communicate with all ADS(Beckhoff) devices added in the router threw ADS protocol.

This is low cost version where you don't need OPC and you can directly (driver driven) communicate with Bechoff devices.

Note: for Beckhoff OPC you also need to have install Twincat CP because of his routing capabilites.
 
hi dpinezic,

Glad to see your post. Although i am through with the connectivity problem, I would still like to know more abt it....

TwinCAT CP? what is that?
 
It is software for connecting Beckhoff Control Panels threw CP link, you can share screens and control all over your CP link network... and it installs from Twincat installation package, it is step when you are choosing what type of TwinCAT you want to install.

More: http://www.beckhoff.com/english/industrial_pc/cp_link_3.htm

But this software as I sad is Free of charge and for simple applications with for example Advanced HMI as HMI and small Beckhoff PLC like BCxxxx or BXxxx can be connected and automation process visulized.

You dont need OPC, expensive SCADA or Twincat PLC(only on your laptop for programing purposes, and this is also for theme for discuss).
 
Archie,

I have a question for you, because I believe you are the only one who can give me an answer.

I would like to understand the contents of an UDP message received after a broadcast to identify all clients on the requested subnet.

I would like to get the information of the twincat version running and the version number of windows CE. Until now I can't het it out of the message when monitored with wireshark.

Can you help me on this one.

By the way we want to impliment a function in our HMI to visualize the Topology of the Ethercat network in our machine (grading eggs around the world). Do you have an example in c#?

Thanks in advance.

With kind regards.
 
hi dpinezic,
TwinCAT CP? what is that?

I second what dpinezic said. To get TwinCAT CP, install TwinCAT on your C# UI PC, selecting the 1st choice which is "Control Panel" (recall). That is free, with no expiration. It will not install the full development environment (TwinCAT-PLC), just System Manager and a few other utilites. The only drawback is that it will load every time you reboot the PC, which can be bothersome if your office PC, but you need it for the ADS interface.
 

Similar Topics

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...
Replies
16
Views
8,277
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,267
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
19,923
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,785
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,566
Back
Top Bottom