PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

why does RT target switch shared variable to single writer

I have a VI running on a RT Target and I want to control the sequence of processes it runs from the PC Host.  I have setup a Shared Variable (SV) to tell the Target which process to execute.  However, as long as the VI is running on the Target, I can not change the value of the SV from either my VI running on the Host or from the Distributed Systems Manager (DSM).  On the Host I get a error (-2147024891) saying I do not have access to the SV.  On the DSM, it just refuses to set the SV to a value I specify.  I make sure that the properties for the SV have 'single writer' disabled, but when the VI on the Target runs, it becomes enabled.  I have setup other SVs to share data between my Host and Target and do not have these problems.  Any suggestions for troubleshooting?

0 Kudos
Message 1 of 9
(4,260 Views)
What data type is the variable you are using?  Is the library containing the variable hosted on the RT target or the host computer?  Can you create another project and share a variable of the same data type between your target and the host PC?
Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 2 of 9
(4,239 Views)
I am using a U16 and the SV library is hosted on my PC Host
0 Kudos
Message 3 of 9
(4,232 Views)

additional information ...

 

When I try to edit this SV from the DSM I get an "Invalid Configuration" Error:

 

"The followng features present in the variable configuration are either not licensed or cannot be edited outside of LabVIEW: 

Real-Time Features

Would you like to remove these features from the configuration?"

 

I do not get this error when I try to edit this SV library from the Project Explorer.  This error only happens for DBL and UInt32 data types but not for Boolean or Arrays.

 

I noticed that when I used this same SV library in a different project, using the same target and host, the SV giving me the problems does not appear in the SV library file.

0 Kudos
Message 4 of 9
(4,209 Views)

Hello faustina,

 

Are you using DSC?  Also what version of LabVIEW are you using?  Do you have logging enabled on the shared variable.  If you create a new variable (DBL or U32) in the same library, leave all the settings default, do you see the same error?

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 5 of 9
(4,197 Views)
I do not have DSC loaded on any of my machines.  I'm running LabVIEW 8.6.1.  I very sure logging is disabled on the shared variable.  I didn't find where to enable it.
0 Kudos
Message 6 of 9
(4,178 Views)
If you create a new variable (DBL or U32) in the same library, leave all the settings default, do you see the same error?  I want to see if this behavior is contained within one variable or one library or even on RT target.
Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 7 of 9
(4,171 Views)
I've added a new DBL type shared variable (SV) to the same library using all the default settings.  Everything works fine.  I can modify the SV both from the DSM and programmatically from my VI on the Host.
0 Kudos
Message 8 of 9
(4,147 Views)

faustina,

 

I am not sure why we are receiving the error you have described only on certain variables.  I think the easiest way to resolve this issue will be to replace the "broken" variables with new variables that you have proven to work

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 9 of 9
(4,133 Views)