LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW native functions - reentrant or not?

Are LabVIEW native functions treated as reentrant or non-reentrant? This would be with respect to Queue Operations (Enqueue Element, Flush Queue, etc.)

0 Kudos
Message 1 of 7
(3,506 Views)

All functions with yellow icon are reentrant.

 

George Zou
0 Kudos
Message 2 of 7
(3,488 Views)

@pelaid1 wrote:

Are LabVIEW native functions treated as reentrant or non-reentrant? This would be with respect to Queue Operations (Enqueue Element, Flush Queue, etc.)


A very large majority of my projects would not work if they were no reentrant.  As already said, all of the primitives (yellow nodes) are reentrant.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 7
(3,467 Views)

@crossrulz wrote:

@pelaid1 wrote:

Are LabVIEW native functions treated as reentrant or non-reentrant? This would be with respect to Queue Operations (Enqueue Element, Flush Queue, etc.)


A very large majority of my projects would not work if they were no reentrant.  As already said, all of the primitives (yellow nodes) are reentrant.


While for the most part yes but for some reason I think there is some very low-level something that is used by the queue functions that is special.

 

The term "atomic" comes to mind but I'd be darned if I can recall what the story that goes with that memory.

 

To the original poster of this question...

 

What prompts you to ask?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 7
(3,459 Views)

Ben,

 

Thanks for the info. I'm currently working on an application that runs on a test system for a medical device manufacturer. This test system uses 2 - NI PXI-7811R FPGA cards to service 12 test insertions at one time. Therefore, 6 instances of the application will use FPGA card #1 and the other 6 instances will use FPGA card #2. The way the application is structured, most of the upper level VIs are reentrant, but the lower level VIs that interface with the FPGA cards are non-reentrant. A semaphore is used to handle the queue for the FPGA card.

I'm picking up the code where others have left off, and am reviewing for proper reentrancy settings. I encountered an issue where an upper level VI is reentrant, a sub-vi called from there is non-reentrant, and the native LabVIEW functions the sub-vi calls are apparently reentrant. This seems like bad coding practices to me - I believe there should be a point at which it should transition from reentrant to non-reentrant, but not switch back and forth.

Sorry for the long drawn out response, but that's why I asked....;-)

0 Kudos
Message 5 of 7
(3,431 Views)

Also, does anyone know of a users guideline for reentrancy settings?? Thanks!

0 Kudos
Message 6 of 7
(3,428 Views)

@pelaid1 wrote:

Ben,

 

Thanks for the info. I'm currently working on an application that runs on a test system for a medical device manufacturer. This test system uses 2 - NI PXI-7811R FPGA cards to service 12 test insertions at one time. Therefore, 6 instances of the application will use FPGA card #1 and the other 6 instances will use FPGA card #2. The way the application is structured, most of the upper level VIs are reentrant, but the lower level VIs that interface with the FPGA cards are non-reentrant. A semaphore is used to handle the queue for the FPGA card.

I'm picking up the code where others have left off, and am reviewing for proper reentrancy settings. I encountered an issue where an upper level VI is reentrant, a sub-vi called from there is non-reentrant, and the native LabVIEW functions the sub-vi calls are apparently reentrant. This seems like bad coding practices to me - I believe there should be a point at which it should transition from reentrant to non-reentrant, but not switch back and forth.

Sorry for the long drawn out response, but that's why I asked....;-)


I'm not sure what you mean by "switching back and forth".  It seems to me that it is very well defined.  Stuff you make is non-reentrant by default, while native LabVIEW nodes are reentrant.  I do understand that it is frustrating that just one non-reentrant thingy in your reentrant VI suddenly makes the VI behave unexpectedly (but adhering to dataflow principles), though.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(3,418 Views)