LVBuffer

The LVBuffer folder contains blocks that can be used when reading an ADS notification. The folder contains the following VIs:

Init LVBuffer Handle

The Init LVBuffer Handle block initializes a handle on the LVBuffer.

LVBuffer 1:

Output

Meaning

[4] Buffer handle

The handle to the LVBuffer

Read From LVBuffer

The Read from LVBuffer block waits for samples in the LVBuffer (LabVIEW™-side data buffer, cf. Communication modes). The TimeoutMs influences the waiting. The block waits for a defined time if TimeoutMs > 0, otherwise the block waits forever. If the LVBuffer receives a sample while waiting, the block reads the sample and passes it to LabVIEW™.

Relevant parameters: LVBufferSize

LVBuffer 2:

Input/output

Meaning

[0] Buffer handle

The handle to the LVBuffer

[5] TimeoutMs

The waiting time in milliseconds:

  • TimeoutMs>0: Read From Buffer block waits for the defined time.
  • TimeoutMs<0: Read From Buffer block waits forever.

[4] Buffer handle

The handle to the LVBuffer

[6] bTimeout

Boolean flag:

  • True: if there is no sample in the LVBuffer in the defined time.
  • False: LVBuffer continuously gets new samples and the Read From Buffer block can read them.

[10] Buffer Data

Samples from the LVBuffer

[14] DataBytes

Number of bytes in LVBuffer

LVBuffer status

The LVBuffer Status block returns the current state of the LVBuffer regarding samples in the LVBuffer.

LVBuffer 3:

Input/Output

Meaning

[0] Buffer handle

The handle to the LVBuffer

[4] Buffer handle

The handle to the LVBuffer

[6] Elements In Buffer

Number of samples in LVBuffer that are still to be read.

Release LVBuffer Handle

The release LVBuffer Handle block releases the handle to the LVBuffer from memory.

LVBuffer 4:

Input

Meaning

[0] Buffer handle

The handle to the LVBuffer