Jump to content

Recommended Posts

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"








Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.