06-05-2010 03:47 AM
Hello,
I plan to use data socket to access SharedVariables. I started with the example Buffering.vi from the Shared_Variable_Buffering.lvproj shipped with LabVIEW 2009 SP1 (DSC-Module).
This example leads to a read buffer overflow caused by the high speed write loop and low speed read loops. The interesting part is, that reading the SharedVariable values using a SharedVariable-Node delivers a warning for that buffer overflow situation. But, the DataSocket-Read doesn't deliver any warning or error and I didn't find a way to detect the overflow. Does someone know how to get this done?
Thanks for your help.
Thomas
06-07-2010 10:11 AM
Hello Thomas,
the reading loop with the SharedVariable-Node delivers a warning, because it notices, when the write-pointer passes the read-pointer. With DataSocket you can only read the values, you have no access to the pointers. If you want to use data socket, take a look at the Shared Variable Client - Server.lvproj example. There you can get a better understanding, when and how you use data socket.
Kind Regards,
Maria Dirr
NIG AE
06-22-2010 06:29 AM
Hello Maria,
thank you for your reply.
It took a while, but today I checked out the Variable Client - Server.lvproj example shipped with the newest LabVIEW. And I was surprised to find even another possibility to interact with Shared-Variables: the new VI's contained in the DataComunication/SharedVariables palette (used by the Variable Refnum API Client.vi in the example).
And with the DSC-Module, another possibility is available: the also new VI's contained in the DSC Module/Tags palette (try the DSC Tag API.lvproj example, but don't forget to manually deploy the libs before starting the VI's).
So, plenty of possibilities available. It will take some time to realize the advantages (or disadvantages) of each one, especially for the new VI's.
Let's see what possibilities we gain with LabVIEW 2010...
Regards,
Thomas