MSG Instruction Help ControlLogix to Micrologix

nik124

Member
Join Date
Jul 2018
Location
Cali
Posts
40
Hello all. I need some help setting up a MSG instruction to transmit 10 bits of data from a compact Logix processor to a micrologix 1400. I have both the programs with me. My first question is can I set this up offline and set the communication path to talk back and forth without being online? My second is how do you accomplish this? I have seen some tutorials on how to do it without success. Do I need a Ethernet card in the control Logix chassis or can I just use the front Ethernet port on both controllers and a switch to communicate the two together? This will be my first time setting something like this up. Thanks for any help!
 
Last edited:
Welcome to the forum! To communicate between a Control Logix and a Micrologix you will use explicit messaging, i.e. the MSG instruction. Getting it working is relatively straightforward, but there are a whole lot of things involved in getting it working well and doing it in "best practice" ways. I'd suggest that you search this forum for threads on setting up MSG instructions, and also just drop one into your program, click on it and press F1. The help file gives quite a lot of information and examples on how to set it up and use it.

Yes, you can set it up offline and then download, or MSG communications can be performed online.


You've not given any part numbers, but if you're suggesting that your Control Logix PLC has an onboard ethernet port, it must be one of the new 1756-L8 CPU's, correct? If so, you will not need a separate ethernet module in the Control Logix chassis - you can communicate directly to the PLC using it's onboard ethernet port.


Do some reading up on explicit messaging and have a play around, if you need a push in the right direction let us know where you're getting stuck and we'll be able to provide some more targeted advice.
 
Welcome to the PLCTalk forum community !

Which PLC has the MSG instruction in it; the ControlLogix or the MicroLogix ?

In the ControlLogix you can add an MSG instruction and control tag online during RUN mode, and edit it. In the MicroLogix you can't edit a MSG instruction online.

When I have the choice, I put the MSG instruction into the CompactLogix/ControlLogix family controller, rather than the SLC/PLC/MicroLogix.

You mentioned a built-in Ethernet port on the ControlLogix, so it sounds like it's one of the CompactLogix family members. Post the exact part number or at least the general description.

CIP Message Paths are fairly straightforward. On a CompactLogix it would be as simple as "2, IP" where IP is the IP address of the MicroLogix controller.
 
As the two controllers sit they are both independent from each other. Both controllers have built in Ethernet ports which I will be using combined with a switch to communicate over. Neither of the controllers have message instructions so this will be the first one. I will get part numbers tomorrow when I go back to work sorry :(. On the compact Logix I get stuck on when it asks me to “browse” the I/O tree and in the drop down menu after right clicking and selecting new module it asks for a what type of module but I can’t find the built in Ethernet port selection so I can choose the micrologix processor and so forth? Thanks for any advice
 
The "CIP Path" browser in the MSG instruction configuration is easy when the target device is in the I/O tree of the ControlLogix.

But you never put a MicroLogix into the I/O tree; they can't create that type of connection so they aren't even selectable (at least, they should not be).

Instead, just enter the CIP path manually.

"2, 192.168.1.10" for a MicroLogix at 192.168.1.10.

CIP Paths are pairs of "Port, Address" values. Port 2 is the built in Ethernet port on a CompactLogix, and the IP address of the MicroLogix is its address on the Ethernet network. That makes the Path simple.
 
Ohhhhh okay got it! Thank you so much! When I get back to work tomorrow I will try it! So to recap instead of hitting browse just put in 2, 192.168.1.15 that’s the actual IP address of the control Logix processor. I will look into the micrologix message instruction and see if I can get it to configure right offline.
 
Again, I recommend putting the MSG instruction into the CompactLogix controller's program.

The CompactLogix MSG instruction knows about the MicroLogix 1400 data table structures; you can select "SLC Typed Read" or "SLC Typed Write" and enter the data table address you want to read or write from in the MicroLogix.

The MicroLogix 1400 doesn't know about CompactLogix tag names, so you have to take the extra step of setting up a "PLC/SLC Data Table Map" in the CompactLogix to correlate an INT or REAL[x] array tag to a Data Table address like N7 or F8.

If you have a good engineering reason do put the message into the MicroLogix, go ahead. It's just easier the other way around.
 
Yes I will definitely set up the message instruction in the compact Logix program and link it to the integer file I want the data to go to in the micrologix controller. Is there anything I have to do in the micrologix program to receive the transmitted data? All I want to do I send information to the micro Logix from the compact Logix controller. Thanks again I appreciate your input!
 
Is there anything I have to do in the MicroLogix program to receive the transmitted data?

Just be sure that the data table elements you are writing to are not write-protected.

I strongly prefer to create a data table file (not N7, but something specific like N10 or N20) that is ONLY used as the target of an incoming MSG instruction. Writing to the default data tables should be punishable by wedgie.

And of course, clear data table descriptions are important and welcomed by future programmers.
 
Yes I have already created a data table I believe it was N10 in the micrologix and I am going to use that as the destination file in the compact Logix. It was marked as “READ” as the name so another programmer doesn’t mistake that for just a open integer file they could use. N7 is a big go to integer file and widely used �� Will update tommorow. Thanks again.
 
You've not given any part numbers, but if you're suggesting that your Control Logix PLC has an onboard ethernet port, it must be one of the new 1756-L8 CPU's, correct? If so, you will not need a separate ethernet module in the Control Logix chassis - you can communicate directly to the PLC using it's onboard ethernet port.

Sorry for the confusion. I got to work and I am working with a micrologix 1100 not a 1400. Idk how I got those confused lol. Anyways the Bul. Is a 1763 Micrologix 1100 Series B. The compact Logix is a 1769-L32E Controller. Thanks
 
So in the controllogix I have it set up like this

Message Type: SLC Type Write
Source Element: Photoeyes (Tag)
Number Of Elements: 15
Destination Element: N50:1

Communication Path: 2, 192.168.1.2 Micrologix IP address.

The question I have is the source element and destination element. Why can’t I just bring in the source element tag “Photoeyes.1” and why do I have to choose “N50:1” and not “N50” as a whole? N50:1 is only a binary string of 16 bits. What if I need 32 elements?
 
Your destination is the starting word. So if you want to do a write message of an IntArray[32] to N10:0 through N10:31, you would set your destination to N10:0 and the elements to 32. This would copy IntArray[0] to N10:0, IntArray[1] to N10:1, etc.


Note that when you do the message, the tag type needs to match the data table type in the micrologix. If you are messaging to a N table, the data type in the CompactLogix needs to be INT instead of the default DINT. If they do not match, you may not get the results you are after.
 
I think you're having some confusion about the word "elements". That's super-common; when I was teaching ControlLogix classes I illustrated with Lego blocks.

In an SLC/MicroLogix, an "element" is the data type of the data table.

For Integer data tables, each "element" is a 16-bit word. N50:0 is the first element, N50:1 is the second element, and so on.

Those Integers also have "sub-elements", the individual bits that make up the word. You address those in the SLC/MicroLogix with slashes, so N50:0/0 is the first bit of the first word.

In a ControlLogix/CompactLogix, an "element" is the data type of the tag.

A DINT type tag has just one element, but if you made it an Array, each element would itself be a DINT.

DINTs and INTs have sub-elements as well; you can address a bit inside a DINT with a dot notation, where MyTag[0].0 is the first bit in the first element of the array tag.

BOOL tags are different between the two platforms. On the ControlLogix, a BOOL is itself just one bit and a BOOL MyTag[x] array has individual boolean elements that have no sub-elements.

When you're messaging between CompactLogix and SLC/MicroLogix, you can only use 16-bit Integers (INT) or 32-bit Floating Point (REAL) tags.


Your message as described is trying to write to a 15 word block starting at N50:1 and going through N50:15.

But your source is just one tag, called Photoeyes. If that tag is an INT, then its value will be written into N50:1 and the rest of the destination block (N50:2 through N50:15) will get zeroes.

If you intend to send only one 16-bit Word, change the Length to one Element.

If you need to send multiple words, change Photoeyes to Photoeyes[x] and make it an INT array tag, and set the Length of the message to the number of integer words you want to write to the MicroLogix.
 
Okay so the tag “Photoeyes” is a DINT with sub elements starting at Photoeyes.0-31 all of which are BOOL. The Photoeyes.0-15 are what I need to transmit to the micrologix. I went ahead and made a new tag called “PhotoeyesStatus” and I made that an INT with (1) array. So this new tag Drops down to “PhotoeyesStatus[0] with sub elements of “PhotoeyesStatus[0].0-15”. I can use “PhotoeyesStatus[0]” as my source element and set the “Number Of elements to 1. This should transmit “PhotoeyesStatus[0].0-15 to the micrologix right?

Recap. This is what I have

Message Type: SLC Type Read
Source Element: PhotoEyesStatus[0]
Number Of Elements: 1
Destination Element: N50:0
 

Similar Topics

Hello All, This might be a simple question for most of you. I am working on performing some tests on an EIP device through RSLogix 5000. Based...
Replies
7
Views
1,965
Hi, I'm trying to ensure I have the correct path to allow msg read from 5380 processor via compactlogix. The SI has installed it in a way I'm not...
Replies
12
Views
6,323
I'm trying to use a MSG instruction to get data from a SLC into a ControlLogix. I want to read some Boolean tags from the SLC. Is it possible to...
Replies
4
Views
2,795
Good morning everyone. I'm relatively new to the Allen-Bradley world. My issue I'm facing is this. I have a remote Refractive Index sensor...
Replies
2
Views
2,233
The good news is I became a dad today, i'm posting from the hospital at this moment. the bad news is i've still not figured out reading my...
Replies
19
Views
5,061
Back
Top Bottom