Which is better: Polling DataSockets(UpdatedData) or Polling through VI Server 
Author Message
 Which is better: Polling DataSockets(UpdatedData) or Polling through VI Server

I need a C++ program to monitor controls in a local instance of
labview. From my research, I have found two ways:
-I can use CWDataSocket ActiveX controls and poll the UpdatedData
property for each control.
-Or I can Use the VI Server ActiveX Control and poll using
GetControlValue().

I am wondering which is the better way. Is there a performance
difference?
Any thoughts on this matter would be greatly appreciated.

-Clayton T.

P.S. I like that polling through VI Server decouples the VI control
from my polling program. (Using datasockets, you have to explicitly
setup each control to a datasocket. With VI Server, you just use the
already available control name.)



Sun, 01 May 2005 10:17:00 GMT  
 Which is better: Polling DataSockets(UpdatedData) or Polling through VI Server
Hi Clayton,

Better? Can't say.

I generally prefer the VI Server approach. No only for the reason you
mentioned but for timing purposes.

When I do the rad using VIServer, I know the value was valid sometime
between when the VI Server operation is started and when it finishes.

The Datasocket data can be quite stale if you do not bend over
backwards.

I am interested in how other feel about your quesion.

Ben



Sun, 01 May 2005 22:01:59 GMT  
 Which is better: Polling DataSockets(UpdatedData) or Polling through VI Server
Thank you Ben. I wish there was a way I could get more people to
discuss this topic. I have been wrestling with talking to this C++
program for over a week. I think I will stick with the VI Server
approach for now.

-Clay



Mon, 02 May 2005 01:47:45 GMT  
 Which is better: Polling DataSockets(UpdatedData) or Polling through VI Server
"C++" is not the most appealing topic for many LV types.

The only reason I respond is because I used to do C ( but "I got
better"). If you are willing to address the heavy hitters on this
subject, try post to Info-LabVIEW. You may get a reply from Rolf,
Greg, Jean-Pierre, or Uwe with this question.

I will keep my eyes open for your post.

In the event you do not know how to use info-LabVIEW, I have included
the contents of a recent message that will get you started.

Ben

Quote:

This is the weekly admin reminder for readers of the Info-LabVIEW
mailing
list and mail digest. (19oct01)

o  Administrative issues such as SUBSCRIPTION and DELETION REQUESTS
   MUST be addressed to the admin address, which is


DO NOT
   send subscription and deletion requests to <info-labview>.

o  This is a user list, run by and for LabVIEW users. If you have a
   commercially available item to announce, please make the
   announcement
   brief.

o  It is not, ever, acceptable to post "virus warnings" to this list.
For
   any reason.

A set of Frequently Asked Questions (FAQs) for LabVIEW are available
from
our web server at <http://www.info-labview.org/resources.html#FAQ>.

                  Tom Coradeschi, Info-LabVIEW List Maintainer

                        http://www.info-labview.org/

Un-quote



Mon, 02 May 2005 02:12:20 GMT  
 Which is better: Polling DataSockets(UpdatedData) or Polling through VI Server
Thank you very much Ben!
I shall try posting on info-LabVIEW soon.
On the "C++" issue, this is really a question on communicating
'real-time' LabView data with programs written in another language.
The system I am integrating is a legacy system, but we want to add
some new functionality in LabView, let it work, but see LabViews
variables in our system.

Thanks again,
-Clay



Mon, 02 May 2005 06:39:45 GMT  
 Which is better: Polling DataSockets(UpdatedData) or Polling through VI Server

Quote:
> The only reason I respond is because I used to do C ( but "I got
> better"). If you are willing to address the heavy hitters on this
> subject, try post to Info-LabVIEW. You may get a reply from Rolf,
> Greg, Jean-Pierre, or Uwe with this question.

You can post to info-labview if you like, but I follow both lists.

The short answer is that both of these will work.  From the LV
programming angle, you will have just a little work to do with the
Datasocket implementation -- publish the control/indicator via
Datasocket or write to a diagram datasocket node.

The VI Server solution is less work -- make sure that the VI Server is
on, make sure the machine access is correct, and make sure the VI access
is correct.

 From the C++ programming angle, both of these are going to be accessed
using ActiveX.  One uses the automation interface for Datasocket, the
other for VI Server.  The VI Server requires you to go through a few
more intermediate classes, but knowing what the VI name is, it shouldn't
be that difficult.

Greg McKaskle



Mon, 02 May 2005 11:11:46 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. SQL Server Magazine Poll "RESULTS"

2. POLL: Who are the 5 best programmers.

3. POLL: Who are the 5 best programmers.

4. Polling ports - is there a better way?

5. POLL: Who are the 5 best programmers.

6. POLL: Who are the 5 best programmers.

7. DataSocket crashes when I start my VI (with datasocket enabled controls)

8. Is there any way to run the datasocket server from the vi

9. Best method to pass high speed graph data from a VI Server called VI

10. I am looking for a VI that login and logout users to a main VI.

11. Pointer to Professional Programmers Poll

12. Poll: Please Take 2 Minutes to Answer...

 

 
Powered by phpBB® Forum Software