The 86 box has built-in 00 01 that supports the use of modbus (can be used as a slave or a host). Currently, it only supports 03 and 10H instructions. The default baud rate is 1115200, and the baud rate can be reset in the main program. Slave mode configuration: Writing 5AAAH to address EA00H indicates that the 86 box starts to execute slave mode. Writing 5AH to the high byte of address EA10H represents modbus enable, and the low byte represents the slave address setting. Example: Writing 5A10H means that the 86 box executes slave mode, and the slave address is 10H. EA13H address This instruction processes the timing time, including the instruction transmission time, in ms. Host mode configuration: Writing 5AA5 at address EA00H indicates enabling host mode EA10H addressThe high byte writes 5AH to represent modbus enable, and the low byte represents the sending address. For example: writing 5A09H means that the 86 box executes the host mode and sends data to the slave at address 09. EA11H address high byte The Modbus instructions used for read/write only support 03H and 10H, the low byte sans-serif]Read and write data length, unit word EA12H addressThis instruction processes the timing time, including the instruction transmission time, in ms. For the read instruction, the timing time is the longest time for the slave to respond. EA13H-EA14H address 4 Bytes specify the sending method of Modbus read and write instructions 1. sans-serif]0x0000:****Execute the command on all pages 2. 0x0001age_ID Execute the command only on the specified page
3. 0x0002: VP executes the instruction only when the low byte content of the variable buffer pointed to by VP is 0x5A. The content pointed to by VP is automatically cleared after all related instructions are executed. The EA14 address is used as the EA13H configuration parameter. The EA15H address of this instruction reads and writes data at the starting address of the DGUS screen variable storage area.
EA16H address The data read and written by this instruction is the starting address of the data on the Modbus device.