according these two topics
https://www.robot-forum.com/robotforum/kuk…tion-interface/
https://www.robot-forum.com/robotforum/kuk…enshowvar-7961/
I modified the example code of jopenshowvar, and then could be used in the command line
import java.io.IOException;
import javax.swing.JOptionPane;
import no.hials.crosscom.networking.Callback;
import no.hials.crosscom.networking.CrossComClient;
import no.hials.crosscom.networking.Request;
public class Example {
public static void main(String[] args) throws IOException {
if(args.length<2 || args.length >3 ){
System.out.println("usage: java -jar JOpenShowVarCMD.jar IP_address Var [SetVarValue]");
JOptionPane.showMessageDialog(null, "java -jar JOpenShowVarCMD.jar IP_address Var [SetVarValue]", "usage:", JOptionPane.PLAIN_MESSAGE);
}
if (args.length > 1){
CrossComClient client = new CrossComClient(args[0], 7000);
switch (args.length){
case 2:
Callback readRequest = client.sendRequest(new Request(0, args[1])); //read request
System.out.println(readRequest);
break;
case 3:
Callback writeRequest = client.sendRequest(new Request(1, args[1], args[2])); //write request
System.out.println(writeRequest);
break;
default:
}
}
}
}
Display More
usage:
Quotejava -jar JOpenShowVarCMD.jar IP_address Var [SetVarValue]
or create a Widows bat shell "kukavar.bat" to execute it
Quote@echo off
java -jar "JOpenShowVarCMD.jar" %1 %2 %3
Quotekukavar IP_address Var [SetVarValue]
or write the IP address to the .bat file to simplify the input command
Quote@echo off
java -jar "JOpenShowVarCMD.jar" 10.1.10.128 %1 %2
of course, at first, you should run kukavarproxy.exe on the krc4, the kukavaproxy you can download it from http://amo.hials.no/mechatronics/i…ch/robotic-arms or https://github.com/aauc-mechlab/jopenshowvar
QuoteKUKAVARPROXY 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.
tested @ kss8.2