Sign in to follow this  
Followers 0
machinemaker

ethernet mapping

24 posts in this topic

Using two Micrologix 1400's will I be able connect the two over ethernet? What I need to do is be able to set/unset bits in one of the plc's from the other. I will not be using words for integers at this time.

Share this post


Link to post
Share on other sites
Reserve a set of N registers that the controlling 1400 will be able to write. Use the MSG command to send a group of registers in the controlling 1400 to the controlled 1400. We are actually setting up a machine right now which has a main component and an optional component controlled by its own Micrologix (an 1100 in our case). The optional component will write to the other, indicating its presence and sending the handshaking bits for mutual control. We'll see how it works out. Writing the code was easy.
1 person likes this

Share this post


Link to post
Share on other sites
Okay so here we go. How did you setup the MSG? I started with MG11 in the box, then clicked on setup. When the box appeared, I used channel 1, but then for command, none of those match ethernet for the 1400! Help files are no help. Is there information on this stuff, or do I just keep asking question and spend hours trying to do it? Do I setup the mulithop because I see there is a place for the plc address? Trying not to be a pain. I could use some AB classes. Again trying to do something with AB seems more difficult then other brands. I watched one of the old timers do some programming he buzzed around like it was nothing. He said it took years of using the AB. Then there are some who stubble around like I do. The old timer is gone, so no one around who knew what he did.

Share this post


Link to post
Share on other sites
Warning - this information is based on what I am currently setting up but have not tested yet, but it seems correct. Try it if you will. I'll be able to help with more assurance when we actually have the MLX's hooked up and talking. Create the MG (MSG) file, which you seem to have done. The first entry is MG11:0, the next would be MG11:1 etc. One entry will be used for each message. Make sure to enter it into the MSG command as MG11:x. You will also create a 'Routing Information' (RI) file which similarly will have RI:0, RI:1 etc. You will reference this in the setup. Each message command will have a separate MG:x and RI:x Refer to the two images attached: We will do a 'write' from one controller to the other. The receiving controller does not have to have any special setup except for its IP and create the file which will be the target of the write. It must have at least the size specified. The command, as shown, is '500CPU Write' The 'Data Table Address is the address in this controller where the information is stored. Size in elements should be obvious. We'll be sending the information stored in N10:0 up to N10:9 to the target controller. In the target device we state the address in the target. Note that the address doesn't have to be the same. I did it in this, my first attempt, just to limit the confusion factor. Leave Local/Remote at 'Local' unless the receiving Micrologix is through a gateway or some such. I haven't done that yet (technically I haven't done THIS yet). The 'Routing Information' file I mentioned previously. While the RI:x number doesn't have to be the same as the MSG:x number I do it again to lessen possible confusion. Now to the second (MultiHop) tab: Here all you need to add is the IP address of the receiving controller. (By the way, the IP of the 'sending' controller was 192.168.0.100). Otherwise just use normal messaging techniques. The messages are started on a rising edge. I always wait for one message to end (either MSG:x/DN or MSG:x/ER bits are set) before starting the next message. In the setup I an doing I also have a 'Read' command In the same controller reading N10:10 - N10:19. Its a quick interface between the two units. When we get it actually set up I'll report on how well it worked and any problems. Edited by b_carlton
1 person likes this

Share this post


Link to post
Share on other sites
Thanks for all the info. I have a "simple" one way. I am sending bit from the one controller to the main controller. The first controller has a C-More panel. I want to send to that PLC bits to announce error messages. I just want to set a bit in the master plc from the 2nd plc to display a message for the user. Will the routing information file be created as I setup the box?

Share this post


Link to post
Share on other sites
You will need to create up the file RIx:0 (let's say) before creating the MSG instruction but it will be filled in by using the dialog. Setting up the 'Multi-Hop' is actually the procedure that fills it in. Edited by b_carlton
1 person likes this

Share this post


Link to post
Share on other sites
Tested today - it works well as I described it.
1 person likes this

Share this post


Link to post
Share on other sites
Just got to read this post today and glad you got it too work. Now if I may indulge me and let me share a little bit of wisdom. You have two PLC we'll call them PLC_A and PLC_B for lack of better names. If you set up PLC_A to write to PLC_B and vice versa you have bits/integers which are may/may not be used in the program and which suddenly change value. If you set PLC_A to read from PLC_B and vice versa then you'll always know where the data in the integers comes from. It's still a wise idea to write a null value into any boolean or integer you plan to leave as spare so the next programmer doesn't grab it accidentally. A side benefit of reads over writes is they have 50% less overhead and faster round trip completion times. {you'll find other AB posts where I've proved this both theoretically and practically}. Just my humble 2 cents after over a decade of working with AB PLCs and 2 plus decades of PLCs period.

Share this post


Link to post
Share on other sites
Hi Bob, I also have a similar project but my application requires wireless communication. This has probably been discussed before many times. Is there any links to older discussions or do you have any advice..?? I too will be using two AB ML1400 controllers. I need to transmit about 200 yards. 1. Any brands and models of transcievers (excuse me if I am using the wrong terms) 2. I assume I put a wireless device (transciever) at both PLC-A and PLC-B 3. Do I connect to each wireless device with Ethernet Thanks in advance for any advice. Mark

Share this post


Link to post
Share on other sites
Thanks for the comments Bob. In our case we have a machine which may or may not operate alone and we have an add on section which, for the sake of minimizing wiring, has its own PLC and announces its presence by the Ethernet connection. In addition 10 words are sent both ways with the add-on controlling both directions. One of the bits is used as a heartbeat pulse for the monitoring of continued transmission. It basically was one machine with one PLC. But design changes merited this split version. The program was very well divided already in subroutines so it was easy to make two copies and in each just delete the other half's control. The communication was literally just a couple of rungs. The biggest part of re-thinking is that the internal handshaking between the sections which already existed had to be modified with the view that more than 1 scan would elapse between enabling on one side and reaction on the other. So now only 3 phase power, 24VDC, E-stop control and the Ethernet cable is what will have to be wired between the two sections. The display reads the internal 'I'm present' bit in the main section. If present it enables the visibility of controls leading to the screens pertaining to the add-on section. It can then get that information directly from the add-on PLC. Theoretically it could be a field add-on but we haven't made that jump yet. Edited by b_carlton

Share this post


Link to post
Share on other sites
A lot of how you connect and what you do will depend on the wireless device chosen, but a couple of things will be constant. TO ENSURE A ROBUST AND SAFE SYSTEM -- YOU MUST ANSWER THE FOLLOWING QUESTIONS AND HAVE A PLAN TO HANDLE EACH CASE? 1. How will I know Master and Slave have stopped communicating ? 2. What will I need to do for each and every device when communication fails? 3. What will I need to do for each device when communication is restored?

Share this post


Link to post
Share on other sites
I can not get mine to work. I can not even get past the verify rung. It says data type is wrong. I tried exactly what you had in your example. Why won't it verify the rung? Very very frustrating. I am using two 1100 for testing, but on the floor they will be two 1400's.

Share this post


Link to post
Share on other sites
whoops, in the MSG i entered the wrong into. Okay I got pass that. Not sure what to do in the receiving plc. I do not see the bits from the tx plc. I am using B3:0 and what to see the bits set and unset in the receiving plc. Am I using the wrong thing B3? I would like to use bits instead of integers for right now. Unless I do use N7:0 and set individual bits that way. Anyhow what do I need to set in the receiving plc We will do a 'write' from one controller to the other. The receiving controller does not have to have any special setup except for its IP and create the file which will be the target of the write. It must have at least the size specified. I am not understanding how to do part of what is in your above statement. Create the file which will be the target of the write? In the receiving plc I did go into the Channel 1 and filled it out. Was that the wrong thing to do? Also I noticed you said something about going through a switch. Well I do have a non managaged switch both are connected to. It is not a direct connect, because I have my notebook hooked up to them. Getting late.

Share this post


Link to post
Share on other sites
All I can talk about is our setup, which I mentioned was working. Both PLCs have valid IPs and I can talk to each. They are connected through a switch also. The sending PLC is sending ten words starting from N10:0 so obviously N10:0-9 (at least) must exist in the sending PLC. The message is being sent to N10:0 in the receiving PLC so those registers (again N10:0-9) must have already been created in the target PLC. Except for setting the IP and having the data table ready the receiving PLC doesn't need to do anything else. By the way, when I say IPs I mean the net mask also, I've done it long enough that they are linked in my mind. Do you have them set the same as each other?

Share this post


Link to post
Share on other sites
The tx plc is set as 192.168.0.145, rx plc is 192.168.0.146. Both are set as 255.255.255.9 with gateway 192.168.0.1. The tx plc shows no errors, the rx when I click on MSG setup says timed out. So I did not need to go in the rx plc and setup anything else? I did a msg box recieve in the receiving plc and filled in the info the same way I did in the tx plc except I used read instead of write. I have to look up messaging. The tx msg box had en lite up along with DN. The Rx plc has ER lit up.

Share this post


Link to post
Share on other sites
I think it was working. I downloaded the manual and found out MSG has to be turned off and on. The light to the receiving plc came on but did not go off. I did not use the DN or ER bit to rescan the MSG. I had the MSG on a constant read rung. When I get back I will try it again after fixing the rungs.

Share this post


Link to post
Share on other sites
A netmask of 255.255.255.9? Is the '9' a typo? Typically it would be a '0' and since that's next to the '9' on the keyboard I'm thinking it is. As far as re-enabling the MSG, in the case of a single message have a following rung with an OR of the DN and ER bits leading to an unlatch (OTU) of the EN bit of the message. Though I think you'll have to have something on the line to the message to trigger it the first time after power up. Edited by b_carlton

Share this post


Link to post
Share on other sites
It works, Why does it make you feel stupid after I get it to work? hahaha. I did absolutely nothing in the RX plc except make sure the plc had similar address. Oh, yea the 9 is a typo. It was the MSG in the TX plc. I have to trigger it on and off. For some reason when I try to do the "U" to the EN bit, it says it is read only. I typed it several times and it took because a box came up for the description. So I created a timer to trigger it on and off for now. Will go back and see why I can not use the example you have shown me. That is also in the book. Good news I was successful using N7:0 and B3:0. I was able to send integers and set unset bits. Thank you so much bCarlton for you info.

Share this post


Link to post
Share on other sites
b carlton, how do you structure your program with MSG, that is do you create a separate subroutine for MSG and run them there continuously? Does it matter where I put the MSG?

Share this post


Link to post
Share on other sites
I put the messaging into a separate ladder and do an unconditional JSR to it. As, in the application I mentioned, I have two messages, one sending one receiving, I use a couple of bits in a word to sequence them.

Share this post


Link to post
Share on other sites
Thanks. I have now have a "N" used to display messages on the C-More, and a set of "B" bits working. The C-More is connected to the main plc. Come to think of it, both PLC's are connected to the C-More ,(ethernet),so I could just create DEV001 and DEV002, but not sure that would create a problem if both PLC's needed to send a message to the C-More for display. I have to think about this more. I have priority messages and if the 2nd PLC sent a message to display it could cause a serious message to go away and that could be bad for the user. By the way my machines talk too through the C-More. Each PLC is sending to the other. So basically I have comms going back and forth. I set up the messaging like I did in Automation Direct to allow the WX and RX take turns. Works good. I am using the EN and ER in the mix. Once I understood what AB is doing, it was quite easy. What messed me up also was the word element. The element is one word. So with my "B" bits, one allows me to send B3:0.0 to B3:0.15 for example.

Share this post


Link to post
Share on other sites
When using an operator interface the HMI is the master. It, and only it, requests information from the PLC (or PLCs in your case which is perfectly fine). Remove from your vision that the PLC somehow 'sends' (on its own initiative) information to the HMI. The HMI can request information from as many links as it is capable of. The PLCs only respond to requests from the HMI for information. The PLC will not send a message to the HMI on its own. (A 'requested screen' register is exactly that. If the HMI reads that register it may change to the screen requested. But the initiative is solely on the HMI side.) Once you have this clear in your mind then things will come more easily. If you expand to Control/Compact Logix the HMI will not appear in the IO list.

Share this post


Link to post
Share on other sites
Yea that is hard to think about. In my mind I am sending a screen number to the HMI to display! But in actuallity the HMI is requesting that number on what to display? I am wondering if I should tell PLC B to talk to only the PLC A when it comes to what the HMI wants. For example lets say both machines have e-stop messages. That is an important message. So PLC a sent info to the HMI so the HMI will display PLC a is in e-stop. But PLC A wants the user to know Motor stopped. I do not want that message to over display the e-stop condition. If I send the info from PLC B to PLC A, then I can block or prioritize messages the HMI is requesting. What are your thoughts on this?

Share this post


Link to post
Share on other sites
We place high priority items in their own message. More routine items, especially when more than one may be active, are shown on a rotating basis. The rotation is controlled by logic in the PLC. As far as sending information about each PLC to one central unit, that is how we are doing it this time. It will make for less confusion. Edited by b_carlton

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0