I am building a URCap that employs an outside pc running java as the programming language.
I need to check the following robot states;
- Program Loaded - Program Running - Program Paused - Program Stopped
2)Safety States: Normal - Protective Stop - Emergency Stop.
The external pc needs to check the robot Program and Safety State, enable action and then recheck the states during execution and finally close the socket upon external completion.
I have used the Dashboard Server for this purpose successfully but there is a lag in continuous checking that can be up to 30 seconds before a condition change is registered.
I then tried RTDE based on the URCaps sample Get Robot Data posted by jbm on 1 sept 17. I downloaded the com.ur.urcap.sample.getRobotData.tar. I opened the java class "getRobotRealtimeData.java and changed line 17 from “private String TCP_IP = “127.0.0.1”;”
to “private String TCP_IP=“192.168.120.60”;”
I ran the program and got the output from the System.out.println statements. Also, I can read individual lines of the RealtimeMessage[] array using the following statement;
"System.out.println("array line 38= “+RealtimeMessage[38]);”
I think that I have narrowed down what I need but would like to get some verification.
I performed 5 trials and read the array for each of the 5 trials. Each trial had a different robot condition which is the header above the index values and the output is as follows;
My question is this: What is the array index value for program state ( loaded-running-paused) and what is the array index value for safety state ( normal-protective stop - E-stop - fault)
In the alternative; What is the proper java syntax for building a query of the program and safety status using port 30004? I have no issue opening a socket so all I really need is the proper java syntax to poll the robot for it’s state.
Sorry for the long question but I wanted to be specific and show the steps I have taken.
I appreciate any help that might be given on this topic,
Jerry Stokely