LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global variables can only be accessed from local machine

Solved!
Go to solution

While trying to use RT Project, I can deploy the the file on the RT  target and communicate with the host using a shared variable.

 

But the Host VI file returns an error mentioning that the shared variable in the Host VI block diagram is illegal.

(RT.lvib\Link reqd\"shared variable" node is illegal)

 

Also it gives a descriptions mentioning that Global variables can only be accessed from local machines.

 

What is the remedy?

 

 

 

 

0 Kudos
Message 1 of 15
(4,006 Views)

Are you using global variables (global to an application instance) or Shared variables (network enabled variables)?

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 15
(4,002 Views)

I am using Global shared variables for the application instance.

 

0 Kudos
Message 3 of 15
(3,998 Views)

I am not sure if this is the solution to your problem, but have you considered using a "Functional Global Variable". Since it is a regular SubVI, the RT system should not have an issue.

http://decibel.ni.com/content/docs/DOC-2143

0 Kudos
Message 4 of 15
(3,971 Views)
I misunderstood your problem. Since you have two seperate systems, I am not sure how functional global variables will work. Sorry for the goof up 🙂
0 Kudos
Message 5 of 15
(3,960 Views)

There seems to be a file called RT.lvlib which is required for shared variables. When, I deploy the Real Time  target VI , it deploys fine, but whenever I try running the Host VI after this step, I get a message asking me to " save or not save " changes of RT.lvlib.

 

I am not sure what this exactly means but is this related to the problem I am having?

0 Kudos
Message 6 of 15
(3,941 Views)

I am using a single process shared variable on RT target but on the Host VI, the problem seems to stem from not being able to read this variable.

 

Hence the message of not being able to access. Any solutions?

0 Kudos
Message 7 of 15
(3,927 Views)
Solution
Accepted by Shan21

 Hi Shan21,

 

I think your issue with communicating between the RT target and the Host PC could be caused by how your deploying your variables. Please take a look at the following and let me know what you think,

 

Kind Regards,

 

******************************************************************************************************************************************

 

When you make an executable of a project using shared variables, you must have a local copy of the variables on the deployment machine which are then bound to the 'real' shared variables stored on the target - cRIO in this case.

This means your Project View would look something like this:



Note: Two libraries, which can have variables with the same name as they are not both on the local machine.

The steps required are:

1. Create shared variables in the normal manor on the cRIO:



a. Right-click on target 
b. New>>Variable
c. Variable Properties enter Name (stop); Data type (Boolean) and Variable type (Always Networked-Published).

2. Create shared variables on the Host PC: 
a. Complete steps 1a-c
b. Right-click Enable Aliasing Checkbox



c. Bind to PSP URL, click Browse - and select variable on target:



d. Click Ok.

Note: Also remember to deploy the shared variable llb manually. See related link for more information.

 

This is all from a KnowledgeBase to be written soon. 

 

Note:KnowledgeBase 3UCBHM8T: How do I deploy Network Shared Variables from a Compiled Executable

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 8 of 15
(3,925 Views)

Dear Hillman,

 

Your images are not visible and are cross marked. Could you please attach as .png files? Thanks

 

[Edit: It may be due to browser issue. Am using Internet Explorer 8.] 

 

Mathan

Message Edited by mathan on 11-05-2008 06:04 AM
0 Kudos
Message 9 of 15
(3,914 Views)

Hi Mathan,

 

Thanks for letting me know.

 

They are visable to me in Firefox..

 

Here they are! zip folder of 4 x JPEGs

 

Kind Regards,

Message Edited by Hillman on 11-05-2008 12:13 PM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 10 of 15
(3,909 Views)