LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Complete hardware simulation using LabView, Multisim, and MAX (easy answer accepted!)

Solved!
Go to solution

Hello, all!

 

Sorry, I'm new, but I've checked around for a definitive answer on this, but I'm not 100% sure.  I'm learning LabView for an upper-division Physics class.  We're using NI hardware (DAQ-MX) and a mix of lab hardware - primarily basic stuff such as voltmeters, oscilloscopes, and breadboards with simple components.  I'm also doing some work with NIM instrumentation, but that's secondary to my needs here.  So, when I'm away from school, is it possible to do a complete simulation of my classwork using LabView, Multisim (for my breadboard), and the Measure and Automation Explorer (for the DAQ-MX)?  I know that I can create a circuit and drop it into Labview, but I'm not so sure about the DAQ.  I'm hoping for something that's a "seamless" recreation of what I'm doing in class.  I can take a simple "yes" or "no"; as long as I know that it's possible, I can look for the solution.

 

Thanks for the help!

0 Kudos
Message 1 of 7
(4,428 Views)
Solution
Accepted by WashPhys

I have written "sim" VIs for many situations where I need to work away from the hardware.  I think MAX has some capabilities but you may be limited in terms of the types of signals you can simulate.

 

For my sim VIs I make a copy of the original VI with ".sim" appended to the file name.  I also modify the icon in a characteristic way to identify the sim version on the BD. This way both VI have the same connector pane and are interchangeable on the BD. Diagram Disable structure can be your friend there. Inside the sim VI I generate whatever kind of signal I want.  You can also add extra controls if needed.

 

Lynn

Message 2 of 7
(4,403 Views)

I have an easy answer and a harder answer:

 

Easy Answer

You can simulate almost any NI instrument in MAX.  Right click the Devices and Interfaces item in the left pane and select Create New...  Unfortunately, this limits you to whatever the driver designer thought would be a good signal.  It is good for simple testing, but you will rapidly run into its limitations.

 

Harder Answer

Use LabVIEW classes to make a hardware abstraction layer.  This my seem like an advanced topic for a beginning LabVIEW programmer, and it is, but it also neatly solves the problem of switching between simulation VIs and real acquisition VIs without writing a bunch of switching code.  In short, you create a LabVIEW class which has the interface you want for you data acquisition.  This can be your simulation code.  You then create a child class which has exactly the same interface, but uses the DAQmx/NI-SCOPE/NI-DMM/etc. that you really want to use.  Switching between the two is as simple as selection the class you want to use at run time.  This is a lot of info in a short time.  If you want to go this route, read the LabVIEW help on LabVIEW classes and work through the examples.  I would encourage you to do this, since the sooner you learn how to effectively use object-oriented LabVIEW, the easier your life will be.

 

As a further bit of information, most of the measurement instrument groups (e.g. NI-SCOPE, NI-FGEN, NI-DMM, etc.) allow you to simulate an instrument if you use the open with options VI instead of the standard open VI.  The inputs are rather arcane, but get the job done.

 

Let us know if you have further questions.

Message 3 of 7
(4,381 Views)
Thanks for the answers (they're both good solutions)! As long as I can do basic stuff, I'll be good. I'll use the harder answer to experiment with some ideas. I really appreciate the input. -Pat O.
0 Kudos
Message 4 of 7
(4,353 Views)

@DFGray wrote:

Harder Answer

Use LabVIEW classes to make a hardware abstraction layer.  ....


Here is a very good video that demonstrates using classes for this purpose

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 5 of 7
(4,341 Views)

do you have all solution from book using multisim troubleshooting DC/AC circuits Fourth Edition..

if you have can you tell me know Please...

Calvin Doan

0 Kudos
Message 6 of 7
(4,129 Views)

Calvin,

 

Your question really has nothing to do with the topic in this thread. The thread has been marked as "solved," which means that many people no longer pay attention to it.

 

I recommend that you post your question in the Mutisim Board.

 

Lynn

0 Kudos
Message 7 of 7
(4,120 Views)