For this tutorial u need:
- Doosan robot
- Laptop with DRL studio - Homburger Hub, installed
For rotations on a Doosan robot u can use the command:
posx(X=0, Y=0, Z=0, A=0, B=0, C=0)
Input Name | Input Type | Description |
---|---|---|
X | float | X coordinate defined using millimeters |
Y | float | Y coordinate defined using millimeters |
Z | float | Z coordinate defined using millimeters |
A | float | Rotate the Z-axis by A degrees using the world coordinates |
B | float | Rotate the Y-axis by B degrees using the world coordinates |
C | float | Rotate the Z-axis by C degrees using the world coordinates |
The default rotation for the head is up.
To rotate the head of the robot arm down you rotate around the Y-axis. This can be done using the the code given below. This code will get the current position of the arm and sets its rotation down.
arm_position, _i = get_current_posx()
return posx(arm_position[0], arm_position[1], arm_position[2], 0, 180, 0)
After rotating the head down we can use the code below to rotate the head by a specified angle. For example this code can be used for rotating a tool. This function can be called with an angle in degrees. This function will get the current position of the arm and sets its rotation down. At the same time the head wil rotate to the specified direction.
def angleToAA(Angle):
arm_position, _i = get_current_posx()
#Angle *= -1
return posx(arm_position[0], arm_position[1], arm_position[2], 0, 180, Angle)
In the case where we rotated the head it had to be always rotated down. Then it was easier for our system to invert the Angle. This can be done by removing the #.
For more information we recommand you to look in the Doosan Robotics Programming Manual this manual has all the commands you can use to code the robot.
This was the end of this tutorial, I hope it helped you. Good luck with your project!
If you want to discuss this topic or if you have questions, reply in the comments.
Code Writen by A.Vonk