10-02-2012 02:31 PM
The following question is on a CLAD practice exam:
You have a control on the front panel of a VI and you need to modify one of its properties at run time. Which of the following is the best approach you would take?
a. Create an implicit property node and select the property to modify
b. Create a control reference, pass the reference to a property node and select the property to modify
The answer is A. Can anyone explain why? My old STE had a big problem with implicit property nodes (although I'm not 100% sure why).
Solved! Go to Solution.
10-02-2012 02:40 PM
What is an "STE"?
I would say A because it is simpler and you are only dealing with a single node. It would take less diagram space.
B would make more sense if you need to change the property of different control. Then you can programmatically iterate through the different references in a For Loop.
10-02-2012 04:42 PM - edited 10-02-2012 04:48 PM
@DutchTzu13 wrote:
The answer is A. Can anyone explain why? My old STE had a big problem with implicit property nodes (although I'm not 100% sure why).
Well, I also don't know what an STE is (but we can guess!). Your post has two parts:
Is the problem big enough that you can tell us what the problem is? (e.g. properties not working, labview crashes, computer bursts into flames, etc.).
If you are not 100% sure, it can mean a number between 0% and 99%. Can you be more specific?
Attach a small example that demonstrates the problem! I am sure we can identify the problem 100% and help you fix it.
10-02-2012 06:18 PM
If that question is replicated correctly, you have to guess what the Q'er had in mind when they wrote that Q.
One let's you rihgt-click to find the control, the other allows use in a sub-VI. the former is easier to write and figure out, the latter is easier to maintain.
ben
10-03-2012 08:54 AM
Sorry all, STE is Senior Test Engineer -- basically the guy that got me into LabVIEW..
That's why I hate the CLAD exam, lots of questions that aren't necessarily black and white. There was another one about which method of creating an array is the most efficient... The answer ends up being "using a for loop with auto-indexing" which I was always told is a huge no-no from a memory standpoint... All arrays should be initialized, no? Thanks for the input everyone, I think I've got my answer (that its a junk question).. I just need to pass this crumb CLAD so I can move on to the CLD...
10-03-2012 09:02 AM
@DutchTzu13 wrote:
There was another one about which method of creating an array is the most efficient... The answer ends up being "using a for loop with auto-indexing" which I was always told is a huge no-no from a memory standpoint... All arrays should be initialized, no?
Not exactly. Building an array inside a for loop is bad from a memory standpoint (since it will call the memory manager several times during the execution of the for loop). Auto-indexing at a for loop tunnel is perfectly fine since it's known how many times the loop will iterate, so the array can be allocated with one memory manager call.
10-03-2012 10:02 AM
Oh yeah, I didn't think of that, good call...
10-03-2012 10:43 AM - edited 10-03-2012 10:49 AM
Actually the for loop is multiple times faster when initialising an array than the dedicated function.
Edit : actually I shouldn't play with the auto clean diagram... inverted wire, for loop is slower
10-03-2012 11:08 AM
@Bap wrote:
Actually the for loop is multiple times faster when initialising an array than the dedicated function.
You make no sense here.
Bap2703 wrote:Edit : actually I shouldn't play with the auto clean diagram... inverted wire, for loop is slower
What is an "inverted wire"?
10-03-2012 11:14 AM
altenbach wrote:What is an "inverted wire"?
I think he's saying he had his wires crossed.