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
Before using this driver in the PROMOTIC application it is highly recommended to read the chapter: Communicaton using the PROMOTIC drivers
Basic properties of the driver
- Using this driver is bound to purchase 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
Communicating 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
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).
Programming connector (MINI-DIN
) is equipped with the RS422
interface connected as follows:
|3||GND (Not connected)|
|5||+5V (Not connected)|
The driver can transmit the following data areas (in the PLC documentation, these areas are called devices
|X ||Physical Input.|
|Y ||Physical Output, coil.|
|S ||State Relay.|
|M ||Auxiliary Relay.|
|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).
of this data is different when using the PmCommData
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 rate||9600 Bd|
|Number of data bits||7|
|Parity||EVEN or NO|
|Number of stop bits||1|
|Timeout between receiving 2 chars||60|
Description and recommended values for the Protocol parameters:
|Response receipt timeout||Only 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, the transfer of the message is terminated (event onEndOfTransfer fires with error 24 or 66).|
| Protocol version| General (all FX-series)
- Protocol for all types of PLCs
- 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
objects can be used for this driver. For usual data transmissions it is more favourable than using the PmCommMsg
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 enabled). When writing to the variable, only the single value is sent (if the Auto send when writing to item configurator is enabled).
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:
= 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.
= optional part specifying the request:
) 16-bitá value (for bit device it means 16 neighboring items). A number without
sign. In the PROMOTIC application represented by the data type: Long
. For the D
registry it is set as default and is not needed to enter.
) similar as .W
but the number is with
sign. In the PROMOTIC application represented by the data type: Integer
) 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 registry 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
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 registers||D8000-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|