Beckhoff BX9000 with multiple PCs?

klikopc

Member
Join Date
Jun 2009
Location
Ptuj
Posts
64
Hi

Has anyone tried connecting multiple PCs to a single BX9000 or BC9000/BC9050 via ADS ethernet protocol?

I made two GUI application that use ADS TCP/IP protocol to communicate with a single BX9000 PLC. A single connection works fine, but when connected simultaniously, data starts to be lost.
I know TCP/IP is a one on one system, but I thought the ADS protocol would handle any collisions/errors that would appear.

Any ideas how this can be done?
 
I have a BX9000, but haven't tried this. Can you give more description of your setup? By "ADS" do you mean the drivers for Visual Basic 6 (AdsOcx) or the drivers for .net (VB or C#)?

Does your GUI program make calls for single variable readings or does your PLC code form an array that the GUI reads? If the former, I think you would get the most current reading each time the ADS call is made. However, the readings may not be evenly spaced since the Windows program is non-deterministic.

The latter method is better, since the PLC takes care of sorting readings in an array that are spaced each PLC cycle time. In some cases, you can wait until data capture is done and move the whole array over. If more continuous recording, the PLC array will need to wrap back to index 1, so you need a PLC variable to tell what index it is currently writing to stay synched. You may even need a "ping-pong buffer" so you write to one array while the PC is reading the other array.

My guess is that you are calling for individual readings at a fairly high rate for the little BX9000 processor and with 2 PC's it can't keep up to the requests.
 
Hi RocketTester.

Thanks for the reply. I found a quick fix. I had my Read()/ReadAny() function timeout set to 100ms which is too low. The people at Beckhoff told me that when you have more than one client on a ADS server(in this case the BX), the timeout should be at least 1 second! The updating is slow as hell, but it works.

To answer your questions, I am using TwinCAT.Ads.dll library(2.0) in VB.NET.
I am reading mixed data(mostly INT,BOOL and some STRING types), so I am reading variables with single calls.
You gave me and idea when you said that I should form an array in the PLC code. What if you declared the variables with sequential %MB addresses, and then read them with only one Read() method? Is there a limit to how long the length of bytes in the Read()/ReadAny() method can be? Have you tried this, would it speed up the communication?
 
I use both single variable and array reads, in both VB6 and Vb.net, however that is on CX1000, CX1020, and CX5020 CPU's. I have read data arrays of at least 10,000 elements on CX's. All I have done on the BX9000 is run a "head-less" PLC with no PC interaction.

I won't be back in the office until Oct 29, so can't check exactly how I do the calls. I recall that in Vb.net I found the WriteAny call was simpler than ReadAny in that I didn't have to count bytes. I guess the .net dll determines the variable type from Windows. Indeed, I recall posting example code for the calls here earlier this year, so search my posts.
 

Similar Topics

Hi, What is the trick (if there is one) to accessing a Bx9000 over a VPN? I know there is something finicky with network config when even local...
Replies
6
Views
2,069
Hi all, I have a machine with a Beckhoff BX9000 cpu that looses the source code every few days in the production. The name and the network...
Replies
0
Views
1,636
I am newbie in using the Twincat software. I have tried to connect between Beckhoff BX9000 and Twincat. But I was not successful. In the Twincat...
Replies
3
Views
5,625
Hi I have a Beckhoff BX9000 and want to connect it via SERIAL PORT(COM1) to a TouchPanel(Weintek) that uses Modbus RTU! I downloaded the example...
Replies
2
Views
3,886
Hi! I have a Beckhoff BX9000 controler and would like to make Visualisation in Visual Basic. I have tried the UDP communication and it works, I...
Replies
4
Views
3,993
Back
Top Bottom