I remember when I first joined the industry, I took over a project to upgrade an injection molding machine. The communication between the inverter and the PLC was always intermittent. After several days of troubleshooting, I discovered that the grounding was not done correctly, which caused interference. Today, I will share my experiences and techniques for controlling inverters with PLCs, focusing on those easily overlooked but critical details.
1. Choosing Communication Methods
Hardware Connection Schemes
Just like mobile phones have two internet access methods: Wi-Fi and 4G, PLCs controlling inverters also have multiple options:
// Analog control method
AI/AO connection:
- PLC analog output (0-10V/4-20mA)
- Inverter analog input terminal
- Shielded wire must be routed separately
// Communication control method
RS485 interface:
- PLC: RS485 communication module
- Inverter: 485 terminals A/B
- Communication protocol: Modbus-RTU
Wiring Requirements
// Inverter terminal definitions
+10V: Reference voltage output
AI1: Analog input 1 (0-10V)
AI2: Analog input 2 (4-20mA)
GND: Analog ground
A+: RS485 communication A line
B-: RS485 communication B line
// PLC output terminals
Q0.0: Run enable
Q0.1: Fault reset
Q0.2: Forward command
Q0.3: Reverse command
QW64: Analog output (frequency set)
2. Inverter Parameter Settings
Basic Parameter Configuration
// Essential parameters for the inverter
P00.01 = 2 // Control method selection (communication control)
P00.06 = 8 // Frequency set method (communication set)
P14.00 = 1 // Communication protocol selection (Modbus-RTU)
P14.01 = 2 // Baud rate setting (19200bps)
P14.02 = 1 // Data format (RTU)
P14.03 = 1 // Local address (station 1)
// Communication timeout protection
P14.11 = 2 // Communication timeout action (free stop)
P14.10 = 1.0 // Communication timeout duration (1 second)
Control Program Example
// PLC control program
FUNCTION "VFD_Control" : VOID
VAR_INPUT
Enable : BOOL; // Enable signal
Speed : REAL; // Speed set
END_VAR
VAR
ModbusCmd : MB_MASTER; // Modbus master
SendData : ARRAY[0..3] OF WORD; // Send data
END_VAR
BEGIN
// Data packaging
SendData[0] := REAL_TO_WORD(#Speed * 100.0);
// Modbus communication
ModbusCmd(
REQ := #Enable,
MB_ADDR := 1, // Slave address
MODE := 0, // Write single register
DATA_ADDR := 2000, // Frequency set address
DATA_LEN := 1, // Data length
DATA_PTR := #SendData// Data pointer
);
END_FUNCTION
3. Fault Handling Design
Fault Monitoring Program
// Fault monitoring function block
FUNCTION_BLOCK "Fault_Monitor"
VAR_INPUT
Run_Status : BOOL; // Running status
Fault_Code : WORD; // Fault code
END_VAR
VAR
Fault_Timer : TON; // Fault timer
Retry_Count : INT; // Retry count
END_VAR
BEGIN
// Fault detection
IF #Fault_Code <> 0 THEN
// Delay confirmation
#Fault_Timer(IN := TRUE,
PT := T#1S);
IF #Fault_Timer.Q THEN
// Fault handling
IF #Retry_Count < 3 THEN
// Automatic reset
"Reset_VFD" := TRUE;
#Retry_Count := #Retry_Count + 1;
ELSE
// Alarm and stop
"System_Alarm" := TRUE;
END_IF;
END_IF;
END_IF;
END_FUNCTION_BLOCK
4. Debugging Optimization Techniques
Quick Debugging Program
// Inverter debugging program
FUNCTION "VFD_Debug" : VOID
VAR_TEMP
Status : WORD; // Communication status
Speed : REAL; // Actual speed
END_VAR
BEGIN
// Automatic parameter check
FOR #i := 0 TO 10 DO
// Read parameters
#Status := READ_PAR(
VFD_ADDR := 1,
PAR_ADDR := #i,
PAR_VAL => #ParValue
);
// Parameter verification
IF #Status <> 0 THEN
"Debug_Error" := TRUE;
RETURN;
END_IF;
END_FOR;
// Speed ramp test
FOR #Speed := 0.0 TO 50.0 BY 5.0 DO
"VFD_Control"(
Enable := TRUE,
Speed := #Speed
);
WAIT TIME := T#1S;
END_FOR;
END_FUNCTION
Practical Suggestions
-
1. Key Points in System Design:
-
• Control method selection
-
• Grounding system design
-
• Electromagnetic Compatibility
-
• Protection functions
-
2. Debugging Tools:
-
• Oscilloscope
-
• Multimeter
-
• Inverter debugging software
-
• Communication analyzer
-
3. Key Technologies:
-
• Inverter principles
-
• Communication protocols
-
• PID tuning
-
• Fault handling
-
4. Precautions:
-
• Grounding standards
-
• Cable laying
-
• Parameter backup
-
• Motor Matching
Key Capability Requirements:
-
1. Hardware Technology:
-
• Inverter principles
-
• Wiring standards
-
• Motor characteristics
-
• EMC design
-
2. Software Development:
-
• PLC programming
-
• Communication programming
-
• Debugging methods
-
• Fault diagnosis
-
3. On-Site Skills:
-
• Wiring construction
-
• Parameter tuning
-
• Fault troubleshooting
-
• Performance optimization
Implementation Steps Suggestions:
-
1. Preliminary Preparation:
-
• Motor parameter measurement
-
• Inverter selection
-
• Control scheme design
-
• Wiring diagram drawing
-
2. System Installation:
-
• Electrical cabinet layout
-
• Cable laying
-
• Grounding construction
-
• Power-on testing
-
3. Debugging Optimization:
-
• Parameter settings
-
• Communication testing
-
• Performance tuning
-
• Reliability verification
Follow the solutions provided in this article to practice, starting with simple analog control and gradually achieving advanced communication control functions. Establish complete technical documentation, including wiring diagrams, parameter tables, and debugging records. Pay attention to electromagnetic compatibility design, which is the foundation for the reliable operation of inverter systems. Regularly perform equipment maintenance and parameter backups to maintain stable system operation. When matching motors, pay attention to power margins, and it is recommended to choose a larger capacity for the inverter. When developing programs, consider fault protection and automatic recovery to improve system reliability.