From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using OOP across multiple platforms – how to manage platform-specific functions

I am writing OOP software that acquires data from many cRIO chassis and transmits that information to a remote machine. For testing purposes, we want some of the cRIO chassis to be “Real” and the rest “Simulated”. My project consists of a Parent cRIO chassis class, along with two child classes (Real cRIO and Simulated cRIO). There is also a Parent cRIO method, along with numerous subVI parent and child methods (all with Dynamic object inputs/outputs).  Each instance of a cRIO object is created by taking the Parent cRIO method and wiring into it either a Real or a Simulated class. Real instances use child methods that call RT functions, and Simulated instances use functionally-equivalent child methods that avoid RT function calls.

 

The software is fine as long as the real and simulation instances are directed to RT targets. However, I would like to direct the simulation instances to a Windows target; when I do so, I get complaints about RT functions being called on the Windows target. Is there a way to configure my Project so that the compiler will allow my Simulation instances to run on a Windows machine?

 

Thank you for any assistance you can offer.

0 Kudos
Message 1 of 2
(1,898 Views)

Just throwing this out there, not sure, but have you tried "disable autodeploy variables" on the crio units within the project?  

 

 Also, another thing you could try is wrapping your cRIO functions in a conditional structure and check for a targettype== RT.   I'm not sure if this helps but two thoughts i had.

 

 

G/L  

0 Kudos
Message 2 of 2
(1,891 Views)