LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Easily Expandable Controler Code

I have been searching for the best method to create highly expandible code for control and acquisition of an large experiment (60+ data channels) but I haven't yet found anything that I thought was sufficient. I suspect many people have this concern, so I wanted to see what other solutions are out there.

 

Obviously, object oriented programming is a great help to creating expandable code (Object Oriented Video). I'm still unsure of how to structure the objects however.

 

I tried working with arrays and clusters with limited success. The solution I'm playing with right now is a Name Referenced Array (see attached). It is a cluster containing an array of type defined enums, called "Name" and an array of values. The type definition of the "Name" enum contains one value for each array in the element you want. To initialize, you loop through each possible value of the enum and initialize a corresponding array index to default. Now you have a corresponding value for each item in the enum. You can write a member VI that takes the new value and "Name" type defined enum and writes the value to the correct element of the array.

 

This has made it very easy to apply the same process to a large amount of data (particularly with child data traveling on parent wires) and the code is as readable and self updating as clusters. The Name Referenced Array can only carry one data type however, unlike clusters (this could be mitigated by using a Name Referenced Array of objects or clusters).

 

What other techniques exist for large, maintainable, expandible programs? I can't be the first person to worry about this. Thanks for any advice.

0 Kudos
Message 1 of 2
(2,153 Views)

Check out this:  http://www.ni.com/largeapps/ 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 2
(2,149 Views)