ImtsSrl / KUKAVARPROXY

Robot KUKA variables TCP server
111 stars 44 forks source link

read/write Array message format? #13

Closed lin-ycv closed 3 years ago

lin-ycv commented 3 years ago

Hi,

I'm wonder how to format the message I'm sending to do read/write Array?

I did a simple test asking for the date and axis values by sending the following bytes: [41,40,0,19,2,0,5,36,68,65,84,69,0,9,36,65,88,73,83,95,65,67,84] ID: 4140 Total Length: 19 Mode: ReadArray Variable Length: 5 Variable: $DATE Variable Length: 9 Variable: $AXIS_ACT

On the controller's KVP 9.0.0, the Log says: Error in Read MsgID 10536 Msg Len 19 Buffer Len 12 (empty line)

lin-ycv commented 3 years ago

@dddomodossola @lionpeloux @nowire I'm under the assumption that I can do array read/write because in the README it says

Answer Message Format .... 1 byte for read/write mode (0=Read, 1=Write, 2=ReadArray, 3=WriteArray) ....

Or am I understanding it incorrectly?

dddomodossola commented 3 years ago

@v-xup6 I should have a python algorithm of this. I will send it to you tomorrow. On which project are you working?

lin-ycv commented 3 years ago

Thanks, my email is victorlin@gapps.ntust.edu.tw, or a direct link is also good. I'm working on a KVP client that'll hook into Robots

filipposanfilippo commented 3 years ago

For read and write formatting, please refer to this:

Filippo Sanfilippo, Lars Ivar Hatledal, Houxiang Zhang, Massimiliano Fago and Kristin Ytterstad Pettersen. Controlling Kuka Industrial Robots: Flexible Communication Interface JOpenShowVar. IEEE Robotics & Automation Magazine22(4):96-109, December 2015.

http://filipposanfilippo.inspitivity.com/publications/controlling-kuka-industrial-robots-flexible-communication-interface-jopenshowvar.pdf

Best regards,

Filippo Sanfilippo, IEEE Senior Member

Associate Professor University of Agder (UiA) Faculty of Engineering and Science Department of Engineering Sciences Address: University of Agder (UiA), Jon Lilletuns vei 9, NO-4879, Grimstad, NORWAY E-mail: @.***

Professor II Oslo Metropolitan University (OsloMet) Faculty of Technology, Art and Design Department of Mechanical, Electronic and Chemical Engineering Address: Oslo Metropolitan University (OsloMet), PO box 4 St. Olavs plass, NO-0130 Oslo, NORWAY E-mail: @.***

Mobile: +47 942 58 929 Website: filipposanfilippo.inspitivity.com

On 14 Mar 2021, at 15:54, Victor Lin @.***> wrote:

 Thanks, my email is @.***, or a direct link is also good. I'm working on a KVP client that'll hook into Robots

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

lin-ycv commented 3 years ago

@filipposanfilippo thanks for the info, I've read thru it, but have not found the specific information I need. In the paper, it say:

the new method writeVariable cannot handle arrays; this can only be done by using the old sendRequest method

so sendRequest is what I'm interested in, is there any info like Table II and II that's in the paper, but for sendRequest when sending a request to read/write an array of variables?

I'm looking at the source code for JOpenShowVar but I'm not well versed in Java and bitwise operators, so I'm not really understanding how it deals with array read/writes.

dddomodossola commented 3 years ago

Hello @v-xup6 ,

I looked at my simple python client kukaClient.py.txt and I found that the array read/write messages are not implemented. To understand the array read/write message protocol you should study openshowvar. I would like to help you in this, but I have various projects I'm working on for customers that sponsor me on github. I must guarantee priority to sponsoring companies.

Kind Regards

lin-ycv commented 3 years ago

Ok, thanks you for the support so far. If anyone one else have any input I'll gladly take them. In the meantime I'll study OpenShowVar

lionpeloux commented 3 years ago

Hi there,

I'm no longer active on this topic, but I remember that array read/write is in fact not implemented : not at the kukavarproy level, but also firstly not at the KSS level in the "cross" interface (up to KSS 5 at least / maybe achieved in KSS 8+)

lionpeloux commented 3 years ago

For a detailed explanation of the message format, I did wrote the readme of this repo a year and a half ago, and I think all you need about this topic is there.

When you dig into the kuka cross interface, you can see that there is a signature for an array read/write method. Unfortunatly this method was not implemented until KSS8+. So my thinking is when KukavarProxy was written, they planned this fonctionality but could not implement it as the KukaCross interface did not implemented it itself.

Does it make sens to you ?

lionpeloux commented 3 years ago

I've just released a sample KukavarClient : https://github.com/OpenKuka/KukavarClient You can digg into the source code. There are 2 projects :

lin-ycv commented 3 years ago

OK thanks for the clarification, that answers my question. Also thanks for sharing the client, much appreciated.