ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP used in a re-entrant vi.

How can I use a vi in a loop that contains TCPIP vi's(listener nand etc.) and will not lock up the next time it is called ?
Engineering Services
Teledyne Relays
0 Kudos
Message 1 of 3
(2,740 Views)
I think the problem you are having is a timing one, all TCP/IP vi's have a timeout option, if you set it to -1, the vi will wait forever until it completes (read, write, listen...), by default, listen has a forever wait, read and write 25 seconds, you could reduce this or be sure the action occurs in a short amount of time. If you set this time to 0, the vi won't wait, but will return an error if action is not ready to be completed. If you give more info of what are you trying to do, someone could help you.
Hope this helps
0 Kudos
Message 2 of 3
(2,739 Views)
You could have problems if you are opening and closing the TCP/IP session
every time you execute the loop. Opening the refnum once and re-using it by
storing it in a shift register can help prevent resources running out in
Windows .

Hope that is your problem and solution..
"Mal G." wrote in message
news:506500000008000000421C0000-986697009000@quiq.com...
> How can I use a vi in a loop that contains TCPIP vi's(listener nand
> etc.) and will not lock up the next time it is called ?
0 Kudos
Message 3 of 3
(2,739 Views)