The reason is you are sending the string of “move(a)”, this doesn’t automatically equate to “move(“ + a + “)”. The program does not know that you want to concatenate a variable inside that, you will need to tell it this using script functions from UR.
a=10
Msg= str_cat(str_cat(“move(“,a),”)”) #Msg would be “move(10)” now
socket_send_string(Msg) #No quotes, we are sending the value of the variable Msg
Make sense?
Hi,
i want to send the variable value through socket. but i cannot.
For example, a=10
socket_send_string("move(a)")
instead of receiving move(10), i received move(a).
correct me if am wrong.
Note: UR3 e series controller