LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading bar

I'm just experimenting with creating a loading bar similar to that seen when you start up a Windows XP computer. It's still in its infancy, but i've got a couple of questions on it all the same.

  1. Why, when the VI is run for the first time (or when run after stopping it with the 'abort' button), is the loading bar filled with the last colour rather than starting blank or for the bar to start at the beginning?
  2. Why is there a little segment on the left that is the same as the first colour whenever the bar is passing through that point?
  3. Why is the frame of the slide bars so thick when it's not that thick normally? (the loading bar effect is created by superimposing several slide bars on top of one another)
I've attached the rather basic VI. I still have the variables as controls so that i can play with it whilst it's running. I've also attached a simple Hexadecimal colour chart so you know what colours you're inputting (if you want to play too - you never know how much free time needs wasting! ;))


Never say "Oops." Always say "Ah, interesting!"

Download All
0 Kudos
Message 1 of 14
(5,180 Views)

James Mamakos wrote:

I'm just experimenting with creating a loading bar similar to that seen when you start up a Windows XP computer. It's still in its infancy, but i've got a couple of questions on it all the same.

  1. Why, when the VI is run for the first time (or when run after stopping it with the 'abort' button), is the loading bar filled with the last colour rather than starting blank or for the bar to start at the beginning?
  2. Why is there a little segment on the left that is the same as the first colour whenever the bar is passing through that point?
  3. Why is the frame of the slide bars so thick when it's not that thick normally? (the loading bar effect is created by superimposing several slide bars on top of one another)
I've attached the rather basic VI. I still have the variables as controls so that i can play with it whilst it's running. I've also attached a simple Hexadecimal colour chart so you know what colours you're inputting (if you want to play too - you never know how much free time needs wasting! ;))
  1. Uninitialized Shift Registers in your For Loop
  2. I don't know.  You can make it larger if you change the value you initialize #1.
  3. I don't know
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

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

You may find this intresting

0 Kudos
Message 3 of 14
(5,148 Views)
The user has LabVIEW 6.1 so he won't be able to use the .NET solution. However, in that thread I posted an example of doing it with a horizontal slide, which should be available in LabVIEW 6.1. Unfortunately, I have no way to back-save to 6.1.
0 Kudos
Message 4 of 14
(5,129 Views)
I also am able to run LabVIEW 8.5 on this computer, though the code i'm writing has to be LabVIEW 6.1 compatible. I will have a look at your suggestions and get back to you. Thank you so far. 🙂


Never say "Oops." Always say "Ah, interesting!"

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

P.S. I've tried running the first few VIs from the thread using NET controls, but i think i get a similar problem to Mr. Jim in that i get the same error message which won't go away meaning i have to abort LabVIEW or let it stumble and crash! I cannot open or run the later solutions people provided since they're all in 8.6 - too big for my lowly 8.5! Could someone down-convert a few of the later ones please?

 

I initially tried accessing the windows progress bar(s) using ActiveX controls, but although i appear to be able to wire up the references and set their properties, when i try to run the VI i get an error at the first method/property node. The AxtiveX control references i've found which look(ed) hopeful are from the Microsoft Windows Common Controls 6.0 (SP4) Version 2.0 library. They are the ProgressBar (MSComctlLib.ProgCtrl.2), and the StatusBar (MSComctlLib.SBarCTRL.2). Any ideas for if i was to venture down this road or is this unwise?



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 6 of 14
(5,098 Views)

How could I simulate a progress bar with 256 'segments' (257 sliders)*? Either that, or is it possible to have a two-colour texture in one 'segment' where one colour at one end fades to the other colour at the other end? By 'segment', I mean the space between two sliders.

 

This is an attempted work-around for not having much success trying to use an ActiveX control reference for the windows progress/status bars.

 

* I'm not too keen on creating 256 progress bars to replicate my current method for getting a graduated colour fill on the slider!

Message Edited by James Mamakos on 06-18-2009 02:41 PM


Never say "Oops." Always say "Ah, interesting!"

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

James Mamakos wrote:

I cannot open or run the later solutions people provided since they're all in 8.6 - too big for my lowly 8.5! Could someone down-convert a few of the later ones please?


Which ones? There were many that were posted. Since you said you are trying to make this compatible with 6.1 you won't be able to use them anyway since LabVIEW 6.1 does not support .NET.

 


The AxtiveX control references i've found which look(ed) hopeful are from the Microsoft Windows Common Controls 6.0 (SP4) Version 2.0 library. They are the ProgressBar (MSComctlLib.ProgCtrl.2), and the StatusBar (MSComctlLib.SBarCTRL.2). Any ideas for if i was to venture down this road or is this unwise?


The StatusBar is the wrong one to use. That's just what appears at the bottom of the window. Using the ProgressBar is fairly simple. Example.

 


How could I simulate a progress bar with 256 'segments' (257 sliders)*? Either that, or is it possible to have a two-colour texture in one 'segment' where one colour at one end fades to the other colour at the other end? By 'segment', I mean the space between two sliders.

 

This is an attempted work-around for not having much success trying to use an ActiveX control reference for the windows progress/status bars.

 

* I'm not too keen on creating 256 progress bars to replicate my current method for getting a graduated colour fill on the slider!


What is your ultimate goal? To get something that's compatible with 6.1 or to get a graduated color? Or both? The MS ActiveX ProgressBar will not be graduated, but it will work with 6.1. If you use a horizontal slide then you can create a bunch of sliders to get your graduated fill. Depending on how fast it's moving or how wide filled bar is you may not need 256 as the human eye may not be able to perceive a harsh jump in color if it's below the detection threshold. 

 

Message 8 of 14
(5,057 Views)

@smercurio_fc wrote:
What is your ultimate goal? To get something that's compatible with 6.1 or to get a graduated color? Or both?

Both?! I've had several ideas but i think i've finally settled with a 'block' that loops across the bar in the style of marquee. The block's centre is of a particular colour and it graduates to the background colour in either direction.

 


@smercurio_fc wrote:
If you use a horizontal slide then you can create a bunch of sliders to get your graduated fill. Depending on how fast it's moving or how wide filled bar is you may not need 256 as the human eye may not be able to perceive a harsh jump in color if it's below the detection threshold. 

This is what I've done for the smaller version I posted earlier, and I think I may end up doing something similar.You're probably right about not needing every colour gradient so I'll experiment a bit and see what I can get away with. I'll try using a mixture of array and cluster manipulation to make the code smaller.

 

I'll let you know how things develop. Thank you so far. 🙂



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 9 of 14
(5,043 Views)
I have several clusters of 1D arrays of 2 elements. I want to append these clusters onto one another to create a larger cluster to match the size of a cluster on my FP. How can this be done? Should i make an array of the clusters then convert the resulting array into a cluster of 'x' elements?


Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 10 of 14
(5,015 Views)