LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CLAD

In this simple exame CLAD the people from NI in my country don't know the answer to question 4 (Coercion dots). I think it's b) option, because in the manual LVB1 tells that each time that labview makes a conversion copies the data, so i think is a disavantage; but they (people from NI) think that probably it's a) option.

Everibody agree with me (b option)?

I put this sample exam in www.plutonis.com/clad.pdf

Thank you

raulcord

0 Kudos
Message 1 of 18
(5,929 Views)
I decided to put this little example to the test. On a Windows platform, using LabVIEW 7.1 option (b) used a smidgeon less memory than option (a).
Message 2 of 18
(5,901 Views)

I have the same set of sample questions, but also the sample answers as provided by NI (UK)

The (official NI) answer to Q4 is A.

Rod.

 

0 Kudos
Message 3 of 18
(5,876 Views)
Well I'm surprised... I really think "a" is the correct answer... I made 2 VIs and went to see the "memory usage" (ctrl+i) for data, for "a" it gives 0.7K and for "b" it gives 0.8K.

LV 7.1.1 and Win XP


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 18
(5,853 Views)
Well, I'm certainly starting to become intrigued by such a simple example. I had actually used the memory profiler rather the VI info. I re-ran the test this morning to use the VI info and got the same results as yesterday. These were the numbers after I saved each VI (if you look at the number with an unsaved VI the numbers will be different):

VI Info -> Memory Usage
                          A       B
Front Panel Objects       5.1K    5.1K
Block Diagram Objects     3.7K    2.5K
Code                      1.0K    0.9K
Data                      0.9K    0.9K
Total                    ~10.7K  ~10.7K

Using the Profiler I got:

            A     B
Avg Bytes   912   900
Min Bytes   912   900
Max Bytes   912   900

Hmmmm... perhaps the changes done to LabVIEW memory manager over the years have changed long-standing beliefs? However, before we overanalyze this problem I think we need to step back and consider the question. In my opinion, I think it's an outdated question and a very vague one at that. When it asks which is more efficient in terms of "memory usage", well, what memory usage are you talking about?
The Profiler seems to give an edge to the automatic data coercion, but that's hardly the whole story. Is it the total memory usage? If so, the numbers above indicate that neither one is "more efficient". Is it in terms of the data used? If so, the numbers again show there's no difference. I think a far better question would have been to give an example that uses a loop and ask whether it's better to have the conversion happen inside or outside the loop. So, in my opinion I think it's a poor question. I hope the real CLAD has better questions.

Message 5 of 18
(5,844 Views)
smercurio_fc:
 
Minor observation, the total memory usage in col B is erroneous, if you add them up it comes to 9.4K, not 10.7K.
 
K?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 6 of 18
(5,818 Views)
Quite right. Typo on my part. My comments regarding the validity of the example still stand, though.
Message 7 of 18
(5,812 Views)

I think you nailed it Mercurio.

The explicit conversion makes obvious that a conversion is taking place but is actually less efficient (yes I have benchmarked it) than the implied coercion.

This is one of the reasons experienced LV developers should not take test like that one. That will determine if the student took the LV basic course and does NOT test if they really know what is going on inside LV.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 18
(5,798 Views)
From the posted tests, it would appear that the IMplicit coercion is actually more efficient than the EXplicit coercion. However the answer required when taking the CLAD exam (which I am doing next week) is the opposite.
 
Until I pass the exam the explicit conversion is preferable.
 
 
0 Kudos
Message 9 of 18
(5,794 Views)
Hah! That's funny. Smiley Very Happy

Reminds me of when I took tests in school and even the SAT. Give them the answer they want, but know what the correct answer is! Smiley Happy
Message 10 of 18
(5,783 Views)