7/14/2023 0 Comments Delta hmi run out of memoryResult = node.readHoldingRegisters(2, 6) slave: read (6) 16-bit registers starting at register 2 to RX buffer Result = node.writeMultipleRegisters(0, 2) slave: write TX buffer to (2) 16-bit registers starting at register 0 set word 1 of TX buffer to most-significant word of counter (bits 31.16) set word 0 of TX buffer to least-significant word of counter (bits 15.0) initialize Modbus communication baud rate ModbusMaster node(2,7) //Create class object using Serial2 This is what my code looks like (that’s pretty much the example sketch provided with the library but specifying another Serial port to create the class object): #include I am experiencing a problem when trying to communicate with a Modbus slave device (ID 7) connected on Serial2 (UART#2 pin16 and pin17 of my Arduino Mega 2560).
0 Comments
Leave a Reply. |