12-07-2005 11:53 AM
12-07-2005 12:30 PM
12-07-2005 12:43 PM
12-07-2005 12:54 PM
12-07-2005 01:32 PM - edited 12-07-2005 01:32 PM
Message Edited by jasonhill on 12-07-2005 01:33 PM
12-08-2005 07:29 AM
"...the number of wires! I sometimes have too many."
Please post an example showing too many wires.
Action engines are a great way of reducing the number of wires. They can be coded similar to file I/O function. Behinf the scenes there are lots of wires (data values) that ware required to support your file I/O. File Atribute Blocks, Record attribute blocks, etc (ther can be a hundred fields) but they are all associated with the File reference.
So for another twist on this subject I recomend looking at "action engines".
They store data that is related to a specific function in shift register of a single VI that can be invoked using a variety of "actions" (methods). This way the data used to perfom that function do not have to be moved around from one part of the code to another. They reside in a single location and accessed when required.
Ben
12-08-2005 07:44 AM
Ben,
I am just looking for general ways to unclutter things, thanks.
12-08-2005 10:08 AM
This question is somewhat related....
When you use a lot of wires, and have many wire connections going into and out of sub VIs doesn't labview start eating up all the system memory? Also, doesn't this lead to labview having to perform a lot more functions to move around this data?
What I'm getting at is this... When developing a medium size application (that being one which communicates with ~10-20 instruments across gpib, rs232, parallel, usb, etc), what should be the "general" idea of efficient programming. Should I use a mixture of global vars., sub VIs called normally, sub VIs called through VI server, etc. in order to limit the amount of wiring? If someone could just maybe give a superbrief explanation and efficient programming practices or head me in the right direction that'd be cool.
jonathan
12-08-2005 10:22 AM
12-09-2005 08:05 AM
Use of object-oriented programming techniques will greatly help medium sized program development (or almost any size, for that matter). If you are unfamiliar with object oriented techniques, try to break your problem into a set of objects - data/function sets which logically go together and interact with each other. For example, a graph would have X and Y axes objects, as well as a display object and perhaps a buffer object. I have attached an NI Week presentation which should serve as a simple introduction to the subject. It uses functional globals as the data repository. The LabVIEW versions are 7.1 and 7.0.
If you want more information one the types of data repositories, check our the thread on Clusters as data structures. Several options are given, with benchmarks. I have switched to using queue based repositories for my current development.
Let us know if you need more info :).