Rockwell Automation 1771-SPI, D17716.5.122 User Manual

SPI Protocol Interface Module Cat. No. 1771SPI
Concepts Manual

Important User Information

Because of the variety of uses for the products described in this publication, those responsible for the application and use of this control equipment must satisfy themselves that all necessary steps have been taken to assure that each application and use meets all performance and safety requirements, including any applicable laws, regulations, codes, and standards.
Allen-Bradley publication SGI-1.1, Safety Guidelines For The Application, Installation and Maintenance of Solid State Control (available at your local Allen-Bradley office) describes some important differences between solid­state equipment and electromechanical devices which should be taken into consideration when applying products such as those described in this publication.
Reproduction of the contents of this copyrighted publication, in whole or in part, without written permission of Allen-Bradley Company, Inc. is prohibited.
Throughout this manual we make notes to alert you to possible injury to people or damage to equipment under specific circumstances.
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property damage or economic loss.
Attention helps you:
- Identify a hazard
- Avoid the hazard
- Recognize the consequences
Important: Identifies information that is critical for successful application and understanding of the product.
PLC is a trademark of Allen–Bradley Company, Inc.

Table of Contents

Using This Manual
Purpose of This Manual Pi. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Who Should Use This Manual Pi Minimum Hardware and Software Requirements Pi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
Pi
Overview of an SPI Communication Network 11. . . . . . . . . . .
What This Chapter Contains 11. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Purpose Types of Data Communicated on the SPI Network 11 Role Role of the Host PLC5 Processor 12 Files That You Map in the Data Table 12 Overview How the SPI Module Communicates With Its Network Devices 15 How Definition
of the SPI Network
of the SPI Module
of the Data T
Many Dif
ferent Devices Can the SPI Network Handle? 16. . . . . .
of T
erms 17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
ransfer Scheme 13. . . . . . . . . . . . . . . . . . . .
. . . .
Important Information that You Need to
Set Up the SPI Network 21. . . . . . . . . . . . . . . . . . . . . . . .
Objective 21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Required Information from the Device Manufacturer 21 Wiring the SPI Network 26
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
Defining Command and Status Blocks 31. . . . . . . . . . . . . . . .
Chapter Command and Status Blocks 31 Module Configuration Command Block (MCC) 32 System Status Block (SYS) 34 Custom Configuration Block (CCB) 36 Custom Data Block (CDB) 38 Custom Configuration Status (CCS) 310 Custom Data Status (CDS) 312 Summary of SPI Block Acronyms, Device Types, and ID Codes 314
Objectives
31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
Table of Contentsii
Creating Command and Status Blocks to Match
Your Application 41. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Objective 41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Task Overview 41 Module
Configuration Command Block, MCC, to Configure
the SPI Module
Custom
Custom System Custom
Custom
Configuration Block CCB, to Configure the SPI Module
for a Device 44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Block, CDB, to T
Status Block, SYS
Configuration Status, CCS, to Return Configuration Status
From the SPI Module 413. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Status, CDS, to Return Device Status From the
SPI Module
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ransfer Data to the Device 48. . . . . . . .
412. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
414. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interpreting Diagnostic Information from
LEDs and Error Codes 51. . . . . . . . . . . . . . . . . . . . . . . .
Chapter Troubleshooting Using Diagnostic Error Codes 55
Objectives
with Diagnostic Indicators
51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Using This Manual
Preface
Purpose
of This Manual
Who Should Use This Manual
This concepts manual helps you apply the SPI module to your application. It serves as a supplement to the SPI user manual (publication 1771-6.5.97). The purposes of this concepts manual are to help you:
understand SPI terminology and concepts of SPI module operation understand relationships among the various “custom” data blocks for
– module-specific configuration – device-specific configuration – the transfer of data to and from the device via the SPI module
apply the custom-configured scheme of SPI communication program the correct protocol for block transfers to / from the SPI module map the data table for the various command and status blocks wire the primary and secondary machine connections to the SPI network troubleshoot with diagnostics that indicate the source of the fault
To help achieve these objectives, we provide example diagrams and worksheets.
This manual assumes that you are a first-time user of the SPI module, but that you are experienced with the following:
programming a PLC-5 processor with 6200 Series Software programming the block transfer of multiple data blocks creating operational interface software for a PLC-5 processor using the hexadecimal numbering system
Minimum Hardware and Software Requirements
To set up a minimal SPI network, you should have at least the following:
1771-SPI module 1771 I/O chassis and power supply PLC-5 processor SPI-specified device personal computer or programming terminal 6200 Series Software for programming a PLC-5 processor
P-i
P-ii
Overview of an SPI Communication Network
Chapter
1

What This Chapter Contains

Purpose of the SPI Network

Types of Data Communicated on the SPI Network

This overview chapter contains:
purpose of the SPI network types of data communicated on the SPI network role of the SPI module role of the host PLC-5 processor what you program how the SPI module polls its network devices
The protocol developed by the Society of Plastics Industry provides a standard for transferring command and status data between a master interface (SPI module) and slave devices on a network. This provides for compatible network communication among devices made by various manufacturers.
Typically, a master interface can use SPI protocol to communicate with slave devices on the network to:
send them command data such as
- bit-level commands
- setpoints
- high/low deviation alarm limits
Role of the SPI Module
receive from them status data such as:
- bit-level indicators of detected alarm conditions
- current operating parameters (process actuals)
The SPI module is the network master that coordinates the flow of data between the PLC-5 host processor and slave devices on the network. The SPI module:
stores configuration information corresponding to each device returns configuration status to the host PLC-5 processor receives command data destined for devices on the network temporarily stores the data while it polls the target device sends data serially to and receives status serially from the target device repeats the data transfer for each device in polled order returns status data from network devices to the host PLC-5 processor
1-1
Chapter 1
Overview of an SPI Communication Network
Role of the Host PLC5 Processor
The host processor stores information for transfer to and received from devices on the SPI network via the SPI module. The processor executes commands written in the instructions of your program.
You program the host processor to communicate with the SPI module. Your programming should:
prepare command data that contain setpoints and control bits destined
for each device on the SPI network, and use status data received from each device to report operating conditions.
move command and status data (for each device) between data table
files and block-transfer buffers
transfer command data to the SPI module via block transfer write
(BTW) instructions, and transfer status data from the SPI module via block transfer read (BTR) instructions
prepare configuration for the SPI module and for each device on the SPI
network. Configuration defines such items as:
- ID number and address of each device on the SPI network
- polling order to communicate with devices on the SPI network
- number of command words transferred by BTW instructions
- number of status words transferred by BTR instructions

Files That You Map in the Data Table

Name of File Quantity Purpose
Blocktransfer Buffers
Module Configuration Command (MCC) 1 MCC send modulespecific configuration to the SPI module
System Status (SYS) 1 SYS receive module and network status from the SPI module
Custom Configuration Block (CCB) 1 CCB for each device type send devicespecific configuration to the SPI module
Custom Data Block (CDB) 1 CDB for each device type send commands to the SPI module destined for the device
Custom Configuration Status (CCS) 1 CCS for each device type receive deviceconfiguration status from the SPI module
Custom Data Status (CDS) 1 CDS for each device type receive data from the device via the SPI module
1-2
When you program the processor to communicate with devices on the SPI network via the SPI module, you must first map the data table for the following data files (defined in chapter 3):
1 BTR buffer data coming from the SPI module
1 BTW buffer data going to the SPI module
Then, you must write ladder logic that writes commands to and reads status from the SPI module.
Chapter 1
Overview of an SPI Communication Network
Overview of the Data
ransfer Scheme
T
MCC
Data T
When you program the processor to communicate with devices on the SPI network via the SPI module, you must follow a strict procedure of data transfers that:
receives status from the SPI module configures the SPI module with module-specific configuration (MCC) configures the SPI module with device-specific configuration (CCB) receives configuration status from the SPI module (SYS and CCS) sends commands to the SPI module destined for target devices (CDB) receives status from target devices via the SPI module (CDS)
We show the general flow of configuration and command data transferred to the SPI module, and status received from it. Once configured, the SPI module serves as the master interface with slave devices on the link: the module parces commands to target devices and polls status from them.
Transferring to One of Three Devices on an SPI Network
able
Configuration and Command Data
Config CCB ID#20
Config CCB ID#21
Config CCB ID#22
Data CDB ID#20
Data CDB ID#21
Data CCB ID#22
SYS
Status CCS ID#20
Status CCS ID#21
Status CCS ID#22
Status CDS ID#20
Status CDS ID#21
Status CDS ID#22
BTW Buf
BTR Buf
fer
fer
SPI Module
MCC
Config CCB ID#20
Data CDB ID#20
SYS
Status CCS ID#20
Status CDS ID#20
SPI Link
Parces Commands
Device ID#20
Polls Status
1-3
Chapter 1
Overview of an SPI Communication Network
You must program block transfer instructions according to an exact protocol.
Programming That You Develop
Until
your ladder logic tranafers a valid MCC the SPI module, it can only return SYS status in response to a BTR request.
To set the SPI module into operation, send (BTW) a valid MCC to it.
Your ladder logic moves SYS from the BTR buffer into the data table.
To configure the SPI for a custom device type,
devicespecific
move to the BTW buffer for transfer to the SPI module.
Your ladder logic moves the CCS into the data table where your program checks its validity.
Your
ladder
for use in your application program.
To communicate with target custom devices,
devicespecific data (CDBs)
move buffer for transfer to the SPI module.
Your ladder logic moves the CDS into the data table for use in your application program.
custom configuration (CCB)
logic moves CDS into the data table
to the BTW
to
Programming
Data Blocks T
BTR
BTW
BTR
BTW
BTR
BTR
BTW
BTR
the Transfer of Configuration, Command, and Status Data
ransferred
SYS
MCC
SYS
CCB
CCS
CDS
CDB
CDS
Automatic Response of SPI Module
The SPI module returns the current SYS status to the processor.
After storing a valid MCC, the SPI module sets the powerup bit in SYS and returns SYS to the processor. Now it is ready for custom configuration.
The SPI module formats and stores the CCB. Then it returns the corresponding CCS to acknowledge receipt of the CCB. Store a CCB for each type of device.
After storing CCBs, the SPI module begins automatic polling: it reads status from the first device and returns CDS to the processor. Then repeats for each device on the network in queued order as listed in the MCC.
The SPI module formats and stores CDBs. Then it interrupts devices in queue order.
The each time it sends a CDB to a target device.
automatic polling and sends data to target
SPI module returns
status (CDS) to the processor
You
program the PLC5 processor to:
* set the size and contents of command and status data blocks * block transfer command and status data between PLC5 processor and SPI module * specify the queue order in which the SPI module communicates with its devices
When commanded, the SPI module:
* communicates serially with each device on the SPI network in queued order * sends programmed command data such as setpoints and alarm values to each device * receives status data such as alarm bits and stored values from each device * returns status data to the processor when it receives a BTR instruction
command data
status data
Dryer Controller
Mold Temperature Controller
When polled in queued order, each device on the SPI network:
* stores command bits, setpoints, and alarm values received from the SPI module * returns alarm bits and requested status to the SPI module
1-4
Hot Runner Controller
1771 I/O Chassis
PLC-5 Controller
Block Transfers
Loader Controller
SPI Interface Module
10579-2
Chapter 1
Overview of an SPI Communication Network

How the SPI Module Communicates With Its Network Devices

You establish the order (polling queue) in which the SPI module communicates with devices on the network. You do this by listing device ID codes in the module configuration command (MCC) block. When entering this list, you may also choose to have:
each device polled once one or more devices polled more frequently in the queue the SPI module return system status (SYS) if desired
The SPI module communicates with its devices under two circumstances:
automatic polling in response to a CDB command
Automatic Polling
Once the SPI module has successfully stored a custom configuration block (CCB) for each device on its network (and for each device listed in queued order in the MCC), the SPI module begins automatic polling to return device status to the PLC processor as follows:
1. receives (polls) status from the first device
2. formats the status into a CDS and returns it to the processor by BTR
3. if it detects an error,
enters an error code in CDS word 3 clears status words of their values
4. goes to the next device
5. returns SYS (only if you listed SYS in the polling sequence)
6. when it receives a CDB command during automatic polling,
executes the command only after completing the current polling sequence
In Response to CDB Commands
When the SPI module receives CDB commands addressed to one or more devices on the SPI network, it stores them until it completes the current automatic polling sequence. Then it:
1. sends the CDB to the first target device
2. if it detects no errors, returns the device’s CDS to the processor
3. if it detects an error or that it cannot find the device,
enters an error code in CDS word 3 clears CDS status words of their values
4. sends the next CDB to the next target device and repeats steps 2 and 3
5. returns to automatic polling after servicing the last target device
1-5
Chapter 1
Overview of an SPI Communication Network
How
Many Different Devices Can the SPI Network Handle?
The SPI module can store the configuration blocks of:
up to 10 different types of devices (device types) such as mold
temperature controller, hot runner, and/or dryer controller
no more than one device (of a given device type) at a time
(for example, only one mold temperature controller) unless they are identical with respect to:
- configuration, data, and status blocks
- command bits, such as for turning the device on or off
- presets, such as setpoints and alarm limits
- status bits and words Exception : If you must network to different devices of the same type
(mold temperature controllers (MTCs) from different manufacturers), then your program may become very complex because it must:
a. clear the previous configuration and data blocks
(for the MTC from company A)
b. replace them with a new set of configuration and data blocks
(for the MTC from company B)
c. communicate with the device from company B
d. repeat the three steps for each different device of the same type
(for the MTCs from companies C, D, etc.)
1-6
Chapter 1
Overview of an SPI Communication Network

Definition of Terms

SPI Term How it works or what it means Shopfloor Term
ASCII Polls ASCII strings such as SPI Revision returned by BTR ASCII status word (32bit word or 2 PLC words)
ASCII Selects ASCII strings that you send to the SPI module ASCII string (32bit word or 2 PLC5 words)
Bit Polls bitlevel status words returned by BTR bitstatus words (16bit words)
Bit Selects bitlevel command words that you send to the SPI module bitcommand words (16bit words)
Device ID SPIspecified code for an SPIspecified device 8bit code such as 00100010 (22) for a dryer
Device Type SPIspecified device mold temperature controller, dryer, hot runner, etc.
Numeric Polls process actuals such as pressure or flow returned by BTR numeric status words (32bit word or 2 PLC5 words)
Numeric Selects setpoints or alarm limits that you send to the SPI module numeric setpoints (32bit word or 2 PLC5 words)
Polls (noun) status returned to the processor by BTR Numeric status, or words containing status bits
Selects (noun) commands transferred to the SPI module by BTW setpoints, or words containing control bits
Station Address address that you select for a device on the SPI network device address
Version latest update revision level
Zone applies to temperaturecontrol devices such as hot runner:
Zone Addresses slave addresses for a single temperature control device zone address
The SPI specification and previous revisions of the SPI module user manual use terms that may be unfamiliar to you. We attempt to translate SPI terms to ones more commonly used on the shop floor so you can more easily understand concepts of SPI module operation.
SPI Terminology
zone or temperature zone independently controlled area, slave to master controller such as the barrel, nozzle, or runner, on a molding machine
Other Important Terms
Term Definition
Command bitlevel such as to turn ON a device, or wordlevel such as a setpoint or alarm
Decimal Data the PLC5's base10 (integer) numbering system with a range of -32,768 to +32,767,
stored in N files as 2'scomplement binary in 16bit words
Polling Sequence or Automatic Polling
Status bitlevel such as the ON/OFF status of a device, or wordlevel such as a process temperature
The manner in which the SPI module pulls status from each device on the SPI link, formats it, and sends it to the PLC processor by BTR. The SPI module services the devices (completes one before going to the next) in the order that you listed them in the MCC polling sequence.
1-7
Chapter 1
Overview of an SPI Communication Network
Notes
1-8
Chapter
2
Important Information that You Need to Set Up the SPI Network

Objective

Required Information from the Device Manufacturer

This chapter tells you what information you need from the device manufacturer, and how to wire an SPI network.
To use a device on the SPI network, you need to know the following information about the device from the device manufacturer:
Device-type IDs Address code to identify the device on the SPI network How to set the address code in the device Communication rate Data Types and Data Codes for Transfer to/from Devices on the Network Information that You Need to configure the SPI module Information that you Send to / Receive From Devices Via the SPI Module
Devicetype IDs
Each device manufactured for use on the SPI network must have an SPI­specified device-type identification number (device ID). Currently, there are about 10 SPI-specified device ID codes. Examples of device types and their ID codes include:
Type of Device (Device Type) ID ID Code
mold temperature controller 20 00100000
chiller 21 00100001
dryer 22 00100010
loader 23 00100011
melt pump 24 00100100
additive feeder 25 00100101
selftuning temperature controller 26 00100110
general purpose temperature controller 27 00100111
volumetric blender 28 00101000
continuousweigh blender 29 00101001
batchweigh blender 2A 00101010
robot 2B 00101011
reserved for future devices 2C 00101100 to 11111110
2-1
Chapter 2
Important Information That You Need to Set Up the SPI Network
Important: When using any of these devices with a custom configuration (as described in this manual) rather than a standard configuration (described in the SPI Protocol Interface Manual), you use the above ID codes, but you must set the Configuration Select (CS) bit (bit 14 in MCC word 5, 7, 9, etc) when you enter the device polling list in the MCC. (We describe the MCC and other data files in chapter 3.)
Address Code to Identify the Device on the SPI Network
The SPI module uses the address code that you set on the device, in combination with the SPI-assigned device ID code, to locate the device on the SPI network. This lets the SPI module differentiate between two or more devices having the same device ID. However, we recommend that your program be structured to communicate with no more than one device of a given type at a time. The use of two or more devices of the same type may require special considerations described elsewhere in this manual.
The address code is an 8-bit code with a decimal range of 32-255.
How to Set the Address Code in the Device
Most devices will typically use jumpers or a switch assembly to set the address code. More complex devices such as a multi-zone temperature controller may use a keypad to set the device address and zone addresses. You must get this information from the manufacturer if not included in the user manual that accompanied the device.
Communication Rate
Typical communication rates vary from 1200 to 19200 baud. You select a communication rate that suits all devices on your SPI network. The device with the lowest maximum rate establishes the upper limit for the network. The device manufacturer must tell you the range of selectable rates, and how to select a given rate.
2-2
Chapter 2
Important Information That You Need to Set Up the SPI Network
Data Types and Data Codes for Transfer to and from Devices on the SPI Network
You need to know the number, type, codes, and purpose of data words that the device will respond to:
how many bit-command words you can send to the device the SPI-assigned code (such as 20 49) of each bit-command word the purpose of each bit-command word such as
– used to turn the device on or off
how many numeric-command words you can send to the device the SPI-assigned code (such as 20 31) of each numeric-command word the title of each numeric-command word such as
– setpoint – high deviation alarm – low deviation alarm
the same for ASCII strings (though seldom used) to send to the device
Then, to receive status from the device via the SPI module:
how many bit-status words you can receive from the device the SPI-assigned code (such as 20 40) of each bit-status word the purpose of each bit-status word such as
– report if the device is turned on or off
how many numeric-status words you can receive from the device the SPI-assigned code (such as 20 30) of each numeric-status word the title of each numeric-status word such as
– process temperature or pressure – stored high deviation alarm – stored low deviation alarm
the same for ASCII strings (seldom used) received from the device
The SPI protocol requires the transfer of at least five words (four header words + one data word) to transfer as little as a bit command to a device on the SPI network. This is in addition to the initial transfer of configuration words that prepare the SPI module to handle data transfers. The SPI protocol is relatively inefficient.
2-3
Chapter 2
Important Information That You Need to Set Up the SPI Network
Information to Configure the SPI Module
Configuration information that you initially transfer to the SPI module with the MCC does several things:
identifies the devices with which it will communicate on the network establishes the order in which it will poll the devices sets the network’s communication rate
Then you transfer device-specific configuration to the SPI module with one CCB for each device on the SPI network to set up the SPI module’s memory to store specified command and status words. Each CCB defines:
the number of command words to be sent to the device via the SPI module the number of status words to be sent to the device via the SPI module word maps to designate the type and location of all command words word maps to designate the type and location of all status words
Information that you Send to / Receive From Devices Via the SPI Module
Once you have successfully configured the SPI module, you transfer data to and from the device via the SPI module with a CDB and a CDS, respectively.
The types of information that you can send to the device include:
bit commands to turn a machine on or off setpoints such as for temperature and pressure alarms to tell when temperature or pressure setpoints have been exceeded
The types of information that you can receive from the device include:
status bits such as to indicate if the machine is on or off process temperatures or pressures pressure and temperature alarm limits currently stored by the device
2-4
1771 I/O Chassis
PLC-5 Processor
Block Transfers
SPI Module
Chapter 2
Important Information That You Need to Set Up the SPI Network
Informational Requirements for an Example SPI Network
To summarize the informational requirements, we present an example 3-device SPI network.
Configuration of the SPI module includes
- communication rate for the SPI network
- device ID and address of each device
- order in which devices are polled by the SPI module
- number, type, and SPI codes of all words to be sent (by BTW)
- number, type, and SPI codes of all words to be received (by BTR)
command data sent by BTW
status data received by BTR
Dryer Controller
SPIassigned device type ID = 22 Device address that you select = uu Communication rate that you select = xxxx
Command words (by BTW) that set
- device on or off
- temperature setpoint
- high deviation alarm
- low deviation alarm
Status words (by BTR) that report
- device on or off
- process temperature
- high deviation alarm
- low deviation alarm
Melt
Pump
Controller
SPIassigned device type ID = 24 Device address that you select = vv Communication rate that you select = xxxx
Command words that set
- device on or off
- pressure setpoint
- high deviation alarm
Status words that report
- device on or off
- process pressure
- high deviation alarm
Hot Runner Temperature Controller
SPIassigned device type ID = 26 Device address that you select = ww Zone 1 address that you select = yy Zone 2 address that you select = zz Communication rate that you select = xxxx
Command words that set
- device on or off
- temperature setpoint, zone 1
- temperature setpoint, zone 2
- high deviation alarm
- low deviation alarm
Status words that report
- device on or off
- process temperature, zone 1
- process temperature, zone 2
2-5
Loading...
+ 43 hidden pages