Answered step by step
Verified Expert Solution
Question
1 Approved Answer
TASK?(ore 20 pts (individual assignment) OBJECTIVES: After finishing this task, you should be able to construct LabVIEW Vis that use case conditional structures within a
TASK?(ore 20 pts (individual assignment) OBJECTIVES: After finishing this task, you should be able to construct LabVIEW Vis that use case conditional structures within a loop, and terminate the loop based on a case output Implement the Hailstone algorithm in LabVIEW. Pseudocode for the Hailstone procedure hailstone(n: integer) algorithm is given below while n > 1 if n is even then n else n 3n +1 increment() n/2 return l #l?s the length of the hailstone path In implementing this algorithm, you will need 1) To use the even/od code you have seen from the Class 07 preactivity 2) To use a Case Structure inside of a Loop The Front Panel should look something like this Starting value 78 count 34 1: After executing the loop once, the new Starting value is the same as the output from the previous iteration. To deal with this, you will need to use what is called a shift register. Here is a video that explains what a shift register is and how to use it. https:/lwww.youtube com/watchyewkicHispzNY NOTE NOTE 2 Most computers will run this algorithm very quicktly. In order to see the value of n change, you may want to use the Time Delay icon Time Delay You can place this inside a Loop to slow it down. It is found in the Timing submenu of the Functions Palette Please name your file ICA32 3 Team vi, where your team letter replaces the w TASK?(ore 20 pts (individual assignment) OBJECTIVES: After finishing this task, you should be able to construct LabVIEW Vis that use case conditional structures within a loop, and terminate the loop based on a case output Implement the Hailstone algorithm in LabVIEW. Pseudocode for the Hailstone procedure hailstone(n: integer) algorithm is given below while n > 1 if n is even then n else n 3n +1 increment() n/2 return l #l?s the length of the hailstone path In implementing this algorithm, you will need 1) To use the even/od code you have seen from the Class 07 preactivity 2) To use a Case Structure inside of a Loop The Front Panel should look something like this Starting value 78 count 34 1: After executing the loop once, the new Starting value is the same as the output from the previous iteration. To deal with this, you will need to use what is called a shift register. Here is a video that explains what a shift register is and how to use it. https:/lwww.youtube com/watchyewkicHispzNY NOTE NOTE 2 Most computers will run this algorithm very quicktly. In order to see the value of n change, you may want to use the Time Delay icon Time Delay You can place this inside a Loop to slow it down. It is found in the Timing submenu of the Functions Palette Please name your file ICA32 3 Team vi, where your team letter replaces the w
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started