LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to create Clones With Different BindingPath?

Hi guys 

I'm trying to generate two clones of a VI (Nest.vi), this vi has a Control (Button1), what I need to do is programmatically set Button1’s Binding Path for each clone, let’s say for Button1 Clone1 BindingPath = “My Computer\DO\DO1-1” and for Button1 Clone 2 BindingPath = “My Computer\DO\DO1-2”.

 

For some reason both clones gets the BindingPath, in this case BindingPath = “My Computer\DO\DO1-2” for both clones, and I think this happens because this was the last was set.

This is an example of how im creating my clones

 

Main.vi

 

 

 

note... if i change the extension of Nest.vi to Nest.vit works perfectly (each clone has is own bindigpath).

so is there a way to fix it?

 

0 Kudos
Message 1 of 5
(3,217 Views)

Check if the VI is actually reentrant. I'm not sure that setting 8 is enough. Also, I would suggest looking into the Async CBR node, as that makes launching VIs and passing values simpler.


___________________
Try to take over the world!
Message 2 of 5
(3,212 Views)

Actually, something didn't feel right, since you say you do get two clones, so I'm going to assume you're taking the value of the BindingPath control and using it to set a property on your Button1. If that's the case, then I suppose it is theoretically possible that for some reason that property is shared between clones, although that sounds weird, because I'm pretty sure the entire panel is duplicated.

 

I would suggest testing this by placing a breakpoint inside the subVI before setting the property and then checking what the actual values are.


___________________
Try to take over the world!
0 Kudos
Message 3 of 5
(3,200 Views)

Yes im using Binding Path to set the BindingPath Property of Button1, and Yes i think that property is shared between clones too because i can change control values (different values for each clone)and works fine but some how for BindingPath Property doen not work!

 

Example2.JPG

 

 

 

 

by the way Nest.vi is reentrant 

0 Kudos
Message 4 of 5
(3,190 Views)

Rather than changing the property from outside, I would suggest changing it as the VI runs and reading the property all the time. That way you can see the effect immediately and be sure if it exists or not. I haven't tried playing with it, but even if I did, I wouldn't know to say whether it's a bug or not (I would vote probably yes, because of user expectation).

 

Some options:

  1. Use VITs.
  2. Don't use binding. Read and write the SV using the primitives.
  3. Use other communication channels. That's what I do. I think the last code I saw which had binding was from the LV 7 days, before SVs even existed.

___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(3,152 Views)