Using myDAQ with NI Multisim Circuit Design Software

Publish Date: Jul 31, 2017 | 8 Ratings | 4.25 out of 5 | Print | Submit your review

Overview

The myDAQ instruments in Multisim allow you to compare a schematically captured circuit with a prototype of the same design. This document will explain how to use the NI myDAQ instrumentation within the Multisim Circuit Design software, and give you examples on its diagnostic capabilities. This document will start by showing you how to access the corresponding template for using myDAQ in Multisim. It will also introduce how you could enable or disable a specific myDAQ instrument on the template. Finally the document will present some useful examples on using the different instruments in the myDAQmx repertoire.

Table of Contents

  1. Before you start
  2.   NI myDAQ Design Template
  3. Enabling and Disabling myDAQ Instruments in Multisim
  4. Using Bode with FGEN
  5. Using Scope with FGEN
  6. Using DSA with ARB
  7. Additional Resources

1. Before you start

To replicate the exercises in this document, the user needs to have myDAQ plugged in. Also, this document requires the installation of the myDAQ Software Suite. The user should have all the components installed in this specific order: LabVIEW, Circuit Design Suite, DAQmx.

The exercises also require the use of a breadboard, a capacitor (.1uF), a resistor (1kohm), and wires.

Back to Top

2.   NI myDAQ Design Template

You can access myDAQ instrumentation in Multisim by opening the “NI myDAQ Design” template. This can be found in Multisim main toolbar at File>>New>>NI myDAQ Design

Figure 1: Launching the NI myDAQ Design Template

Troubleshooting: If you can’t find the template, reinstall DAQmx. (Multisim needs to be installed prior to the installation of the DAQmx software)

The template, once open, will have two connecting slots: the myDAQ right slot and the myDAQ bottom terminals. These will represent the actual panels or slots that are available on myDAQ.

The template allows you to draw wires connecting your captured schematic with the lines on the virtual myDAQ device, the same way you would connect your breadboard circuit to the actual myDAQ device.

                                               

Figure 2: NI myDAQ Right Slot                              Figure 3: NI myDAQ Bottom Terminals

Also, Multisim integrates NI Elvismx instrumentation within this template, allowing the users to simulate their schematic capture using familiar interfaces. Furthermore, the users can acquire real data off of their myDAQ devices and compare it to their simulated ones. The following table lists the Elvismx instruments that are accessible in myDAQ and the Multisim template.

myDAQ Instruments

Digital Multimeter (DMM)

» Learn more about using the ELVISmx Digital Multimeter with myDAQ
Oscilloscope (Scope)

» Learn more about using the ELVISmx Oscilloscope with myDAQ
Function Generator (FGEN)

» Learn more about using the ELVISmx Function Generator with myDAQ
Bode Analyzer (Bode)

» Learn more about using the ELVISmx Bode Analzyer with myDAQ
Dynamic Signal Analyzer     (DSA)

» Learn more about using the ELVISmx DSA with myDAQ
Arbitrary Waveform Generator (ARB)

» Learn more about using the ELVISmx ARB with myDAQ
Digital Reader (DIGIN)

» Learn more about using the ELVISmx Digital Reader
Digital Writer (DIGOUT)

» Learn more about using the ELVISmx Digital Writer

 

Back to Top

3. Enabling and Disabling myDAQ Instruments in Multisim

You should be able to tell whether a specific instrument is enabled or disabled by identifying the red X sign on its respective icon on the myDAQ right slot. The red X sign will mark a disabled instrument. To enable or disable an instrument, right click on the icon and click on “NI myDAQ Instrument Enabled in Simulation.”

Enabling an Instrument

Figure 4 shows you how to enable the instrument. Notice the red X mark on the side of the icon.

Figure 4: Enabling a Disabled Instrument

 

You can also enable a specific instrument by double-clicking on the corresponding icon. The instrument will pop out.

NOTE: It is important to note that Bode and Scope will not simulate any signals if the FGEN is not activated first.

Disabling an Instrument

Figure 5 shows you an enabled instrument; notice the red X mark is no longer present. Right clicking the icon will show a check mark next to the “NI myDAQ Instrument Enabled in Simulation” prompt confirming that the instrument is in fact enabled. To disable, left click on the mark to uncheck it.

Figure 5: Disabling an Enabled Instrument

Back to Top

4. Using Bode with FGEN

This section will present an example on how to use the BODE instrument in the Multisim environment. You could refer back to Using myDAQ with NI ELVIS Soft Front Panels  if you would like a more detailed review of the instrument.

 

Introducing the Example

Draw the schematic capture as shown in figure 4, and make a prototype that corresponds to it.

Follow these steps to reproduce our example:

1)      Place a capacitor (.1uF) in series with a resistor (1kohm)

2)       Connect the end of the resistor to GND, AI0-, and AI1-

3)       Connect the end of the capacitor to A0 and AI0+

4)      Finally connect AI1+ between the capacitor and resistor.

Figure 4: Schematic Capture and Prototype

Replicate these steps on a breadboard to prototype the circuit. Figure 4 shows both the schematic capture in Multisim and its corresponding prototype on a breadboard.

 

Simulated Data: the Schematic capture Simulation using Daqmx instruments

To simulate the schematic capture using BODE and FGEN, enable them as shown in the previous section of this document. Double-click the BODE instrument for its window to pop-out. Run the simulation by pressing F5 or by clicking on the run button in the menu toolbar.

 
Stop the simulation by pressing on the stop button in the menu toolbar or under >Simulate>Stop from the drop down menu.

The result of the schematic capture simulation should appear as shown in Figure 5.

The simulated data should appear in green. Note that under Instrument Control Box in the BODE window, the device should be “Simulate NI myDAQ.”

 

Figure 5: BODE Analyzer plot of the schematic capture simulation

Real Data: Data Acquistion using DAQmx instruments

After successfully simulating the schematic capture, you could acquire the real data from myDAQ and compare the results. Make sure you have stopped the simulation to be able to proceed.

Under Instrument Control, choose the device corresponding to “NI myDAQ.” Figure 6 illustrates this step.

Figure 6: Selecting myDAQ to Get Real Data

Figure 7 shows how the instrument controls become enabled when selecting myDAQ from the Device menu. The instrument controls will allow you to run, stop, and log your real data.

Figure 7: Instrument Controls Enabled after Instrument Selection

Push the Run control on the Instrument Control Box to acquire data. The time the process takes will depend on the settings chosen. For more information on choosing settings please refer back to Using myDAQ with NI ELVIS Soft Front Panels.

Figure 8 illustrates the plot of the simulated data against the acquired or real data.

Figure 8: Real Data vs. Simulated Data

Troubleshooting: Notice that the real data will appear in yellow and the simulated is green as discussed before. If any of the data does not appear, make sure that their respective plot is enabled on the bottom as shown in Figure 9.

Figure 9: Plot Enabled or Disabled Legend

Back to Top

5. Using Scope with FGEN

This section will present an example on how to use the SCOPE and FGEN  instruments in the Multisim environment. You could refer back to Using myDAQ with NI ELVIS Soft Front Panels  if you would like a more detailed review of the instrument.

 

Introducing the Example

Draw the schematic capture as shown in Figure 10, and make a prototype that corresponds to it.

Follow these steps to reproduce our example:

  1.       Connect AGND to AI0-
  2.       Connect A00 to AI0+

Figure 10: Schematic Capture and Prototype

 

Simulated Data: the Schematic capture Simulation using Daqmx instruments

To simulate the schematic capture using SCOPE and FGEN, enable them. Double-click the SCOPE and the FGEN instruments and their respective windows will pop-out. Run the simulation by pressing F5 or by clicking on the run button in the menu toolbar.

In the “Waveform Settings”, click the square wave form and change the frequency to 500hz in the FGEN instrument. Also, make sure the amplitude is equal to 10V. Check Figure 11.

Figure 11: FGEN Window

Change the Channel 0 Settings to match Figure 12: change the “Scale Volts/Div” to 5V, switch the Trigger Type to Edge, and select 1ms/Div under “Timebase.”

 

Figure 12: SCOPE Window


Stop the simulation by pressing on the stop button in the menu toolbar or under >Simulate>Stop from the drop down menu.

The result of the schematic capture simulation should appear as shown in Figure 12.

NOTE: Make sure the correct channel is enabled under “Channel Settings”. In our case, we are using AIO under channel 0. The simulated data should appear in green. Note that under Instrument Control Box in the BODE window, the device should be “Simulate NI myDAQ.”

Real Data: Data Acquisition using DAQmx instruments

After successfully simulating the schematic capture, you could acquire the real data from myDAQ and compare the results. Make sure you have stopped the simulation to be able to proceed.

Under “Instrument Control” of each instrument, select the corresponding “NI myDAQ” allowing both the FGEN and the SCOPE to access the device.

Figure 13: Instrument Controls Enabled in FGEN (left) and SCOPE (right)

Push the Run control on the Instrument Control Box on the FGEN and the SCOPE. The time the process takes will depend on the settings chosen. For more information on choosing settings please refer back to Using myDAQ with NI ELVIS Soft Front Panels.

The settings chosen while simulating the schematic capture should remain the same, and the resulting plot of simulated data vs. real data  is illustrated in Figure 14.

Push the “Stop” control under the “Instrument Control” Box on both the FGEN and the SCOPE. Also, push the “Log” control to log the file and save it as square500.txt, this file will be used for the “Using DSA with ARB” section.

Figure 14: Real Data vs. Simulated Data

Troubleshooting: Notice that the real data will appear in blue and the simulated is light green as discussed before. If any of the data does not appear, make sure that their respective plot is enabled on the bottom as shown in Figure 9.

 

Back to Top

6. Using DSA with ARB

This section will present an example on how to use the DSA and ARB  instruments in the Multisim environment. You could refer back to Using myDAQ with NI ELVIS Soft Front Panels  if you would like a more detailed review of the instrument.

 

Introducing the Example

Use the same example as introduced in the previous section.

Draw the schematic capture as shown in Figure 10, and make a prototype that corresponds to it.

Follow these steps to reproduce our example:

  1.       Connect AGND to AI0-
  2.       Connect A00 to AI0+

Simulated Data: the Schematic capture Simulation using Daqmx instruments

To simulate the schematic capture using DSA and ARB, disable FGEN and SCOPE and double-click the DSA and the ARB instruments and their respective windows will pop-out.

In the ARB window, click on “Click to Launch” under the “Waveform Editor.” Follow these instructions:

1)      Go to _File>Open to open the square500.txt created in the previous exercise.

2)      In the “Open Text File Wizard” make sure Tab is selected and change the column number to 2, Figure 15.

3)      You should be able to see the square wave. Click ok.

4)      In the “Waveform Editor”, go to _File>Save As and select “Waveform file” as the file type (‘*.wdt’). Click Next.

5)      Choose the sample rate to be 10Khz and save the file as square500.wdt, refer to Figure 16.

6)      Close the “Waveform Editor.”

 

 

Figure 15: Open Text File Wizard in the Waveform Editor; Step 2.

 

Figure 16: Choosing the Sample Rate on Saving

Enable the AO 0 and open the file “square500.wdt” that we just created. Input 10k into the “Update Rate” in the “Timing and Triggering Settings” as shown in Figure 17.

Figure 17: ARB Window

In the DSA window, set the parameters as shown in Figure 18. Set frequency span to 1khz in the “FFT Settings.” In “Averaging”, select None under Mode. Select a Hanning window with 200 resolution lines.

Run the simulation by pressing F5 or by clicking on the run button in the menu toolbar. The result of the schematic capture simulation should appear as shown in Figure 18. This process might take a little time, so be patient.

 

Figure 18: DSA Window

 NOTE: The simulated data should appear in green. Note that under Instrument Control Box in the BODE window, the device should be “Simulate NI myDAQ.”


Stop the simulation by pressing on the stop button in the menu toolbar or under >Simulate>Stop from the drop down menu.

Real Data: Data Acquisition using DAQmx instruments

After successfully simulating the schematic capture, you could acquire the real data from myDAQ and compare the results. Make sure you have stopped the simulation to be able to proceed.

Under “Instrument Control” of each instrument, select the corresponding “NI myDAQ” allowing both the ARB and the DSA to access the device.

Push the Run control on the Instrument Control Box on the ARB and the DSA. The time the process takes will depend on the settings chosen. For more information on choosing settings please refer back to Using myDAQ with NI ELVIS Soft Front Panels.

The settings chosen while simulating the schematic capture should remain the same, and the resulting plot of simulated data vs. real data  is illustrated in Figure 14.

Push the “Stop” control under the “Instrument Control” Box on both the ARB and the DSA.

Figure 14: Real Data vs. Simulated Data

Troubleshooting: Notice that the real data will appear in yellow and the simulated is in white. If any of the data does not appear, make sure that their respective plot is enabled on the bottom as shown in Figure 9.

 

Back to Top

7. Additional Resources

» Using myDAQ with NI ELVIS Soft Front Panels
» View all myDAQ Set-up and Support Documents
» Visit the myDAQ Community and connect with myDAQ users

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit