CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

sunset/sunrise switch outside lights
https://forum.codesys.com/viewtopic.php?f=2&t=9320
Page 1 of 1

Author:  jpesout [ Mon Nov 19, 2018 9:09 pm ]
Post subject:  sunset/sunrise switch outside lights

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?

Author:  Edwin Schwellinger [ Thu Nov 22, 2018 7:47 pm ]
Post subject:  Re: sunset/sunrise switch outside lights

Hi,
check the OSCAT Libs:
https://store.codesys.com/catalogsearch/result/?q=OSCAT
BR
Edwin

Author:  jpesout [ Fri Nov 23, 2018 8:20 pm ]
Post subject:  Re: sunset/sunrise switch outside lights

Can this also be used with codesys 2.3? I am still using the old version for my PLC

Author:  Serhioromano [ Mon Dec 10, 2018 12:09 pm ]
Post subject:  Re: sunset/sunrise switch outside lights

jpesout wrote:
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.

Author:  fleaplc [ Wed Feb 06, 2019 5:20 pm ]
Post subject:  Re: sunset/sunrise switch outside lights

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)

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/