07-13-2016 12:34 PM
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
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?
07-13-2016 12:40 PM
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.
07-13-2016 12:56 PM
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.
07-13-2016 01:11 PM
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!
by the way Nest.vi is reentrant
07-14-2016 12:32 AM
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: