Mitsubishi — Chapter 7 Application Instructions API 50-88

7 Application Instructions API 50-99 When receiving data, PLC will receive the head code and tail code of the data from the external equipment; therefore, the user has to be aware of the setting of data length n . Program Example 3: Use COM2 on the PLC to carry out RS-485 communication. Connect PLC to VFD-B series AC motor drives (AC motor drive in ASCII Mode; PLC in 16-bit mode and M1161 = Off). Write in the 6 data starting from parameter address H2101 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 Sending request pulses Write in data to be transmitted in advance Set up sending request X10 Receiving completed Process of received data M1123 Receiving of data is completed. The flag is reset. PLC  VFD-B, PLC sends “: 01 03 2101 0006 D4 CR LF “ VFD-B  PLC, PLC receives “: 01 03 0C 0100 1766 0000 0000 0136 0000 3B CR LF “ Registers for sent data (PLC sends out message) DVP-PLC APPLICATION MANUAL 7-100 MOV H86 D1120 SET M1120 MOV K100 D1129 SET M1122 RS D100 K17 D120 K35 RST M1123 Register Data Explanation D100 low ‘:

’ 3A H STX D100 high ‘0’ 30 H ADR 1 Address of AC motor drive: ADR (1,0) D101 low ‘1’ 31 H ADR 0 D101 high ‘0’ 30 H CMD 1 Instruction code: CMD (1,0) D102 low ‘3’ 33 H CMD 0 D102 high ‘2’ 32 H Start data address D103 low ‘1’ 31 H D103 high ‘0’ 30 H D104 low ‘1’ 31 H D104 high ‘0’ 30 H Number of data (counted by words) D105 low ‘0’ 30 H D105 high ‘0’ 30 H D106 low ‘6’ 36 H D106 high ‘D’ 44 H LRC CHK 1 Error checksum: LRC CHK (0,1) D107 low ‘4’ 34 H LRC CHK 0 D107 high CR D H END D108 low LF A H