How to Create Function Blocks in Mitsubishi PLC GX Works2

The steps to create function blocks in Mitsubishi PLC GX Works2 are as follows:

Create a New Project

  1. Open GX Works2, select “Project” → “New Project”.
  2. Check “Use Tags” in the project type, and select the PLC model (e.g., FX3G/FX3U).

Create FB Block

  1. In the left navigation bar under “Program Components”, find “FB Management”, right-click and select “New Data”.
  2. Enter the FB block name (e.g., “Motor Control”), confirm, and enter the editing interface.

Edit Local Tags

  • Define input (INPUT) and output (OUTPUT) variables within the FB block, for example:
    • Input: Start Signal (M1), Stop Signal (M2)
    • Output: Motor Control Signal (Y0)

Write Ladder Logic

  • Use ladder logic programming to implement functionality (e.g., motor self-locking control).
  • Press F4 to compile and save.

Export/Import FB Library

  • Export: Save the FB block via “Project” → “Library Operations” → “Save Library File As”.
  • Import: In a new project, add the library file via “Project” → “Library Operations” → “Get Library in Project”.

Call FB Block

  • Drag the FB block into the programming interface in the main program, and connect the input and output signals to use it.

How to create function blocks in Mitsubishi PLC GX WORKS2. First, create a function, select simple project for project type, and choose ladder logic for programming language;

How to Create Function Blocks in Mitsubishi PLC GX Works2

In the motor navigation interface, FB management, select new data;

How to Create Function Blocks in Mitsubishi PLC GX Works2

Name the newly created FB, for example, “Start-Stop”;

How to Create Function Blocks in Mitsubishi PLC GX Works2

Set local tags for the FB, including class, tag name, and data type;

How to Create Function Blocks in Mitsubishi PLC GX Works2

Write the function block program;

How to Create Function Blocks in Mitsubishi PLC GX Works2

Select “Convert All” and compile

How to Create Function Blocks in Mitsubishi PLC GX Works2

Check for compilation errors

How to Create Function Blocks in Mitsubishi PLC GX Works2

Drag the project block program into the main program;

How to Create Function Blocks in Mitsubishi PLC GX Works2

Continue adding soft components programming within the function block program.

How to Create Function Blocks in Mitsubishi PLC GX Works2

Leave a Comment