beautypg.com

Chapter 4, Example cdb worksheet – Rockwell Automation 1771-SPI,D17716.5.122 SPI PROTOCOL INTERFACE User Manual

Page 44

background image

Creating Command and Status Blocks

Chapter 4

4-8

You must create a CDB to send data to the device.

The purpose of this worksheet is to help you enter values into the words
that you defined in the CCB. We help you define:

data layout of the CDB
bit status of bit-command words
values of numeric preset words
ASCII

strings

Important:

Your entries in this CDB must match those entries for

command words (to be sent to the device) that you specified in the CCB,
entry for entry, in the same order, with no blank words.

Important: This example matches the CCB for the dryer that we
previously described.

Example CDB Worksheet

Word Write your entries in this column. (example in italics)

Notes

1

device ID: 22 (Dryer)

Enter the device type ID.

2

device address: (what you set with switches on the device)

Enter 2Ćdigit device address.

3 & 4

zero

5

bit command 1

0000 0000 0000 000x

0 = machine off, 1 = machine on

Set specified bits in each

bitĆcommand word. [1]

6, 7

numeric preset 1

490

o

F (temperature setpoint in TCS)

Enter preset values,

two words per preset

8, 9

numeric preset 2

30

o

F (HiĆtemp deviation alarm, TCS)

two words per preset.

Use second word of pair for

floating point numbers

10, 11 numeric preset 3

30

o

F (LoĆtemp deviation alarm, TCS)

floatingĆpoint numbers.

Otherwise, leave it zero. [1]

pair

ASCII 1

not used in this example

Enter ASCII strings,

two words per string. [1] [2]

[1] Your CDB entries here must match identically the command codes you entered in the CCB:

entry for entry, in the same order, with no blank words

[2] One character per byte, four characters maximum.

Important: The SPI module returns status from the target device in the
device’s Custom Data Status (CDS).

Custom Data Block, CDB, to

Transfer Data to the Device