Download Communications Programmable Logic Controllers and more Slides Programmable Logic Controllers in PDF only on Docsity!
Programmable Logic
Controllers
Communications and
Communications Instructions
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
Communications Instructions
Communications Instructions
• Two communications instructions
- Message (MSG) and
- Service Communications (SVC)
• We will look at:
- how messaging works
- what the instructions look like
- how to configure and use the instructions
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
- examples and timing diagrams
Communications Instructions
- The communication instructions read or write data to
another station.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
Messaging Overview
- The communication architecture is comprised of three primary components: - When scanned, the message and the data defined within the message (if it is a write message) are placed in a
- Ladder Scan
- Communications Buffers
- Communication Queue
- These three components determine when a message is transmitted by the controller.
message) are placed in a communication buffer.
- The controller continues to scan the remaining user program.
- The message is processed and sent out of the controller via the communications port after the ladder logic
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
- For a message to transmit, it must be scanned on a true rung of logic.
after the ladder logic completes, during the Service Communications part of the operating cycle, unless an SVC is executed.
Messaging Overview (continued)
- When a message request in a buffer is completed,
the buffer is released back to the system.
- If a message is in the queue• If a message is in the queue, that message is then that message is then
allocated a buffer.
- At that time, the data associated with the message is
read from within the controller.
- The buffer and queue mechanisms are completely
automatic.
- Buffers are allocated and released as the need arises, and i if b ff f ll
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
message queuing occurs if buffers are full.
- If a message instruction was in the queue, the data
that is actually sent out of the controller may be
different than what was present when the message
instruction was first processed.
MSG - Message
- Any preceding logic on the message rung must be solved true before the message instruction can be processed. The example below shows a message instruction.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
The Message File
- The MSG instruction built into the controller uses a MG data file to process the message instruction.
- The MG data file, shown at left, is accessed using the MG prefix.
- Each message instruction utilizes an element within a MG data file. For example, h f l
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
MG9:0 is the first element in message data file 9.
- NOTE: This message data file may need to be created.
Creating a Message File
selected, right click and
select ‘New’select New
file is created, the
properties of the data
file can be modified
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
Local DH-485 Network with AIC+
(1761-NET-AIC) Interface
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
Configuring a Local Message
- Message Setup Screen
- The rung below shows a MSG instruction preceded by conditional logicconditional logic. Access the message setup screen by Access the message setup screen by double-clicking Setup Screen.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
RSLogix Message Setup Screen
Setup Screen is shown
belowbelow. This screen is This screen is
used to enter the setup
elements for “This
Controller”, “Target
Device”, and “Control
Bits”.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
“This Controller” Parameters
- Communication Command
- The controller supports six different types of communications commands. If the target device supports any of these command types, the controller should be capable of exchanging data with the device. Supported commands include:
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
Maximum Data Transferred By
An MSG Instruction
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
“Target Device” Parameters
- Message Timeout
- This value defines how long, in seconds, the message instruction has to complete its operation once it has startedinstruction has to complete its operation once it has started.
- Timing begins when the false-to-true rung transition occurs, enabling the message. If the timeout period expires, the message errors out. The default value is 5 seconds. The maximum timeout value is 255 seconds.
- If the message timeout is set to zero, the message instruction will never timeout. Set the Time Out bit (TO = 1) to flush a message instruction from its buffer if the
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
to flush a message instruction from its buffer if the destination device does not respond to the communications request.
Data Table Address/Offset
- This variable defines the starting address in the target controller. The data table address is used for a 500CPU and PLC5 type messages.
- AA valid address is any valid, configured data file within the lid dd i lid fi d d t fil ithi th target device whose file type is recognized by the controller. Valid combinations are shown below:
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
Local Node Address
- This is the destination device's node number if the
devices are on a DH-485 (using 1761-NET-AIC),
DeviceNet (using 1761-NET-DNI)DeviceNet (using 1761-NET-DNI), or DF1 Half- or DF1 Half-
Duplex network.
- To initiate a broadcast message on a DH-485 network, set the local node address to -1.
- Local/Remote
- This variable defines the type of communications that is used. Use local when you need point-to-point
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-
y p p communications via DF1 Full-Duplex or network communications such as DH-485 (using 1761-NET-AIC), DeviceNet (using 1761-NET-DNI), or DF1 Half-Duplex.
- NOTE: ALL OUR COMMUNICATIONS WILL BE LOCAL.