!!HELP
Hi, Am working on a Yumi robot where robot has to communicate with Labview software through Socket communication.
I made a new task(multi task) for receiving the string from labivew.
its working with a some warning, but after some time running robot goes to system failure mode with an error.
can somebody look into it and tell me what went wrong?
MODULE Mainmodule
PERS string String_Commn;
PERS string GlobalString;
PERS string Send_String:="Socket Received";
VAR socketdev SERVER;
VAR SOCKETDEV CLIENT;
VAR STRING MESSAGE;
VAR rawbytes DATA;
PERS string received_String;
PERS bool SwitchPlaced;
PERS num GOnum:=1;
PERS string commands{11}:=["Robot Home ","LH home ","RH home ","LH Base picked ",
"LH Top cover Picked ","LH Base not present ","LH Top Cover not present ","Switch picked ",
"switch not present ","Droped in rejection ",""];
PROC main()
LABview;
ENDPROC
PROC LABview()
WHILE TRUE DO
SocketCreate SERVER;
SocketBind SERVER,"192.168.0.251",9004;
SocketListen SERVER;
SocketAccept SERVER,CLIENT\Time:=10000000;
SocketReceive CLIENT\RAWDATA:=DATA\ReadNoOfBytes:=14;
UnpackRawBytes DATA,1,MESSAGE\ASCII:=14;
received_string:=MESSAGE;
TPWrite "Data received : "+received_string;
String_Commn:=received_String;
SocketSend CLIENT\Str:=Send_String;
END:
SocketClose CLIENT;
SocketClose SERVER;
ENDWHILE
ENDPROC
ENDMODULE