Hello,
I am trying to output my own .src and .dat files. I have a Kuka KR60 HA and I built for it a custom hotwire. The wire is at 102mm away from the face of the flange and oriented horizontally. It is centred with the flange vertically. How can I specify that offset in the .src file? When I specify the path to hotwire cut, I assume the Z orientation to be towards the flange with the wire perpendicular to the orientation as seen in this early test video: http://youtu.be/_gAZAGTkWJk
TOOL OFFSET
-
wassimj -
February 22, 2014 at 4:55 PM -
Thread is marked as Resolved.
-
-
You want to define a TCP on the wire, I take it. TCP is defined as a 6DOF transform from the "zero tool," the origin point on the center of the Axis 6 mounting flange. The orientation of the "zero tool" has Z+ pointing straight out of the flange, coincident with the axis of Axis 6. If you place the robot arm at Mastering position, the X+ axis of the "zero tool" will point straight down.
If the point on the wire that you wish to assign as a TCP is straight out from the flange at a distance of 102mm, then you can simply set a $TOOL value (or teach a TOOL_DATA array member) a value of {X 0,Y 0,Z 102,A 0,B 0,C 0}. This will keep the Z+ axis pointing straight out away from the wrist. If you wish to invert the Z axis, then a C or B value of 180 will do that, depending on which axis you wish to keep parallel to the wire.
-
That is exactly what I figured out.. An offset only in the Z. In my CAD program, I assume +Z (up) is pointing from the center of the wire towards the zero tool. The positive X axis is in the direction of travel perpendicular to the wire. So, please correct me if I am wrong, but I am assuming I will need:
$TOOL = {X 0.0, Y 0.0, Z 102.0, A 0, B 180, C 0}
The above will maintain the Y-axis parallel to the wire, The X-axis perpendicular to the wire, The Z-axis perpendicular to the wire and pointing towards the flange (zero tool).
My problem seems to be with the syntax (I am outputting stuff through my own script from within a CAD program). Is the above correct? If not, could you please give me a sample .src file that would set the TCP on the wire as you suggested. I just need to see the needed .src syntax. Thank you.
-
That command syntax is correct.
However, those numbers will only keep Y-axis parallel to the wire if it started that way. Basically, if you move the robot so the joints are at these angles: {A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0}, if the wire is horizontal, then your numbers will do what you predict.
Also, keep in mind that the ABC values in any KRL Cartesian-type variable (POS, FRAME, etc) are Euler rotations, in sequence: A(Rz), B(Ry), C(Rx). That will be important if you need to make any compound-angle adjustments to achieve the TCP orientation you desire.
-
That command syntax is correct.However, those numbers will only keep Y-axis parallel to the wire if it started that way. Basically, if you move the robot so the joints are at these angles: {A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0}, if the wire is horizontal, then your numbers will do what you predict.
Also, keep in mind that the ABC values in any KRL Cartesian-type variable (POS, FRAME, etc) are Euler rotations, in sequence: A(Rz), B(Ry), C(Rx). That will be important if you need to make any compound-angle adjustments to achieve the TCP orientation you desire.
Thank you very much. It is all working fine now. I have set up the $BASE $HOME, and $TOOL so that it moves in expected ways. Here is the test code I am running (this is exported from 3ds Max via my custom script):
Code
Display MoreDEF undul04( ) ;------- Declaration section ------- EXT BAS (BAS_COMMAND :IN,REAL :IN ) DECL AXIS HOME ;Variable HOME of type AXIS ;------------- Initialization ------------ BAS (#INITMOV,0 ) ;Initialization of velocities, accelerations, $BASE, $TOOL, etc. HOME = {AXIS: A1 -90, A2 -90, A3 90, A4 0, A5 90, A6 0} $BASE = {X 0, Y 0, Z -48, A 90, B 0, C 0} $TOOL = {X 0, Y 0, Z 1000, A 0, B 180, C 0} $VEL.CP = 0.02 PTP HOME LIN {X 891.85, Y 0.00, Z 495.87, A 0.00, B 0.00, C 0.00} LIN {X 891.85, Y 0.00, Z 295.87, A 0.00, B 0.00, C 0.00} LIN {X 895.53, Y 0.00, Z 300.25, A 0.00, B 0.00, C 0.00} LIN {X 899.21, Y 0.00, Z 304.62, A 0.00, B 0.00, C 0.00} LIN {X 902.90, Y 0.00, Z 308.98, A 0.00, B 0.00, C 0.00} LIN {X 906.61, Y 0.00, Z 313.33, A 0.00, B 0.00, C 0.00} LIN {X 910.35, Y 0.00, Z 317.65, A 0.00, B 0.00, C 0.00} LIN {X 914.12, Y 0.00, Z 321.95, A 0.00, B 0.00, C 0.00} LIN {X 917.93, Y 0.00, Z 326.21, A 0.00, B 0.00, C 0.00} LIN {X 921.78, Y 0.00, Z 330.43, A 0.00, B 0.00, C 0.00} LIN {X 925.69, Y 0.00, Z 334.60, A 0.00, B 0.00, C 0.00} LIN {X 929.65, Y 0.00, Z 338.71, A 0.00, B 0.00, C 0.00} LIN {X 933.69, Y 0.00, Z 342.76, A 0.00, B 0.00, C 0.00} LIN {X 937.80, Y 0.00, Z 346.72, A 0.00, B 0.00, C 0.00} LIN {X 942.00, Y 0.00, Z 350.60, A 0.00, B 0.00, C 0.00} LIN {X 946.30, Y -0.00, Z 354.37, A 0.00, B 0.00, C 0.00} LIN {X 950.70, Y -0.00, Z 358.01, A 0.00, B 0.00, C 0.00} LIN {X 955.21, Y -0.00, Z 361.51, A 0.00, B 0.00, C 0.00} LIN {X 959.85, Y -0.00, Z 364.85, A 0.00, B 0.00, C 0.00} LIN {X 964.63, Y -0.00, Z 367.99, A 0.00, B 0.00, C 0.00} LIN {X 969.54, Y -0.00, Z 370.92, A 0.00, B 0.00, C 0.00} LIN {X 974.59, Y -0.00, Z 373.59, A 0.00, B 0.00, C 0.00} LIN {X 979.78, Y -0.00, Z 375.97, A 0.00, B 0.00, C 0.00} LIN {X 985.11, Y -0.00, Z 378.01, A 0.00, B 0.00, C 0.00} LIN {X 990.57, Y -0.00, Z 379.70, A 0.00, B 0.00, C 0.00} LIN {X 996.14, Y -0.00, Z 380.98, A 0.00, B 0.00, C 0.00} LIN {X 1001.79, Y -0.00, Z 381.84, A 0.00, B 0.00, C 0.00} LIN {X 1007.49, Y -0.00, Z 382.24, A 0.00, B 0.00, C 0.00} LIN {X 1013.20, Y -0.00, Z 382.12, A 0.00, B 0.00, C 0.00} LIN {X 1018.86, Y -0.00, Z 381.36, A 0.00, B 0.00, C 0.00} LIN {X 1024.45, Y -0.00, Z 380.17, A 0.00, B 0.00, C 0.00} LIN {X 1029.96, Y -0.00, Z 378.67, A 0.00, B 0.00, C 0.00} LIN {X 1035.41, Y -0.00, Z 376.95, A 0.00, B 0.00, C 0.00} LIN {X 1040.81, Y -0.00, Z 375.07, A 0.00, B 0.00, C 0.00} LIN {X 1046.15, Y -0.00, Z 373.05, A 0.00, B 0.00, C 0.00} LIN {X 1051.46, Y -0.00, Z 370.93, A 0.00, B 0.00, C 0.00} LIN {X 1056.73, Y -0.00, Z 368.72, A 0.00, B 0.00, C 0.00} LIN {X 1061.97, Y -0.00, Z 366.43, A 0.00, B 0.00, C 0.00} LIN {X 1067.18, Y -0.00, Z 364.09, A 0.00, B 0.00, C 0.00} LIN {X 1072.37, Y -0.00, Z 361.70, A 0.00, B 0.00, C 0.00} LIN {X 1077.54, Y -0.00, Z 359.26, A 0.00, B 0.00, C 0.00} LIN {X 1082.69, Y -0.00, Z 356.79, A 0.00, B 0.00, C 0.00} LIN {X 1087.83, Y -0.00, Z 354.29, A 0.00, B 0.00, C 0.00} LIN {X 1092.95, Y 0.00, Z 351.76, A 0.00, B 0.00, C 0.00} LIN {X 1098.07, Y 0.00, Z 349.21, A 0.00, B 0.00, C 0.00} LIN {X 1103.17, Y 0.00, Z 346.65, A 0.00, B 0.00, C 0.00} LIN {X 1108.27, Y 0.00, Z 344.07, A 0.00, B 0.00, C 0.00} LIN {X 1113.37, Y 0.00, Z 341.49, A 0.00, B 0.00, C 0.00} LIN {X 1118.46, Y 0.00, Z 338.89, A 0.00, B 0.00, C 0.00} LIN {X 1123.55, Y 0.00, Z 336.30, A 0.00, B 0.00, C 0.00} LIN {X 1128.65, Y 0.00, Z 333.71, A 0.00, B 0.00, C 0.00} LIN {X 1133.74, Y 0.00, Z 331.12, A 0.00, B 0.00, C 0.00} LIN {X 1138.84, Y 0.00, Z 328.54, A 0.00, B 0.00, C 0.00} LIN {X 1143.95, Y 0.00, Z 325.97, A 0.00, B 0.00, C 0.00} LIN {X 1149.06, Y 0.00, Z 323.42, A 0.00, B 0.00, C 0.00} LIN {X 1154.19, Y 0.00, Z 320.90, A 0.00, B 0.00, C 0.00} LIN {X 1159.32, Y 0.00, Z 318.39, A 0.00, B 0.00, C 0.00} LIN {X 1164.48, Y 0.00, Z 315.93, A 0.00, B 0.00, C 0.00} LIN {X 1169.65, Y 0.00, Z 313.51, A 0.00, B 0.00, C 0.00} LIN {X 1174.85, Y 0.00, Z 311.14, A 0.00, B 0.00, C 0.00} LIN {X 1180.08, Y 0.00, Z 308.83, A 0.00, B 0.00, C 0.00} LIN {X 1185.35, Y 0.00, Z 306.61, A 0.00, B 0.00, C 0.00} LIN {X 1190.66, Y 0.00, Z 304.49, A 0.00, B 0.00, C 0.00} LIN {X 1196.02, Y 0.00, Z 302.51, A 0.00, B 0.00, C 0.00} LIN {X 1201.44, Y 0.00, Z 300.72, A 0.00, B 0.00, C 0.00} LIN {X 1206.95, Y 0.00, Z 299.19, A 0.00, B 0.00, C 0.00} LIN {X 1212.55, Y 0.00, Z 298.08, A 0.00, B 0.00, C 0.00} LIN {X 1218.25, Y 0.00, Z 297.69, A 0.00, B 0.00, C 0.00} LIN {X 1223.95, Y 0.00, Z 298.07, A 0.00, B 0.00, C 0.00} LIN {X 1229.59, Y 0.00, Z 298.95, A 0.00, B 0.00, C 0.00} LIN {X 1235.16, Y 0.00, Z 300.23, A 0.00, B 0.00, C 0.00} LIN {X 1240.65, Y 0.00, Z 301.82, A 0.00, B 0.00, C 0.00} LIN {X 1246.06, Y 0.00, Z 303.65, A 0.00, B 0.00, C 0.00} LIN {X 1251.40, Y 0.00, Z 305.70, A 0.00, B 0.00, C 0.00} LIN {X 1256.67, Y 0.00, Z 307.91, A 0.00, B 0.00, C 0.00} LIN {X 1261.87, Y 0.00, Z 310.26, A 0.00, B 0.00, C 0.00} LIN {X 1267.03, Y 0.00, Z 312.73, A 0.00, B 0.00, C 0.00} LIN {X 1272.13, Y 0.00, Z 315.30, A 0.00, B 0.00, C 0.00} LIN {X 1277.18, Y 0.00, Z 317.97, A 0.00, B 0.00, C 0.00} LIN {X 1282.20, Y 0.00, Z 320.71, A 0.00, B 0.00, C 0.00} LIN {X 1287.17, Y 0.00, Z 323.52, A 0.00, B 0.00, C 0.00} LIN {X 1292.11, Y 0.00, Z 326.39, A 0.00, B 0.00, C 0.00} LIN {X 1297.02, Y 0.00, Z 329.31, A 0.00, B 0.00, C 0.00} LIN {X 1301.91, Y 0.00, Z 332.28, A 0.00, B 0.00, C 0.00} LIN {X 1306.76, Y 0.00, Z 335.29, A 0.00, B 0.00, C 0.00} LIN {X 1311.60, Y 0.00, Z 338.34, A 0.00, B 0.00, C 0.00} LIN {X 1316.41, Y 0.00, Z 341.42, A 0.00, B 0.00, C 0.00} LIN {X 1321.20, Y 0.00, Z 344.53, A 0.00, B 0.00, C 0.00} LIN {X 1325.98, Y 0.00, Z 347.67, A 0.00, B 0.00, C 0.00} LIN {X 1330.74, Y 0.00, Z 350.83, A 0.00, B 0.00, C 0.00} LIN {X 1335.49, Y -0.00, Z 354.01, A 0.00, B 0.00, C 0.00} LIN {X 1340.22, Y -0.00, Z 357.22, A 0.00, B 0.00, C 0.00} LIN {X 1344.94, Y -0.00, Z 360.43, A 0.00, B 0.00, C 0.00} LIN {X 1349.66, Y -0.00, Z 363.66, A 0.00, B 0.00, C 0.00} LIN {X 1354.36, Y -0.00, Z 366.90, A 0.00, B 0.00, C 0.00} LIN {X 1359.06, Y -0.00, Z 370.16, A 0.00, B 0.00, C 0.00} LIN {X 1363.76, Y -0.00, Z 373.42, A 0.00, B 0.00, C 0.00} LIN {X 1368.44, Y -0.00, Z 376.68, A 0.00, B 0.00, C 0.00} LIN {X 1373.13, Y -0.00, Z 379.96, A 0.00, B 0.00, C 0.00} LIN {X 1377.81, Y -0.00, Z 383.23, A 0.00, B 0.00, C 0.00} LIN {X 1382.49, Y -0.00, Z 386.51, A 0.00, B 0.00, C 0.00} LIN {X 1382.49, Y -0.00, Z 586.51, A 0.00, B 0.00, C 0.00} PTP HOME END
-
3d max - sounds interesting never think that it is possible to use it as a cam package ...
Can i try the script as well? What are the requirements for it? -
I know 3dmax have 5axis script for free, called cnc----kit. I tried this before in a 5 axis router but not on a 6 axis robot.
-
Yes, I have that as well. It is very good, but I have not used it for the Kuka robot. What I did is three things:
1. Import the Kuka Robot 3D model from their website into 3ds Max and 'rig it' with the correct hinge positions and rotational limits (I only did the one model I have: a Kuka KR60 HA).
2. Design the geometry of the tool (in my case a hotwire cutter, C-shaped) and link it to both the robot model and to the tool path spline. So, when it moves, it pulls/pushes on the robot (using an IK solver within 3DS Max).
3. Write a 3DS Max script (MAXSCRIPT) that generates a tool path for a hotwire cutter and output a .src file that I transfer to the controller and run it on the robot to hotwire cut polystyrene.
You can see the simulation here: http://youtu.be/IsqJEMzxG9c
You can see the robot in action (first attempt, not well-designed) cutting polystyrene here: http://youtu.be/s2itSUSjDJI -
Nice video.
Please share the script with us
How complete is the script, any limitations? -
I am planning on sharing it.. but need to clean it up and enhance it a bit more. Here is a screen shot of what it can do.. It does not do any of the rigging and IK for you. You have to do that on your own if you want to simulate the movements of the robot. But, for simpler paths, it can work without it. It outputs KRL with the proper parameters for *my* robot, so the numbers need to be modified for your robot (I will put that in the GUI soon). Also, it outputs the KRL to the Listener window, so you have to copy and paste and create an empty .dat file for it to work. I use the excellent OrangeEdit as an in-between step before taking the files to the controller. It is specifically for hotwire cutting, but same principle can be applied for other tool paths.
I would welcome any suggestions on how to improve the script.
-
Nice work! Well.. may be you can add a profile wire as a cutter tool?
Also, visualisation of the end result would be nice - it will be just a extruded result of the splines
the other thing is to have some kind of warning about the axis limits and singularities?
Or may be to generate those toolpaths from more complex mesh?How do you define the starting point - base frame?
Anyway - love to see using of 3ds max as a cam tool
-
Hello,
With a lot of hesitation I am providing an "alpha" (pre-beta) version of my 3DS Max script. Please use at your own risk. I am not responsible for any damage caused by the use of this software. The script does not currently allow you to link an Inverse Kinematics rigged model (working on that), but for simple paths it should work fine without it (just watch out for collisions, simulate first!).
The script GUI allows you to set the BASE, TOOL, and HOME positions, but you may still need to tweak the src file manually: For example, I automatically add a point 200 mm above the starting point of the curve (for approach to the stock material). You may need to approach the stock material differently in your case. I also do the same at the end (I lift the cutter 200mm above the end point before going back to HOME position).
The main procedure to use the script: (Use mm for everything, Specify a project name at the top).
1. Specify the parameters for the HOME, BASE, TOOL, Velocity, Velocity Approximation etc.
2. Specify the number of segments/steps to divide the surface into
3. Specify the direction (vector) of the cutter, you can allow it to always be perpendicular to the surface at the point of cutting, or limit it to a vector (e.g. [0,0,1] forces it to always be vertical as it travels. You can also reverse the direction.
4. Select two splines
5. Generate path
6. Show/Hide tool instances along the path
7. Animate (the velocity should be close to real-life).
8. Export (Make sure you have given the project a name at the top first).I would love to hear the results of anyone testing this software. This will be improved in the future.
You can download the MAXSCRIPT from: https://www.dropbox.com/s/usmjf6swwxn0yie/KukaHotWireCNC.mse
-
Here is a video illustrating the use of my script for generating a surface from two splines and exporting the result to a tool path (KRL .src and .dat) for driving a Kuka Robot with a hotwire cutter. The 3DS Max script can be downloaded from:
If you test this software, I would love to see the results. -
Nice Video, Good job!
-
Didn't had the time to test, did some paths - working fine, need to test the code i suppose
Good job so far, really like it!
May be it can be done also for only one splline? Like a spindle? Or for cutting with a profile wire? -
hi, I saw the video on YouTube and I have a big question for you. I saw the robot move trought singularity with the wrist but not flip happens on A4.How this been possible?
-
Lookup $ori_type=#joint.
PostRe: Singularity - how to set $singul_pos[3]
Hi,
$SINGUL_POS[3] is for the third singularity a standard 6 axis robot can have (Index 1: axis one singularity, Index 2: a2-a3 singularity, Index 3 axis 5 singularity). Basically for the axis 5 singularity distance corresponds to a scaled axis 5 angle. Therefore the robot is "inside" the singularity whenever the value of $singul_dist[3] < 1.0 (about +-0.0181° a5 angle) . Did you check the value of $singul_dist[]? Otherwise the robot might still think "no singularity" and does nothing. The…FubiniMay 20, 2013 at 11:51 AM Fubini
-
Thanks, i’ll check today