LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming flow

I'm using a Menu selectable front panel vi  which in turn uses a Event Driven Structure.  The user wants to select a dozen or so different setup parameters for his test.  Each event is a user selectable parameter.  Sometimes an event may have subvis that are called to select a particular parameter.  When I actually run the test I have over 12 "flow lines" running into the event structure that runs the test.  Its a mess of spaghetti lines going into the vi that does the testing.  Any suggestions on cleaning up the event that runs the test vi and has all those setup lines running into it ??  Clusters ??  local variables ??
 
Thanks
Clint
0 Kudos
Message 1 of 4
(2,780 Views)
Sounds like a job for clusters.
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 2 of 4
(2,770 Views)

Clusters can usually help this problem.  all data which has some logical connection can be placed in a cluster much like a struct in c.  One additional node since the data is going to be passed in and out of many subvis and cases (where it is used) you should make the cluster a typdef and use the typdef for all data passing, this will make your program much more flexible since changing the cluster in the typdef will pass changes to ALL copies of this typdef.  So if you later decide that you need an additional parameter, add it to the original typdef vi and presto no broken code.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 4
(2,760 Views)
Thanks everyone.  Cluster were the way to go.  It cleaned up everything nicely.  I didn't have the time to learn and the web documentation on typedefs was terrible.  Maybe the next project.
0 Kudos
Message 4 of 4
(2,722 Views)