02-25-2019 05:55 AM
Hi,
I'm a little new to LABVIEW. I'm working on a program in which I will enter a number and the program will take the values corresponding to that from a .csv file. If I enter 7, I need to add a particular column value( let's say 5th column) till that 7th value. The way which I want to add is like I will be using them in a formula and after finding the answer, I need to add that value to the previous value. Please help me with this.
I tried using shift register but I'm not able to change the values inside the for loop on each iteration( for calculating the answer using the formula). The blue line shows the index value. I'm using LABVIEW 2011.
Solved! Go to Solution.
02-25-2019 07:03 AM
Hi niks,
I want to add is like I will be using them in a formula and after finding the answer, I need to add that value to the previous value.
Then you should use that previous value in adding to your current "formula" result - instead of adding zero…
Btw. we cannot debug images using LabVIEW. Why don't you attach your VI?
02-25-2019 07:06 AM
Hi,
I know I've to add that. But couldn't figure out how to add the previous value. That's why I added zero there. Have added the VI along with this.
02-25-2019 07:09 AM
You tried a shift register, but all you did was put the value into an indicator. And the code you showed makes me even more confused than your problem description. Perhaps an example of input data and what you expect for an output would help.
02-25-2019 07:14 AM - edited 02-25-2019 07:17 AM
@niks9792 wrote:
But couldn't figure out how to add the previous value. That's why I added zero there. Have added the VI along with this.
You couldn't figure out how to use a simple wire?

02-25-2019 07:15 AM
Hi,
Sorry for the confusing VI. Simply what I want is the total TCO for the number of months which I enter. If it is 48, I need it to calculate the TCO of that particular year using the equation and I need to calculate the TCO till that month(0-12,12-24,24-36) and I've to add that with the final answer. The first year the TCO is calculated normally and in the 2nd year(12-24 months), I need to calculate the TCO of that particular year and then add the previous value. Like that it should go on. I hope you got my question.
02-25-2019 07:18 AM
Hi,
This one I know. But the issue is how to connect the previous value which is found by the equation(finding that part is which is confusing).
02-25-2019 07:47 AM - edited 02-25-2019 07:47 AM
02-25-2019 07:52 AM
Hi,
How to find the answer by using that equation? That is if I enter the 5th index, how to calculate the total until that particular value?
02-25-2019 08:05 AM
Array Subset Sum Array.