Promotic
WikipediaLinkedInYoutubeTwitterFacebook

PmMelsecQA - Driver for communication with Mitsubishi PLCs of the A/Q/L series

This driver is used for communication with Mitsubishi PLCs of the A, Q and L series by the Melsec protocol. The "Compatible 1C/3C/3E frames" formats are supported. See also Communication with Mitsubishi PLC devices.
 
The driver can also be used for communication with FX series PLCs. These PLCs have another protocol type implemented on the serial programming communication port - for this the PmMelsecFXS driver can be used. If the device has also another port then it is sometimes necessary to use the PmMelsecQA driver. For example:
- Device with integrated Ethernet port (e.g. FX3GE). In the driver it must be set: Protocol format = "A1E/BIN = A series Ethernet Binary (for A1SJ71E71 Ethernet interface module)", and in the device it must be set: Communication Data Code = Binary Code.
- The MELSEC FX2N-16MR device has another module for serial link. It is possible to communicate via this link by the PmMelsecQA driver that has the "Compatible 1C frames" format set.
 
The driver can also be used for communication with Ethernet communication module A1SJ71E71-B2/B5 for PLCs of the A series.
 
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 standard serial link (COM1, COM2 ...). Although the 1C and 3C formats are designed for serial line and the 3E format for Ethernet, the driver allows to use all these formats on both interfaces. For example it is possible to use the "RS232/Ethernet" converter and use the 1C format for communication with the PROMOTIC application via Ethernet.
- The PROMOTIC application is the MASTER (i.e. it initiates the data transfer) from this communication point of view.
- The driver is incorporated into the PROMOTIC system by means of the PmComm object.

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

For easy integration of this driver into the application it is handy to use: Preconfigurations in group "Mitsubishi PLC"

- This is a network communication, i.e. one PmComm object can communicate with multiple devices (the protocol supports multiple device addressing).
 
A list of data areas (devices) supported by the driver:
X-Input Bit device The address in ItemId is entered hexadecimaly.
Y-Output Bit device The address in ItemId is entered hexadecimaly.
M-Internal Relay Bit device
L-Latch Relay Bit device
S-Step Relay Bit device
B-Link Relay Bit device The address in ItemId is entered hexadecimaly.
F-Annunciator Bit device
D-Data register Word device
W-Link register Word device The address in ItemId is entered hexadecimaly.
R-File register Word device
TS-Timer (contact) Bit device
TC-Timer (coil) Bit device
TN-Timer (current value) Word device
CS-Counter (contact) Bit device
CC-Counter (coil) Bit device
CN-Counter (current value) Word device
SM-Special Relay Bit device
SD-Special register Word device
 

Recommended parameters values:

Recommended values for the Serial link parameters:
Baud rate19200 Bd
Number of data bits8 / 7 (depends on the PLC setting)
ParityNO / EVEN
Number of stop bits1
Number of repeats after unsuccessful transmission0
Timeout between receiving 2 chars100 ms
Delay between receive-send0 ms
RTS flow controllog.1
DTR flow controllog.1
Recommended values for the Ethernet parameters:
TCP/UDP port number So far we have no info regarding the default settings. The setup must correspond with the PLC settings, on the communication card, or in the converter.
Ethernet transfer typeTCP. It is also possible to chose UDP if it is configured in the PLC, the cpmmunicaton card or in the converter.
Description and recommended values for the Protocol parameters:
Protocol formatDefines the structure of the protocol. Depends on the PLC type and the setup (e.g. depends on MODE switch setting on AJ71C24 communication module).
3E/ASCII = Q series ethernet (compatible 3E), ASCII Format (for Q series E71) -

The Ethernet protocol for PLCs of the L and Q-E71 series. It is a modification of the "ASCII code" (the modification of the "binary code" has not been implemented in the driver).

3C/CF1 = Q series serial (compatible 3C), Control Format 1 -

The serial line protocol for Q C24 series PLCs. It is the basic (recommended) mode and there are three derived submodes.

3C/CF2 = Q series serial (compatible 3C), Control Format 2 (Format 1 with block num added) -

Submode of the 3C/CF1 format, with added block number.

3C/CF3 = Q series serial (compatible 3C), Control Format 3 (Format 1 with STX+ETX added) -

Submode of the 3C/CF1 format, where the protocol starts with the STX (=2) character and ends with the ETX (=3) character.

3C/CF4 = Q series serial (compatible 3C), Control Format 4 (Format 1 with CR+LF added) -

Submode of the 3C/CF1 format, where the two CR+LF characters are placed at the end of each message.

1C/CF1 = A series (compatible 1C), Control Format 1 -

Protocol for serial line for A series PLCs, burt can also be used for Q series PLCs. It is the basic (recommended) mode and there are three derived submodes.

1C/CF2 = A series (compatible 1C), Control Format 2 (Format 1 with block num added) -

Submode of the 1C/CF1 format, with added block number.

1C/CF3 = A series (compatible 1C), Control Format 3 (Format 1 with STX+ETX added) -

Submode of the 1C/CF1 format, where the protocol starts with the STX (=2) character and ends with the ETX (=3) character.

1C/CF4 = A series (compatible 1C), Control Format 4 (Format 1 with CR+LF added) -

Submode of the 1C/CF1 format, where the two CR+LF characters are placed at the end of each message.

A1E/ASCII = A series Ethernet ASCII (for A1SJ71E71 Ethernet interface module) -

Ethernet protocol for A series PLCs with additional communication module A1SJ71E71-B2/B5. The SW2 switch is in the ASCII protocol syntax position.

A1E/BIN = A series Ethernet Binary (for A1SJ71E71 Ethernet interface module) -

Ethernet protocol for PLCs of the FX series with integrated Ethernet port and A series PLCs with additional communication module A1SJ71E71-B2/B5. In the device the Communication Data Code switch (or SW2 switch on modules) must be switched to binary protocol syntax position.

Message Wait Time0 ms. Only if the protocol format is set to 1C or A1E. Value for generating delay time in response transmission. This value designates the minimum time that PLC must wait before sending a result after receiving a command from PROMOTIC. The wait time is in the range from 0 to 150 ms
Response receipt timeout500 ms. Only for serial link. 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).
CheckSum allowedNo. Only if the protocol format is set to 1C or 3C. (depends on SW21 switch setting on AJ71C24 communication module)

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 enabled). When writing to the variable, only the single value is sent (if the Auto write 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 "X.1f9.W" meaning:

X = Data area type. See the data area types listed in the table above.
1f9 = The data area address (for some areas entered decimaly and for others hexadecimaly). For bit areas the bit addres is always used (not only for the b data type, but also for W, I, etc.).
W = Data type (b=Bit, W=Word unsigned, I=Word signed, L=DWord signed, R=Real).
 
Description of the PmCommData > Parameters > Special Parameters configurator:
CPUOnly if the protocol format is set to 1C. Processor type of the PLC.
ACPU
AnCPU
Destination station addressThe standard value is 0. Defines the number of the station in the network.
Destination I/O addressOnly if the protocol format is set to 3E. The standard value is 03FF hexa, i.e. 1023 decimaly. This number, multiplied by 16 defines the basic I/O signal address.
CPU monitoring timerOnly if the protocol format is set to 3E. Designate the wait time from when the Q series E71 (after receiving a request from PROMOTIC) outputs a read/write request to the PLC CPU till when the request is returned.
0 - Waits unifinitely
1 - 65535 - Wait time (unit is 250 ms)
Max.read of BIT device points in BIT units256 (64 for A1E/BIN interface modul). The number of bit values (read from the "Bit device" areas, for example X,Y..), that can be transmitted simultaneously in a single message. Depends on the PLC type, but all PLCs can transmitt at least 256 bit values. It is used for variables, that read from the "Bit device" of the b=Bit data type.
Max.read of BIT device points in WORD units64. The number of Word (2-Byte) values (read from the "Bit device" areas, for example X,Y..), that can be transmitted simultaneously in a single message. Depends on the PLC type, but all PLCs can transmitt at least 64 Word values (i.e. 64*16=1024 bit values). It is used for variables, that read from the "Bit device" of the data type: W=Word unsigned, I=Word signed, L=DWord signed or R=Real.
Max.read of WORD device points in WORD units512. The number of Word (2-Byte) values (read from the "Word device", for example D,W,TN..), that can be transmitted simultaneously in a single message. Depends on the PLC type, but all PLCs can transmitt at least 512 values

The communication description by the PmCommMsg objects

The PmCommMsg obejcts can be used for special communications, that cannot be executed by the PmCommData object. For example when reading the data in precisely specified order is required.
Description of the PmCommMsg > Parameters > Message parameters configurator:
CPUOnly if the protocol format is set to 1C. Processor type of the PLC.
ACPU
AnCPU
DeviceData area type. See the data area types listed in the table above.
Data type
Bit - Only for "Bit device" data type. In the PROMOTIC application represented by the data type: Boolean.
Word unsigned - For "Word device"and also for "Bit device" data type. In the PROMOTIC application represented by the data type: Long.
Word signed - For "Word device"and also for "Bit device" data type. In the PROMOTIC application represented by the data type: Integer.
DWord signed - For "Word device"and also for "Bit device" data type. In the PROMOTIC application represented by the data type: Long.
Real - For "Word device"and also for "Bit device" data type. In the PROMOTIC application represented by the data type: Single.
CommandCommand type.
Batch Read - batch reading from the PLC
Batch Write - batch writing into the PLC
Number of PointsNumber of (read or write) data items
Address in Data-WriteOnly if the protocol format is set to 1C. Here you can specify, whether the data address is to be entered here or in a variable on the Data-sent page. The recommended way is to enter the addres into the variable, because there it can modified dynamically even when the application is running (therefore the configurator is not available for newer protocols).
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice