Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

RoboDK Custom Driver


I have coded a custom driver for RoboDK to connect to Arduino. From RoboDK GUI, connection works and I am able to send commands (from buttons & program) without any issue.

Though, when I want to use Python API and call setConnectionParams method, I get the error below.
File "/venv/lib/python3.7/site-packages/robolink/", line 4017, in setConnectionParams
 File "/venv/lib/python3.7/site-packages/robolink/", line 363, in _check_status
   raise Exception('Problems running function')
Exception: Problems running function

Here is the connect function from my custom driver:
   def connect(self, host: str, baudrate: int):
       if not self._connected:
               self._serial = serial.Serial(host, baudrate=baudrate, timeout=0.5)
           except serial.serialutil.SerialException:

       self._connected = self._serial.is_open

       if self._connected:
           self._robodk.update_status(4) # Ready
           self._robodk.update_status(1) # Connection problems

# ----- #

   def print_message(self, message):
       print('SMS:' + message)

   def update_status(self, status):
       if status in ROBOTCOM_STATUS:
           status = ROBOTCOM_STATUS[status]


This seems to happen during setting of params. Thus, I am kinda lost where to start debugging. Any help is much appreciated.
Can you provide some example code where you set the connection parameters?

If you customized your robot driver you may not need any of the parameters required by default (such as the IP, FTP remote path and FTP credentials).
Here is how I set connection parameters:

self.rdk_link.setConnectionParams('/dev/cu.usbmodem14201', 9600, '/', 'anonymous', '')

Inside driver, since this is a serial connection, I use port in RoboDK as baudrate.
Albert, you won't believe how I fixed this issue. I changed name of robot (in RoboDK). Now everything is fine. :)
Seems for some reason RoboDK didn't like the name i gave.
Thank you for letting us know. This is a strange issue though. What name did you change?

Users browsing this thread:
1 Guest(s)