Hilscher Community Forum
Profinet Startup Time - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: Profinet Startup Time (/thread-519.html)



Profinet Startup Time - Schranz - November-18th-2019

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



RE: Profinet Startup Time - Armin@netPI - November-18th-2019

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/attachments/113836041/SYCON.net%20V1.0500.191115.29917%20Setup.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.


RE: Profinet Startup Time - Schranz - November-18th-2019

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?


RE: Profinet Startup Time - Armin@netPI - November-18th-2019

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.