LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I make a user imported image rotate on a control?

I am trying to import a graphic to use in place of the needle on an indicator. When i do this, however, the image does not rotate, it merely moves around while maintaining its original orientation.

Is there a way that I can import my own image into a control or indicator, and have it rotate (pivot around some center) when given a numerical input, such as 0 to 360 degrees?
0 Kudos
Message 1 of 3
(2,867 Views)
Hi Kevin12345,

I do know of a way to import an image to control... and have it rotate.

Depending on the complexity of your image, a picture control may be usefull.

The Robot arm example demonstrates how an angle can be used to control an image. If the image you are trying to import to complex to code, this may not be viable.

If you can be happy with a reduce resolution (i.e. interger degree steps only) you could use your favorite image edit app to rotate the image one degree at a time, and then import each image into a picture ring.

All of these work-arounds lack scaling.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,867 Views)
> I am trying to import a graphic to use in place of the needle on an
> indicator. When i do this, however, the image does not rotate, it
> merely moves around while maintaining its original orientation.
>
> Is there a way that I can import my own image into a control or
> indicator, and have it rotate (pivot around some center) when given a
> numerical input, such as 0 to 360 degrees?

The short answer is, knobs and meters don't work that way. Their meter
is a vector based graphic. If replaced with another graphic, even like
the hemispherical hole in the 3D one, it no longer rotates, must moves.

It turns out that rotating bitmaps is pretty slow, and it doesn't
necessarily look that great either. You can probably find some bitmap
rotating VIs that wor
k with the picture control.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,867 Views)