LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with adding incoming values in an array

Solved!
Go to solution

I am aquiring data (current) over time and plotting realtime using DAQ assist. I want to keep on adding incoming values and keep updating and see in real time. I am attaching the simple program I am using. 

I will highly appriciate if you can help me out with adding the values and visualise realtime. 

 

 

if the incomin data is 

 

Time    data  i want 

1          a          a

2          b          a+b

3          c          a+b+c

Download All
0 Kudos
Message 1 of 7
(1,550 Views)

Hi sd,

 

first comment: LabVIEW is a programming language working with VI files. It's not an image processing tool working with JPGs - so please attach VIs/snippets!

 

Next: Why are there controls without labels? Why don't you use the AutoCleanup tool?

 

I want to keep on adding incoming values

Do you want to "add" as keep a sum of values?

Or do you want to "add" like "build up an array of values?

 

keep updating and see in real time.

As long as your loop runs you already update values in "real time"!

("realtime"usually is used to describe something completely different…)

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 7
(1,538 Views)

Atatched the vi 

if the incomin data is 

 

Time    data  i want 

1          a          a

2          b          a+b

3          c          a+b+c

0 Kudos
Message 3 of 7
(1,532 Views)
Solution
Accepted by sd1111

Hi sd,

 

you really should learn the LabVIEW basics.

All you need is a shift register and an ADD function:

check.png

 

if the incomin data is 

Time    data  i want 

1          a          a

2          b          a+b

This description is rather vague!

Your DAQ Assistent is set to deliver 100 samples per call, so "a" is an array like "a[]". I assumed you want to sum up all samples when I prepared the image. But maybe you want to average those 100 sample blocks?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 4 of 7
(1,500 Views)

You still have not clarified the question of what you mean by "add".  Do you want to append data to an array or do you want a sum?

 

If you are just trying to append the data for display, I would just change the graph to a chart.  The chart keeps a history and will therefore show the last X samples (X is configurable with a right-click option).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(1,496 Views)

Hello

 

I wanted to add the incoming data for display purpose, and I have updated with a chart. 

 

🙂

0 Kudos
Message 6 of 7
(1,479 Views)

Thank you so much  for the update, I tried with shift register and summation but was unaware about dynamic data vi. I am really very poor in labview.

 

 

0 Kudos
Message 7 of 7
(1,475 Views)