Your Cart
20% OFF on all products Shop now

LK3U PLC Communication port

Communication port 1 / communication port 2 instructions

* Communication port 1 / communication port 2 power-on default is FX programming port protocol;
* Communication port 1 / communication port 2 supports switching between Mitsubishi FX programming port protocol and MODBUS-RTU protocol;
* Communication port 1 communication parameters are set in D8400, communication parameters of communication port 2 are set in D8420, support ADPRW to switch between communication port 1 and communication port 2;
*ADPRW read and write data length is up to 520, beyond the reported 6343 or 6363 failure;
* If the D8400 or D8420 does not have the MODBUS-RTU master function enabled, the 6706 fault is reported when the ADPRW instruction is used.

Special register and relay description

Special register
Communication port1Communication port2nameEffective stationdetailsR/W
D8400D8420Communication format settingMaster/slaveSet the communication format, set the details as seen later.R/W
D8401D8421MODBUS protocol selectionMaster/slaveSelect MODBUS Master protocol when the value is H0
Select MODBUS Slave Protocol when the value is H10 (K16)
D8402D8422Communication error codeMaster/slaveThe new error code that occurred in MODBUS communication will be stored.R
D8403D8423Error detailsMaster/slaveThe details of the latest error will be stored.R
D8404D8424step of communication errorMasterThe step number of the first ADPRW instruction that has an error will occur.
Being stored.
D8407D8427Communication step numberMasterThe step number of the ADPRW instruction in MODBUS communication will be stored. (When the instruction is not executed, 0 will be stored.)
The step number of the last executed ADPRW instruction will be maintained.
D8408D8428Current number of retriesMasterWhen the communication retry is performed due to the slave response timeout, the current number of retries will be stored.R
D8409D8429Slave response timeoutMasterAfter the master station sends the request, if the slave station does not respond within the set time, the master will send the text again, or judge it as timeout error according to the set retry times (d8412, d8432), and then end the processing of the instruction
Setting range: 0 ~ 32767, 1 = 10ms, when it is 0, 3 seconds is timeout
D8410D8431Send delayMaster/slaveThis delay refers to delaying the return of data after receiving the data.
Setting range: 0~16382[ms], default: 10ms
D8412D8432number of retries MasterWhen the slave does not respond within the time set in the slave response timeout, the master sends the text until the set number of retries is reached, and the command processing ends due to a timeout error.
Setting range: 0 to 20 [times]
When setting a value of 20 or more, the number of retries is 20
D8414D8434Station numberMaster/slaveStore the station number of the station, the setting range is from 1 to 247R/W
D8063D8438 Serial communication error codeMaster/slaveWhen a communication error occurs, an error code corresponding to the error occurred in the MODBUS communication is storedR
D8419D8439Action mode displayMaster/slave0-FX programming port communication
4-RS instruction
5-RS2 instruction
19-MODBUS Communication Master
29-MODBUS communication slave station

Special relay

Communication port1Communication port2nameEffective stationdetailsR/W
M8410Communication port 1/2 use
ADPRW instruction switching
MasterOFF: Communication port 1 uses the ADPRW instruction.
ON: Communication port 2 uses the ADPRW instruction.
M8029End of instruction executionMasterOFF: The instruction is not in execution or the instruction has not been executed yet.
ON: The instruction execution is completed.
M8401M8421In Modbus CommunicationMasterSet to ON in MODBUS communication.R
M8402M8422MODBUS communication errorMaster/slaveSet to on when Modbus communication error occursR
M8403M8423MODBUS communication error latchMaster/slaveTurns ON when a MODBUS communication error occurs.R
M8408M8428RetryMasterWhen the slave does not respond on time, it sends a retry at the primary station.
Period is set to ON
M8409M8429Timeout occurredMasterThe response timeout is set to ONR
Communication port 1 / communication port 2 MODBUS-RTU slave protocol device address

Bit component address:

MODBUS-RTU Slave device addressdevice address
Read outRead/write

Word component address:

MODBUS-RTU Slave device addressdevice address
Read outRead/write

Communication port 1 / communication port 2 communication parameter setting - D8400 / D8420 setting instructions

Bit numberNameContent
b0Data length7 bit*18 bit
Parityb2              b1 
             (0               0)-No parity
                    (0               1)-奇数(ODD)
                     (1               1)-偶数(EVEN)
b3Stop bit1位2位
b4Rateb7 b6 b5 b4 b7 b6 b5 b4
(0 0 1 1):300 (1 0 0 0):9600 
(0 1 0 0):600 (1 0 0 1):19200 
(0 1 0 1):1200 (1 0 1 0):38400
(0 1 1 0):2400 (1 0 1 1):57600
(0 1 1 1):4800 (1 1 0 1):115200
b8~b11Disablesetting is 0
b12b14   b13   b12
 (0       0       0):FX programming port protocol
 (0       0       1): RS no protocol communication
 (0       1       0): RS2 no protocol communication
 (0       1       1): MODBUS protocol (D8401/D8421 setting master and slave)
b15Disablesetting 0
*1: When the data bit is 7 bits, the parity cannot be selected - no check (report 6304 fault)
*FX programming port protocol: data length 7, stop bit 1, parity EVEN is fixed, rate can be set;
*MODBUS-RTU protocol: data length, stop bit, parity, rate can be set;
*RS command: data length, parity, stop bit, rate can be set;
*RS2 command: data length, parity, stop bit, rate can be set;
When d8401 / d8421 value is H0, select Modbus master protocol;
When d8401 / d8421 value is H10, select MODBUS slave protocol

MODBUS command supported by communication port 1/communication port 2

FeaturesCommandSupported device types
Bit componentWord component
Bit read command1(H1)、2(H2)X、Y、M、S、T、C、special M——
Bit write command5(H5)Y、M、S、T、C、special M——
Register read command3(H3)、4(H4)X、Y、M、S、T、C、special MD、T、C、special D
Register write command6(H6)Y、M、S、T、C、special MD、T、C、special D
Register bulk write command16(H10)Y、M、S、T、C、special MD、T、C、special D
* Using register read bits, a register will read 16 bit component states;
* Using the register write bit, a register will be written to affect the state of the 16-bit component;

Communication port 1 RS command component function

M8401-RS instruction is being sent (M8121)M8402-RS command transmission (M8122)
M8403-RS command receiving flag (M8123) M8404- 
M8409-Communication Timeout Flag (M8129)M8161-8 bit processing mode (ON-8 bit, OFF-16 bit)
D8400-Communication parameters and protocol selection (D8120)
D8402-RS instruction sends data remainderD8403-RS instruction received number
D8409-RS command receiving timeout setting (1=10ms, default 50=500ms)
D8419 - Sign of communication being executed

Communication port 2 component function of RS2 command

M8421-RS2 instruction is being sentM8422-RS2 command is being sent
M8423-RS2 command receiving flagM8424- 
M8429-Communication timeout flag
D8420-Communication parameters and protocol selection
D8422-RS2 instruction sends data remainderD8423-RS2 command received number
D8429-RS2 command receiving timeout setting (1=10ms, default 50=500ms)
D8439-Flag of communication is being performed
The maximum data sent and received by the RS2 command is 520 (exceeded 6706)

Input interrupt I0 port -I5 port description

* Support X0-X5 input interrupt;

* Input interrupt delay execution (D8393 function) is not supported.

LK3U PLC General parameters

LK3U PLC-Communication port pin definition

LK3U PLC Component range

LK3U PLC Supported instructions

LK3U PLC Special relay M function description

LK3U PLC Special register D function description

LK3U PLC High-speed counter instructions

LK3U PLC High-speed counter instructions

LK3U PLC Communication port

LK3U PLC High speed output

LK3U PLC Analog read and write instructions

LK3U PLC CAN function

LK3U PLC PID function