beautypg.com

Custom data status (cds), Chapter 3, Cds from polling sequence – Rockwell Automation 1771-SPI,D17716.5.122 SPI PROTOCOL INTERFACE User Manual

Page 34

background image

Defining Command and Status Blocks

Chapter 3

3-12

The SPI module returns custom data status (CDS) from a
custom-configured device whenever the SPI module:

reads status from the device during a polling sequence
acknowledges a CDB command addressed to the device

The status contained in CDS is different for each of the above.

If the SPI module: Then it:

detects no faults

1. Sets the command executed (CE) bit 12 to 1.

2. Indicates the CDS origin with command response (CR) bit 13:

CR = 0 = response to a polling sequence

CR = 1 = response to a CDB command

3. Loads CDS according to CR status:

CR = 0 (polling sequence) = loads CDB with status that you specified in CCB

CR = 1 (response to CDB) = reflects the CDB as CDS

detects a fault

1. Sets the command executed (CE) bit 12 to 0.

2. Loads fault diagnostics into word 3 of the CDS.

3. Zeroes followĆon specified status words in the CDS.

CDS from Polling Sequence

Command codes that you defined in the CCB determine the device status
returned by the SPI module after polling devices on the SPI network
(polling sequence). These command codes specify the bit status, numeric
status, and/or ASCII status strings that you want returned in the CDS
starting at word 5 (Table 3.K).

Table 3.K

Custom Data Status (CDS)

Word

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

1

0

CR

CE

0

DC

Device Identification

2

Zone Address

Station Address

3

Diagnostic Word: If the SPI module detects a fault, it sets an error code to help identify the cause of the fault

4

0

0

0

0

5

Returns the first bitĆstatus word that you specified by a commandĆcode pair in CCB, followed by others if specified.

Reports zero for a fault.

two words, per

Returns the numericĆstatus word(s) that you specified by commandĆcode pairs in CCB. Reports zero for a fault.

two words, per

Returns the ASCIIĆstatus word(s) that you specified by commandĆcode pairs in CCB. Reports zero for a fault.

Custom Data Status (CDS)