Could not understand after loading program using dashboard

Hello, I am trying to control URsim via tcp/ip. I have got a Socket to DashBoard server and want to load a urp on UR then play it. When I send “load .urp”, DashBoard gives me the right answer. But the “play” message after that gets a “could not understand” answer. And every message becomes “could not understand” after I send the “load .urp” message. I have tried to change the order of messages, if I send messages before “load .urp”, they all work well.

Are you literally sending “load .urp”? The command is load <PROGRAM_NAME>.urp, being <PROGRAM_NAME> whatever program name you wanna load, such as “load program1.urp”, “load example_program.urp”, and so on.

I have sent the right program name “load test.urp”, and the answer from dashboard server was correct.

Hi @hxy19860611

i remember that i always got taht answer “could not understand…”, when i have send the same command twice in a row.
And i think i got that answer when i have send a new command, while the UR was still working/ responding on the previous command.

How long do you wait between commands? Some programs can be very long and after sending a load you need to wait for the program to be fully load, otherwise it will have an error.
Some programs might seem short, but if they have an URCap, the .script file underneath might be long. I got once a program with URCaps that generated threads on the program and had to wait like 2 seconds before sending the play.

I guess it would b best to do it like this:

→ Load Program —> Delay of 2 s → Get Loaded Program → Check if loaded program = the program that u wanted to load → Command Play

(That´s how i do it with my PLC ↔ UR signal exchange)

@hxy19860611
Did you include a new line character between the original load command and the new command you sent?
For example if I’m writing a program in Python to connect to the robot to Dashboard server I would establish the connection and then send the command with a newline attached to it:

self.sock.sendall((command + '\n').encode())

Where “command” would be the text command I want to send to the robot.