MODULE Module1
!***********************************************************
!
! Module: Module1
!
! Description:
!
!
! Author: Administrator
!
! Version: 1.0
!
!***********************************************************
TASK PERS tooldata tool100 := [TRUE,[[0,0,0],[0,0.70711,0,0.7011]],[1.3,[0,0,150],[1,0,0,0],0,0,0]];
VAR robtarget P100 := [[1000,0,500],[1,0,0,0],[-1,0,-1,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
VAR num posedatab{7};
VAR bool okb;
VAR pos pos1b;
VAR num Eangle{3};
VAR string strtrans;
VAR string strrot;
VAR string str;
VAR string PC_adressb;
!IP??????
VAR string IRC5_adressb := "127.0.0.1";
CONST num pro_portb := 8855;
VAR socketdev server_socketb;
VAR socketdev client_socketb;
VAR socketstatus statusb;
VAR num peek_valueb := 65;
VAR num p:= 5;
VAR pose objectb;
VAR string str_datab;
VAR string str_databb := "[1,1000.1,0.2,300,3,0,90,0]";
VAR num retry_nob :=0;
PROC main()
intialb;
MoveAbsJ [[0,0,0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]] \NoEOffs,V300,z50,tool0;
!????
WHILE TRUE DO
str_datab := "[1,1000.1,0.2,300.03,0,90,0]";
TRAN;
SocketSend client_socketb\str:=str; !????,??????P19???,????????
Receivedatab; !????,???????,??????
Moveitb;
ENDWHILE
socketclose server_socketb;!??
socketclose client_socketb;
ENDPROC
PROC Moveitb() !??
IF posedatab{1}=1 OR posedatab{1}=2 THEN
MoveJ P100, v100, fine, tool100;
ELSE
MoveL Offs(P100, 200, 0,0), v100, fine, tool100;
ENDIF
ENDPROC
PROC TRAN()
Eangle{1}:= Eulerzyx(\X,P100.rot); !?????????
Eangle{2}:= EulerZYX(\Y,P100.rot);
Eangle{3}:= EulerzYX(\Z, P100.rot);
strrot := ValTostr(Eangle);
strtrans:= Valtostr(P100.tr