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

Page 298

Advertising
background image

Chapter 15
Using Communication Protocols

15–14

Example 2 – Continuously Reading Data from a MicroLogix Controller

In this example, a communication link is created between two Series C or
higher MicroLogix 1000 discrete controllers, where one controller is reading
data from another. 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 (rung 2.2), 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 the read message instruction 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.

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

Rung 2:1
The Time Out bit (TO) associated with each message instruction is used to
clear the controllers communication buffer and message instruction.
Setting these bits basically places the controllers communication section
in the same condition as when the controller power up. These bits allow
control program to reset or recover from unexpected events (e.g., errors,
power problems, media problems).

| Message Error Read Message |
| Retry Timer Time Out |
| T4:9 N7:60 |
|–+––––] [–––––––––––––––––––––––––––––––––––––––––––––( )––––––––––––|
| | DN 8 |

Advertising