Question: Assigned Problem PS6 In LabVIEW there are multiple ways to code an algebraic equation, using the LabVIEW functions (add, divide, etc.) the LabVIEW Formula Node,

Assigned Problem PS6

In LabVIEW there are multiple ways to code an algebraic equation, using the LabVIEW functions (add, divide, etc.) the LabVIEW Formula Node, the LabVIEW Formula Express VI and the MathScript Node (covered later in the semester). Each method has advantages with respect to ease of coding, memory usage and execution speed. For this program you will compare the execution times for the LabVIEW Formula Node with the LabVIEW functions. How the program works. The user will select either the Formula Node or LabVIEW Functions. They will run N number of executions. For each execution you will capture the time elapsed. After the program has completed N executions the program will calculate the average run time.

In this problem you will be using multiple structures to achieve the functionality required. It may help you to approach the problem in this manner. o Use a Sequence Structure (with the Formula Node) to get the time for a single execution. o Add a Case structure to switch between the Formula Node and the LabVIEW functions in the sequence structure. o Add a For Loop around the sequence structure to allow for multiple executions.

The problem has the following constraints;

o The equation to calculate is; A = (X - Y)^3; B = (X/25); C = A + B

o The Front Panel will have;

A Control to input the value for N executions Controls to input values of X & Y; X & Y are Double Precision Floating Point Numbers An indicator to display C An indicator to display the average execution time

o Use a Shift Register (and an add function) to sum the time from each execution.

The average time is calculated by summing all the individual executions times and dividing by N. Not the total time the program runs divided by N.

o For the timing use the High Resolution Relative Seconds from the timing palette. You can also use the Tick Count or Elapsed Time Express VI but they have a lower resolution.

To see a difference between the two methods, use a large number for N and set a high precision (digits to the right of the decimal point) in your average time indicator.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!