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!

Sigma programmable object bit mask to decode Modbus register

Building Automation Knowledge Base

Schneider Electric Building Automation Knowledge Base is a self-service resource to answer all your questions about EcoStruxure Building suite, Andover Continuum, Satchwell, TAC…

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
  • Knowledge Center
  • Building Automation Knowledge Base
  • Sigma programmable object bit mask to decode Modbus register
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
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

Related Forums

  • Intelligent Devices Forum

Previous Next
Contributors
  • DavidChild
    DavidChild
  • Product_Support
    Product_Support
  • DavidFisher
    DavidFisher

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Building Automation Knowledge Base
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
3814 Views

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

Trying to translate this page to your language?
Select your language from the translate dropdown in the upper right. arrow
Translate to: English
  • (Français) French
  • (Deutsche) German
  • (Italiano) Italian
  • (Português) Portuguese
  • (Русский) Russian
  • (Español) Spanish

Sigma programmable object bit mask to decode Modbus register

Picard Product_Support
‎2018-09-07 08:21 PM

Last Updated: Administrator DavidFisher Administrator ‎2019-05-03 12:44 PM

Issue

How to use bit masking to decode on/off states from a Modbus analogue registers e.g. Holding or Input registers. Where each bit is required to be read individually to indicate the status of a coil.

Product Line

Satchwell Sigma Software

Environment

  • Sigma IC Modbus and IC3 Modbus controllers

Cause

Configuration technique to read 16-bit Modbus registers for on/off states.

Resolution

Each modbus holding or input register is 16 bits, where each bit can be on or off i.e. 0 or 1.

For example the Sigma analogue input value of 901 represents the state of a number of coils where each bit indicates the on or off.  Hence, this translates to the 16-bit binary value  0000001110000101  where 1 = on and 0 = off

  1. Create a Sigma analogue input object to read the Modbus value. Click here for the  Sigma Modbus 4.06 release Note
  2. Create a programmable object for each of the required bits (max of 16 for each register) to be read as below. 

(Highlight, copy and paste into each programmable object).

For Example starting with the Least Significant Bit (LSB) and where point 0|222 is the Modbus value created, the programmable objects are;

Bit 1 (LSB)

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 1 )
30 IF YINT = 1 THEN RETURN TRUE "Bit 1 = on"
40 RETURN FALSE "Bit 1 = off"

Bit 2

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 2 )
30 IF YINT = 2 THEN RETURN TRUE "Bit 2 = on"
40 RETURN FALSE "Bit 2 = off"

Bit 3

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 4 )
30 IF YINT = 4 THEN RETURN TRUE "Bit 3 = on"
40 RETURN FALSE "Bit 3 = off"

Bit 4

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 8 )
30 IF YINT = 8 THEN RETURN TRUE "Bit 4 = on"
40 RETURN FALSE "Bit 4 = off"

Bit 5

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 16 )
30 IF YINT = 16 THEN RETURN TRUE "Bit 5 = on"
40 RETURN FALSE "Bit 5 = off"

Bit 6

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 32 )
30 IF YINT = 32 THEN RETURN TRUE "Bit 6 = on"
40 RETURN FALSE "Bit 6 = off"

Bit 7

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 64 )
30 IF YINT = 64 THEN RETURN TRUE "Bit 7 = on"
40 RETURN FALSE "Bit 7 = off"

Bit 8

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 128 )
30 IF YINT = 128 THEN RETURN TRUE "Bit 8 = on"
40 RETURN FALSE "Bit 8 = off"

Bit 9

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 256 )
30 IF YINT = 256 THEN RETURN TRUE "Bit 9 = on"
40 RETURN FALSE "Bit 9 = off"

Bit 10

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 512 )
30 IF YINT = 512 THEN RETURN TRUE "Bit 10 = on"
40 RETURN FALSE "Bit 10 = off"

Bit 11

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 1024 )
30 IF YINT = 1024 THEN RETURN TRUE "Bit 5 = on"
40 RETURN FALSE "Bit 6 = off"

Bit 12

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 2048 )
30 IF YINT = 2048 THEN RETURN TRUE "Bit 12 = on"
40 RETURN FALSE "Bit 12 = off"

Bit 13

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 4096 )
30 IF YINT = 4096 THEN RETURN TRUE "Bit 13 = on"
40 RETURN FALSE "Bit 13 = off"

Bit 14

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 8292 )
30 IF YINT = 8292 THEN RETURN TRUE "Bit 14 = on"
40 RETURN FALSE "Bit 14 = off"

Bit 15

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 16384 )
30 IF YINT = 16384 THEN RETURN TRUE "Bit 15 = on"
40 RETURN FALSE "Bit 15 = off"

Bit 16 (MSB)

10 XINT = INT POINT 0|222
20 YINT = XINT MASK ( 32768 )
30 IF YINT = 32768 THEN RETURN TRUE "Bit 16 = on"
40 RETURN FALSE "Bit 16 = off"

Labels (1)
Labels:
  • Satchwell BAS & Sigma
Attachments
Tags (2)
  • Find more articles tagged with:
  • 4851
  • DavidChild19
Was this article helpful? Yes No
No ratings

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

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