Micrologix 1400 B Modbus TCP questions

Hemlock

Member
Join Date
Mar 2014
Location
Central FL
Posts
20
Hello all,

I've been reading a lot to try to get up to speed with my first PLC project. I'm having some trouble establishing communication between a computer and the PLC over ethernet. For the application I will need to accept comms from a computer and toggle outputs in response, as well as pass info on the status of other input bits back to the computer.

I have worked up some simple ladder code, and can get the PLC to run a timer and set outputs in response to changing inputs. From what I've read I think that modbus TCP should do what I need, and have modbus TCP enabled on channel 1, but haven't been able to get it working. If anyone has detailed instructions for how to set this up to get basic comms to a terminal program such as hyperterminal I'd be most grateful.

Pointing me to some good examples to read over would also be fine.
 
Take a bit of a step back and consider what Hyperterminal does, versus what various purpose-built industrial protocols do.

Hyperterminal is (in its basic form) a console emulator that uses ASCII over serial or over Ethernet.

ASCII is what we're talking here... a string of characters, most of which are printable. It's a nice straightforward way to communicate with menus and prompts and readable words.

Logic controllers generally don't have a "console mode" and they can only exchange short strings in ASCII for functions like barcode readers and printers.

Instead, logic controllers use less human-friendly protocols to allow access to some of their user memory, for interfacing with upper-level control and monitoring systems.

Modbus/TCP is just one of those protocols. The MicroLogix 1400 supports it, but most A-B controllers require an option card to communicate using Modbus serial or Modbus/TCP.

Another protocol is EtherNet/IP, and the MicroLogix uses command codes over EtherNet/IP called "PCCC". That's how software like RSLogix 500 or FactoryTalk View talk to the controller.

It sounds to me like you are describing your project as involving a "Human-Machine Interface", where an operator views indicators and clicks buttons to exchange operational and status data with the PLC.

You almost certainly don't want to get into writing an ASCII-mode driver to communicate with the MicroLogix. Start with one of the built-in protocols.

Describe exactly what you want the Human-Machine Interface (HMI) to do. There may be an off-the-shelf product that does what you want.
 
Ken, I mentioned hyperterminal because I am familiar with it, and therefore wanted to use it to get the comms working on my end. The person doing the computer coding is very good with linux, and that is what will be used in the final application. If I can get data to and from him, I'm sure he can use just about anything the PLC needs. I'll take a look into PCCC. Your description of the "Human-machine interface" is close, but the computer will make the decisions most of the time, unless a human is present and overrides it. Mostly the PLC will act as "eyes and ears" for the computer, providing feedback while handling some simple tasks along the lines of flashing a light.
 
I don't know your project, but I have seen this before when computer programmers start using PLCs.

Have you considered having the PLC take care of the tasks and just let the PC be the operators interface?
That's how a PLC is supposed to be used, and how it's done in the real world.

If your uptime is in any way critical in your project you should consider this approach.
Think of the number of ways your linux box can crash vs. a PLC that is build to keep running 24/7 x365.

It's just a suggestion :)

As for your communication issues, how would you like to have the data presented?
Is your friend going to write a program? In that case you should just search for a modbusTCP library. There are lots of them out there, and modbus is a very simple protocol.
 
I'm more of an electrical guy than a programmer, but more of a programmer than a PLC user for sure! I'm here to learn, and happy for any suggestions I can get. There will be a program running on the computer, interfaced to the PLC. Most of the time in the application there will be no human intervention. The PLC is conceptually there to act as I/O for the computer. It will provide feedback and control connections.
 
I'm more of an electrical guy than a programmer, but more of a programmer than a PLC user for sure! I'm here to learn, and happy for any suggestions I can get. There will be a program running on the computer, interfaced to the PLC. Most of the time in the application there will be no human intervention. The PLC is conceptually there to act as I/O for the computer. It will provide feedback and control connections.


I think the point is that what you are doing is a terrible concept in an industrial environment.
 
I need to learn about PLCs, and other hardware isn't on option at this time. I'll look into it before the next project, it looks like it could be useful in the future.
 

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,220
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