LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel

Controlling FP object programatically.  Here is my problem: Selected object (Combo Box) keeps moving to the top of the window during several initial repeated runs of the same vi routine after LabVIEW is turned on.  See the attached file with block diagram.  Thanks for help, Jandrsc

0 Kudos
Message 1 of 7
(3,462 Views)

We can't debug a pdf file.

 

Please attach the actual VI so we can play with it.

 

Try executing with Highlight Execution on so that you slow it down and might be able to see where in the code the changes are happening.

0 Kudos
Message 2 of 7
(3,444 Views)

Please post the VI rather than an image of the block diagram. It is unlikely that anyone will take the time to reproduce your diagram to try to see what is happening. It may be that some configuration setting which is not shown on the image may affect the behavior.

 

I would expect that the combo box would move to the top of window when the VI is run. It may have something to do with the way you are manipulating the label position.  After the fourth run does it continue to move or does it stay in that position?

 

Property nodes can be expanded downwards so you would only need two, one for each object. Note that the properties execute from top down when multiple properties are included in one node.

 

Also, you should have some delay in the while loop so it does not spin millions of times per second and consume all available CPU resources.

 

Lynn

0 Kudos
Message 3 of 7
(3,441 Views)

This is the first time I've seen a PDF source code...

Please include a Snippet of your code, or attach your VIs, so that we can better assist you. We are here to help, but won't spend all day recreating your code from scratch.

 

There are two property nodes setting the top and left positon of the combo box... So this is where something weird is happening. Share the code for us to help more.

 

By the way, property nodes can be combined in to one single node with multiple inputs and outputs. Just drag down and they operate from top to bottom.

 

 

Edit: 35 minutes with no replies, then 3 at the same time saying the same thing!

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 7
(3,439 Views)

jandrsc a écrit :

Controlling FP object programatically.  Here is my problem: Selected object (Combo Box) keeps moving to the top of the window during several initial repeated runs of the same vi routine after LabVIEW is turned on.  See the attached file with block diagram.  Thanks for help, Jandrsc


That's because the label is part of the control. When you set the top position of the control to 0 it sets the upper most part of the control to position 0. You then change the top position of the label so when you run it again the upper most position of the control have changed.

 

Ben64

Message 5 of 7
(3,408 Views)

Programatical control of combo box and its label on FP in LabVIEW 10.  How to fix selected position of the combo box so it does not move with each repeated run?

0 Kudos
Message 6 of 7
(3,345 Views)

Don't create a new message thread when you are already being helped in another thread.  I moved your message into your original thread.

 

Thank you for attaching your VI so we can play with it.

 

It looks like Ben64 figured out the source of your problem in this original thread.

 

Basically, keep moving the position of the label.  When I disable the part of your code that moves the label position, then you label and text box stay in single position on every run of your VI.

0 Kudos
Message 7 of 7
(3,321 Views)