10/30/2023 4:00 PM  
Joined: 12/18/2014 Last visit: 2/25/2024 Posts: 32263 Rating: (4010)

First the block SF002. The hourly value of the setpoint hours from the HMI is in parameter V1. This value is multiplied by 60 (V2) to convert hours to minutes. The minutes from the set point minutes of the HMI (V3)are then added. This is how the total minutes of the set points are determined by the HMI. Now the value of the total minutes is referenced to the setting parameter of the off delay T001. The value of the remaining time of T001 is transferred to the VM memory (address VW8) via Parameter VM Mapping and is now read in again via the analog network input NAI1 and via the Analog amplifier SF009 referenced to mathematical instruction SF003. The analog threshold trigger SF004 checks whether the value of the total minutes is greater than 29. If the value is greater, then the value in the analog MUX SF005 is set from 0 to 30. Additionally, the value of the total minutes from SF003 is referenced to the mathematical instruction SF006. In SF006 the number of hours should be calculated from the total minutes. Here, the current value from SF005 (0 or 30) is first subtracted from the total value of the minutes. The background is that LOGO! only knows integers and so there are no rounding errors when dividing by 60 distorts the result. Example: 54/60 = 0.9. The LOGO! cannot do 0.9 and rounds up to 1. Then, with minutes remaining, 1 hour would be calculated, which is not true. However, if the value 30 is subtracted from 54 before dividing it by 60, the result is: (5430)/60 = 0.4. At 0.4 the LOGO! rounds down and the result is 0 hours. The result in SF006 is now the number of hours, this value is referenced to the mathematical instruction SF007. Here the hourly value is multiplied by 60 again in order to have the hourly portion again in minutes. Finally, the remaining minutes are determined in SF008. The value of the total minutes (SF003) is connected to the Ax input of SF008, the value of the total hours in minutes (SF007) is connected to the Ay input of SF008. In SF008, the value of the input Ax is now subtracted from the input Ay, resulting in the minute component. 
Last edited by: Jen_Moderator at: 10/31/2023 10:23:20Text formatting optimized. 

Follow us on