Modbus is a “master/slave” communications protocol . There is one Master, which usually takes the form of a building automation system (BAS),  communications gateway device, programmable logic controller (PLC), or datalogger software program running on a computer. There can be up to 127 slave devices on one multi-drop RS-485 serial bus. The Master typically sends a command to one of the slaves and waits for its response.

The RS-485 bus used by WattNode® Modbus energy meters (and most other slave devices) is referred to as a “two wire” half-duplex bus (vs. “four wire” full-duplex). A half-duplex, two-wire bus requires fewer signal conductors, but only allows one device to transmit at any given time.

Although the RS-485 half-duplex bus standard is commonly referred to as “two-wire”, keep in mind that a third wire is also needed for a zero volt reference (i.e. signal common). To avoid introducing ground loops, the signal common wire should only be grounded to earth on one end (usually at the master).

A slave may only transmit in response to a command from the Master that is specifically addressed to that slave—the address is determined by the WattNode’s DIP switch settings. To avoid bus contention, every slave must be assigned a unique address by the installer. DIP switch positions 1 to 7 set the slave address from 1 to 127, and position 8 determines the baud rate (ON=19200, OFF=9600). As shipped from the factory, the address is set to zero (not a valid address) and the WattNode Modbus LED will turn red to alert the installer that the address needs to be assigned. If the WattNode meter is the only slave device on the network then flip position 1 to the ON position to assign a slave address of 1. If there are more than one WattNode then the other units must be assigned a different address (e.g. leave position 1 OFF and set position 2 ON to set the next unit’s address to 2). Each subsequent switch position has a weight twice that of the preceding one (e.g. position 1 has a weight of 1, position 2 has a weight of 2, position 3 has a weight of 4, position 4 has a weight of 8 etc.).

WattNode meters uses the RS-485 signal levels instead of the Universal Serial Bus (USB) or RS-232 (typical of legacy PC serial COM ports) because: 1) It reduces wiring by allowing multiple slave devices to be connected to a single bus; and 2) Its “differential” signaling mode is more tolerant of EMI (electromagnetic interference), and can extend much greater distances (up to 4000 feet). RS-232 is typically used for distances less than 50 feet and it can only be used to communicate with a single slave device. USB supports multiple devices at much higher speeds but distance is limited to 16 feet.

Only the master can initiate a transaction by issuing a command frame (or message) addressed to a specific slave. The slave with the matching address then responds either with requested register data or by echoing the command for the register write operation. The first byte of each frame is the address of the slave device. The second byte is the command or function code. The subsequent bytes vary depending on the type of command and the last two bytes are the CRC (Cyclic Redundancy Check) value for verifying that the frame is valid.

WattNode Modbus meters support the Modbus RTU Protocol, which is a binary (vs. ASCII hex) protocol. Compared to Modbus ASCII Protocol, Modbus RTU Protocol requires fewer bytes to be transmitted across the bus to convey the same volume of data.

See Also