03-27-2018 11:55 AM - edited 03-27-2018 11:57 AM
I have used sequence structure so that the mean is calculated after the loop is stopped. Also i know that i converted the temperature twice by introducing expression node on the second sequence. i will fix that. regradless of that i get a broken wire 😞
03-27-2018 12:00 PM - edited 03-27-2018 12:02 PM
Hi Alyssa,
What's the point of the sequence structure here? Dataflow is already ensured by the loop border...
Right now you output a scalar value out of the loop: what's the point of calculating a mean from a single value??? (Did you read the error explanation for this broken wire in the context help?)
Did you already take the beginner courses?
03-27-2018 12:21 PM
@Alyssa001 wrote:
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
Technically what you have is a chart, not a graph. Since what data is going into the chart depends on how long the chart history is, how much data is in your original array, and how many times you've wrapped around based on how long your while loop ran, the best thing you can do is take the Chart History property node of that chart which gives you the array of data that is in it at that moment, and take the mean of that.
03-27-2018 12:31 PM
I think i figured it out this time. Thank you
I am currently taking my first labview course. So i am all kinds of dumb mistake. I forgot to change my indicator to an array.
Also, i introduced the sequence structure cause my program was outputting average with every iteration of the loop. i wanted to do the sequence inside the loop.
So sorry again.
I do have one last question. If i wanted to change the plot line color and give the user the freedom to choose between two colors while the program is running. Which property node should i use? Should i use Enum control, if so how would i introduce blue and red color ?
03-28-2018 11:41 AM
03-29-2018 10:17 AM
Thank you 🙂
I was wondering about which property node i should use. I tried a few different one, and finally found plot.color node. 🙂
Thanks again for all the help. I really appreciate this