5/4/2010 6:05 AM | |
Joined: 4/28/2010 Last visit: 2/27/2023 Posts: 23 Rating: (1) |
DEAR EXPERTS I am working on PLC S7-400 and ET200M with MODBUS CP 341-1CH01-0AE0 (MODBUS Master) & one ABB SACE PR122/P-LI (Slave). Please see attached file that described my problem in communicating our CP to ABB SACE. P.S. Do we have a sample program using FB7 (P_RCV_RK) and FB8 (P_SND_RK)? Regards AttachmentModbus Problem.pdf (681 Downloads) |
5/5/2010 4:13 AM | |
Joined: 4/28/2010 Last visit: 2/27/2023 Posts: 23 Rating: (1) |
Experts please |
5/5/2010 8:42 AM | |
Joined: 4/19/2008 Last visit: 9/3/2024 Posts: 1525 Rating: (159) |
Hi PCS7_PHI, I have seen your Document, can you tell me Which System you are using? PCS7 or Step 7 if you are using the PCS7 have a look on the following post & by using the libraries it is so simple to configured, & I have used that & it is working. & tell me one thing in ABB side Which aadress & length you are reading. |
Ammy |
|
5/6/2010 12:58 PM | |
Joined: 1/17/2007 Last visit: 10/21/2024 Posts: 1547 Rating: (537) |
The fact that the RX light on the slave is blinking in sync with the TX light on the master is good and proves that we are getting nearer. In my experience, RX lights lit permanently is usually indicative of a wiring error. So the swapping over of the wires looked like the correct thing to do. Now to the no response issue. Due to the very simple nature of the modbus protocol (which ironically is actually why is proved so popular), it can be very difficult to ascertain why the slave is not responding. If the slave does not understand the masters request, it will do precisely nothing and it will not return any information as to what the problem is with the request. The slave can return exception responses to the master, which give an error code indicating what the problem with the request is. However, these are only returned in the slave understands what action the master wants (e.g. read holding registers, read coils etc.) but cannot perform the action for some reason (e.g. the number of registers requested is too large). So what could cause the slave to not respond? i) The request data packet is corrupted in some way (poor cable, incorrect/missing termination resistors, noise etc.). This is not very likely though as RS485 is electrically very tolerent. ii) Incorrect serial settings between master and slave (e.g. baud rate, parity etc.). iii) Master polling the wrong slave address. Each slave on the network must have a unique slave address. Each slave will only answer to requests addressed to it's slave address. Do you have access to any diagnostics on the slave (e.g. error counters, receive buffers etc.)? Do you have any way of snooping the serial line with a data analyser? There are a number of free ones available on the internet (Serial Port Monitor). You could use this to capture the serial data and an expert like myself could examine it to see if the modbus request looks OK. You would obviously need an RS485 interface for you PC. B+B electronics do a very nice port powered one called a 485ST9TB (Port powered RS485/RS232 convertor). Just wire this as a "drop" into your network and use the serial port monitor software to capture the data. I have found this equipment invaluable for debugging comms links. It will not cost a lot of money but has saved my life many times in the past. Worth investing if you intend to do a lot of comms work in the future. |
Last edited by: smiffy at: 5/6/2010 12:59 PMProgramming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
5/7/2010 7:25 AM | |
Joined: 4/28/2010 Last visit: 2/27/2023 Posts: 23 Rating: (1) |
Hi Smiffy, Good news, there's a little bit progress in the communication of our CP341 with the ABB SACE PR122, TX LED and RX LED are now blinking in both sides. However, I encountered some error in sending the function code to the slave which is 16#E62 (Reply Message Exception Code 02, Illegal Data Address), and the remedy is to see "Manual of Slave Device". I've checked the manual of ABB SACE and see Exception Occurences and found out that the error is the "Starting Address not valid". Does it mean that the problem is in the programming side and the communication is working? Is it right that the starting address is equal to the Register Start Address? Anyways, If we can solve this error this is a great help to finish my project since I have 22 pcs of this ABB SACE in the plant. Thank you for your continuous response and support. P.S. Please see attached file for your reference. Best Regards, PCS7_PHI (nikkoel.feliciano@siemens.com) AttachmentCP341 + ABB SACE.zip (583 Downloads) |
Follow us on