04-23-2009 02:35 PM
Hello Ryan and Ben,
The second post on this forum mentions that Xcontrols run in a different context than your other VIs. I am wondering if by calling your VI dynamically it also spawns in a context that is different from the Xcontrol. When you call this VI normally do you experience this behavior. I am going to do some more reasearch on this issue and hopefully have a better answer. Let me know if you find a solution.
04-23-2009 02:53 PM - edited 04-23-2009 02:53 PM
04-23-2009 02:54 PM
HI Jon,
Just moments ago Ryan recieved notice that "Glen" form R&D is looking into this issue.
Thank you!
Ben
04-23-2009 03:00 PM
04-23-2009 03:08 PM
Hey guys,
I have talked to Glen and we will see what we can come up with.
05-01-2009 11:16 AM
Ok - this is what I have found. The Functional Global within the XControl is not the problem. The FG inside the XControl is working properly as is evidenced by the Facade being updated with the correct information.
Here is what I found is happening. I tried to use information inside the XControl to update the Data Output of the XControl when it is read on the block diagram. The problem I ran into when dynamically launching VIs is that the XControl terminal on the block diagram is not outputting with the updated information from when the Facade VI executes.
I have found that this is a TIMING issue. The dynamically launched VIs are activating the XControl Facade VI and the Facade is attempting to output the Data Out with the values since I have Data Change? set to true. The problem is that the terminal on the block diagram is being read too fast when the VI is being launched Dynamically and the FP.open method is used and followed by the method VI Run with no time delay. If I put a slight delay of about 200ms between the FP Open and the VI Run than the XControl on the regular VI that is dynamically launched will get the correct value out of the XControl. VIT dynamically launched VIs require a little longer.
I noticed it was a timing issue when I put a breakpoint in the Facade VI and found that the calling VI did not stop and wait for the Facade to finish executing before trying to read the data out.
Maybe this is by design?