I am trying to program outdoor lights, without a sensor, just switch on when it becomes dark.
I am using the Calculate_SunriseSunset function block, based on longitudinal and latitudinal.
this gives me the correct elevation and azimuth of the sun.
How can I now use this to trigger my relays?
And beside this, I also want to be able to swith them off/on manually.
For all my other lights, I am using the FB_LatchingRelay to switch on/off the lights.
Is all this possible using function blocks? Or do I need to program this myself in ST?
(I think I cannot find the SunriseSunset calculation in ST)
The basis idea is that my lights are switched on when it is dark enough outside and that I am able to switch them on/off manually, overriding the "dark enough" option.
Can someone help me with this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to program outdoor lights, without a sensor, just switch on when it becomes dark.
I am using the Calculate_SunriseSunset function block, based on longitudinal and latitudinal.
this gives me the correct elevation and azimuth of the sun.
How can I now use this to trigger my relays?
And beside this, I also want to be able to swith them off/on manually.
For all my other lights, I am using the FB_LatchingRelay to switch on/off the lights.
Is all this possible using function blocks? Or do I need to program this myself in ST?
(I think I cannot find the SunriseSunset calculation in ST)
The basis idea is that my lights are switched on when it is dark enough outside and that I am able to switch them on/off manually, overriding the "dark enough" option.
Can someone help me with this?
Hello,
did you solve this?
Im interested in conditions for day night in relation to angles?
BR
Hi,
check the OSCAT Libs:
https://store.codesys.com/catalogsearch/result/?q=OSCAT
BR
Edwin
Can this also be used with codesys 2.3? I am still using the old version for my PLC
Yes it can. I used it fine.
FB (Oscat) is SUN_POS (Β§12.50). By this you can get the sun position : when Zenith < -0.8333 it means sunset is done (you can turn on the lights)