LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the buffer allocate memory for this particular Case Structure? - curious -

As the title says...

 

I attended a recent LabVIEW Virtual User Group presentation, where the feature to examine where the buffer allocates memory.  I randomnly picked a VI to examine this feature and observed something that I was not expecting.

 

I noticed that the buffer was not allocating memory for the Error Cluster at the input tunnel of the Case Structure on the left, but it is for the one on the right, which is located within the While Loop.  The buffer allocation is shown by a tiny black dot.

 

I suspect that it is related to the fact that it is within the Loop, but why is that?

 

Thanks

 

RayR

 

 

 

0 Kudos
Message 1 of 5
(2,798 Views)

@Ray.R wrote:

... 

 

 


 

 

Look to the input of the Serail init to see the buffer used to hold the error cluster for all code prior to the loop.

 

This is the same buffer used on the edge of the while prior to the buffer used inside the while loop.

 

Now I have to ask, "What is in the other "Error Case"? and "What happens "down the wire" after teh while loop?"

 

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(2,784 Views)

I think it's clear that the code needs to make a copy of the data at this point. The one branch goes to the VISA VI, the second branch will be used for the next iteration of the loop.

 

But I've seen in the past, that using a shift register will also ask for a memory allocation.

 

Felix

0 Kudos
Message 3 of 5
(2,772 Views)

 


@f. Schubert wrote:

But I've seen in the past, that using a shift register will also ask for a memory allocation.


 

Using a Shift Register, I can understand.

 

I'll have to find the code and run the allocated memory buffers, and post additional info.

From what I recall, the other case statement has the error cluster running through it, or through a function and out the tunnel at the right of the case statement.  Nothing special.

Lemme check again.

 

 

 

0 Kudos
Message 4 of 5
(2,754 Views)

@Ray.R wrote:

 


@f. Schubert wrote:

But I've seen in the past, that using a shift register will also ask for a memory allocation.


 

Using a Shift Register, I can understand.

 

I'll have to find the code and run the allocated memory buffers, and post additional info.

From what I recall, the other case statement has the error cluster running through it, or through a function and out the tunnel at the right of the case statement.  Nothing special.

Lemme check again.

 

 

 


Yes more dat required.

 

If that sub-VI made it look like it was going to step on the wire contents or something down the wire, then that may explain the buffer you questioned.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 5
(2,752 Views)