I’m currently working on a similar project
I have an In-Sight 2800 Vision Sensor (COGNEX) and a UR10 (Universal Robots), and I want to inspect a few points of a part. To do this I need to trigger the camera in each point.
I’m using Ethernet/IP to communicate between both devices.
I will attached some images, so you can see what I have already done.
I opened the connection, and when I run the program It’s TRUE, but I didn’t managed to trigger the camera.
I also tried to use Telnet over the camera, and use the native commands. And I tried to sent them with my pc ant it triggers the camera. When I try to communicate with the robot it doesn’t work. I used socket commands in the URscript.
The camera and the robot work both as a Slave on a TCP/IP. So we needed to use a Telnet server, making the camera the server of the communication.
This is because the camera already have this option embedded.
Now the port used is 23, and to establish the connection a Loop cycle is made, to ensure the connection is “True”. To communicate with the camera, her native commands were used.
The next problem I faced, was sending strings to the camera for example, the trigger command.
As it turns out, telnet requires not only a newline \n, but also a carriage return \r right before hand. Being so, every time we want to send a string "socket_send_string(“SW8”), we need to send two bites:
socket_send_byte(13) and socket_send_byte(10). This is the only way to allow the camera to read the strings.
After figuring out all this, it ways straight forward to program de robot!