Hello,
I am running two tasks on the IRC5 controller in parallel, with each task connecting to separate programs via TCP/IP sockets. I noticed that if I have one task with a continuous stream of data the socketing is fast, but if I have sockets streaming data in both tasks, the speed goes down considerably.
To test this, I wrote simple scripts in java which connect via a socket,send out a message, and wait for a message back, and then write to a file how long the round-trip connection took. On the RAPID side I have a simple code which creates a socket connection, waits to receive something, and whenever it does, sends out a message. I put the same RAPID script, with different port numbers for the sockets, in my two controller tasks, and ran two separate java processes to connect to these and record how long each communication loop takes. I am running this on my local machine with the simulated controller in RobotStduio.
For running the tasks one at a time, I get an average time of less than 1ms (~0.3ms)
For two completely independent tasks running simultaneously, the delay jumps to 14ms.
Why does this happen? Is there a setting that I can change to prevent this degradation in speed? Thank you for any help!