Problem statement:
I want to Move robot(IRB 2600) to coordinates given by computer via Ethernet using PC interface(Socket messaging).
Work done so far
On computer side :
I made a program in python which sends array of real no (x, y, z coordinates) via Ethernet. I have tested this program on PLC and it works fine.
On robot
I made a program which is at below which connect through PC using service Ethernet port and connects to computer
Problem encounter
- My Program is stuck on the Socket Receive statement.
- Socket receive have only option t receive data,rawbyte and string when I tried to use rawbyte array rd{3} it gives me error
- I can connect to controller to get my program connecting via service port only
My Program
MODULE MainModule
VAR socketdev server_socket;
VAR socketdev client_socket;
VAR socketstatus status;
VAR string client_ip;
VAR rawbytes recive_data;
VAR rawbytes send_data;
VAR rawbytes rd{3};
PROC main ()
connec;
data_transfer;
ENDPROC
PROC connec()
SocketCreate server_socket;
SocketBind server_socket,“192.168.125.1”,1025;
SocketListen server_socket;
SocketAccept server_socket,client_socket \ClientAddress:=client_ip;
ENDPROC
PROC data_transfer()
! My program is stuck at Socket recive statement
SocketReceive client_socket\RawData:=recive_data;
TPWrite recive_data;
SocketSend client_socket\RawData:=send_data;
ENDPROC
ENDMODULE
I will really appreciate if you can help me to solve this problem
Thanks