MartinMcD Posted April 15, 2010 Report Share Posted April 15, 2010 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 Quote Link to comment
MartinMcD Posted April 15, 2010 Author Report Share Posted April 15, 2010 This page is on deploying NSVs from an executable. http://digital.ni.co...C6?OpenDocument Quote Link to comment
viSci Posted April 15, 2010 Report Share Posted April 15, 2010 If you have the DSC toolkit then you can Get Shared Variable List.vi and just give it the process name (either local or remote). Without DSC you need to do it using variable engine properties: http://decibel.ni.com/content/docs/DOC-9523 Quote Link to comment
MartinMcD Posted April 15, 2010 Author Report Share Posted April 15, 2010 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/reference/en-XX/help/371361F-01/lvconcepts/usingdynvarapi/ Quote Link to comment
PaulL Posted April 15, 2010 Report Share Posted April 15, 2010 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.