LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically combine clusters

Hello,

i have an application in which a user chooses which hardware instruments he likes to use. Then he should be offered the settings clusters of only the instruments he chose.

I had an array of the settings clusters in mind. But since it is not possible to have an array of clusters of different types i need another solution.

(The main application makes use of LV-OOP, but a simpler solution is also appreciated)

 

Example file of how i would like it is attached.

 

Many Thanks

Marvin

0 Kudos
Message 1 of 13
(3,413 Views)

OOP is your simpler way.  Each instrument should be its own object.  Then for each class, you have a configuration dialog VI for setting it up.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 13
(3,381 Views)

Each Instrument is already a class. Each class has a init VI with different inputs (GPIB port, bus, filter, etc.)

As i mentioned before, i want a set of clusters (or someting similar) to show the user all instrument settings at once.

0 Kudos
Message 3 of 13
(3,378 Views)

nollMarvin wrote:

As i mentioned before, i want a set of clusters (or someting similar) to show the user all instrument settings at once.


But in your original post, you said "I have an application in which a user chooses which hardware instruments he likes to use. Then he should be offered the settings clusters of only the instruments he chose."  So present an array of Instruments, choose one, then display the Cluster of Settings specific for that Instrument.  I suppose if you want to compare the settings of Instrument A and Instrument B, you could Choose A, View A Cluster, Reject A, Choose B, View B Cluster, etc. 

 

Bob Schor 

0 Kudos
Message 4 of 13
(3,367 Views)

As my VI shows, the idea is, that the user can select multiple instruments (more than one) at once. So i need to display not one but N clusters.

0 Kudos
Message 5 of 13
(3,364 Views)

Again, you have to do this with OOP.  You can have this display be your initialization VI.

 

What I do for my systems is store all of the settings in a configuration file and use that for setting up my equipment.  OOP makes this simple as it just reads the settings that class type needs.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 13
(3,361 Views)

Since the port and bus configurations change regularly, i don't want to use config files but promt the user each time. 

0 Kudos
Message 7 of 13
(3,327 Views)

@nollMarvin wrote:

Since the port and bus configurations change regularly, i don't want to use config files but promt the user each time. 


There a multiple ways to do this. Biggest problem is lv doesn't do dynamic control creation very well. So you'll have to be creative.

 

A tree control works well. Each class can add there own configuration scalars to the tree, and the user can select tem and change the values.

 

Or each class can return a reference to a vice that the caller shows in a subpanel. You'll need to switch subpanel content as the user select a device. Or make enough subpanel's to fit the maximum nr of devices. The device class can specify the size of the subpanel it needs.

0 Kudos
Message 8 of 13
(3,303 Views)

Thanks for your reply.

I also hab the tree control in mind. But i didn't consider it further because of the different data types.

In my understanding i would have use strings and then parse the data, e.g. a path, from that string. Is there a way around this?

 

If not i might use a subpanel for each device.

0 Kudos
Message 9 of 13
(3,299 Views)

I believe there may be some free toolkits available through VI Package Manager for tree-like data structures.  One is aptly named 'Tree' from NI.  It supports storage of the actual LabVIEW data types within each node of the tree which can make it easier to extract.  It also supports data visualization in a tree control.

0 Kudos
Message 10 of 13
(3,291 Views)