Micrologix 1400 Modbus TCP

HFrye

Member
Join Date
Feb 2015
Location
Minnesota
Posts
4
Hello, I have been working on a Micrologix 1400 Rev B trying to get it to request Modbus registers via Ethernet. It is connected to a Rosemount Gateway at Modbus address 2. I have attached a screen capture of the rungs and the MSG setup screen. Also the communications and Modbus addresses in the gateway are included. I finally got a response from the 1400 saying Bad Parameter in MSG reply packet. could not be processed by local processor, Error Code (Hex): 45. I set up Data Table F9 as a floating number data file. I would like the Micrologix to poll the gateway on a continuous basis so the registers are always refreshed with the latest data. Thank you in advance for your help!
 
Have you tried setting the “Size in Elements” down to 1 just to see what happens? It sounds like there might be a mismatch in the amount of data being requested and the amount that is coming back.
 
Thank you for the quick response! Yes, I will try asking for just one element to see if it works. I'll let you know what happens. Did you see anything wrong with the rung itself? I would think it would run continuously, correct?
 
First, the MSG instruction needs to have the rung go from false to true every time it executes. As shown, it will run just once when you power up.

I recommend putting a self-resetting timer on the previous rung, and using both and XIC instruction for the /DN bit of the timer and an XIO instruction for the /DN bit of the MSG instruction control block to condition the MSG instruction.

Since the Modbus device is configured as "Slave address" 2, change the "Unit Identifier" in the MSG configuration to 2 as well.

I usually use ModScan32 to test out my Modbus/TCP communications before I try them in the MicroLogix 1400.

Another excellent Modbus/TCP test program is Chipkin Automation's Modbus Scanner, which is both modern and free.
 
A screenshot might be more helpful; here's what I typically use for repeating MSG instructions.

I use the /EN bit from the MSG control word because if the MSG doesn't complete immediately, I don't want to keep piling MSG instructions into the communications buffer every 200 ms, addressed to a device that isn't responding.

MSG Trigger Logic.PNG
 
Ken, thank you for your response! That is some of the information I need to make this rung work properly. I'll add the rungs and the other information and see if I can get communications to work. Thanks again!
 
I think I have it solved! The Micrologix requires 32 bit registers for floating point values. Our gateway uses two 16 bit registers for floating point values. The Micrologix was asking for one register, 32 bits long and our gateway was not responding properly. I have since changed the values to scaled integers and communications popped right up! Thank you to everyone who helped me, I really appreciate it!
 

Similar Topics

I want to learn about modbus communication and I saw on another thread about inexpensive modbus relay units so I found it on Amazon along with a...
Replies
46
Views
7,221
I have a spare Micrologix 1400 Series B I bought used on Ebay awhile back. I had thought of it as a spare PLC for my train project but I screwed...
Replies
4
Views
1,254
Good Day! Would anyone be able to explain what is happening with the COP's and MOV's in this Modbus poll routine? If anything I am confused by...
Replies
6
Views
1,730
I been tasked with setting up communication between a heating cooling unit manufactured by Advantage Engineering and a Microloagix 1400 plc. The...
Replies
6
Views
2,505
Hi, I am trying to communicate between a MicroLogix 1400 and a Click PLC. There is a great video from AD that shows the simplicity of...
Replies
2
Views
1,764
Back
Top Bottom