From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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 Listen.vi delaying the application

Solved!
Go to solution

Hello,

 

I'm having a problem using the SubVI "TCP Listen.vi".
I need to connect my client to the server (which has the Sub VI in question) however I can't stop the app that is running in the server just to wait for the client to connect, the client needs to connect to the server at any time without delaying or stopping it.

 

I'm attaching two VIs, to exemplify what I'm saying.
The first (main) one is called "testing", which has the other SubVI "Aguardar Cliente" (waiting client in portuguese).
What I want to do is to click "Connect" without stopping the Random Number Generator.

 

Does anyone knows how to do it?

Download All
0 Kudos
Message 1 of 4
(2,729 Views)
Solution
Accepted by topic author Matrod

You will need a parallel task that waits for a client to connect. Once connected if you need to process that connection and wait for other connections you will need to spawn a handler task. Look for Calling Dynamic VIs in the example to see how you can accomplish this.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 4
(2,719 Views)

Thank you Mark!

That dynamic VI calling is exactly what I needed!

If I could I would give you 100 Kudos! Haha

 

Thank you again,

Matt.

0 Kudos
Message 3 of 4
(2,712 Views)

Hi Mark,

 

          I'm also facing the same problem when I use the tcp listen vi in my rt application, can u pls tell me exactly how u solved the problem and where to find the dynamic VIs.

 

Thanks,

Vishwas 

0 Kudos
Message 4 of 4
(2,621 Views)