SpaceLogic KNX Forum
Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.
Posted: 2015-11-23 02:54 AM . Last Modified: 2024-07-14 11:57 PM
Link copied. Please paste this link to share this article on your social media post.
Hi
I don't know anything about scripting and I need some help .
I have a KNX project which has a temperature sensor which can only send "ON(1)" or "OFF(0)", and a heat actuator which can only recieve 0-100%(0-255).
We can't change the equipment.
So what I need is a script and a description on how to :
Bring the ON-OFF signal in to the script
Convert the signal into a 0-255 signal, something like "if 1 then 255 else 0"
And then send the converted signal to the actuator
This way the actuator will go to 100% when getting a "ON" signal from the temperature sensor and go to 0% when getting a "OFF" signal.
I tried to do the "learn-by-doing" approach, but after to many script errors I had to give up and ask for help .
Some extra info
The temperature sensor is a roof mounted combination of temperature and movement sensor from esylux. Called EsyLux PD-ATMO 360i/8 T KNX (EP10427213)
And the actuator is Schneiders own KNX Valve drive (MTN6921-0001)
Any feedback or help is greatly appreciated
Link copied. Please paste this link to share this article on your social media post.
Check out the KNX sub-community for more discussions on spaceLynk and KNX. You may post questions there as well.
Have you considered using the actuators "Forced position" bit input? Using that I believe the actuator can be controlled directly from the thermostat.
Having said that, below is a script example that should do the logic that you request without flooding the bus with write telegrams.
In this example, group 1/1/1 is the thermostats output and 1/1/2 is the actuators input.
inval = grp.getvalue('1/1/1')
outval = grp.getvalue('1/1/2')
if inval == true then
newval = 255
else
newval = 0
end
if (newval == 255 and outval < 255) or (newval == 0 and outval > 0) then
grp.write('1/1/2', newval)
end
Posted: 2015-11-24 10:48 PM
Link copied. Please paste this link to share this article on your social media post.
Hi
Thank you very much for your answer
Yeah I have considered using the forced position, but I am not sure if it will return to its original position when the force position signal goes to 0 again.
It's something I would have to test, was thinking about using the summer mode bit to close it then.
But you seem to know your way around Lua scripting, is it also possible to make a regulator script. Real value temperature in, setpoint in and a signal between 0-255 out to the valve actuator?
That way it would be much less movement for the valve actuator.
Link copied. Please paste this link to share this article on your social media post.
Yes it is possible to create PID controls with Lua. So far I have not had the pleasure to test or use this myself. However if you search the web you will see various solutions. Here is a very good example for a quite equivalent product that should fit right into the spaceLynk: PID control
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.