LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variables not working

Solved!
Go to solution

Hello, I am posting because I am having a problem with using shared variables. I am doing a project for college and am using the DSC module for its shared variable function. The problem im having is that the shared variables are not connecting anymore. I followed a document "Getting Started with LabVIEW Datalogging and Supervisory Control Module" and managed to successfully build an IOServer and deploy shared variables as per the document. That was a few days ago. Today when I opened the same project file the shared variables would not connect. Im also having the same problem with other projects that I made during the weekend that were working but are now not working.

 

Has anyone else had this problem?

0 Kudos
Message 1 of 7
(7,331 Views)

Hello jus223,

 

I would like to offer some help regarding the problem you are seeing.  To offer better support, please reply back with the version of LabVIEW and DSC module you are using, as well as the version of the Shared Variable engine currently installed on your system.  I would also like to know your Operating System.  If you have any trouble finding this information, please mention it, and I will offer steps on a following post. 

 

The immediate question is whether you have changed anything since you last saved the project.  This could also mean changes, not only with your LabVIEW installation, but also with your OS, including security settings and firewalls.  The Shared Variable engine runs along side the LabVIEW runtime engine as a service.  Therefore, raising your Firewall settings, such as the in-built Windows Firewall, could block communication.  Please check these settings, and 'Unblock' LabVIEW related services. 

 

Do you have all your shared variables collected in your project as a library (.lvlib)?  Have you moved this library file, or any other dependency?

 

What results do you have when you try and create a new, simpler project, as a test? Do these shared variables work?

 

What error messages have you been receiving when your Shared Variables fail.  Please do not hesitate to copy and paste textual error messages, or 'printscreen' and attach screenshots.

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 7
(7,296 Views)

I've had two problems working with shared variables.

 

The variables weren't deployed yet, so they wouldn't connect.

My firewall was blocking the other computher, so they wouldn't connect.

 

 

 

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 3 of 7
(7,288 Views)

Hello George, thanks for your reply. Im running the student edition of labview 8.6 on windows vista ultimate 32bit edition. Im not sure what version of the shared variable engine or what version of DSC Im running. I managed to solve the problem by just deleting everything and starting from scratch again.  I deleted the server didtribution component files and then things seemed to start working again.

 

All the shared variables i had were in my project as a library and i hadnt touched anything so no dependencies had been moved. I wasnt getting any error up on the screen either. I tried to make a new project file with a new IOServer and a new library for shared variables but the shared variables still wouldnt work. I hadnt received any error messages on the screen, its just the shared variables wouldnt connect. First there was about a minute where the little arrow was blank and then it turned red. The error that came up when i hovered over the arrow was 0x0000002A. I dont know if this means anything to you or not. I found it very strange because i hadnt changed anything between one day and the next.

 

Anyway, to make a long story short. Thats when i decided to delete all traces of the shared variables and start again. Things seem to be ok now. Once i have you there I was wondering if you know of any way to change the directory of the server ditribution component files?

 

cheers,

 

Justin

0 Kudos
Message 4 of 7
(7,272 Views)
Solution
Accepted by topic author jus223

Hi Justin,

 

I am glad to see that you are able to working with your LabVIEW installation now. The error message 0x0000002A has only been reported in relation to communication between the shared variable engine and the OPC part of the DSC module being blocked.  This has usually been resolved by inspected the Windows Security settings for the Firewall, as discussed earlier. 

 

As for your second question, it might be best to start a new post.  However, please clarify which files you would like to move, and to what purposefully gain. Where would you like the directory to be held, and for what overall benefit?  If you hope to achieve some performance gain or similar, there may be different approaches other than moving files.

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
Message 5 of 7
(7,247 Views)

Hi George,

 

Id like to change the location of the server configuration file, the server template file, and the server support files directory. Id like to be able to put them on a usb key so i can show my lecturer the work ive done so far when i go to the next lab session and see if he can answer some other questions i have. Is this possible or am i just overcomplicating things?

 

Currently Im just reading the shared variables from the localhost. I do plan to dust off the old computer and try and read them over the network the weekend though. Have you had any difficulties with reading shared variables that are situated on a vista machine from an xp machine? Do you know of any tutorial that could show me how to read shared variables across a network?

 

cheers,

 

Justin

0 Kudos
Message 6 of 7
(7,227 Views)

Hello Justin,

 

I believe the feature you are looking for is Migration of your Configuration File. The DSC Module adds a section to the 'Tools' Menu inside LabVIEW.  You create a single .scf file which you can transfer to other machines.  Follow the steps below to perform the migration.

 

1. Run LabVIEW

2. On the main menu, navigate to 'Tools'->'DSC Module'->'Migrate'->'Configuration.

3. Follow the instructions given.

 

The Shared Variable Engine is fairly universal when it is running on a supported operating system.  The important note is to make sure that the security settings of each OS is open to communication.  Tutorials for using Shared Variables effectively are available in the Developer Zone.  An example link is below:

 

https://www.ni.com/en/support/documentation/supplemental/06/using-the-labview-shared-variable.html

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 7 of 7
(7,166 Views)