• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Monitoring as EtherCAT Slave
#1
Hi, for a research project I would love to find a way of running an EtherCAT Slave where the Cifx0 Interface is detected (like in the Ethernet-Lan package). With an detected interface, it's possible to capture the communication of a running PLC. The goal is to analyse the traffic and provide it to an OPC server, for IoT applications.

I have already tried to combine the Programming-examples packgage with the Ethernet-Lan package, because the first one provides me an EtherCAT slave, and the second one creates the cifx0 interface with its cifx0deamon skript. The problem that occured was that the cifx0deamon skript did not work with the EtherCAT firmware package installed.
A different approach was combining the Codesys package with the Ethernet-Lan package, with the result of having a capturable interface, but CODESYS does not support creating a EtherCAT slave. I was able to capture the PLC communication with that setup, using wireshark.

Do you think, there is a possible way to create an EtherCAT slave that can capture the network traffic of the cifx0 interface in this way?

Thank you an best regards
Philipp
  Reply
#2
Hello Philipp,

indeed you have detected yourself that combining EtherCAT slave and the LAN Ethernet network will not work. I can confirm that. It is because each of the packages loads a different firmware into the netX network controller chip. The one that is started the latest will "win the race".

But to be honest I have not understood your overall inquiry. So let me repeat what I have understood:

You need EtherCAT slave functionality, right? In accordance to official EtherCAT standard? So in the first instance this part of the firmware shall communicate to a Beckhoff EtherCAT Master for example? Is my understanding correct? In this standard mode it will exchange input and output data with the application running on the netPI, right?
Now in this operation mode you want to capture all the ethernet frames (EtherCAT frames) coming and going through the netX chip with an extra "channel" that is operating as a kind of listener giving you all the frames as standard LAN interface like cifx0 is working? Is my understanding correct?

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
Hello Armin,

your understanding is perfectly correct. The netpPI should be recognised as a EtherCAT Slave (by the Master), and get the exchanged Ethernet(EtherCAT) frames within the machine. Having Slave IOs on the NetPI is non of importance for my project , but it should be able to be listening to the EtherCAT traffic.

It would be nice if there was a way to get the cifx0 interface working in this use case as if it was a "normal" LAN interface, like in the Ethernet-Lan examples in docker hub. This gets enabled by the "cifx0deamon.c" script in the Ethernet-Lan example and gives the opportunity for me to sniff the EtherCAT traffic with standard network tools (like wireshark).

Do you know if there is a way to achieve this kind of functionality?

Thx

Philipp
  Reply
#4
Well Philipp,

we have netX Network-Contoller (netX100) chips that are able to represent a Real-Time Ethernet Slave and can be a "sniffer" at the same time. But the used netX Controller in netPI is not able to provide such functionality. Even more the real bottle neck between used netX51 on netPI and raspberry CPU is the SPI interface in between. This is good to exachange a certain amount of inputs and outputs (I know you don't care) with the Raspberry CPU, but it would never be good to record and transport all the traffic coming from EtherCAT to the Raspberry CPU.

I am sorry that I have no better answer for you.

Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#5
Hello Armin,

thank you very much for your quick reply. So you think there is not even the chance to sniff on every 10th or 100th cicle ? My application does not require RT performance, so this would be a solution I can use.

Right now I am already able to sniff on an EtherCAT Master using CODESYS and tshark on a NetPI. Is this is possible because it's happening within the CPU (or SOC) and doesn't need to pass the SPI ?

Thx

Philipp
  Reply
#6
Hello Philip,

the netX firmware used on netPI is not a special one.

Normally customer use netX51 chip in their embedded systems to enable PROFINET,EtherCAT, EtherNet/IP slave communications with their motherboards. Others want to use netX as standard ethernet port. This is another firmware.

So for your case this would mean to write a special firmware that does both in combination ... and this firmware does not exists and will not be written since there is no return of invest for Hilscher as you can imagine.

Hence netPI and especially netX will not be working as a sniffer as you requested.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#7
I like to add to this discussion as I have similar need. My question is can i use 2 industrial port as network capture port which will not do anything but just monitor port? and use standard Ethernet port for my normal TCP/IP traffic?
  Reply
#8
Hello,

netPI includes a netX51 industrial network controller chip handling the two industrial ethernet ports. It does not include a netX100 chip that is capable of monitoring ethernet traffic. A netX51 isn't. So back to your question I just can repeat my previous statement that traffic monitoring with netPI is not possible.

But I like the idea ... and Hilscher likes the idea and this is why our "big" Edge Gateway https://www.hilscher.com/products/produc...-gb-repns/? supports Ethernet traffic recording as you describe it. This unit includes a netX100 chip. But the small netPI doesn't.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#9
Well it is me again.

The units NIOT-E-TIB100-GB-RE and NIOT-E-TIJCX-GB-RE are sold via Hilscher's official sales channel like we sold all our other products since years, until we came out with netPI which is distributed through Amazon. So all the other products I am speaking about are not supported through this "netPI forum" but through hilscher hotline service instead once a unit was bought.

But anyway some words about these two units. Both indeed include a netX100 chip, which is like netX51 in netPI in 99% of all cases used in Industrial Ethernet Slave mode for PROFINET and EtherNet/IP communications to masters. This mode we call active mode, since netX100 is actively participating the network.

But there is also a function implemented which we call passive mode or listening mode. In this mode the gateways work different and are not actively participating the network and just listening to all the ethernet telegrams on one port and feed them through untouched to the second. I would say that we basically have included a subset of functions of our netANALYZER product: https://www.hilscher.com/products/produc...g-re/?cats=

With both gateways - once licensed - you are able to use them as analyzer while configuring them with filters for all Ethernet frames of interest. The gateways put those data to an internal OPC UA server from where you can read them with any clients from remote through two extra, non Industrial Ethernet ports.

But for these two "normal" hilscher product you get information and support from your local representative. They will give you information about them including pricing.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Configuring EtherCAT communication Hoeber 1 2,098 September-22nd-2021, 01:29 PM
Last Post: Armin@netPI
  running ethercat slave MGharat 6 5,570 December-10th-2019, 10:06 AM
Last Post: MGharat
  [SOLVED] EtherCAT Slave snortman 5 5,742 February-7th-2019, 07:36 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)