for a communication between the Cobot UR5e and a PC, I send a Strink like “PC Cobot Move-to-point-A” to the Cobot
It is Important, to seperat al the Words to work with this input.
so I need to split the string on Cobotside to work with the message.
how can i do it?
or is ther an another opinion to make the communication flexibel:
-Cobot need to communikate with one to three PC´s over Socket-Communication.
-in this moment all components work with static IP´s. A DHCP-Server will install soon, but the IP of the cobot will be static. (so i can find the cobot easily)
-only one Cobot per LAN-System
-It is important, to know witch PC send the measseg to the cobot, so the Cobot can do the work well.
If you are doing this on the script side you could look at using the functions “str_len”, “str_sub” and “str_find”. Using these three functions you can split the string up by looking for specific characters which in this case could be the space between each word. If you are doing this on the Java side or a python daemon, then you can use split function of a String.