PLCBytes
Modbus tools

Status Word Decoder

Enter a status or alarm register and see which bits are set. Name the bits once and the decoder remembers them in this browser.

Status word

Example
Format
Size

Hex, decimal or binary. 0x0637, 637h, 0b0110… and Modbus Poll lines (3 = 1591) work too. For 32 bits, enter one value or two registers.

Result

Hex
Decimal
Signed (Int16 / Int32)
Binary
Bits that are 1

Tap a bit to flip it. The value changes with it, so you can also build a control word to write.

Bit names

BitMaskStateName

Names are saved only in this browser (local storage). Each device can have its own set.

Runs entirely in your browser. Nothing you enter is sent to a server.

CiA 402 drive states

Drives with the CiA 402 profile report their state in the low byte of the statusword (object 6041h). x = the bit does not matter.

StateBits 7–0Example
Not ready to switch onx0xx 00000x0000
Switch on disabledx1xx 00000x0250
Ready to switch onx01x 00010x0231
Switched onx01x 00110x0233
Operation enabledx01x 01110x0237
Quick stop activex00x 01110x0217
Fault reaction activex0xx 11110x021F
Faultx0xx 10000x0218

What a status word is

Many devices pack yes/no signals into one register instead of using a register for each: running, fault, warning, remote control, limit reached. Each bit is one signal. Bit 0 is the lowest bit (value 1), bit 15 the highest (value 32768), so 0x0637 has bits 0, 1, 2, 4, 5, 9 and 10 set. What each bit means is only in the device manual. That is why you can name the bits here; the names stay in your browser for the next time.

Drives with the CiA 402 profile (CANopen, EtherCAT and many Modbus drives that follow it) all use the same layout, and the low byte of the statusword gives the drive state. Choose the CiA 402 template and the decoder shows the state directly.

Common mistakes

Questions from practice

How do I find out which bits are set in a Modbus register?

Enter the register value in hex or decimal. The decoder lists every bit that is 1 and shows them in the grid. By hand: bit n is set when the value divided by 2ⁿ and rounded down is odd. For 0x0637 (1591) these are bits 0, 1, 2, 4, 5, 9 and 10.

Is bit 0 the leftmost or the rightmost bit?

The rightmost one, the least significant bit with the value 1. In the binary number 0000 0110 0011 0111, bit 0 is the last digit and bit 15 the first. If a manual counts bits from 1, subtract one from its numbers.

What does statusword 0x0637 mean on a CiA 402 drive?

The low byte 0x37 matches the state Operation enabled: ready to switch on, switched on, operation enabled, voltage enabled and no quick stop. Bit 9 says the drive accepts commands over the bus (remote) and bit 10 that the target has been reached.

Where are my bit names saved?

In your browser's local storage, on this device only. They are not sent anywhere, so they are not available on another computer or in another browser. Clearing the site data in the browser deletes them.

How do I build a control word to write?

Tap the bits you need in the grid and the value updates in hex, decimal and binary. A CiA 402 drive is usually started with 0x0006 (shutdown), then 0x0007 (switch on) and 0x000F (enable operation); 0x0080 resets a fault. The value encoder gives you the write request as UInt16.

Related tools