ibbuntu Posted February 16, 2008 Report Share Posted February 16, 2008 Hi, I am using shared variables to pass messages across a network. Every time I open my project my vis are broken due to this error: "LabVIEW could not generate code for the shared variable. You must open the VI in the project that contains the library where the shared variable resides." The only way I have found to fix this error is to double click on all the shared variables on my block diagram, after which the error goes away. What's going on, and how do I stop this from happening? Thanks, Tom Quote Link to comment
PaulL Posted February 16, 2008 Report Share Posted February 16, 2008 Tom, I think I encountered the very same problem recently (depended on whether RT FIFOs were enabled or disabled, if I remember correctly). (Hopefully I'm not confusing two issues. It's possible. Let us know if the solutions below work.) NI support found the problem (and workarounds): Cause: "a race condition where the variable attempts to transmit an initial value before the read subscription to the variable has been fully established. This puts the variable in a bad state and causes an invalid error condition to be set." Workarounds: "[F]orce a read of the variable before writing an initial value to the variable." "gnore this error if it is returned by the first read of the shared variable. The error condition will be cleared once the variable subscription succeeds, and variable communication should function normally from that point on." Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.