From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dsc shared variable list from remote computer?

Hi I've been using the Get Shared Variable List.vi from the engine control pallete.  This only seems to run correctly on the host computer.  I need to get the shared variable list from a remote computer as part of a monitoring program.  Can anyone help me with an example of how to get a shared variable list from a remote computer?  I'm using Labview 8.2.0.  Thanks!
 
Eric Nelson 
0 Kudos
Message 1 of 11
(22,974 Views)
Hi Eric,

As you've seen, the DSC VIs will only work on the local PC that has it (unless you have the DSC Run-time engine and have built an executable). So, you could either build an executable in that fashion, or...

You could use VI server from the local PC to the remote PC to retrieve the names/values of the shared variables.
-Sam F, DAQ Marketing Manager
0 Kudos
Message 2 of 11
(22,954 Views)

If i build an executable with DSC support, and install it on a PC wich has the DSC runtime system too...

Will i be able to use Get Shared Variable List, even if the variables have been deployed on another PC?

0 Kudos
Message 3 of 11
(22,497 Views)
Hi Snamproge,

As indicated in the help for "Get Shared Variable List.vi", this returns the shared variables on the host computer only. Like I mentioned above, if you wish to see the variables on another PC, you could use datasocket browse URL, or if you had a LabVIEW VI running on that other (non-DSC) pc, you could use VI server to get a list of the front panel controls that were bound to shared variables, for example.

Hope that helps,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 4 of 11
(22,387 Views)

Thank you.

You said "unless you have the DSC Run-time...", hence my question...

0 Kudos
Message 5 of 11
(21,833 Views)

I have the DSC also so I believe I have the run time support.  The point is not if I can write to a particular shared variable.  I do that without any issues.  What I'm looking for is a way to rapidly query a complete list of shared variables from the host machine in the form of an array or cluster.  I will use the list as a list for reading value change notifications, in a state machine, or whatever.

Eric Nelson

0 Kudos
Message 6 of 11
(21,302 Views)
Hi Eric,

>I have the DSC also so I believe I have the run time support.

Not necessarily. The DSC Module and the DSC Run-time System are separate items ( http://sine.ni.com/nips/cds/view/p/lang/en/nid/1012 )

Assuming you have the run-time system, you can use it to get a list of variables, just as you can on a PC with the module itself.

If the system from which you are trying to get variables does not have the run-time system, the best method would to use VI server to list all of the variables that are included in an lvlib file (which you would need to keep track of anyways on your remote machine, as you must deploy them programmatically).

I've attached example code to list the shared variables in a given library.

Please let me know if I can help you further!

Best regards,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 7 of 11
(21,186 Views)

Sam,

Is the run-time system only for compiled executables?  I have the full DSC 8.2 Module installed on both machines.  The NI DSC product page you link to seemed to indicate that the run-time system is only for building DSC enhanced executables.  I can't find any documentation on the NI site stating otherwise.  Is there any detailed documents on the DSC runtime system that you can point me to before I shell out another $600?

Thanks,

Eric Nelson

0 Kudos
Message 8 of 11
(20,789 Views)
Hi Eric,

I didn't mean to be ambiguous or confusing. The DSC Run-time System provides the logging, alarming and security functionality for -Executables- when the target system does not have the LabVIEW development environment + module.

Since you have the DSC Module on the second machine, you do not need to purchase a Run-time license for that system.

Best regards,
Sam
-Sam F, DAQ Marketing Manager
0 Kudos
Message 9 of 11
(20,777 Views)

I have two PCs with the DSC modules installed so I should be able to read the list of published variables for one machine to the other?  BTW, my machines are not on the same subnet.  From one machine I wish to query the shared variables on the other.    How do I do this?

Thanks for the VI Server method and example vi.  I would like to query directly.

Thanks,

Eric Nelson 

0 Kudos
Message 10 of 11
(20,769 Views)