
For information on creating channels for different measurement types, see the NI-DAQmx C Reference Help. Use the DAQmxCreateTask() function to create a task and DAQmxCreateAIVoltageChan() to create an analog input voltage channel. "m圜hannel", //The name to associate with this channelĪITerminalConfiguration.Differential, //Differential wiring "dev1/ai1", //The physical name of the channel The following snippet creates a simple analog input voltage channel: To create a channel, you can use one of the many create channel methods on the channel collections.Īfter instanting a new Task object, creating and assigning an AIChannel object is done by calling the appropriate member function in the Channel class. The Task class has a channel collection property for each of six types of channels-, ,, ,, and. You can associate the following types of channels with a in the NI-DAQmx. For example, properties such as Count are only applicable to counters and are only available on the CIChannel and COChannel classes. These classes contain properties that are specific to a particular type of channel. These classes are used as subobjects of the class. NET library cannot be instantiated directly. NOTE: The examples referenced throughout this document can be found in the locations referenced by this document: NI-DAQmx Example Locations for LabVIEW and Text-Based in Windows. These functions are described in detail to help you understand both their functionality and the types of applications in which they are used. In fact, 10 NI-DAQmx functions provide the functionality to solve 80% of data acquisition applications. To begin taking advantage of these benefits, you only need to learn a few functions. It also greatly simplifies programming such applications.

Because NI-DAQmx is multithreaded, multiple data acquisition operations can occur simultaneously, significantly improving the performance of your applications that contain multiple operations. This level of performance is possible because of memory-mapped registers.Īnother significant feature of the NI-DAQmx architecture is Measurement Multithreading. In addition, you can achieve single-point I/O rates of greater than 50 kS/s. With this overhead removed, both configuration and acquisition are optimized. This begins with an efficient state model that eliminates unnecessary reconfiguration. The data acquisition applications you build using NI-DAQmx benefit from an architecture designed to maximize performance. Moreover, synchronization, a process that is usually difficult to implement because trigger and/or clock signals must be manually routed, is effortless with NI-DAQmx, which automatically performs signal routing between the different functional areas of a single device and between multiple devices. This tool helps you create your applications without programming through a graphical interface for configuring both simple and complex data acquisition tasks.

CREATING FALLING BLOCKS IN MATHLAB HOW TO
You need to learn how to use only a single set of functions to be able to program most NI data acquisition hardware in multiple programming environments.Īnother feature of NI-DAQmx that improves your development experience is DAQ Assistant. The NI-DAQmx API is also consistent across all of its applicable programming environments. A polymorphic VI accepts multiple data types for one or more input and/or output terminals. In LabVIEW, this is possible because of polymorphism. Furthermore, both a digital I/O device and an analog output device are programmed using this same set of functions. This means that all of the functionality of a multifunction device is programmed with the same set of functions (analog input, analog output, digital I/O, and counters). One feature that saves a considerable amount of development time is the NI-DAQmx Application Programming Interface (API), which is the same across both device functionality and device families.
