03-26-2018 09:15 PM
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.
Solved! Go to Solution.
03-26-2018 09:59 PM
#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
03-26-2018 10:09 PM
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 🙂
03-27-2018 01:26 AM - edited 03-27-2018 01:28 AM
Hi Alyssa,
why do people think using ExpressVIs would make their life easier?
Use plain functions and their polymorphism:
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?
03-27-2018 07:17 AM
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 🙂
03-27-2018 07:34 AM
03-27-2018 07:41 AM
@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.
03-27-2018 09:00 AM
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
03-27-2018 09:03 AM
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.
03-27-2018 09:30 AM