Mitsubishi Driver

We are excited to announce the availability of our Mitsubishi driver that will be included in the 8.1.28 release and is currently available in the 8.1 nightly release.

Mitsubishi TCP Driver

The Mitsubishi TCP driver provides a user interface in the Gateway to designate mapped addresses when connected to devices that support the MELSEC protocol. After setup, configured tags will be browsable in the OPC Browser of the Designer with read and write (where applicable) access. Supported Hardware Series include:

  • iQ-R
  • iQ-F
  • Q
  • L

Connect to Mitsubishi devices

Before you can connect your Mitsubishi device to this driver, make sure your programmed device settings meet the driver requirements. Detailed setting requirements are included in the GX Works Configuration section.

  1. Navigate to Config > OPC UA > Device Connections on the Gateway Webpage.
  2. On the Devices page, click on Create new Device.
  3. Select Mitsubishi TCP, and click Next.
  4. Fill in the Name field. Entering a description is optional.
  5. Select the MELSEC series you will be connecting to using the dropdown. Options include iQR, iQF, Q, and L.
  6. Enter the device hostname in the Hostname field.
  7. Enter the device port in the Port field.
  8. Enter the local address of the network adapter to connect from. This is necessary if you have multiple network cards and you need to specify the particular network card that has PLC access.
  9. Leave the default values in the remaining fields.
  10. Click Create New Device.

The Devices page now displays the Mitsubishi TCP device is successfully connected. If an Idle state is noted, your Mitsubishi device is likely not configured in a manner that allows multiple connections on the port you have selected.

Device Settings

General Description
Name Device name
Description Device description
Enabled If true, attempt connection to the device, default is true
Main Description
Series The series of the Mitsubishi device. Default is iQR
Hostname The IP Address of the device
Port The port the device is listening on
Local Address Address of network adapter to connect from
Timeout The request timeout, specified in milliseconds with a valid range from 0 to 16383750. Default is 5000
Request Optimization Description
Max Gap Size The maximum address “gap” to span when optimizing requests to contiguous address locations. Increasing the max gap size will reduce the number requests but increase the amount of data requested. Default is 0.
Write Priority Ratio The number of write requests to execute for every read request when an abundance of both types are queued up for execution. Default is 5.

Addressing

You can add addresses by entering the Browse Path and Address information individually (via the device address page, or directly in the Tag Editor in the Designer using a valid opcItemPath) or importing a CSV file containing a list of addresses to upload at once. The addresses page is setup to read three areas of address information to generate an Ignition OPC address:

  • Browse Path: This will be the location represented in Ignition's OPC UA Browser. The last item should be the node itself, but nested folder structures separated by / are supported. e.g. A browse path of M/M0 will result in the following:
    QLU
  • Address: This is the device, offset, and additional specifications to find desired values.
  • Description: This is an optional field to help in identifying displayed values.

To access the addresses page on the Gateway:

  1. Go to the Config > OPC UA > Device Connections.
  2. Click the More dropdown and choose addresses on your Mitsubishi device.

Adding Individual Address Rows

Even if you are planning to import multiple addresses using a CSV file, it’s recommended to first enter a single tag address to test if your connection is working as expected.

To enter addresses:

  1. Click Add Row to populate rows for address information.
  2. Enter Browse Path field and Address field information. Enter Description information as desired.
    Note: All components are case-insensitive.
  3. Continue adding rows and address information until you’ve added all the addresses you want to be available as tags.
  4. Click Save Configuration when you are finished.

Importing and Exporting

To Import a CSV file:

  1. Select Load Configuration File on the device address page.
  2. Select Choose File.
  3. Locate the CSV file you want to upload and select it to open.
    Note: A comma separates column information. If your Description column includes commas, use quotes to prevent misinterpretations when uploading.
  4. Select the Append to current configuration box if you already have addresses listed and you want to add on to them. Leave unchecked if you want to replace existing rows.
  5. Click Load.
    Note: If an existing address shares a browse path with an address imported by the CSV file, it will be replaced with the imported address.
  6. Click Save Configuration.
    Click the Export Configuration icon to download the existing address rows as a CSV file.

Determining Addresses

The Mitsubishi driver requires Area and Offset address components, but also allows many optional specifications. It’s important to know where the optional components must be placed in your address to properly connect. The example syntax below shows how optional data type (including modifiers) and array specifiers are listed before the Offset specification and the optional array element index and bit index must be listed after the Offset specification.

Note: This page uses the term Area to describe the address component that identifies the PLC device to eliminate confusion with other sections of this page, such as the Device Settings which applies to the Ignition Mitsubishi driver.

Example syntax, where optional components are included in curly brackets
Area{<DataType{[array]}>}Offset{.Bit}

Areas (Devices)

The following table shows the device keyword recognized by the driver as well as the native type of each device. Extended Data Registers and Extended Link Registers are currently not supported.

Area Name Area Area Native Type
Special relay SM Bit
Special register SD Word
Input X Bit
Output Y Bit
Internal relay M Bit
Latch relay L Bit
Annunciator F Bit
Edge relay² V Bit
Link relay B Bit
Step relay S Bit
Data register D Word
Link register W Word
Timer Contact TS Bit
Timer Coil TC Bit
Timer Current value TN Word
Long timer¹ ² Contact LTS Bit
Long timer¹ ² Coil LTC Bit
Long timer¹ ² Current value LTN Double Word
Retentive timer Contact STS Bit
Retentive timer Coil STC Bit
Retentive timer Current value STN Word
Long retentive timer¹ ² Contact LSTS Bit
Long retentive timer¹ ² Coil LSTC Bit
Long retentive timer¹ ² Current value LSTN Double Word
Counter Counter Contact CS Bit
Counter Coil CC Bit
Counter Current value CN Word
Long counterÂą Contact LCS Bit
Long counterÂą Coil LCC Bit
Long counterÂą Current value LCN Double Word
Link special relay SB Bit
Link special register SW Word
Direct access input² DX Bit
Direct access output² DY Bit
Index register Index register Z Word
Long index registerÂą LZ Double Word
File register Block switching method R Word
Serial number access method ZR Word
Refresh data register¹ ² RD Word

Âą Not available for Q/L series
² Not available for iQ-F series

Data Types

The Mitsubishi driver supports reading/writing data types larger than the area’s native type by combining bytes from adjacent offsets into a single value. For example, each Data Register (D) point is natively a word (16-bit), but reading D0 requests bytes for D0 and D1 and combines the bytes into a signed 32-bit value.

The Mitsubishi driver does not support reading/writing data types smaller than the area’s native type. For example, each Long Index Register (LZ) point is a double word (32-bit) which means LZ0 and LZ0 cannot be specified.

Some areas in particular cannot be combined and specific data types corresponding to its native type must be specified:

  • Any area having a native type of Bit
  • Any area having to do with Current value, such as:
  • TN
  • LTN
  • STN
  • LSTN
  • CN
  • LCN

String Request Considerations

When specifying a string data type, the length of the string must also be specified on the address. For example, D<string10>0 requests a string of up to 10 characters at offset 0 in the data register device.

  • If the length of the string is less than the address string length, it will be padded with null characters. For example, writing hello to D<string10> is equivalent to writing hello\0\0\0\0\0 where \0 are null characters.
  • If the length of the string is more than the address string length, it will be truncated to the address string length. For example, writing hello world! to D<string10> is equivalent to writing hello worl.

For the Q/L series, the string length will be automatically rounded up to the nearest even value. This is because two characters are stored inside a word. For example, D<string9>0 will be treated as D<string10>0.

Offsets

Depending on the PLC series and area, offsets can be specified in octal, decimal, or hexadecimal. In the case of octal offsets, if an unsupported offset is specified an Error_Configuration error will be returned.

iQ-R iQ-F Q L
X Hex Octal Hex Hex
DX Hex N/A Hex Hex
Y Hex Octal Hex Hex
DY Hex N/A Hex Hex
B Hex Hex Hex Hex
SB Hex Hex Hex Hex
W Hex Hex Hex Hex
SW Hex Hex Hex Hex

Hexadecimal offsets are supported using traditional hexadecimal notation (0-F) for the offset. If specifying bit notation, the offset is traditional hexadecimal notation, but the bit designation is decimal (0-15).

Examples:

  • Y0F: Area Y at offset F
  • SW0A.15: Area SW at offset A, bit F

Optional Data Types

The following data types are recognized by the driver:

Bool Int16 Int32 Int64 UInt16
UInt16 UInt64 Float Double String

If the data type is omitted, a default data type will be used depending on the area’s native type:

Area Native Type Default Data Type
Bit bool
Word int16
Double word int32

Optional Data Type Modifiers

Attribute Order
@BE Big Endian Byte Order
@LE Little Endian Byte Order (default when not specified)
@HL High-Low Word Order (default when not specified)
@LH Low-High Word Order

Optional Arrays

Arrays represent a contiguous range of addresses starting from an offset. For example, instead of reading D<int16>0 through D<int16>8, you can create an array of the same values. The number of elements in an array are determined by multiplying the array dimensions. So reading D<int16[3, 3]>0 is equivalent to reading 9 elements with the start offset is 0 and the last offset is 8.

Similarly, reading an element within an array is equivalent to reading a single address. For example, D<int16[3, 3]>0[1][2] is equivalent to reading D<int16>5.

D[0][0] = D0 D[0][1] = D1 D[0][2] = D2
D[1][0] = D3 D[1][1] = D4 D[1][2] = D5
D[2][0] = D6 D[2][1] = D7 D[2][2] = D8

Large arrays should be used with caution. If an array read/write request is too large to fit into a single request, it will be broken up into multiple non-atomic sequential requests. Splitting requests when writing can result in the first send of the write requests creating new values and the remaining write requests failing. Similarly, if read requests are sent separately the resulting array may contain stale points.

Optional Bit Index

A decimal bit index can be specified on any integer data type to retrieve a boolean value at some bit position. Addresses with a bit index are read-only and any attempts to write to them will result in a Bad_NotSupported error due to the MELSEC protocol not supporting atomic writes to bits within an underlying data type.

A simple example of reading a bit would be D0.0, which reads the bit0 of int16 at offset 0. You can also read bits within array elements that represent scalar values following the same addressing format. To read the bit 0 of element 0 of an array of length 4 at offset 0 would be D<int16[4]>0[0].0

A bit index cannot be specified for the following:

  • Non-integer data types (bool, float, double, and string)
  • Non-scalar addresses (arrays)

GX Works Configuration

GX Works is the programming software designed for Mitsubishi PLCs. Before you can use the Mitsubishi driver, some configurations need to be made in GX Works when connecting to MELSEC-Q/L, iQ-F and iQ-R series devices with the Mitsubishi driver. These instructions are written for GX Works3. GX Works2 has slightly different settings but should in general resemble the following setting requirements.

  1. Under the navigation tab, locate Parameter > CPU > Module Parameter > Basic Settings > Own Node Settings.
  2. Set Enable/Disable Online Change to Enable All (SLMP).
  3. Set Communication Data Code to Binary.
  4. Navigate to External Device Configuration > Detailed Setting to add an SLMP Connection Module to the Ethernet Configuration with Protocol set to TCP.
  5. Make sure to also identify the IP Address and Port No. These settings are what will be used for the Mitsubishi TCP driver Hostname and Port connection fields.
    Note: If multiple connections to the PLC are required, multiple SLMP Connection Modules will need to be defined.
  6. Write all changes to the PLC (Online > Write to PLC) and initiate a power cycle.

Configuring Device Points

Some areas or offsets within an area may not be accessible by default unless additional memory is allocated.

  1. Navigate to Parameter > CPU > CPU Parameter > Memory Device Setting > Device/Label Memory Area Setting > Detailed Setting.
  2. Change Points to desired size. The point allocation from all areas must not exceed the Total Device size.
  3. Click Apply.
  4. Write to the PLC (Online > Write to PLC) and initiate a power cycle.

Using GX Works3 to Troubleshoot

If you have access to GX Works3, you can use the Device/Buffer Memory Batch Monitor feature to test or troubleshoot your connection. This can be found under Online > Monitor > Device/Buffer Memory Batch Monitor. Type in the device keyword with an offset and hit enter to begin monitoring values.

GX Works also has an Ethernet Diagnostics tool which is useful for determining the status of the connection as well as other information like IP Address, Port No, and Latest Error Code. To access this tool, navigate to Diagnostics > Ethernet Diagnostics.

16 Likes

This is great news and perfect timing. We are planning to implement a huge cell assembly line for our gigafactory and all of the machine's will be running Mitsubishi PLCs. If I can eliminate the need for kepware, that would be amazing.

1 Like

I am trying to connect R series PLC. But the connection status showing as Idle. I don’t know what is the issue. Please guide me.

@Baskar_Arumugam,
This is something we have recently noticed and will be fixing in an upcoming release. What is occurring is the driver doesn't have anything to subscribe to, so it is lazily connecting to the device itself (and therefore it is in an Idle state). If you create an OPC tag in Ignition, it will connect to the device.

We have also found that just saving the device a second time will also take it out of an Idle state if you don't want to create any tags. Any save at this point will flip flop the state between Connected and Idle though.

Garth

Updating this thread to note that as of 8.1.31 Ignition will support the FX3U hardware series via the FX3U-ENET module.

8.1.31 also adds support for a new Wstring data type which is an analog for the String [Unicode] data type that is present in GX Works.

4 Likes

hi,
Please help me out in how to define the tags in ignition from Mitsubishi Fx3u enet.

Data Type Constant Device Address
INT D2 %MW0.2
BOOL D222.0 %MX0.222.0
ARRAY [0..7] OF INT D600 %MW0.600

I think this is what you would be looking for:

By default the D Area is assumed to be a integer, and by specifying the .0 notation Ignition will automatically interpret the address as a Boolean.

The only one that should need explicit datatype handling is the array.

When importing from via the OPC Browser the tags look like the following:

Garth

1 Like

Thank you for the support, it’s working. Great work :+1:

hi,
Can please help me in how to get the value for float value same as how we got it for string.

It's tough to say without knowing the data on your PLC, but you're probably looking for an address similar to: D<Float>0 replacing 'D' with the area you want to read from and replacing '0' with the correct offset. This will read 4 bytes from the PLC to make a 32 bit floating point value. If you're looking for a 64 bit floating point value, use 'Double' instead of 'Float'.

Hope this helps!

This information really help us to connect Mitsubishi Q series CPU to ignition directly.

1 Like