08-31-2015 02:39 PM
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.
08-31-2015 03:30 PM
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.
08-31-2015 04:17 PM
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.