LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

v-shaped tank simulation

Hi!

I am a new LabView user and I need some help with simulating a tank-system.
I have 2 tanks, one vertical rectangular and one v-shaped tank. On the front-diagram I want two figures which indicates the level in each tank. The first rectangular one I find in LabView, but i cant find any v-shaped tanks which shows the level as it varies. Someone who knows how I can fix this?




0 Kudos
Message 1 of 8
(4,648 Views)
Perhaps you could take the normal tank and customize it.  Add decorations such as the flat up arrow that you could place on the left and right side of the tank.  Set the border to be transparent.  Have it set in front of the tank, but behind the scale.  It might take some playing around to get it to look right.
0 Kudos
Message 2 of 8
(4,628 Views)
As Ravens Fan pointed out, the answer is in control customization. Another option is to create an over lay that goes over the top of the indicator that has a V-shaped transparent cut in the middle (see attached).

The way I created this is using paint I created the basic shape (gray rectangle with white in the middle Vee). I then opened the bmp file in IrfanView (a neat editor that supports transparency) and saved it as a PNG. During the save, the program asked me what color to make transparent and I selected the white in the middle.

I then opened a blank VI, placed tank indicator sized it up a bit. I then dragged the png graphic onto the desktop and resized it to exactly fit over the tank. I colored the desktop to match the non transparent part of the overlay and TA-DAAAA - something that looks like a V-shaped tank....

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 8
(4,620 Views)
ah, thanks.. good idea!

i'll try this out 🙂




0 Kudos
Message 4 of 8
(4,618 Views)
A purely LV solution would be to use two triangular decorations sized to create the V effect in front of the tank indicator. Color them the same as the panel. The disadvantage is that the left decoration covers the scale. I overcame this by duplicating the tank indicator, hiding the label and making everything except the scale invisible, then positioning this in front of the decorations. Finally I select the two indicators and the decorations and Group them so that they can be handled as a single object.

In both this method and Mike Porter's method be aware that overlapping front panel objects can slow the graphics performance.

If you want the scale to match the volume in the tank rather than the depth, you may need to do some geometric calculations and create a custom scale.

Lynn

I see that this idea was posted while I was putting mine together.

Message Edited by johnsold on 12-29-2007 10:10 AM
0 Kudos
Message 5 of 8
(4,595 Views)
thanks for all good advices.

This might be a stupid question, but how do i make the borders of the Flat Up Triangle transparent? 😛
I have to modify the tank a bit more than what you guys suggested cuz its not 100% v-shaped.


0 Kudos
Message 6 of 8
(4,586 Views)
press spacebar once, to select the border, then select the upper right "T" (i think it was "X" in previus versions)
0 Kudos
Message 7 of 8
(4,565 Views)


Pnt wrote:
press spacebar once, to select the border, then select the upper right "T" (i think it was "X" in previous versions)



As long as I've known,  (back to 7.1) the T has been there.  If you see an X, that means you have something selected where you can't select transparency such as the front panel background.  (And that seems to be what I always accidentally select first when trying to get into the color picker. Smiley Surprised)
0 Kudos
Message 8 of 8
(4,546 Views)