In Today's article I walk you through how to Message data from a SLC-5/05 to a MicroLogix 1400 over Ethernet using the MSG instruction.
Note: In this example I have a SLC-5/05 at IP Address 192.168.1.47, and a MicroLogix 1400 at IP Address 192.168.1.66. Both have the same subnet address, and are attached to the same network via an Ethernet switch. Each program also had the N7 file expanded to 10 words, and the SLC-500 program has a free running Timer in Rung 0 of Program File 2 as shown below:
Step 1) To start, I add a new rung to Program File 2 of my SLC-5/05 program, and then I add a MSG instruction to that rung:
Step 4) And then I assign a Control Block starting address for a block of 51 unused integers. In this example I chose a starting point of N10:0, and the MSG instruction will use N10:0 through N10:50 for it's control words:
Step 7) The next selection is the setting for the SLC Communication Channel the MSG instruction will use. In this example Channel 1 is chosen as that is the Ethernet channel on the SLC-5/05:
Note: The Target Device's Data Table Address does not have to be the same address as the Source Address.
Step 9) Here, because I'm messaging a MicroLogix over Ethernet, I also need to change the MultiHop setting to Yes. Note: If this setting is not changed, the message will fail.
Step 11) Where I fill in the IP address of the target MicroLogix 1400 in the To Address field. Then I close the Setup Screen:
Step 12) Back in Ladder File 2, I place an XIC in front of the MSG instruction. For the XIC instruction's address, I use the Done Bit of my existing two second free running Timer. This will trigger the message every two seconds, a slow enough period that I'd be able to see the resulting status of each message attempt before the next message attempt is made:
Note: Since A-B Programmable Controllers have limited buffer space for MSG instructions, it's typically not recommended to have multiple unconditional MSG instructions in your program. Instead, consider interlocking messages, or triggering them based on timers, to insure you never overfill your controller's message buffer. Doing so can also eliminate unwanted network traffic that unconditional / continuous Messages can generate.
Step 13) With my program complete, I now enter a value into N7:0 which will be written to the MicroLogix controller when the MSG instruction executes. Then I download and run the program:
To watch a video demonstration of the above, check out Episode 42 of The Automation Minute Season 4 below:
If you found this article helpful, please share it with your colleagues on LinkedIn, Facebook, Twitter or Goggle Plus!
You can also share your own thoughts and opinions on this subject by clicking on the “post a comment or question” link below.
Sponsor and Advertise: Get your product or service in front of our 70K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form or by calling our office at 413-749-4300.
- Interviewing Marc LeVine on Job Skills Needed in Industrial Automation (P108) - June 30, 2022
- PLCs: Past, Present, and Future - June 24, 2022
- How To Download Rockwell's Integrated Architecture Builder (2022) - June 23, 2022