Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python Update() func does not give the cycle time
#1
Hi,
I was trying to get program cycletime with latest release .
unfortunately , it does not work, it is always replying with the same values altough I change the setSpeed() value

here is my python snippet 

Code:
prog2 = RDK.AddProgram('AutoProgram3')
prog2.setSpeed(40.), # linear mm/sec
prog2.MoveL(t5)
prog2.MoveL(home)
check_collisions =  False
update_result = prog2.Update(check_collisions)
print(update_result)
print("timing prog2 : ",update_result[1], " sec.")

Changing the speed has no effect

It works if I change
prog2.setSpeed() with robot.setSpeed()

What is the difference between prog.setSpeed() and robot.setSPeed() ?
#2
Trying it using MoveJ isntead of MoveL and setting the joint speed returns totally inaccurate results.

Having a look, at program generated in the user interface ,the reason may be because the setSpeedJoint() command is not inserted in the
program for unknown reason.

But when executed from the graphic user interface , with speed instruction added the right time is being displayed in status bar
#3
Hi Sancelot,

You should make sure you have a Set Speed instruction imposing all joint and linear speeds and accelerations. This makes sure that the speeds and accelerations are properly set in the program. You can set/change the speed in a program using a Set Speed Instruction:
https://robodk.com/doc/en/Robot-Programs.html#InsSpeed

RoboDK uses the joint speed/acceleration constrains for joint movements and the Cartesian speed/acceleration constrain for linear movements by default.

Some parameters need to be considered to accurately calculate cycle time in RoboDK. It is important to note that the real acceleration will highly depend on the robot payload and position of the robot, therefore, the cycle time you get in RoboDK will be an estimate. More information here:
https://robodk.com/doc/en/General.html#CycleTime
 
Another detail, RoboDK assumes that the robot does point to point movements (stopping at each point). So it has a uniform acceleration up to it reaches the maximum speed, then, uniform deceleration. This behavior can be changed on the real robot from RoboDK if you use a  Rounding instruction:
https://robodk.com/doc/en/Robot-Programs.html#InsSmooth
This instruction allows the robot to maintain a more constant speed while rounding the edges of the path, so the time will be faster on the real robot. On the other hand, RoboDK assumes that the robot will maintain a constant speed for cycle time calculation (the real robot will probably be slower than that).

I recommend you to take a look at the script attached to see a good example. It modifies the speed directly as a robot parameter in the simulation so it assumes that you don't have an instruction setting the speed in your program (otherwise it overwrites the speed you set through the API for the robot).

Albert


Attached Files
.zip   CycleTimeStudy.zip (Size: 868 bytes / Downloads: 117)
  




Users browsing this thread:
1 Guest(s)