LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about the sequence structure

Hi,
If we want to get best performance when programming a sequence of functions or calculations, we should choose 'Stacked sequence structure' or 'Flat sequence structure'? or they have the same performance?
Thanks.
0 Kudos
Message 1 of 3
(2,480 Views)
Hi Thunderbird,

I dont believe there are any difference in performance.

If you want to make a difference in performance, then try not using the sequence structure, so that you take advantage of labview data flow.

If you have to use them, keep them to a minimum, nothing worst than trying to maintain someone's VI based on a load on sequence structures.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(2,470 Views)
To the best of my knowlege there is no performance hit, the "Flat sequence structure" was a fairly recent addition to try and overcome one (of many) complaints about sequence structures in general, that stacked sequences obscure what is happening in the code. If the various sections of your calculation or functions have data dependency, i.e. the output of a calculation is fed into the subsequent calculation or function, then a sequence structure is probably not needed as, with data flow, the calculation that is "dependent" won't executed until all its inputs requirements are satified. If the "functions" are in the form of sub-vi's the method that is more "proper" is to inforce a dependency between subsequent vi's. This can be as simple as adding error in and out controls to the sub-vi's, even if they are only passed through the vi without actually performing an error function. This allows you to wire them together in the execution order that is required. Doing this on some of the early "built-in" functions that have remained in LabVIEW (the original timer functions) sometime requires putting a wrapper around them to make them sub-vi's with error passing, but in the latest versions of LabVIEW the compiler seems to do a good job of minimizing any performance hits this might appear to cause.


Putnam Monroe
LabVIEW Evangelist since 1992
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 3
(2,461 Views)