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

Kuka C3Bridge program control not working

#1
Hi,

I also posted in the C3Bridge GitHub repo, but not sure how that is maintained compared to the proprietary version distributed with RoboDK. I am running1.6 (PROPRIETARY)on the Kuka controller.

Basically, I am trying to start the RoboDKsync543 program remotely and remove any need for the teach pendent. I got to the point that I can send aProgramControlRequestto the C3Bridge server, but get an opaqueErrorGeneral联合国specified Error. I tried running the C3Bridge server in debug and verbose mode, but the text logs dont show anything additional. The full response from the server is(18, 5, 10, 5, 0, False).

More details and python code that can be used to repro can be found in this issue:https://github.com/ulsu-tech/c3bridge-server/issues/3. I am using the KRC4 controller if that is relevant.

Thanks!
Rick
#2
Hi Rick,
Just replied to you on GitHub and wrote you an email.
I'll duplicate the response here.
Code:
import struct

name = "/R1/Program/RoboDKsync543"
name_len = len(name)
msg_id = 1026
params = ""
param_len = len(params)
req_len = 9 + name_len * 2 + param_len * 2
msg_type = 10
command_code = 5
interpreter_type = 1
force = False

request = struct.pack(
'!HHBBHH'+str(name_len * 2)+'s'+'H'+str(param_len * 2)+'s' + '?',
msg_id,
req_len,
msg_type,
command_code,
interpreter_type,
name_len,
name.encode('UTF-16'),
param_len,
params.encode('UTF-16'),
force
)

s = request.hex()
print(" ".join(s[i:i+2] for i in range(0, len(s), 2)))
The result:
Code:
04 02 <-- OK: Tag == 1026
00 3b <-- OK: Size == 59 *the header size is right but the message itself is malformed*
0a <-- OK: MessageType == 10 (PROGRAM CONTROL)
05 <-- OK: CommandCode == 5 (Select)
00 01 <-- OK: InterpreterType == 1 (NOT USED HERE)
00 19 <-- OK: Length of Name "/R1/Program/RoboDKsync543" == 25 characters
ff fe <-- ERROR: UTF-16 Byte Order Mark *must not be here*
2f 00 52 00 31 00 2f 00 50 00 72 00 6f 00 67 00 72 00 61 00 6d 00 2f 00 52 00 6f 00 62 00 6f 00 44 00 4b 00 73 00 79 00 6e 00 63 00 35 00 34 00 00 00
<-- ERROR: Name == (UTF-16) "/R1/Program/RoboDKsync54\0" *last symbol trimmed* *must not be null-terminated*
00 <-- ERROR: Length of Parameters == 0 *must be uint16, not uint8*
XX <-- ERROR: Force Select/Run Byte (uint8) is missed
#3
Thanks Dmitry, that makes a lot of sense, appreciate it.




Users browsing this thread:
1 Guest(s)