Cognex socket communication problem!
JMI
✭
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
0
Comments
-
Try! Send the UsernameSocketSend ComSocket Str:="adminDA";Thomas H. Johnston
PACs Application Engineer0 -
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings