Addressing multiple slaves using rs485.


I am trying to make multiple slaves(Arduino 2560) communicate with the master arduino using RS485. I am confused as to how to address each slave in the master.

If any body can give me an idea as to how to go with this, it will be really helpful.

Thanks in Advance.

Make part of the message you send an address, one for each slave, or global, that the slaves read and know whether to respond or take an action or not.
Maybe the first byte of each message is 0xAA, then an address from 0x00 to 0xFF, then a command, and finish up with any data needed. Maybe some commands have 0 bytes, some have 1, others have 2 or more.
The slave can respond with 0x55, and their address, and any data if needed.

If AA and 55 are too common, i.e. it will appear in any data normally used, then mix it up a little to find something that can be uniquely identified.