The normal response is an echo of the query, returned after the register contents have been preset.Presets values into a sequence of holding registers (4X references). When broadcast, the function presets the same register references in all attached slaves. The NMBA-01 allows one or multiple registers to be written at one time using one Preset Multiple Regs function. Only registers within one group can be written at one time. If a write to one of the registers fails, the module will try to write to other registers, but the response will contain a corresponding exception message.
Query
The query message specifies the register references to be preset. Registers are addressed starting at zero: register 1 is addressed as 0. The requested preset values are specified in the query data field. The NMBA-01 uses 16-bit values. Data is packed as two bytes per register.If the slave receives the query without a communication error, but cannot handle it (for example, if the request is to read a non-existent coil or register), the slave will return an exception response informing the master of the nature of the error.
Exception Responses
Except for broadcast messages, when a master device sends a query to a slave device it expects a normal response. One of four possible events can occur from the master’s query: 1. If the slave device receives the query without a communication error, and can handle the query normally, it returns a normal response. 2. If the slave does not receive the query due to a communication error, no response is returned. The master program will eventually process a time-out condition for the query. 3. If the slave receives the query, but detects a communication error (parity, LRC, or CRC), no response is returned. The master program will eventually process a time-out condition for the query