Allen-Bradley 1756-L62, 1756-L61, 1769-L31, 1769-L32C, 1769-L32E Programming Manual

...
Programming Manual
Logix5000 Controllers Messages
Catalog Numbers 1789-L60, 1794-L34, PowerFlex 700S/SE
1756-L1, 1756-L55, 1756-L61, 1756-L62, 1756-L63, 1769-L31, 1769-L32C, 1769-L32E, 1769-L35CR, 1769-L35E,
Important User Information
Solid-state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication your local Rockwell Automation sales office or online at
http://www.rockwellautomation.com/literature/) describes some
important differences between solid-state equipment and hard-wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid-state equipment, all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable.
In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the examples and diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware of safety considerations.
WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to personal injury or death, property damage, or economic loss.
SGI-1.1 available from
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequence
SHOCK HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous voltage may be present.
BURN HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may reach dangerous temperatures.
IMPORTANT
Allen-Bradley, Rockwell Automation, Logix5000, RSLogix 5000, ControlLogix, GuardLogix, CompactLogix, PowerFlex, SoftLogix, Rockwell Software, PLC-2, PLC-3, PLC-5, SLC, SLC 500, and TechConnect are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Identifies information that is critical for successful application and understanding of the product.
Summary of Changes
This manual contains new and updated information. Changes throughout this revision are marked by change bars, as shown to the right of this paragraph.
New and Updated Information
This table contains the changes made to this revision.
Topic Page
Added information on the Large Connection checkbox to second footnote under table.
Added a new row to the table that discusses “If the MSG instructions are to” — New row starts with “Same device and cached and large connection”.
Added additional information to the example given for Share a Connection.
Changed Destination to Destination Element to reflect changes to the UI.
Updated instructions on setting the path to a remote controller.
Updated the screen shot to reflect changes to the UI.
Changed Destination Tag to Destination Element and Source Tag to Source Element to reflect changes to the UI.
11
12
12
14
27
30
30
Rockwell Automation Publication 1756-PM012D-EN-P - November 2011 3
Summary of Changes
Notes:
4 Rockwell Automation Publication 1756-PM012D-EN-P - November 2011
Table of Contents
Summary of Changes Table of Contents
Preface
Controller Messages
Manage Multiple Messages
New and Updated Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Purpose of This Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Message Queue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Cache List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Unconnected Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Get or Set the Number of Unconnected Buffers. . . . . . . . . . . . . . . . . . . . . 13
Get the Number of Unconnected Buffers . . . . . . . . . . . . . . . . . . . . . . . 14
Set the Number of Unconnected Buffers . . . . . . . . . . . . . . . . . . . . . . . 14
Convert Between INTs and DINTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Message Manager Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Initialize the Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Restart the Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Send the First Group of MSGs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Enable the Second Group of MSGs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Send the Second Group of MSGs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Enable the Next Group of MSGs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Send the Next Group of MSGs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Send a Message to Multiple Controllers
Index
Chapter 3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Set Up the I/O Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Define Your Source and Destination Elements. . . . . . . . . . . . . . . . . . . . . . 24
Create the MESSAGE_ CONFIGURATION Data Type. . . . . . . . . . . 25
Create the Configuration Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Get the Size of the Local Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Load the Message Properties for a Controller . . . . . . . . . . . . . . . . . . . . . . . 29
Configure the Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Step to the Next Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Restart the Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Rockwell Automation Publication 1756-PM012D-EN-P - November 2011 5
Table of Contents
Notes:
6 Rockwell Automation Publication 1756-PM012D-EN-P - November 2011
Preface
Purpose of This Manual
Additional Resources
This manual shows how to program message (MSG) instructions to and from Logix5000 controllers. This manual is one of a set of related manuals that show common procedures for programming and operating Logix5000 controllers.
For a complete list of common procedures manuals, see the Logix5000 Controllers Common Procedures Programming Manual, publication
1756-PM001.
The term Logix5000 controller refers to any controller that is based on the Logix5000 operating system, such as:
CompactLogix controllers.
ControlLogix controllers.
DriveLogix controllers.
FlexLogix controllers.
SoftLogix5800 controllers.
These documents contain additional information concerning related products from Rockwell Automation.
Resource Description
Industrial Automation Wiring and Grounding Guidelines, publication
Product Certifications website,
1770-4.1
http://www.ab.com Provides declarations of conformity, certificates, and
You can view or download publications at
Provides general guidelines for installing a Rockwell Automation industrial system.
other certification details.
http://www.rockwellautomation.com/ literature/. To order paper copies of technical documentation, contact your local
Allen-Bradley distributor or Rockwell Automation sales representative.
Rockwell Automation Publication 1756-PM012D-EN-P - November 2011 7
Preface
Notes:
8 Rockwell Automation Publication 1756-PM012D-EN-P - November 2011
Controller Messages
Chapter 1
Introduction
This section describes how to transfer data between controllers (send or receive data) by executing a message (MSG) instruction. Cache connections and buffers
are explained so you can correctly program the controller.
Supported Data Types
The following data types are supported when sending CIP messages:
SINT
INT
DINT
LINT
REAL
In addition, any structure type that is predefined, module-defined, or user­defined can be used for sending a message.
See
page 16 for more information on INTs and DINTs.
For complete details on programming a message instruction, see the Logix5000 Controllers General Instruction Reference Manual, publication
1756-RM003.
EXAMPLE
If count_send = 1 and count_msg.EN = 0 (MSG instruction is not already enabled), then execute a MSG instruction that sends data to another controller.
count_send/count_msg.en
Execute a Message (MSG) Instruction
Type - Unconfigured
MSG
Message Controlcount_msg
Rockwell Automation Publication 1756-PM012D-EN-P - November 2011 9
...
EN DN ER
Chapter 1 Controller Messages
This diagram shows how the controller processes MSG instructions.
Message Queue
1 2
Throttle
MSG
16
Description
The controller scans the MSG instruction and its rung-condition-in goes true. The message will pass to a throttle, which has 16 positions. If the throttle is full, the message
1
will stay enabled but is held until another controller scan.
The System-overhead time slice executes and the message is pulled from the throttle to the message queue.
2
If the MSG instruction Then the MSG instruction
3
Does not use a connection or the connection was not previously cached. Uses a connection and the connection is cached
Communication occurs with the destination device.
4
48
total
Cache List
3
Cached?
No
Yes
Uses an unconnected buffer to establish communication with the destination device.
Does not use an unconnected buffer.
Unconnected Outgoing Buffers (10 to 40)
Destination Device
4
Message Queue
The message queue holds up to 48 MSG instructions, including those that you configure as a block-transfer read or block-transfer write. When the queue is full, an instruction tries to enter the queue on each subsequent scan of the instruction, as shown below.
Rung-condition-in false true false
.EN bit off on
.EW bit off on
1 2 3 4
10 Rockwell Automation Publication 1756-PM012D-EN-P - November 2011
Description
1
2 3
& The controller scans the MSG instruction.
4
The controller scans the MSG instruction. The rung-condition-in for the MSG instruction is true. The EN bit is set. The MSG instruction attempts to enter the queue but there are 16 throttle positions. If all 16 are filled and a 17th message is executed, the message
goes enabled, but ... ...the EW bit remains cleared.
The rung-condition-in for the MSG instruction is false. The EN bit remains set. The MSG instruction attempts to pass through the throttle, but there are no open positions yet. The EW bit remains cleared.
The controller scans the MSG instruction. The MSG instruction attempts to enter the queue. This time the throttle position is open and the message can pass to the message queue. The EW bit is set.
Controller Messages Chapter 1
Cache List
Depending on how you configure a MSG instruction, it may use a connection to send or receive data.
This type of message And this communication method Uses a connection
CIP data table read or write Your option
PLC-2, PLC-3, PLC-5, or SLC (all types) CIP
CIP with Source ID
DH+ Yes
CIP generic Your option
Block-transfer read or write Yes
(1) CIP data table read or write messages can be connected or unconnected. But, for most applications, we recommend you leave CIP data table read or write
messages connected.
(2) CIP generic messages can be connected or unconnected. But for most applications, we recommend you leave CIP generic messages unconnected, unless you want
to use the Large Connection option.
No
(1)
(2)
If a MSG instruction uses a connection, you have the option to leave the connection open (cache) or close the connection when the message is done transmitting.
If you Then
Cache the connection The connection stays open after the MSG instruction is done. This optimizes
Do not cache the connection The connection closes after the MSG instruction is done. This frees up that
execution time. Opening a connection each time the message executes increases execution time.
connection for other uses.
Rockwell Automation Publication 1756-PM012D-EN-P - November 2011 11
Loading...
+ 25 hidden pages