In the program editor you go to the main program (MAIN).
In Network 1 is the call of the subprogram "shutter_control". This in turn calls the astronomical algorithm. The "shutter_control" subprogram outputs one pulse for one cycle at the bit output "open_shutter" at sunrise and at the bit output "close_shutter" at sunset. Change the input parameters of the subprogram to suit your particular requirements.

Fig. 1: Subprogram "shutter_control"
Longitude:
Degree of longitude (e.g. 11° 04' 01'' = 11.0669444°);
east of Greenwich = positive, west of Greenwich = negative;
Latitude:
Degree of latitude (e.g. 49° 26' 16'' = 49.4377778°);
north of the equator = positive, south of the equator = negative;
Up_offset:
Time offset in minutes to shift opening of the shutters compared to the time of sunrise calculated by the algorithm. If the value is positive, the shutters open earlier and later if negative.
Down_offset:
Time offset in minutes to shift closing of the shutters compared to the time of sunset calculated by the algorithm. If the value is positive, the shutters close earlier and later if negative.
open_man:
Bit input for manual opening of the shutters. A positive edge generates a cycle pulse at the "open_shutter" output. For this parameter you can configure a button, for example, or use the parameter to loop in another condition for opening the shutters.
close_man:
Bit input for manual closing of the shutters. A positive edge generates a cycle pulse at the "close_shutter" output. For this parameter you can configure a button, for example, or use the parameter to loop in another condition for closing the shutters.
open_shutter:
Cycle pulse for opening the shutters at sunrise.
close_shutter:
Cycle pulse for closing the shutters at sunset. |