Ranbeer Singh
Full Member level 5
- Joined
- Jul 30, 2015
- Messages
- 259
- Helped
- 22
- Reputation
- 44
- Reaction score
- 22
- Trophy points
- 1,298
- Location
- Faridabad India
- Activity points
- 3,266
Hello,
I have done programming for RTU MODBUS slave side and it's working fine with PC application.
My slave side RX interrupt codes ware like this :
RX-interrupt -> Received data -> De-Code data -> Check function code -> Action according to function code.
Now i want to know about RTU MATER side main sequence. My questions are given blow.
1. How to find how many slaves are connected to bus and what are the address of those?
2. When i press a button i want to read slave variable value. It will according to me
(3.5 char delay)
0x02 (Address of slave)
0x06 (Read single register)
0x9C45 (Data address of 40005)
0x0000 (Data value)
0x5A6A (CRC)
CR LF
Finally it will : 2 6 9c45 0000 5a6a
Is is write or wrong?
3. Main sequence
I have done programming for RTU MODBUS slave side and it's working fine with PC application.
My slave side RX interrupt codes ware like this :
RX-interrupt -> Received data -> De-Code data -> Check function code -> Action according to function code.
Now i want to know about RTU MATER side main sequence. My questions are given blow.
1. How to find how many slaves are connected to bus and what are the address of those?
2. When i press a button i want to read slave variable value. It will according to me
(3.5 char delay)
0x02 (Address of slave)
0x06 (Read single register)
0x9C45 (Data address of 40005)
0x0000 (Data value)
0x5A6A (CRC)
CR LF
Finally it will : 2 6 9c45 0000 5a6a
Is is write or wrong?
3. Main sequence