Beckhoff Twincat communications

Hello

I have a piece of second hand stage equipment that I would like to see if I can get working (it was being thrown out - so I grabbed it).

It is a very large LED lighting bar that appears to use the BeckHoff Twincat PLC system for communication.

The controller is a huge, clunky, and broken piece of equipment, but it does still partially work.
It runs on an old Windows XP laptop, connected to a Beckhoff PLC controller.

I know nothing about PLC's apart from the basics.

So, my question is... would it be possible to take an Arduino Ethercat shield and read the data on the cat5e cable that connects the controller to the lighting head?

I was thinking of basically reading the data using a serial screen and then noting the serial commands as I operate the controller. I know that is a simplistic view, but is the idea even feasible?

Am I getting this totally wrong?

The lighting bar is in good condition, so my aim would be to make some kind of Arduino based simple controller (on, off, dim etc).

I have been Googling the Twincat system, and apart from this version being obsolete, it's madly complicated.

I should add that I have found a couple of Ethercat shields online that I may be able to utilise if the idea is possible.
Just want some views. Thank you

If You have time and patience, take on the work investigating Your find. If You have money, buy the stuff You need.

Well part of the trouble is I have zero information on the lightbar itself. I have a feeling it was custom made.
The Ethercat shield is pretty damn expensive at around $60-$99 (Expensive for an unemployed guy anyway).
Especially with the high chance of me zapping it while I experiment.
My only other option is to strip the guts out of the lighting bar, and rewire it.
That seems a shame (it's very nicely done), and also costs me pennies.

What is an Arduino Ethercat shield? Do you mean Ethernet shield?

If the communication between PC and PLC is ethernet, you can install WireShark on the PC and sniff all the data.

It's Ethercat. I have Ethernet shields, but I am assuming (someone let me know if I am wrong), that there is a difference.

This is the shield I found:

https://www.bausano.net/en/hardware/ethercat-e-arduino/easycat.html

I need to research the difference between the two boards then (if there is one).
I am guess at the price, it is bespoke (or it's aimed at mugs like me)

After extensive reading.... I think you can use an Ethernet shield to read Ethercat communications.

I found these snippets...

Difference between Ethernet and EtherCAT
This node-specific routing requires massive bandwidth as the data packets are only moved when the Master or Client requests the data. EtherCAT, in contrast, uses the same physical and data link layers as Ethernet but the protocols deviate from there.

also...

Monitoring. Since EtherCAT uses standard Ethernet frames according to IEEE 802.3, any standard Ethernet tool can be used to monitor the EtherCAT communication.

If you get a dumb unmanaged network switch and connect that in-between the old controller and the lightbar and then to your laptop (no other connections), you apparently can then use WireShark to lift the data.

Hmmm

Can You keep the exterior and identify things in the interior? If You throw out the receiver and power the lighting stuff using Your own seleted hardware and communication devices… Is that thinkable?

Binning the entire electronics would be my preferred avenue. Its pretty complicated inside the light bar.
This thing is nearly 4 metres long, with 30 LED par spotlights on it (who throws out stuff like that!)

But, it's very well made. Weld aluminium with integral D rails with all the Twincat data receivers wired along them.
It also has a couple of input logic blocks that don't appear to be used and a pump for some bizarre reason.

Most of these Twincat system parts do appear to be obsolete (but still available at huge cost).

If I had a goddam job, then this lot would be going out the door and getting replaced.

But, that is an expensive project.

From what I understand, there used to be multiples of this lightbar. No idea where the rest are now.
They daisychained with Cat5e cable. This one has a hex address written on it.

When you plug it into the touchscreen controller, it picks up that address. It looks like you can have 12 of these modules.
The touchscreen is smashed and not working, but I opened the control box up and managed to get a mouse+keyboard onto the embedded Windows controller.

I was hoping to make some kind of manual controller and donate it to the local kids theatre.
When I can get out, I might grab some photos.

I have found a document on reading Twincat data streams using an unmanaged switch and a laptop with WireShark on it. No harm in having a go.

Well.... that was interesting...

I hooked it all up through a network switch and then proceeded to watch a bafflingly huge amount of data stream all over the front of Wireshark.

I sat for a few hours, with the Wireshark help pages open on another PC, and got nowhere.
It's obviously far outside my realms of understanding.

Apparently there were 12 of these lighting bars at one point. Each one addressed 2000-2011 (no idea why those addresses).
This bar is address 2008 (it came up on the controller screen).

My question to the knowledgable is why did they use a Beckhoff PLC system? It seems very overpowered for the use it has.
Is the EtherCat system good for long cat5e/cat6e cable runs or something?

Each bar appears to have the facilities to switch 40 items on and off. That is it, no levels or feedback.

Maybe I therefore should strip out the guts and replaced it all with an Arduino/Teensy, maybe switching SSR's or something.

Would I get decent comms between two Arduinos+network shields over a cat6e cable of say 50 feet?

I can't find my original post? Search didin't throw it up?

Anyway, still tinkering with this PLC controlled lighting bar.

It has a Beckhoff EK1101 module receiving the data over 100Base-TX at 100 Mbaud.

Am I correct in thinking I cannot get an Arduino to talk to it using a standard Ethernet shield?
They make a (VERY expensive) Ethercat shield (Ethercat - not Ethernet), but I cannot afford it.

What speed is 100 Mbaud? I 'think' it's 104857600 Bps, which probably means I am out of luck.

Was hoping to read the serial data. I tried WireShark and it's quite frankly... a baffling amount of data

OK further Googling shows that a W5100 Ethernet shield should support 100Base-TX.

Just need to work out how to read data going to this:

phoneystark2020:
I can't find my original post?

Is this the one?:
https://forum.arduino.cc/index.php?topic=682440


Here are instructions for how you can find your posts:
https://forum.arduino.cc/index.php?topic=685201.0

Thanks pert. Can we move this over then?

Hopefully mods will delete my other post in networking... I could not find this one (I knew there was a way to search for your posts... I just could not find it).

Still playing around with this lightbar in my spare time.

Getting old sucks. I try and try to get my head around this stuff and it seems to go in through my eyes and fall out my ears while I am asleep.

The lightbar has this Beckhoff EK1101 Ethernet module inside.

Runs on 100base-TX.

Trying to assertain whether I can use this W5100 ethernet shield I have here to read the data being sent to the lightbar from the broken controller.
This is out of my league, but I hate being defeated and you don't learn anything by giving up.

I tried Wireshark, but the amount of data firing through that was baffling.

My questions are really...

Is it even possible to read the data using the W5100 Ethernet shield.
If it is, where can I find a base piece of code that I can start with to try and understand all this.

I have been reading up on Modbus (relevant?) and how these Ethercat systems work and my mind is bleeding.

Oh, and my wife just told me that's it.. life sucks

phoneystark2020:
Thanks pert. Can we move this over then?

You're welcome. I have now merged the two threads as requested.

phoneystark2020:
I tried Wireshark, but the amount of data firing through that was baffling.

You can set up filters in Wireshark so that you only see the relevant data. Unfortunately, I find the filter system to be very unintuitive and poorly documented. I use Wireshark so infrequently that I have to figure out how to set up filters from scratch every time.

Thank you Pert.

Yes, I fired up Wireshark and watched this baffling large amount of data pile all over the screen.

Several hours of Googling and Youtube did not assist me in any way trying to filter that into something I could understand

Hello,
Being a Beckhoff programmer, there is alot to cover but hopefully I can help you out. The EK1101 Bus coupler can work as long as you have a n ethercat master to control it. You are able to set up any Windows based computer to be an ethercat master. Luckily Beckhoff lets you download their TC3 Engineering software for free and once it is set up will run free 7 day test licenses to test things out. Now that doesn't help you with being able to control it with Arduino. Do you still have the main Processor? FYI the touchscreen may also be the processor. If so post what it is. You might be able to suck the code out of it. Terms you may want to search for "Arduino EtherCAT master",

Now there should be some additional cards or slices attached to the side of the 1101, are you able to send some pictures of your setup?