Table of Contents
The National Instruments Getting Started with NI-DAQmx Series is aimed at helping you learn NI-DAQmx programming fundamentals. Through video and text tutorials, this series will take you from verifying your device's operation in Measurement & Automation Explorer (MAX) to programming data acquisition applications using LabVIEW. It is intended for both the beginner who wants to learn how to use the DAQ Assistant, as well as the experienced user who wishes to take advantage of advanced NI-DAQmx functionality.
Overview
NI-DAQmx not only provides DAQ system developers a high-performance driver, it also includes many measurement services designed to increase productivity. One of the newest and most exciting measurement services added to NI-DAQmx is NI-DAQmx simulated devices. A simulated NI-DAQmx device is a replica of a device created using the NI-DAQmx Simulated Device option in the Create New menu of MAX for the purpose of operating a function or program without hardware. An NI-DAQmx simulated device behaves similarly to a real device. Its driver is loaded, and programs using it are fully verified.
This tutorial explains the basics of NI-DAQmx simulated devices, including how to create them, how to use them, as well as some considerations when using NI-DAQmx simulated devices.
Follow this tutorial using an installed copy of NI-DAQmx 7.4 or later and National Instruments application development software LabVIEW 7.x or later or LabVIEW SignalExpress Lite. If you do not own National Instruments LabVIEW 7.x or higher, you can download SignalExpress Lite to help you complete this tutorial.
Most of this information is also available in the Measurement & Automation Explorer Help for NI-DAQmx (installed with the NI-DAQmx driver). Additional information about NI-DAQmx simulated devices is in the NI-DAQmx Help (installed with the NI-DAQmx driver) and the DAQ Quick Start Guide (shipped with your DAQ device).
How to Create an NI-DAQmx Simulated Device
To create an NI-DAQmx simulated device, NI-DAQmx 7.4 or later must be installed.
2. Right-click My System>>Devices and Interfaces and select Create New... In the subsequent dialog, select Simulated NI-DAQmx Device or Modular Instrument. The Create Simulated NI-DAQmx Device window prompts you to select a device.
3. Select the device you want to create as an NI-DAQmx simulated device. With this list, you can browse the hundreds of devices supported by NI-DAQmx. You can create an NI-DAQmx simulated device of any NI-DAQmx-supported device, with the exception of the SCXI-1600 (NI-DAQmx 7.4 and later), USB-6008, USB-6009, USB-6501 and B Series devices (NI-DAQmx 7.5 and later).
Note: The more drivers you have downloaded (NI-HSDIO, NI-SWITCH etc. the more options you will have to simulate)

Figure 2. Choose from hundreds of NI-DAQmx supported devices.
An NI-DAQmx simulated device works just as a real device. You can use NI-DAQmx simulated devices to create NI-DAQmx tasks either through the DAQ Assistant or the API. Because a real device is no longer required to create an NI-DAQmx task, NI-DAQmx simulated devices allow developers to do the following:
- Begin application development and logic without hardware
- Develop application logic on a machine other than the target system
- Evaluate acquisition functionality of National Instruments software without owning any hardware
This section of the tutorial describes how to create an NI-DAQmx task using the DAQ Assistant, then use the task to acquire simulated data in LabVIEW or LabVIEW SignalExpress.
2. Create an NI-DAQmx task in the DAQ Assistant.
c. Select one or more channels from the NI-DAQmx simulated device. Both real and NI-DAQmx simulated devices are available for creating NI-DAQmx tasks, and the DAQ Assistant makes no distinction between them. If you do not remember which device is a simulated device, refer to the color of the device icon in MAX. Green icons indicate a real device, and yellow icons indicate an NI-DAQmx simulated device. Hold Ctrl to select multiple channels individually, or Shift to select a range of channels.
f. Configure the task as shown.

[+] Enlarge Image
Figure 8. You can test NI-DAQmx tasks for NI-DAQmx simulated devices for errors and view simulated data.
Note: NI-DAQmx tasks for NI-DAQmx simulated devices are verified just as they are on real devices. If a property is set to an invalid value, the error returned for an NI-DAQmx simulated device will be identical to the error returned for a real device. All resources necessary for the task, such as RTSI lines, PXI Trigger lines, DMA channels, counters, and so on, are counted and reserved for NI-DAQmx simulated devices just as they are on real devices.
h. Save the NI-DAQmx Task.
b. Select Tools»Import NI-DAQmx Task from MAX.
c. A list of the tasks contained in MAX will be populated. Select the task created in the previous section (Simulated Device Task).
d. The task settings should be the same as they were configured in MAX. Click Run in the top toolbar.

Figure 9. List of DAQmx Tasks from MAX.
e. Click Stop task.
b. Open the Example Finder by clicking Help»Find Examples.
c. Open the Cont Acq&Graph Voltage-Int Clk VI found at Hardware Input and Output»DAQmx»Analog Measurements»Voltage. This application uses physical channels explicitly entered in the physical channel control.
d. Use MAX to determine the device number for the simulated device you created. The device number is in quotes next to the NI-DAQmx simulated device listed in Device and Interfaces.

Figure 11. The device number is listed next to the device
e. Change the value in the Physical Channel control to Devx/ai0:4 where x is the device number from the previous step. Although we used the Physical Channel control for this example, some slight modifications to this particular example would also allow us to use the task previously created.

Figure 12. Update the Physical Channel control using the NI-DAQmx simulated device number
f. Run the VI.
Reading Data
- All simulated devices return analog input data in the form of a full-scale sine wave with three percent of full-scale noise.
- When multiple channels are in the task, the data for each channel is offset slightly in time.
- Digital data is returned as if each 8-bit port were counting up.
- Counter data is always returned as 0.
- Simulated devices do not simulate timing, data is always immediately available for reading.
Writing Data
- Other than verifying the data is within limits, the data written to an NI-DAQmx simulated device has no restrictions.
Timing and Triggering
- Simulated devices created in NI-DAQmx 7.4 - 8.1 do not simulate timing. Task reads and writes will be return immediately
- Simulated devices created in NI-DAQmx 8.3 and later do simulate timing. Task read and write operations will simulate the actual time they would take to complete as if they were being run on a physical device.
- Simulated devices (all driver versions) do not simulate triggering. Triggers will return immediately.
- An NI-DAQmx simulated device never issues a software event or causes a timed loop to execute.
- Watchdog timers never expire.
Non-Task Operations
- Operations such as self-test, calibration, and reset always succeed.
- Data that is normally stored on the physical device, such as serial number, is always returned as 0.
Device Is Simulated Property
To discover during the execution of a program whether a device is simulated, use the DeviceIsSimulated property on the NI-DAQmx Device property node. Open the All Functions»NI Measurements»DAQmx»DAQmx Advanced»DAQmx System Setup subpalette to find this property node. The property returns true if the device is simulated.

Figure 14. Use DeviceIsSimulated property to programmatically determine if a device is simulated.
Importing an NI-DAQmx Simulated Device Configuration onto a Physical Device
To import the configuration of an NI-DAQmx simulated device onto a physical device, use the MAX Import and Export functions. Select File»Export and follow the prompts to export the desired NI-DAQmx simulated device as an .nce file stored on the computer. Select File»Import and follow the prompts to import the previously created .nce file. Importing requires a physical device of the same type as the NI-DAQmx simulated device.
Importing a Physical Device as an NI-DAQmx Simulated Device
To import a physical device configuration as an NI-DAQmx simulated device, use the MAX Import and Export functions. Select File»Export and follow the prompts to export the desired physical device as an .nce file stored on the computer. Select File»Import and follow the prompts to import the previously created .nce file. Be sure to designate the imported device as simulated.
Alternative Strategy for Converting Physical and NI-DAQmx Simulated Devices
Assume a device number “Dev x” for the NI-DAQmx simulated device, “Dev y” for the physical device, and Dev x and Dev y are the same model of National Instruments DAQ hardware. After developing code using “Dev x,” there is now a need to use the physical device. You can rename the physical device “Dev x” and rename the NI-DAQmx simulated device “Dev y (or z)”. This allows the application code to remain unchanged, but the application uses a physical device instead of a simulated one.
Want More NI-DAQmx Information?
NI-DAQmx driver software includes tools introduced in this document in addition to many other software tools and features. To learn more about NI-DAQmx visit some of these additional resources:
- Download NI-DAQmx
- Find Answers To Frequently Asked Questions about NI-DAQmx
- Browse NI-DAQmx Feature Gallery
- Reduce Development Costs with NI-DAQmx
Reader Comments | Submit a comment »
not enough info
there should be more information about how to
set up the DAQ VIs and not just the express
VIs. I've been working for three weeks
learning how to do just that and the
information out there is not in any
tutorials: just the discussion groups even
talk about this.
- Sydney Faria, UTC. nhuq1@yahoo.com - Jan 5, 2012
Simulate USB-6501
Why is there no simulated device for the
USB-6501????
- Mar 9, 2011
Does NI have any plans to provide
useful simulation? They have
thousands of functions for generating
signals yet these tools only generate 1
sine wave for each channel. There is
also no way to verify output for a program
which means to test a program you
must physically disconnect your
hardware and connect it to an external
device if any of the output channels are
sensitive such as controlling relays etc.
- Feb 7, 2011
NI PXI 5421
How to simulate NI PXI 5421 In DAQmx
- k.lingaraj@yahoo.com - Oct 28, 2010
USB-6009
Why is it not posible to simulate a NI
USB-6009 device?
Is there any other way to do this?
- plr@serenergy.dk - Dec 11, 2008
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).








