LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fill slide vi

Hi,

        I've used a horizontal fill slide in my vi.The problem is, it is waiting for a certain amout of time  to start over again after filling the slide.I dont understand why it is waiting for? and can I reduce this time?Plz see the attached vi

Thanks
kiranmayi
0 Kudos
Message 1 of 6
(4,520 Views)

Kiranmayi,

 

your slider is U8, so it will "restart" when the I32 iterator exceeds (n x 256) - 1, where n is an integer of value 0 or greater.

 

hope this helps,

Norbert

 

[Edit] The "waiting  time" is the time the loop needs in order to count from 100 to 255. So either you can change the scale of the slider to 0..255 or you need to use the modulo operation of the iterator against 100 and wire the result to the slider.

Message Edited by Norbert B on 07-30-2009 04:24 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 6
(4,514 Views)

Hi kiranmayi kaza,

it starts again with 0 after an overflow. This overflow is in your case (you use "U8" as type) after value 255.

You should reset the value in the loop. See the attached picture.

 

Mike

Message 3 of 6
(4,509 Views)

Norbert,

                when my slider is of U8 type,then what is it with I32 type.I dnt understand.

Thanks
kiranmayi
0 Kudos
Message 4 of 6
(4,508 Views)

Thank you both Mike & Norbert

Thanks
kiranmayi
0 Kudos
Message 5 of 6
(4,498 Views)

Kiranmayi,

 

U8 stands for unsigned integer 8 (bit). So 8 bit represents an unsigned integer which comes to 0..255 (=(2^8)-1)

I32 represents signed integers with 32bit. So you have 2^32 =  4294967296 different numbers. Since it is signed, you have a value range of -2147483648 .. 2147483647.

So you need 2147483647 iterations until your slider "resets"......

 

hope this helps,

Norbert

 

PS: I suggest you to use the quotient&reminder function which is the LV representation of "modulo" (mathematical sign is '%' for modulo). 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 6
(4,496 Views)