• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Profinet Startup Time
#1
I use a netPI RTE 3 as profinet client. Up to now I did use one container running NodeRed for communication and calculation. With this setup the netPI profinet client was available below 50 seconds after power on.
Now I use two containers one with NodeRed doing the communication and one with Python doing the math. With this setup it takes 210 seconds until the the profinet client is available after power on.

Could I start the container with NodeRed doing the communication first?
Is there a way to have the profinet client ready with defaults independently of running containers?
Other ideas?

Any help is appreciated



Code:
Hilscher NIOT-E-NPI3-51-EN-RE
Firmware version V1.1.6.0
  Reply
#2
Hi there,

Node-RED (or the netX programming examples) do "RAM based" configuration of the netX network controller and not "FLASH based". This means whenever there is a power-loss of the system the configuration previously stored in RAM is gone and netX needs a new configuration stored in RAM. Starting Linux and starting Docker needs time indeed. There is no real prediction possible on how long the Docker starting time of  the containers is.

1. What I want to tell you is that the very latest version of netPI's use a new type of SD memory card from company SANDISK. This SD card is 3 times faster than the old SD card models in use. This has a positive effect on the startup time. Of course the startup time will not be 3 times faster overall, but you should see a significant improvement. So my first recommendation is to order a new netPI.

2. Another method is to switch to "FLASH based" configuration. This needs a Windows tool from Hilscher https://kb.hilscher.com/download/attachm...exe?api=v2 and cannot be used in conjunction with Node-RED. With this tool you can make an "offline" configuration of the PROFINET IO setup of any Hilscher device.

On netPI the exact device in use is named "NRP51-RE-IO" providing netX controller support. This is why you have to drag&drag this device from the right device tree list to the configuration window as shown in this screen shot and configure it:

   

Of course SYCON.net configuration cannot be explained here in all details. There is a lot of documentation around SYCON.net available. But after you configured everything fine you make an export of the database files finally like this:

   

If SYCON.net asks you for a file name enter "config". It will then create two files: "config.nxd" and "config_nwid.nxd". Rename the "config_nwid.nxd" to "nwid.nxd".

These two files you need to copy to the folder /opt/cifx/deviceconfig/FW/channel0/ (where the *.nxf firmware is already located) in your container and the Linux netX driver will load them automatically when your user (netX-programming example) programm calls "xDriverOpen(&hDriver)" into the netX FLASH memory non-volatile. From this time on netX and PROFINET will be ready after 1 second when you power your netPI. The best thing about FLASH based configuration is that configuration within the netX programming example is much easier. just call xDriverOpen() and then immediatly xChannelIOWrite() and xChannelIORead(). A configuration is not needed any more.

Thx

p.s.: I will shift this thread to the "software" folder.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
Thank you for your quick reply. For your two points:

1) Could you provide the exact type of the SD memory card from company SANDISK. I would like to test it with a NIOT-E-TNPIR3EVA (netPI without SD card).

2) Do I understand correctly, that with the FLASH based approach, Node-RED could not be used at all and the solution would have to be based on the netX-programming example? Also, do I understand correctly, that netX and PROFINET will be ready after 1 second independent of starting up a container (except for the very first time where the config will be written to the netX FLASH memory)?

Would you know wether I could control the startup order of the container (maybe stack, ...)? This way I could have the container with Node-RED started first?
  Reply
#4
1.) Here is the link where we statee which SANDISK card is used today: https://forum.hilscher.com/Thread-SD-card-duration

2.) Once the device has a FLASH configuration active and then an application like Node-RED now tries to "re-"configure the netX in RAM mode (cause it does not know about the FLASH configuration is active) this will fail for sure. And yes netX contains an ARM CPU ... and once the firmware is started and a FLASH configuration is found active then netX will be immediately starting PROFINET communication, independent of the Raspberry Pi host CPU has been started or respectively the container has been started. As long as no user application is runnin, netX will exhange the data in internal buffers.

3.) No Docker in no way can be configured to start containers in any order. This function does not exists. The only thing you know is for sure that they will be started.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] Starting services/commands/scripts at startup of a container Jonas.Sellmann@outlook.de 9 8,245 March-9th-2021, 08:47 AM
Last Post: WalterSchaefer
  Profinet to Siemens PLC j.langlois 4 4,991 January-26th-2021, 06:11 PM
Last Post: j.langlois
  Profinet name lost after reboot Dipro 7 6,491 November-16th-2020, 01:07 PM
Last Post: Armin@netPI
  Profinet stopped working (spidev spi0.0: SPI transfer timed out) Schranz 7 6,793 November-2nd-2020, 04:20 PM
Last Post: Armin@netPI
  netPI profinet device name WalterSchaefer 2 3,277 October-7th-2020, 11:10 AM
Last Post: WalterSchaefer
  Receive at startup additional data through the Fieldbus Port Schranz 1 3,414 September-10th-2020, 10:55 AM
Last Post: Armin@netPI
  how to pick up PROFINET data and store them to OPC UA server on Node-RED/netPI. tad 7 7,315 March-16th-2020, 10:21 AM
Last Post: Armin@netPI
  PROFINET IO startup compilation arpan.patel@slscorp.com 3 3,724 February-24th-2020, 12:47 PM
Last Post: Armin@netPI
  Web browser reports "insecure connection" when accessing netPI for the first time Armin@netPI 2 3,438 January-31st-2020, 07:07 AM
Last Post: Armin@netPI
  Codesys RTE profinet echteler 2 4,118 September-25th-2019, 09:56 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)