You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old May 23rd, 2017, 10:43 AM   #1
bob.southall
Member
United Kingdom

bob.southall is offline
 
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.
  Reply With Quote
Old May 23rd, 2017, 11:51 AM   #2
danw
Member
United States

danw is online now
 
danw's Avatar
 
Join Date: Oct 2004
Location: midwest, USA
Posts: 3,090
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.
  Reply With Quote
Old May 23rd, 2017, 12:37 PM   #3
lesmar96
Lifetime Supporting Member
United States

lesmar96 is offline
 
Join Date: May 2017
Location: PA
Posts: 416
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.
  Reply With Quote
Old May 23rd, 2017, 03:54 PM   #4
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,361
Quote:
Originally Posted by danw View Post
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.
Usually there is writed limit of 15m or 50feet for RS232 (19200b), but if you slow down comms then limit goes bigger.

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.
  Reply With Quote
Old May 23rd, 2017, 06:16 PM   #5
Pete.S.
Member
United States

Pete.S. is offline
 
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.
  Reply With Quote
Old February 14th, 2020, 03:58 PM   #6
MuhammadZeshan
Member
Pakistan

MuhammadZeshan is offline
 
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
How to Implement Modbus TCP Protocol Using VBA with Excel gclshortt LIVE PLC Questions And Answers 18 June 13th, 2019 07:54 PM
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


All times are GMT -4. The time now is 06:45 AM.


.