Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

SpaceLYnk Lua script If then else

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.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Building
  • Light and Room Control
  • SpaceLogic KNX Forum
  • SpaceLYnk Lua script If then else
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
Thomas_Rohde
Sisko Thomas_Rohde Sisko
121
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
54
Heribert_Dölger
Lt. Commander Heribert_Dölger Lt. Commander
30
FZetina
Lt. Commander FZetina Lt. Commander
27
View All
Related Products
product field
SpaceLogic KNX - 4ʺ Touch Unit
product field
KNX Push Button Dynamic Labeling, universal
product field
Wiser for KNX : logic controller

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to SpaceLogic KNX Forum
Anonymous user
Not applicable

Posted: ‎2015-11-23 02:54 AM . Last Modified: ‎2024-07-14 11:57 PM

0 Likes
3
763
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2015-11-23 02:54 AM

SpaceLYnk Lua script If then else

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

  • Thumbnail of SpaceLogic KNX - 4ʺ Touch Unit
    SpaceLogic KNX - 4ʺ Touch Unit
  • Thumbnail of KNX Push Button Dynamic Labeling, universal
    KNX Push Button Dynamic Labeling, universal
  • Thumbnail of Wiser for KNX : logic controller
    Wiser for KNX : logic controller
View products (3)
Tags (5)
  • Tags:
  • bacnet
  • knx
  • lua
  • lua_script
  • spacelynk
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
Replies 3
olemotor
Commander olemotor Commander
Commander

Posted: ‎2015-11-24 08:15 PM

0 Likes
2
692
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2015-11-24 08:15 PM

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

Ole Morten
Reply
Anonymous user
Not applicable

Posted: ‎2015-11-24 10:48 PM

0 Likes
1
692
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2015-11-24 10:48 PM

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.

Reply
olemotor
Commander olemotor Commander
Commander

Posted: ‎2015-11-24 11:46 PM

0 Likes
0
692
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2015-11-24 11:46 PM

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

Ole Morten
Reply
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

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.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of