I would then add a ‘Pulse At’ block with the time you wish to receive the emails. This would be attached to AI4 of the Status block with the Cloud Mailer.
The argument in the Status block would be -
If AI3 = 1 and AI4 = 1 then Text output <v1>Apartment 87 - <v2.2> kWh
The delayed pulse of 1 second on AI3 might need manipulation to ensure that all Modbus sensors have had time to send their data (possibly 2-3 seconds).
The ‘Pulse At’ block on AI4 should have a pulse length that is just short of 2 cycles of polling (ie. 87 actuators at 0.5 seconds = 44 seconds for one polling cycle). If the ‘Pulse At’ block is active for 85 seconds, it should only ever see one impulse from AI3 during that duration (ie. when both AI3 = 1 and AI4 = 1). This means one email sent. Hopefully with all apartments...
Kommentar