04-11-2024 05:18 PM
Hi Guys. Im wondering if someone can help. I have created a 2D array to display every temp read for the last 7 days, every hour. When the temp is reading though, my 2D array is being populated with all of the same number rather then the different temperatures it should be reading as you can see from the pictures. Its probably something simple but Ive spent hours and Im stumped......... I understand some of the code may look like its not well written. I am a beginner and using a limited version of Labview for college. Any advice would be welcome.
Thanks
04-11-2024 06:51 PM
Please attach your code. We can't debug an image.
04-11-2024 07:21 PM - edited 04-11-2024 07:22 PM
You really (really!!!) need to star with some basic tutorials. (And start listening to our advice!)
The code does exactly what you programmed:
With each call of the FOR loop stack, It takes one single reading on top and duplicates it onto a 24x7 2D array. Where do you expect all the other data to come from? Thin air?
We told you in detail weeks ago how to properly do a running average, to do a proper state machine, not to place an event structure inside deep stacks of case structures and not have interactive loops depend on it. Why is there no top-level loop? Why is password orange instead of blue? Why not validate username AND password in one swoop? Your "10 Temp reading" is mislabeled, because it will grow forever, but not display anything useful until the while loop stops. Turning two booleans into a small integer does not need two selectors and an addition, and definitely nothing orange!
In any case, as has been said, we cannot debug pictures, especially since there are express VIs and code hidden inside other cases. Attach your VI!