Use NI Serial Hardware with Baud Rates Over 3 Megabaud

Overview

Note that this article replaces KnowledgeBase 58KEI82F: How Can I Use NI Serial Hardware with Baud Rates Over 3 Megabaud? Some NI manuals may still reference the previous document. If you were redirected from the previous KnowledgeBase URL, please update your bookmarks accordingly.

Contents

Supported NI Serial Hardware

Under certain conditions, some RS-485/RS-422 NI Serial products can be successfully used with baud rates over 3 MBd. The following boards support higher baud rates up to 10 MBd:

  • PXIe-8431/8
  • PXIe-8431/16

Supported Baud Rates

These products support any arbitrary baud rate up to 3 MBd with an accuracy of 1.3% of the selected baud rate. Above 3 MBd only certain baud rates can be generated. The specific baud rates that can be set above 3 MBd can be calculated using the following formula:

Baud Rate = 400 / (m*n)

where m is an integer between 4 and 16 and n is an integer between 8 and 31. The specific baud rates above 3 MBd are also listed in the table below.

Table 1: Supported Baud Rates (MBd) above 3MBd

3.0075

3.3613

3.8462

4.4444

5.3333

7.1429

3.0303

3.4188

3.9216

4.5455

5.5556

7.2727

3.0769

3.4483

4.0000

4.7059

5.7143

7.4074

3.1250

3.4783

4.0404

4.7619

5.8824

7.6923

3.1746

3.5088

4.0816

4.9383

6.0606

8.0000

3.2000

3.5714

4.1667

5.0000

6.1538

8.3333

3.2258

3.6364

4.2105

5.1282

6.2500

8.8889

3.3058

3.7037

4.3478

5.1948

6.3492

9.0909

3.3333

3.8095

4.3956

5.2632

6.6667

10.0000

If you require a baud rate that is not listed:
  1. Identify the closest listed baud rate to your desired baud rate.
  2. Calculate the percent difference between the listed baud rate and the baud rate of the connected device. It is recommended to have no more than a 2% difference in baud rate between serial devices.


An indication of a difference in baud rates is the presence of framing errors in communication. You may experience over-run errors at baud rates higher than 3 MBd when no flow control is used. Because of this, NI recommends you use some form of flow control (CTS/RTS or Xon/Xoff) when using high baud rates. This will allow you to properly communicate with a device at the high baud rate without over-run errors or missing data.

Expected Throughput

The theoretical maximum throughput for baud rates can be calculated by this formula:

Maximum Throughput = Port Count * Baud Rate / Number of serial bits in a byte

The number of serial bits in a byte is usually 10 (1 start bit, 8 data bits, no parity bit, 1 stop bit).

However, several factors will limit the throughput. Two major factors are listed below:

  • Number of bytes sent in a call: Since it takes a set amount of time to set up a DMA transfer to the serial card, you will have better throughput performance when large numbers of bytes are transferred at once. The best throughput is experienced when thousands of bytes are sent in a single call.
  • Flow control results in pauses in communication: The reason why over-run errors stop when flow control is enabled is because the sender stops sending. When these pauses in communication happen, the time it takes to transfer the bytes increases, resulting in less throughput.

Other factors such as system specifications, current CPU workload, operating system, application software efficiency, etc. also can impact the throughput performance.


    Figure 1: Typical Throughput vs. Baud Rate of one PXIe-8431/16

In this example, the ports in each test were set to the same baud rate, although each port can be set independently.

Applications where data is transmitted in short, fast bursts will be mostly unaffected by flow control and are ideal applications to use with the NI Serial devices. Applications that must have large amounts of data transmitting at or near theoretical maximum throughput will be slowed by flow control.

Enable Higher Baud Rate Support

Enabling the high baud rate support will allow you to disable the NI-Serial driver check that verifies baud rate settings sent by the user. Caution: This will result in all PCI/PXI/PCIe/PXIe boards to have this check disabled in the driver even though using some of these with unsupported baud rates may result in errors.

Enable on Windows OS

  1. Open the Windows Registry Editor.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NiSerP
  3. Right-click on the blank panel. Select New >> DWORD (32-bit Value).
  4. Right-click on the value name and select Rename. Enter the value name OverrideMaxBaudRate.
  5. Right click on the value name and select Modify. Enter 1 into the value data field. The registry editor should look like the image below.Windows Registry Editor
  6. Close out of the Registry Editor and reboot the system.


Optionally, you can use the attached windows registry file, EnableOverrideMaxBaudRate.REG, to add this registry value.

At any point, you can disable the ability to specify higher baud rates by deleting this value, setting it to 0, or using the attached DisableOverrideMaxBaudRate.REG file to delete the value automatically.

Enable on Phar Lap ETS Real-Time OS

  1. FTP the NiSerial.dbs file located in the /ni-rt/system directory of the real-time (RT) target to the host.
  2. In the NiSerial.dbs file, add OverrideMaxBaudRate = 1 to the System section of the file.
  3. FTP the modified file back to the RT target.
  4. Reboot the RT target for the changes to take effect.


Note:
This only applies to Phar Lap ETS Real-Time targets. NI Linux Real-Time OS does not support higher baud rates. 

Was this information helpful?

Yes

No