Mitsubishi MELSEC - Instance & item setup
How to setup a Mitsubishi MELSEC instance and item in SIA
The Mitsubishi MELSEC Connector is compatible with the A, Q/L, iQ-R, iQ-F and FX series.
QnUCPU built in Ethernet
Please note that the QnUCPU built in Ethernet is currently unsupported. This can be substituted with an external Ethernet module
TCP/IP support only
This Connector supports only TCP/IP connections.
Parameters
When using the MELSEC Connector both the instance and item have specific parameters. These parameters are required as they are needed to establish connection and to identify which memory to read from.
Instance
The instance needs the following parameters to establish a connection to the PLC:
Parameter | Description | Value range | Default value |
---|---|---|---|
Name | Name for the PLC unit | Any combination of letters, numbers, and special characters. | - |
Address (instance default) | The IP address of the PLC | Dependent on the PLS's network settings. | - |
Mode | The transmission format of the command frame | Binary, ASCII | Binary |
Model | The target PLC model series. | Q/L series, iQ-R series, FX series | Q/L series |
Device Id |
The device Id number Unique values for devices on the same network |
0 to 64, 255 | 255 (direct connection ) |
Network Id |
The device network Id number Same value for all devices on the same network |
0 to 239 | 0 (direct connection ) |
Port | Dedicated Ethernet port for the communication | 1025 to 6553 | - |
Remote Password | Remote access PLC password | Any combination of letters, numbers, and special characters. | - |
Only one connection per port
Some Mitsubishi MELSEC PLCs only allows one peer to connect per port. If the port is already in use the connection will be declined and no reply received from the PLC
Item
The item parameters that is needed to read the tags in the PLC memory:
Parameter | Description |
---|---|
Address | Memory address of the tag in the MELSEC PLC. Check memory areas for more information of the various addressable areas |
Type | Data type used for determining the length of the tag in bytes and formatting it properly after a reading. Check data types for more information on each data type |
Data types
The following table shows how to address the various types of data. In the examples it uses a compound syntax formed by a letter, or a group of letters representing the memory area followed by a number representing the targeted memory location. The memory area from the addressing syntax examples can be replaced with any of the values given in memory areas table.
Data type | Addressing syntax | Valid values | Size |
---|---|---|---|
BIT | WA.3 | 0 or 1 | 1 bit |
Short | D201 | -32767 to 32767 | 1word |
Long | D278 | -2147483648 to 2147483647 | 2 words |
Word | D201 | 0 to 65535 | 1 word |
DWord | W322 | 0 to 4.294.967.295 | 2 words |
BCD | WF20 | 0 to 9999 | 1 word |
LBCD | D3226 | 0 to 99999999 | 2 words |
Float | W322 | 32 bit floating point in IEEE 754 format | 2 words |
Double | M322 | 64 bit floating point in IEEE 754 format | 4 words |
ASCII | W32 |
Bit values
The addressing syntax for a bit values is composed from 4 elements: the memory area symbol, the memory area number, a separation dot and the bit number. The legal values for the bit number range from 0 to 15. In the example in the table above,first cell of the second column, WA.3 means : W area, A (the tenth word, A = 10 in base 16, the base 16 is used since W area is a addressable using hexadecimal numbers for the area number), separation dot, the forth least significant bit
Memory areas
The most used memory areas are listed in the table below. The Symbol column represents the code letters needed to access a memory location.The Notation column specifies the format for the memory area number.
Area | Symbol | Notation | |
---|---|---|---|
Special relay | SM | Decimal | |
Special register | SD | Decimal | |
Input | X | Hexadecimal | |
Output | Y | Hexadecimal | |
Internal relay | M | Decimal | |
Latch relay | L | Decimal | |
Annunciator | F | Decimal | |
Edge relay | V | Decimal | |
Link relay | B | Hexadecimal | |
Data register | D | Decimal | |
Link register | W | Hexadecimal | |
Timer | Contact | TS | Decimal |
Coil | TC | Decimal | |
Current Value | TN | Decimal | |
Long timer * | Contact | LTS | Decimal |
Coil | LTC | Decimal | |
Current Value | LTN | Decimal | |
Retentive timer | Contact | STS | Decimal |
Coil | STC | Decimal | |
Current Value | STN | Decimal | |
Long retentive timer * | Contact | LSTS | Decimal |
Coil | LSTC | Decimal | |
Current Value | LSTN | Decimal | |
Counter | Contact | CS | Decimal |
Coil | CC | Decimal | |
Current Value | CN | Decimal | |
Long counter * | Contact | LCS | Decimal |
Coil | LCC | Decimal | |
Current Value | LCN | Decimal | |
Index register | Index register | Z | Decimal |
Long index register * | LZ | Decimal | |
File register * | Block switching method | R | Decimal |
Serial number access method | ZR | Hexadecimal | |
Link special relay | SB | Hexadecimal | |
Link special register | SW | Hexadecimal | |
Direct access input | DX | Hexadecimal | |
Direct access output | DY | Hexadecimal |
Item Address examples
The second word of the D area can be accessed by inserting into the Address field belonging to Item the memory area symbol followed by the number of the memory area: D2 or D02 or D002.
The 15'th memory unit of the area M is accessed as MF, and the 15'th memory unit of the area D is accessed as D15.