Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Specifying the Buffer Size Using DataSocket Functions

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Complete the following steps to specify the client-side buffer size using DataSocket functions.

  1. Add the DataSocket Open function to the block diagram.

  2. Wire a psp URL to the URL input or wire a shared variable control to the URL input.
  3. Right-click the mode input and select Create»Constant from the shortcut menu.
  4. Click the mode constant and select BufferedRead.
  5. Add a Property Node to the block diagram.

  6. Right-click the Property Node and select Select Class»DataSocket»DataSocket from the shortcut menu.
  7. Resize the Property Node and add a terminal.
  8. Click the first white area of the Property Node and select the Buffer Maximum Bytes property.
  9. Click the second white area of the Property Node and select the Buffer Maximum Packets property.
  10. Right-click the Property Node and select Change All To Write from the shortcut menu.
  11. Create constants for each property and enter values for each property, such as 1024 for Buffer Maximum Bytes and 25 for Buffer Maximum Packets.

    LabVIEW stops filling the client-side buffer when the first buffer size limit is reached for either the Buffer Maximum Bytes property or the Buffer Maximum Packets property.
  12. Wire the connection id output of the DataSocket Open function to the reference input of the Property Node.

After you specify the buffer size on the client, you can read the buffered data.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit