PmMelsecFXS - Driver for communication with Mitsubishi PLC devices of FX series

This driver is used for communication with Mitsubishi PLCs of the FX series, via the programming port. See also Communication with Mitsubishi PLC devices.
For devices of the FX family with Ethernet port another driver must be used: PmMelsecQA. For example in following cases:
- For devices with integrated Ethernet port (e.g. FX3GE) the PmMelsecQA driver must be used. It must be configured as Protocol format = "A1E/BIN = A series Ethernet Binary (for A1SJ71E71 Ethernet interface module)".
- The PLC can be equiped with another communication module, for example the FX2N-232(485,422)-BD expansion board. This communication driver can also be used with these boards, but the boards also support higher network protocol, that is better to use with the PmMelsecQA driver.
Before using this driver in the PROMOTIC application it is highly recommended to read the chapter: Communication using the PROMOTIC drivers.
Basic properties of the driver:
- Usage of this driver requires purchase of the license: PmMelsec. With the freeware version PmFree, or when developing the application (with development environment for tersting purposes), this component is always functional.
- The communication is done via Ethernet or via the computer's serial port (COM1, COM2 ...).

Communication via Ethernet: This option can be selected, for example, if the device is equipped with the serial link and it is connected to the Ethernet through the RS232/Ethernet converter. If the converter does no modifications to the transmitted data, then it is a very easy way how to communicate via Ethernet with devices not equipped with Ethernet interface.

- The driver uses ASCII coding of the protocol (does not use Binary coding).
- The driver is incorporated into the PROMOTIC system by means of the PmComm object.

The driver supports the usage of both PmCommMsg and PmCommData objects. For common data transfers, it is easier to use the PmCommData object.

The PROMOTIC application is the MASTER (i.e. it initiates the data transfer) from this communication point of view.

- This is a point-to-point communication type, i.e. one PmComm object can communicate only with one device (the protocol does not support multiple device adressing).
- For easy integration of this driver into the application it is handy to use: Preconfigurations in group "Mitsubishi PLC"
Programming connector (MINI-DIN) is equipped with the RS422 interface connected as follows:
3GND (Not connected)
5+5V (Not connected)
6Not connected
8Not connected
The driver can transmit the following data areas (in the PLC documentation, these areas are called devices):
Device Description
X Physical Input.
Y Physical Output, coil.
S State Relay.
M Auxiliary Relay.
T Timer/contact.
C Counter/contact.
D Data register.
- The data of the X,Y,S,M,T,C type are bit values, one address represents one bit value. During the transfer, it is also possible to transmit multiple values simultaneously - for example in one byte, 8 individual bit values can be transmitted.
- The data of the D type are 16-bitové values (range 0-65535).
The addressing of this data is different when using the PmCommData or PmCommMsg object.
In the PmCommData object, the logical addressing is used - the address of the item is the value commonly used by the PLC programmer (e.g. M20).
in the PmCommMsg object, the physical addressing is used - the address of the item is defined by the addres in memory and therefore it is necessary to deduce it according to the following table.

Recommended parameters values:

Recommended values for the Serial link parameters (according to the documentation CPU version V1.21):
Baud rate9600 Bd
Number of data bits7
ParityEVEN or NO
Number of stop bits1
Timeout between receiving 2 chars60
Description and recommended values for the Protocol parameters:
Response receipt timeoutOnly for serial link. The recommended value is for example 2000 ms. The time (in milliseconds) the driver is waiting for the response on sending the message. If no response comes during this time, then the transfer of the message is terminated (onEndOfTransfer event fires with error 24 or 66).
Protocol version
General (all FX-series) - Protocol for all types of PLCs
Extended (FX2N) - The PLC since the FX2N series has a bigger Device area than the previous series. The extended protocol can address this extended area.

The communication description by the PmCommData objects

The PmCommData objects can be used for this driver. For usual data transmissions it is more favourable than using the PmCommMsg object.

The variables in the PmCommData object (or even better the variables in the PmData object with ExtComm data extension) can be of arbitrary number, type and order. The driver uses optimalised internal communication messages for reading the data from the device.

All variables are read (if the Data refresh enabled configurator is checked). When writing to the variable, only the single value is sent (if the Auto send when writing to item configurator is checked).

Description of the ItemID configurator:

ItemId is the text identifier of the item that is used for addressing the value in the device. The ItemID configurator tells the driver how to receive or send the item value. The text can be written manually, or it can be assembled in the window opened by the button to the right of the configurator. Macro expression can be used for input (it is evaluated while the application is launching).

The text may look like for example M20 or M20.W, meaning:

M20 = data area (device) and a logical address. The device may be: X,Y,S,M,T,C,D.

For the X and Y devices, the address is a octal number, while all other use decadic number.

The D registry is a 16-bit value, while other are 1-bit.

.W = optional part specifying the request:
.W = (Word) 16-bitá value (for bit device it means 16 neighboring items). Number without sign. In the PROMOTIC application represented by the data type: Long. For the D register it is set as default and is not needed to enter.
.I = (Integer) similar as .W but the number is with sign. In the PROMOTIC application represented by the data type: Integer.
.L = (Long) 32-bit value (for bit device it means 32 neighboring items). Number with sign. In the PROMOTIC application represented by the data type: Long.

If the optional part is used on the items X,Y,S,M,T,C (i.e. all except D), then the defined logical address must be divisible by 8.

For the D register it can be only .I or blank (i.e. similar as .W).


M25 = bit value M with the address 25 (stored as Boolean type)
M16.W = 16-bit value with no sign includes the items M16-M31 (stored as Long type)
D32.I = 16-bit value with sign. The D registry value on address 32 (stored as Integer type)
X8.L = 32-bit value with sign includes X8-X39 (stored as Long type)

The communication description by the PmCommMsg objects

For this protocol it is necessary to set the data manually on the Data-sent and Data-received pages because the "Data setting" button isn't functional for this protocol.
The protocol supports two message types:
1) Reading from FX (n bytes READ)
2) Writing to FX (n bytes WRITE)

At both types the address, from/to which the data have to be read/written, in the PLC is set in the message parameters. For reading from FX only the Data-received page is filled in and for writing to FX only the Data-sent page is filled in. The number and the data types of these data can be arbitrary but they must correspond to the data that are in the PLC.

The address set in the message parameters is called "TOP address" in the PLC. These address assignments for individual memory types must be found out from the PLC documentation. Caution: In the message parameters the address is set in the decimal form whereas in the documentation the address is stated in the hexadecimal or octal form. Thus it is necessary to convert the address into the decimal form!

The address assignment depends on the setting of the Protocol version configurator:

Protocol version = General (all FX-series):

Device: Device area: TOP address:
X X0-X177 (octal) 0080-008F hexa, 128-143 decimal
Y Y0-Y177 (octal) 00A0-00AF hexa, 160-175 decimal
S S0-S997 (decimal) 0000-007C hexa, 000-124 decimal
T (contacts) T0-T255 (decimal) 00C0-00DF hexa, 192-223 decimal
M M0-M1023 (decimal) 0100-017F hexa, 256-383 decimal
C (contacts) C0-C255 (decimal) 01C0-01DF hexa, 448-479 decimal
SPECIAL M M8000-M8255 (decimal) 01E0-01FF hexa, 480-511 decimal
D data registers D0-D999 (decimal) 1000-17CF hexa, 4096-6095 decimal
D special registersD8000-D8255 (decimal) 0E00-0FFF hexa, 3584-4095 decimal

Protocol version = Extended (FX2N):

Device: Device area: TOP address:
X X0-X377 (octal) 0240-025F hexa, 576-607 decimal
Y Y0-Y377 (octal) 0180-019F hexa, 384-479 decimal
S S0-S997 (decimal) 0280-02FF hexa, 640-767 decimal
T (contacts) T0-T255 (decimal) 0200-021F hexa, 512-543 decimal
C (contacts) C0-C255 (decimal) 01E0-01FF hexa, 480-511 decimal
M M0-M3071 (decimal) 0000-017F hexa, 000-383 decimal
D data registers D0-D7999 4000-7E7E hexa, 16384-32382 decimal
PROMOTIC 9.0.0 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice