• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simulation of Powerlink Devices
#1
Hello,

for testing, we need a possibility to simulate some devices, especially with Opensafety.
Now we are evaluating some devices. And there are some questions.
- with a device with netx5x chip, can we use the 2 ethernet connectors with different powerlink networks, for gateway like application ?
- can I use two modules on Pi or Arduino?
- if we use a netPi, what delay timing can we expect between the two powerlinks? what will be the CrossLink-time?
- when will be a newer version of the modules of netShield, netHat, ... with netx9x available?
- are there any similar projects in the world known?

Thanks for reply
Stefan
  Reply
#2
My first question is ... you are talking about netX5x based devices. Which one do you have in mind?

I am asking casue you posted this thread under the netPI area ... but I have the impression you want to use more a device like this https://www.netiot.com/interface/nethat/. If this is true I would like to shift this thread to the netHAT area.

The communication between netSHIELD or netHAT modules to the host process goes across an SPI interface. While each of netX5x boards could of course run independently the problem is more on the host processor side and the number of support SPI port along with the necessary chip select signals which are all hard wired on all boards. So this is why you cannot stack the board and hence not use multiple of them in parallel.

You have seen that netX5x based device have 2 ethernet ports. Both ports are bound together when netX5x chip is loaded with POWERLINK device software and establish a hub function you know from standard hub devices maybe. This is why wou cannot drive two POWERLINK networks at a time with them.

Since it is a hub, the delay are just some nano to micro seconds. This is all done in realtime on netX5x device and is not related to the netPI host processor.

I see in the responsible PM's roadmap evaluating first ideas about netHAT 90 this quarter Q3/2020 ... but physical devices I would expect not before Q1/2021.

Similar projects? You mean netX multi-protocol chip projects? Or POWERLINK projects?

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

  Reply
#3
Hello,
thanks for reply.

We are just testing with a netPi. The question is what CrossLink time within Linux is expected?

what possibilities do we have to use two netx5x chips in pi or in nucleo environment?
Is the software (driver) possible to use more than one chips or is it changable?

Are there any other project, which use more than one network, using a special gateway functionality, simulating a network device, ...?

Stefan
  Reply
#4
The communciation interface beetween a netX chip and the Host chip is SPI. Next to the 4 standard SPI signal a 5th signal is needed which is the chip select signal.

For example with netHAT module the pin 24 is used and hardwired to operate as chip select. If you now would operate two netHATs the same both modules would use pin 24 as chip select and hence both modules would get addressed by the Raspberry Pi CPU the same time which causes a conflict. What you would need are multiple netHAT modules that differ in the pinout and would user other free pins for the chip select. So there is no possibility since such modules no not exist. Or you build your own modules ...

The driver indeed has a parameter which SPI interface to use. You specify the Linux "/dev/spidevx.x." in a configuration file like "/dev/spidev0.1" or "/dev/spidev0.2" or "/dev/spidev0.3" etc. Today the driver just looks a single time to the single configuration file. There is no feature to get multiple driver instances running.

What exactly do you mean with CrossLink time? Do you mean the time to exchange POWERLINK data located the netX buffers with an application running on Linux? A customer measures the SPI overall performance and came to the result that it costs you 300us to 1.5ms until you have exchange the IO buffers from netX with a Linux application.

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

  Reply
#5
(September-8th-2020, 03:14 PM)Armin@netPI Wrote: The communciation interface beetween a netX chip and the Host chip is SPI. Next to the 4 standard SPI signal a 5th signal is needed which is the chip select signal.

For example with netHAT module the pin 24 is used and hardwired to operate as chip select. If you now would operate two netHATs the same both modules would use pin 24 as chip select and hence both modules would get addressed by the Raspberry Pi CPU the same time which causes a conflict. What you would need are multiple netHAT modules that differ in the pinout and would user other free pins for the chip select. So there is no possibility since such modules no not exist. Or you build your own modules ...

The driver indeed has a parameter which SPI interface to use. You specify the Linux "/dev/spidevx.x." in a configuration file like  "/dev/spidev0.1" or "/dev/spidev0.2" or "/dev/spidev0.3" etc. Today the driver just looks a single time to the single configuration file. There is no feature to get multiple driver instances running.
On a basic understanding, we can conect more than one spi device to raspberry pi: Raspberry pi 4 with more spi devices
but the driver cannot handle more than one devices?
With a Nucleo Board and a netShield, it is better possible to use more than one device?
Or could the driver be changed to support more than one device?

(September-8th-2020, 03:14 PM)Armin@netPI Wrote: What exactly do you mean with CrossLink time? Do you mean the time to exchange POWERLINK data located the netX buffers with an application running on Linux? A customer measures the SPI overall performance and came to the result that it costs you 300us to 1.5ms until you have exchange the IO buffers from netX with a Linux application.

Yes, thats the right interpretation. I understand, in worst case, the exchange time could be about 1.5ms or perhaps more? And I think: if the application is a little bit more complex, about copying more data, it could be longer?
There is no garantied maximum (small) time, because the basic linux is not realtime?
With a Nucleo Board and a netShield, it is better possible to realize a fast "gateway" ?

Stefan
  Reply
#6
Correct ... you can connect more than 1 device to SPI on a Raspberry Pi 2,3 or 4. But the existing netHAT/SHIELD has no support for multiple SPI signals. So you need a new hardware.

I don't think you get a faster update time with a Nucleo board and netSHIELD. The bottleneck is SPI and the limited data throughput.

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

  Reply
#7
Thanks Armin,

not all questions are answered.

Status:

netPi with Linux is not fast enough and has no garantied CrossLink time less 1ms.

The Hardware netShield or netHAT had to be manipulated to support more than 1 modules. I think it should be possible with a small wiring?

I think with a nucleo board, we can be fast as a Raspberry Pi, about 300us?

How many data will be transfered over SPI within one communication cycle?
I think SPI can communicate with 10Mbps, isn't it?

Stefan
  Reply
#8
Question 1:
"netPI is not fast enough ... ": this is not a root cause of netPI ... it is a root cause of Linux and the included Linux SPI driver (not coming from Hilscher) which is "slow" and has a jitter.
Question 2:
"Hardware modifications ..." not possible, since on netSHIELD the signal line going to pin 24 is hardware in the schematics of the PCBA.
Question 3:
"Faster with nucleo ..." I don't know nucleo baord ... still the communication goes across SPI and this is the limiting factor.
Question 4:
"Cycles ..." ... the memory of netX is read/written in a request/response manner. So application wants to read input puffer and sends request. Then the driver get in indication that the request has been accepted. Then the netX aquires the data and give response. Then the application gets an indication that data is available and request for the data. So overall at least 4 cycles until the input puffer data is in the application. The same number is needed when data is written to netX buffer. So overall at least 8 cycles.
Question 5:
"Frequency ..." the used frequency on netPI/netHAT is 25Mhz today.

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

  Reply
#9
Thanks Armin,

the used frequency on netPI/netHAT is 25Mhz today:
- I read the max SPI frequency is 10MHz. What is 25MHz?

where is the forum for netShield? I cannot find them?

Stefan
  Reply
#10
Well I just can give you the information for Raspberry Pi host system and here the SPI frequeency can go up to 125Mhz like it is described here https://www.raspberrypi.org/documentatio.../README.md

But I can tell you that physical measurements with Raspberry CPU and netX SPI result in maximaum frequency of 25Mhz. So the netX driver configures the SPI frequency to 25Mhz.

There is no forum for netSHIELD established. The support center decided to establish just a knowledge database on https://kb.hilscher.com/pages/viewpage.a...d=71369521. The support goes accross the www.hilscher.com web site in the support section and email exchange.

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

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  netPI as simulator for PROFINET "shared devices" reiboh 1 349 January-15th-2018, 05:29 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)