Posts by wassimj

    We have a robot cell where we have integrated a Kuka KR60-HA with a custom-designed dual extruder. Think of the dual extruder as an alternating dual piston system: the first piston goes forward a certain distance, hits a limit switch and while it is retracting the second piston moves forward until it hits its limit switch and vice-versa. The integrator has given us the flags and commands to run the dual extruder (named extruder1 and extruder2). So for example, we can issue:

    My question is how can I combine the above with the movement of the robot so that I get the following logic:

    1. Start Program
    2. Extruder 1 starts moving forward. At the same time, the robot starts moving
    3. While robot is moving, if extruder 1 hits extended limit switch, retract until it hits retracted limit switch and at same time set extruder2 to move forward
    4. While robot is moving, if extruder 2 hits its extended limit switch, retract it until it hits its retracted limit switch and at same time set extruder 1 to move forward

    Is there a way I can recognise the above events (e.g. I_Ext1ExtendedLimitSw) becoming TRUE at any point in the program and take action while the robot continues to move?


    Do you have a wiring diagram of whatever I/O is currently connected to the robot? For that matter, what is connected to this robot? You said it has a 32in/32out option installed -- how many of those signals are in use, and what are they wired to? If you can locate those wires, unless they're all in use, you should be able to find some empty terminals that you can use for the VFD. The next chore after that is figuring out which software signal numbers have been mapped to those terminals.

    A picture might be of use. A copy of your WorkVisual project from the robot as it is currently configured would be more useful. Um... do you know how to make backups of the robot?

    Many thanks for the help. I am printing all your comments and contacting the Electrical Engineering Department. Perhaps they can help us with the actual deployment. I worry I will mess it up if I do this on my own.
    Just to answer your questions: Nothing is connected to the robot. We have a CNC router/spindle connected to the VFD and we operate it manually from the VFD control panel. The only thing added to the robot was the safety interlock (X11??) so when we open the cage door, it stops. There should be many free ports to use.

    No I do not know how to backup the robot and that is why we really need someone on the premises to help us. Sadly, the budget was so tight, we managed to get the robot and install it safely, but nothing more (no system integrator was involved). Still, I have developed the software needed for producing the .src and .dat files from within Autodesk 3DS Max and can get the hotwire cutter and the CNC router tools to produce 3D cuts.

    I don't want to be impolite as you guys are very knowledgeable and want to help, but I am completely lost in the jargon: "communicate via X44 to a Beckhoff EK1100 bus coupler, EL2624 Relay outputs, EL4002 analog outputs, EL9011 end cap, and control the VFD via the analog control for frequency and 'MI1' to common through a relay output to run the VFD"

    I have no idea what the above means. I need a *much* simpler and detailed set of instructions on what to do. I am not an electrical engineer so I have no idea what all these letters and numbers mean or even what a relay output is.

    Would a photo of the interior of the KRC4 help?

    Many thanks.

    Here is the exact information on the spindle and the VFD:
    delta drive VFD022E21A inverter. single phase 220v input ELTE 2.2/3kw

    Reference Manual at: http://docs-europe.electrocomp…1236/0900766b812364ef.pdf

    To answer panicmode: We have not messed with I/O at all. I assume it is all in the cabinet as we ordered (and listed above with the Digital I/O package), but this is not tested.

    I do not know where to find the part number for the input and output modules. If you kindly tell me where to look for them, I can provide those for you.

    In terms of control: I would like both: on/off and speed control through the KRL program. (I code my own .src and .dat files, so I am hoping I can insert the needed code at the right moment to turn the spindle on and off and set its speed as needed).

    To answer SkyFire: Good to know that it might be a simple task.. but could you please give me some more detail on how to identify the ports to connect to? and what kind of wire to use? Sorry, as I said, I am an architect not an electrical engineer.

    Thank you for all your continued help.

    It is a KRC4. It has the following option:

    KUKA KR C4 Digital I/O 32/32 package comprising:-
    • Digital I/Os installed in control cabinet to include
    o 32 digital inputs, common ground
    o 32 digital outputs (24 V, 500 mA/output), common ground, external power supply

    It also has GripperTech (unused to this point)

    I have a Kuka KR60HA. I am an architect not an engineer, so I know nothing about I/O etc.. We have a CNC router mill on the robot with a VFD but it is not connected electrically to the robot, so it is manually switched on and off. Can someone please clue me (with a LOT of detail and step-by-step) on how to connect/wire the VFD to the KRC so that we can control speed and on/off of the CNC router through the program rather than manually? Thank you.


    I have written a free-to-use script that turns AutoDesk 3DS Max into a very basic CAM software to generate KRL for the Kuka Robot (Youtube Video below):

    Thanks got to Rab Gordon. A few years ago, he wrote an open source script called CNC Toolkit for 3DS Max. It did not generate KRL, but had some really useful functions that I shamelessly used in my software.

    I have two versions of the script, one for a robot equipped with a hotwire and one for a Robot with a CNC Spindle. The software is beta and VERY basic (so no spindle speed control or tool changes.) It is only about generating a tool path with multiple passes, custom step over and surface normals. It is also only for simple surfaces (no under cut and no bottom faces). I already have one friend in London ready to beta test it, but would like more to test it (at your own Risk!).

    If you have 3DS Max and a Kuka Robot and are willing to beta test the software, please contact me at wassim dot jabi at gmail dot com and I will send you the MAXSCRIPT to test.


    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:

    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.

    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:
    You can see the robot in action (first attempt, not well-designed) cutting polystyrene here:


    I am new to programming our Kuka KR60 HA. Some paths are making the robot stop with a Tool 1 overloading error when there really is no reason for that (sorry cannot remember the exact wording). I have a fairly lightweight hotwire cutter (made of 3 aluminium profiles and one wire) on it and I am cutting polystyrene. So there is no significant resistance to the motion. In researching this online, it seems there is a way to specify the weight of the tool so it knows to compensate for that? Can someone please give me some guidance on how to avoid these errors? Many thanks.

    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):

    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.

    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: