12-08-2011 04:53 AM
Hi everybody,
I am developing a program for an automated test system to determine the cut off frequency of low pass filters.The filters in question are simulated in labview as sub VIs with two inputs (input voltage and frequency) and one output (output voltage.
I have already developed a program that can interrogate one filter and determine its cut off frequency.
My challenge is how to test any of the filters automatically without writing parallel codes for all of them.
Put in another way, I want the program to ask the user to load any of the filters (sub VI) from the desktop or from any other location so the the code I have already writing can interrogate the filters and determine the cut off frequency
Any suggestion will be appreciated
Thanks.
kaydgreat.
12-08-2011 05:44 AM
There are a couple of ways to do this, depending on your ability. You can do it with a heirarchy of inherited classes, or a selection of VIs with the same connector pane layout. (These are basically the same; classes would be more manageable, and selectable VIs probably quicker to implement)
Search the example finder for 'plugin' to find a plug-in architecture of the latter of the above methods.
12-08-2011 07:59 AM
Using classes will result in cleaner, smaller, easier to maintain, code than using multiple subVIs. But it will take longer at the beginning and will take a bit more planning.
12-08-2011 08:57 AM
Open VI reference -> Invoke node:Run VI (-> Close ref)
That way you can start most any VI programmatically.
/Y
12-08-2011 09:00 AM
@DFGray wrote:
Using classes will result in cleaner, smaller, easier to maintain, code than using multiple subVIs. But it will take longer at the beginning and will take a bit more planning.
Agreed. Classes will provide a more solid develpment platform.