beautypg.com

Role of the host plc-5 processor, Files that you map in the data table – Rockwell Automation 1771-SPI,D17716.5.122 SPI PROTOCOL INTERFACE User Manual

Page 8

background image

Overview of an SPI Communication Network

Chapter 1

1-2

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

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):

Name of File

Quantity

Purpose

BlockĆtransfer Buffers

1 BTR

buffer data coming from the SPI module

1 BTW

buffer data going to the SPI module

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

Then, you must write ladder logic that writes commands to and reads status
from the SPI module.

Role of the

Host PLCĆ5 Processor

Files That You Map in the

Data Table