![]() ![]() To turn on the LED on pin 12, double-click on the 0 register and change the Value to 1. A MODBUS message sent from a master to a slave contains the address of the slave, the command (e.g. Slave ID above I set to 1, you can change other values in the code, choose Function 03 (Read the document to understand more about Modbus), The address is 0 and the number is 16 registers. MODBUS© Protocol is a messaging structure, widely used to establish master-slave communication between intelligent devices. Where 9600 is the Baud rate and Even Parity is the error checking mode corresponding to the command line Serial.begin(9600,SERIAL_8E1) Īfter connecting, go to Setup > Read/ Write Definition. Go to Connection > Connect install as follows Modbus slave(1,Serial,2) // this is slave and RS-485 chân 2 * u8id : node id = 0 for master, = 1.247 for slave ![]() Here I use register au16data to switch off Led pin 12 and register au16data to store analog value of pin A0. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |