Document 7480438

Download Report

Transcript Document 7480438

EPICS support for
ControlLogix
via EtherNet/IP
Kay-Uwe Kasemir, LANL
May 2001
Allen-Bradley ControlLogix




SNS: HPRF, Vac., RCCS, Facility, …
Up to 7MB, multithreaded, …
Symbolic ‘tag’ names, no ‘I10:12’
Accepts DeviceNet, ControlNet, EtherNet/IP,
… like any I/O module
PS
CNet
PLC



IP = Industrial Protocol
Evolved from “ControlNet over EtherNet” SIG
Encapsulates CIP in TCP & UDP


(Ctrl. & Info. Protocol, shared by DeviceNet and
ControlNet)
Specs. used to be part of ControlNet,
now available as separate “EtherNet/IP”:

Open DeviceNet Vendor Assoc.,
http://www.odva.org
EtherNet/IP Spec. Details

Open portion of CIP (object & service codes):



Vendor specific:


How to route messages
How to read serial number and vendor code
Get data of real interest, e.g. PLC values
This driver:
CIP Read/WriteData as used by
Allen Bradley ControlLogix PLCs
 Round-trip request/response mechanism
 Subscription (ForwardOpen) with triggered updates via UDP
not implemented/documented by AllenBradley
EPICS Driver/Device



No special hardware, neither for setup nor runtime
IOCs (pc486, PPC), command-line (Win32, Unix)
Can read & write any tag on PLC







Records: ai, ao, bi, bo, mbbi, mbbo, mbbiDirect, mbboDirect
DTYP=“EtherIP”, INP=“@plc1 PS1RB2”
also: INP=“@plc2 arraytag[21]”, “@plc2 struct.elem”
REAL, INT, DINT, BOOL,
scalars, struct. elements, arrays
no need to “publish” tag in PLC’s LadderLogic
or program ControlNet connection to allocate bandwidth
INP/OUT can be changed at runtime to use different tag on
different PLC!
Handles disconnects/reconnects (e.g. PLC reboot)
Driver/Device Details


One communication thread per PLC
Combines requests to minimize transfers



Arrays are transferred as a whole (default)
Output records:




(up to ~500 byte PLC buffer limit)
Monitors PLC, updates rec. on change
Supports SCAN=I/O Event (also for e.g. 30Hz scans)
Provides statistics:
min/max/last scan times, #errors, ...
Performance: (default “System Overhead Time Slice”)


Single REAL tag: 11ms (7ms with 50% SOTS)
BOOL[352] + 3xREAL[30]:
15ms + 25ms (combined requests)
Transfer Time Histogram

352 BI @ 10Hz, 3 x REAL[40] @ 2 Hz
Conclusion

Setup:


Use:



No additional hardware (neither for PC, IOC, nor
communication setup)
No special LadderLogic required, though arrays
might be preferred (performance)
Good IOC support (I/O Event, runtime change)
Performance:


11ms/transfer, susceptible to network delays
good enough for most applications?