I am using a RevPi Core S and the Profinet IRT gateway. In order to examine latency issues which I am facing, I did the following:
In the RevPi, the revpimodio2 cycleloop() is running with a cycletime of 5 ms. As soon as Input__5 is set to 5, I am sending a ping from the RevPi to my PC:
Code: Select all
self.rpi.cycleloop(self.cycleprogram, cycletime = 5, blocking = False)
def cycleprogram(self, cycletools):
if(cycletools.io.Input__5.value == 5):
os.system("ping -c 1 " + "192.168.1.1")
In order to trigger this ping, I am sending a Profinet message to the RevPi to set Input__5 = 5.
In Wireshark, I am comparing the first time at which the Profinet message with Input__5 = 5 is sent to the Gateway with the first time that the ping is sent from the RevPi to my PC. This takes almost 40 ms which appears to be a lot for reacting to the Profinet message! Similar latencies apply when using mainloop() and register the ping callback to Input__5 instead of using cycleloop().
Are these 40 ms usual or what am I doing wrong?
Thank you very much for any help
Florian