11-06-2013 03:21 AM
• Create a VI to generate random numbers from 1-1000. Input a particular number between 1-1000 and display the amount of time it takes for the number to match. Also display iteration count. If it takes more than 1.5 seconds, display a dialogue stating the same. (Try using Elapsed time for the second task)
OR
• Generate a Sine wave (dt =0.1 sec) and each time the values exceed a threshold value (Given by user), change the colour of the graph to indicate warning.
Leave your answers as comments below by clicking on Reply
You will need to be logged-in to do so. Click here to sign-in/sign-up.
Rules & Guidelines
Recordings of the Previous Sessions
11-06-2013 05:28 AM
11-06-2013 05:40 AM
11-06-2013 06:10 AM
first create a while loop.place a random number icon(express numeric) and multiply it by 1000.
then,place a round off to nearest value icon and round the random number to nearest number.
place a comparison equal to icon with one input terminal to random number(rounded off) and another to a control.
connect the output of the equal to the stop button.ths will stop the loop as soon as the number is matched.
connect the iteration symbol to an indicator.this will show the number of iterations.
connect a tick count to the loop and place another inside the loop.subtract their outputs and attach an indicator.this will give the time taken to match.
place an elapsed time inside the loop and compare its output with 1.5 with the help of greater than icon.if it is greater than 1.5 then display a message using
display a message to user icon.
11-06-2013 05:38 PM
Hello friends,my VI for 25th wedcast series.
11-07-2013 10:43 PM
Below i am attaching the code for first question.
11-09-2013 05:27 AM
my VI for 2nd question
feedbacks welcome
11-11-2013 05:12 AM
Hi RChoudhary,
Great attempt. And nice use of the invoke node to reinitialize the values on the front panel.
Regards,
Webcast Wednesday Team
11-11-2013 05:15 AM
Hi Manish
Nice attempt. However some pointers for your VI - Always reinitialize your values on start of the code. In your case, the LED still holds the value from the last run. Also, your time for match is not updating real time. Adding your tick count logic inside the while will ensure this.
Regards,
Webcast Wednesday Team
11-11-2013 05:17 AM
Hi Sriveni,
Well made VI. If you can post the VI itself, we can better validate the functionality.
Regards,
Webcast Wednesday Team