Issue with set_cgpio_digital()

set_cgpio_digital is not working for me. i am using firmware version 2.4.1 and software version 2.4.0. I am simply running a script in the ufactory python terminal; however, set_cgpio_digital does not work. Help.

Hi Sir,

Does set_cgpio_digital return any error? Please enter ‘Settings-External-Controller IO’, and see if CO is changed.

Best regards,
Minna

Hi,

No it does not return any error. It does not change in the settings either. However, I can manually toggle CO.

Hi Sir,

Please share the SN of your robot with support@ufactory.cc, take a screenshot of the python code, shoot a video to show us the Controller IO page, thank you.

Best regards,
Minna

Hello, I have the same exact issue.

When I toggle COx and DOx values through UFACTORY Studio or run the Python example (5006-set_cgpio_digital_analog.py), I don’t see any voltage change whatsoever at the controller.

An updates from the support team?
I have an xArm6.

Thanks,
Calvin

Hi. I discovered the issue was with my Python script, so I didn’t reach out to UFactory. I had connected a few sensors to the controller and realized they needed to be set to ‘HIGH’ (1) to trigger them. However, when I manually toggled the buttons on Ufactory, I consistently received a response. Have you checked your wiring?

I was hopeful after reading your response…but, I am either still missing some necessary enable steps or something may be wrong with my controller.

Here’s my settings in UFactory studio and the voltage readings from pins 24v, DO1, and DO3:

What do you use as your ground reference?

P.S. I am able to set analog output pins and get a reading on the multimeter.

Hi Calvin,

It’s an OC output, you need to add a pull-up resistor.

Best regards,
Minna

Thank you, Minna!!! That’s exactly what I was missing. After adding a pull-up resistor, the DO pins behaved as expected.

Regards,
Calvin