Hi,
I have a problem with integration of Cognex on my IRC5 controller. I used example code RAPID programming, but it’s not working. When I send username the program stops. At the moment I’m using Cognex InSight emulator, but I will have actual camera anyday soon. I tested communication to emulator with Telnet and its working!
Anyone experienced such problems? Any ideas?
*MODULE VISION* *! DATA DECLARATIONS*VAR string stReceived;
VAR socketdev ComSocket;
VAR socketstatus status;
PROC Main()
TPErase;
TPWrite “Connecting…”;
SocketCreate ComSocket;
SocketConnect ComSocket, “192.168.1.100”, 23;
SocketReceive ComSocket Str:=stReceived;
TPWrite stReceived;
! Send the Username
SocketSend ComSocket Str:=“admind”;
SocketReceive ComSocket Str:=stReceived; ! here it stucks
TPWrite stReceived;
! Send Password
SocketSend ComSocket Str:=“D”;
SocketReceive ComSocket Str:=stReceived;
TPWrite stReceived;
TPWrite “Connected…”;
ENDPROC
ENDMODULE