LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access to Global Variables within XControl does not work

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.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 11 of 16
(1,119 Views)
If the subVI is on the block diagram of the Main VI (gets loaded into memory "normally" ) I do not see this behavior and the Xcontrol works correctly.
Message Edited by RVallieu on 04-23-2009 02:53 PM
Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 12 of 16
(1,113 Views)

HI Jon,

 

Just moments ago Ryan recieved notice that "Glen" form R&D is looking into this issue.

 

Thank you!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 16
(1,110 Views)
I don't think Glen is R&D but he indicated when I spoke with him that he is working with R&D on this service request.
Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 14 of 16
(1,107 Views)

Hey guys,

 

I have talked to Glen and we will see what we can come up with.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 15 of 16
(1,105 Views)

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?

 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
Message 16 of 16
(1,045 Views)