LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel Offset

I am using VI server to open the front panel of various subvi's.  I'm using property node FP.WinBounds to set the sizing and location of the front panels and it works great.  Oddly however, the first time the application is run, the first front panel that is opened is offset downward by about 20 pixels.  After returning back to the main vi and then going to any of the subvi's with a displayed front panel, the front panel is located correctly.  In other words, it's only the first time when a subvi is displayed that I have this problem.  Actually it's more of a nuisance than a problem.  I have this problem in all my applications that uses a displayed subvi.  I am currently using LV v.8.6 but have had this problem with v.8.5.1.  (I don't remember prior to v.8.5.1)  I have this problem when the built application is installed on both Win-XP and Vista machines.  Which reminds me, I only have this problem with build applications.  The development version works OK.

 

What could be the cause of this?

  

Dave

0 Kudos
Message 1 of 8
(3,632 Views)

Hi Dave.  Is the origin of the front panel properly aligned within the LV frame?  Don't know that this is the problem,

but I found that if I align the origin properly then the strange 'jumps' are eliminated.

 

If you look closely at the alignment grid of the FP you will see one intersection that is a small, 45 deg. rotated square

or bigger dot.  Shift your FP until this intersection is the very top left of your view frame.  You will probably have to 

shift your FP elements to get the picture back the way you want it.  This eliminated the first open shift for some of

my VIs.  Never did figure out why it didn't for others 😉

 

Hope this helps.

 

Matt

0 Kudos
Message 2 of 8
(3,607 Views)

Hi Matt,

 

Thank you for responding and I apologize for the reply delay.  The upper right-hand corner of the front panel in the various server subvi's are not aligned with the central dot.  However, the offset amounts are different for the various vi's and also the amounts are not representative of the offset when the application first starts.  I have several subvi's that would need to be changed.  But the bigger problem is that there are many hidden objects that I would also have to find and align.  Aligning all the subvi's and hidden objects would be a daunting effort; especially when I'm skeptical that it will solve the problem.

 

To fix the problem I had the main vi temporarily open one of the subvi's and then have it promptly closed.  The end user sees a blip of activity when the application initially starts.  After it runs through this routine the rest of the application falls into place.

 

Thanks,

 

Dave J.

0 Kudos
Message 3 of 8
(3,536 Views)

Dave,

 

Does this happen with even simple VIs, or does this offset only happen when there is a more complex front panel?

ColeR
Field Engineer
0 Kudos
Message 4 of 8
(3,503 Views)

I have this problem only with subvi's that are controlled with VI Server.  An earlier statement said that I have this problem only with built applications.  It turns out that I also have this problem when running in the development stage.  Most of my subvi's that are controlled by VI Server are set up using the Front Panel Window >> Window Bounds property node (Class: VI Server >> VI >> VI) in the initialization sequence of the subvi.  I don't seem to have the offset problem for the subvi's a that do not have the window bounds defined.

0 Kudos
Message 5 of 8
(3,497 Views)

Dave,

 

Will you port some code that shows this behavior? 

ColeR
Field Engineer
0 Kudos
Message 6 of 8
(3,480 Views)

Attached is the application where most of the functional programming has been stripped out.  What’s left is the main vi and a subvi that is called with VI Server.  A type definition is also provided.

 

A screen shot shows the offset when the subvi is opened the first time.  The Done button in the lower right-hand corner is almost hidden. This example was prepared with LV v.8.6 and the problem is also noted in v.8.5.1.  The OS is Win-XP and the problem is also present with Windows Vista.

 

The system path needs to be defined in the main vi.  In this case I had the three files residing in the Desktop.

 

Run the main vi and then click the System Setup button to open the subvi to see the offset problem the firtst time.  Return back to the subvi and offset problem corrects itself.  Close and re-run the main vi to see the offset problem again.

0 Kudos
Message 7 of 8
(3,413 Views)

Dave, 

 

I can verify the behavior that you described, but cannot figure out what could be causing this.  I will be taking some time here to figure out what is happening and will let you know what I find. 

ColeR
Field Engineer
0 Kudos
Message 8 of 8
(3,367 Views)