Labview tutorial for beginners |Labview random number generator | Adding a delay to while loop

Аватар автора
Salle de Bain Designer
In this second tutorial of Labview tutorial for beginners series we talked about generating random numbers. We used random number generator block from numeric pallet. After that we find out that the random number generator only generates numbers from 0-1. But our meter displays reading from 0 to 10. So we need to convert the randomly generated number from 0-1 range to 0-10 range. We used a simple techniquece for this which is to multiply the randomly generated number from 0-1 range with 10. This map the random number generated in Labview to expand to 0-10. One more issue we find out while creating a while loop is that the random numbers are updated too rapidly and we need some method to some how slow it down. For this purpose we used a timer block and added a delay block in our block diagram. We provided a fixed constant of 500 milliseeconds to this block so that we get 500 millisecond delay and our reading cycle could be slowed down. Here is the link for the first lecture in Labview tutorial series. :

0/0


0/0

0/0

0/0