You are on page 1of 11

PowerFlex 4-Class Application Note:

Controlling a PowerFlex 4 drive over RS-485 using a ProSoft


3150-MCM Modbus Scanner (RTU)
May 13, 2002
Purpose
The purpose of this document is to illustrate the steps for connecting a PowerFlex 4 drive to a Modbus
RTU network, and controlling the drive using a ProSoft MCM-3150 Modbus RTU scanner. Although a
PowerFlex 4 is used in the example, the materials can easily be adapted for use with future DSI-based
Hosts.

RTU Overview
RTU is an open Master/Slave Protocol. Typical applications include radio-based SCADA systems, HVAC
controls and industrial RS-485 multi-drop networks. One of the protocol's benefits is the different types of
media on which it will operate (RS-232/422/485, Modem, Satellite, Radio, etc.). One limitation is its
relatively low data rate, ranging from 1200 to 38.4k Baud.

Resource materials
PowerFlex 4 Users Manual

22A-UM001B-EN-E

ProSoft 3100/3150-MCM User Manual

www.prosoft-technology.com

PowerFlex 4-Class Modbus Addressing

PF 4-Class Modbus RTU Addressing.xls

SLC Program Address Descriptions

SLC PGM Addressing Descriptions.xls

RSLogix 500 Ladder Demo

PowerFlex 4 RTU Demo.rss

Modbus RTU Protocol Specification

www.modicon.com/techpubs/TechPubNew/PI_MBUS_300.pdf

Hardware
Hardware used for the example network:

SLC 5/05 system with a ProSoft 3150-MCM Modbus Scanner

(2) PowerFlex 4 drives

Phoenix Contact SUBCON 9/F-SH connector (#27 61 499)

(2) Phoenix Contact 2-row Combicon plugs (#18 53 120) with (2) Phoenix Contact Inverted
Combicon plugs (#18 25 527)
22-RJ45CBL-C20 2 meter RJ45 to RJ45 cable, or any 1 meter Category 5 shielded 8-conductor
cable with shielded male RJ-45 connectors on both ends

Belden 3105A RS-485 cable

(2) 120 ohm resistors

System Diagram

The RS-485 cable is connected to "PRT 1" (Port 1) on the 3150-MCM for this example.

3150-MCM Jumper Configuration


Set Jumper JW1 to the RS-485 2-wire setting (jumper is connected to pins 7,8,9 and 10) to configure
PRT 1 (Port 1) on the ProSoft scanner. The ladder example uses port 1 and the RS-485 cable must be
connected here. See Appendix D - Jumper Configurations in the 3150-MCM User Manual for more
information.

PowerFlex 4 Jumper Wire


Terminal 16 "RS485 (DSI) Shield" needs to be wired to safety ground (PE) to use the RS-485
communications port.

RS-485 Wiring Diagrams


The PowerFlex 4 uses an RJ45 socket for the RS-485 connection, primarily to allow for quick and easy
connection of our software tools (uses 22-SCM-232 serial converter) and HIMs (22-HIM-*). For RS-485
multi-drop network applications, the following two wiring options can be employed:
1.) RJ45 Splitter Adapter cable - Since RS-485 is daisy-chained, there will be two cables connected at
each drive (incoming from previous drive and outgoing to the next drive). A splitter converts a single
RJ45 socket connection into two RJ45 socket connections, allowing RJ45 plug cables to be used.
2.) RJ45 to Terminal Block cable - To avoid using an RJ45 Crimping tool, a simple RJ45 to terminal block
cable can be used instead of an RJ45 Splitter Adapter. The benefit is all wire terminations use screw
terminals so no special tools are required.
Both wiring options are covered in more detail below.

RJ45 Splitter Adapter cable


Splitters are off-the-shelf items available via 3rd Party suppliers. To allow for clearance issues, the
splitter needs to include a length of cable between the RJ45 plug and 2-port RJ45 socket as opposed to a
T-adapter version.

Example 3rd Party RJ45 Adapter Splitter cable

The network cable would be wired as follows:

Note that only two wires are used, connecting to pins 4 and 5. DO NOT USE 8-CONDUCTOR CABLES
AND CONNECT ALL OF THE WIRES. Some of the RJ45 pins on the PowerFlex 4 contain power and
ground connections for peripheral devices and must not be connected drive to drive.
The 120-ohm resistor can easily be added to the SUBCON connector since it uses screw terminals.
Connecting the other 120-ohm resistor involves crimping a resistor directly on an RJ45 plug or using an
RJ45 plug terminator from a 3rd party (note the resistor must be on pins 4 and 5).
Terminations on the SUBCON are based on connecting to a ProSoft 3150-MCM scanner and the jumper
wire between pins 7 & 8 are unique to the MCM. If you plan to adapt this App. Note to a different
controller, the SUBCON terminations will likely be different.

RJ45 to Terminal Block


As previously stated, the RJ45 to terminal block cable eliminates the need for using an RJ45 crimping
tool and allows for screw terminal connections for all of the wires. It's also easier to connect the 120-ohm
terminating resistor on the last drive. In this example, approximately 10" from the ends of a 22RJ45CBL-C20 were cut, creating two pigtail cables. A Phoenix Contact Inverted Combicon plug (#18 25
527) was wired to the cable and a Phoenix Contact 2-row Combicon plug (#18 53 120) was connected to
it.

RJ45 to Terminal Block cable

The wiring diagram is as follows:


N
e
t
w
o
r
k

The network wiring connections are:

Additional notes regarding wiring:


1. RS-485 networks require 120-ohm resistors at both ends of the network.
2. Terminations on the SUBCON are based on connecting to a ProSoft 3150-MCM scanner. The
jumper wire between pins 7 & 8 is unique to the MCM. If you plan to adapt this App. Note to a
different controller, the SUBCON terminations will likely be different.
3. Belden 3105A cable is used. Actual conductor colors may be different. Make sure the "white" wire
correlates to pin 4 on the RJ45 connector and the "orange" wire to pin 5.
4. The shield is terminated in every other location, i.e. no two products are directly connected via the
shield.

PowerFlex 4 Parameter Settings (shown via DriveExplorer)


Set the following PowerFlex 4 parameters for Node 2:

Set the following PowerFlex 4 parameters for Node 3:

Parameter 36 [Start Source] and Parameter 38 [Speed Reference] must be set to "5" in order to allow
control via the RS-485 port on the drive.
Parameter 103 [Comm Data Rate] and Parameter 107 [Comm Format] are set to match the
communication settings in the ladder program for the MCM-3150 (19.2K baud, 8-O-1).

Parameter 104 [Comm Node Addr] is the only parameter value that is different between the two drives.
Each drive requires a unique node address on the network.
Parameter 106 [Comm Loss Time] is set higher than the default (5.0 secs) for demo purposes only.
Power cycle the PowerFlex 4 drives to ensure the new settings take effect.

LED States
When the system is installed and the SLC is in Run mode, the following LED states indicate normal
operation:
SLC 5/05

RUN

Solid Green

3150-MCM

ACT

Flashing Green

PRT 1 Flashing Green


ERR1 Off
If you do not see these states, then there is either a problem with the wiring or the configuration. A
problem usually results in the ERR1 LED being a solid or flashing yellow. Re-check wiring and the
configuration settings. Refer to the 3150-MCM User Manual for additional troubleshooting information.

The SLC SLC Ladder Logic Program Overview


The SLC ladder logic program is a modification of the MCM User Manual example and is remarkably
small (3 rungs of code). The Main Program (LAD 2) contains only one rung, which calls the MCM
Subroutine (LAD 3) via a JSR instruction. The MCM Subroutine contains two rungs, one for reading
blocks of data in and one for writing blocks of data out. The MCM does all of the network work and even
dictates the reading and writing of blocks of data. The ladder logic simply moves the data to/from the
data table.
MCM Subroutine Rung 0000 (Read circuit)
The data transfers are controlled via handshake I/O bits from the MCM. Note the MCM shows up in the
documentation as a "1746-BAS-5/02" (the adapter is literally a Basic Module with custom firmware from
ProSoft). The circuit reads in five blocks of data (Block ID 0-4) and stores each block in their respective
locations in the N10: file. The blocks are used as follows:
Block 0 - Contains Read data from the PowerFlex 4 nodes, such as Logic Status, Drive Error Codes,
Output Frequency, etc.
Block 1 - Spare
Block 2 - Contains MCM information and Error Codes from Commands in the Command List
(Blocks 80- 81)
Block 3 - Spare
Block 4 - Spare
Spare blocks were provided to allow for expansion.

Viewing the Read Block Data

See the spreadsheet SLC Pgm Addressing Descriptions.xls for descriptions of the N10: addresses (for
example, N10:0 contains Logic Status and N10:3 contains the Feedback for Node 2), and for more
information on the Read Blocks in general.
MCM Subroutine Rung 0001 (Write circuit)
The data transfers are controlled via handshake I/O bits from the MCM. The circuit writes one block of
Write data (Block ID 5), two blocks of Command data (Block IDs 80-81) and one block of Configuration
data (Block ID 255). The Write data block contains the data used for Logic Command, Reference,
parameter writes, etc. The Command data blocks contain the RTU commands to be sent on the network.
The Configuration data block contains the configuration data for the MCM and is typically only sent on
power-up. The blocks are used as follows:
Block 5 - Contains Write data to the PowerFlex 4 nodes, such as Logic Command, Reference, and
Parameter writes
Block 80 - Contains up to 5 RTU Commands
Command 1 - Reads Node 2 Logic Status, Drive Error Code, Output Frequency, etc.
Command 2 - Reads Node 2 Parameters 31-40
Command 3 - Writes Node 2 Logic Command
Command 4 - Writes Node 2 Reference
Command 5 - Writes Node 2 Parameter 39
Block 81 - Contains up to 5 RTU Commands
Command 6 - Reads Node 3 Logic Status, Drive Error Code, Output Frequency, etc.
Command 7 - Reads Node 3 Parameters 31-40
Command 8 - Writes Node 3 Logic Command
Command 9 - Writes Node 3 Reference
Command 10 - Writes Node 3 Parameter 39

Block 255 - Contains MCM configuration data


Viewing the Write Block Data

See the spreadsheet SLC Pgm Addressing Descriptions.xls for descriptions of the N11: addresses (for
example, N11:0 contains Logic Command and N11:1 contains Reference), and for more information on
the Write Block in general.
Viewing the Command Block Data

The Command Block data dictates the RTU commands sent by the MCM. This portion of the SLC data
table is literally the core of the SLC program. See Section 4.4.2 in the MCM User Manual (pg. 26) for
information on the Command List structure. Note that there are three types of Commands:
Continuous - Executed every time the Command List is scanned.
Conditional - Executed only when a change of data is detected.
Control - Executed when a Command Enable bit from the ladder program transitions from 0 to 1.
The Conditional and Control Commands have the benefit of reducing network traffic and improving
response times versus data sent via the Continuous Command.
See the spreadsheet PF 4-Class Modbus RTU Addressing.xls for information on Modbus RTU addressing
for specific registers in the drive. For example, address 8192 (dec) is Logic Command, 8193 (dec) is
Reference, 8448 (dec) is Logic Status and 8451 (dec) is Feedback.
See the spreadsheet SLC Pgm Addressing Descriptions.xls for descriptions of the N7: addresses (for
example, N7:50 contains the Command #1 Port/Mode Select), and for more information on the
Commands Block in general.
Viewing the Configuration Block Data

The scanner is configured via a special Configuration block (Block #255). See the spreadsheet SLC
Pgm Addressing Descriptions.xls for descriptions of the N7: addresses (for example, N7:0 contains the
Port 1 Configuration Word and N7:2 selects the baud rate), and for more information on the
Configuration Block in general.

Demonstrating Network Operation


The example program can be used to demonstrate the following:
Logic Command / Logic Status
N11:0 contains the Logic Command and N10:0 contains the Logic Status for Node 2. The following
decimal values can be set in N11:0 to demonstrate operation:
N11:0 (Logic Command) Value

Description

Stops the drive.

Resets the drive if a fault occurs

18

Runs the drive forward

34

Runs the drive reverse

Node 3 can be controlled using N11:10 (Logic Command).


Reference / Feedback
N11:1 contains the Reference and N10:3 contains the Feedback for Node 2. The following decimal
values can be set in N11:1 to demonstrate operation:
N11:1 (Reference) Value

Speed

150

15.0 Hz

345

34.5 Hz

600

60.0 Hz

You can verify the operation of the Reference command by either viewing the Feedback value in N10:3
or watching the frequency display on the HIM.
The Reference for Node 3 can be controlled using N11:11 (Reference).
Parameter Writes
N11:2 contains the write data for Parameter 39 [Accel Time 1] in Node 2. The results of the write can be
viewed on the PowerFlex 4 display or by monitoring N10:18 (Node 2 Parameter 39 read data). Note that
the data is only being sent on a change-of-state basis (you can change the parameter value via the
PowerFlex 4 keypad without conflict with the network). This is because the command in the Command
List to perform this operation is a Conditional command. It is executed only when a change of data is
detected.
N11:12 contains the write data for Parameter 39 [Accel Time 1] in Node 3. The results of the write can
be viewed on the PowerFlex 4 display or by monitoring N10:38 (Node 3 Parameter 39 read data).
Attention: Parameter writes cause a write cycle to Non-Volatile Storage (NVS) in the PowerFlex 4. If
frequent writes are made, the NVS will quickly exceed its life cycle and cause the drive to malfunction.
Do not create a program that frequently writes parameters.

Additional Notes
1. The RS-485 standard does not specify a standard for terminal names or which points contain the "+"
or "-" of the transmission signal. A common wiring problem is to have the "+" or "-" signal wires
crossed between one or more nodes, and when this occurs no communications can take place. If
you are unable to establish communications after installation, check the wiring and try switching the
signal wires on the RTU scanner / controlling device.
2. Serial cabling is available from several sources and can come in several configurations with different
specifications. Communications problems, such as nuisance noise issues, can occur when incorrect
cabling is used. Typical causes of problems include: using unshielded cables, lack of terminating
resistors, and using wrong size (diameter) wire. Belden 3105A cable has been tested with the
PowerFlex 4 and is known to work using the configuration specified in this App. Note. It is possible
that other configurations will work. This is application dependent and should be tested prior to actual
implementation.

You might also like