In the previous issue, we discussed how PLCs “read” analog signals (such as temperature and pressure). In this issue, we will talk about how PLCs “write” analog signals—such as controlling the speed of an inverter or adjusting the opening of a valve. Many beginners find this part complex, but as long as you understand “how to send signals” and “how to calculate values,” even novices can easily get started.
Today, we will take “PLC controlling inverter speed” as an example, explaining everything step by step from wiring to programming, ensuring it is detailed and easy to understand!
First, let’s clarify: why do we need analog output?
Previously, we used digital signals (like Y0) to control motors, which only allowed the motor to “turn” or “stop”; however, in real scenarios, we often need the motor to “turn a little faster” or “turn a little slower” (for example, adjusting the speed of a conveyor belt based on the amount of product).
This is when we need “analog output”: the PLC outputs a continuously varying signal through an analog module (such as 0~10V voltage or 4~20mA current), and the inverter receives the signal and adjusts the motor speed proportionally (for example, 0V corresponds to 0 RPM, and 10V corresponds to 1500 RPM).
Core devices: PLC + Analog Output Module + Inverter
Taking the Mitsubishi FX3U series as an example, we need these three core components:
1. PLC main unit: for example, FX3U-40MT (responsible for logic operations and issuing commands);
2. Analog output module: for example, FX3U-2DA (2-channel output, supporting 0~10V voltage or 4~20mA current);
3. Inverter: for example, Mitsubishi FR-D740 (receives analog signals and controls motor speed).
The relationship among the three: PLC calculates the target speed → outputs the corresponding voltage/current through the 2DA module → inverter adjusts motor speed based on the signal.
Step 1: Understand the “relationship between speed and analog signal”
The speed of the inverter and the analog signal are in a “direct proportional relationship”. For example, we set:
The maximum speed of the inverter = 1500 RPM (rated speed of the motor);
The corresponding range of analog signal output from the PLC = 0~10V (voltage type).
Then:
0V → 0 RPM (motor stopped);
5V → 750 RPM (half speed);
10V → 1500 RPM (full speed).
Conversion formula: Output voltage (V) = (Target speed ÷ Maximum speed) × 10V
For example, to make the motor run at 900 RPM, the output voltage needed = (900 ÷ 1500) × 10 = 6V.
Step 2: Wiring—Connect the module, inverter, and motor
Wiring is fundamental; if you make a mistake, there may be no signal. Follow the steps below to connect:
1. Connection between PLC main unit and 2DA module
The “left interface” of the 2DA module is plugged into the “right expansion port” of the PLC main unit (align the guide rail on the module, push firmly, and secure with screws);
The module needs power: connect the PLC’s “24V+” to the module’s “DC24V” and “0V” to the module’s “GND” (to power the module).
2. Connection between 2DA module and inverter
Assuming we use “Channel 1” of the 2DA module to output 0~10V voltage, connect it to the inverter’s “analog input terminal”:
2DA module’s “V1+” (Channel 1 voltage output +) → connect to the inverter’s “1” terminal (voltage input +);
2DA module’s “V1-” (Channel 1 voltage output -) → connect to the inverter’s “2” terminal (voltage input -).
3. Connection between inverter and motor
The inverter’s “U, V, W” terminals → connect to the motor’s three-phase connection terminals;
The inverter’s “L, N” terminals → connect to AC220V power supply (to power the inverter).
Step 3: Set inverter parameters—make it “recognize” the analog signal
The inverter may not accept external analog signals by default, and parameters need to be set through the panel or software (taking FR-D740 as an example):
1. Pr.79 (Operation mode selection): set to “2” (external operation mode, controlled by external signals);
2. Pr.1 (Maximum frequency): set to “50Hz” (corresponding to the motor’s rated speed, such as 1500 RPM);
3. Pr.73 (Analog input selection): set to “0” (select 0~10V voltage input, matching the module output);
4. Press “SET” to save the parameters, and the inverter will restart to take effect.
Step 4: Set analog module parameters—tell the module “what signal to output”
Use GX Works2 software to set the parameters of the 2DA module, ensuring it outputs 0~10V voltage:
1. Open the software, create a new project, and select the correct PLC model (FX3U);
2. Click “Parameters” → “Extended Device Parameters” → “Analog Output Module”;
3. Select the module position (for example, the first module on the right side of the PLC, set the position to “1”);
4. Channel 1 settings: set “Output Type” to “Voltage” and “Voltage Range” to “0~10V”;
5. Click “OK” and download the parameters to the PLC (similar to downloading a program).
Step 5: Programming—make the PLC output the corresponding voltage (control speed)
The core idea: the PLC first calculates the “module output value” corresponding to the target speed, then sends it to the 2DA module using instructions. The steps are as follows:
1. Clarify the range of “module output value”
When the FX3U-2DA module outputs 0~10V, it corresponds to an internal “digital range”: 0~4000 (digital quantity) → corresponds to 0~10V (voltage).
That is: 10V=4000, 1V=400, 0.1V=40.
2. Calculate the “digital quantity corresponding to the target speed”
For example, target speed = 900 RPM, maximum speed = 1500 RPM:
First, calculate the ratio: 900 ÷ 1500 = 0.6;
The corresponding digital quantity = 0.6 × 4000 = 2400 (that is, when the module outputs 2400, it corresponds to 6V voltage, 900 RPM).
3. Use the TO instruction to send the digital quantity to the module
The function of the TO instruction is to “send the digital quantity from the PLC to the analog module“, format:
TO K module position K channel D register for storing digital quantity K1
For example, with “module position 1, channel 1, digital quantity stored in D10”, the instruction is:
“TO K1 K0 D10 K1“
(K1=module position, K0=channel 1, D10=register storing 2400)
Complete program example (controlling speed to 900 RPM)
1. Use MOV instruction to store the target digital quantity 2400 in D10: “MOV K2400 D10”;
2. Use TO instruction to send it to the module: “TO K1 K0 D10 K1”;
3. Let the program run continuously (for example, using M8000 normally open contact to drive these two instructions).
//Program description: Set target value through MOV instruction, TO instruction outputs to the analog module
LD M8000 ; Get PLC running signal (M8000 normally open)
MOV K2400 D10 ; Store 2400 (corresponding to 6V) in D10
TO K1 K0 D10 K1 ; Send D10 data to the module (position 1, channel 0)
END ; End of program
Advanced: Use buttons to adjust speed (0~1500 RPM adjustable)
If you want to manually adjust the speed using buttons (for example, X0 to increase speed, X1 to decrease speed), you can add “increase/decrease logic” in the program:
– Pressing X0 once increases D10 by 400 (corresponding to an increase of 1V, 150 RPM);
– Pressing X1 once decreases D10 by 400 (corresponding to a decrease of 1V, 150 RPM);
– Limit the range of D10: minimum 0 (0 RPM), maximum 4000 (1500 RPM).
//Program description: X0 increases speed, X1 decreases speed, limits D10 in the range of 0~4000, and finally outputs to the moduleLD M8002 ; Get PLC start initial pulseMOV K0 D10 ; Initialize D10 to 0 (initial speed 0 RPM)
//Increase speed logic (X0 pressed once, D10+400)LD X0 ;Get increase speed button signalPLS M0;M0 generates a single pulse (one press passes one scan cycle)LD M0 ; Get M0 pulseCMP D10 K3600 M10;Compare D10 with 3600 (determine whether to increase)LD M10 ; If D10 ≤ 3600 (M10 is on)ADD D10 K400 D10; D10=D10+400 (increase 1V corresponding to speed)//Decrease speed logic (X1 pressed once, D10-400)LD X1 ; Get decrease speed button signalPLS M20 ; M20 generates a single pulseLD M20 ; Get M20 pulseCMP D10 K400 M30; Compare D10 with 400 (determine whether it can decrease)LD M30 ; If D10 ≥ 400 (M30 is on)SUB D10 K400 D10 ; D10=D10-400 (decrease 1V corresponding to speed)//Limit D10 maximum value not to exceed 4000LD M8000 ; Always executeCMP D10 K4000 M50; Compare D10 with 4000LD M51 ; If D10>4000 (M51 is on)MOV K4000 D10 ; Force D10=4000//Limit D10 minimum value not lower than 0LD M8000 ; Always executeCMP D10 K0 M60 ; Compare D10 with 0LD M62 ; If D10<0 (M62 is on)MOV K0 D10 ; Force D10=0//Output to the analog moduleLD M8000; Always executeTO K1 K0 D10 K1 ; Send final D10 data to the module (position 1, channel 0)END ; End of program
Three pitfalls beginners must avoid
1. No output signal from the module? Check power supply and parameters
The module’s 24V power supply is not connected properly, which can lead to no output at all;
The module parameter is set to “current output” but is actually connected to a voltage line, which will output 0V.
2. Speed is uncontrollable? Check inverter parameters
If Pr.79 of the inverter is not set to “external mode,” it will only recognize panel control;
Analog input terminals are connected incorrectly (for example, if connected to terminals “4” or “5,” those are current input ports).
3. Speed fluctuates greatly? Add filtering or limit the rate of change
Analog signals are easily disturbed; you can add “output filtering” in the module parameters;
When adjusting with buttons, add a timer to ensure a 0.5-second interval between each increase or decrease to avoid rapid speed changes.
Summary: The process of outputting analog signals
1. Determine the “physical quantity (speed) and analog quantity (voltage) correspondence”;
2. Connect the wiring properly (PLC-module-inverter-motor);
3. Set parameters (inverter recognizes signals, module recognizes output type);
4. Program to calculate “digital quantity” and use TO instruction to send it to the module.
By mastering analog output, the PLC can upgrade from “switch control” to “stepless adjustment,” such as maintaining a temperature stable at 25℃±0.5℃ or controlling flow precisely to 1L/minute, all of which rely on the core logic of analog output.
What problems have you encountered while controlling inverters? Share your debugging experiences in the comments section~ Like + Follow 😉