MODBUS. Master not able to read slave response.
Hello.
I have a issue with my Modbus connection, i am using AC800M PM860 PLC as master device.
I am able to write commands to my slave device succesfully, changing parameters etc is no problem, but the master is not able to read the responses from the slave when i try to read registers.
I have tried with ModSim and connected it to my PLC, i can see the messages that the master is writing and the response from the software, both are correct according to the modbus protocol, but i am not able to read the responses. I can see the response being sent from ModSim og my slave device, but the LED indicator for RX is not blinking on my controller.
I had issues earlier with the physical connection so i wasnt even able to write to the slave device, but i have made new connectors using pinouts i got from ABB, and i have tried with the toolkit cable TK212A wich comes with the PLC.
I have tried with different Flow Control setting, and with and without poll time, but that doesnt work. When i enable flow control nothing at all is being sent. When i try with poll time i can see the data on the ModSim software, but the master isnt reading the response.
I have attached pictures for the pinouts im using on the RJ plug and the DB9 connector.
Voted best answer
-4929 means as general slave is not visible for Read block.
You can check the slave address at MBConnect block.
Connect block should report Valid connection first.
Also settings for COM port of PLC (baud rate, stop bit etc - everything should be same for slave and AC800M.
After that check a setting that I provided for MODBUS (under COM port settings).
Important - After each modification, in order to test you have to disable and enavble connect block again ! Otherwise modifications are not affected. Also better reset complete the CPU.
Try to cross RX/TX cables between master and slave, sometimes that helps.
Rx LED on AC800M will not flash also in case of some configuration mistakes, and not only for phisical connection mistake.
Answers
I tried the pinout you suggested and connected the PLC to ModSim, still no success receiving anything on the master.
I tried another thing now, i took the TX wire wich my PC responds on and ground and wired it to the slave device i am using, and i can see the LED lamp for RX is blinking there. So i dont know what is causing the message not beein read by my PLC.
Provided by ogomez cable connection is rigth. Here I attach another similar diagram (TK853).
Very important settings for MODBUS settings - attached MODBUS.doc.
Always set Poll time = 0
Use MBRead block.
Syntaxis for Start Address (Startaddr) parameter of the block:
%MW10#0 - read register 3xxx - in this case 30000 or 30001
%QW10#0 - read register 3xxx - in this case 30000 or 30001
%IW10#0 - read register 4xxx - in this case 40000 or 40001
%QX10#0 - read bit 1xxxx - in this case 10000 or 10001
%IX10#0 - read bit 2xxx - in this case 20000 or 20001
(%xW - Command to read FC1,2,3..., 10-decimal, #0 - address 0)
You can see
MODBUS Configuration CI853 - For Beginners (1.0)http://www402.abbext.com/MODBUS-Configuration-CI853-For-Beginners_1-0_a915.aspx
I think the problem is not in cable connection.
Try also your slave with address 2 or 3 or other (not 1)
I have got the addresses right, that i am sure of since i can see the data traffic being sent when im using ModSim, also i am able to write to my slave device, so i know the settings and program should work.
This immage shows the datatraffic when i send a read request, and it clearly shows that ModSim sends a response to my masters request, but the LED light for RX on my controller isnt blinking or any values being shown on the read block.
I have tried the making cables with the pinout you suggested, but still i am only being able to write to my slave and not read.
In case you can write to the slave, RX and TX should blink during writing.
If that is the case, the cable connection is not wrong.
You have to look for reading area, start address and so on. Some slaves require all the data area to be read at once, otherwise give error message.
What about error code in your read block? in case you can't read, it should report error and error code?
Do you use pulses at REQ input of MBRead block? It needs positive edge each 2-3 sec - read request.
Funny, but check if your LED's are OK. Please try with other COM port. Are you using COM3 on the CPU or external CI853?
I have both CI853 module and tried with COM3 port on the controller, same result on both, i am able to write but not read.
I use pulsegen on the MBRead block, pulse time is set to 500ms and period time is 1second (or pulse time 1s and period time 1.5s cant remember at the moment), i can try and set the pulse time to 2-3 sec and see if i get a different result.
I get error code 4929, wich is communication lost or timout if i remember correctly.
I find it really strange that there is no indication that the PLC is receiving the response from the slave.
I have tried wired the cables wich the response is being sent back from my viritual ModSim slave (Ground and TX form the computer), and wired them to my actual slave device and the LED for RX is blinking each time ModSim gives a response, so why im not able to read the responses or have no indication that the controller is receving any data i have no idea about.
Can you provide the step by step and detail of this issue? Now I try to use Com3 connect to Modbus Slave and Rx/Tx LED on PM861 not on.
Add new comment