Open andrewchastain opened 5 months ago
Some further information. I think a time.sleep(0.1) might be needed in some configuration between send_command() and receive_data(). My system (Windows) was not able to get the full response for GF (get file) without a pause.
The socket.recv(...) function used inside receive_data is blocking by default, meaning it waits until it receives data before returning. Adding a time.sleep could introduce unnecessary delays and potentially cause the program to miss data if it arrives during the sleep interval.
🏭🤖 In my experience working with industrial robots, even a 0.1-second delay can cause problems. For instance, with an object on a conveyor moving at 300mm/s, this delay could mean the object could be out-of-reach of the robot by 30mm.
However, feel free to add this sleep time as needed; open-source code can be modified to suit everyone's requirements. Thank you for sharing this.
This issue is very similar to some of the others presented. When accessing an In-Sight 3805 (similar to a 2800) for receiving an image the received data comes back as
b'1\r\n
for the first packet andb'[size]\r\n[data in 80 character chunks, separate with CR+LF]
for the second. All subsequent packets are data in the 80 character chunks.