Communication Protocol - Can't get digital Inputs


#1

Hi,

I’m building a Golang driver from scratch for DobotM1 following the Communication Protocol. (For Linux purposes)
I already implemented basic features and it works like a charm. (alarms, pose, JOG, IODO etc…)

BUT ! I’m having a hard time reading Digital Input. I tried an implemention of GetIODI which doesn’t work AS IS. The doc says it doesn’t take any params, but then I receive an empty read response.
I blindly tried to send an address param and I made it worked this way (So I guess the documentation is wrong on this point, missing some key informations).

So basically: GetIODI with params [uint8(address), uint8(whatever)] will return [address, level] which is kinda what’s expected.
BUT when I try to send this instruction 4 times (watching 4x DIN) in a loop of 200ms, I’m getting a HUGE lag, passed 15 seconds of loop, I receive an Input lag of about 5 to 10 seconds. I’m using Serial connection.

I guess I’m doing things the wrong way, but I’m blind here since the documentation seems also wrong.

Could you give me the proper way to read the Digital Inputs ? (I guess it will work the same with A/D)

TL;DR

  • I/O Digital Input Documentation Protocol seems Wrong / Incomplete
  • I/O Digital Input reads on 4x DIN with a loop of 200ms get a HUGE latency (5-10 sec) on the input state after 10 sec loop

Thank you.