LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV 8.20 features for the techno-weenies

I'll use this thread to post cool features I find in the LV 8.20 Upgrade notes.
 
Feature #1 Polymorphic Read From Spreadsheet.VI
 
Page 7 reads
 
"

The Write To Spreadsheet File VI and Read From Spreadsheet File VI are

polymorphic VIs. The Write to Spreadsheet File VI adapts to the value you

wire to the

format input. The Read From Spreadsheet File VI includes the

following instances: DBL, I64, and string.

"
How many times have you had to edit the VI.lib functions to changes the data types?
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 1 of 8
(3,977 Views)

Page 36 include the following text

"

Performance Optimized with Constants

LabVIEW uses constant folding to optimize the performance of VIs. With

constant folding, LabVIEW stores constant values when it compiles VIs

instead of calculating them at run time. For constants wired to structures,

LabVIEW calculates the output values of the structures when it compiles

VIs and stores the values so they are available at run time.

You can display constant folding hash marks on the block diagram by

selecting

Tools»Options, selecting Block Diagram from the Category

list, and placing checkmarks in the

Show constant folding of wires and

Show constant folding of structures

checkboxes. When you place a

checkmark in the

Show constant folding of wires checkbox, gray hash

marks appear on the wires attached to constants that are constant folded.

When you place a checkmark in the

Show constant folding of structures

checkbox, gray hash marks appear inside structures that are wired to

constants. The hash marks might not appear in a VI until after you run or

save the VI.

LabVIEW 8.2 also folds computed constants you wire to Case structure

selector terminals and While Loop conditional terminals.

"

I'd like to see this one in action.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(3,951 Views)
This is actually a great feature that I have enabled. The attached image shows a simple example:
 
Apparently, the two left FOR loop are reduced to a simple constant at point [A] in the compiled code. As you can also see, the data from the control is treated as a constant while inside the third loop.
 

Message Edited by altenbach on 08-25-2006 03:19 PM

Message 3 of 8
(3,926 Views)


@Ben wrote:
 
Feature #1 Polymorphic Read From Spreadsheet.VI
Finally. A long time requested feature (example).

Oh, and that constant folding indication could come in handy too. Smiley Wink

___________________
Try to take over the world!
Message 4 of 8
(3,884 Views)
The improved start-up time of LV 8.20 is confirmed by LAVA users!
 
See here
 
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 8
(3,791 Views)

Shouldn't the last line be hashed?  Isn't it a constant after all, if the numeric control is hashed, that is?



Message Edited by JoeLabView on 12-12-2007 08:12 PM
Message 6 of 8
(3,412 Views)
It would be hashed IF you would turn the numeric control into a diagram constant.
 
I agree that the description of folding in the LabVIEW help is probably a little bit too simplistic, because there seem to be several levels of constant folding. Some parts are folded at compile time (as described in the help), some are apparently folded when the VI loads (details), and some are dynamically folded for the duration of a structure, such as in location B in the figure.
 
In location B, the wire coming from the numeric is only a constant in the scope of the third FOR loop, so the output of the loop cannot be folded, because it depends of a control with variable value. However, during execution of the third FOR loop, it is a constant.
 
(see also this old post for an example of folding inside a structure).
Message 7 of 8
(3,405 Views)


altenbach wrote:
 
In location B, the wire coming from the numeric is only a constant in the scope of the third FOR loop, so the output of the loop cannot be folded, because it depends of a control with variable value. However, during execution of the third FOR loop, it is a constant.
 


Now I get it.  And I can (kind of)  see the benefit of turning on this feature.  It becomes another tool in the toolbox.  I'll have a look at you link later today.
 
Thanks!
Message 8 of 8
(3,363 Views)