LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating an array by inserting 51 set of different values

First you are not bothering...!

It is not required.. if you don't do it manualy, Labview will do it for you... and it will display a small red dot at the input of multiplier.. try it.

It is a good programming practice , although at this example it has no difference ...

 

 

PS: Hey now i can rate an answer Smiley Happy

Message 11 of 18
(846 Views)


Pnt wrote:

... although at this example it has no difference ...


No significant or useful difference! 😉
 
Actually, there seems to be a very small penalty for inplicit coercion versus explicit conversion. Here's a link to benchmark where we discussed this a while ago:
 
My own and Ben's testing in the past consistently show the same result. It is somewhat surprising, because you would think that the compiler could generate exactly the same code for both cases, but there seems to be a subtle difference and explicit always wins by a hair. 🙂
0 Kudos
Message 12 of 18
(836 Views)

2 minutes late...

 

 

 

if I rate an answer no stars apear on the left .. !?

0 Kudos
Message 13 of 18
(835 Views)


Pnt wrote:

if I rate an answer no stars apear on the left .. !?


Since the board upgrade a few weeks ago, there is a delay before stars appear. See:
 
 

 
0 Kudos
Message 14 of 18
(830 Views)
hi
ok, thanks I got it. I just switched to 8.5 from 7.1 and saw some red dots there but did't have the time to find out about it.  I will do some conversion then...
regards
0 Kudos
Message 15 of 18
(817 Views)
Altenbach,

thanks for clarifying, I did actually mean the option to show it graphically.

Now, your reply with the large loop count intrigues me! How is the VI compressed? If I tinker around with the loop mathematics, i.e. putting in weird functions like sin(x)/x it does not seem to have any effect. (Although I did manage to get LV 8.5 to crash on me once after taking quite a long time to save, saying out of memory, so maybe I fooled it once?)

I give up, what is going on???

0 Kudos
Message 16 of 18
(811 Views)
Pnt, I am glad I helped share some knowledge.

Don't worry, some kind stranger seems to have given me stars anyway! Smiley Very Happy

Maybe you are right, I have been waiting for the right time to submit a nugget!
0 Kudos
Message 17 of 18
(811 Views)


nrp wrote:
Now, your reply with the large loop count intrigues me! How is the VI compressed? If I tinker around with the loop mathematics, i.e. putting in weird functions like sin(x)/x it does not seem to have any effect. (Although I did manage to get LV 8.5 to crash on me once after taking quite a long time to save, saying out of memory, so maybe I fooled it once?)

I give up, what is going on???

LOL, Frankly I don't know any of the details, just base my statements on observations I made over the years. A couple of version ago, VIs became significantly smaller on disk, so it seems some of the contents are compressed to get rid of the hot air. 😉
 
In this particular case, I don't think the contents of the folded array are stored on disk, but maybe the loop is precalculated when the VI loads instead of when it is run. (You migh say that storing the instructions to create the folded array is probably one of the most efficient special purpose compression algorithms known to man. 😄 "Uncompressing" during loading of the VI just executes the loop code, right?).
 
If you would turn one of the loop input diagram constants into a control, you'll see that the memory footprint will be smaller by the size of the folded array. The memory buffer for the folded array is not re-used.
The LabVIEW developers have quite a few rabbits in their magic hat and some of these things change between versions. Let's just be grateful that it works as well as it does. 🙂
0 Kudos
Message 18 of 18
(808 Views)