---
title: Mitsubishi iQ-F Serial (FX5U)
slug: litmusedge/quickstart-guide/industrial-systems-connection-guide/mitsubishi/mitsubishi-iq-f-serial-fx5u
description: Review the following information for setting up and configuring the Mitsubishi iQ-F Serial (FX5U) driver.
docTags: 
createdAt: 2022-05-26T20:56:06.000Z
---

Review the following information for setting up and configuring the Mitsubishi iQ-F Serial (FX5U) driver. The driver uses the MELSEC Communication (MC) protocol (3C frame, format 1, ASCII with sum check) over RS-232 or RS-485. It connects through the built-in RS-485 port or an FX5-232-BD or FX5-485-ADP adapter.

This driver was previously named Mitsubishi FX5U Serial.

:::hint{type="info"}
**Note:** This driver is experimental. Some features might not work as expected.
:::

# Litmus Edge compatible series

| Compatibility parameter      | Compatible items                                                                                                 |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Driver type**              | Serial (RS-232 or RS-485)                                                                                        |
| **Validated devices/series** | [MELSEC iQ-F](https://www.mitsubishielectric.com/fa/products/cnt/plcf/items/index.html):<br />FX5U, FX5UC, FX5UJ |

To set up and configure this device in Litmus Edge (LE), do the following:

- Step 1: Set up and configure the PLC device
- Step 2: Set up the PLC device in Litmus Edge DeviceHub
- Step 3: Configure the list of registers

# Step 1: Set up and configure the PLC device

Record the serial communication parameters for the device. Otherwise, follow the steps below.

**To configure your device:**

1. Note down the following information and refer to it when needed.
   - **Device**: Mitsubishi FX5U-32M
   - **Communication I/F**: RS485. Refer to the following figures.

     ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/U58spZmOnhdKtSHmuUYF__mitsubishi-fx5u-gx-reference.png" size="80" width="874" height="848" position="flex-start" caption="Reference image of device" darkWidth="874" darkHeight="848" showCaption="true"}
2. Launch the GX Works3 V1.035M software, and then click **Online** > **Read from PLC**.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/IAfpmxbpAyighIJKb6qqs_mitsubishi-fx5u-gx-online-read482x338.png" size="80" width="482" height="338" position="flex-start" caption="Read from PLC option" darkWidth="482" darkHeight="338" showCaption="true"}
3. Select the series.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/i370u2PB5LmGW37CBt_ZN_mitsubishi-fx5u-serial-series.png" size="80" width="745" height="401" position="flex-start" caption="Series selection drop-down list" darkWidth="745" darkHeight="401" showCaption="true"}
4. Select the connection destination.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/2TkGj96zd91C12dOJU4_2_mitsubishi-fx5u-serial-connection.png" size="80" width="825" height="467" position="flex-start" caption="Select Connection Destination dialog box" darkWidth="825" darkHeight="467" showCaption="true"}
5. In the navigation panel, go to **Parameter** > **FX5UCPU** > **Module Parameter** > **485 Serial Port**. For an FX5-232-BD or FX5-485-ADP adapter, use the page for its channel.
6. Set the following parameters:
   - **Communication Protocol Type**: **MC Protocol**
   - **Message Pattern**: **Pattern 1 (X,Y OCT)**
   - **Sum Check**: **Added**
   - **Data Format**: 8 data bits, no parity, and 1 stop bit
   - **Baud Rate**: `19200`, or another rate that matches Step 2
   - **Station No.**: A value from `0` to `15`
7. Write the parameters to the PLC, and then power-cycle the CPU.

The driver connects to one PLC for each serial port. Multidrop is not supported.

# Step 2: Set up the PLC device in Litmus Edge DeviceHub

Configure the following parameters when you [Connect a Device](docId\:pF5pwEP7Ata1NC7c0yQu_) with this driver. Update default values to the specific setup of your device.

| Parameter      | Value                                                                                                                              |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Type**       | Mitsubishi                                                                                                                         |
| **Driver**     | Mitsubishi iQ-F Serial (FX5U)                                                                                                      |
| **DeviceFile** | The serial port path used to communicate with the device, for example `/dev/ttyS1` or `/dev/ttyUSB0`. Default value `/dev/ttyUSB0` |
| **BaudRate**   | Must match the baud rate configured on the device. Select a value from `1200` to `921600`. Default value `19200`                   |
| **DataBits**   | 5, 6, 7, or 8. Must match the device. Default value `8`                                                                            |
| **Parity**     | None, Odd, or Even. Must match the device. Default value `None`                                                                    |
| **StopBits**   | 1, 1.5, or 2. Must match the device. Default value `1`                                                                             |
| **StationId**  | The station number of the PLC. Must match **Station No.** on the PLC. Enter a value from `0` to `31`. Default value `0`            |

The following parameters are under **Advanced Parameters**.

| Parameter               | Value                                                                                                               |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **ReadTimeout**         | How long the driver waits for a response, in milliseconds. Enter a value from `10` to `10000`. Default value `2000` |
| **RetryCount**          | The number of times a failed request is retried. Enter a value from `0` to `5`. Default value `0`                   |
| **PauseBetweenRetries** | The pause between retries, in milliseconds. Enter a value from `0` to `2000`. Default value `0`                     |

The driver reads up to 128 words in one request. Below 4800 baud, a full request takes longer than the default **ReadTimeout**, so increase **ReadTimeout** on slow links. For example, a full request takes about 2.3 seconds at 2400 baud and 4.7 seconds at 1200 baud.

For the **Meta Data**, **Status Register**, and **Optional Settings** options, see [Connect a Device](docId\:pF5pwEP7Ata1NC7c0yQu_). By default, the status register is `D`, value type `word`, address `0`.

# Step 3: Configure the list of registers

When you [Add a Tag](docId:89nruY50cZN0cPLIOmVdl) to the connected device, see the following register table and tag parameters. This driver does not support browsing tags.

See the following additional resources if necessary:

- [Organize Device and Tag Data by Using Metadata](docId\:gSM6iJPWjd0cCxWq2Qre2)
- [Tag Formula Variables](docId\:Xj0OqYONxM2BEhMwqkDWC)

## Register table

All addresses start at `0`. Enter addresses the way GX Works3 displays them:

- `X` and `Y`: octal (`O` in the address format).
- `B`, `SB`, `W`, `SW`, `W_bit`, and `SW_bit`: hexadecimal (`H` in the address format).
- All other registers: decimal.

For `_bit` registers, the address is the word number followed by the bit number, from `00` to `15`. For example, `D_bit` address `12503` is bit 3 of `D125`.

| **Name** | **Value Types**                     | **Access Type** | **Address Format** | **Min Address** | **Max Address** | **Description**               |
| -------- | ----------------------------------- | --------------- | ------------------ | --------------- | --------------- | ----------------------------- |
| SM       | bit                                 | R/W             | DDDD               | 0               | 9999            | Special relay                 |
| X        | bit                                 | R/O             | OOOO               | 0               | 1023            | Input relay                   |
| Y        | bit                                 | R/W             | OOOO               | 0               | 1023            | Output relay                  |
| M        | bit                                 | R/W             | DDDDD              | 0               | 32767           | Internal relay                |
| L        | bit                                 | R/W             | DDDDD              | 0               | 32767           | Latch relay                   |
| F        | bit                                 | R/W             | DDDDD              | 0               | 32767           | Annunciator                   |
| B        | bit                                 | R/W             | HHHH               | 0               | 32767           | Link relay                    |
| SB       | bit                                 | R/W             | HHHH               | 0               | 32767           | Special link relay            |
| S        | bit                                 | R/W             | DDDD               | 0               | 4095            | Step relay                    |
| TS       | bit                                 | R/W             | DDDD               | 0               | 1023            | Timer contact                 |
| TC       | bit                                 | R/W             | DDDD               | 0               | 1023            | Timer coil                    |
| SS       | bit                                 | R/W             | DDDD               | 0               | 1023            | Retentive timer contact       |
| SC       | bit                                 | R/W             | DDDD               | 0               | 1023            | Retentive timer coil          |
| CS       | bit                                 | R/W             | DDDD               | 0               | 1023            | Counter contact               |
| CC       | bit                                 | R/W             | DDDD               | 0               | 1023            | Counter coil                  |
| D        | word, dword, int, dint, real, dreal | R/W             | DDDD               | 0               | 7999            | Data register                 |
| D\_bit   | bit                                 | R/W             | DDDDdd             | 0               | 799915          | Data register bit             |
| SD       | word, dword, int, dint, real, dreal | R/W             | DDDDD              | 0               | 11999           | Special register              |
| SD\_bit  | bit                                 | R/W             | DDDDDdd            | 0               | 1199915         | Special register bit          |
| R        | word, dword, int, dint, real, dreal | R/W             | DDDDD              | 0               | 32767           | File register                 |
| R\_bit   | bit                                 | R/W             | DDDDDdd            | 0               | 3276715         | File register bit             |
| W        | word, dword, int, dint, real, dreal | R/W             | HHHH               | 0               | 32767           | Link register                 |
| W\_bit   | bit                                 | R/W             | HHHHh              | 0               | 3276715         | Link register bit             |
| SW       | word, dword, int, dint, real, dreal | R/W             | HHHH               | 0               | 32767           | Special link register         |
| SW\_bit  | bit                                 | R/W             | HHHHh              | 0               | 3276715         | Special link register bit     |
| TN       | word, dword, int, dint              | R/W             | DDDD               | 0               | 1023            | Timer current value           |
| SN       | word, dword, int, dint              | R/W             | DDDD               | 0               | 1023            | Retentive timer current value |
| CN       | word, dword, int, dint              | R/W             | DDDD               | 0               | 1023            | Counter current value         |
| Z        | word, int                           | R/W             | DD                 | 0               | 19              | Index register                |
| LZ       | dword, dint                         | R/W             | D                  | 0               | 1               | Long index register (32-bit)  |

## Tag parameters

- **Name**: Select a register name from the drop-down list. The available options depend on the names in the register table.
- **Value Type**: Select a data type from the drop-down list. The available options depend on the register name selected.
- **Address**: Enter the register address in the format shown in the register table, within the min and max range. Omit leading zeros. For `_bit` registers, add the bit number at the end.
- **PollingInterval**: Enter how often the tag polls for data, in seconds. Enter `0` to disable polling. Default value `1`
- **Tag Name**: Enter a name for the tag.
- **Description** (Optional): Enter a description for the tag.
- **Tag Formula**: Enter a formula for the tag to process the generated data. You can use two variables: `value` (current tag value) and `timestamp` (current tag UNIX time in milliseconds). The following math functions are available:
  - sin
  - cos
  - sqrt
  - tan
  - power: power(`x`) performs the operation `10^x`.
  - log: log(`x`) is the natural logarithm (the logarithm is in base `e`).
  - exp: exp(`x`) performs the operation `e^x`.
- **Only Publish on Change of Value**: Select the checkbox to publish NATS messages only when the *value* parameter changes. *Change of Value* only applies to boolean, numeric (such as int or float), and simple string data types. It does not apply to complex types, such as JSON or array. Poll-once topics are not affected by *Change of Value* settings, and still receive a single message.
- **Meta Data**: Define key-value pairs to add to the device output payload.

:::hint{type="info"}
**Note:** If you use special characters in metadata key names, the special characters are replaced with underscore characters in the payload. This can cause two key names to be combined into one. For example, configuring the key names a\*\*b and a&\&b creates only one key name (a\_\_b).
:::

