Using CP1 Modbus Control For MX2 Inverter Drives

Updated May 02, 2024

Introduction

This document describes the procedure to configure and connect a CP1L-M30 PLC to an MX2 inverter drive for simple motion control using Modbus RTU. This example is intended for a new CP1/MX2 user and illustrates easy programming and configuration for simple inverter motion control of a new system.

Overview

The example provided below uses the CP1L-M30 PLC with a CP1W-CIF11 installed in the rightmost option board position (slot 2). The PLC uses the CP1W-CIF11 serial option module to communicate with the MX2 inverter using the Modbus protocol for functions such as start/stop, speed control, status monitoring and error reset. Up to 31 inverters may be connected to a Modbus "master" (the CP1 in this example) using a twisted-pair cable.

A basic CX-Programmer project is provided and detailed for this tutorial. Typically, an HMI or other external user input device is needed for real application, but this tutorial does not cover such detail and only includes simplified programming for trial operation.

Applicable Hardware

PLC

  • CS1*-CPU**H Unit version 3.0 or higher
  • CJ1*-CPU**H Unit version 3.0 or higher
  • CJ1M-CPU** Unit version 3.0 or higher
  • CP1H
  • CP1L (except 10 points CPU)
  • CP1L-E

Serial Communications Units

  • CS1W-SCU21-V1
  • CJ1W-SCU21-V1
  • CJ1W-SCU41-V1 Unit Version 1.2 or higher
  • CS1W-SCB21-V1 
  • CS1W-SCB41-V1 Unit Version 1.2 or higher
  • CP Series CPU serial port

Further Reading

3G3MX2 Users Manual(See Appendix B) document I570-E2 

Program download

MX2 FB Control.zip

Procedure

Wiring and Connection Settings

The MX2 inverter will be controlled entirely by MODBUS commands over the RS485 serial communication link (to the CP1L PLC), so no I/O wiring is required. The communication wiring should connect the ‘RS+’ and ‘RS-’ terminals of the MX2 and the screw terminals of the CP1W-CIF11 RS422/485 communications option module, fitted in the right-hand slot of the CP1L PLC. Use the following steps to connect the CP1W-CIF11 to the MX2 inverter.

DIP Switch Settings

1. Set the DIP switch to ON (to the right) for the MX2 termination resistor. This switch is labelled as MD SW1 and its location is shown below.

2. Set the DIP switches on the rear of the CP1W-CIF11 unit according to the diagram below.

Wiring:

3. Connect the MX2 terminal labeled "RS-" to the CP1W-CIF11 terminal labeled "SDA-".

4. Connect the MX2 terminal labeled "RS+" to the CP1W-CIF11 terminal labeled "SDA+".

Delete

MX2 Parameters

By default, the MX2 is set to accept speed reference and run command signals from the built-in front panel keypad and external digital input signals. In order for the MX2 to be controlled entirely over Modbus, the following parameters (A0001 and A0002 in bold, below) must be changed. Please be sure to cycle the power to the inverter after changing these parameters in order for the new settings to take effect. The sample CX-Programmer project uses Modbus settings of 9,600bps (baud rate), 8 data bits, 1 stop bit and no parity, and also assumes that the MX2 has a node number (network address) of 1. Therefore, no other parameters need to be changed from the defaults, as they already match these settings.

Please refer to section 2-5 of the MX2 User’s Manual (Cat. No. I570-E2-01) if you are unfamiliar with the operation of the front panel keypad.

Delete

PLC Program

Delete

Info

While the CP1L-L/EL only has one port, in software it is configured as port 2.

The included PLC Program is completely documented for an easy understanding of functionality and operation. This program incorporates a Function Block that provides control and status monitoring of the MX2 using the Modbus protocol.
Configure the serial port as shown below.

In our example we will set the inputs to the INV002_Refresh FB as shown below.

 

The tables below show the data table and command word structure. The word n=0 is the command word, and n=1 is the reference frequency. In this example we set the Data table area to D100, so to set the speed to 10Hz, we would write &1000 to D101. We would set D100.00 to TRUE to set the drive to Run Forward.

Delete

Info

If the connection fails, you will see bit 15 of n=0 set to TRUE. Check the wiring, the parameters on the drive and the serial port settings on the PLC.

Delete


 

 

Start a Conversation
This conversation is closed
Uploading...