LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

running multiple vi instances and datasockets

Hi,

 

I have an application that may need several instances of one VI running. I am using Datasockets to transfer data and control other VIs. Is there a way to differentiate the same datasockets running on the different instances of the same VI?

 

 

 

Thanks,

 

Michael

0 Kudos
Message 1 of 2
(2,568 Views)

Good Afternoon Michael,

 

Datasockets are simply sending data using the TCP/IP protocol; your packets are just data sent out from a port.  As such, there is no default method to determine from which program/VI/instance of the same VI data was sent.

 

You can incorporate some kind of tag with your data which identifies the source of the data and simply parse that information out on the receiving end.  An easy way to identify different instances of a sub-VI is to include an additional control on the VI and its connector pane.  In this case, each instance of the VI will have a special identifier which can be passed along with the data to send.

0 Kudos
Message 2 of 2
(2,530 Views)