Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66830

Change Target of Shared Variable Library Programmatically

$
0
0

I have an Real-Time project with code that runs on both a Host PC and a cRIO that communicate using a library of shared variables on the cRIO. I am hosting the variables on the cRIO because that has worked much better than hosting on the Host PC. For normal operation, this structure works perfectly.

 

However, I am now trying to implement a system that will allow the user to choose if they want to actually run the code on the cRIO or run a simulated system. The simulated system would be located on the Host PC so it makes sense for this application for the variables to be located on the Host PC.

 

To account for both of these cases, I would like to change the target of the shared variable library depending on whether the Real-Time system is being run or if the simuation is being run. I can do that easily manually by just dragging the library in the project explorer but would prefer to automate this process.

 

In short, I am looking to develop code which will change the target of a shared variable library.

 

I have tried doing this by opening a reference to the project file, using properties to get the reference of the library, and changing the target. However, the target property is read only. Is there another way to go about doing this or am I stuck having to do this manually? 


Viewing all articles
Browse latest Browse all 66830

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>