Ändern von geplante Programmzeiten dynamisch durch die Visualisierung
Task
How to allow end-user to change time from visualization system (so he doesn’t go into scripting) when the shutters are opened in the morning and when closed in the evening.
Create objects
Create 3 objects:
– Scheduler start time (type: 10. 3 byte time / day)
– Scheduler end time (type: 10. 3 byte time / day)
– Control object e.g. shutters (type: 1. 1 bit boolean)
User function library program
Add following code to Scripting -> Tools -> User Function Library:
Day is not checked in this example, only Time value.
More complex logic on event
We can create an Event-based script for control of the object which can execute more complex logic for example:
– Morning: open shutter1 on 50%, shutter2 – 100%
– Evening: leave shutter1 opened on 10%, shutter2 – fully closed