From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Shared Variable Engine on Windows PC w/o full install of LabVIEW

I have the NI Developer Suite (8.20) and need some conformation before I get too deep in a project. 

First of all, it is my desire to become very efficient on develop compiled executables with LabVIEW 8.20 as my NI Developer Suite license allows me to deploy these programs to any number of machines without facing copyright infringement.  I have been successful with this to a certain degree, but am still having problems in the testing stages of my application especially in cases where the hardware I am trying to target does not exist on my developing station.  If anyone can point me to white papers that would help me get the mindset to develop in this way, I would appreciate it.

Onto the topic of this post:
I am just scratching the surface of the shared variable interface that is available in LabVIEW 8.2.  My project involves two computers where both of them need to share variables back and forth from each other.  I've been reading everything I can get my hands on and I am having a hard time answering my unlying question: Is it possible for both of these machines to be running compiled LabVIEW programs and still manage the shared variables between them?  That is to say, can one of the machines have the Shared Variable Engine running on it as a Windows service, or compiled into my application executable.

I've read that I can access shared variables from my compiled LabVIEW application through NI-PSP.  I am wondering what my limitations would be sans-LabVIEW installation other then the troubleshooting head ache you get from developing applications without direct access to the hardware.

Thank you for your time and submissions.

-Nickerbocker
0 Kudos
Message 1 of 17
(7,831 Views)
I hate to bump this thread (but it is already on the 4th page).

I would really like some conformation on what it is I am trying to acomplish with Shared Variables.  A "yes you can do this", or "no you should consider a different strategy" is all I am looking for with this post.  Any extra info is iceing on the cake.

Thanks!
-Nickerbocker
0 Kudos
Message 2 of 17
(7,819 Views)
Hi Nickerbocker,

I hope you are doing well today! What sort of hardware are you trying to target? If they are just NI-DAQmx devices, then you can simulate those devices in Measurement and Automation Explorer (MAX). If you visit MAX Help, you should be able to search for 'simluated devices' and find links for Creating NI-DAQmx Simulated Devices, Importing a Physical Device as an NI-DAQmx Simulated Device, Importing an NI-DAQmx Simulated Device Configuration onto a Physical Device and Removing NI-DAQmx Simulated Devices.

Yes, its possible for two machines to run compiled LabVIEW programs and still manage the shared variables between them. And thats because shared variables are managed using a seperate Shared Variable Engine. More information on NI-PSP can be found here:
NI-PSP Networking Technology


Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 3 of 17
(7,816 Views)
Adnan Z,

Thank you so much for your reply.  Yes all devices are NI-DAQmx devices and I am currently educating myself on simulated devices within MAX.  That is excellent.

Thank you for conformation on the shared variable engine.  There is an abundence of information on the subject within NI's web site but I was having a hard time finding a direct answer to my question which you have now provided.  I will now continue my research into what is possible and I must go about my development needs.

I have had LabVIEW 8 since its release and have used it quite a bit.  I am always surprised at its capabilities.  You know, it is funny to look at how I began programming in it and now how I address the same programming issues by leveraging what is prefab in v8 of LabVIEW.  My first programs were beasts!  Now they are all clean as I learn tricks along the way.

-Nic
0 Kudos
Message 4 of 17
(7,813 Views)
Hi Nic,

I am glad you are enjoying programming in LabVIEW. You should consider our NI Training Courses and Certification Exams which would help  you become a faster and efficient LabVIEW programmer. Good luck and have a great day!
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 5 of 17
(7,808 Views)
I would love to do that if my boss would give me the time to go and do that.  Unfortunetly I have about 100 projects that I'm working on and/or managing (a little exagerated...but kind of not exagerated too).

Can I become certified w/o the class and just by taking a test?  The company I work for loves our resumes to be loaded as that is what attracts clients to us.  If I can leverage it as a resume filler I may be able to find time/money/approval.
0 Kudos
Message 6 of 17
(7,803 Views)
Hi Nic,

You don't need to join the classes in order to take the test, but it is highly recommended.

Message Edited by Adnan Z on 02-15-2007 02:20 PM

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 7 of 17
(7,797 Views)
I am trying to get the "Shared Variable Client - Server" project example compiled so that both the server and client vi's can be run as executables on a standalone machine.

I have created 3 build specifications:
1. "My Server" which is the compiled EXE of the server.lvib.  Added that entire library to the source.
2. "My Client" which is the compiled EXE of the client.lvib.  Added that entire library to the source.
3. "My Installer" which is the installation package of the vi's and NI supporting software.  In the additional installers I have added:
 * NI DataSocket
 * NI LabVIEW Run-Time Engine 8.2
 * NI Measurement & Automation Explorer 4.1
 * NI Variable Engine
 * NI Variable Manager
 * NI-DAQmx 8.3

Some of those are added for future needs.  Installed the package on my target machine and run the server executable it appears to run fine but I get various error messages from my client.exe package (which I won't go into detail here, yet).  Upon stopping the server I get the message "LabVIEW: (Hex 0x8BBB0005) Unable to locate variable in he Shared Variable Engine.  Deployment of this variable may have failed."

I check the services running and see that the "National Instruments PSP Server Locator" and the "National Instruments Variable Engine" are both in the list and "Started."  I open up the Variable Manager that has been installed on my target machine and manually add the "waveform" and the "command" variables under a process I call "server" and start the process.  After that I start my server.exe that I have compiled from the server.lvib library.  The process gives no error messages until the stop button is pressed, and then I receive the message "LabVIEW: (Hex 0x8BBB0011) The connection to the server was disconnected."

The compiled programs run fine on my development machine as well as the uncompiled VIs within the LabVIEW development enviornment.  Something tells me that I simply do not have the Variable engine properly configured on my target machine.  Also, the process and variables should automatically be populated under "Local System" in the Variable Manager, right?  I do not need to add them manually, or do I?

Thanks for your input!
-Nickerbocker
0 Kudos
Message 8 of 17
(7,739 Views)
I have found this article here on deploying variables from an executable:

http://digital.ni.com/public.nsf/websearch/04D9A85B6967EE87862571140065EEC6?OpenDocument

I am not sure about the Lib Path input.  I have browsed to my server.lvlib that contains the shared variables but from within LabVIEW (on the development machine) I get the error "An input parameter is invalid. For example if the input is a path, the path might contain a chacter not allowed by the OS such as ? or @."

I'm feeding a constant path as the input parameter of the Lib Path and it looks like: "C:\Program Files\National Instruments\LabVIEW 8.2\examples\Shared Variable\server.lvlib" which I browsed to using a dialog box (right-click->browse on the constant) so I do not see how it could be invalid.  I have also entered my local machine's IP address for the Target IPAddress.  Would a machine name be sufficient for this "Target IPAddress" parameter.  I'd hate to have to call IT and setup some DHCP reservations if the IP can be resolved from the computer name.

As for this Lib Path parameter...umm... assuming that I do get it to work, what happens once it is compiled and I deploy to my target machine?  Will I have to make the path dynamic and include the server.lvlib in my target application's working folder in order to get these variables deployed?

Thanks for your input.
-Nickerbocker
0 Kudos
Message 9 of 17
(7,734 Views)
Attached is an image outlining my modifications and error result.  I have since added an indicator that tells me if the file path exists and the indicator shows "true" but the error message indicates to me that I have an invalid path (or something).

0 Kudos
Message 10 of 17
(7,725 Views)