LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulated device

Hi,
 
I am developing an application using NI-USB 6211.
 
I would like to create the VI's without having the card with me.
 
I know I could do a virtual channel with MAX, but my card is not on the list that I can create...
 
What could I do?
 
Thank you very much,
 
Jack
0 Kudos
Message 1 of 11
(3,660 Views)
You could create a 'stub' (a dummy vi) that simulates the I/O, but doesn't even use virtual channels.  Create one VI that simulates reading the inputs and one that simulates toggling the outputs.  When you get the actual hardware, just replace the dummy vi(s) with the real ones.   

The easiest way to do a mass-replace is to close the main vi, rename the dummies, rename the real vi(s) as the original dummy vi(s), then open the vi back up.  This way, the main vi is looking for the same sub-vi's (as far as it is concerned.)

-Mark
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 11
(3,658 Views)
One thing you can do is have all functions that actually communicate with the USB device put into sub-VIs, such as Analog Input and Analog Output, etc. If you create mirror subVIs that simulate the signals with the exact same connections, and then wire up a boolean control to a case statement that switches between the mirror subVI's and the USB subVIs, then the user can swith easily between "Simulated" data and "Actual" data. All of your other functions, such as graphing and data reporting, etc. would remain the same.

This method also works well when, for example, you need to playback previously recorded data with the exact same functions as live data.

I'd give you an example, but I don't have LabVIEW at my current location.

Robot wink


Message Edited by LabViewGuruWannabe on 01-17-2008 02:21 PM
0 Kudos
Message 3 of 11
(3,657 Views)
Jack,
 
Are you familiar with DAQmx simulated devices?  You should be able to create a simulated USB 6211, and do all of your DAQ programming using this simulated device.  To get more information on this, I would recommend you open up Measurement and Automation Explorer and go to Help -> Help Topics -> NI-DAQmx -> MAX Help for NI-DAQmx.  In this help file, search for simulated devices.  You should find the topic NI-DAQmx Simulated Devices, which should be able to step you through the process of creating simulated devices, as well as providing info on what you can do with them.
 
Hope this helps,
Dan 
0 Kudos
Message 4 of 11
(3,650 Views)
Hi,
 
Thank you,
 
I tried to create a simulated device, but the problem is that NI-USB 6211 is not in my list....How could I import it there?
 
Thank you,
 
Jack
0 Kudos
Message 5 of 11
(3,639 Views)
Jack,
 
Which version of NI-DAQmx do you have installed?  I believe that support for the USB-6211 was added in NI-DAQmx 8.5, so if you have a version prior to that, then your device would not show up.
 
You should be able to find the latest version of NI-DAQmx (8.6.1) here:
http://joule.ni.com/nidu/cds/view/p/id/950/lang/en
 
Hope this helps,
Dan
0 Kudos
Message 6 of 11
(3,631 Views)

Hi,

I have Labview 8.0 and DAQmx 8.0.

If I installe DAQmx 8.5, will my program be able to work on the computer that has Labview and DAQmx 8.0 ??

Thank you very much for this link!

Jack

0 Kudos
Message 7 of 11
(3,627 Views)

**(DAQmx 8.6.1, not 8.5)

Jack

0 Kudos
Message 8 of 11
(3,626 Views)
Jack,
 
This should work fine.
 
Dan
0 Kudos
Message 9 of 11
(3,618 Views)

Jack,

I think maybe I mis-read your last question.  Upgrading a machine that has LabVIEW 8.0 and DAQmx 8.0 with DAQmx 8.6.1 should work just fine.  Any additional computers that you run your program on will also need DAQmx 8.5 or later installed, otherwise you will not be able to use a USB-6211.

Dan

0 Kudos
Message 10 of 11
(3,615 Views)