Technical Forum

Communication / Networks

S7-1200 Modbus Communication Problems

Thread Starter: Robster   Started: 8/20/2009 4:09 PM   Replies: 12

« Previous thread Next thread »
12» Page 1 of 2 (13 items)
  8/20/2009, 4:09 PM
Joined 5/28/2008
Last visit: 9/17/2014
Posts: 1013
Rating:
Rated: Excellent [4.03 out of 5 / rated 66 time(s)]. (66) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

normaly I would like to open this thread in Communication/Networks. But forum seems to have a problem at this time. So I'll write it here. laugh

I have a S7-1200 1214C with RS458 Communication Module as Modbus Master. I also have a Motor as Modbus slave. Motor has Slave Address 10. I configurated MB_COMM_LOAD with 9600 baud, Parity 0, RESP_TO 1000. I also set interface to 8 data bits and 1 Stop Bit. (also tried 2 Stop bits, with same result).

Now I try to read communication status with MB_MASTER. I entered the slave adress 10, Mode 80, Data_Addr 40001, Data_Len 2. The I send the Request. FB is busy, TX-LED on Communication Modul is blinking, RX LED is also blinking. After three time try to send the telegram and waiting for request, the status word shows 80C8 (no response from slave).

My question is now what I can do or what I have forgot, not getting a communication. If I change slave address, the Status word is the same, but RX-LED is not blinking. So I think, Slave try to communicate, but S7-1200 can't read it?

I also tried a communication beetween 2 S7-1200 at the same way and it works.

So, has anybody an idea??

regards



=== Edited by Robster @ 8/20/2009 4:20 PM [GMT ] ===


Top
  8/21/2009, 10:06 PM
Joined 7/24/2008
Last visit: 10/21/2014
Posts: 2516
Rating:
Rated: Excellent [4.33 out of 5 / rated 445 time(s)]. (445) 
Users with special expertise supervising conferences
Rated: Excellent [5 out of 5 / rated 1 time(s)]. (1) 
Hi,

Here there is a sample program between two S7-1200:

Attachment: Modbus.zip  (2967 Downloads)

Denilson Pegaia
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040
E-Mail: atencao.cliente.ac.br@siemens.com

Top
Thank you for this post from:
  8/26/2009, 5:20 AM
Joined 6/22/2009
Last visit: 1/22/2010
Posts: 1
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi all cool
Top
  8/26/2009, 12:06 PM
Joined 5/28/2008
Last visit: 9/17/2014
Posts: 1013
Rating:
Rated: Excellent [4.03 out of 5 / rated 66 time(s)]. (66) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
vnn_pro wrote:
Hi all cool


???
Top
Thank you for this post from:
  8/26/2009, 5:38 PM
Joined 5/28/2008
Last visit: 9/17/2014
Posts: 1013
Rating:
Rated: Excellent [4.03 out of 5 / rated 66 time(s)]. (66) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,
I tested the protocoll of Motor and S7-1200 with Simulation Software.

My result is:

Motor is okay, write and read registers is possible, telegrams are okay

PLC: telegrams are the same as in master simulation software,
I can write registers in slave simulation

BUT: PLC can't read the response from slave. Thats why status got timeout.
I can't explain why??? Is there maybe a wrong setting in response time or waiting time or maybe in port configuration? I'm using RS485 port.

Can anybody help?
Top
  9/4/2009, 10:09 AM
Joined 5/28/2008
Last visit: 9/17/2014
Posts: 1013
Rating:
Rated: Excellent [4.03 out of 5 / rated 66 time(s)]. (66) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

problem is found.
The response time from motor was too fast, so that S7-1200 can't copy the repsonse from motor.
After increasing character time in motor everythink works fine.

Top
  9/4/2009, 6:43 PM
Joined 3/14/2008
Last visit: 8/10/2014
Posts: 111
Rating:
Rated: Excellent [4.07 out of 5 / rated 14 time(s)]. (14) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
I had considered a note in the 1200 forum regarding this. We recently became aware of this problem with the Modbus library. The Modbus library was written to the Modbus over serial line specification and implementation guide. In section 2.5.1.1 the spec calls for an idle time of 3.5 character times which is what we followed as a start condition for a response from a Modbus slave. At 9600 baud that ends up being a bit over 4 milliseconds. Some drives respond much quicker and their response gets missed.

As you have found the workaround is to increase the delay time of the response or increase the baud rate.
Top
  10/15/2010, 6:12 PM
Joined 10/15/2010
Last visit: 10/15/2010
Posts: 1
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 

Hi,

I have the same problem,

But the Modbus Slave cann't modify the repsonse time and the communication speed is limit.

Is there any method to modify the S7-1200 modbus library?

B.R

Top
  10/18/2010, 12:37 PM
Joined 7/24/2008
Last visit: 10/21/2014
Posts: 2516
Rating:
Rated: Excellent [4.33 out of 5 / rated 445 time(s)]. (445) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

I don't know "how to edit" a library block.

you can open a Service Request on the Technical Support site. At least your "necessity" will forward to developer to new blocks versions.

alternativaley, you can use ASCII technologi, and user logic (many) to implement a Modbus (by user). You can also test the possibility to change the port settings (PORT_CGH) after runs MB_COMM_LOAD.

Denilson Pegaia
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040
E-Mail: atencao.cliente.ac.br@siemens.com
Top
  10/16/2012, 7:48 PM
Joined 10/3/2012
Last visit: 2/11/2013
Posts: 31
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
the attachement modbus.zip is under sp2 and I have sp1. Is there some way to open the document without installing pack2 ?? 
Top
12» Page 1 of 2 (13 items)
Actions