Skip to content
Allows reading and writing variables to KUKA robots using a TCP/IP connection
Branch: master
Clone or download
markaren Merge pull request #7 from Laith-S/master
Fixed Hbytes and added getType in KRLVariable class
Latest commit a39e53e Feb 7, 2017


JOpenShowVar is a Java open-source cross-platform communication interface to Kuka robots that allows for reading and writing variables and data structures of the controlled manipulators. This interface, which is compatible with all Kuka robots that uses the KR C4 controller, runs as a client on a remote computer connected with the Kuka controller via TCP/IP. JOpenShowVar opens up to a variety of possible applications making it possible to use different input devices and to develop alternative control methods.

JOpenShowVar may be used to connect to a real KRC controller or a simulated one using the KUKA.OfficeLite package.

Demo video showing a KUKA KR6 R900 sixx being controlled using JOpenShowVar as the communication interface:


  • Filippo Sanfilippo, Lars Ivar Hatledal, Houxiang Zhang, Massimiliano Fago and Kristin Ytterstad Pettersen. Controlling Kuka Industrial Robots: Flexible Communication Interface JOpenShowVar. IEEE Robotics & Automation Magazine 22(4):96-109, December 2015.

  • Filippo Sanfilippo, Lars Ivar Hatledal, Houxiang Zhang, Massimiliano Fago and Kristin Ytterstad Pettersen. JOpenShowVar: an Open-Source Cross-Platform Communication Interface to Kuka Robots. In Proceeding of the IEEE International Conference on Information and Automation (ICIA), Hailar, China. 2014, 1154–1159.


0.1 -> 0.2:

  • The sendRequest method, and the Request and Callback classes are marked as deprecated, because you should use the read and writeVaribale methods instead. However, feel free to use the method if you don't know the dataype that will be returned.
  • Introduced the read and writeVariable methods that in most cases will replace sendRequest.
  • Added a convenience method for reading the joint angles and the joint torques (readJointAngles() and readJointTorques())

0.2 -> 0.2.1

  • Added Enum datatype support
  • Some internal code clean-up

0.2.1 -> 0.2.2

  • Added simpleRead and simpleWrite
  • Some consistency changes for the KRLStruct classes


KUKAVARPROXY must firstly be started on the KUKA SmartPad (copy paste the folder to somewhere in the WinXP environment -> run KUKAVARPROXY.exe) Port 7000 has to set open from the SmartPad: Start-up -> Network configuration -> NAT -> Add port -> Port number 7000 and Permitted protocols: tcp/udp

In order to successfully establish an connection to the server. Your IP must be assigned a static IP in the same subrange as the one defined in the the SmartPads network configuration.

Console application

JOpenShowVar-core features a simple console application which can be invoked by writing -java -jar JopenShowVar-core ipAddress port

Example code v0.1

public class Example {

	private static String robotIP = "";  //The static IP of the robot 
	private static int port = 7000;

	public static void main(String[] args) throws IOException {
		CrosscomClient client = new CrossComClient(robotIP, port);  //establish connection
		//Reads the current value of $OV_JOG and print the callback containing the value
		Callback readRequest = client.sendRequest(new Request(0, "$OV_JOG")); //read request
		//Set $OV_JOG to 100% and print the callback
		Callback writeRequest = client.sendRequest(new Request(1, "$OV_JOG", "100")); //write request
		//note that the first int argument can be any number between 0 and 99. It is simply an id given to the request so that it can be tracked. 


Example code v0.2.2

public class Test {

    public static void main(String[] args) throws IOException, InterruptedException {
        try (CrossComClient client = new CrossComClient("", 7000)) {

            KRLPos pos = new KRLPos("MYPOS").setX(2).setY(1);  //MYPOS is defined manually in $config.dat


            KRLE6Axis axisAct = KRLVariable.AXIS_ACT(); // the same as new KRLE6Axis($AXIS_ACT)

            KRLReal jog = KRLVariable.OV_JOG(); // the same as new KRLReal($OV_JOG)

            KRLReal pro = KRLVariable.OV_PRO();

            for (int i = 0; i < 100; i++) {

            KRLBool out1 = new KRLBool("$OUT[1]");
            KRLEnum mode = new KRLEnum("$MODE_OP");
			System.out.println(client.simpleWrite("$OV_JOG", "90"));

Comparison between v0.1 and v0.2

public class Test2 {

     * Comparison between v0.1 and v0.2
     * @param args
     * @throws IOException
     * @throws InterruptedException
    public static void main(String[] args) throws IOException, InterruptedException {
        try (CrossComClient client = new CrossComClient("", 7000)) {

            //v0.1 read
            Callback readRequest = client.sendRequest(new Request(0, "$OV_JOG")); 

            //v0.1 write
            Callback writeRequest = client.sendRequest(new Request(1, "$OV_JOG", "100")); 

            //v0.2 read
            KRLReal jog = KRLVariable.OV_JOG();

            //v0.2 write


Repository contents

The repository contains 3 projects. JOpenShowVar-core is the core project and contains the important stuff. JOpenShowVar-swing provides a GUI interface and references the core project JOpenShowVar-android is a simple android project that also references the core project

libs contains 3rd party libraries used by the swing project

KUKAVARPROXY contains the files that must be copied over to the WinXP environment on the KUKA SmartPad.


A big thanks to Massimiliano Fago, which is the original author of KUKAVARPROXY and the C++ project OpenShowVar (

You can’t perform that action at this time.