FX5U: Beginner’s Guide to Mitsubishi PLC and Practical Modbus Communication

FX5U: Beginner’s Guide to Mitsubishi PLC and Practical Modbus Communication

Imagine you have just taken over an automation renovation project, with five frequency converters standing like silent soldiers waiting for orders. An operator points to the flashing screen in the control room and asks, “Can the data from these devices be displayed in real-time?” Don’t panic! Today, we will build a Modbus communication bridge using the Mitsubishi FX5U PLC, allowing these mute devices to start talking.

1. Understanding the “Common Language” of Industrial Devices

Modbus Protocol is like the universal language in a factory, allowing devices from different brands to communicate with each other. The FX5U comes with an RS485 port, a small blue interface that can connect up to 32 devices simultaneously, making it a cost-effective solution.

Try this basic wiring:

1 PLC's SDA connects to the frequency converter's RDA
2 PLC's SDB connects to the frequency converter's RDB
3 Don't forget to solder terminal resistors on all devices!

Tip: Incorrect wiring is one of the main culprits for communication failure. It is recommended to use a multimeter for continuity testing before powering on.

2. Installing a Translation Chip on the PLC

Configuring the communication module in GX Works3 is like setting up a mobile network:

  1. Right-click on the navigation bar and select “Module Parameters”
  2. Set the baud rate to 9600 (recommended speed for beginners)
  3. Check the “Modbus RTU” protocol checkbox

This configuration process is like installing a language pack on the PLC, now it can understand the “dialect” of the frequency converter. Have you ever encountered parameters that you couldn’t understand? Try keeping the default values; most basic communications do not require those advanced settings.

3. Writing Your First Communication Command

Let’s write a data reading program using structured text:

 1 VAR
 2    uCtrl : UNITTYPE_MBMaster;
 3 END_VAR
 4
 5 uCtrl( 
 6    execute:=TRUE,
 7    slaveAdr:=1,
 8    funcCode:=16#03,
 9    devAdr:=16#0064,
10    devNum:=2,
11    dataAdr:=D100 
12 );

This code is like sending a courier to pick up two packages (devNum:=2) from warehouse number 100 (devAdr:=16#0064) at device number 1 (slaveAdr:=1) and storing them in the local warehouse D100 (dataAdr:=D100).

4. What to Do When Communication Fails

Encountering garbled data? Let’s play a game of spot the difference:

  1. Check if the baud rate is consistent across all devices
  2. Ensure that the station numbers are not duplicated
  3. Check the data address offset (many device manuals start counting from 40001, but you should fill in 0x0000)

During debugging, you can first execute the communication command in debug mode, which is like a phone test—first ensure you can communicate with a single device before trying a group chat.

Practical Tasks:

  1. Use MODBUS to read the operating frequency of the frequency converter
  2. Try writing a set value to the temperature controller
  3. Capture data from the D100 register and display it on the touchscreen

If you encounter a communication timeout, don’t smash your keyboard; it’s likely due to loose wiring or incorrect station numbers. Remember, industrial communication debugging is like dating; it requires patience and accurate communication skills. Are you ready to transform your FX5U into a data conductor?

Leave a Comment