I have a small system controlled by a Siemens S7-1200 PLC. I created a totalizer function block (TIA v17), where I'm counting total revolutions from an RPM value every program cycle (~13ms). The output (Real) is incremented by a running sum using an "Add" instruction.
What I've found is that the result seems to work fine and is very accurate as long as the number of revolutions remains small. However, once it starts getting large (7-8 digits) the add function no longer adds correctly. Each program cycle I'm adding a small number (~0.4) to the total. At 2000rpm and 1000000 revolutions things seem fine; every minute 2000 revs is added. However, at 9000000, instead of adding 2000 revolutions every minute, it might add only 100 revs/minute. It's as if the add instruction doesn't have enough time to process before the next cycle.
Has anyone ever seen this before?
What I've found is that the result seems to work fine and is very accurate as long as the number of revolutions remains small. However, once it starts getting large (7-8 digits) the add function no longer adds correctly. Each program cycle I'm adding a small number (~0.4) to the total. At 2000rpm and 1000000 revolutions things seem fine; every minute 2000 revs is added. However, at 9000000, instead of adding 2000 revolutions every minute, it might add only 100 revs/minute. It's as if the add instruction doesn't have enough time to process before the next cycle.
Has anyone ever seen this before?
Last edited: