LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I program without a target or device?

I am trying to write some VIs for my RealTime Target and I would like to run them without connecting to the device (it is being used).  Is there a way to create a virtual device with all the modules that I will be using in order to simulate the VI before I deploy it?

 

Thank you

0 Kudos
Message 1 of 3
(2,223 Views)

You can create a RT system in your project by selecting the Project item, then right click and select New >> Targets and Devices. This will open a dialog where you can select New target or device.

Select a system which is most comparable to your actual RT target (e.g. Real Time PXI). Press OK.

This will create a new target item in your project. Now create your VIs under this target... (Please note that you have to select the target in the project explorer first).

 

Please note that timing and determinism is different on such "emulated" system in comparison to your real RT system....

 

If you have access to your real RT system later on, just include it in your project as well (Select Existing target or device in the dialog) and drag'n'drop all needed VIs to this target (or copy them).

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(2,201 Views)

This is also a good opportunity to use the Conditional Disable structure. On your Host code, configure Conditional Disable structures for Real Time or Windows, and put the RT simulated code in the Windows condition. That way, no matter if you're in sim mode or real mode, the host code will run seamlessly.

 

An example of this is, when I send a packet of data to the RT system, I do it with (lets say) a Shared Variable, and expect a response from RT via another Shared Variable. In the Windows case of the Conditional Disable, I would just send data to a normal global, and wait for a response from another another Vi running in the background (that being the fake RT data). 

 

 

 

Richard






0 Kudos
Message 3 of 3
(2,189 Views)