Join us today!
Totalizer
Is there a way to do a totalizer in TwinCat 3 PLC? I can't seem to even find math functions to do it (without resorting to C++/MatLab.
This totalizer would be similar to the TOT function in an Allen Bradley PLC for totalizing flow meters such as from an analog input. The analog input would be a flowrate (such as gallons per minute). I would then totalize over a given period of time (such as total gallons per day) and send commands to have it reset. The built in blocks typically proivde better control over the time than trying to do it manually.
Any thoughts?
Can you give an example or a link of what you want?...
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
https://theautomationblog.com/controllogix-function-block-totalizer/
Is this what you mean? Is there something similar in TwinCAT?
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
That is correct. I'm mainly just looking for a flow totalizer that takes in an analog input and an accurate base time. Sometimes home made totalizers can get off if the correct timing reference isn't used. Built in ones take that into account.
If you don't want to have a scan cycle time error, which is normally 10 milliseconds, you can read the system time and subtract it with the next cycle, with this you won't lose anything,
As far as I know, there is no function similar to the one to search for by Allen Bradley from Totallizer TOT, you can look in the OSCAT library to see if it exists, you also have
https://github.com/RWTH-EBC/AixOCAT
I have seen that TwinCAT has some totalizer but it is for the TF8020 library | TwinCAT 3 BACnet,
A good exercise would be to do it yourself with the same inputs/outputs as the TOT you use by Allen Bradley, if you want to do it I can tell you how you can count the time without any loss...
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
Hello,
I'll hit you with this FB, which is the one that I have developed, how to tell time, you would have to adapt it and change it so that it works like Totallizer (TOT) with inputs and outputs like Allen Bradley's, if you develop it I would like you to post it here like this I can see it:
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
If I understood it correctly, you're looking for a cumulative rolling sum. There is not build in function as far as I know, so you would have to construct your own.
My blog: https://cookncode.com/twincat
My code: https://github.com/roald87
Move this topic to the ''PLC Programming Challenge'' 🤔
Have you seen the photo that I have given you?, with this there is no waste of time, you already have where to start and you can do exactly what allen bradley has with totallizer (TOT) with the same inputs and outputs, but since you do it, improve it with an OOP approach, methods, properties, etc..
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
- 17 Forums
- 265 Topics
- 932 Posts
- 1 Online
- 688 Members