Turn a trajectory simulated in BabaCAD Robotics Web into a KUKA KRL program, then copy it to the robot controller with a USB stick · KR C2, KR C4 and KR C5 controllers
One plugin works for every KUKA model in BRW. It is the KUKA post processor: it recognizes the active KUKA arm and turns its simulated trajectory into a KRL program (.src and .dat), for a KR C4 / KR C5 or a KR C2 controller. Nothing needs to be installed, and the computer does not need a network connection to the robot.
| File | Contains |
|---|---|
| BRW-KUKA-PostProcessor.zip | the plugin folder brw-plugin and README.txt |
| brw-plugin.js | the plugin alone; put it in a folder named brw-plugin |
brw-plugin.js and explained in README.txt.| BRW model | Robot | Axis speeds used |
|---|---|---|
| Kuka kr6 | KR 6 (KR 6-2) | datasheet, KR 6-2 / KR 16-2 family |
| Kuka kr15 | KR 15 | estimate |
| Kuka kr16 | KR 16 (KR 16-2) | datasheet |
| Kuka kr 6 r700 sixx | KR 6 R700 sixx (KR AGILUS) | datasheet |
| Kuka kr 70 r2100 | KR 70 R2100 | estimate |
| Kuka kr 210 r2700 extra | KR 210 R2700 extra (KR QUANTEC) | datasheet |
| Kuka kr 500 r2830 | KR 500 R2830 (KR FORTEC) | estimate |
The axis speeds only decide how fast each motion of the program runs, so that it takes about as long as in the simulation. The override on the smartPAD or KCP scales them in every case. Other KUKA models whose name starts with "Kuka" are post-processed too, with slow generic speeds and a warning in the console.
brw-plugin folder..src and .dat. Chrome and Edge ask once for the folder (select your USB stick); Firefox and Safari save the files to Downloads. The files are named like BRW_KR16_C4_1008_1530.src..src and .dat files on the USB drive, Edit → Copy, open KRC:\R1\Program and Edit → Paste. On a KR C2 the commands are under File. KR C2 cabinets older than edition 2005 have no USB port; copy the files over the network there.PTP {A1 .., A6 ..} in degrees, in the KUKA convention. It does not use $TOOL or $BASE, so it runs the same whatever tool and base are selected.C_PTP, $APO.CPTP = 10), so the robot moves without stopping.BAS (#VEL_PTP, %)) that makes it take about as long as in the simulation. A pause of the simulated arm becomes WAIT SEC, with an exact stop before it.Both use the same KRL commands. They differ in how the path is cut into motions: very short PTP motions cannot be blended within the controller's interpolation cycle and make the robot slow down or stop, and the KR C2 has less memory and computing power.
| Controller | Command | Shortest motion | Most PTP points |
|---|---|---|---|
| KR C4 / KR C5 (KSS 8.x) | User Command 1 | 0.05 s | 20000 |
| KR C2 (KSS 5.x) | User Command 2 | 0.1 s | 3000 |
If a long path needs more points, the plugin thins it more coarsely and says so in the console.
DEF BRW_KR16_C4_1008_1530( )
;FOLD INI
...
BAS (#INITMOV, 0)
;ENDFOLD (INI)
$APO.CPTP = 10
BAS (#VEL_PTP, 10)
PTP {A1 0.000, A2 -90.000, A3 90.000, A4 0.000, A5 0.000, A6 0.000}
BAS (#VEL_PTP, 12)
PTP {A1 -5.258, A2 -86.494, A3 88.247, A4 -1.753, A5 3.506, A6 7.011} C_PTP
...
WAIT SEC 1.00
...
END
Not included yet: external axes (a trajectory that moves a linear rail or rotary table is refused), and tool I/O, gripper or process commands. Add those in the program on the controller if you need them.
The plugin converts the simulator's angles to KUKA's axis values: KUKA = sign · sim + offset. It works from the simulator's own angles, so the joint mapping set in BRW does not change the program.
| A1 | A2 | A3 | A4 | A5 | A6 | |
|---|---|---|---|---|---|---|
| Sign | −1 | +1 | +1 | −1 | +1 | −1 |
| Offset | 0° | −90° | +90° | 0° | 0° | 0° |
The BRW Home pose is the KUKA pose A1 0, A2 −90, A3 90, A4 0, A5 0, A6 0: upper arm vertical, forearm horizontal. KUKA's A1, A4 and A6 turn the other way round from the simulator's joints, so their sign is −1.