LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Control Hourglass

I want to have Hourglass shaped custom indicator, so that if we give numeric values from 0 to 100, the (sand or water) should fall from top to bottom of glass. waiting for your kind help.

Thanks.

0 Kudos
Message 1 of 14
(5,263 Views)

This thread has a lot of useful information and a few examples on rotating a picture in a 2D picture control.

 

http://forums.ni.com/t5/LabVIEW/How-to-rotate-objects-or-pictures-on-my-FP/td-p/196148/page/3

0 Kudos
Message 2 of 14
(5,246 Views)

Thanks for the reply,

Not exactly, what i am look for. I need some nice way to indicate the user that "How much time elapsed for the particular process". We are thinking it show it in the  form of Hourglass.

0 Kudos
Message 3 of 14
(5,235 Views)

In addition to that, I dont want to rotate the hourglass. Sand should flow from top to buttom of the indicator, no rotation of hour glass is needed.

0 Kudos
Message 4 of 14
(5,233 Views)

You would call this code in a loop, and update it with the new position based on how much time has elapsed.

0 Kudos
Message 5 of 14
(5,222 Views)

I don't know a whole lot about graphics, but you could take the Sprites approach.  (From video games/simple animation).  Much like a flip-book you may have made as a kid, have a set of pictures for each portion of the hourglass being full/empty.  Then simply iterate/display through these images at a smooth frame rate.

 

I've never done this in LabVIEW, but this is how much 2D is done on mobile devices (something I have a bit more experience with).  I'm sure the methodology could be applied in LabVIEW as well.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
Message 6 of 14
(5,210 Views)

@MrHappyAsthma wrote:

I don't know a whole lot about graphics, but you could take the Sprites approach.  (From video games/simple animation).  Much like a flip-book you may have made as a kid, have a set of pictures for each portion of the hourglass being full/empty.  Then simply iterate/display through these images at a smooth frame rate.

 

I've never done this in LabVIEW, but this is how much 2D is done on mobile devices (something I have a bit more experience with).  I'm sure the methodology could be applied in LabVIEW as well.


This isn't all that bad of an idea because LabVIEW has a Picture Ring, where you load N pictures into a ring and then give it a value to display each image one at a time.

0 Kudos
Message 7 of 14
(5,200 Views)

It means that i should have 100 images of different positions of sand. It is tedious task. I was looking for custom designed hour glass indicator in labview. But now, based on your idea, i have something to start. Let me try this... Thanks for the reply.

0 Kudos
Message 8 of 14
(5,186 Views)

Well you don't need 100, what about 10? or 20? is that enough movement for the user to see progress?  You don't need one new picure for each degree is what I'm tryin gto say.  If not the original post I had lets you rotate down to something like 0.01 degrees or less.

0 Kudos
Message 9 of 14
(5,178 Views)

No 100% what you're asking for, but if you make part of your image transparent and place the approprite indicator behind your picture, you can get what you want. I played with the transparency alph channel in a png here... and did NOT take my time to make it pretty.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 10 of 14
(5,148 Views)