How can we help you today?

How to use Data Mask to extract Health Bit from individual devices with BMXNOE0100

There is a built in health bit in NOE module. Below FAQ give you the detail:
FAQ: What is the I/O scanning health bit address for a M340 NOE module
https://www.se.com/au/en/faqs/FA240970/

However the health bit is a INT variable, it is necessary to code a data mask to pick out those bits variable from Int variable.

Pic

Pic

The health variable (IW0.1.0.1) is a Int type, it contains the health bit information from device 1-15.  Below table shows the relationship in between Decimal value and a Binary value.

Decimal  Binary   Bits
1              0001     bit 0
2              0010     bit 1
3              0100     bit 2
4              0011     bit 0 + bit 1

So if you get your health variable = 1 in Int, you know your binary is 0001, which means your 1st device is healthy. if you get your health variable = 2, you know your binary is 0010, which means your 2nd device is healthy. If you get health variable = 4, you know your binary is 0011, which means your 1st and 2nd device is healthy.

To extract those bit information out of a INT in your logic, you usually need to code a data mask. A data mask is a number used to pick out (test) specific bits inside a WORD / INT / BYTE. Below is a simple example in ST.

Device_1 := (Health_Variable_INT AND 1) <> 0;  // bit 0
Device_2 := ((Health_Variable_INT AND 2) <> 0;  // bit 1
Device_3 := ((Health_Variable_INT AND 4) <> 0;  // bit 2

Schneider Electric New Zealand

Explore more
Product:
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Product:

Need help?

Need help?

Product Selector

Product Selector

Quickly and easily find the right products and accessories for your applications.

Get a Quote

Get a Quote

Start your sales inquiry online and an expert will connect with you.

Where to buy?

Where to buy?

Easily find the nearest Schneider Electric distributor in your location.

Help Centre

Help Centre

Find support resources for all your needs, in one place.

  • Products Documentation
  • Software and Firmware
  • Product Selector
  • Product Substitution and Replacement
  • Help and Contact Centre
  • Where to Buy?
  • Office Locations
  • Schneider Electric, PDL & APC Phone: 0800 741 303
  • Schneider Electric Community
  • Careers
  • Company Profile
  • Report a misconduct
  • Newsroom
  • Investors
  • EcoStruxure
  • Job Search
  • Blog
  • Privacy Policy
  • Cookie Notice
  • Conditions of Sale
  • Change your cookie settings