LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"shared variable is not allowed" error on sbRIO


Ravens Fan wrote:

One of the things mentioned in that error message was "change the type of the variable."  That is a rather unclear message.  It should at least tell you what is wrong with the "current type".

 

I did notice that you had logging turned on for that SV (which is a DSC function that got me talking about DSC functions on the cFP target).  I would try turning that off.  Perhaps play around with network settings, buffering settings, anything else that might be settable.  See if any of those changes make the error go away and you stumble on whatever it considers the "correct type".  That might give a clue as to what is going wrong.


Turning off all the DSC features (logging, the alarm, etc) makes it work but those are important features for me.

 

CLED (2016)
0 Kudos
Message 11 of 19
(1,426 Views)

InfiniteNothing,

 

We have left out an important question thus far, which version of LabVIEW are you using?

 

Also, I don't have DSC installed on the laptop I'm using, so I haven't been able to take  a look at your example code yet.   It's been a while since I've worked heavily with DSC (since I've move to focus on Single-Board RIO), but I think my previous post is accurate.  

 

I'm trying to get my hands on a machine with Real-Time and DSC installed so I can take a look at your code later today.  In the mean time, hopefully an Applications Engineer will look into it as well and chip in their observations/recommendations.

 

Say "Hi!" to M. Slaughter and J. Spinozzi at Cyth for me...

 

Cheers,

 

 

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 12 of 19
(1,414 Views)

Strange... on first inspection this looks like a bug.

 

This is not an issue with CompactRIO. I just tried it with a 9074.

 

Maybe it is disabled on sbRIO for a good reason I don't know of, but I believe the functionality is there. The sbRIO context is just not letting you place that node on the diagram.

 

Try using the programmatic read like this:

 

programmatic read.png 

 

LabVIEW can't break the VI when you use this read, so at least you can check to see if it works while running.

 

Kurt 

0 Kudos
Message 13 of 19
(1,402 Views)

I agree this looks like a bug.  We'll check in with the developers to see if there is any technical reason why DSC variables are not allowed on Single-Board RIO, and what they suggest for work arounds.  In the meantime, I think we've identified a couple work arounds.  

 

I tested the method Kurt suggests, and it does work, but you will need to replace the "localhost" address with the IP address or machine name of the host PC that is hosting the variables. 

 

I also tested binding shared variables that are deployed local to the Single-Board RIO to variables hosted on the PC.  That method also worked.  

 

To bind a share RIO, check the box on the variable page for Enable Aliasing.  Then Browse the project variable you want to bind to, and click OK.  For large applications, you can also use the multiple variable editor to create all your Single-Board RIO variables and bind them to the host URLs, or Export your shared variable list to Excel, modify them for the Single-Board RIO target, then re-import.(thjis sounds a lot more complicated than it is... 🙂 )

 

SV Binding.png

Cheers,

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 14 of 19
(1,393 Views)

When I try the aliasing I get this error from rt.vi: -1950679023 

I can't try the "Read Variable" vi (nice snippet) because currently I'm using 8.6 though I'll upgrade if I see no other option. If you could, check my attachment, to make sure I didn't mess anything up.

Message Edited by InfiniteNothing on 09-15-2009 05:54 PM
CLED (2016)
0 Kudos
Message 15 of 19
(1,378 Views)

You can also use a datasocket read VI to read your NSVs.

 

I believe the URL will be psp://computername/library/variable 

 

If you look at the Help for datasocket you can find the various data sources it can read from and their URL syntax.

 

I'll let you know if I get a chance to try your code today.

 

Kurt  

0 Kudos
Message 16 of 19
(1,361 Views)

You mentioned LabVIEW 8.6, but does it happen to be 8.6.1?  I did a quick search on the error message you are receiving, and several of the results were related to a bug in 8.6.1 shared variables which is discussed, and patched in the first two links below:

 

Shared Variable Error -1950679023 in LabVIEW 8.6.1 Forum Post

 

Patch for deployed shared variables on LabVIEW Base Development System 8.6.1 - Windows 2000/Vista x6...

 

 

Sounds like this error can sometimes also be attributed to the Windows Firewall.

 

 

 Cheers,

 


 

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 17 of 19
(1,344 Views)

Spex wrote:

You mentioned LabVIEW 8.6, but does it happen to be 8.6.1?  I did a quick search on the error message you are receiving, and several of the results were related to a bug in 8.6.1 shared variables which is discussed, and patched in the first two links below:

 

Shared Variable Error -1950679023 in LabVIEW 8.6.1 Forum Post

 

Patch for deployed shared variables on LabVIEW Base Development System 8.6.1 - Windows 2000/Vista x6...

 

 

Sounds like this error can sometimes also be attributed to the Windows Firewall.

 

 

 Cheers,

 


 


Yes I'm using 8.6.1. I will try the fix

 

CLED (2016)
0 Kudos
Message 18 of 19
(1,340 Views)

jkurtw wrote:

You can also use a datasocket read VI to read your NSVs.

 

I believe the URL will be psp://computername/library/variable 

 

If you look at the Help for datasocket you can find the various data sources it can read from and their URL syntax.

 

I'll let you know if I get a chance to try your code today.

 

Kurt  


Hmm, I used datasocket with SVs early on in the project. I can't remember why I dropped them. They seem to work well with a 0 ms timeout.

 

CLED (2016)
0 Kudos
Message 19 of 19
(1,338 Views)