July User Group – Circular Buffer in LabVIEW

Ludwik Kordas presented the concept of a Circular Buffer (CB) and various ways to implement it in LabVIEW.

His presentation and example VI’s are included in this post.

Definition

An area of memory  used to store a continuous stream of data by starting again at the beginning of the buffer after reaching the end. A circular buffer is usually written by one process and read by another. Separate read and write pointers are maintained. These are not allowed to pass each other otherwise either unread data would be overwritten or invalid data would be read.

Simple CB Models

  • FIFO: first IN first OUT
  • (first WRITTEN first READ)
  • Number of elements: n+1
  • Predefined # of elements: n
  • “n+1” element is forbidden for write/read pointers
  • Elements could be of any data type including arrays, clusters or even clusters of arrays of clusters

Pages: 1 2 3

Leave a Reply