Advanced Features of High-Speed Digital I/O devices : Memory


This paper belongs to the Advanced Features in High-Speed Digital I/O Devices: White Paper Series

Download the Advanced Features of High-Speed Digital I/O Devices White Paper Series

This tutorial describes the advantages of having deep on board memory on High-Speed Digital I/O. Scripting and waveform generation use this memory available on the boards.



NI digital waveform generator/analyzers use multiple megabytes of onboard memory to acquire and generate data. With onboard memory, you can achieve much higher data rates than would be allowed by streaming data from system memory across the PCI bus. Acquisition memory and generation memory are separate; for example, a 64 MS device has two 64 MS memory blocks –one for acquisition and one for generation.

If you are performing hardware comparison, the fault data is stored separately from the acquisition and generation data, so fault data does not consume any of your acquisition or generation memory.

 Generating Waveforms

Waveforms and scripts are stored together in device memory. They are stored in contiguous blocks, appearing in memory in the order they were written to the device. You can delete individual waveforms from the device, freeing up the space they occupy for other waveforms to be written.

 Data Width

This property node determines the sample size of the board. This also sets the number of usable channels. The default size is determined by the board. The acquisition data width can be set but the generation data width is fixed.

Figure 1. Data Width and Number of Channels Available

In NI LabVIEW software, you can use the Data Width Property Node to write to or read this property for the board.

Figure 2. Data Width Property Node


 Memory Allocation

Acquisition Memory:  The physical memory and data width determines the sample storage amount.  You can increase the number of samples that can be stored in memory by reducing the data width.

Generation Memory: Similar to acquisition, the amount of samples that can be stored is determined by the physical memory and the data width. The data width is set by the device and the mode.  For generation, a portion of the memory is also used for scripting instructions.


Memory Size (Mb/ch)

1 Mb/ch

8 Mb/ch

64 Mb/ch









6547/6548 SDR




6547/6548 DDR








6561/6562 SDR




6561/6562 DDR




Figure 3. Memory Sizes


The vast amounts of memory available on the high-speed digital products give you the ability to stream data to and from the PC memory. The onboard memory acts as a buffer, which can store data while the board generates/acquires. The examples below show how to stream data for both acquisition and generation using the high-speed digital boards.

Streaming on High-Speed Digital I/O Boards: Acquisition

 Calculation of Script Size

A single instruction compiled for the NI high-speed digital I/O boards is 16 B. The number of samples that are used by an instruction depends on data width.

•          Data width of 1 (6541/6542, 655x) 16 samples

•          Data width of 2 (656x SDR) 8 samples

•          Data width of 4 (6544, 6545, 656x DDR) 4 samples.


The amount of memory occupied can be determined by:

                                                      1 B          8 ch

Memory Option (Mb/ch)  x -----------------x ------------ x datawidth (B)

                                                       8 bits         1 B

All scripts have a two instruction overhead.

  • Generatestatement
    •  No markers
      •   1 instruction
    •   N markers
      •  N+1 instructions
    • Subsets
      •  1 Instruction
  • Waitstatement
    • 1 instruction
  • Clear trigger statement
    • 0 instruction
  • Repeat Loops
    • Repeat n loops
      • 2 instructions
    •  Repeat until trigger
      • 3 instructions
    • Repeat forever
      • Up to 47 instructions
        • 2 instructions
      • Greater than 47
        •  Must be a multiple of 128 B
        •  Extra space, if any, will be filled with null commands
      • 2 instructions
  • If-else statements
    • Else statement must be a multiple of 128 B
      • Extra space, if any, will be filled with null commands
    • 2 instructions


The onboard memory on the high-speed digital boards is used for storing data. Digital vectors can be stored on the memory, and advanced linking and looping of these vectors can be achieved using scripting. Also, for features such as hardware compare, the expected data is stored on the memory, which is then used to compare against the data that is acquired. Lastly, the onboard memory is used for streaming data to and from the PC memory.