LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about data socket v.s. global variable .... why one over the other one ?

I'm kind of freshman when come to choosing the best way to have several vi sharing data. The context of my problem is the following :

 

VI_1  takes care of the acquisition and make aquired date accessible to the others 2 vi

VI_2 do some signal processing

VI_3 plot data acquiered by VI_1 and the processed ones by VI_2

 

Should I use  global variables, sockets or something else?

 

Thanks for sharing some of your knowledge?

 

Olivier 

 

0 Kudos
Message 1 of 4
(2,557 Views)

Hi Olivier,

 

To selection of the communication media it's depend on your application requirement.

There are lots of open option for you to communicate or transfer your data in LabVIEW.

Like you can use Local Variable, Global Variable, Notified, Queue etc...

All these function you can use to transfer your data within the PC.

Based on each variable property you can use the variables.

 

TCP/IP, Shared Variables, Data Sockets etc.

These function you can use to transfer data within the Network.

By using these function you can access your data from anywhere within your network.

 

All Selection is up to you which mode or method in application you required and you personally feel comfortable you can choose.

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 2 of 4
(2,553 Views)

So, in case I expect my system to grow in the future months with multi-computers sharing the data (through network), the socket may be the right way, correct? That being said and in the meantime, is there any major disavantage to use the socket (v.s. global variable) even when the sharing occures between VIs on the same computer?

 

Thanks a bunch for clarification

O

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

Hi Olivier,

 

If future couple of month your application work on multiple client then Data Socket, Shared Variable or TCP/IP all communication you can use.

In this Data Socket for your data you have to create a URL that URL specify that particular data.

The Thing to remember is that you must very clear with your create URL. In this condition your Main PC create a Data Socket Server.

and all other client side you PC work as a client so only read that particular URL to get the update of data.

More Clerification over Datasocket you can refer these manuals.

DataSocket Transfer Protocol

DataSocket

Configuration

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 4 of 4
(2,544 Views)