RoboDK Forum
Better joint control- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Better joint control (/Thread-Better-joint-control)



Better joint control-JoaoEm-07-22-2022

Hello everyone, I'm doing an article for college, and I'm starting in this world now.
I'm trying to control the joints of the Omron-TM5X-900 and I'm sending the instruction "MoveJ([0,0,x,0,0,0])" inside a while loop where x= x+1, ultil the x>=100.
This works, but in a very locked way, is there any way to make this movement more fluid?
其目的是为了来讲ol each joint with a potentiometer or perhaps with a digital input that triggers the movement.



RE: Better joint control-Albert-07-22-2022

You can set the blending to a value greater than 0, for example, 10 mm. For example, robot.setRounding(10).

This should work well if you are generating your robot program offline. On the other hand, if you are moving your robot directly from your code or RoboDK (using the driver), the robot may synchronize at each line of code.


RE: Better joint control-JoaoEm-07-25-2022

(07-22-2022, 08:37 AM)Albert Wrote:You can set the blending to a value greater than 0, for example, 10 mm. For example, robot.setRounding(10).

This should work well if you are generating your robot program offline. On the other hand, if you are moving your robot directly from your code or RoboDK (using the driver), the robot may synchronize at each line of code.

Thanks for the reply Albert, yes I am moving the robot through my code, by the online programming,so setRounding won't work very well?I don't quite understand what you mean by "the robot may synchronize at each line of code" could you give more details please?

I haven't been able to test setRounding yet, I'll test it tomorrow and give you feedback, thank you very much!




RE: Better joint control-JoaoEm-07-26-2022

(07-22-2022, 08:37 AM)Albert Wrote:You can set the blending to a value greater than 0, for example, 10 mm. For example, robot.setRounding(10).

This should work well if you are generating your robot program offline. On the other hand, if you are moving your robot directly from your code or RoboDK (using the driver), the robot may synchronize at each line of code.

Hi Albert, I tested robot.setRounding(10) yesterday, and it didn't work, the robot continued to work the same way, what am I doing wrong? my program like this:


Code:
from robodk.robomath import *
from robodk.robolink import *
RDK = Robolink()
robot = RDK.Item('', ITEM_TYPE_ROBOT)
RUN_ON_ROBOT = True

if RDK.RunMode() != RUNMODE_SIMULATE:
RUN_ON_ROBOT = False


if RUN_ON_ROBOT:

success = robot.Connect()
status, status_msg = robot.ConnectedState()
if status != ROBOTCOM_READY:
# Stop if the connection did not succeed
print(status_msg)
raise Exception("Failed to connect: " + status_msg)
RDK.setRunMode(RUNMODE_RUN_ROBOT)



robot.setRounding(10)
robot.setSpeed(200)

joints = [0,0,0,0,0,0]
robot.MoveJ(joints)
x=0
while x <100:
joints = [0,0,x,0,0,0]
robot.MoveJ(joints)
x=x+1



RE: Better joint control-Albert-07-28-2022

Have you tried generating the program? The driver probably does not allow buffering the commands for rounding. This is more likely to work when you generate the program and load it in the controller.