Can not stream E1 continuous when command stepper motor

Started by Settawat, May 06, 2021, 09:35:32 AM

Previous topic - Next topic

Settawat

I have got this problem when I connect  Kuka compact c4 (client) with Nvidia jetson nano(server) then have stream E1 value in real-time and sent to Nvidia jetson nano for command stepper motor but it can send only 1 value of E1 then it shows "wait for connection" so I have identified this problem by using Kuka compact c4(client) connect with my laptop(server) so try to cut python code so I found the problem is from 1. I have to use the loop function such as for, while 2. I have a use sleep function.
because if I did not use the loop function and sleep function so this program can stream E1 continue. How can I use the loop function and sleep function and get stream E1 Continuous?


note: I have attracted file python (server) and krl (client)

Johannes @ Robots in Architecture

Hello,

Your robot is running a file called sps.sub continuously in the background. You can define your own .sub file with KSS 8.6 (maybe also 8.5) and run it next to it, or put your code directly into the sps.sub file, within the "loop" part. Never put anything that is blocking (e.g. movement) into the sps.sub, though.
Also, in case you are doing that with Ethernet.KRL, set it to "Submit" instead of "Application".

Best,
Johannes

Settawat

Dear Johannes
  Thank you for your reply. I have tried to do it but my problem is not fixed. I require to know what cause problem is will make kuka robot (client) disconnect from nvidia jetson nano (server).
Best regards,
Settawat

Johannes @ Robots in Architecture

Sorry, that is hard to troubleshoot remotely.
Some things I noticed is that you config file has got an SRC extension while it should have XML and that PROTOCOL is written PROTOCAL. That might cause Ethernet.KRL to default to TCP (instead of the UDP you set).
I explained in my previous post how to do it in a loop in the background. You can also split your logic into two XML configs, one for receiving in the background and one for sending in the program. Might make things easier.

Best,
Johannes

Settawat

Dear Johannes
It works when I use when for receiving in the background and one for sending in the program. Thank you for the suggestion.
Best regards,
Settawat

Johannes @ Robots in Architecture