Serial FAQs


Table of Contents

  1. Q: What are the benefits of National Instruments serial interfaces?
  2. Q: How do NI serial interfaces affect CPU utilization?
  3. Q: How do NI serial interfaces achieve maximum CPU utilization?
  4. Q: How do NI serial interfaces obtain higher data throughput?
  5. Q: What is the maximum communication speed of NI serial boards?
  6. Q: How can I configure my NI serial board for a nonstandard baud rate?
  7. Q: Are NI serial boards supported on multiprocessor and hyperthreading machines?
  8. Q: Do NI serial boards support optical isolation?
  9. Q: Do NI serial boards support RS485 advanced transceiver modes?
  10. Q: How can NI LabVIEW and LabWindows/CVI reduce my serial application development time?

Q: What are the benefits of National Instruments serial interfaces?

In addition to the quality and value that customers have come to expect from NI, National Instruments serial interfaces offer five main benefits:

  • Superior CPU utilization, leaving your computer’s processor free to analyze and present data
  • Higher data throughput from your instrument without changing the baud rate with an increased FIFO (128 B)
  • Extremely fast data rates (up to 2 Mb/s) on each port simultaneously
  • Customized baud rate configuration to reach any nonstandard baud rate within 1 percent accuracy
  • Reduced application development time for easier communication with your instruments using National Instruments LabVIEW or LabWindows/CVI

    Q: How do NI serial interfaces affect CPU utilization?

With superior CPU utilization, NI serial boards greatly outperform the leading serial boards on the market. To highlight CPU utilization importance and impact, NI benchmarked the new PCI-8431/8 (RS485) eight-port board against one of the market-leading eight-port serial boards. NI used a simple application that continuously wrote to and read from all eight serial ports simultaneously for this benchmark. During the first application run, the other leading serial board completely bogged down the computer, eating up an average of 96 percent of the CPU processing power. Without changing a single piece of code, NI then ran the application using the new NI PCI-8431/8 board and saw a drastic CPU usage reduction of 90 percent, achieving an average of only 6 percent. This was a dramatic improvement of over 15X!



*NI monitored CPU usage with Task Manager.
*Test machine specs include:

  • Intel Pentium 4 with 3 G Processor
  • 1 G RAM
  • Windows XP Professional

    Q: How do NI serial interfaces achieve maximum CPU utilization?

You can use two standard types of data transfer methods -- direct memory access (DMA) and interrupt request (IRQ) -- to transfer data from serial hardware to the memory on your computer. IRQ is a transfer mode that asserts a signal and interrupts the processor each time data is ready. If you have 100 B of data at a serial port, your processor has to transfer all 100 B to memory. As the amount of data increases, so does the amount of processing power required to transfer it. DMA is a transfer mode that communicates directly from the serial board to the PC memory, bypassing the processor altogether. NI 843x serial interfaces use DMA technology to transfer data. You can speed up DMA transfers by taking advantage of the NI-MITE ASIC, scatter-gather technology, and bus mastering.

Q: How do NI serial interfaces obtain higher data throughput?


In addition to maximizing CPU utilization, DMA transfers combined with larger (128 B) first-in-first-out memory buffers (FIFOs) enable NI-Serial interfaces to transmit and receive larger amounts of data at higher rates.

NI 843x serial interfaces can perform DMA transfers without any interaction from the CPU by using the NI-MITE ASIC with PCI bus mastering. Therefore, if the CPU is busy handling other requests, the serial interface still can transfer the data from the FIFO to memory.

Without DMA transfers, the serial interface signals an interrupt each time the FIFO reaches a specified level. If the CPU cannot process the interrupt in a timely manner, the serial interface uses handshaking, if enabled, to halt the data transfer. This decreases the overall throughput and is common with smaller FIFOs.

The image below shows the benefits of using DMA transfer and a larger FIFO. The top signal represents the bytes "ABCDEFG" being transferred across the serial interface using DMA. The bottom signal illustrates the results of using interrupts with a small FIFO. If the CPU receives too much data to transfer to memory, the FIFO fills up and the serial interface signals the instrument to stop transmitting data while the CPU catches up. As a result, the top signal transfers more data in the same amount of time and therefore has an increase in throughput.

Q: What is the maximum communication speed of NI serial boards?

When it comes to communication speed, NI 843x serial interfaces offer some of the fastest data rates on the market, achieving rates up to 2 Mb/s bidirectionally on all ports simultaneously.

Q: How can I configure my NI serial board for a nonstandard baud rate?


In the past, if you wanted to achieve a nonstandard baud rate, you had to alter your serial board with additional oscillators and jumpers, voiding the warranty of the board. With NI 843x serial interfaces, you can easily configure any baud rate between 50 b/s and 2 Mb/s through software. You can do this either manually in Measurement & Automation Explorer (MAX) or Windows Device Manager, or you can programmatically change it through the NI-Serial application programming interface (API).

Q: Are NI serial boards supported on multiprocessor and hyperthreading machines?


All NI PCI and PXI serial interfaces offer multiprocessor and hyperthreading support, so you can take advantage of the latest PC technology for higher speeds and better efficiency. Hyperthreading is a technology included in some Intel processors that enables one processor to work as two. To do this, the "core" processor processes two threads of instructions at the same time. A multiprocessor computer system uses two or more CPUs that run in parallel for faster performance.

Q: Do NI serial boards support optical isolation?


NI offers PCI, PXI, and AT serial hardware with up to 2000 V of optical isolation for safe, reliable communication in industrial environments. Isolated ports provide reliable communication in situations involving ground loops from different ground levels or high common-mode voltage induced on the lines in noisy environments. The isolation between each communication port and the host PC ensures the safe operation of the PC and the devices connected to other ports on the same board during accidental high voltages or line surges on communication lines.

Q: Do NI serial boards support RS485 advanced transceiver modes?


NI RS485 serial interface boards support four hardware transceiver control modes, including an advanced 2-wire auto control mode that removes the burden of transceiver control from your application. You can use hardware transceiver control to enable and disable your transmitters and receivers so that they function on different bus topologies. The following table lists the status of the transmitters and receivers under each transceiver control mode.

Q: How can NI LabVIEW and LabWindows/CVI reduce my serial application development time?

With LabVIEW, an easy-to-use graphical development environment, you can acquire data from thousands of different instruments, including serial devices, IEEE 488.2 devices, VXI devices, programmable logic controllers, and plug-in DAQ boards. After you have acquired raw data, you can convert it into meaningful results using the powerful data analysis routines in LabVIEW. LabVIEW also comes with hundreds of instrument drivers, which dramatically reduce your software development time because you do not have to program the low-level control of each instrument.

LabWindows/CVI is an interactive ANSI C programming environment designed for building virtual instrument applications. LabWindows/CVI delivers a drag-and-drop editor for building user interfaces, a complete ANSI C environment for building your test program logic, and a collection of automated code generation tools, as well as utilities for building automated test systems, monitoring applications, or conducting laboratory experiments.

After you install your serial hardware and the NI-Serial software, you can use NI-VISA in LabVIEW and LabWindows/CVI with your serial interface. If you already have one or more of these applications and want to use them with your serial interface, refer to your product documentation for serial I/O function information.

NI-VISA, the industry standard for developing instrument drivers, is an I/O API for instrumentation programming.

In its full implementation, NI-VISA can control USB, VXI/VME, PXI, GPIB, TCP/IP, or serial instruments by making the appropriate driver calls depending on the type of instrument you are using. NI-VISA applies the same operations to communicate with instruments regardless of the interface type. For example, the NI-VISA command to write an ASCII string to a message-based instrument is the same whether the instrument is serial, GPIB, or VXI. As a result, NI-VISA gives you interface independence. This makes it easier for you to switch bus interfaces and means you need to learn only one API if you program instruments for multiple interfaces.

Another NI-VISA advantage is that it is an object-oriented API that easily adapts to new instrumentation interfaces as they evolve, making application migration to the new interfaces easy.
Related Links:
Products and Services - Serial

All Products and Services