![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Jan 2017
Location: Ely, UK
Posts: 16
|
Somachine basic modbus TCP help
Hi all
I tried to piggyback onto the back of an old thread, but I think I need to ask for help on here. I am trying to get two M221 plcs to communicate via modbus. Now I cant use serial (which I can get to work on the bench), because the distance is too far >15M So I am left with TCP. Which I cant for the life of me figure out. Any help or guidance appreciated. |
![]() |
![]() |
#2 |
Member
|
The signal does not die at 15m. I've had RS-232 work up to 35m.
There are RS-232/RS-485 converters; consider putting one on each end. 485 is rated for longer distance. |
![]() |
![]() |
#3 |
Lifetime Supporting Member
![]() ![]() Join Date: May 2017
Location: PA
Posts: 462
|
I have had good success with Modbus TCP/IP between two M221's. Check out the templates in SoMachine 1.5. The one named xSample_ModbusTCP_Wireless Push Button_ReadStatus is an up and working program. Set the IP of your server PLC under Configuration/ETH1/Modbus TCP. These program will read MW0 in the server to MW7 in the client. Hopefully this gets you started. To read more bits and words, you will have to make changes in the ctrl_tables.
|
![]() |
![]() |
#4 | |
Member
![]() ![]() Join Date: Jan 2006
Location: Finland
Posts: 1,520
|
Quote:
https://www.lammertbies.nl/comm/info/RS-232_specs.html RS232 cable length according to Texas Instruments Baud rate Maximum cable length (ft) 19200 50 9600 500 4800 1000 2400 3000 For RS485 limit is 1200m (standard), but hardware can make it less and you need isolators or amplifiers. |
|
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Mar 2016
Location: Fl
Posts: 464
|
If you want to use RS232 just put in a RS232 to RS422 (not RS485) converter on each side.
RS422 is duplex communication and doesn't require fail-safe bias resistors as RS485 do. Basically RS422 is the long range industrial replacement of RS232. Otherwise modbus tcp is basically modbus embedded in a tcp package. You have an ip adress that has to be right. Other than that it is 99% the same. The difference is that the checksum has been removed (because tcp communication have it's own checksum). Also what is called slave address on serial is called unit id on modbus tcp. It should not be used by either the server or the client according to the standard but a lot of manufacturers screw that up. So it unit id/slave address has to be right as well. "Server" on modbus tcp is the same as slave on serial modbus. "Client" on modbus tcp is the same as master on serial modbus. That can be a cause of confusion as well. Last edited by Pete.S.; May 23rd, 2017 at 06:19 PM. |
![]() |
![]() |
#6 |
Member
![]() ![]() Join Date: Feb 2020
Location: Lahore
Posts: 2
|
Modicon m580
Hi all,
Has anyone worked on modicon M580 Cpu with communication 0301?I need help for communication. |
![]() |
![]() |
Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Implement Modbus TCP Protocol Using VBA with Excel | gclshortt | LIVE PLC Questions And Answers | 22 | Yesterday 08:40 AM |
Modbus TCP Data Logging to Database | gclshortt | LIVE PLC Questions And Answers | 9 | June 2nd, 2016 12:52 AM |
Modbus Master not polling the Modbus Slave through an EtherNet/IP Connection | mihiri | LIVE PLC Questions And Answers | 3 | July 15th, 2010 03:41 AM |
Mitsubishi Q Series Modbus TCP module QJ71MT91 set up help req'd... | Pocko | LIVE PLC Questions And Answers | 0 | July 30th, 2006 03:45 AM |
Profibus - Modbus TCP translator | ewm3 | LIVE PLC Questions And Answers | 5 | May 7th, 2004 12:31 AM |