PLC – VFD Comunication

2 minutes

Another communication post.

This time I’ll give you the tools to control some Delta Inverter with Delta PLC trough RS-485.
I’ll made this tutorial step by step, starting as always from the hardware.

1. Hardware
The pinout in this case is really simple, the middle pins of the RJ11 (or RJ45) are the positive and negative of the RS485 communication. So I recommend to buy some RJ01 from Delta inverter range, or some telephone wiring, cut one side and use the flying leads to connect to the PLC.

2. Decide the protocol to be used.
And remember to write the protocol in a paper avoids future problems!
In this case I’m going to use the next (7, N, 2, 38400, ASCII)

3. Configuration of the Inverter.
The important think on this step is get ready the inverter to receive orders from RS485 interface, so depending the inverter the values are going to be different. In this example I use VFD-E.
Check the parameters If you are going to use another inverter.

2.00 = 3
Source of First Master Frequency Command
3: RS-485 (RJ-45) communication

2.01 = 3
Source of First Operation Command
3: RS-485 (RJ-45) communication. Keypad STOP/RESET enabled.

9.00 = 2
Communication Address
in my example 2

9.01 = 3
Transmission Speed
3: Baud rate 38400bps (max speed for some inverters)

9.04 = 0
Communication Protocol
0: 7,N,2 (Modbus, ASCII)

4. PLC Software (send).
To send some frame trough the PLC RS485 port, we’re going to use the instruction MODWR (API 101) and the special mark M1122 to trigger the communication.

The MODWR has the next composition:
MODWR S1 S2 N
S1 = Device Address of the slave (2 as we configure on steps 3, 4 and 5)
S2 = Data Address of the slave (H2001 to change frequency)
N = Data to be written (just 1 word)

You can found the inverter slave data address on the inverter manual or in following file
Inverter Data Address for VFD-E.

5. PLC Software (read).
To read some frame trough PLC RS485 port, for example the Frequency Output. We’re going to use the instruction MODRD (API 100) and again the special mark M1122 to trigger the communication.
But this time, we will use the special registers D1050 to D1055, where we could found the data received.

The MODRD has the next composition:
MODWR S1 S2 N
S1 = Device Address of the slave (2 as we configure on steps 3, 4 and 5)
S2 = Data Address of the slave (H2102 to read output frequency)
N = Data to be read (3 words)

You can download the PLC program examples on the next link.
Read-Write to Inverter

Blog at WordPress.com.