Makrem Amara Posted May 27, 2021 Report Share Posted May 27, 2021 Hi there, I am working on a machine vision project with LabVIEW. The camera will locate some parts and send their coordinates via TCP/IP and I created a client also with LabVIEW to display these coordinates here is how the communication going. First, if the camera detects something then msg will be sent to the client to inform him. then if msg was received correctly client responds with another msg to request the coordinates. at last, the server sends the coordinates to the client. here I faced some problems 1- the msg sent are with variable length ("x=0,y=0,Rz=0"==> "x=225,y=255,Rz=5" ==> "x=225,y=255,Rz=90" length vary between 16 and 22 ) with the constant "byte to read " it will not display the full msg. 2-the client works fine but at a certain time, it shows errors like ("LabVIEW: (Hex 0x80) Open connection limit exceeded";;;;;; "LabVIEW: (Hex 0x42) The network connection was closed by the peer. If you are using the Open VI Reference function on a remote VI Server connection, verify that the machine is allowed access by selecting Tools>>Options>>VI Server on the server side" Quote Link to comment
ShaunR Posted May 27, 2021 Report Share Posted May 27, 2021 1. Standard way for variable length strings is to prepend the length. 2. The connection was closed. This can happen as part of normal communication, for example, when you press stop in loop C. This is because you will explicitly close the connection while your read loop is trying to connect or read. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.