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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a moving ball in front panel

I am trying to create an object in the front panel that subjects can visually track as it moves from left to right. i am inexperienced with labview and have no idea how to create this, what controls or functions to use. 

 

Are there any examples of this anywhere?

 

I have a template of a red square that fades from a light to a dark shade when the vi is run which uses signal simulate to change the color of the square. I presume something similar is needed to create a moving object in the front panel?

 

Any help would be appreciated

0 Kudos
Message 1 of 3
(4,591 Views)

Check out this post.

=====================
LabVIEW 2012


0 Kudos
Message 2 of 3
(4,585 Views)

Hello alana,

 

The example posted above is a useful tool for moving indicators.  However, it is important to bear in mind that continuously refreshing the Front Panel and having your PC redraw the controls could slow down your entire application. 

 

Using some existing controls that can handle data changing could be a more scalable option for the future.  You could consider using:

  • An 2D XY Graph, where you keep redrawing data that appears to be a ball or box.
  • A 3D Picture control where you can move objects in 3D space.

Both controls can be found on the Front Panel under 'Modern'->'Graph'.  Context help (Ctrl+H) can advise you on how to pass data into an XY graph.  For an example on using 3D Picture controls, follow these steps:

  1. In the LabVIEW Main menu, navigate to 'Help'->'Find Examples'
  2. In the 'Search' tab, search 3D
  3. Open example 'Bouncing Ball 3D.vi'

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
Message 3 of 3
(4,533 Views)