Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 302

Advertising
background image

Chapter 15
Using Communication Protocols

15–18

Example 4 – Continuously Reading and Writing Data with a MicroLogix
Controller

In this example, a communication link is created between two Series C or
higher MicroLogix 1000 discrete controllers. This example creates a
master/slave communication link between two controllers (one controller
reading and writing data to another controller) with a MicroLogix 1000 as
the master. The communication link is set-up for continuous operation with
automatic recovery. Performance in logic is as fast as possible, with the
primary restriction being the communication link protocol (DH-485 or DF1
full-duplex) and the baud rate.

Although the DH-485 protocol is demonstrated here, this example can be
used with either DH-485 or DF1 protocols. To run this on DF1, you would
only need to change the active protocol bit (rungs 2.2 and 2.3), the default
primary protocol bit (S2:0/10 in the status file), and the message instruction
variables. For maximum possible communication performance (throughput),
select DF1 full duplex running at 38.4k baud.

Rung 2:0
This rung monitors both message instructions for errors or lockup
conditions and restarts communication whenever the link becomes valid.
Lockup conditions are situations that may arise if the communication path
is somehow corrupted. Some examples would be power lost at destination
device or a cut cable. Error conditions are typically caused from noise
on the communication link, faulty device(s) on the network, etc.

| Write Message Message Error Message Retry Timer |
| No Response Retry Timer |
| N7:50 T4:9 +TON–––––––––––––––+ |
|–+––] [–––––––––––+–––––––]/[–––––––––––––+TIMER ON DELAY +–(EN)+–|
| | 9 | DN |Timer T4:9+–(DN) |
| | Write Message | |Time Base 0.01| |
| | Error | |Preset 100<| |
| | N7:50 | |Accum 0<| |
| +––––] [–––––––––+ +––––––––––––––––––+ |
| | 12 | |
| | Write Message | |
| | Start | |
| | N7:50 | |
| +––––] [–––––––––+ |
| | 14 | |
| | Read Message | |
| | Error | |
| | N7:60 | |
| +––––] [–––––––––+ |
| | 12 | |
| | Read Message | |
| | No Response | |
| | N7:60 | |
| +––––] [–––––––––+ |
| | 9 | |
| | Read Message | |
| | Start | |
| | N7:60 | |
| +––––] [–––––––––+ |
| 14 |

Advertising