F-2 slc example ladder program, Figure f.1 example slc ladder logic program – Rockwell Automation 22-SCM-232 Serial Converter Module User Manual

Page 70

Advertising
background image

F-2

SLC Example Ladder Program

Figure F.1 Example SLC Ladder Logic Program

SLC 5/03 communications to a PowerFlex 4/40 using a 22-SCM-232

Connection:
The 22-SCM-232 connects directly to Channel 0 on the processor (DB9 connector) and the RJ45 port on
the PowerFlex 4/40. It provides both media (RS232 to RS485) and protocol (DF1 to Modbus RTU)
conversions.

Additional PF4/40 drives can be added. Use one AK-U0-RJ45-SC1 Splitter Cable for connecting to the
first drive, and one AK-U0-RJ45-TB2P for every drive. The "Local Node Address" in the MSG instruction
identifies the drive node to communicate with.

PF4 Parameters: 22-SCM-232 parameters:
36 [Start Source] = 5 (Comm Port) 1[Adapter Cfg] = RTU Master
38 [Speed Reference] = 5 (Comm Port) 2[DF1 Addr Cfg] = 1 (this MUST equal Parameter 104 of the PF
4/40 it is connected to)
103 [Comm Data Rate] = 4 (19.2K) 3 [DF1 Rate Cfg] = 19.2k bps
104 [Comm Node Addr] = 1
107 [Comm Format] = 0 (RTU 8-N-1)

19.2K and 8-N-1 are a requirement and can not be changed. The data rate of the controller and SCM
MUST be equal to each other, but can be set faster or slower than the drives baud rate if desired. It is
recommended that 19.2K be used for ALL serial connections (controller, SCM, and drives) to be consistent
and to avoid any errors.

This rung clears the read data area (N7:10-19) on the first program scan (N7:0 = a constant 0).

0000

S:1

15

First Pass

COP

Copy File
Source

#N7:0

Dest

#N7:10

Length

10

COP

Logic Status

0001

B3:0

0

Stop
PB

N7:20

0

Logic Command
STOP

0002

B3:0

1

Start
PB

B3:0

0

Stop
PB

N7:20

1

Logic Command
START

0003

B3:0

2

Jog
PB

B3:0

0

Stop
PB

N7:20

2

Logic Command
JOG

0004

B3:0

3

Reset
PB

N7:20

3

Logic Command
RESET

Advertising