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

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

AN003_SL - Modbus Power meters and spaceLYnk

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
  • AN003_SL - Modbus Power meters and spaceLYnk
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
sesa296387
sesa296387 Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2014-10-07 01:18 AM . Last Modified: ‎2024-07-15 12:05 AM

0 Likes
4
416
  • 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.

‎2014-10-07 01:18 AM

AN003_SL - Modbus Power meters and spaceLYnk

Reading basic and complete Modbus parameters from Acti9 Power meters via LUA scripts

  • 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)
Attachments
AN003_Modbus Power meters and spaceLYnk.zip
Tags (3)
  • Tags:
  • application_note
  • space_automation
  • spacelynk
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
Replies 4
dborle
Lt. Commander dborle
Lt. Commander

Posted: ‎2014-11-07 06:23 AM

0 Likes
0
364
  • 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.

‎2014-11-07 06:23 AM

Hi Darya,

I've tried your scripts and they work fine.

No I've tried to modify the script for reading values of other power meters like PM800. But against what is written in your AN I can't find supported datapoint formats like Int16 and Int32, only UInt16 and UInt32. Please can you give me a hint, how I will have to modify the script to support signed integers (I can read all the values from the PM800, but negative values are showed as unsigned values e.g. -1 -> 32767)?

Thanks
Daniel

Reply
vaca
Ensign vaca
Ensign

Posted: ‎2014-11-10 08:33 AM

0 Likes
0
364
  • 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.

‎2014-11-10 08:33 AM

Hi Daniel,

Darya is not available till wednesday, so here is your answer. Extend your library MbPwmRTU.TYPES definition for these types:

Int16 = {

    size = 1,

    deltaFunct = 5,

    -- function to read value from modbus registed

    read = function(mb, address, regsize, debug)

        local ret = MbPwmRTU.mbRead(mb, address, regsize or MbPwmRTU.TYPES.UInt16.size, debug)

        return bit.band(ret, 0x7fff) * ((bit.rshift(ret, 15) == 0) and 1 or -1)

    end,

},

Int32 = {

    size = 2,

    deltaFunct = 5,

    -- function to read value from modbus registed

    read = function(mb, address, regsize, debug)

        local v1, v2 = MbPwmRTU.mbRead(mb, address, regsize or MbPwmRTU.TYPES.UInt32.size, debug)

        return (bit.lshift(bit.band(v1, 0x7fff), 16) + v2) * ((bit.rshift(v1, 15) == 0) and 1 or -1)

    end,

},

Reply
dborle
Lt. Commander dborle
Lt. Commander

Posted: ‎2014-11-11 05:49 AM

0 Likes
0
364
  • 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.

‎2014-11-11 05:49 AM

Hi Jaroslav,

Thanks a lot for your support. Unfortunately it didn't work that way, so I had to modify your script a little bit like this:

Int16 = {

        size = 1,

        deltaFunct = MbPwmTCP._numDeltaFunct,

        -- function to read value from modbus registed

        read = function(mb, address, regsize, debug)

       local ret = MbPwmTCP.mbRead(mb, address, regsize or MbPwmTCP.TYPES.UInt16.size, debug)

       return bit.band(ret, 0x7fff) + ((bit.rshift(ret, 15) == 0) and 0 or -32768)

       end,

    },

Reply
vaca
Ensign vaca
Ensign

Posted: ‎2014-11-11 06:07 AM

0 Likes
0
364
  • 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.

‎2014-11-11 06:07 AM

Yes, you are right, I see it now, really sorry for misleading you.

It happens when you are used to work mostly with scripting languages and coding and writing to forum when asleep.

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