11-27-2009 11:04 AM - edited 11-27-2009 11:07 AM
Is there a straight-forward way to run LV code without having hardware connected or device drivers installed?
I'd like to avoid modifying the code if I could- that's what I've done in the past.
Thanks!
11-27-2009 11:10 AM
11-27-2009 11:14 AM
I use a global flag or enum for each kind of hardware (e.g. I set Voltage Measurement to Simulated). In the code where I use the hardware, A case structure comments out the code used for the device that isn't present. In newer LV versions, I'd use a conditional disable instead of the case structure.
Felix
11-27-2009 11:29 AM
Dave,
I have doen something similar to what Schubert is suggesting -it's pretty straight-forward and is code that essentially does nothing if you are running with hardware. For DAQmx, there is a property node that probes whether devices are simulated or not that you can use for your flag. You would use this with a case structure rather than the conditional disable that Schubert's suggesting. There are some gotcha's though that you ought to pay attention to (particularly to triggers and timing. You can check out the description on this page.
Cheers, Matt
11-27-2009 11:58 AM
Thanks all.
The hardware is NI- PCI-MIO-16-E (same as PCI-6040E?). I tried to create a new device in MAX to simulate it but it is not listed. Do I need to install a driver for this card itself? I installed all three driver discs with LV8.2. I don't see a link to downloads/drivers here: http://sine.ni.com/nips/cds/view/p/lang/en/nid/10795
I am using LV8.2 but the application was written with LV7.1 and legacy DAQ. My goal here is to upgrade to 8.2 and modern DAQ. I will not be able to use the hardware throughout this process though.
Regards,
Dave
11-27-2009 12:21 PM
By legacy DAQ do you mean traditional DAQ? And if you are planning to use DAQmx ("modern" DAQ), then you will need to install the DAQmx drivers (of which this a DAQ device). I am not sure if you can simulate devices just using traditional DAQ (maybe one of these guys knows). Either way, if you are developing a DAQQmx application, you will need the DAQmx software, regardless of whether the hardware is installed or not. You can find the most recent version here:
11-27-2009 12:44 PM
Yes, traditional DAQ. I wish NI had just used v1 and v2, I always seem to be using the wrong name when referring to the different DAQ types.
Would the DAQmx drivers not have been on the LV8.2 device drivers installation CDs? Those took longer to install than LV itself- what exactly is installed from those?
Regards,
Dave
11-27-2009 12:52 PM
Should be. If you are running a Windows machine, simply go to Start->National Instruments and NI-DAQ should be visible (an indication that you have it on your machine). When installing the drivers, you do have to explicitly tell it what you want, so there is always the possibility that it is not there.
Cheers, Matt
11-27-2009 01:15 PM
What about the drivers for the PCI-MIO-16-E itself, so that it will appear in max when I create a new device (to simulate) ? I don't remember seeing a list of specific devices when installing the drivers- just support for various LV versions and different apps (visual studio or vba, vision, etc).
11-27-2009 02:23 PM - edited 11-27-2009 02:24 PM
First, confirm that you actually installed DAQmx. Open MAX and expand the software listing. Second, if you did install DAQmx, your device is listed as one you can simmulate. Expand Devices and Interfaces>NI-DAQmx Devices, right click on it and select 'Create New NI-DAQmx Device>NI-DAQmx Simulated Device. You will get the listing shown below.
There is not now nor has there ever been individual drivers for each DAQ card.