September-18th-2019, 03:50 PM
Hi there,
the netX fieldbus chip used on netPI RTE 3 monitors a software watchdog that needs to be triggered by Node-RED at least once in a second.
In case the Fieldbus node reports "Device not running" apparently the software watchdog was not triggered in time.
So the question is what else are you running on your netPI RTE 3 either within node-red or any other container that you have maybe deployed.
Please remember Node-RED is javascripting based and a periodically running single threaded application. If you would write a bad code like while(1) as and endless loop the whole node-red runtime would stand still.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
September-19th-2019, 10:56 AM
(This post was last modified: September-19th-2019, 11:25 AM by Armin@netPI.)
Yes this is exactly what I expected.
I can confirm that running Fieldbus Container at the same time as Codesys container on one netPI causes this problem. I have seen this with my device too.
This happens exactly at the time when Codesys is performing its licence checks (this is our assumption) after around 5 minutes of running. During this license check it talks to the GPU of the Raspberry CPU and does a lot of other things. This mechanim seems to have influence on the netX communication over SPI and interrupts it so that the netX watchdog triggers (default 1000msec) and the PROFINET protocol stack stops to work within netX and finally the Node-RED node stops operation. The SPI communication is reestablished by the netX driver but then it is too late.
The only chance you have is to manually increase the watchdog time that is configured by the Fieldbus webConfigurator dialog along in netX. The file responsible for configuring the watchdog time is /usr/lib/node_modules/WebConfigurator/PROFINET_IO/Device/WebContent/Structures/ConfigurationStruct.js. In there you find a string
1e3 = 1 exponent 3 = 1000 -> so 1000msec
Change it to "10e3" and save the file.
After that change you need to go again into the Fieldbus Web configurator and click "save" to overwrite the existing configuration file. Then redeploy the Node-RED flow
Overall we cannot recommend to run Codesys and netX based communication (Fieldbus container) at the same time.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
October-8th-2019, 03:55 PM
Hi There,
I gave you the wrong file. The correct file is /usr/lib/node_modules/WebConfigurator/PROFINET_IO/Device/WebContent/GSDMLManager/GSDMLInterpreter.js.
In this file change n.WdgTime=1e3 to n.WdgTime=10e3
I checked it now with my netPI and now it works more than 10 minutes without stopping. Before it stopped after 20 seconds.
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)