Closed bigeetea closed 2 years ago
Can you please try decreasing string length from 254 to 128 in all of the .kl files? I assume that might be the problem for controller versions v7.x
Yes - I forked your project and fixed all the build errors for V7.2 i.e. class or variable names longer than 12 chars and strings set to 128. The software is definitely running on the Robot Controller, and the .connect() method appears to work, however other commands (move, curpos, curjpos, etc) don't move the robot and don't return a response.
Can you try this simple command:
print(f"Get gripper state: {robot.get_rdo(7)}")
We can start debugging from there.
same result -- I have attached sample code and stacktrace
No difference if when I use your main branch directly -- sample code --
The only difference I have found between your instructions and my v7.2 controller is: No ability to set port number on Server Tag:
Can you add the following command on line 66 in mappdk_server.kl:
WRITE(resp, CR)
It will output the resp on teach pendant. Let’s see whether we can get the output there.
Where should I see the output? Should it be on the User screen under the sentence "MAPPDK SERVER started" ?? Because I"m not seeing anything on the User screen:
For reference, here is all I changed in my fork to make your project compile and run on V7.2
Whenever you run any command from python, it should be visible after MAPPDK SERVER started.
you said python in your last comment.. I think you meant Karel since we're still talking about mappdk_server.kl .... correct?
I figured out why I didn't see anything on the User screen... we aren't taking the ELSE side of the logic:
cmd is definitely uninitialized
You should put:
WRITE("RESP:", resp, CR)
here:
https://github.com/torayeff/fanucpy/blob/1a2141af4abaceac82b93738e815982b9bda228f/src/fanuc-driver/mappdk_server.kl#L66
Then call Python command such as:
print(f"Get gripper state: {robot.get_rdo(7)}")
Please check if the above works and we can continue debugging from there.
same result .. nothing except "MAPPDK SERVER started" is ever printed .. the reason is because we never run line # 66
the reason is because cmd is uninitialized, so we never go into the ELSE side of that logic.. it always runs line # 62 and # 63
IF UNINIT(cmd) THEN
keep_conn = FALSE
I believe the problem is something inside of mappdk_comm.kl OPEN_COMM method... it has something to do with line # 48
MSG_CONNECT(server_tag, status)
...something isn't happening correctly with that upon startup
I'd be happy to share my screen via zoom and pair debug this issue if you'd like.
I am having a problem running on V7.20-1 Controller. The Robot Controller is not returning a response for methods other than connect().
Take a look at the screen shot and you will see the "curpos" command and empty response:
cmd.encode(): b'curpos\n' resp:
The empty response is what is causing the exception when trying to split(":")
I have tried many things, but nothing seems to get a response.
Any ideas?
FYI - the success line at the top of the screen shot is the call to connect() .. and the Robot2 class is my copy of your class just with some print statements for debugging