Posted 26 Jun 2020 Please help me how develop totalizer for every 15 mins , for real value. Real value should be taken sample for 1Sec. Share this post Link to post Share on other sites
Posted 26 Jun 2020 This sounds like a homework assignment, given how vague you're being. Can you tell us the PLC and I/O card being used? Also some idea of the Application would be useful. Share this post Link to post Share on other sites
Posted 26 Jun 2020 PLC :ALLEN BRADLEY 1756-L63 I/O : 1756-IF16 Analog I/P card I want to convert Analog raw value to real and same to be generate a cumulative value for every 15 mins with 1 sec resolution.it has to be moved to scada. Share this post Link to post Share on other sites
Posted 26 Jun 2020 Ok given the hardware your using I would suggest the following. Declared Variables would be QuantityThisSecond{real} , TotalThisFifteenMinutes{real}, TotalLastFifteenMinutes{real}, SampleCount{DINT}, ResetTotal{Boolean} Use a Periodic Task set to fire once per second. On the First Scan set TotalThisFifteenMinutes{real} and SampleCount{DINT} to Zero. On each Period after that ADD TotalThisFifteenMinutes{real} to QuantityThisSecond{real} and place in TotalThisFifteenMinutes{real}. Then Increment SampleCOunt{DINT} Next Each Period also check if SampleCOunt{DINT} is equal to 900. If it is then Move TotalThisFifteenMinutes{real} into TotalLastFifteenMinutes{real} and ZERO TotalThisFifteenMinutes{real} and SampleCOunt{DINT}. ALso Put in a rung that zeros everything lke at First Scan if Reset Total is true. One suggestion that might work. Share this post Link to post Share on other sites