LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running code without hardware connected?

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!

 

 

Message Edited by davey31415 on 11-27-2009 11:07 AM
0 Kudos
Message 1 of 14
(4,801 Views)

Hi Dave,

 

when it is about NI devices you can simulate them using MAX.

 

When your question targets other devices I would say NO.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 14
(4,795 Views)

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 

Message 3 of 14
(4,794 Views)

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

Message 4 of 14
(4,783 Views)

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 

0 Kudos
Message 5 of 14
(4,769 Views)

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:

 

http://joule.ni.com/nidu/cds/view/p/id/1085/lang/en

Message 6 of 14
(4,754 Views)

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

 

0 Kudos
Message 7 of 14
(4,749 Views)

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

Message 8 of 14
(4,745 Views)

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).

 

0 Kudos
Message 9 of 14
(4,736 Views)

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.

Message Edited by Dennis Knutson on 11-27-2009 01:24 PM
Message 10 of 14
(4,725 Views)