MORECHEMISTRY.COM::MORE CHEMISTRY ON THE WEB |
LabVIEW programming topics - optimize vis for speed
[LabVIEW vi collection]
[LabVIEW links]
[LabVIEW bookstore]
[programming topics] [drivers] [device simulators] [utilities] [projects] [events] [related topics] LabVIEW vi optimization tipsWhen your virtual instrument (VI) is too slow then take notice of the following methods that are available to optimize your vi for speed. Run sub VI's as subroutinesThis method will reduce the overhead when the sub VI is called. The payoff is that you cannot run the sub VI as a normal VI and that the sub VI is somewhat limited; like you can't use property nodes.
Use property nodes rather than local variablesWhen you make a local variable you make a local copy of the original variable. When you make a property node you make a reference to the original value. Don't use anti-aliasingAnti-aliasing in graphs can be used to enhance the visual aspect of graphs. The disadvantage is the time it seems to consume.
Consider small delays in parallel loopsThere are many cases where using parallel loops in a VI is really convenient. If a loop doesn't need attention all the time then you should add a (small) delay. For example:
Keep the communication openIf you communicate with a serial device, or even with a DDE server, then keep the communication open. While you open the communication you create a reference that you may use throughout the lifespan of your VI. Just before the VI ends you can wire this reference to a close node. Bart Boshuizen, 2006/01/16
|
|