How to edit and upload scripts to a Kawasaki robot?

My projectgroup and I have been having problems trying to write a script on our pc’s and then upload them to the robot.

We tried uploading the following script:

.PROGRAM testScript()
JMOVE startpoint

When we used this command in KCWINTCP or KR term:


we encountered the following error:

We were unable to download a single program from the Kawasaki as well. Any attempt to download a single program results in download every program on the machine as well as their variables, etc.

To summarize: Does anyone know how to upload/download a program successfully?

Het bestand dat jullie willen laden, staat die in de map: “C:\KCWINTCP”?

Ja, het bestand staat in de folder waar ook de exe van KCWinTCP/KRTerm in staat.

Rename yor file to .as

Does that make a difference?

I found the answer. Make sure the last line of your file is an empty one.

.PROGRAM testScript()
JMOVE startpoint
<-- Empty line

@Mathijs The extension doesn’t seems to matter because .txt also works.

The extension doesn’t seem to be the problem and we’ve tried uploading programs with and without an empty line as the last line.

We also used the Ruby Script of Thijs which can be found on Drive (Kawasaki writer) but this also didn’t fix our issue. We have tried uploading the same script to the robot of another group. The script uploaded fine on their robot whereas it kept giving errors on ours.

Uploading a script using unique variable names is a temporary solution for us, but won’t work well on the long-term. We talked with Thijs about it and he suggested it might be some global flag that prohibits the use of global variable by multiple programs.

What command did you use when trying to save a program?

This is actually pretty well documented in the Kawasaki - AS programming language reference

Syntax is


See example in screenshot below.

First make sure all programs are turned off (kill and pckill).

If that doesn’t fix the problem, what I usually do is making a save and then edit that save.

Save backup

open the backup you just made, put in your new program, save it with a different name (update) and upload it.

Load update

The robot will ask if it is oke to load robot data. This is oke, as long as you only edited the programs that are in the file.

Hope this helps,