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.
The illustrations, charts, sample programs, and layout examples shown in this
guide are intended solely for purposes of example. Since there are many
variables and requirements associated with any particular installation,
Allen-Bradley does not assume responsibility or liability (to include
intellectual property liability) for actual use based upon the examples shown
in this publication.
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 solidstate 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.
Purpose
Types of Data Communicated on the SPI Network 11
Role
Role of the Host PLC5 Processor 12
Files That You Map in the Data Table 12
Overview
How the SPI Module Communicates With Its Network Devices 15
How
Definition
of the SPI Network
of the SPI Module
of the Data T
Many Dif
ferent Devices Can the SPI Network Handle? 16. . . . . .
Chapter
Command and Status Blocks 31
Module Configuration Command Block (MCC) 32
System Status Block (SYS) 34
Custom Configuration Block (CCB) 36
Custom Data Block (CDB) 38
Custom Configuration Status (CCS) 310
Custom Data Status (CDS) 312
Summary of SPI Block Acronyms, Device Types, and ID Codes 314
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 PLC5 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 FileQuantityPurpose
Blocktransfer Buffers
Module Configuration Command (MCC) 1 MCCsend modulespecific configuration to the SPI module
System Status (SYS)1 SYSreceive module and network status from the SPI module
Custom Configuration Block (CCB)1 CCB for each device typesend devicespecific configuration to the SPI module
Custom Data Block (CDB)1 CDB for each device typesend commands to the SPI module destined for the device
Custom Configuration Status (CCS)1 CCS for each device typereceive deviceconfiguration status from the SPI module
Custom Data Status (CDS)1 CDS for each device typereceive 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 BTRbuffer data coming from the SPI module
1 BTWbuffer 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,
devicespecific
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,
devicespecific 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
powerup 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 PLC5 processor to:
* set the size and contents of command and status data blocks
* block transfer command and status data between PLC5 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 TermHow it works or what it meansShopfloor Term
ASCII PollsASCII strings such as SPI Revision returned by BTRASCII status word (32bit word or 2 PLC words)
ASCII SelectsASCII strings that you send to the SPI moduleASCII string (32bit word or 2 PLC5 words)
Bit Pollsbitlevel status words returned by BTRbitstatus words (16bit words)
Bit Selectsbitlevel command words that you send to the SPI modulebitcommand words (16bit words)
Device IDSPIspecified code for an SPIspecified device8bit code such as 00100010 (22) for a dryer
Device TypeSPIspecified devicemold temperature controller, dryer, hot runner, etc.
Numeric Pollsprocess actuals such as pressure or flow returned by BTRnumeric status words (32bit word or 2 PLC5 words)
Numeric Selectssetpoints or alarm limits that you send to the SPI modulenumeric setpoints (32bit word or 2 PLC5 words)
Polls (noun)status returned to the processor by BTRNumeric status, or words containing status bits
Selects (noun)commands transferred to the SPI module by BTWsetpoints, or words containing control bits
Station Addressaddress that you select for a device on the SPI networkdevice address
Versionlatest updaterevision level
Zoneapplies to temperaturecontrol devices such as hot runner:
Zone Addressesslave addresses for a single temperature control devicezone 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
TermDefinition
Commandbitlevel such as to turn ON a device, or wordlevel such as a setpoint or alarm
Decimal Datathe PLC5's base10 (integer) numbering system with a range of -32,768 to +32,767,
stored in N files as 2'scomplement binary in 16bit words
Polling Sequence or
Automatic Polling
Statusbitlevel such as the ON/OFF status of a device, or wordlevel 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
Devicetype IDs
Each device manufactured for use on the SPI network must have an SPIspecified 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)IDID Code
mold temperature controller20 00100000
chiller21 00100001
dryer22 00100010
loader23 00100011
melt pump24 00100100
additive feeder25 00100101
selftuning temperature controller26 00100110
general purpose temperature controller27 00100111
volumetric blender28 00101000
continuousweigh blender29 00101001
batchweigh blender2A 00101010
robot2B 00101011
reserved for future devices2C 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
SPIassigned 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
SPIassigned 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
SPIassigned 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
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.