beautypg.com

Rockwell Automation 1771-SPI,D17716.5.122 SPI PROTOCOL INTERFACE User Manual

Page 17

background image

Important Information That You Need

to Set Up the SPI Network

Chapter 2

2-3

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.