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 port1 | Communication port2 | name | Effective station | details | R/W | |||
D8400 | D8420 | Communication format setting | Master/slave | Set the communication format, set the details as seen later. | R/W | |||
D8401 | D8421 | MODBUS protocol selection | Master/slave | Select MODBUS Master protocol when the value is H0 Select MODBUS Slave Protocol when the value is H10 (K16) | R/W | |||
D8402 | D8422 | Communication error code | Master/slave | The new error code that occurred in MODBUS communication will be stored. | R | |||
D8403 | D8423 | Error details | Master/slave | The details of the latest error will be stored. | R | |||
D8404 | D8424 | step of communication error | Master | The step number of the first ADPRW instruction that has an error will occur. Being stored. | R | |||
D8407 | D8427 | Communication step number | Master | The 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 | |||
D8408 | D8428 | Current number of retries | Master | When the communication retry is performed due to the slave response timeout, the current number of retries will be stored. | R | |||
D8409 | D8429 | Slave response timeout | Master | After 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 | |||
D8410 | D8431 | Send delay | Master/slave | This delay refers to delaying the return of data after receiving the data. Setting range: 0~16382[ms], default: 10ms | R/W | |||
D8412 | D8432 | number of retries | Master | When 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 | |||
D8414 | D8434 | Station number | Master/slave | Store the station number of the station, the setting range is from 1 to 247 | R/W | |||
D8063 | D8438 | Serial communication error code | Master/slave | When a communication error occurs, an error code corresponding to the error occurred in the MODBUS communication is stored | R | |||
D8419 | D8439 | Action mode display | Master/slave | 0-FX programming port communication 4-RS instruction 5-RS2 instruction 19-MODBUS Communication Master 29-MODBUS communication slave station | R | |||
Special relay | ||||||||
Communication port1 | Communication port2 | name | Effective station | details | R/W | |||
M8410 | Communication port 1/2 use ADPRW instruction switching | Master | OFF: Communication port 1 uses the ADPRW instruction. ON: Communication port 2 uses the ADPRW instruction. | R/W | ||||
M8029 | End of instruction execution | Master | OFF: The instruction is not in execution or the instruction has not been executed yet. ON: The instruction execution is completed. | R | ||||
M8401 | M8421 | In Modbus Communication | Master | Set to ON in MODBUS communication. | R | |||
M8402 | M8422 | MODBUS communication error | Master/slave | Set to on when Modbus communication error occurs | R | |||
M8403 | M8423 | MODBUS communication error latch | Master/slave | Turns ON when a MODBUS communication error occurs. | R | |||
M8408 | M8428 | Retry | Master | When the slave does not respond on time, it sends a retry at the primary station. Period is set to ON | R | |||
M8409 | M8429 | Timeout occurred | Master | The response timeout is set to ON | R | |||
Communication port 1 / communication port 2 MODBUS-RTU slave protocol device address | ||||||||
Bit component address: | ||||||||
MODBUS-RTU Slave device address | device address | |||||||
Read out | Read/write | |||||||
0x0000~0x1DFF | 0x0000~0x1DFF | M0~M7679 | ||||||
0x1E00~0x1FFF | 0x1E00~0x1FFF | M8000~M8511 | ||||||
0x0000~0x2FFF | 0x0000~0x2FFF | S0~S4095 | ||||||
0x3000~0x31FF | 0x3000~0x31FF | TS0~TS511 | ||||||
0x3200~0x32FF | 0x3200~0x32FF | CS0~CS255 | ||||||
0x3300~0x33FF | 0x3300~0x33FF | Y0~Y377 | ||||||
0x3400~0x34FF | —— | X0~X377 | ||||||
Word component address: | ||||||||
MODBUS-RTU Slave device address | device address | |||||||
Read out | Read/write | |||||||
0x0000~0x1F3F | 0x0000~0x1F3F | D0~D7999 | ||||||
0x1F40~0x213F | 0x1F40~0x213F | D8000~D8511 | ||||||
0xA140~0xA33F | 0xA140~0xA33F | TN0~TN511 | ||||||
0xA340~0xA407 | 0xA340~0xA407 | CN0~CN199 | ||||||
0xA408~0xA477 | 0xA408~0xA477 | CN200~CN255(32位) | ||||||
0xA478~0xA657 | 0xA478~0xA657 | M0~M7679 | ||||||
0xA658~0xA677 | 0xA658~0xA677 | M8000~M8511 | ||||||
0xA678~0xA777 | 0xA678~0xA777 | S0~S4095 | ||||||
0xA778~0xA797 | 0xA778~0xA797 | TS0~TS511 | ||||||
0xA798~0xA7A7 | 0xA798~0xA7A7 | CS0~CS255 | ||||||
0xA7A8~0xA7B7 | 0xA7A8~0xA7B7 | Y0~Y377 | ||||||
0xA7B8~0xA7C7 | —— | X0~X377 | ||||||
Communication port 1 / communication port 2 communication parameter setting - D8400 / D8420 setting instructions | ||||||||
Bit number | Name | Content | ||||||
0(bit=OFF) | 1(bit=ON) | |||||||
b0 | Data length | 7 bit*1 | 8 bit | |||||
Parity | b2 b1 (0 0)-No parity (0 1)-奇数(ODD) (1 1)-偶数(EVEN) | |||||||
b1 | ||||||||
b2 | ||||||||
b3 | Stop bit | 1位 | 2位 | |||||
b4 | Rate | b7 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~b11 | Disable | setting is 0 | ||||||
b12 | b14 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 | ||||||||
b15 | Disable | setting 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 | ||||||||
Features | Command | Supported device types | ||||||
Bit component | Word component | |||||||
Bit read command | 1(H1)、2(H2) | X、Y、M、S、T、C、special M | —— | |||||
Bit write command | 5(H5) | Y、M、S、T、C、special M | —— | |||||
Register read command | 3(H3)、4(H4) | X、Y、M、S、T、C、special M | D、T、C、special D | |||||
Register write command | 6(H6) | Y、M、S、T、C、special M | D、T、C、special D | |||||
Register bulk write command | 16(H10) | Y、M、S、T、C、special M | D、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 remainder | D8403-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 sent | M8422-RS2 command is being sent | |||||||
M8423-RS2 command receiving flag | M8424- | |||||||
M8429-Communication timeout flag | ||||||||
D8420-Communication parameters and protocol selection | ||||||||
D8422-RS2 instruction sends data remainder | D8423-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-Communication port pin definition 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 |