07-30-2009 04:14 AM
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
07-30-2009 04:22 AM - edited 07-30-2009 04:24 AM
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.
07-30-2009 04:26 AM
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
07-30-2009 04:32 AM
Norbert,
when my slider is of U8 type,then what is it with I32 type.I dnt understand.
07-30-2009 04:49 AM
Thank you both Mike & Norbert
07-30-2009 04:51 AM
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).