Mitsubishi — Chapter 7 Application Instructions API 50-88

7 Application Instructions API 50-99 Program Example 4: Use COM2 on the PLC to carry out RS-485 communication. Connect PLC to VFD-B series AC motor drives (AC motor drive in RTU Mode; PLC in 16-bit mode and M1161 = On). Write in H12 to parameter address H2000 in VFD-B in advance as the data to be transmitted. M1002 Set up communication protocol 9600,7,E,1 Retain communication protocol Set up communication time-out 100ms 8-bit mode Sending request pulses Write in data to be transmitted in advance Set up sending request X10 M1123 Process of received data Receiving of data is completed. The flag is reset. PLC  VFD-B, PLC sends: 01 06 2000 0012 02 07 VFD-B  PLC, PLC receives:

01 06 2000 0012 02 07 Registers for sent data (PLC sends out messages) Registers for received data (VFD-B responds with messages) Program Example 5: COM1 RS-232 1. Only 8-bit mode is supported. Communication format and speed are specified by lower 8 bits of D1036.

DVP-PLC APPLICATION MANUAL 7-102 MOV H86 D1120 SET M1120 MOV K100 D1129 SET M1161 SET M1122 RS D100 K8 D120 K8 RST M1123 Register Data Explanation D100 low 01 H Address D101 low 06 H Function D102 low 20 H Data address D103 low 00 H D104 low 00 H Data content D105 low 12 H D106 low 02 H CRC CHK Low D107 low 07 H CRC CHK High Register Data Explanation D120 low 01 H Address D121 low 06 H Function D122 low 20 H Data address D123 low 00 H D124 low 00 H Data content D125 low 12 H D126 low 02 H CRC CHK Low D127 low 07 H CRC CHK High