beautypg.com

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

Page 33

background image

Defining Command and Status Blocks

Chapter 3

3-11

Table 3.J

Bit/Word Definitions of Custom Configuration Status (CCS)

Word

Number

Bit

Number

Title

Range

SPI Module:

0-7

Device ID

00100000 to 11111110

mirrors the SPIĆspecified device ID.

1

8-10

Determine

Configuration

DC

(IDĆspecific)

100 = Store configuration

>>

101 = Read configuration

>>

110 = Overwrite configuration >>

111 = Clear configuration

>>

If device ID matches a stored ID, SPI returns an error.

If SPI finds no matching ID, it returns an error.

If SPI finds matching ID, new config overrides old.

SPI returns a flag, and ignores all other data in CCB.

1

11

Clear All

CA

0 = No action

1 = Clear all configurations

mirrors the CA command

12

Command Executed

CE

0 = SPI module detected an error

1 = SPI executed the command

sets this bit to tell the PLC processor that the custom

configuration block (CCB) was stored without error.

13-15

Not used

If DC (Determine Configuration) bits 8Ć10 above = 101 = Read Configuration, then the SPI module returns words 2 up to 64 as follows.

(If the SPI module finds no matching ID (cannot read specified configuration), it indicates an error by zeroing words 2 up to 64.)

2

0-7

Number of

BitĆcommand Words

0 to 60 decimal data

mirrors the number of words containing bit commands

2

8-15

Number of

Numeric Setpoints

0 to 30 decimal data

mirrors the number of setpoints and/or alarm limits

If it detected an error, zeros this byte.

3

0-7

Number of

ASCII Strings

0 to 30 decimal data

reflects number of ASCII strings

If it detected an error, returns fault diagnostics.

3

8-15

Number of

BitĆstatus Words

0 to 30 decimal data

mirrors the number of words containing bit status

If it detected an error, returns fault diagnostics.

4

0-7

Number of

NumericĆstatus Words 0 to 30 decimal data

mirrors the number of numericĆstatus words such as

temperature. If it detected an error, zeros this byte.

4

8-15

Number of

ASCIIĆstatus Strings

0 to 30 decimal data

mirrors the number of ASCIIĆstatus strings

If it detected an error, zeros this byte.

Starting

at

8-15

CMD1

starts at 00100000 20

mirrors the SPI code pair for the specified

bit command word sent to the SPI module

at

word 5

0-7

CMD2

starts at 00100010 22

bitĆcommand word sent to the SPI module.

For example: 20 49 for Mode, Machine

word

8-15

CMD1

starts at 00100000 20

mirrors the SPI code pair for the specified

numeric setpoint sent to the SPI module

word

pair

0-7

CMD2

starts at 00100010 22

numeric setpoint sent to the SPI module.

For example: 20 31 for Temperature Setpoint

word

8-15

CMD1

starts at 00100000 20

mirrors the SPI code pair for the specified

ASCII string sent to the SPI module

word

pair

0-7

CMD2

starts at 00100010 22

ASCII string sent to the SPI module.

For example, 20 22 for SPI Revision

word

8-15

CMD1

starts at 00100000 20

mirrors the SPI code pair for the specified

bit status word returned to the processor

word

pair

0-7

CMD2

starts at 00100010 22

bitĆstatus word returned to the processor.

For example, 20 44 for Status, Machine

word

8-15

CMD1

starts at 00100000 20

mirrors the SPI code pair for the specified

numeric status word returned to the processors

word

pair

0-7

CMD2

starts at 00100010 22

numeric status word returned to the processors.

For example, 20 72 for Process Temperature

word

8-15

CMD1

starts at 00100000 20

mirrors the SPI code pair for the specified

word

pair

0-7

CMD2

starts at 00100010 22

mirrors the SPI code pair for the specified

ASCII status word returned to the processor.