06-30-2011 08:49 AM
I apologize for posting such a rudimentary question but I haven't been able to find an answer by searching the forum.
Basically, I have several sensor inputs that are all factored into an equation that yeilds heat output (btu/hour). I need to take this value, which I have iterating once every second, and add it to itself every time it increments. In other words, say the first value is 10 (btus), the next second the value is 16, the code calculates and displays a value of 26 on the front panel and waits for the next second (or whatever iteration I choose) at which time it will add the new value to the running total.
Thanks for your input
Jake
Solved! Go to Solution.
06-30-2011 08:57 AM
Use a shift register.
06-30-2011 09:04 AM
You know, I may have just solved my own problem. I wired the instantaneous heat output value to one leg of a simple "add" function, then wired the total back into the other leg of the function. Then displayed the running total. Since everything iterates in the same timed loop, that should work for my process.
If anybody has a better solution (or verbal abuse about the simplicity) post away.
06-30-2011 10:04 AM
The Loopback function (<--) is basically a miniature shift register.
/Y
06-30-2011 10:09 AM
Any of the above three methods (your's included) will work fine.
Performance-wise, there will not be a noticeable difference between them, so I guess its just personal preference at this point.
06-30-2011 10:48 AM
thanks, I guess i'll go with what I've got for now. good info though!