DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
matthewd92

Another option is to use socket communications, socket servers are pretty easy to create in most languages, you could even use SocketTest as a simple server to test with.  You can find a download of that program here

To make this work you could do something like concat the variable name with the value in that variable and then send through the socket to the server where it would know how to decompile the value received into the name and value

def sendVariableToSocket(name, value):
  local valueToSend = str_cat(str_cat(name,":"), value)
  socket_open("xxx.xxx.xxx.xxx", portNumber, "temporary")
  socket_send_string(valueToSend, "temporary")
  socket_send_byte(10, "temporary")
  socket_close("temporary")
end

To use the function do something like
local myVariable=3
sendVariableToSocket("myVariable", myVariable)
This would send a string to the socket server something like "myVariable:3" at which point you could split the string into the value and the name by splitting on the ":" delimiter.