From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp server to recieve data from a external client

we have a own developed software , it get data from some hardware and send them to a labview project to analyze and show data on some graph...

for this i used the simple tcp example (in example folder)

after run the tcp server my app will connect to it and start receiving data from the example

but after 30-40 byte of data transfer the labview example crashed and the connection lost...

 

how can i setup a simple tcp server with labview that get data from a client and just print it on a edit box?

0 Kudos
Message 1 of 3
(2,000 Views)

What sort of crash (if any) are you experiencing? Crash usually means an inrecoverable error that shuts down your program, not an error returned from one of the LabVIEW nodes!

 

And show us your code. When you want your car repaired you don't go to the mechancien and tell him about what your car does or doesn't do but you bring him your car so he can see it. Only then can he tell you what might be really wrong and what you might need to do.

 

The Simple TCP Server is usually a good starting point but as the name says it is simple. And it works with the Simple TCP Client. If your software doesn't work exactly like the Simple TCP Client, which it most likely doesn't, you need to adapt the Simple TCP Server code to match how your client works. And without knowing how your client works we can keep guessing at what you might need to do to make this work.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(1,978 Views)

thank you for your replay

when i said the tcp example crashing i mean it closed without any error

 

i created two small app to run a test

the attached file server.exe is a tcp server and the client.exe is a tcp client

this server when enabled show the data sent from client

but i have to do the same with labview

enable a listener on port 6001 and show text of all client sending..

but in official example it is reversed

the server sending data and client will show graph!

 

Download All
0 Kudos
Message 3 of 3
(1,963 Views)