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

Page 300

Advertising
background image

Chapter 15
Using Communication Protocols

15–16

Example 3 – Report on Exception/Change of State, Write 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 writing
data to 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 write 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.

| 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 1| |
| | N7:50 | |Accum 0| |
| +––––] [–––––––––+ +––––––––––––––––––+ |
| | 12 | |
| | Write Message | |
| | Start | |
| | N7:50 | |
| +––––] [–––––––––+ |
| 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 Write Message |
| Retry Timer Time Out |
| T4:9 N7:50 |
|–+––––] [–––––––––––––––––––––––––––––––––––––––––––––( )––––––––––––|
| | DN 8 |

Advertising