ModPackQTModPackQT
TutorialsSlave
0/4 complete
Sign up free
SlaveLesson 1 of 4

Design Your Register Map

Set up a virtual slave's register values like a real device would.

When you build a Modbus slave device — a sensor, a controller, a gateway — you define its register map: which address holds which value.

Good register maps are documented and logical: group related values together, add padding for future expansion, and document the units and scaling (e.g. HR 5 = temperature × 10 in °C).

The virtual slave below is yours to configure. It represents a weather station with these registers: • HR 0 = Temperature (°C × 10) • HR 1 = Humidity (%RH × 10) • HR 2 = Pressure (hPa) • HR 3 = Wind speed (km/h × 10) • Coil 0 = Rain sensor (ON = raining)

Set realistic values — a hot summer day: 32.5°C, 65.0% humidity, 1013 hPa, 12.0 km/h wind, no rain.

Challenge

Set HR 0 to 325 (32.5°C × 10) in the register table.

Your Slave — Register Map
AddressDatasheetValue (edit)Hex
HR 0400010x0000
HR 1400020x0000
HR 2400030x0000
HR 3400040x0000
HR 4400050x0000
HR 5400060x0000
HR 6400070x0000
HR 7400080x0000
HR 8400090x0000
HR 9400100x0000