LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform+Chart+Array Average

Solved!
Go to solution

Hi,

I am having few issues with this program. Any help would be appreciated.

1) Create a VI that generates simulated temperature data in degrees Fahrenheit and
converts the temperature to degrees Celsius. The temperature data should be
displayed on a waveform chart and on a digital thermometer on the front panel.
  ( I think i did this right)

2) Use a While Loop with a Conditional Terminal to stop the simulation. When the
simulation ends, compute the average temperature and display the result using a
digital indicator.
 (I don't know how to do this since i only have one data point after converting it to Celsius. I tried building an array, couldn't work it out:-( )
3)Add an enum control to the Front Panel that controls a property node on the Block Diagram for the waveform chart. The property node will change the chart type displayed between the following choices; Strip, Scope, Sweep. Use this control to update the chart type so that it is configurable programmatically. (I introduced the enum control and created the property node, but i am not sure how to wire this)

 

Please help me and thanks in advance.

1.PNG2.PNG

0 Kudos
Message 1 of 16
(2,787 Views)
Solution
Accepted by topic author Alyssa001

#2.  Just use your original array and calculate the average of that.

#3.  Right click the property node and Change to Write.  Now wire them up.

 

You may want to put a small wait function in that loop to slow down the code a little

Message 2 of 16
(2,762 Views)

Hi,

 

Thank you for your response. I fixed the third issue with your help. But for the second one, if i take average of my original array, that would be the average of the temperature in Fahrenheit. Please let me know how can i solve that. if you could quickly sketch a demo program, that would be appreciated a lot 🙂

0 Kudos
Message 3 of 16
(2,756 Views)

Hi Alyssa,

 

why do people think using ExpressVIs would make their life easier?

Use plain functions and their polymorphism:

check.png

 

When the simulation ends, compute the average temperature and display the result using a
digital indicator.
 

Which data should be averaged? Your whole array constant? Or just the data which was displayed on the chart?

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 4 of 16
(2,733 Views)

I need to find the average after converting the data to Celsius. Please let me know how i can do that.Thank you sir. I really appreciate the help 🙂

0 Kudos
Message 5 of 16
(2,717 Views)
Solution
Accepted by topic author Alyssa001

Hi Alyssa,

 

find the average after converting the data to Celsius

Like this?

check.png

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 6 of 16
(2,715 Views)

@Alyssa001 wrote:

I need to find the average after converting the data to Celsius. Please let me know how i can do that.Thank you sir. I really appreciate the help 🙂


Or you can take the average in Fahrenheit, then convert that to Celsius.

0 Kudos
Message 7 of 16
(2,710 Views)

Sir, 

I misspoke earlier sorry. So we need to find the average of the data points that shows on the graph.
So, after we hit stop to button on the while loop, the loop should stop running and then we need to take the average of the data that were converted to Celsius and plotted on the graph. I think we need to create an array at the output and show all the points that were converted using a indicator and then take the average of it. i tried few different ways and keep getting broken wires. I really appreciate your help. Thank you again 

0 Kudos
Message 8 of 16
(2,702 Views)

Also, i only want to display the temperature in Celsius on the graph. The solution that you have provided earlier plots the temperature in Fahrenheit since you connected the array constant (in F) directly to the array builder. Please let me know if i am wrong.

0 Kudos
Message 9 of 16
(2,701 Views)

Hi Alyssa,

 

Please let me know if i am wrong.

You are right.

 

When you have problems with your VI (like "broken wires") you should attach that VI to get help on it!

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 10 of 16
(2,694 Views)