7/24/2023 9:59 PM | |
Joined: 10/15/2022 Last visit: 8/1/2024 Posts: 66 Rating:
|
Hello, LOGO enthusiasts. I made a demo program that corrects the reading of the hours counter. Additional counters, VM-s and comparison are used. Why such a program? I just want hour counter to count the hours (and minutes) properly, and not to ignore half minutes (the hour counter only counts full minutes, i.e. many half minutes of working time are not considered at all). The zip file contains the program, diagram and description (3 files). Tested on LOGO!8 6ED1052-1MD08-0BA1 (with firmware 1.83.02) approximately 5 hours. Andrus ------ Earlier topic: Hours counter counts only full minutes AttachmentHours counter correction demo.zip (394 Downloads) |
Last edited by: Andrus_Saar at: 07/28/2023 20:27:18Last edited by: Andrus_Saar at: 07/29/2023 20:53:27Last edited by: Andrus_Saar at: 07/30/2023 20:24:49Last edited by: Andrus_Saar at: 08/08/2023 16:48:52 |
|
This contribution was helpful to
2 thankful Users |
8/22/2023 10:14 PM | |
Joined: 10/15/2022 Last visit: 8/1/2024 Posts: 66 Rating:
|
Hello everyone I've made a second version of the hour counter adjustment program. In the old one there was a bug that the 128th minute didn't correct times under one minute. If there was a signal lasting more than a minute, then the hour counter started to be corrected again. --------------- I added also some time limiters (90 s) and counters blocking. I hope it's better now but I'm not very sure, especially for higher numbers. Tested at around 128 and 256 minutes. ---------- 23.08.2023 This program even works in simulation mode. Change the value in block B001 (Hours counter) "Start time for OT" and uncheck "Protection Active" in block B005 (Message texts) so that you can change the value in screen in Count_b field and see what happens.
The block is canceled if the values are equal. Equal values are: Hours counter = Count_b 0h 0m = 0 1h 1m = 61 2h07m = 127 2h08m = 128 4h14m = 254 4h15m = 255 4h16m = 0 4h17m = 1 6h24m = 128 etc. Andrus AttachmentHours counter correction demo v2.zip (552 Downloads) |
Last edited by: Andrus_Saar at: 08/23/2023 07:01:07 |
|
This contribution was helpful to
1 thankful Users |
8/29/2023 10:11 PM | |
Joined: 10/15/2022 Last visit: 8/1/2024 Posts: 66 Rating:
|
Hello again. Here is now the third version of the hour meter correction program. Added seconds counter (VM 8). There are now two comparison blocks again, with a common time limit, so that if you manually change the value of the minute counter B004 from web page (variables list), blocking will occur if VM3 and VM7 do not equalize within 90 s.
The block is released only when VM3 and VM7 are equal. * Set the hours counter to 2 hours and 4 minutes and play from there by changing the VM4 (Count_B) value either up or down and see what happens. The critical point is the 128th minute (VM7 value sign is changing). Andrus I can't make this program more foolproof anymore :) AttachmentHours counter correction demo v3.zip (423 Downloads) |
Follow us on