4/3/2020 3:09 PM | |
Joined: 12/3/2018 Last visit: 1/22/2024 Posts: 76 Rating: (0) |
Maybe you understood me, but I didn`t you. I didn`t know what you meant with 32767 limit, now you explained that you mean a V1 value of B003 (I thought you mean max. energy sum). This is what I am talking about the problems with communication over net with few sentences - one person always thinks the other knows what he means, but it is not always like that. OK, I don`t expect this V1 value (average Power) be ever high as that. Listed max. power of the machine is around 9000W. Please, check out this program, is it correct joined now? I noticed one small problem: timer B010 was quicker then averaging time - when B010 gives a "hour pulse" the average hour value was not ready yet (I tested on LOGO in real time). So the first hour was no energy added. Next hour was OK since the last result of averaging stays. AttachmentCombined test program.zip (269 Downloads) |
Last edited by: Frayer at: 04/03/2020 15:11:02 |
|
4/3/2020 5:23 PM | |
Joined: 12/3/2018 Last visit: 1/22/2024 Posts: 76 Rating: (0) |
ixo65 you helped me a lot and I am thankful for that. |
4/4/2020 8:11 PM | |
Joined: 2/22/2008 Last visit: 2/22/2024 Posts: 2698 Rating: (206) |
I have looked for a better solution, but i don't use an additional counter for the sensor. It may be also good with your principle with some little changes. I also have added counters, but check this for a fault, i am not perfect. The power is added in an arithmetic instruction every second. If the sum exceeds 3599 (3600), you have 3600 Ws = 1 Wh and the Wh counter will be increased. After 1000 Wh the kWh counter will be increased and the Wh counter will be resetted. Try out the program in attachment, maybe this help you. Regards, Scorp AttachmentTest2.zip (248 Downloads) |
Last edited by: Scorp at: 04/04/2020 20:12:17Last edited by: Scorp at: 04/04/2020 21:59:28 |
|
4/5/2020 3:42 PM | |
Joined: 2/22/2008 Last visit: 2/22/2024 Posts: 2698 Rating: (206) |
Maybe the problem now is solved with minimum of changes, but you have to check this for all conditions. 1. The adding time is reduced to 0.2s, therefore we need a value of 3600*5=18,000 to increase the Wh counter. This value is high enough to add 10,000 W in any way, you never exceed the maximum of 32,767 of the arithmetic. If you have 17,999, you can add 32,767-17,999=14,768 W maximum. 2. The threshold trigger now has a time 06:98s, the low flow warning has a time of 06:00s. If it is possible, then increase the time to 7s or 8s. If this time is too large, then divide the gate time by 2 and double the constant V3 or halve the constant V4 of B004. You also can use any other gate time, but be careful for bad rounding in B004, otherwise you will lost accuracy. Good luck with testing, Scorp AttachmentTest3.zip (233 Downloads) |
4/5/2020 6:28 PM | |
Joined: 2/22/2008 Last visit: 2/22/2024 Posts: 2698 Rating: (206) |
Sorry for Siemens, but i have tried a simulation for an Eaton Easy E4 in ST (structured text). Just need a little time and get a solution with high accuracy. For me the program is better readable and also is very short. The advantage over the Logo is the 32 bit calculation without the internal rounding and more flexibility in structured text, if you use the right sequences. If the next Logo version in autumn don't have a much better firmware and software, then i know, what i will do in the future. Up to now i have only tested a few applications with the Easy E4 and i see more potential, 12 bit resolution for analog inputs, much more inputs and outputs possible, indexed addressing possible, structured text available and so on. If you are interested, see attachment. Regards, Scorp AttachmentEasy E4.zip (258 Downloads) |
4/5/2020 11:05 PM | |
Joined: 2/22/2008 Last visit: 2/22/2024 Posts: 2698 Rating: (206) |
If it is the impulse generator 0.2s, then we have a problem also with other times. But you can test the next version with time 1.0s and same trigger 18,000. Then you have n*5Wh in the first counter, that doesn't matter. Count up to 200 for 1kWh and multiply Wh with 5 for the display. The accuracy is not lost, only the last digit is rounded to 0 or 5. The problem also may be missing subtractions, overflows in the arithmetic or counter pulses are lost, but i see no problem in the moment. If the power display is okay, then there should be no decreasing of accuracy. How do you manipulate the program to get ~10,000 W without the sensor ? Regards, Scorp AttachmentTest4.zip (239 Downloads) |
Last edited by: Scorp at: 04/05/2020 23:08:11 |
|
Follow us on