Jump to content

Programmatically setting a value in a cluster


crelf

Recommended Posts

QUOTE (Chris Davis @ Aug 4 2008, 03:48 PM)

It sounds like http://forums.lavag.org/-t11380.html&view=findpost&p=48336' target="_blank">VIE has something internally that meets your needs. Chris describes the background process with enough detail to make it feasable with a little work.

Our internal CVT example isn't quite what you're looking for (you could do what you want with it, but it'd take some work) - I think Ben's nugget is probably your most viable option to start with, but please post back if you get stuck (there are a few other options that I'm not immediately at liberty to disclose :ninja: )

Link to comment
  • 2 weeks later...

QUOTE (MJE @ Aug 4 2008, 10:41 PM)

I'm currently working with LabVIEW 8.5...

Let's say I have a cluster with a bunch of controls in it: {Control0, Control1, Control2, ..., ControlN}. Is there any way to set the value of ControlX if the value of X isn't known until run time? That is the bundle nodes won't work because in the development environment, there's no way to actually know which element to wire.

...

You can change the values of controls embedded in a cluster by using bundles.

However, you cannot change the definition of the cluster (i.e. the definition of the

type of a control in a cluster and I guess this was actually your question.)

As for a structure, a cluster must be declared, e.g. you must define it

before you run the VI and there is no way to modify its definition programmatically.

In the initialization part of your program, you can define a very general cluster,

a cluster with all the types you could need during execution

and then use case structures to decide which control to use/modify.

Definitely not elegant but it works.

Hope this helps.

G

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.