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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 13th, 2017, 02:25 PM   #1
memphiskt007
Member
United States

memphiskt007 is offline
 
Join Date: Dec 2017
Location: Tennessee
Posts: 4
Custom Modbus Device & Modicon PLCs

Hello all,

Been in the industry for about 20 years and have finally found a problem I cannot solve. Looking for some modbus help.

I have a Momentum PLC with an M1 adapter, part number 171CCC96030, programmed with Concept 2.6. This setup communicates via Modbus TCP/IP to a custom 3rd party device specific to this customer. It has communicated for years, no issues.

Its time to replace this device with a Modicon M340, also communicating via MB TCP/IP, programmed in Unity. Upon replacing the old PLC with the M340. I can no longer communicate with the 3rd party device via read/write vars or IO scanner. Performing a Wireshark from the 3rd party device I can see the Modbus traffic getting to the machine. I removed all devices from the customer's network so there are no managed switches between, just to make sure.

I have exchanged the 3rd party device with other identical devices on site, just to verify it still works. It works flawlessly with other momentum PlCs. I have taken my M340 to other modbus tcp/ip devices and it works fine. So the code is good. Using other M340s with the 3rd party device yields the same results.

My suspicion is something within the 3rd party device does not like the M340. The company supporting this 3rd party device has long since been out of business, so no help there. Is there anything within unity, or native to the hardware that I am missing? Any thoughts?

If there is something I have missed or not stated, feel free to ask.
  Reply With Quote
Old December 13th, 2017, 03:39 PM   #2
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 13,896
When analyze networks for 900 years look so good you will not.

Wireshark, you have.

Mmm. Compare between controllers, you will.

Verify Device ID number in packet, you must.
__________________
- "Simpler is better, except when complicated looks really cool."
  Reply With Quote
Old December 13th, 2017, 03:46 PM   #3
g.mccormick
Member
United States

g.mccormick is offline
 
Join Date: Jul 2012
Location: IN
Posts: 467
Quote:
Originally Posted by Ken Roach View Post
Wireshark, you have.

Mmm. Compare between controllers, you will.

Verify Device ID number in packet, you must.
Agree. It would appear that the 3rd party device is the master/client and the m340 is the server/slave?

You can capture the packet in wireshark, then use you laptop and your favorite modbus master software to send the exact same command to the m340 and see if it responds correctly. Is there a chance the m340 response is too faster/slower than the quantum?
  Reply With Quote
Old December 13th, 2017, 05:08 PM   #4
GeoffC
Member
Australia

GeoffC is offline
 
GeoffC's Avatar
 
Join Date: Aug 2006
Location: Newcastle
Posts: 682
Have you tried just a single request (using Read_var), some older devices cant handle too many requests too quickly
__________________
Geoff C
______________________________________
  Reply With Quote
Old December 13th, 2017, 05:41 PM   #5
memphiskt007
Member
United States

memphiskt007 is offline
 
Join Date: Dec 2017
Location: Tennessee
Posts: 4
Quote:
Originally Posted by g.mccormick View Post
Agree. It would appear that the 3rd party device is the master/client and the m340 is the server/slave?

You can capture the packet in wireshark, then use you laptop and your favorite modbus master software to send the exact same command to the m340 and see if it responds correctly. Is there a chance the m340 response is too faster/slower than the quantum?
The identifier is correct in the request. I played around with the timing, speeding up slowing down, nothing. You are correct the 3rd party device is the server.

I have tried limiting the IO scans and the read/write commands to 1 register each, and only had 1 function at a time. So either read, write, or IO scan, never together.

I also forgot to mention originally, when I send my first request with the M340, the 3rd party device tries to respond. The OS (DOS) implies that the MB server is trying to use a socket already utilized by another connection, and halts comms. When observing the wireshark captures, it shows the M340 trying to use ports other than 502 and resets the connection.
  Reply With Quote
Old December 13th, 2017, 05:58 PM   #6
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,005
What modbus function code old Concept use?

Read_var and write_var blocks can use only certain codes.

You can try with DATA_exch block and build query separatly.

https://www.schneider-electric.co.in/en/faqs/FA172390/
  Reply With Quote
Old December 13th, 2017, 06:08 PM   #7
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 13,896
Welcome to the PLCTalk Forum community, by the way. I'll knock off the Yoda jokes.

Is the M340 getting a Modbus-level error in which the device provides and error code instead of a data response, or is it getting a TCP-level connection failure ?

If you can grab both the Quantum and the M340 transactions in Wireshark, zip them up, and post here that might help. There are a bunch of Modbus enthusiasts over at Control.com as well.

Any chance the M340 is somehow also trying to establish an EtherNet/IP connection on Port 44818 ?

This might be an issue with the old TCP stack on your DOS device. Dissecting it is the only troubleshooting method I can think of.
  Reply With Quote
Old December 13th, 2017, 06:34 PM   #8
memphiskt007
Member
United States

memphiskt007 is offline
 
Join Date: Dec 2017
Location: Tennessee
Posts: 4
Quote:
Originally Posted by Ken Roach View Post
Welcome to the PLCTalk Forum community, by the way. I'll knock off the Yoda jokes.

Is the M340 getting a Modbus-level error in which the device provides and error code instead of a data response, or is it getting a TCP-level connection failure ?

If you can grab both the Quantum and the M340 transactions in Wireshark, zip them up, and post here that might help. There are a bunch of Modbus enthusiasts over at Control.com as well.

Any chance the M340 is somehow also trying to establish an EtherNet/IP connection on Port 44818 ?

This might be an issue with the old TCP stack on your DOS device. Dissecting it is the only troubleshooting method I can think of.
Will try to get the captures to you guys ASAP. This system is in an environment that is difficult to get in, and its manufacturing to boot (meaning of course, I can't do proper testing)

Could you elaborate on your last points? If I recall, there was something trying to use port 44818. How would this disrupt my MB traffic? Since this DOS machine is no longer supported, I am really hoping for a solution on the PLC side.
  Reply With Quote
Old December 13th, 2017, 06:43 PM   #9
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 9,781
Quote:
Originally Posted by memphiskt007 View Post
...

If I recall, there was something trying to use port 44818. How would this disrupt my MB traffic? Since this DOS machine is no longer supported, I am really hoping for a solution on the PLC side.
I believe that is a port used by RSLinx autobrowse. If you have RSLinx installed on this machine, make sure RSLinx is not running.
__________________
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote
Old December 13th, 2017, 06:46 PM   #10
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 13,896
Modicon has added limited support for the Rockwell "EtherNet/IP" protocol to some of their devices, and that protocol uses TCP Port 44818.

If your embedded system can only accept one TCP connection from a given host, then maybe if the M340 is setting up an EtherNet/IP protocol connection and that's interfering with the Modbus/TCP connection on Port 502.

That's just a guess, of course.

EDIT: or, of course, if the embedded device can only support one TCP connection total, and gets hosed up if something tries to access it while it's trying to be a Modbus/TCP server.

In general, RSLinx Classic browses with a broadcast packet rather than a TCP connection on Port 44818, but who knows what's going on here. Maybe Modicon tools browse differently for EtherNet/IP capable devices, in some kind of "auto discover" feature for their local LAN segment.

Last edited by Ken Roach; December 13th, 2017 at 06:48 PM.
  Reply With Quote
Old December 13th, 2017, 07:05 PM   #11
memphiskt007
Member
United States

memphiskt007 is offline
 
Join Date: Dec 2017
Location: Tennessee
Posts: 4
Quote:
Originally Posted by Ken Roach View Post
Modicon has added limited support for the Rockwell "EtherNet/IP" protocol to some of their devices, and that protocol uses TCP Port 44818.

If your embedded system can only accept one TCP connection from a given host, then maybe if the M340 is setting up an EtherNet/IP protocol connection and that's interfering with the Modbus/TCP connection on Port 502.

That's just a guess, of course.

EDIT: or, of course, if the embedded device can only support one TCP connection total, and gets hosed up if something tries to access it while it's trying to be a Modbus/TCP server.

In general, RSLinx Classic browses with a broadcast packet rather than a TCP connection on Port 44818, but who knows what's going on here. Maybe Modicon tools browse differently for EtherNet/IP capable devices, in some kind of "auto discover" feature for their local LAN segment.
This is what I have suspected all along, that the device can only handle one connection. I had my laptop try and retrieve data while the momentum was, and the server halted. However, what I don;t understand is why the device is fine with a single momentum but not a single m340. When trying to hit the device with my laptop only, the server halts. So this machine seems to love momentum's and hate everything else. I suspect its a "feature" hard-coded into the DOS system, but no one is familiar with it and I have yet to get my hands on it where I can play around with it. I think my only option is to take some captures, and see what I can change on the DOS machine.
  Reply With Quote
Old December 13th, 2017, 08:15 PM   #12
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 13,896
Quote:
When trying to hit the device with my laptop only, the server halts
Interesting. I wonder if that's a coincidence, like maybe your computer starts trying some kind of uPnP or other traffic that trips up that computer.

Any chance you can get a tap or mirror port on a switch to give you better visibility into the system ?

Or can you reconfigure the Quantum and then the M340, to point to another address which is occupied by a test computer running just ModSim32 and Wireshark ?
  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
Modicon 984 Series 685 Modbus Plus Address tim985 LIVE PLC Questions And Answers 1 April 20th, 2017 08:39 AM
Programming Modicon M340 modbus TCP Buscom LIVE PLC Questions And Answers 13 September 7th, 2016 09:55 AM
Modicon PLC with Modbus Barcode Scanner Jmickle LIVE PLC Questions And Answers 9 January 6th, 2016 10:13 AM
Connect PLC Modicon Momentum by ModBus TCP AlexPLC LIVE PLC Questions And Answers 7 October 24th, 2013 09:55 AM
Modbus Master not polling the Modbus Slave through an EtherNet/IP Connection mihiri LIVE PLC Questions And Answers 3 July 15th, 2010 02:41 AM


All times are GMT -5. The time now is 10:17 AM.


.