Menu
Your Cart

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)
R/W
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.
R
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.
R
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
R/W
D8410D8431Send delayMaster/slaveThis delay refers to delaying the return of data after receiving the data.
Setting range: 0~16382[ms], default: 10ms
R/W
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
R/W
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
R

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.
R/W
M8029End of instruction executionMasterOFF: The instruction is not in execution or the instruction has not been executed yet.
ON: The instruction execution is completed.
R
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
R
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
0x0000~0x1DFF0x0000~0x1DFFM0~M7679
0x1E00~0x1FFF0x1E00~0x1FFFM8000~M8511
0x0000~0x2FFF0x0000~0x2FFFS0~S4095
0x3000~0x31FF0x3000~0x31FFTS0~TS511
0x3200~0x32FF0x3200~0x32FFCS0~CS255
0x3300~0x33FF0x3300~0x33FFY0~Y377
0x3400~0x34FF——X0~X377

Word component address:

MODBUS-RTU Slave device addressdevice address
Read outRead/write
0x0000~0x1F3F0x0000~0x1F3FD0~D7999
0x1F40~0x213F0x1F40~0x213FD8000~D8511
0xA140~0xA33F0xA140~0xA33FTN0~TN511
0xA340~0xA4070xA340~0xA407CN0~CN199
0xA408~0xA4770xA408~0xA477CN200~CN255(32位)
0xA478~0xA6570xA478~0xA657M0~M7679
0xA658~0xA6770xA658~0xA677M8000~M8511
0xA678~0xA7770xA678~0xA777S0~S4095
0xA778~0xA7970xA778~0xA797TS0~TS511
0xA798~0xA7A70xA798~0xA7A7CS0~CS255
0xA7A8~0xA7B70xA7A8~0xA7B7Y0~Y377
0xA7B8~0xA7C7——X0~X377

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

Bit numberNameContent
0(bit=OFF)1(bit=ON)
b0Data length7 bit*18 bit
Parityb2              b1 
             (0               0)-No parity
                    (0               1)-奇数(ODD)
                     (1               1)-偶数(EVEN)
b1
b2
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
b5
b6
b7
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)
b13
b14
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