PowerFlex 4 ModBus-RTU Application Note
PowerFlex 4 ModBus-RTU Application Note
PowerFlex 4 ModBus-RTU Application Note
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
www.prosoft-technology.com
www.modicon.com/techpubs/TechPubNew/PI_MBUS_300.pdf
Hardware
Hardware used for the example network:
(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
System Diagram
The RS-485 cable is connected to "PRT 1" (Port 1) on the 3150-MCM for this example.
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.
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
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
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.
Description
18
34
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.