8. Interrogazione Stato Robot
8.1. Ottenere Posizione Corrente Giunti (Gradi)
1/**
2* @brief Ottiene posizione corrente giunti (gradi)
3* @param [out] jPos Sei posizioni giunti ottenute, unità deg
4* @return Codice errore
5*/
6int GetActualJointPosDegree(JointPos jPos);
8.2. Ottenere Velocità Feedback Giunti - deg/s
1/**
2* @brief Ottiene velocità feedback giunti - deg/s
3* @param [out] speed Sei velocità giunti
4* @return Codice errore
5*/
6int GetActualJointSpeedsDegree(Object[] speed);
8.3. Ottenere Accelerazione Feedback Giunti
1/**
2* @brief Ottiene accelerazione feedback giunti - deg/s^2
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] acc Sei accelerazioni giunti
5* @return Codice errore
6*/
7public int GetActualJointAccDegree(int flag, Object[] acc)
8.4. Ottenere Velocità Sintetica Istruzione TCP
1/**
2* @brief Ottiene velocità istruzione TCP
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] tcp_speed Velocità lineare
5* @param [out] ori_speed Velocità orientamento
6* @return Codice errore
7*/
8public int GetTargetTCPCompositeSpeed(int flag, double tcp_speed, double ori_speed)
8.5. Ottenere Velocità Sintetica Feedback TCP
1/**
2* @brief Ottiene velocità sintetica feedback TCP
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] tcp_speed Velocità lineare
5* @param [out] ori_speed Velocità orientamento
6* @return Codice errore
7*/
8public int GetActualTCPCompositeSpeed(int flag, double tcp_speed, double ori_speed)
8.6. Ottenere Velocità Istruzione TCP
1/**
2* @brief Ottiene velocità istruzione TCP
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] speed Velocità [x,y,z,rx,ry,rz]
5* @return Codice errore
6*/
7public int GetTargetTCPSpeed(int flag, Object[] speed)
8.7. Ottenere Velocità Feedback TCP
1/**
2* @brief Ottiene velocità feedback TCP
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] speed Velocità [x,y,z,rx,ry,rz]
5* @return Codice errore
6*/
7public int GetActualTCPSpeed(int flag, Object[] speed)
8.8. Ottenere Posa Corrente Utensile
1/**
2* @brief Ottiene posa corrente utensile
3* @param [out] desc_pos Posa utensile
4* @return Codice errore
5*/
6int GetActualTCPPose(DescPose desc_pos);
8.9. Ottenere Numero Sistema Coordinate Utensile Corrente
1/**
2* @brief Ottiene numero sistema coordinate utensile corrente
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] id Numero sistema coordinate utensile
5* @return Codice errore
6*/
7int GetActualTCPNum(int flag, int[] id)
8.10. Ottenere Numero Sistema Coordinate Pezzo Corrente
1/**
2* @brief Ottiene numero sistema coordinate pezzo corrente
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] id Numero sistema coordinate pezzo
5* @return Codice errore
6*/
7public int GetActualWObjNum(int flag, int[] id)
8.11. Ottenere Posa Corrente Flangia Terminale
1/**
2* @brief Ottiene posa corrente flangia terminale
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] desc_pos Posa flangia
5* @return Codice errore
6*/
7public int GetActualToolFlangePose(int flag, DescPose desc_pos)
8.12. Ottenere Coppia Corrente Giunti
1/**
2* @brief Ottiene coppia corrente giunti
3* @param [in] flag 0-bloccante, 1-non bloccante
4* @param [out] torques Coppia giunti
5* @return Codice errore
6*/
7int GetJointTorques(int flag, Object[] torques);
8.13. Ottenere Orario Sistema
1/**
2* @brief Ottiene orario sistema
3* @return List[0]:int Codice errore; List[1]:double t_ms unità ms
4*/
5List<Number> GetSystemClock();
8.14. Interrogare Completamento Movimento Robot
1/**
2* @brief Interroga completamento movimento robot
3* @param [out] state 0-non completato, 1-completato
4* @return Codice errore
5*/
6public int GetRobotMotionDone(int[] state)
8.15. Interrogare Lunghezza Buffer Coda Movimento Robot
1/**
2* @brief Interroga lunghezza buffer coda movimento robot
3* @param [out] len Lunghezza buffer
4* @return Codice errore
5*/
6public int GetMotionQueueLength(int[] len)
8.16. Ottenere Stato Arresto Emergenza Robot
1/**
2* @brief Ottiene stato arresto emergenza robot
3* @param [out] state Stato arresto emergenza, 0-nessun arresto emergenza, 1-arresto emergenza
4* @return Codice errore
5*/
6public int GetRobotEmergencyStopState(int[] state)
8.17. Ottenere Stato Comunicazione SDK-Robot
1/**
2* @brief Ottiene stato comunicazione SDK-robot
3* @return state Stato comunicazione, 0-comunicazione normale, 1-comunicazione anomala
4*/
5public int GetSDKComState()
8.18. Ottenere Segnali Arresto Sicurezza
1/**
2* @brief Ottiene segnali arresto sicurezza
3* @param [out] si0_state Segnale arresto sicurezza SI0, 0-invalido, 1-valido
4* @param [out] si1_state Segnale arresto sicurezza SI1, 0-invalido, 1-valido
5* @return Codice errore
6*/
7public int GetSafetyStopState(int[] si0_state, int[] si1_state)
8.19. Ottenere Temperatura Driver Giunti Robot (°C)
1/**
2* @brief Ottiene temperatura driver giunti robot (°C)
3* @param [out] temperature Temperatura
4* @return Codice errore
5*/
6public int GetJointDriverTemperature(double[] temperature)
8.20. Ottenere Coppia Driver Giunti Robot (Nm)
1/**
2* @brief Ottiene coppia driver giunti robot (Nm)
3* @param [out] torque Coppia
4* @return Codice errore
5*/
6public int GetJointDriverTorque(double[] torque)
8.21. Ottenere Struttura Stato Tempo Reale Robot
1/**
2* @brief Ottiene struttura stato tempo reale robot
3* @return Struttura stato tempo reale
4*/
5public ROBOT_STATE_PKG GetRobotRealTimeState()
8.22. Esempio Codice Interrogazione Stato Robot
1public static int TestGetStatus(Robot robot)
2{
3 List<Number> angle=new ArrayList<>();
4 angle=robot.GetRobotInstallAngle();
5 System.out.println("yangle:"+angle.get(1)+",zangle:"+angle.get(2));
6
7 JointPos j_deg =new JointPos(){};
8 robot.GetActualJointPosDegree( j_deg);
9
10 Object[] jointSpeed =new Object[] { 0,0,0,0,0,0 };
11 robot.GetActualJointSpeedsDegree(jointSpeed);
12
13 Object[] jointAcc = new Object[]{0,0,0,0,0,0 };
14 robot.GetActualJointAccDegree(0, jointAcc);
15
16 double tcp_speed = 0.0;
17 double ori_speed = 0.0;
18 robot.GetTargetTCPCompositeSpeed(0, tcp_speed, ori_speed);
19
20 robot.GetActualTCPCompositeSpeed(0, tcp_speed, ori_speed);
21
22 Object[] targetSpeed =new Object[] { 0,0,0,0,0,0 };
23 robot.GetTargetTCPSpeed(0, targetSpeed);
24
25 Object[] actualSpeed =new Object[] {0,0,0,0,0,0 };
26 robot.GetActualTCPSpeed(0, actualSpeed);
27
28 DescPose tcp = new DescPose(){};
29 robot.GetActualTCPPose(tcp);
30
31 DescPose flange = new DescPose(){};
32 robot.GetActualToolFlangePose(0, flange);
33
34 int[] id = {};
35 robot.GetActualTCPNum(0, id);
36
37 robot.GetActualWObjNum(0, id);
38
39 List<Number> jtorque=new ArrayList<>();
40 jtorque=robot.GetJointTorques(0);
41
42 List<Number> t_ms = new ArrayList<>();
43 t_ms=robot.GetSystemClock();
44
45 List<Integer> config = new ArrayList<>();
46 config=robot.GetRobotCurJointsConfig();
47
48 int motionDone = 0;
49 robot.GetRobotMotionDone(motionDone);
50
51 int[] len ={0 };
52 robot.GetMotionQueueLength(len);
53
54 int[] emergState = {0};
55 robot.GetRobotEmergencyStopState(emergState);
56
57 int comstate = 0;
58 comstate=robot.GetSDKComState();
59
60 int[] si0_state=new int[]{0}, si1_state=new int[]{0};
61 robot.GetSafetyStopState(si0_state, si1_state);
62
63 double[] temp =new double[] { 0,0,0,0,0,0 };
64 robot.GetJointDriverTemperature(temp);
65
66 double[] torque = new double[]{ 0,0,0,0,0,0 };
67 robot.GetJointDriverTorque(torque);
68
69 ROBOT_STATE_PKG pkg=new ROBOT_STATE_PKG();
70 pkg=robot.GetRobotRealTimeState();
71
72 return 0;
73}
8.23. Calcolo Cinematica Inversa
1/**
2* @brief Calcolo cinematica inversa
3* @param [in] type 0-posa assoluta (sistema base), 1-posa incrementale (sistema base), 2-posa incrementale (sistema utensile)
4* @param [in] desc_pos Posa cartesiana
5* @param [in] config Configurazione spazio giunti, [-1]-riferimento posizione giunti corrente, [0~7]-risoluzione basata specifica configurazione spazio giunti
6* @param [out] joint_pos Posizione giunti
7* @return Codice errore
8*/
9int GetInverseKin(int type, DescPose desc_pos, int config, JointPos joint_pos);
8.24. Calcolo Cinematica Inversa (Posizione Riferimento)
1/**
2* @brief Calcolo cinematica inversa, risoluzione riferita a posizione giunti specificata
3* @param [in] posMode 0 posa assoluta, 1 posa relativa - sistema base, 2 posa relativa - sistema utensile
4* @param [in] desc_pos Posa cartesiana
5* @param [in] joint_pos_ref Posizione giunti riferimento
6* @param [out] joint_pos Posizione giunti
7* @return Codice errore
8*/
9int GetInverseKinRef(int posMode, DescPose desc_pos, JointPos joint_pos_ref, JointPos joint_pos);
8.25. Soluzione Cinematica Inversa, Spazio Cartesiano Include Posizione Asse Esteso
1/**
2* @brief Soluzione cinematica inversa, spazio cartesiano include posizione asse esteso
3* @param type 0-Posa assoluta (sistema coordinate base), 1-Posa incrementale (sistema coordinate base), 2-Posa incrementale (sistema coordinate utensile)
4* @param desc_pos Posa cartesiana
5* @param exaxis Posizione asse esteso
6* @param tool Numero utensile
7* @param workPiece Numero pezzo
8* @param joint_pos Posizione giunto
9* @return Codice errore
10*/
11public int GetInverseKinExaxis(int type, DescPose desc_pos, ExaxisPos exaxis, int tool, int workPiece, JointPos joint_pos)
8.26. Esempio Codice Soluzione Cinematica Inversa con Posizione Asse Esteso
1public static void TestInverseKinExaxis(Robot robot)
2{
3 DescPose desc=new DescPose(99.957, -0.002, 29.994, -176.569, -6.757, -167.462);
4 ExaxisPos exaxis=new ExaxisPos(100.0, 0.0, 0.0, 0.0);
5 JointPos jointPos =new JointPos();
6 DescPose offsetPos =new DescPose();
7 ROBOT_STATE_PKG pkg=robot.GetRobotRealTimeState();
8 int toolnum = pkg.tool;
9 int workPcsNum = pkg.user;
10 robot.GetInverseKinExaxis(0, desc, exaxis, toolnum, workPcsNum, jointPos);
11 System.out.printf("GetInverseKinExaxis joint is %f, %f, %f, %f, %f, %f\n", jointPos.J1, jointPos.J2, jointPos.J3, jointPos.J4, jointPos.J5, jointPos.J6);
12 robot.ExtAxisMove(exaxis, 100, -1);
13 robot.MoveJ(jointPos, desc, toolnum, workPcsNum, 100.0, 100.0, 100.0, exaxis, -1, 0, offsetPos);
14 robot.CloseRPC();
15 robot.Sleep(9999999);
16}
8.27. Ottenere Esistenza Soluzione Cinematica Inversa
1/**
2* @brief Calcolo cinematica inversa, determinare esistenza soluzione riferita a posizione giunti specificata
3* @param [in] posMode 0 posa assoluta, 1 posa relativa - sistema base, 2 posa relativa - sistema utensile
4* @param [in] desc_pos Posa cartesiana
5* @param [in] joint_pos_ref Posizione giunti riferimento
6* @return Codice errore List[0]:Codice errore; List[1]: int hasResult 0-nessuna soluzione, 1-soluzione esistente
7*/
8List<Integer> GetInverseKinHasSolution(int posMode, DescPose desc_pos, JointPos joint_pos_ref);
8.28. Calcolo Cinematica Diretta
1/**
2* @brief Calcolo cinematica diretta
3* @param [in] joint_pos Posizione giunti
4* @param [out] desc_pos Posa cartesiana
5* @return Codice errore
6*/
7int GetForwardKin(JointPos joint_pos, DescPose desc_pos);
8.29. Esempio Codice Calcolo Cinematica Diretta/Inversa Robot
1public static int TestInverseKin(Robot robot)
2{
3 JointPos j1=new JointPos(-11.904, -99.669, 117.473, -108.616, -91.726, 74.256);
4 DescPose desc_pos1=new DescPose(-419.524, -13.000, 351.569, -178.118, 0.314, 3.833);
5
6 JointPos inverseRtn = new JointPos(){};
7
8 robot.GetInverseKin(0, desc_pos1, -1, inverseRtn);
9 robot.GetInverseKinRef(0, desc_pos1, j1, inverseRtn);
10
11 List<Integer> hasResut = new ArrayList<>();
12 hasResut=robot.GetInverseKinHasSolution(0, desc_pos1, j1);
13
14 DescPose forwordResult = new DescPose(){};
15 robot.GetForwardKin(j1, forwordResult);
16
17 return 0;
18}
8.30. Interrogare Dati Punti Gestione Insegnamento Robot
1/**
2* @brief Interroga dati punti gestione insegnamento robot
3* @param [in] name Nome punto
4* @return List[0]:Codice errore; List[1] - List[20] : Dati punto double[20]{x,y,z,rx,ry,rz,j1,j2,j3,j4,j5,j6,tool,wobj,speed,acc,e1,e2,e3,e4}
5*/
6List<Number> GetRobotTeachingPoint(String name);
8.31. Ottenere Valori Compensazione Parametri DH Robot
1/**
2* @brief Ottiene valori compensazione parametri DH robot
3* @param dhCompensation Valori compensazione parametri DH robot (mm) [cmpstD1,cmpstA2,cmpstA3,cmpstD4,cmpstD5,cmpstD6]
4* @return Codice errore
5*/
6public int GetDHCompensation(Object[] dhCompensation)
8.32. Ottenere Codice SN Box Controllo
Nuovo nella versione Java: SDK-v1.0.4-3.8.1
1/**
2* @brief Ottiene codice SN box controllo
3* @param [out] SNCode Codice SN box controllo
4* @return Codice errore
5*/
6int GetRobotSN(String[] SNCode);
8.33. Esempio Codice Interrogazione Dati Punti Insegnamento Robot
1public static int TestGetTeachPoint(Robot robot)
2{
3 String name = "P1";
4 List<Number> data=new ArrayList<>();
5 data = robot.GetRobotTeachingPoint(name);
6 System.out.println(name+" name is: "+data.get(0));
7 for (int i = 0; i < 20; i++)
8 {
9 System.out.println("data is: "+ data.get(i+1));
10 }
11
12 int[] que_len = {0};
13 int rtn = robot.GetMotionQueueLength(que_len);
14 System.out.println("GetMotionQueueLength rtn is:"+rtn+", queue length is:"+ que_len[0]);
15
16 Object[] dh = new Object[]{ 0,0,0,0,0,0 };
17 int retval = 0;
18 retval = robot.GetDHCompensation(dh);
19 System.out.println("retval is: "+retval);
20
21 String[] SN = new String[]{""};
22 robot.GetRobotSN(SN);
23 System.out.println("robot SN is "+SN[0]);
24 return 0;
25}
8.34. Ottenere Sistema Coordinate Utensile per Numero
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2* @brief Ottiene sistema coordinate utensile per numero
3* @param [in] id Numero sistema coordinate utensile
4* @param [out] coord Valori sistema coordinate
5* @return Codice errore
6*/
7int GetToolCoordWithID(int id, DescPose coord)
8.35. Ottenere Sistema Coordinate Pezzo per Numero
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2* @brief Ottiene sistema coordinate pezzo per numero
3* @param [in] id Numero sistema coordinate pezzo
4* @param [out] coord Valori sistema coordinate
5* @return Codice errore
6*/
7public int GetWObjCoordWithID(int id, DescPose coord)
8.36. Ottenere Sistema Coordinate Utensile Esterno per Numero
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2* @brief Ottiene sistema coordinate utensile esterno per numero
3* @param [in] id Numero sistema coordinate utensile esterno
4* @param [out] coord Valori sistema coordinate
5* @return Codice errore
6*/
7public int GetExToolCoordWithID(int id, DescPose coord)
8.37. Ottenere Sistema Coordinate Assi Estesi per Numero
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2* @brief Ottiene sistema coordinate assi estesi per numero
3* @param [in] id Numero sistema coordinate utensile esterno
4* @param [out] coord Valori sistema coordinate
5* @return Codice errore
6*/
7public int GetExAxisCoordWithID(int id, DescPose coord)
8.38. Ottenere Sistema Coordinate Utensile Corrente
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2 * @brief Ottiene sistema coordinate utensile corrente
3 * @param [out] coord Valori sistema coordinate
4 * @return Codice errore
5 */
6public int GetCurToolCoord(DescPose coord)
8.39. Ottenere Sistema Coordinate Pezzo Corrente
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2 * @brief Ottiene sistema coordinate pezzo corrente
3 * @param [out] coord Valori sistema coordinate
4 * @return Codice errore
5 */
6public int GetCurWObjCoord(DescPose coord)
8.40. Ottenere Sistema Coordinate Utensile Esterno Corrente
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2 * @brief Ottiene sistema coordinate utensile esterno corrente
3 * @param [out] coord Valori sistema coordinate
4 * @return Codice errore
5 */
6public int GetCurExToolCoord(DescPose coord)
8.41. Ottenere Sistema Coordinate Assi Estesi Corrente
Nuovo nella versione Java: SDK-v1.0.9-3.8.6
1/**
2 * @brief Ottiene sistema coordinate assi estesi corrente
3 * @param [out] coord Valori sistema coordinate
4 * @return Codice errore
5 */
6public int GetCurExAxisCoord(DescPose coord)
8.42. Esempio Codice Sistemi Coordinate e Carico Robot
1public static void TestCoord(Robot robot)
2{
3 int id = 1;
4 int rtn = 0;
5 DescPose toolCoord = new DescPose();
6 DescPose extoolCoord = new DescPose();
7 DescPose wobjCoord = new DescPose();
8 DescPose exAxisCoord = new DescPose();
9
10
11 robot.GetCurToolCoord(toolCoord);//utensile
12 System.out.println("GetToolCoord:"+id+","+
13 toolCoord.tran.x+","+ toolCoord.tran.y+","+ toolCoord.tran.z+","+
14 toolCoord.rpy.rx+","+ toolCoord.rpy.ry+","+ toolCoord.rpy.rz);
15
16
17 robot.GetCurWObjCoord(toolCoord);//pezzo
18 System.out.println("GetCurWObjCoord:"+id+","+
19 toolCoord.tran.x+","+ toolCoord.tran.y+","+ toolCoord.tran.z+","+
20 toolCoord.rpy.rx+","+ toolCoord.rpy.ry+","+ toolCoord.rpy.rz);
21
22 robot.GetCurExToolCoord(toolCoord);//utensile esterno
23 System.out.println("GetCurExToolCoord:"+id+","+
24 toolCoord.tran.x+","+ toolCoord.tran.y+","+ toolCoord.tran.z+","+
25 toolCoord.rpy.rx+","+ toolCoord.rpy.ry+","+ toolCoord.rpy.rz);
26
27
28 robot.GetCurExAxisCoord(toolCoord);//assi estesi
29 System.out.println("GetCurExToolCoord:"+id+","+
30 toolCoord.tran.x+","+ toolCoord.tran.y+","+ toolCoord.tran.z+","+
31 toolCoord.rpy.rx+","+ toolCoord.rpy.ry+","+ toolCoord.rpy.rz);
32
33
34 List<Number> weightT = new ArrayList<>();//baricentro
35 DescTran cogT=new DescTran();
36 weightT=robot.GetTargetPayload(0);
37 robot.GetTargetPayloadCog(0,cogT);
38 System.out.println("GetTargetPayload :"+weightT.get(1).doubleValue()+", "+
39 cogT.x+", "+cogT.y+", "+cogT.z);
40
41
42 robot.GetToolCoordWithID(id, toolCoord);
43 System.out.println("GetToolCoordWithID:"+id+","+
44 toolCoord.tran.x+","+ toolCoord.tran.y+","+ toolCoord.tran.z+","+
45 toolCoord.rpy.rx+","+ toolCoord.rpy.ry+","+ toolCoord.rpy.rz);
46
47 robot.GetWObjCoordWithID(id, wobjCoord);
48 System.out.println("GetWObjCoordWithID "+id+", "+
49 wobjCoord.tran.x+","+ wobjCoord.tran.y+","+ wobjCoord.tran.z+","+
50 wobjCoord.rpy.rx+","+ wobjCoord.rpy.ry+","+ wobjCoord.rpy.rz);
51
52
53 robot.GetExToolCoordWithID(id, extoolCoord);//utensile esterno
54 System.out.println("GetExToolCoordWithID :"+ id+","+
55 extoolCoord.tran.x+","+ extoolCoord.tran.y+","+ extoolCoord.tran.z+","+
56 extoolCoord.rpy.rx+","+ extoolCoord.rpy.ry+","+ extoolCoord.rpy.rz);
57
58 robot.GetExAxisCoordWithID(id, exAxisCoord);//assi estesi
59 System.out.println("GetExAxisCoordWithID "+id+","+
60 exAxisCoord.tran.x+","+ exAxisCoord.tran.y+","+ exAxisCoord.tran.z+","+
61 exAxisCoord.rpy.rx+","+ exAxisCoord.rpy.ry+","+ exAxisCoord.rpy.rz);
62
63
64 double[] weight = new double[1];//carico baricentro
65 DescTran getCog = new DescTran();
66 robot.GetTargetPayloadWithID(id, weight, getCog);
67 System.out.println("GetTargetPayloadWithID :"+ id+","+ weight[0]+","+
68 getCog.x+","+ getCog.y+","+ getCog.z);
69
70 DescPose coordSet0 = new DescPose(0, 0, 0, 0, 0, 0);
71 DescPose coordSet = new DescPose(1, 2, 3, 4, 5, 6);
72 DescPose etcp = new DescPose(10, 20, 30, 40, 50, 60);
73 DescPose etool = new DescPose(0.1, 0.2, 0.3, 0.4, 0.5, 0.6);
74 DescTran cog = new DescTran(1, 2, 3);
75
76 robot.SetToolCoord(id, coordSet, 0, 0, 1, 0);
77 robot.Sleep(100);
78 robot.SetWObjCoord(id, coordSet, 0);
79 robot.Sleep(100);
80 robot.ExtAxisActiveECoordSys(id, 1, coordSet, 1); //applica risultato calibrazione a sistema coordinate assi estesi
81 robot.Sleep(100);
82 rtn = robot.SetExToolCoord(id, etcp, etool);
83 robot.Sleep(100);
84 rtn = robot.SetLoadWeight(id, 1.5);
85 robot.Sleep(500);
86 rtn = robot.SetLoadCoord(id, cog);
87 robot.Sleep(100);
88}