12-04-2017 11:42 AM
Hi,
I am trying to load the Front Panel of a VI in a SubPanel when this particular VI is running in TestStand (using LV2017 and TS2016 SP1).
I am using the method shown here : https://forums.ni.com/t5/Example-Programs/Dynamic-LabVIEW-Subpanel-in-a-TestStand-User-Interface/ta-..., except I am using a UserMessage instead of the Trace UIMessage.
My TestStand sequence consists of 2 steps :
- Statement Step sending the UserMessage. The path to the VI is retrieved and sent to LabVIEW UI by the UserMessage Callback.
- Action step executing the VI I want to show in the SubPanel.
I then use an Open Reference and the Insert VI method of the SubPanel in the LabVIEW UI.
The problem is that the Front Panel is loaded in the SubPanel properly, but it is not updating during the execution of the VI (not displaying values in a waveform chart and not updating a boolean indicator).
I also get a similar problem with the example in the link above. The Front Panel of the VI opens in a window and shows in the SubPanel. However, only the Front Panel in the window is being updated.
Thank you
12-05-2017 03:42 AM
Hi sleb
Does any of the caveats apply to you application? (see your link: https://forums.ni.com/t5/Example-Programs/Dynamic-LabVIEW-Subpanel-in-a-TestStand-User-Interface/ta-...)
Do you use "reentrant execution" for your SubPanel-VI?
Could you share your SubPanel-VI and the sequence?
Best regards,
Chris
12-05-2017 08:14 AM
Hi Chris,
I'm working with 'sleb' on this issue.
As mentionned in his first post, the issue is visible even in the code found at the link you specified (this link is mentionned in his first post).
VIs are not reentrant.
We found several issues here :
So we have to find a way to force the entire front panel to refresh. We can do that into the LV step by adding a property node within our while loop, but that's extra code we don't want our customer to add. We need to find an 'external' way to fix this...
12-05-2017 09:02 AM
Hi CyGa
As you say... Looks like the problem comes from the UI Thread or the chart control.
In the past, we used also chart controls on the front panel of SubPanel-VIs. We had no problems with it so far.
Could you share a demo (Sequence and VI) witch demonstrate this effect?
This will help me (us) to analyse your problem.
Kind regards,
Chris
12-05-2017 09:17 AM
Hi,
The code is part of a bigger framework and somehow hard to isolate.
But the behavior can also be seen with the code furnished as exemple in the forum thread you pointed out.
The fact is that we must find a way to force the front panel to redraw... from the outside of the VI.
If you have an idea...
12-06-2017 04:29 AM
Hi
I can not see any problem with the example.
What do you mean with "... from the outside of the VI". Which VI?
An idea...
In your LabVIEW UI, first you open the VI reference to insert in the SubPanel.
Play around with the FP.State property (eg. minimize first and then set to standard).
Kind regards,
Chris
12-06-2017 08:05 AM
Very interesting !
So you see the plot moving into the graph embedded in the UI SubPanel ??
12-06-2017 08:28 AM
I have downloaded the example "oisubpanel.zip", which you can find here:
https://forums.ni.com/t5/NI-TestStand/Extra-Window-when-using-SubPanel/td-p/2705251
Yes, I can see how the curve moves.
12-06-2017 08:51 AM
OK, with LV2017 it doesn't move at all.
We've tried to modify most of the settings of the adapter or ways to catch the event cllbck and load the VI ref into the subpane.
Lookig at the code modified by users in the forum thread, I guess there is still a caveat : the graph is refreshed continuously so you get the updates when the FP is loaded.
But if you modify the example, and you add a LED on the 'VI to insert' 's front panel (dafult value = False), and set it right away to True it will appear turned off on the FP.
12-07-2017 01:26 AM
The modified example from the forum thread works fine on my PC (LV2017).
Also with the modification you have described (LED with default value = false and set it right way to true).