Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Code 19 when using TGPIO #84

Open
joshuafishman opened this issue Jun 12, 2023 · 8 comments
Open

Error Code 19 when using TGPIO #84

joshuafishman opened this issue Jun 12, 2023 · 8 comments

Comments

@joshuafishman
Copy link

Hello,

We're using TGPIO to control a custom end effector. Occasionally, reading from the TGPIO (with get_tgpio_analog) returns code 1 and the control box shows Error Code 19. Can TGPIO with a custom end effector cause Code 19, and if so how?

Logs are here:
XI130308B22L25_2023-06-12_11-06-20.tar.gz

I don't see the Code 19's in there for some reason, but there is this line:

[173141]   304h26m38s:338ms:362us:326ns  [src/motor/tgpio_fun.cc 108 get_servo_16b] tpgio-> !get 16b data error! ret:3 id:9 addr:2582

Thanks for your help!

@penglongxiang
Copy link

penglongxiang commented Jun 13, 2023

Hi @joshuafishman, is there a background thread in your application that is constantly acquiring status like robot state, error code, TCP pose in a high frequency (up to 200Hz)? Maybe the occasional C19 error has something to do with this. I guess when the controller was busy handling the high frequency communication, the IO with tool module was affected and had a higher chance of timeout.

If that is the case , please try reducing the status acquiring frequency if possible, or use the port 30003 automatic status report instead, refer to Developer manual chapter 2.1.6 Automatic Reporting Format.

@joshuafishman
Copy link
Author

Hi @penglongxiang, that's very interesting. Is the Automatic Status Report exposed through the SDK, or should we read from the port and parse the stream directly ourselves?

@vk-chen
Copy link

vk-chen commented Jun 13, 2023

Hi @penglongxiang, thanks for the response--I wasn't able to replicate Error Code 19 with the script below that constantly reads robot state and TGPIO:

from xarm import XArmAPI
import time


xarm = XArmAPI("192.168.250.232")
duration = 1/200


while True:
    start_time = time.time()
    state = xarm.get_state()
    code, v = xarm.get_tgpio_analog(0)
    print(f"{state =}, {code =}, {v =}")
    elapsed = time.time() - start_time
    sleep_time = duration - elapsed
    if sleep_time > 0:
        time.sleep(sleep_time)
    else:
        print("TOOK TOO LONG")

Would you have other thoughts on what might be causing the error? Any guidance would be much appreciated!

@MinnaZhong
Copy link

Hi @vk-chen ,

C19 may be related to the communication between the end of the arm and the e custom end effector. If you remove the custom end effector, C19 will not occur, right?
What is the firmware version? Please send an email to [email protected], I will help you to update the firmware of IO board to see if the problem can be solved.

@penglongxiang
Copy link

Hi @penglongxiang, that's very interesting. Is the Automatic Status Report exposed through the SDK, or should we read from the port and parse the stream directly ourselves?

@joshuafishman you have to read and parse by yourselves.

@joshuafishman
Copy link
Author

joshuafishman commented Jun 14, 2023

Hi @MinnaZhong, Thanks for your response! Our firmware version is 2.0.1 and studio version is 2.0.3 -- I'll send an email.

@MahmoudMas00
Copy link

Hi, can you mention me if you get an explanation about this error please?
I think I had the same statement you mentioned above, I am reading the force using the TGPIO method and still get this error immediately when we run the script.

@MinnaZhong
Copy link

Hi @MahmoudMas00 ,

Would you please share your script? What are the firmware and UFactory Studio versions?
It doesn't seem to be the same issue, they can't replicate Error Code 19 with the script.
Let's discuss in #82

Best,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants