beautypg.com

E-12 – Rockwell Automation DAG6.5.8 APPLICATION GUIDE SCADA SYSTEM User Manual

Page 394

background image

Publication AG-UM008C-EN-P - February 2005

E-12 Sample Ladder Logic

PLC-5 and MicroLogix 1100/1200/1500 DF1 Half-Duplex Slave Report-by-Exception MSG

PLC-5 DF1 Half-Duplex Slave "Report-By-Exception" MSG Logic

Copy all of the "live" discrete and analog values to be written as a "report-by-exception" MSG to the Master into a data compare buffer, which is a contiguous block of words starting in
B3:0. This copying occurs continuously between successful MSG writes. If multiple changes occur after the MSG begins executing, and before the MSG has successfully completed,
only the last change will be recorded and sent during the next MSG execution. Care should be exercised with constantly changing analog data so that the MSG doesn't continously
retrigger, thus negating the efficiencies of a "report-by-exception" scheme. In this example, the PLC-5 real time clock values (S:18-23) will be sent immediately upon any change of
year, month, day, hour or minute, or every 15 seconds, whichever occurs first.

0000

MG9:0

DN

MSG
Done

COP

Copy File
Source

#S:18

Dest

#B3:0

Length

6

COP

Data Compare Buffer

EN

DN

TON

Timer On Delay
Timer

T4:0

Time Base

1.0

Preset

15<

Accum

0<

TON

Max Delay Before
Retriggering MSG

If 15 seconds have elapsed since the last successful completion of the MSG write, snapshot the current data values for writing to the Master and retrigger the MSG (regardless of whether
data values have changed since the last write).

0001

T4:0

DN

Max
Delay

COP

Copy File
Source

#B3:0

Dest

#N7:0

Length

6

COP

MSG Write Buffer

U

MG9:0

EN

MSG
Enable

JMP

Q2:1

Jump to
MSG Rung

If the MSG is enabled, skip over the data comparison rungs directly to the MSG rung. If the MSG has just completed in error, retrigger the MSG immediately and jump directly to the
MSG rung.

0002

MG9:0

DN

MSG
Done

MG9:0

ER

MSG
Error

U

MG9:0

EN

MSG
Enable

JMP

Q2:1

Jump to
MSG Rung

Data file comparison rung.

0003

RES

R6:0

Data Comparison

R6:0

IN

Comparison
Inhibit Bit

U

R6:0

IN

Comparison
Inhibit Bit

EN

DN

ER

FSC

File Search/Compare
Control

R6:0

Length

5<

Position

0<

Mode

ALL

Expression

#B3:0 <> #N7:0

FSC

Data Comparison