12/21/2023 9:48 AM | |
Joined: 5/3/2009 Last visit: 1/24/2025 Posts: 9 Rating: (0) |
Good day everyone, I'm busy to make a small application to read some data from couple of modbus slave device. I have attached a screenshot from the network. I'm using MB3480 to convert Modbus RTU to Modbus TCP and I'm using Modbus Slave to simulate data for each seperate slave. I do have connection with all of the devices and i could read value. I only have two issue with the first Slave ID1 because for this specific Id I have to differnt range addresses. 1st issue is, Icould read value for the first range (400001-400100) but for the second range(401100-401200) I only read zero. I have used two seperate call of MB_Client for this purpose and I don't get any error on the MB_Client FB. 2nd issue is, If I change MB_DADA_ADDR in the first call from 400001 to 400100 in PLC and in my Modbus Slave simulation software I only read zero it seems MB_Client only reads first 125 words and it doen't look to the MB_DADA_ADDR!!! is there any parameter to let MB_Client knows to look to the other 125 Words like 2nd,3rd,4rd,5th,6th,...? Best Regards and happy holidays, Vahid Ansari AttachmentModbus_TCP.zip (423 Downloads) |
Last edited by: Vahid Sheikh Ansari at: 12/21/2023 09:54:03Last edited by: Vahid Sheikh Ansari at: 12/21/2023 11:09:02 |
|
12/22/2023 9:07 AM | |
Joined: 5/3/2009 Last visit: 1/24/2025 Posts: 9 Rating: (0) |
Dear Duris_I Thanks for your time. I have add more data in the attachement include plc software and also adjustment of MB3480. at the moment I can not connect to the real Modbus slave modules that's why I'm using "Modbus Slave" software to simulate signals form different IDs and see if I can get this values inside of the PLC(I have connection with the Real PLC and not plcsim) so the only simulator for me is "Modbus Slave" software. for the data type for now I'm just focusing on the communication that's why I just wanted to read 100 or 125 data as integer from each slave.(except ID1, for this ID i do have two seperate address range) for ID1 because we have two seperate range of the addresses I have devided to ID1_1 and ID1_2 in the software. (You can do one other test just make a simple project and call MB_Client one time first assign 400001 as MB_DATA_ADDR and change the value inside of the Modbus Slave" Software then you can see the same value inside of your PLC software but if you cjange your MB_DATA_ADDR from 400001 to 400200 and also inside of you "Modbus slave" software then you only read zero, it seems MB_Client it's only reading the first 125 word!!!) I hope this could help you to get an idea about the issues that I have. Best Regards, Vahid AttachmentExtra_Screenshots_pdf_Modbus_TCP.zip (539 Downloads) |
Last edited by: Vahid Sheikh Ansari at: 12/22/2023 13:37:32 |
|
12/27/2023 9:37 AM | |
Joined: 5/3/2009 Last visit: 1/24/2025 Posts: 9 Rating: (0) |
Dear Duris_I I just wanted to let you know I have found what was the issue on my application. actually in my "Modbus Slave" simulator software I shouldn't make two seperate slaves with the same ID and just with different addreses (I used first Slave ID1 with address 400001-400125 and the second ID1 with address 401100-401200) instead I should make only one slave with the long address difinition (now I have only one slave ID1 with addresses range 400001-402000) if you look to the screenshots you will find it out. now I can read simultaneously data from two differnet range of address from my modbus slave. Best Regards, Vahid AttachmentFinalSolution.zip (462 Downloads) |
This contribution was helpful to3 thankful Users |
Follow us on