Rockwell Automation RECOMM-PBUS PROFIBUS Communications Module User Manual

Page 86

Advertising
background image

7-12

PROFIBUS Communications Module

7.4

Sample SLC Ladder Logic- Station 1
Parameter Protocol

Figure 7.9 – Sample SLC Ladder Logic - Station 1 Parameter Protocol

This circuit utilizes the Parameter Protocol. A REQUEST to Station 1 is processed only one at a time, and after each
RESPONSE from Station 1 a zero must be sent and received to 'handshake' before the next REQUEST/RESPONSE transaction
can take place. For example:
Send a parameter read request --> Receive a parameter read response --> Send a "0" --> Receive a "0" --> [Transaction complete]

If the RESPONSE PCA Word 1 (N10:10) is "0", then a REQUEST can be initiated.

Elsewhere in the user program these words must be loaded with message data prior to initiating the REQUEST:
N7:10 = RC = the operation to be performed ("1"=Read, "2" = 16-bit Write, "3" = 32-bit Write)
N7:11 = PNU = the parameter number to read or write
N7:12 = Subindex = the DPI port # ("0"= Host or SP600 drive, "5" = RECOMM-PBUS, etc.)
N7:13 = PVA #1 = the parameter value (high word) - only used when writing parameters
N7:14 = PVA #2 = the parameter value (low word) - only used when writing parameters

The four Parameter Protocol Words set up in the scanner are used to perform the Parameter Protocol:
N20:10 = contains RC (the operation to be performed) and PNU (the parameter number to read or write) combined
N20:11 = Subindex (the DPI port #)
N20:12 = PVA #1 (the parameter value (high word))
N10:13 = PVA #2 (the parameter value (low word))

B3:19/15 is turned ON elsewhere in the program after the REQUEST message (N7:10-14) is loaded. This causes one Parameter
Protocol read or write to occur and B3:19/15 is turned OFF when the transaction is complete.

0016

B3:19

15

Station 1
Par Prot
Messaging
Request

EQU

Equal
Source A

N10:10

0<
Source B

0

0<

EQU

Station 1
RESPONSE
PCA Word

MOV

Move
Source

N7:11

15<
Dest

N20:10

0<

MOV

Station 1
PCA Word

N7:10

0

RC bit 0

L

N20:10

12

PCA Word
RC
bit 0

N7:10

1

RC bit 1

L

N20:10

13

PCA Word
RC
bit 1

COP

Copy File
Source

#N7:12

Dest

#N20:11

Length

3

COP

IND Word
(Subindex)

This section of the routine is only needed if the application needs to perform Parameter Protocol Reads or Writes to Station 1.

On power up, initialize the Parameter Protocol routine.

0015

S:1

15

First Pass

U

B3:19

15

Station 1
Par Prot
Messaging
Request

Advertising