Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

CLAD clarification please.

Hi All

 

Could someone please clarify the following CLAD question for me.

 

Which is not an important part of creating a Functional Global Variable?

 

a. Using Shift Registers to store information
b. Changing the VI’s execution settings to Reentrant
c. Setting the VI to inline into calling VIs
d. Setting the While Loop to stop after one iteration

 

 

Options A and B are important for creating a Functional Global Variable. Leaving options C or D as the answer.

Option B.... the VI definately does not want to be reentrant, so changing the VI’s execution settings to reentrant is not important.

Option C.... the VI does not want to be inline as that also sets the VI to rentrant. So setting the VI to inline is also not important.

 

The answer has been given as Option C, but I feel it should be 'B and C' or am I missing something?

 

Thanks in advance

0 Kudos
Message 1 of 11
(6,815 Views)

Well, I can see the scenario where you would want the FGV to be reentrant.  Look at the Point-To-Point functions.  They are set to reentrant and are technically FGVs.  That is done so you can keep several running totals of some kind.  Inlining removes any debugging capabilities, so I can see why C would be the "best" answer.  But I agree, B and C are both not important.


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 2 of 11
(6,806 Views)

IMO the answer is D. Setting the While Loop to stop after one iteration is not a strict requirement, although it may have an impact on performance.

I rather partially miss your post; you write

 

Option B.... the VI definately does not want to be reentrant, so changing the VI’s execution settings to reentrant is not important.

 

If the VI definately does not want to be reentrant (and indeed it should not be), this is a reason why this setting IS an important part, don't you agree?

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 11
(6,801 Views)

Thanks Crossrulz I wasn't aware there was a scenario where you would want FGV to be reentrant. Guess a little more studying is in order. Smiley Happy

0 Kudos
Message 4 of 11
(6,800 Views)

Well, after reading crossrulz's answer, I wonder what's the exact meaning of the question.

I meant: what can affect how the FGV vi is properly working?

Certainly I would never set a FGV vi to Reentrant, because this would break the Global attribute.

May a Functional Global Variable only be used locally?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 11
(6,783 Views)

Hi,

 

If we are talking about FGV, FGV should not be reentrant. If it is reentrant every user can call this variable at same time and it will create a race condition.

D is right because this loop should run only one time to store value in shift register for accessible to all other VIs

 

 

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 6 of 11
(6,778 Views)

Himanshu_Goyal wrote:

If we are talking about FGV, FGV should not be reentrant. If it is reentrant every user can call this variable at same time and it will create a race condition.


Well, only if you set it to Shared Clones.  If you use preallocate clones, then each call to the reentrant FGV has its own memory space.  Therefore no race condition.

 

A and D define a FGV.  So those are kind of really important.  Then again, there is the variant that Darren introduced by using feedback nodes with no loop that I tend to prefer.


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 7 of 11
(6,764 Views)

You should be aware that there are problems with some of the CLAD questions, particularly with the sample exams (my understanding is that the actual test is generally better), so you need to learn how to answer these questions (which is the important thing for passing the CLAD). In this case, C is the answer purely because you wouldn't actually do that.

 

For any of the other answers, I have created FGVs without using what's described in them, so I don't think they're actually important either, but they are generally used in what is commonly called an FGV (which is another problem with this question, because people use the term to refer to different things). Like I said, learn how to answer the question (in this case, by finding the most irrelevant one).


___________________
Try to take over the world!
Message 8 of 11
(6,735 Views)

From the original question written here exactly as it appears on the exam  surely setting the VI to 'reentrant' (B) or to 'inline' (C) are NOT important therefore B and C are correct. If it crops up on the exam I will put 'C' as the answer but add a note about FGV's and reentrant VI's. Hopefully my exam result is not borderline pass/fail.

 

Thanks all for taking part in the discussion. I figure this is all down to a poorly written exam question.

0 Kudos
Message 9 of 11
(6,717 Views)

@crossrulz wrote:

Well, I can see the scenario where you would want the FGV to be reentrant.  Look at the Point-To-Point functions.  They are set to reentrant and are technically FGVs.


"Techincally", this statement makes no sense. There is nothing "global" about them once they are reentrant. Maybe you could call them something else. FLV? Nah!

0 Kudos
Message 10 of 11
(6,692 Views)