We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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????
How slave will receive data from slaves? can not be. in a master-slave, slave can not speak to slave the above would be master to master in a multi-master system
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.
There is no information about the architecture or the meters. What are the specification for the meter, how does it expect to provide readings, what's the protocol? Does the meter manufacture provide any examples, or suggestions?
Generally you'd want to go from meter (slave) to meter retrieving the parameters you need, and sending back updates.
Generally you'd want to go from meter (slave) to meter had to read that 3 times, to avoid misunderstandings:
Generally you'd want the master to go from meter to meter
Meters are connected in daisy chain through Modbus RTU protocol.... its IDs are 1 to 20.