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: 

customizing gauge control into a steering control

Solved!
Go to solution

I would be using steering sensor and in order to show steering position on front panel, one of the possible ways could be to customize gauge control. I have seen custom control example in find examples hence believe gauge control could be customized into anything user would like it to appear as. I would like gauge control to be appeared as shown in attachment but I've got no clue how to create steering image, replace with gauge needle and so on.

Any ideas please!

Best regards

 

0 Kudos
Message 1 of 7
(5,978 Views)

kwaris wrote:

...shown in attachment but I've got no clue how to create steering image, replace with gauge needle and so on.

Any ideas please!

Best regards

 


LV does not supporting importing custom graphics that will ROTATE. Non-rotating yes. Rotating no.

 

You have two options.

 

1) Create a Pict Ring with all of the images you will need to render the wheel. If the number required for your app is just to high to define all of the images then....

 

2) Render teh image of the wheel usinga picture control.

 

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 7
(5,976 Views)

Thanks Ben,

I created pic ring as per code below. In my case there's only two image to import. one is wheel and everything as shown and second is small white rectangle which should move as steering position changes. I have no clue how to see this white rectangle to respond to knob as in the code.

Could you have a look for me please.

( I created image for control in ppt I am surprized when I imported it in picture ring and saved project explorer it appears as ctl file but in project folder it apppears as ppt file) 

Cheers

 

 

0 Kudos
Message 3 of 7
(5,949 Views)
Solution
Accepted by kwaris

Dear Kwaris,

 

I think you missed the point Ben was making. I believe he is suggesting that you have numerious images (each showing a different wheel position) and create code which cycles through the positions. A very reasonable approach.

 

Please have a look at my attached code. It was a bit of a rushed effort, but it illastrates that your original idea is possible. Like I say, this method is far from eligant. Resizing the control will spoil the effect.

 

There are loads of articles and tutorials on created custom controls - including this awesome community page.

 

http://decibel.ni.com/content/docs/DOC-4819

 

Hope this has been useful,

Best wishes,

Message Edited by RER on 03-02-2010 08:12 AM
Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
Download All
Message 4 of 7
(5,917 Views)

Thank you so much.

 

0 Kudos
Message 5 of 7
(5,889 Views)

There's already a steering wheel made for you in the "Truck Fuzzy Control.vi" example but it uses the PID toolkit so I don't know if you have it.

 

I'll attach the subVI.  It's the second method that Ben mentioned. 

 

You'll also have to add code to resize the nifty steering wheel image if you need it bigger. 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 6 of 7
(5,874 Views)

BeauGauge Instrumention Suite pro Can makes your target came true with its simple operation. 

Trial download : www.beaugauge.com/en/dwonloadv2.html

 

207-rotate-example-gauge-iocomp-dundas-activex gauge-Industrial Control-Dashboard-Widget-beaugauge.jpg

0 Kudos
Message 7 of 7
(5,371 Views)