This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How slave data send to master?

I have system like one master and 20 energy meter as slave device.
I am reading fixed 10 holding register and 10 coil register from each slave.
Baud rate : 9600,
Parity : even,
Data bit : 8
Response timeout : 3 second.

My questions are :

How slave will receive data from slaves?
1) First holding register from first slave and then second slave's first holding register and then third.... up to 2oth, and again second holding register from first slave and second register from second slave like this...

2) first of all, all holding register of first slaves and all coil register of first slave and then second slave's turn. like this goes to last 20th coil register and start again first slave?

How is it work?

One of this way is it working or third option is there????

Parents
  • Don't ask us how you are going to do it - you are the designer.

    But since you need to address the individual slaves, it's normally easier to address the first slave and then retrieve all measurements before releasing it and addressing the second slave.

    But as long as you write the software for both master and slave side and your serial bus have a way of properly address the individual slaves then there are no right and wrong. It's a pure design decision - and only you knows the full requirements specifications to allow you to see if there might be a problem with some choices. Like if there are special requirements of max time difference between sampling device x register n and sampling device y register n. Or if all registers for a single slave must have been sampled within a narrow time window.

Reply
  • Don't ask us how you are going to do it - you are the designer.

    But since you need to address the individual slaves, it's normally easier to address the first slave and then retrieve all measurements before releasing it and addressing the second slave.

    But as long as you write the software for both master and slave side and your serial bus have a way of properly address the individual slaves then there are no right and wrong. It's a pure design decision - and only you knows the full requirements specifications to allow you to see if there might be a problem with some choices. Like if there are special requirements of max time difference between sampling device x register n and sampling device y register n. Or if all registers for a single slave must have been sampled within a narrow time window.

Children