08-04-2011 11:13 PM
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
08-05-2011 12:04 AM
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
08-05-2011 12:19 AM
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
08-05-2011 01:03 AM
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.
Thanks and Regards
Himanshu Goyal