I'm just starting out with understanding how modbus works over a rs485 protocol.
I've received a communication protocol document from a company that makes solar inverters.
I want to send a command to the slaves but the documentation notes that I need to send a command + a sub-command.
I'm given a table of protocol characters and a communication table.
Since I'm new to this I'm having a hard time understanding this.
The protocol table:
And this is the communication table:
How would the packet look in hex if I would send the following details:
- Slave address: 4
- Command: 32
- Sub-command: 3
I do understand I need to start the package with the STX, ENQ hex codes. But I have no idea how to construct the rest of the package. Especially the (N, N + 1, N + 2, N + 3) part.
Is there any tutorial that will explain how to construct a package?
I don't understand how I need to provide a value for all the bytes (since I don't know exactly what they mean).
Could somebody give a good example of a packet with these details and please describe each field?
A good tutorial/explanation will also do the job.
I just started studying this for 2 days, so please excuse me if I sound like a complete noob.
Thanks in advance!