Jump to content

Network Shared Variables - Programmatically discovering 'live' variables


Recommended Posts

Hi everyone,

I'm rewriting a data acquisition app of mine at the moment as a way of learning about implementing OO and network shared variables. The shared variables may not be the best way of implementing my solution but it as much a learning exercise.

So, my question was this:

Is there a way that my datalogger class can find out which network shared variables are currently being published from the local machine? When I place a shared variable block on the diagram I then double click to bring up the menu to select the variable that I want to read from - I am looking for a way to do this at run time.

Thanks very much,

Martin

Link to comment

Thank you for the reply. I think the problem may be that I only have LV8.2, I believe shared variable stuff was rewritten in 8.5?

Thanks,

Martin

http://zone.ni.com/r...usingdynvarapi/

Yes, I think it was about then that NI rewrote networked SVs to use TCP instead of UDP, which dramatically improved their reliability. There have been many further improvements since then. The article for which sachsm included a link actually uses an API that NI introduced in LabVIEW 2009.

The networked shared variables aren't perfect now, but they are probably three orders of magnitude better now than they were in 8.2. For anything but the simplest application (and maybe even for that) I think you might save months worth of work by upgrading, if that is any way a possibility. In my mind networked shared variables were almost unusable then, but now we successfully apply them as a major feature in every application.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.