Jump to content

Rotating image with customized knob control?


Recommended Posts

Hi folks,

I would like to have a control that shows an image that can be rotated easily.

I know that this can be done using a picture control and a lot of LV code.

Looking at the controls that come with LabVIEW, I can see that something very similar to what I am looking for is already there: The knob / dial / meter / gauge (which is basically all the same as far as I can see).

I tried customizing those controls and importing another picture for the needle. This works fine. My imported picture is moving in a circle whenever values change. Unfortunately, it only moves around, it doesn't rotate :( .

Does anyone know a way to have a rotating knob with my own picture on it?

Or maybe there is some other way which I just didn't see?

Thanks in advance for any help you can give me!

Link to comment

QUOTE(silmaril @ Jul 31 2007, 08:21 AM)

Hi folks,

I would like to have a control that shows an image that can be rotated easily.

I know that this can be done using a picture control and a lot of LV code.

Looking at the controls that come with LabVIEW, I can see that something very similar to what I am looking for is already there: The knob / dial / meter / gauge (which is basically all the same as far as I can see).

I tried customizing those controls and importing another picture for the needle. This works fine. My imported picture is moving in a circle whenever values change. Unfortunately, it only moves around, it doesn't rotate :( .

Does anyone know a way to have a rotating knob with my own picture on it?

Or maybe there is some other way which I just didn't see?

Thanks in advance for any help you can give me!

I submited that as a bug (I don not remeber the CAR#).

I got the impression that issue will not be fixed soon due to low demand for such things.

The best I can advise at this time is to contact NI and let them know that yet another person could use this functionality.

Ben

Link to comment

There may be an easier way of doing this with the 3D Picture Control. You can probably create a mesh and apply your image as a texture, then control the rotation programmatically. I only started fooling with this yesterday, so that's about the extent of my knowledge. The "solar system" example ("\LabVIEW8.2\examples\picture\3D Picture Control\solarsystem.vi" shows how to use images as textures, and the "Order of Transformations.vi" example show how to rotate etc.

Jaegen

Link to comment

QUOTE(yen @ Jul 31 2007, 03:17 PM)

Yair and Jaegan,

I think the questioner wants to custmize the needle on a guage and use like you (Yair) taught us in your control customization Nugget.

You can import the graph but they will not rotate about the axis of the guages needle (for example).

Ben

Link to comment

ZITAT(Ben @ Jul 31 2007, 09:27 PM)

Yes Ben, you summed up my problem exactly. :thumbup:

ZITAT(yen @ Jul 31 2007, 09:17 PM)

Not that much code. Check out Altenbach's example
. Now you just need to modify it and create a subVI out of it.

Thanks very much for this link, yen!

You are right: This is far lesser code than I thought.

Maybe I should try putting this into an XControl. Using a circular image with transparent "edges" and a transparent picture control should provide the impression of a circular control as I need it.

Plan B is using a picture ring with predefined pictures at certain angles. This would work as long as I only need quite big angular steps (which I don't know for shure at the moment).

Thanks to all for your answers!

I think you helped me a lot! :D

Link to comment
  • 8 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.