01-08-2025 09:49 PM
Hi, I'm very new to LabVIEW and couldn't find documentation for this. I have a scale communicating with my LabView that displays whatever is on the scale. I want to log the scales inputs in an array every 1 second (the array should be increasing in size). For the sake of simplicity I made a block diagram that just takes a numerical user in put and adds it to the array, however when I input the number the array doesn't update until I stop it and its only the last value. How would I go about doing this? I've attached both the scale code and simplified code.
Thank you!
01-09-2025 01:17 AM - edited 01-09-2025 01:18 AM
Hi gfly,
@gfly wrote:
I made a block diagram that just takes a numerical user in put and adds it to the array, however when I input the number the array doesn't update until I stop it and its only the last value. How would I go about doing this?
Well, this sounds like missing to "THINK DATAFLOW!"…
When you want to update an indicator inside a loop then you need to place the indicator inside the loop!
@gfly wrote:
I'm very new to LabVIEW and couldn't find documentation for this.
There is the LabVIEW help, that has chapters on LabVIEW basics. The help also explains the "THINK DATAFLOW!" mantra of LabVIEW!
(I cannot open your VI due to the LabVIEW version you use. In general it is advised to downconvert your VI to "LV2021 or older" to reach a broader audience, using File->"Save for previous". I prefer LV2019…)
01-09-2025 03:43 AM
@gfly wrote:
Hi, I'm very new to LabVIEW and couldn't find documentation for this. I have a scale communicating with my LabView that displays whatever is on the scale. I want to log the scales inputs in an array every 1 second (the array should be increasing in size). For the sake of simplicity I made a block diagram that just takes a numerical user in put and adds it to the array, however when I input the number the array doesn't update until I stop it and its only the last value. How would I go about doing this? I've attached both the scale code and simplified code.
Thank you!
No you don't. You create a new array of 1 element each time. To add an element you must add it to the incoming array as clearly shown in the help window (which you should always have open).
(I can already see what the next post will be about)