beautypg.com

12 using explicit messaging (pcp communications) – Rockwell Automation 20-COMM-I Interbus Adapter User Manual

Page 74

background image

6-12

Using Explicit Messaging (PCP Communications)

Write Examples:

Writing Pr. 106 [Preset Speed 6] to a PowerFlex 70 (DPI Host)

In the example ladder logic program, the user would load these
registers before calling the subroutine to perform the PCP Write:

Message

Command word = 8 = PCP Write (bit 3 ON)

N23:10

Command

8

8

SLC Address

Descr

iption

Value (He

x)

N23:20

N23:13

N23:12

N23:11

N23:21

Reply

12394

2

0

0

8

-32,760

CR# = 2 (Station 1.0)

Sub Index not used

Number of words following = 2

CR# = 2 (Station 1.0)

306A

2

0

8

8008

N23:16

0

Value (Dec)

Result = 0 (success)

N23:23

0

2

2

0

2

2

N23:22

N23:24

"8000" (bit 15 ON) indicates Reply message present

Status word:

"0008" (bit 3 ON) echo's the command (PCP Write)

3001h is the start of PowerFlex 70 parameters (Pr.1)

Index = 3000h+6Ah = Parameter 106 [Preset Speed 6]

6A hex = 106 dec = Parameter 106 [Preset Speed 6]

Echo of the Command Word (PCP Write)

N23:14

N23:15

2

123

7B

2

Data word 2 not used

Data word 1 = 123 = 12.3 Hz

2 bytes of data following

Message

CR# =2 (Station 1.0)

N23:0

Request

2

2

SLC Address

Descr

iption

Value (He

x)

N23:1

0

0= PowerFlex 70 (DPI Host)

0

Value (Dec)

N23:2

106

6A

Parameter # = 106

N23:3

N23:4

2

123

0

2

7B

0

2 byte data write

Data Word 1 = 123 = 12.3 Hz

Data Word 2 not used

N23:5

20COMM-UM007A-EN-P.book Page 12 Tuesday, January 22, 2002 10:52 AM