LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a 3 color tank indicator?

Hi there,

 

I'm having the same problem because I use version 7.1.

Can anyone show in more details how can I stack one tank on top of the other.

 

Thanks in advance.

0 Kudos
Message 11 of 17
(935 Views)

In the UI editor, create two tanks. Move one until both controls overlap... You can also use SHIFT + F10 to enter the coordinates directly.

0 Kudos
Message 12 of 17
(930 Views)

Hi Wolfgang,

 

Thanks for you answer, but I could not figure out how to do it. Could you be so kind and add some pictures? I am also using a german version, which doesn't make things easier.

 

Thanks.

0 Kudos
Message 13 of 17
(925 Views)

I am afraid that I don't really understand the problem...:

 

1) In CVI, you can create a new control in the UI editor using the menu bar: Create / Numeric / Tank

2) Duplicate it: Ctrl+C, Ctrl+V

3) Edit the control coordinates: selct a control and click SHIFT+F10

 

 

0 Kudos
Message 14 of 17
(923 Views)

Hi Wolfgang,

 

Sorry, I thought one tank would be inserted inside the other until form 3 ones. But actually the solution is just to approach one tank near the other. Now I understood.

 

Thanks a lot.

0 Kudos
Message 15 of 17
(919 Views)

I am happy to hear that! Good luck with your project.

0 Kudos
Message 16 of 17
(914 Views)

For a better aspect of the resulting control, I suggest you to use an additional tank to display the scale: place the fourth tank below the other 3 and set its colors to transparent so that it has no effect on the other.

Additionally, you may want to paint the needle in transparent so that it is not visible for the unused tanks.

Another hint can be to set range checking for the 3 tanks to "ignore": this way, you can simply SetCtrlVal on the same value to all tank controls and have the correct visualization for the "compound" control without need to detect which control to set in each condition.

 

Look at this picture for the result of all this:

MulticolorTank.PNG

 

Attached the sample UIR file for you to test.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 17 of 17
(904 Views)