silmaril Posted August 1, 2007 Report Share Posted August 1, 2007 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! Quote Link to comment
Grampa_of_Oliva_n_Eden Posted August 1, 2007 Report Share Posted August 1, 2007 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 Quote Link to comment
jaegen Posted August 1, 2007 Report Share Posted August 1, 2007 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 Quote Link to comment
Yair Posted August 1, 2007 Report Share Posted August 1, 2007 QUOTE(silmaril @ Jul 31 2007, 03:21 PM) I know that this can be done using a picture control and a lot of LV code. Not that much code. Check out Altenbach's example http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=748#M748' target="_blank">here. Now you just need to modify it and create a subVI out of it. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted August 1, 2007 Report Share Posted August 1, 2007 QUOTE(yen @ Jul 31 2007, 03:17 PM) Not that much code. Check out Altenbach's example http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=748#M748' target="_blank">here. Now you just need to modify it and create a subVI out of it. 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 Quote Link to comment
silmaril Posted August 3, 2007 Author Report Share Posted August 3, 2007 ZITAT(Ben @ Jul 31 2007, 09:27 PM) You can import the graph but they will not rotate about the axis of the guages needle (for example). 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 here. 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! Quote Link to comment
popul Posted January 18, 2016 Report Share Posted January 18, 2016 Hi Sir silamril.. I just wanna ask if you already have a solution for this?I have exactly the same problem with the needle gauge...Thanks. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.