LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions on automating switch between real and simulated hardware

I frequently do offsite development in LabVIEW, so I find myself switch between real and simulated hardware to get the application to run without an error with no real hardware connected.  Right now, I have duplicated tasks defined in the labVIEW project and I use a global variable to switch between the two task definitions. I have over-rides that I can use to generate my own simulated data when using the simulated hardware.  This works, but I'm just wondering if there is a better solution.

 

 

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

I do something similar to what you do except I store the device name in my config file.  I have another parameter for showing a user simulated data dialog.  If the device name is not present in the system, I automatically default to user simulated data, no matter what the config file is set to.  If the device is present (whether real or simulated), the output data can be real, it can be simulated by the device or it can be simulated by the user dialog. 

 

To get the list of available devices, drop a property node and Select Class -> DAQmx -> DAQmx System. From there, choose the DevNames property. 

aputman
0 Kudos
Message 2 of 3
(2,960 Views)

 Thanks, this help.  makes sense.

  I had something automatic like this once, but I had to add a pop-up dialog so that my end user would not accidentially start the application without the hardware and would think that everything was running properly.  So I provided notification that the inputs were simulated and the outputs were going no-where.

 

 

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