From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Vi will not position properly when 'reentrant execution' is checked.

TestStand 3.5 using the parallell process model, LabView 8.01.
 
I have written a VI which is called during the PreUUT callback. Since I have a dual socket configuration using the parallel model, there are two PreUUT threads; one for each socket.
 
Inside of the VI, it determines how big the monitor is and positions itself in the upper lett for socket 0 and the uper right for socket 1. This works fine as long as there are two VIs with different names. (I just copied the VI and renamed it for socket 1. The socket number is a passed parameter so it knows where to position the VI)
 
But I want to use the same VI for both sockets. I tried changing the VI Properties:Exeecution to check the Reentrant execution box. This does allow me to use one VI. TestStand starts up two clones; one for socket 0 and one fofr socket 1. But the positioning code no longer works. The VIs are just thrown up on the screen.
 
I changed the VI so that I could see where the new screen coordinates were and they were correct. For example, the clone for socke 0 was supposed to be positioned to Top=20 and Left=20. The values were correct, but the VI was positioned near the moddle of the monitor.
 
It appears that the cloning process has screwed up the operation of the VI. I have attached it, in case you want to investigate for yourself.
 
If you run this from LabView with Socket=0, it goes to the upper left. If you stop it, change Socket =1 and run again, it goes to the upper left. If you run this from TS, calling it from PreUUT, it does not work.
 
 
 
 
0 Kudos
Message 1 of 5
(3,333 Views)

Hi checkers18,

I was able to replicate the behavior you saw of the VI not positioning correctly. I did discover as well that it was not an issue with TestStand but rather LabVIEW itself. The VI works fine under these scenarios in LabVIEW:

- If VI is non-reentrant, it always works
- If VI is reentrant and is called as a top-level VI

The VI doesn't work if the VI is reentrant and is called as a subVI.

I have filed this as a bug. Thanks for the find!

Best Regards,

Jonathan N.
National Instruments
Message 2 of 5
(3,308 Views)

Hello,

i have a similar problem with showing two vi frontpanels in TS. Iám using the FP.Runtimeposition.Userdefine to change the position of frontpanel 2. But at the first start of this vi it is displayed at the default position (above frontpanel 1).  At the second start it appears at the wanted position. How can i tell the vi to appear at the first start at the wanted position?

regards

Schwede

 

 

0 Kudos
Message 3 of 5
(3,245 Views)
Hi Schwede,

Is there a small piece of code you can isolate this to, and post on the forum?  Do you agree that this problem seems to be isolated to LabVIEW, and not TestStand which is calling this code? 

Cheers,
David Goldberg


Cheers,

David Goldberg
National Instruments
Applications Engineer
0 Kudos
Message 4 of 5
(3,221 Views)

I think it is a LV programming problem. At the first start of the vi it doesn`t know the position that i want and open the frontpanel at the default position. In the LV code i ask the vi to show (move?) the frontpanel at the wanted position. But the frontpanel do this not immediatley but at the next start of the vi.

Have I used the wrong code?

 

regards

 

Schwede

 

0 Kudos
Message 5 of 5
(3,212 Views)