The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Calling a VI By Reference

SercoSteveB
Active Participant

Consider the VI BooleanPassThroughValue.vi, below.  If the Default Value of 'Boolean Value In' is TRUE and the value of 'Boolean Value In' set to FALSE before each call.  What are the values of Boolean Value Out after BooleanPassThroughValue.vi is called using Method 1 and Method 2?

 

BooleanPassThroughValue.vi

BooleanPassThroughValue.png

 

NOTE:  Assume all paths and typedefs are correct.

 

Method 1:

BooleanPassThroughValue Call 1.png

 

Method 2:

BooleanPassThroughValue Call 2.png

 

a) After the Method 1 call Boolean Value Out = FALSE, After the Method 2 call Boolean Value Out = FALSE

b) After the Method 1 call Boolean Value Out = FALSE, After the Method 2 call Boolean Value Out = TRUE

c) After the Method 1 call Boolean Value Out = TRUE, After the Method 2 call Boolean Value Out = FALSE

d) After the Method 1 call Boolean Value Out = TRUE, After the Method 2 call Boolean Value Out = TRUE

Comments
Pujacontrols
Member

Option d: After the Method 1 call Boolean Value Out = TRUE, After the Method 2 call Boolean Value Out = TURE

Hari_krishnan
Member

D

nik35324
Member

 


@SercoSteveB wrote:

If the Default Value of 'Boolean Value In' is TRUE and the value of 'Boolean Value In' set to FALSE before each call.  

 

 


C

Differences Between Calling a VI with an Invoke Node and Calling a VI with a Call by Reference Node

crossrulz
Knight of NI

Assuming the called VI stays in memory (which is implied by the "Set Boolean In to FALSE"), C.  If not, then D.

 

And to make the two methods more equivalent, the Wait Until Done in Method 2 should be set to TRUE.


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
MrStevenUND
Member

C or D.

SercoSteveB
Active Participant

Answer: C, nice one all.

 

Check out the link provided by nik35324 for more information