This site uses cookies to bring you the best experience. Find out more
Skip to main content

blog

XNET Session - Remember the Queue Size!

Introduction

We have recently been getting stuck into some CAN FD commissioning using the LabVIEW XNET drivers, which have a great API, but as so often is the case, the devil is in the detail. Our requirement was to physically change a CAN connection to the Unit Under Test (UUT). Due to this change, the software needed to be reconfigured to incorporate the increased amount and frequency of the data being received.

Challenge

We were getting an error when acquiring data that reported as a buffer overflow. One of the big challenges with commissioning is trying to isolate an issue when there are other issues that distract you. In this case as part of this commissioning we were implementing logging of data to a BLF file on RT PXI, which had its own, distracting challenges, but that’s another story!

We were eventually focussed on the overflow issue. When streaming data using the XNET Read VI you are able to control the queue size, and typically using the default frame size will suffice. The default queue size is calculated by LabVIEW using a formula, shown below. In our case we are operating in Frame I\O mode.

The Frame Size parameter in this is the crucial bit of detail that needed to be understood through reading up on the documentation. As is documented the default Frame Size is 24 bytes, but as we are using CAN FD, the Frame Size can be up to 64 bytes.

So in combinations with our higher rate of acquisition and quantity of data, it was clear that the default queue size was a potential cause of our issue. Moral of this little story is that you always read the documentation, no matter how hard it is to find what you need!

Have you got experience you can share dealing with the intracacies of technical documentation when developing in LabVIEW? Let us know, just drop us a message on LinkedIn or email mlug@argentaconsult.com.

Back to Blog listings

ARGENTA IS A LEADING PROVIDER OF PRODUCT RELIABILITY AND PROCESS IMPROVEMENT SOLUTIONS.

Call 0121 514 2290 to discuss your requirements