LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamical run vi TCP connection Refumn Question?

I dynamical load some vi in my application. In a loaded vi,I build TCP connection with a instrument;then same the TCP Network Connection Refum as global.In Other loaded vis,I will use this global "TCP Network Connection Refum",but I found the TCP connection is not reused,and "TCP Write" will return error 1.
When I dynamical load vis,first "Open VI Reference",then set some input parameters,then "Run VI" method,then close the reference;In every dynamial load and run vi,i use this same sequence.
Someone give me some help?
How I keep the TCP connection open in difference dynamical loaded vi,now the golbal is not work correctly?
0 Kudos
Message 1 of 2
(2,201 Views)
Hi,

When you call a subvi dynamically, anything that is associated with the subvi goes out of scope once the reference to the subvi is closed. I would try to statically call the subvi and see if that works.

Ankita
0 Kudos
Message 2 of 2
(2,179 Views)