Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

CLD Exercise 13 Challenge - Accumulate Total Flow

This challenge pertains to the flow rate VI.  At the end of the exercise document, is this challenge question:

 

What changes would be required to maintain a running total of the absolute total flow? (Note: negative flow contributes to absolute flow)

 

I was trying come up with an algorithm to determine the total absolute total flow but couldn't think of anything that seemed simple to implement.  I was thinking to multiple the flow rate with the time elapsed for that flow rate and add that to the absolute total flow.  And then when the flow rate changes, the timer will reset and then it will be multiplied by the current flow rate and added to the absolute total flow.

 

Any advice would be greatly appreciated. Thank you!

0 Kudos
Message 1 of 2
(2,461 Views)

You don't need big algorithm to do this. How about using a shift register that keeps track of the total flow in the main loop.
You can use the absolute value of the flow rate so that negative flow also contributes to total flow



Best Regards,
Certified LabVIEW Developer

Certified Architect
0 Kudos
Message 2 of 2
(2,393 Views)