8/5/2010 9:47 AM | |
Posts: 33 Rating:
|
Dear All I am working on a project where i have cp 341,there are two xcell controllers which will act as modbus salve,in these two controllers, data from 64 feeders or motors comes through motor vision relays.Now my problem is that how i will configure two slaves ,i have to read status bit and also write bits in order to start and stop the feeders,where i will get the status bit and where i have to write the control bits.will i have to give different addresses for both the slaves or only one add as both the controllers are communicationg with each other through backplane bus. Looking forward for your reply. Thanx& Regards Splitted from In OB100 we give the logical address and this is CP starting address. and I have not given proper address. |
Last edited by: O_Moderator at: 8/6/2010 9:13 AMnew subject after splitting |
|
8/5/2010 3:21 PM | |
Joined: 9/27/2006 Last visit: 3/20/2025 Posts: 12344 Rating:
|
Hello rick; Your description is much less clear than the original question of this thread. Compare them both and see for yourself. You do not show the Modbus map of the slaves you want to access, for example, and you do not show that you have determined the registers you want to read and write to in the slaves. You should attribute a different address to each slave, even if they are connected on a backplane; unless you mean to say thatit is indifferent to your communications that you connect to one or the other controller... If you read my earlier (long) post, you will have most of the basics to read input registers (Modbus function 04)and input contacts (Modbus Function 02). To write values to the slaves, you will have to look up new Modbus Functions: -to write to single output coils (start address 00000), you will need Modbus Function 05 -to write to multiple output coils (start address 00000),you will need Modbus Function 15 -to write a value to a single output register (start address 40000),, look at Modbus Function 06 -to write to multiple output registers (start address 40000), look at Modbus Function 16. Look here for more details (Function codes are explained Individually in the left column: http://www.simplymodbus.ca/FAQ.htm#FC When you have determined the Modbus mapping of each slave, and the sequence in which you will call seperate jobs for every Modbus Function required for your exchanges, we can discuss further questions on your part. Hope this helps, Daniel Chartier |
Last edited by: dchartier at: 8/5/2010 4:08 PM |
|
This contribution was helpful to
1 thankful Users |
Follow us on