Home
FX COMMUNICATION USER`S MANUAL
Contents
1. MITSUBISHI RUN monitor M8000 MOV K1X000 K1M1000 Slave 1 communication error M8184 Mt MOV K1M1064 K1Y014 Slave 2 communication error M8185 A MOV K1M1128 K1Y020 Slave 1 communication error M8184 ME MOV K 10 D 1 Contact of slave 1 C1 device M1070 Y005 Slave 2 communication error M8185 MOV K10 D2 Contact of slave 2 C2 device M1140 Y006 Slave 1 Slave 2 communication communication error error M8184 M8185 H H MOV K 10 D 3 MOV K 10 D 0 END N N network 4 Operation 1 Operation 2 Operation 3 Operation 4 Operation 5 Operation 6 Operation 7 8 4 9 FX communication b Program of slave station No 1 Counter reset MITSUBISHI X001 T RST C 1 Master communication error M8183 HE MOV K1M1000 K1Y010 MOV K1X000 K1M1064 Slave 2 communication error M8185 MOV K1M1128 K1Y020 Counter input X000 C 1 D 1 C 1 T Y005 M1070 Slave 2 Contact of communication slave 2 C2 error device M8185 M1140 T Y006 MOV K 10 D 10 Slave 2 communication error M8185 ADD DO D 20 D11 END N N network 4 Operation 1 Operation 2
2. The sum check is calculated over this range CN E 0 03100500 1234 0100 BCA9 CN100 10064 107 05 35H 46H 57H 54H 33H 35H 32H 34H 30H 31H 30H 30H T 41H 39H 43H AEH 31H 30H 30H BOH 36H 34H 37H Programmable gt a A controller C 05 FF 9 K i a 06H BOH 30H 46H 46H Indicates to change the 1 1 11 Indicates to change the contents of D500 to D a present value of C100 to i 64H or 100 in decimal oo 1111111111111111 i 1111111100000000 7654321076543210 Each bit 0 1 indicates reset OFF or set ON respectivly a MITSUBISHI 8 9 FX communication Commands 8 8 7 8 7 1 8 7 2 Remote RUN STOP RR RS commands Operation of Remote RUN STOP When remote RUN STOP is requested from the computer the programmable controller forced run mode and the special auxiliary relays M8035 M8036 M8037 are controlled as follows Remote RUN When remote RUN RR command is requested M8035 and M8036 are set ON at the pro grammable controller and forced RUN mode becomes active the programmable controller switching to RUN However when remote run is executed while the programmable controller is running forced or otherwise the state is not changed and the r
3. Computer RS232C RS485 422 FX 485PC IF FXo FX2c FXon 485ADP FXon FX2Nc FX 485ADP FX2N FX2N 485 BD series PLC 15 710 24 FX2N FX2N CNV BD FX1S FX1N 485 BD FX1S FX1N CNV BD FX1N FX1N 485 BD V FX1N FX1N CNV BD 2 When not using FX2N 485 BD or FX1N 485 BD in the system total extension distance is Max 500m Use Max 50m Total station of this network is Max 16 stations 2 Use RS232C FX2N FX2N 232 BD FX2N CNV BD FXoN 232ADP Computer FX2nc FXoN FXoN 232ADP omp FXiN FX1s FXin 232 BD FX1N CNV BD FXon 232ADP FX2 FX2c FX 232ADP Total extension distance is 15m zt MITSUBISHI 1 3 FX communication Introduction 1 1 2 4 No Protocol Communication r RS232C Personal computer 3 EX 3 FX 2N FXEN CNV BD 232 FX2NC FXoN 232ADP FXoN 232ADP 4 4 FX4N 4 2 1N FX FXac FXIN CNV BD 21923220 1 1 FEXis 232 15 EXE ENVED FX1N 232 BD Bar code reader FX 232ADP FXoN 232ADP WS FX2N VAD FX2NC FX2Nc CNV IF FX2N 2321F RS485 422 FX2N FX2N CNV BD Printer FX1N CNV BD FX2N FX2N 485 BD FX1S FX1N CNV BD
4. Computer FX FX FX MEER TE FX series series series series 485PC IF T 485ADP T 485ADP T 485ADP T 485ADP Station No 0 Station No 1 Station No 2 Station No 15 The following instructions can be used to set the station number of station 0 in the above system M8002 A MOV HO D8121 Notes 1 When setting station numbers don t set the same number at more than 1 station Otherwise transmission data may become confused and communication irregular 2 Station numbers need not be set in numerical order but are free to be set within the spec ified range 00H to OFH For example setting in a random order or skipping numbers is acceptable 3 PC number The PC number is the number identifying the programmable controller CPU on the A series MELSECNET II or MELSECNET B Accordingly the PC number for an FX series programmable controller is FFH and is rep resented as two ASCII characters i e FF When using the on demand function the PC number is automatically converted to FFH by the programmable controller For the PC number of programmable controller CPU on the MELSECNET II MELSEC NET B see the computer link manual for A series programmable controllers 4 Command Used to specify the operation required e g read write etc Commands are defined using two ASCII characters For a description of the available commands see section 7 7 1 a MITSUBISHI 7 9 FX communicatio
5. 4 2 Hi O o S 2 5 3 33 Cl 2 RS 232C Device Side 9 pin 25 pin D SUB D SUB 3 2 22 In the interlink connection mode data exceeding 512 bytes upper limit of the receive buffer in the FX2N 2321F can be received 1 The FX2n 232F only indi cates the status 2 In this mode the request to send RS signal functions as the signal to enable receive in the FX2n 232 IF When receiving data exceeding 512 bytes the FX2N 232IF sets the request to send RS signal to OFF and requests the counterpart equipment to suspend the send operation When the data saved in the receive buffers is read by the sequence program the remaining data can be received 1 The FX2N 232IF indicates the status exclusively 2 When the CD signal is not monitored the CD signal pin is not required to be con nected With regard to the CD signal the FX2N 2321F indicates the status exclu sively 3 When the CI signal is not required the CI signal pin is not required to the con nected With regard to the CI signal the FX2N 2321F indicates the status exclu sively 2 5 FX communication Wiring 2 2 3 2 3 1 2 3 2 Using RS485 Interface Selection of Wiring The wiring of RS485 can either be one pair wiring or two pair wiring The wiring method is decided according to the usage Please select the wiring method from the table below
6. MITSUBISHI Bit Description Setting bO Data length 1 8 bits a Parity 1 1 Even b3 Stop bit 1 2 bits 10 DS Baud rate 1001 19200 bps b7 08 Controlli 0 0 Not used b9 ontrol line 0 0 Not use D10 lAddition of CR and LF 0 0 Not added b12 Availability of check sum and Specification item for b13 ASCII HEX conversion 0 0 Not available bt length b14 Send receive buffer data length 0 8 bits b15 Undefined b15 b8 b7 b0 0 1 000001001 11111 4 0 9 F 409F H 10 23 FX communication 2 232 10 b Command lt BFM 1 gt MO0 gt b0 Send receive enable ER ON M1 b1 Send command M2 gt b2 Receive completion reset command M3 b3 Error reset c Receive upper limit byte count lt BFM 2 gt 8 bytes d Header and terminator lt BFMs 4 to 11 gt BFMs 4 and 8 send receive header 02H STX BFMs 6 and 10 send receive terminator ETX e Status BFM 228 b0 M 10 Send completion b8 M18 RS RTS b1 M11 Receive completion b9 M19 ER DTR b2 M 12 Receive time out b10 M20 Undefined b3 M13 Error occurrence b11 M21 Undefined b4 M14 Receive suspended b12 M22 DR DSR 55 gt 15 b13 M23 CD DCD b6 M16 Being sent b14 M24 CS CTS b7 M17 Being received b15 M25 CI RI f Send byte count lt BFM 1000 gt 9bytes g Send buffers BFMs 1001 gt 9 byte send data 123456789 is prepared in the ASCII code
7. Arrange the system so that the RS instruction is executed even if the counterpart equipment receives NAK MITSUBISHI 12 6 FX communication Diagnostics 12 12 6 2321 12 6 1 Error code When an error occurs while data is sent or received the BFM 28 b3 is set to ON and the error code is saved in the BFM 29 Code Description Causes and countermeasures 0 No error Communication format such as baud rate is not matched Control timing is not matched Receive parity error overrun error framing error Undefined mis Defective receive character Receive data is not ASCII code 4 Receive sumcheckeiror Receive sum is not equal calculated sum result BFM 16 Receive buffer overflow only in interlink IC cy ese U Sl eran oye 5 connection mode Decrease receive upper byte count BFM 2 and increase spare receive buffer area 6 Baudrate setting error Non existing baud rate is specified 7 ReceiveCRerror CR is not placed in correct position Receive LF error LF is not placed in correct position 9 Send receive initial terminator setting error Initial terminator is other than to 1FH Receive terminator is not placed in correct posi tion or not matched 11 Undefined 12 Transmission sequence error Transmission sequence is not matched 10 Receive terminator error 12 6 2 Diagnostics 1 Check the st
8. Receive data RD RXD cO pataa ime out _ evaluation time D8129x10ms Time out evaluation 3 flag M8129 Reset it using a program When it is not trurned off the next data cannot be received Receive gt completion OFF ON ON Y OM M8123 ey ER DTR ON OFF J Reset using a program When it is not trurned off the next data cannot be received 1 While the counterpart equipment is ready to receive turn ON the DR DSR signal While both the DR DSR signal and the send request are turned on the FX2n sends the data 2 In the interlink mode the programmable controller turns OFF the ER DTR signal before the 30th character receive buffer limit and requests the counterpart equipment to stop send After this send request up to 30 characters can be received The 31st and later characters cannot be received Stop send temporarily then send the remaining data after the ER DTR signal is turned ON again When send is stopped receive is completed after the time out evaluation time is expired When send is not stopped receive is completed after the final character of the send data is received or the 30th character is received Therefore receive points need to set 30th or more 9 Reset using a sequence program If it is not turned off the next data cannot be received s MITSUBISHI 9 11 FX communication 9 3 9 3 1 Number of Communication Data Deal with 16 bits
9. gt 28 gt Transmission sequence 25 6 20 s or m m v 9 9 T Oo gt um o To read data 28 lesa gt 2 from the pro 95 6 gt 2223 Sel 5 gt 5 a oo 2 Du x 5 Dun grammable Computer ae A controller to Programmable o o 8 jem the computer controller 2 8 s 852 x S 5 8 J FF mn or Y m lor S 5 S gt 58 Z 5 9 Dn A 4 N m NT 3 9 sg 2 3 3 537 o S 9 8 amp 8 38 10 we data Computer WIN the com SA ter to th Programmable Transmission sequence gt puter to the controller oz programma Al S 2 ble controller or T T T T ze 2307 5 97mm 1 Sum check code is used when the sum check flag is set Yes b13 1 in special data register 08120 and not used when set to No b13 0 2 When the sum check flag is set to Yes the sum check is made on the characters in the aster Remarks isked area 3 In the diagram the contents of character area A character area B and character area C depend on the individual system but do not differ depending on the format of control protocol For details of each character area see the link contents MITSUBISHI FX communication Computer link 7 7 4 3 Control Protocol Parts Explained This is to explain the content of data set in each control procedure 1 Control codes The control codes a
10. 1 0 X X Receive data buffer L gt lt 02HM1HM2H 31H 30H03H BFM 2001 1 byte 1 byte The receive byte count is 2 6 b14 send receive buffer data length The data is treated as follows in accordance with the buffer data length Inthe case of 16 bits b14 0 Send receive buffer 16 bit data is divided into upper 8 bits and lower 8 bits then sent and received Upper 8 bits Lower 8 bits 10 Example of send buffers S BFM BFM BFM BFM E T 1001 1001 1002 1002 T X lower upper lower upper X Inthe case of 8 bits b14 1 Send receive buffer Upper 8 bits are ignored and lower 8 bits only are sent and Ignored Lower 8 bits received as valid data Example of send buffers BFM BFM BFM BFM E T 1001 1002 1003 1004 T X lower lower lower lower X MITSUBISHI 10 7 FX communication 2 232 10 10 2 3 Command BFM 1 Bit Description bO Send receive enable ER ON b1 Send command b2 Receive completion reset command b3 Error reset BFM 1 gives the command for send receive and the status information reset command to the 232lF 1 bO send receive enable While bO is turned on the 232IF can send and receive data The contents of the following setting items are determined on the rising edge of b0 Make sure to set the contents using the
11. 2 4 2 3 USING R5485 Interface areali oa 2 6 2 3 1 Selection of Wiring e REV 2 6 232 Terminal Resistor ei me ee des RE eet niet ux ce neas 2 6 2 39 9 Orie paip WING these ty ea A 2 7 2 3 4 TWO Pall WINING ente tie e e re dese e a iet tee be onere 2 8 2 Parallel 2 9 2 4 1 FXaN 1N 485 BD and FXoN 485ADP ii 2 9 DAD Only EXON OAD ai ra 2 10 2 4 3 FX2N 1N 485 BD and FX2N 1N 485 BD a aloe 2 11 24 40nly PXOAOAW siliconi 2 12 ZEN CHAM TE 2 12 Ss SPEC NON S a M LUAM INERMIS ME 3 1 3 T Specifications of COMMUNICATION teles 3 1 3 2 Gomm nicati n LME siede lola addii 3 2 mE Ker MILI 3 2 3 2 2 Parallel Mk x ito tte trm retro oon Ete alay ssh een 3 2 3 2 3 Computer link cite on iuit eee itid Dep eite eal dc Det Lie eaten cesa ded added 3 3 MITSUBISHI vii FX communication 4 NN NG TWOTK CRI 4 1 4 1 Related Flags and Data RegisterS i 4 1 4 1 4 1 2 0 Registers eii e ees RA 4 2 2 2 SEDI a oso tete iL ua sqa erede te dues MLA a eMe Lu o eel 4 3 4 2 1 Setting the Station No D8176 ie 4 3 4 2 2 Setting Total Number of Slave Stations D8177 4 3 4 2 3 Setting the Refresh Range 08178 sse 4 4 4 2 4 Setting Retry Count D8178
12. Usage One pair wiring Two pair wiring No protocol Half duplex communication e Use RS instruction 1 Full duplex communication 3 It is necessary to set the message wait in 70 ms or less Usecompuleriki Use on demand function x O Parallel link 4 e O N N network O x Recommendation O OK x Can not use 1 When this product is added to the system please match the wiring to the existing method of the system 2 When using FX2N 485 BD with this wiring method remember to take account of or ignore the echo of the commands sent from the FX2N programmable controller 3 Please use FX2N programmable controller and FX2N 485 BD together Full duplex the combination cannot be achieved in other configurations 4 For wiring of parallel link see section 2 4 Terminal Resistor A terminal resistor must be used at both ends of the communication line as described in section 2 3 3 and 2 3 4 1 In the case of two pair wiring connect the terminal resister Orange Orange Brown 3300 1 4W between terminals SDA and SDB as well between 32300 terminals RDA and RDB Use the resistors offered as accesso 1 4W ries of the product 2 the case of one pair wiring connect the terminal resister 1100 1 2W between terminals RDA and RDB Use the resis tors offered as accessories of the product Brown li Bro MITSUBISHI 2 6 FX
13. Using a peripheral equipment check the communication setting by parameters If a non pro cedure protocol RS instruction or dedicated protocol is selected in the setting clear the set ting using the peripheral equipment 2 When an RS instruction is used in the program delete the RS instruction turn off the power of the programmable controller then turn it on again 12 7 2 FX2n FX2Nc whose version is V 2 00 or later If an RS instruction is used in the program make sure that it is not executed If it is executed the RS instruction has the priority MITSUBISHI 12 8 FX communication Appebdix A 1 Introduction 2 Wiring 3 opecifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Appebdix A MITSUBISHI FX communication Appendix A Appendix A Further Information Manual List Table A 1 Further Information Manual List Manual name Manual No Discription FX1s Hardware Manual JY992D83901 This manual contains written hardware explanation of wiring installation and specification etc regarding the FX1s Ser
14. when send is complefed Never reset this request by a program Set send request etion Maida Transfers the receive data to the dedicated save area The receive completion flag M8123 RST M8128 should not be reset in a program of confinuous operation Reset receive completion flag Though an RS instruction can be used in a program as many times as you want Note make sure that only one RS instruction is driven at a time Two or more RS instruc MITSUBISHI tions cannot be turned on at one time For changeover assure the OFF time is equivalent to or longer than one cycle time In the FXon FX1s FXin FX and FX2c assure the OFF time is equivalent to or longer than two scan times between completion of send and start of receive or between completion of receive and start of send In the FX2n and 2 whose ver sion is earlier than V 2 00 assure the OFF time is equivalent to or longer than 100 us between completion of send and start of receive or between completion of receive and start of send Refer to Paragraph 9 2 1 This OFF time is not required in the FX2n 2 whose version is V 2 00 or later because full duplex communication is enabled While an RS instruction is driven modification of the setting of the D8120 is not accepted Turn off the RS instruction then modify the setting 9 2 FX
15. D490 K100 ADD Do D2 D490 MIO X010 Y010 gt 5 X0I0 Mov T DIA D500 D500 END END Note In the normal mode FNC 81 PRUN instruction can be used for However This instruction is only supported FX FX2c FX2N MITSUBISHI 5 4 FX Series Programmable Controllers Communication format D8120 6 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format 08120 7 Computer link 8 Commands for computer link 9 RS instruction 10 FX2N 232IF 11 Optional programming port 2 Diagnostics gt Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Communication format D8120 6 MITSUBISHI FX communication Communication format 6 6 6 1 6 2 6 2 1 6 2 2 Communication format D8120 This chapter explains setting the communication between no protocol communication RS instruction and computer link For the RS instruction refer to Section 9 For computer link refer to Sections 7 and 8 What Is Communication Format The communication format decides the communication setting data length parity and baud rate etc between computer link and no protocol communication RS instruction The communication format can be se
16. MITSUBISHI FX communication Wiring 2 2 Wiring For the terminal layout when using a communication unit refer to the individual units manual 2 1 Caution 2 1 1 Common 1 This system is designed to read and write data forced on off while the programmable con troller is running If abnormal data is written into the programmable controller due to effects of noise the pro grammable controller may malfunction and cause machine trouble or an accident There fore observe the following cautions Do notlay signal cables near high voltage power cables or put them in the same trunking duct Otherwise effects of noise or surge induction are likely to take place Keep a safe dis tance of more than 100 mm from these wires Ground the shield wire or shield of a shielded cable at one point on the programmable controller Do not however ground at the same point as high voltage lines 2 Cut off phases of power source externally before installation or wiring work in order to avoid electric shock or damage of product 3 Replace the provided terminal cover before supplying power and operating the unit after installation or wiring work in order to avoid electric shock gt P gt 2 1 2 FX2N 485 BD To connect the RS485 422 unit use a shielded twist pair cable The cable model must be AWG 26 to 16 and the maximum tightening torque must be 0 6 N m 6 kgf cm If a cable other than the AWG 26 to 16 is used normal commun
17. Special data registers D D8000 D8255 D8000 D8255 Only CN000 to CN199 can be used C200 to C255 of 32 bit counter or high speed counter cannot be used Notes 1 When using bit devices specified in word units WR WW WT the number of the head device must be a multiple of 8 or if an octal device end in 0 e g X30 M24 2 The special auxiliary relays M8000 to M8255 and special data registers D8000 to D8255 can be read only write only and received for system use If an attempt is made to write outside the write enable range an error may occur in the programmable controller Accordingly for details of special auxiliary relays and special data registers see the programmable controller manual s MITSUBISHI 7317 FX communication Computer link 7 7 8 Example Computer Program for Loopback Test This is an example of a BASIC program for communication of the computer link using a com puter programmable controller 485PC IF and 485ADP N88BASIC of Nippon Electric Corpora tion is used Pleas see loopback test command see section 8 1 1 1 Setting of transmission specification Item Description Communication Half duplex communication method method Synchronizing Start stop synchronization method method Baud rate 9600 bps 7 Start bit 1 bit 8 D FX series Data length 7 bit Personal 485 5 S ubi compute
18. i 4 5 4 2 5 Setting Comms Time out D8179 ii 4 5 4 2 6 Program Used for Setting tritt iere ten lara lati 4 6 4 3 Example Progra usu u tendo ant rara 4 7 4 3 1 System Configuration ceret Peek a Debs 4 7 4 3 2 Operations tbe eed rediere eee cube DT teas 4 7 4 3 3 Example of Setting Program sis erretenean ep Pere conira deo alal 4 8 4 3 4 Example of Error Program iiie ett ECRIRE GR aa 4 8 4 3 5 Example of Operation Program ii 4 9 SM an MN IEEE 5 1 5 1 Related Flags and Data Registers oio rt e uie HS 5 1 5 2 Mode and Link Device rr na 5 2 5 2 1 Normal Mode Special auxiliary relay M8162 OFF 5 2 5 2 2 High Speed Mode Special auxiliary relay M8162 ON 5 3 5 3 Example PIOGEalti oiu ete ep Eo aer oc e laici pair ili ia dico 5 4 5 3 1 eat 5 4 5 3 2 High Speed Mode u s i ee eee ee a 5 4 6 Communication format D8120 a a eee 6 1 6 1 What Is Communication Format eet ig eo 6 1 6 2 Related Flags and Data RegistersS 6 1 6 2 1 Special Auxiliary Relays ii 6 1 6 2 2 Speclal
19. BFM 1001 D202 4 3 BFM 1002 D203 65 BFM 1003 D204 8 7 BFM 1004 SR D205 9 gt 1005 E Mo gt Send receive enable Initial pulse NC contact 1 0 monitor FNC 78 Read of status FROM 4 BFM 28b15tob0 gt 2510 M10 Block No BFM No Transfer Number of M10 destination transfer points CY D LC etion Status monitor upon necessity 1 Error occurrence GLO X001 M3 Error reset Error reset input C M11 Read of receive buffers M KO 2001 0301 K4 BFM 2001 D301 Receive 2002 D302 comple BFM 2003 D303 tion BFM 2004 D304 Receive completion reset command M8000 FNC 79 Transfer of command i TO KO K1 KIMO K1 3 to gt BFM 1 b3 to b0 10 21 FX communication 2 232 10 4 Operation chart M0 BFM amp 1 b0 Send receive enable M1 BFM 1 b1 Send command 8 BFM 13 5 4 Number of remaining 3 2 1 Send lt send data cx Send completion status is also reset by next send command ETX STX 1001 lower 1003 lower 1003 upper 1004 lower 1004 upper 1005 lower BFM 1001 to 1256 Send buffers 1001 upper 1002 lower 1002 upper lt 1000 X M10 BFM 28 60 Send byte count Send completion Number of receive 1 buffers 0 BFM 14 pi biagi aisi
20. M10 BFM 1 60 BFM 1 b1 Send command 2 2321 10 BFM 13 Number of remaining send data co gt co BFM 1001 to 1256 Send buffers 1003 lower 1004 lower 1005 lower 1006 lower 1007 lower 1008 lower 1009 lower ETX 1002 lower Send completion status is also reset by next send command STX BFM 28 b0 Send completion 1001 lower BFM 14 Number of receive buffers BFM 2000 Receive byte count Contents of receive buffers are also cleared BFM 2001 to 2256 Receive buffers ETX 2001 lower 2002 lower 2003 lower 2004 lower 2005 lower 2006 lower 2007 lower 2008 lower STX ETX BFM 28 b1 Receive completion BFM 1 b2 Receive completion reset command MITSUBISHI 10 26 FX Series Programmable Controllers Optional programming port 11 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 FX2N 2321F 11 Optional programming port 12 Diagnostics A Fu
21. 10 X000 PLS M1 Send command Send command input MI FNC 12 Send byte count mov K9 P 200 k9 D200 FNC 12 Vi 1 MOV HCA D201 1 Program as follows in the same way PT 3 203 3 MOV HBA D204 4 gt as 9 bytes MOV HDD D205 5 MOV H20 D206 6 MOV HC3 D207 7 MOV HBD D208 8 MOV HC4 D209 9 27 79 Transfer of send byte count and send data KO 1000 D200 K10 D200 K9 BFM 1000 D205 5 BFM 1005 TO D201 1 BFMiH001 D206 6 BFM 1006 D202 2 gt 1002 D207 7 BFM 1007 D203 3 BFM 1003 D208 8 BFM 1008 D204 4 BFM 1004 D209 9 BFM 1009 M8000 M8003 m Mo Send receive enable A Initial pulse NC contact I FNC 78 Read of status FROM K28 10 K1 28 015060 gt M25 to M10 0 Block BFMNo Transfer Number of destination transfer points M10 YO Status monitor upon necessity 1 Error occurrence X001 Error reset Error reset input M11 FNC 78 ead of receive buffers FROM K2001 0301 BFM 2001 D301 BFM 2005 D305 Receive 2002 D302 BFM 2006 D306 comple 2003 D303 BFM 2007 D307 tion 2004 D304 BFM 2008 D308 M2 Receive completion reset command M8000 FNC 79 Transfer of command L KO KT KIMO Kt M3toMo b3 to b0 a MITSUBISHI 10 25 FX communication 4 Operation chart M0 A Receive lt Mt
22. FX Series Programmable Controllers Commands 8 MITSUBISHI FX communication Commands 8 8 Commands This chapter describes the structure and gives examples for each command of the dedicate pro tocol See also Chapter 7 Communication using Dedicated Protocols The reference pages for command are given below Command Description Section BR Bit devices read in units of 1 point 8 1 WR Bit devices read in units of 16 points or word devices read in units of 1 point 8 2 BW Bit devices written in units of 1 point 8 3 WW Bit devices written in units of 16 points or word devices written in units of 1 point 8 4 BT Bit devices specified in units of 1 point and set reset forced on off 8 5 WT Bit devices specified in units of 16 points and set reset forced on off or word 8 6 devices specified in units of 1 point and data written RR Programmable controller is started RUN by remote control 8 7 RS Programmable controller is stopped STOP by remote control 8 7 PC Programmable controller type name code is read 8 8 GW Global signal is turned on off on all linked programmable controllers 8 9 NR On demand function Send request is issued from the Programmable controller 8 10 There is no command TT Characters received from the computer are directly returned to the computer 8 11 MITSUBISHI 8 1 Commands 8 FX communication 8 1 Batch Readof Bit Device
23. Note Note the term completed equipment refers to a third party constructed device which contains or uses the product associated with this manual Notes on the Symbols Used in this Manual At various times through out this manual certain symbols will be used to highlight points of information which are intended to ensure the users personal safety and protect the integrity of equipment Whenever any of the following symbols are encountered its associated note must be read and understood Each of the symbols used will now be listed with a brief description of its meaning Hardware Warnings 1 Indicates that the identified danger WILL cause physical and property damage 2 Indicates that the identified danger could POSSIBLY cause physical and property damage 3 Indicates a point of further interest or further explanation OPE o s o S gt o 4 Indicates special care must be taken when using this element of software 5 Indicates a special point which the user of the associate software element should be aware of 6 Indicates a point of interest or further explanation MITSUBISHI v FX communication Under no circumstances will Mitsubishi Electric be liable responsible for any consequential damage that may arise as a result of the installation or use of this equipment All examples and diagrams shown in this manual are intended only as an aid to understand ing the
24. pr sg B l Ls de ge MEME 6 a B15 Bi4 Bi2 B11 B10 B9 B8 B7 B6 BS B4 B3 B2 Bi BO 15 Bi4 Bi2 Bio B9 B8 B7 B6 85 B4 B3 B2 Bi BO 1101110 1 01 1 01 01 110 0 0 1 110 11010 11711010 1 113011 1 1 1 1 l l l l 1 1 1 1 li 1 l 1 l MMMM MM MM 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 Head device Lowest bit of 1st word Lowest bit of 2nd word 1 Represents ON 0 Represents OFF MITSUBISHI 744 FX communication Computer link 7 7 6 2 Word Device Memory When handling word device memory each word is expressed as 4 hexadecimal digits each of 4 bits starting with the higher digit Each digit being represented by the appropriate ASCII charac ter Example 1 When showing the contents of data registers D350 D351 Head device Data Data D0350 JPNS 15 170 44H 35H 30H 30H 35H 36H 41H 42H R po 06 B15 B14 B13 B12 B11 Bio B9 B8 B7 B6 B5 B4 B2 Bo B15 14 B13 B12 Bio B9 B8 B7 B6 BS B4 B3 B2 BO 01 1 10 1 011 7170 170 110 110371 71 0 70 0 1 0 131371 0 0 0 0 121 11 11 I A E v Contents of D350 is 56ABH Contents of D
25. 0 No used The communication format is determined on the rising edge of the send receive enable com mand BFM 1 60 Accordingly the setting of the communication format should be preliminary transferred using the TO instruction before BFM 1 is turned on Also the send header and the send terminator are determined in the rising edge of the send command BFM 1 b1 The receive header and the receive terminator are determined on the rising edge of BFM 1 bO or on the rising edge of the receive completion reset command BFM 1 b2 Accordingly when only the header and the ter minator exclusively are changed it is not necessary to turn BFM 1 bO off The change becomes valid form the next send receive operation MITSUBISHI 10 4 FX communication 2 232 10 Note Setting example hexadecimal constant specification Data length 8 bits b5 bi2 bit b8 b7 b4 b3 b0 Stop bit 1 bit BFM 0 o 1 o o o o olo o t1 t o o o 1 4 Baud rate 2400 bps 4 0 6 3 Control line No used 4063 H CR LF No added M8002 FNC 79 Sum check No added TO KO Ko H4063 Kd ASCII HEX conversion No used pulse Block BFM Set Number of value transfer Buffer data length 8 bits points 1 Communication format Sele
26. 1 The input points X000 to X003 M1000 to M1003 in the master station are output to the out put points YO10 to YO13 in the stations Nos 1 and 2 The input points X000 to X003 M1064 to M1067 in the station No 1 are output to the output points YO14 to YO17 in the master station and the station No 2 The input points X000 to X003 M1128 to M1131 in the station No 2 are output to the output points YO20 to Y023 in the master station and the station No 1 The data register D1 in the master station is specified as the set value of the counter C1 in the station No 1 The contact M1070 status of the counter is reflected on the output point 005 in the master station The data register D2 in the master station is specified as the set value of the counter C2 in the station No 2 The contact M1140 status of the counter C2 is reflected on the output point 006 in the master station The value of the data register D10 in the station No 1 and the value of the data register D20 in the station No 2 are added in the master station and saved to the data register D3 The value of the data register D10 in the master station and the value of the data register D20 in the station No 2 are added in the station No 1 and saved to the data register D1 1 The value of the data register D10 in the master station and the value of the data register D10 in the station No 1 are added in the station No 2 and saved to the data register D21 MITSUBISHI
27. 1 max device No The station number PC number number of devices and sum check code are expressed in hexadecimal 2 Specification examples a Example 1 To write to 32 points from M640 to M671 at station No 0 with message wait time set to 0 ms E 0 0640 022347 96 05 Q Computer 05H 46H 57H 57H 34H 82H 33H 37H 41H 42H 39H 36H 35H ee The sum check is calculated d cla sE over this range K 46H y 01071 11 1 11 MMM MMMMMMM MMMM 666 6666666 6666 555 4444776 5555 543 3210109 9876 Notes Command WW uses word units When writing 32 points the number of devices is specified by 02 16 points bits per one word unit a MITSUBISHI 8 6 FX communication Commands 8 b Example 2 To write to data to two points DO and D1 at station No 0 with message wait time set to 0 ms E FF 000000 021234 ACD7 IF 9 Q Computer 05H 30H 6H 46H 7 44H 30H 30H 1 32H 33H 34H 41H 43H 37H 46H 39H Programmable v A controller 3 C 05
28. 4 Send header lower 2 bytes 0 no header 5 Send header upper 2 bytes 4 bytes max zero suppression 0 W 6 Send terminator lower 2 bytes 0 no terminator 7 Sendterminator upper 2 bytes eyes SUPESSSION 0 W 8 Receive header lower 2 bytes 0 no header 9 Receive header upper 2 bytes A bytes Max zero Suppression 0 Receive terminator lower 2 10 bytes 0 no terminator 11 Receive terminator upper 2 SUPPE RION 0 bytes Receive suspension waiting 12 time in interlink connection 0 0 to 512 when data length is 16 143 Number of remaining send bits 0 R data 0 to 256 when data length is 8 bits 14 Number of receive buffers to 256 15 1 0 R 15 Send sum result 0 R 16 Receive sum result 0 R Note W For write can be used for read also Undefined BFM Nos are not allowed to be used in program 1 Spare buffers used in the interlink connection mode a MITSUBISHI 10 2 FX communication FX2n 232IF 10 BFM Initial R For read No SELE Setting range value W For write 20 Time from CS ON to send start O to 32 327 X 10 ms 0 W Time from completion of actual 21 RS OFF 0 to 32 327 X 10 ms 0 W completion flag ON 28 Status 0 R 29 Error code 0 R 30 Model code K7030 R 0 to 512 when data length is 16 bits 1000 Send byte count 0 to
29. 9 18 TO AP AONE E n OR au stc UR M dae RN O 10 1 iiie o ERR QUA UR En GER ORUM NE DELE 10 1 10 11 Outline of Product i di ttti tet ttbi deter tesi aisi 10 1 10 2 Allocation of Buffer Memories 5 10 2 10 21 BEM EISE oiii Eee es ete a bum ote med fa iei aa 10 2 10 2 2 Communication Format lt BFM 0 gt i 10 4 10 2 3 Gomimand4BEM H1 ce coL C EA Me ue 10 8 10 2 4 Receive Upper Limit Byte Count BFM 2 ii 10 9 10 2 5 Receive Time out Time lt BFM 3 gt e 10 9 10 2 6 Send Header BFM 5 upper BFM 4 IOWEr gt 10 9 10 2 7 Send Terminator BFM 7 upper BFM 6 10 gt i 10 9 10 2 8 Receive Header BFM 9 upper BFM 8 gt i 10 10 10 2 9 Receive Terminator BFM 11 upper BFM 10 gt 10 10 10 2 10 Receive Suspension Waiting Time BFM 12 gt i 10 10 10 2 11 Number of Remaining Send Data BFM 19 gt i 10 11 10 2 12 Number of Receive Buffers BFM 14 gt ie 10 11 10 2 13 Send Sum Result BFM 15 gt iii 10 11 10 2 14 Receive Sum Result BFM 16 gt nnns 10 11 10 2 15 Time from CS ON to Send Start BFM 20 gt i 10 12 10 2 16 Time from Completion of Actual Send to RS OFF completion flag ON BFM 221 1
30. Send receive _ ON enable BFM 1 b0 DR DSR ON 1 4 BFM 21 X10ms 2 Send OFF ON command BFM 21 9 BFM 1 b1 10 NS RS RTS OFF ON CS CTS OFF ON Send data OFF Data 2 SD TXD lt gt 20 Send OFF X10ms 3 completion AS BFM 28 b0 21 21 2 Receive data X10ms RD RXD Receive completion BFM 28 b1 i Receive OFF completion reset lt The receive wait 4 BFM 1 b2 stafus is started OFF 1 Turn off using a program When it is not turned off the next data cannot be sent 2 Time set by BFM 21 x10ms 3 Time set by BFM 22 x10ms 4 Turn off using a program When it is not turned off the next data cannot be received 5 After receive is completed and the receive data is read turn off the receive completion flag BFM 28 b1 using a receive completion reset command BFM 1 b2 10 MITSUBISHI 10 17 FX communication 2 2321 10 10 3 3 Interlink Mode Setting BFM 0 b9 b8 1 1 Send receive OFF ON enable BFM 1 b0 DR DSR OFF ON N _ 1 Send command OFF ON 2 BFM 1 b1 f OFF 2 CS CTS BFM 20 X10ms 3 BFM 20 X10ms 3 Send dat ET
31. 1 D219 to D255 Not used For internal processing Ready only W Write only M Master station L Slave station 1 The number of communication errors occurred in its own station cannot be counted in the CPU error status the program error status or the stop status 2 No in accordance with the slave station No Slave station No 1 is D204 D212 slave station No 2 is D205 D213 Slave station No 7 is D210 D218 3 No in accordance with the slave station No Slave station No 1 is D8204 D8212 slave station No 2 is D8205 D8213 Slave station No 7 is D8210 D8218 Note a MITSUBISHI Devices M503 M511 and 0201 0255 in the FXon and 1 cannot be applied for other usage in the user program These devices are used by the N N network FX communication N N network 4 4 2 Setting Each settings for the N N network become valid when the program is run or when the power of the programmable controller is turned on 4 2 1 Setting the Station No 08176 Set a value 0 to 7 to the special data register D8176 Set value Description 0 Master station 1107 Slave station No Example 1 is slave station No 1 2 is slave station No 2 4 2 2 Setting the Total Number of Slave Stations D8177 Set a value 1 to 7 to the special data register D8177 Default 7 This setting is not required for the slave station Set value Descripti
32. 3 Check the NAK error code and programmable controller error code Please see the following section 12 4 1 and section 12 4 2 MITSUBISHI 12 5 12 FX communication Diagnostics 12 12 5 RS Instruction 12 5 1 Diagnostics 1 2 Check the status of the RD RXD LED and the SD TXD LED provided in an optional equip ment If the RD RXD LED is not lighted while data is received or the SD TXD LED is not lighted while data is sent check the installation and the wiring When the RD RXD LED is lighted while data is received or the SD TXD LED is lighted while data is sent the installation and the wiring are correct Make sure the timing of data send receive For example make sure that the counterpart equipment is ready for receive before starting to send data to it When the terminator is not used check whether the send data capacity is equivalent to the acceptable data capacity If the send data capacity may be changed use the terminator Make sure that the external equipment is correctly operating Check whether the type of send data and the type of receive data are equivalent If they are different make them equivalent When two or more RS instructions are used in the program make sure that only one RS instruction is actuated in one operation cycle Never turn off the RS instruction while data is received or sent In the FX2N Series V 2 00 or later an RS instruction is not executed if the counterpart equipment receives
33. 78 56 mi BFM 2000 2 4 sss Sl Receive byte count 0 Contents of receive buffers are also cleared When not reset Receive lt i BFM 2001 to 2256 u ETX STX ETX 2001 lower 2001 upper 2002 lower 2002 upper 2003 lower 2003 upper 2004 lower 2004 upper Receive buffers SN BFM 2 M11 BFM 28 b1 Receive upper Receive completion limit byte count 22 BFM 1 b2 M2 Receive completion reset command AL MITSUBISHI 10 22 FX communication 10 4 2 Example of 8 Bits Data Communication 2 2321 10 This system configuration describes an example in which data of 8 bit buffer length is sent and received between the equipment of the terminal specifications In this example the ASCII code saved in the data registers D201 to D209 in the programmable controller is sent to the counter part equipment and the data received from the counterpart equipment is saved to the data regis ters D301 to D308 in the programmable controller 1 System configuration FX programmable contraller FX an 232lF Cross cable 2 Example setting buffer memories This items not described here are set to the default respectively a Communication format lt BFM 0 gt
34. FE auto on demand data matically attached This can be used to identify on demand data Data processing C Completion of Receive t a MITSUBISHI 8 16 FX communication Commands 8 3 On demand request time chart When the computer is transmitting data E A N b On demand data C Q K Computer Programmable controller IT 7 X On demand execution flag M8127 bl Start on demand rogrammabie writing of the on controller demand data length a When on demand is requested the on demand execution signal special M8127 is immediately turned on b Transmission of on demand data is forced to wait until completion of reception of com mand data ENQ from the computer c Transmission of response data STX to command data ENQ is forced to wait until completion of transmission of on demand data When the computer is receiving data e N On demand data C Q K Computer Programmable S controller T X On demand execution flag M8127 Start on demand Programmable writing of the on controller demand data length a When on demand is requested the on demand execution signal special M8127 is immediately turned on b Transmission of on demand data is forced to wait until completion of transmission of response data STX to the command data ENQ from the computer C Transmission of
35. FX communication RS instruction 9 2 Use terminal mode of control line This mode is available for send only or receive only a Send only RS instruction driving OFF ON Send data SD TXD Send request M8122 ER DTR DR DSR b Receive only RS instruction driving OFF ON Receive data RD RXD Data 1 Data 2 ER DTR OFF ON Receive y completion OFF ONY x ON ON M8123 Reset using a program When it is not trurned off the next data cannot be received MITSUBISHI 9 6 FX communication RS instruction 9 3 Use normal mode 1 of control line RS instruction driving 50 c Data 3 Send request OFF ON M8122 I Send wait OFF flag M8121 J ER DTR OFF ON Receive data SU et Receive OFF ON Y completion N M8123 i Reset using a program When it is not trurned off the next data cannot be received DR DSR OFF ON This period should be 100 us or more When using FX1s FXon FX or FX2c this period should be 2 scan times or more MITSUBISHI 9 7 FX communication 4 Use normal mode 2 of control line FX FX2C only RS instruction driving Send data SD TXD Send request M8122 Send wait
36. FXon FX2NC Max 500m 2 FXoN 485ADP FX1N FX1N 485 BD 1 FX1N 485 BD 1 RS485 RS232C signal convertor becomes necessary for a case of RS485 interface for com puter connection 2 When using FX1N 485 BD FX2n 485 BD in system total extension distance max 50m But RS485 RS232C signal convertor become necessary for a case of RS232C interface for computer connection 8 This system configuration can achieve full duplex communication or the half duplex communi cation 4 This system configuration achieve only half duplex communication 1 3 Supporting Function and Version Items FX2N FX1in FXis FXon FX FX2c N N network V2 00 or more No sport Parallel link All versions All versions versions Computer link All versions V1 20 or more V3 30 or more No protocol Use RS instruction versions V3 00 or more communication Use FX2n 2321F Not supported MITSUBISHI FX Series Programmable Controllers Wiring 2 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Wiring 2
37. Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers N N network 4 MITSUBISHI FX communication N N network 4 4 N N Network For diagnostics please refer to chapter 12 4 1 Related Flags and Data Registers 4 1 1 Auxiliary Relays Auxiliary relays R Attribute FXoN FXiN FX2N Name Description type 15 FX2NC N N network Used to set N N network oue parameter setting parameters Mal Communication error of When communication error is R M504 M8183 master station in master station this is ON 1 L R M505 to M8184 to Communication error of When communication error is ML 511 2 8190 slave station in slave station this is ON 1 i mnm When communicate to other R M503 M8191 Data communication station this is ON M L Ready only W Write only Master station L Slave station 1 The number of communication errors that have occured in each station cannot be counted in the CPU error status the program error status or the stop status 2 No in accordance with the slave station No Example FXON FX1S Slave station No 1 is M505 Slave station No 2 is M506 gt Slave station No 7 is M511 FX2N FX2N FX1N Slave station No 1 is M8184 Slave station No 2 is M8185 gt Slave station No 7 is M8190 Note Devices M503 to M511 in the FXon and FX
38. MITSUBISHI FX communication Specifications 3 3 Specifications 3 1 Specifications of Communication Computer link dedicated protocol Conforming to RS485 and RS422 or RS232C N N network Parallel link No protocol communication Tane mission standard Conforming to Conforming to RS485 RS485 and RS422 ne RS485 RS422 500 Transmission distance Max 500m RS232C Max 15m ee 1 N Total station is 232 1 1 Connected the number Max 8 stations Li N aa RS485 1 N FX FX2c FXoN FX1N FX1S half duplex communication Communication method Half duplex communication FX2N FX2NC 2 full duplex communication Data length 7 bit 8 bit Parity Fixation None Odd Even Stop bit 1 bit 2bit Baud rate bps 38 400 19 200 300 600 1 200 2 400 4 800 9 600 19 200 Header character E Fixation Terminator character None effective Control line Format 1 Protocol Eormat4 None None Sum check Fixation effective Supported programmable FX2N FX2NC controller FX1N 1 FXON 1 FXen FX2nc FXin FX1s and FXon supported 2 If using FXon 485ADP this system is half duplex FX2N FX2NC FX1N FX1S FXon FX FX2c MITSUBISHI 3 1 FX communication Specification 3 3 2 Communication Time 3 2 1 N N network Communication device Pattern 0 Patter
39. Operation 3 Operation 4 Operation 5 Operation 6 8 Operation 7 4 10 FX communication Program of slave station No 2 Counter reset a MITSUBISHI X001 Il RST C 2 Master communication error M8183 MOV K1M1000 K1Y010 Slave 1 communication error M8184 MOV K1M1064 K1Y014 MOV K1X000 K1M1128 Slave 1 Contact of communication slave 1 C1 error device M8184 M1070 95 Y005 Counter input X000 2 D C2 8 Y006 PPN M1140 MOV 10 D 20 Slave 1 communication error M8184 T ADD DO D 10 D 21 END N N network 4 Operation 1 Operation 2 Operation 3 Operation 4 Operation 5 Operation 6 7 FX communication N N network 4 MEMO MITSUBISHI 4 12 FX Series Programmable Controllers Parallel link 5 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Paralle
40. flag M8121 ER DTR DR DSR Receive data RD RXD Receive completion M8123 RS instruction 9 OFF ON OFF 1 li Check OFF ES FF NM A Check SL OFF em or ON 1 Please turn off ER DTR of DR DSR later 2 When finished to send data please turn off DR DSR When it is not turned off the next data cannot be communicated 8 When sending data to the programmable controller please check to turn off the ER DTR signal 4 Reset using a program When it is not turned off the next data cannot be received 5 This period should be 2 scan times or more MITSUBISHI 9 8 FX communication RS instruction 9 9 2 2 FX2N FX2Nc V 2 00 or later In the FX2N of V 2 00 or later full duplex communication is performed When performing half duplex communication pay rigid attention so that the send flag is not turned on while data is received If it is turned on send is started As the result the counterpart equipment may not be able to receive data or the send receive data may be damaged In the full duplex communication the send wait flag M8121 is not turned on In the version V 2 00 or later the programming protocol Section 12 is supported while an RS instruction remains OFF 1 Do not use hardware hand shake RS i
41. the the DIP switches of your printer Datasend contents of D200 to D210 are sent Check your printer manual for to the printer and test line is how to configure the serial printed communications a MITSUBISHI 9 16 FX communication RS instruction 9 4 Example program 8161 Handled by 8 bit data rice MOV_ Ho06F_ D8120 Setting communication format _ _ RS 010 K11 1050 RS instruction driving ES MPS MO N 0 6 F MOV jH0074 010 gt Writing send data MOV 1 006 D17 MOV 0065 018 MOV HO000D D19 H000A Send request MITSUBISHI 9 17 FX communication RS instruction 9 9 5 Supporting RS Instruction and Programming Protocol When using RS instruction in conjunction with the FX2N 232 BD or FXon 232ADP the user can switch between using no protocol communication and the programming tool programming proto col under the following conditions Accordingly when data is received from counterpart equipment while an RS instruction remains OFF NAK will be sent back to the counterpart equipment 9 5 1 Programmable Controller and Version Supporting Version 2 V2 01 or more FX2NC All products V2 01 or more 9 5 2 Operating Conditions and Format Set Content The programmable controller can change from usi
42. 0 0 9 F 009F H 10 19 FX communication b Command lt BFM 1 gt M0 gt b0 Send receive enable ER ON M1 b1 Send command M2 gt b2 Receive completion reset command M3 b3 Error reset 2 2321 10 c Receive upper limit byte count lt BFM 2 gt 8bytes d Header and terminator lt BFMs 4 to 11 gt BFMs 4 and 8 send receive header 02H STX BFMs 6 and 10 send receive terminator 03H ETX e Status BFM 228 b0 M10 Send completion b1 M11 Receive completion b2 M12 Receive time out 53 gt 13 occurrence b4 M14 Receive suspended b5 M15 Undefined b6 M16 Being sent b7 M17 Being received f Send byte count BFM 311000 9 bytes g Send buffers BFMs 1001 gt 9 byte send data 123456789 is prepared in ASCII code in accordance with the send byte count specified above BF BF BF BF M 1001 M 1002 M 1003 M 1004 10th byte is not sent BF M 1005 Upper byte b8 M18 RS RTS b9 M19 ER DTR b10M20 Undefined b11 M21 Undefined b12 M22 DR DSR b13 M23 CD DCD b14 M24 CS CTS b15 M25 CI RI Lower byte 2nd byte 1st byte 2 32 H 1 81 H 4th byte 3rd byte 4 34 H 3 83 H 6th byte Sth byte 6 36 H 5 35 H 8th byte 7th byte 8 38 H 7 37 H 10th byte 9th byte Pie ue 9 39 H h Receive buffers BFMs 2001 gt 8 byte receive data specified in accordanc
43. 256 when data length is 8 bits 0 W 1001 to Send buffers 0 W 1256 2000 Receive byte count pus M 4 0 R 2000 to Receive buffers 0 R 2256 257 Spare receive buffers for interlink __ 0 R 2271 connection mode Note W For write can be used for read also Undefined BFM Nos are not allowed to be used in the program 1 Spare buffers used in the interlink connection mode MITSUBISHI 10 3 10 FX communication 10 2 2 Communication Format lt BFM 0 gt 2 2321 10 Bit Description 0 1 Initial value b0 Data length 7 bit 8 bit 1 8 bit b1 b1 00 None b2 Parity 01 Odd 11 Even 11 Even b3 Stop bit 1 bit 2 bit 0 1 bit b4 0011 300 b4 0100 600 b5 0101 1200 b6 Baud rate bps 0110 2400 1000 9600 bps b7 0111 4800 1000 9600 1001 19200 b8 b8 00 A b9 Control line 01 Standard RS232C 00 No used 11 RS282C interlink connection mode b10 b10 00 added b11 Addition of CR and LF 01 CR only 00 No added 11 CR and LF b12 ati 00 No available Availability of check E b12 01 ASCII HEX conversion available b13 RA 10 Check sum available 00 No available 11 Check sum available ASCII HEX conversion available Send receive buffer b14 data length 16 bit 8 bit 0 16 bit b15 No used
44. 4 8 Response 7 6 Program Device memory 5 Write information Write Device Programmable memory etc controller CPU J dq o o vc information Write Request OS operating system is the software for operating or using effectively the resources such as the CPU memory terminal file and network MITSUBISHI 74 FX communication 3 Programmable controller sends data to the computer Computer RS232C 6 Data 485PC IF On demand data RS485 5 Computer link 7 485ADP 4 Data lt Programmable controller Program Data 9 2 Read 1 Send Raza 7771 request data write OS operating system is the software for operating or using effectively the resources such as the CPU memory terminal file and network MITSUBISHI FX communication Computer link 7 7 2 7 2 1 7 2 2 Information Needed Before Programming Programmable Controller Operation The operation and scan time of programmable controller by the computer link are as follows While the programmable controller is running access requests to the programmable controller from the computer are processed on every END processing The processing of Send or Receive data is performed using interrupts Therefore during the proce
45. Data RS instruction 9 When M8161 is set to OFF M8161 is shared by an ASCII instruction a HEX instruction and a CCD instruction OFF during RUN OFF A m n lt 16 bit data Upper 8 bits Lower 8 bits 16 bit data is divided into the ower 8 bits and the upper 8 bits then sent or received RS D200 K 4 D500 K10 Send data STX D200lower 0200 upper 0201 lower D201 upper ETX Header Terminator External Head address specified by equipment ke Sendbytecout 3 specified by m Cini STX D500 lower 0500 upper D501 lower D501 upper D502 lower D502 upper ETX xterna Header Terminator Pone Head address specified by controller lt It does not exceed the upper limit number E specified by n of receive data points byte count Receive is completed when the terminator ETX or n points are received 1 Send data and remaining number of send data Send data SD TXD Remaining number of send data D8122 se s 5 N o 3 23 x S S 5 5 x NINI NI N t5 4 3 2 1 0 2 Receive data and number of receive data Receive data RD RXD Number of receive data D8123 MITSUBISHI The number of receive s o sl La LA e 8 3 3 8 3
46. Data Register 5 cedo ai aaa aaa 6 1 6 3 Communication Format 08120 nnns 6 2 6 4 Example of setting program nnne 6 3 MITSUBISHI vii FX communication OM PUTS LINK 7 1 y Data Flow by LINK 7 1 7 2 Information Needed Before Programming 7 3 7 2 1 Programmable Controller Operation nnns 7 3 1 2 2 Notes of GOmpUter 5 x sintesi e ete teet a ia ste Ge de ala 7 3 7 3 How to Read a Control Protocol Diagram 7 4 7 4 Basic Formats of Dedicated Protocol boire obe desees 7 5 7 4 1 Control Protocol Format 1 7 6 7 4 2 Control Protocol Format 4 enne 7 7 7 4 3 Control Protocol Parts Explained i 7 8 7 4 4 Time out Check Tile en reta dich quee aa 7 11 7 5 Communication Timing Chart 7 12 7 5 1 Reading Data from Programmable controller i 7 12 7 5 2 Writing Data to Programmable Controller 7 12 7 58 Communication Time nocere Yen gre eic e h ea 7 13 7 6 Character Area Data Transmission seen 7 14 7 6 1 Bit Device Memory 7 14 7 6 2 Word Device Memory ii 7 15 7 7 Commands and Device Ranges 7 16 3 421 Comm
47. FX FX2c a MITSUBISHI FX communication Parallel link 5 5 3 Example Program 5 3 1 Normal Mode The ON OFF status of the inputs X000 to X007 in the master station is output to Y000 to Y007 in the slave station When the calculation result D0 D2 in the master station is 100 or less Y010 in the slave station is turned on The ON OFF status of to in the slave station is output to YOOO to Y007 in the master station G The value of D10 in the slave station is set to the timer TO in the master station Master station Slave station M8000 M8000 Tr 8070 gt M8071 MOV K2X000 K2M800 NERA MOV K2M800 Kevoo M8000 CMP D490 K100 M10 Q ADD DO D2 D490 NIE M8000 Mov KaM900 K2Y000 6G M8000 MOV K2M0 K2M900 3 X010 E T fai D500 MOV D10 D500 5 3 2 High Speed Mode When the calculation result D0 D2 in the master station is 100 or less YO10 in the slave station is turned on The value of D10 in the slave station is set to the timer TO in the master station Q Master station AE EM M8000 T 8070 8071 8162 M8000 de M8000
48. FX2N 2 FXin FX and FX2c programmable controllers can be per formed on a 1 1 basis for 100 auxiliary relays and 10 data registers With FX1s and FXoN data transfer is performed for 50 auxiliary relays and 10 data registers For a system configuration refer to Subsection 1 2 2 specifications refer to chapter 3 wiring refer to chapter 2 the setting and example program refer to chapter 5 diagnostics refer to chapter 12 Computer link Data transfer using dedicated protocol Data transfer with RS485 422 units can be performed on a 1 n 16 basis using the dedi cated protocol For system configuration refer to subsection 1 2 3 specifications refer to chapter 3 wiring refer to chapter 2 setting of communication format refer to chapter 6 dedicated protocol refer to chapter 7 amp 8 diagnostics refer to chapter 12 No protocol communication Data transfer using RS instruction Data communication with a diversified RS232C unit including personal computers bar code readers and printers can be performed using no protocol communications This communication uses RS instruction s or an FX2N 232lF special function block For system configuration refer to subsection 1 2 3 specifications refer to chapter 3 wiring refer to chapter 2 setting of communication format RS instruction and example program refer to chapter 6 and 9 diagnostics refer to chapter 12 When using the RS instruction for setting the communication format refer to ch
49. RDA ME L RDB RDB E 1 bb LINK i SG 7 i SG m HSG HSG eos eos Grounding of registance 100 Q or less 1 Ris the terminating resistor Connect the terminating resistor 3300 between terminals SDA and SDB and terminals RDA and RDB 2 Connect the shield of FX2n 485 BD FX1N 485 BD using shielded twist pair cable to ground 1000 or less Please adjust the grounding only to one side 3 Connect terminal FG to each terminal of the programmable controller main body grounded with resistance of 1000 or less However as for the computer link unit of the A series pro grammable controller see the manual of the computer link unit 4 When using RS232 485 or RS232 422 adapter please the adapter use FX 485PC IF MITSUBISHI 2 8 FX communication Wiring 2 2 4 Parallel Link 2 4 1 FX2N 1N 485 BD and FXon 485ADP 1 One pair Wiring FX2N 485 BD FX1N 485 BD 485 SDA SDA SDB SDB Terminating NEO BRA Terminating resistance registance 1100 RDB RDB 1100 LINK SG x SG ST en i i pronta E FG 1 1 Connect terminal FG to each terminal of the programmable controller main body grounded with resistance of 100Q or less 2 Two pair Wiring FX2N 485 BD FX1N 485 BD 485 SDA 7 SDA SDB SDB Terminating PDA PREA Terminating resistance reg
50. RDB RDB SG SG 2 Two pair Wiring FX2N 485 BD FX2N 485 BD FX1N 485 BD FX1N 485 BD SDA ma SDA SDB a SDB 2 RDA T RDA Terminating bg resistance gt so Hp ii se MITSUBISHI FX communication Wiring 2 2 4 4 Only FX2 40AW 1 SG Terminal of FX2 40AW connect to FX2 40AW FX2 40AW I e SG terminal of FX or FX2c main unit ili ai 2 Please connect the shield of shielded SB SB twist pair cable with terminal to which the programmable controller main se L1 unit is grounded Please adjust the 91 grounding only to one side FX FX2C main unit 2 4 5 2 40 FX2 40AP FX2 40AP T R R T NI Optical glassfiber cable Note Keep optical fibers away from wire cables carrying high loads Including where the cables are terminated a MITSUBISHI 2 12 FX Series Programmable Controllers Specifications 3 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Specifications 3
51. SD and RD signals without using the control line When standard RS232C mode b9 0 b8 1 is specified a cross cable is required to con nect the equipment of terminal specifications and a straight through cable is required to connect the equipment of modem specifications When RS232C interlink connection mode b9 1 b8 1 is specified the request to send RS signal functions as the signal to enable receive in 232IF When receiving data exceeding the receive upper limit byte count BFM 2 the 232IF sets the request to send RS signal to OFF and requests the counterpart equipment to suspend the send opera tion At this time when the data saved in the receive buffers is read to data registers in the pro grammable controller using the sequence program the remaining data can be received Make sure to perform the RS232C interlink connection when specifying this mode 4 b11 and b10 addition of CR and LF Set these bits as follows No added b11 0 b10 0 CR only is added b11 0 b10 1 CR and LF are added b11 1 b10 1 For the CR LF addition format refer to the communication format list shown above 5 b13 and 012 Availability of check sum and ASCII HEX conversion Set these bits as follows Neither the check sum nor the ASCII HEX conversion is available b13 0 b12 0 The ASCII HEX conversion only is available rr b13 0 b12 1 The check sum only is available ss sn rann nern
52. controller and is turned off when transmission of the specified data is complete This is used as an interlock so that multiple on demand requests can not be issued simultaneously a MITSUBISHI 8 15 FX communication Commands 8 8 10 2 On demand Control Protocol 1 Control protocol programmable controller On demand data transmission V Set the word byte data format Set on off special M8129 V ON byte units 8bits OFF word units 16bits V Set the on demand Write the data to be transmitted into data reg isters Reset the on demand error flag Turn off on demand error flag special M8128 If special M8128 is ON on demand can not V be started Start on demand ee On demand is started by writing the head device number where the data is stored into special M8127 and writing the data length into special D8128 When the request is received special M8127 is turned on and when transmission is com pleted the M8127 is turned off V Transmission error check eve If the on demand error flag special M8128 is ON the data was not transmitted due to a transmission error Error No error C Transmission Complete 2 Control protocol at computer C On demand Receive 2 Check that the received data is On demand data has a PC number of
53. d ca tp c ves erra Er ina 11 2 11 9 83Utlols WSC u L elisa ga u a 11 3 11 3 1 Cautions on Setting i 11 3 11 3 2 Cautioris On USC vote eee hcec aeu rasta eve c bri eet coves PE Ee cene he de br quad 11 3 DIGG jeter T 12 1 12 1 Common IIIS ario lei ai i e e a e a a EC PLI CD E ee ceu e dr 12 1 12 2N N NEtWOTK A efie mto ERR aree E Ea C pisa evt tients 12 2 12 2 Error Code xu tette ica opes tea Uta ds 12 2 12 2 2 DiagriOStiGS den ti iei eru Sei ase a 12 2 2 8 Parallel ebd RO Gb tad bec dco u RR c taces no db a od 12 3 12 31 DiagriOStiCS ice eet enr p me em eat eiue 12 3 124 Computer LINK cou obediant toti bm bie 12 4 12 41 Error GOQO ritieni repete c RE re Ee aaa 12 4 12 4 2 Programmable Controller Error Code a 12 4 Te o DiagrioStiCS apicali 12 5 125 RS INStFUCH ON teer ke desk deett batter dde rte bl T sies abs 12 6 12 5 DiagnoStiGS cin nter 12 6 Te 6 12 7 12 61 EtrOr GOde iie Poe RA b c rema ei ed b Pn e ad ae 12 7 12 6 2 DIagriOStiCs e pa ed E hem tate e n oae io 12 7 12 7 Using Optional Programming Port 12 8 12 7 1 FX1S FX1N and FX2N C earlier V2 00 emnes 12 8 12 7 2 FX2N FX2NC whose v
54. for FXON Head device No number of devices number of devices x 16 in the case of bit When reading 32 bit devices C200 to C255 the returned data is a double word The station number PC number number of devices and sum check code are To read 32 points of data from X040 to X077 at station No 5 with message wait time set to 100 ms E A le FF IWR 0 X 0040 02 48 The sum check is calculated ES FF Computer 05H 35H 46H 57H 52H 58H 30H 34H 30H 30H 32H B4H 38H ns range 35H 46H 46H Programmable lt gt S controller The sum check is calculated Tlos 1 23 4 ABCD 08 over this range X i X 02H 35H 46H B1H 32H 33H 42H 38H pl se 2 3 4 B 1 1 11 1 111 0 1 X XXXX XXXXX 0 0000 00000 0000 0000 5 5554 44447 7776 6666 7 2107 32107 2107 3210 Notes specified by 02 16 points bits per one word unit a MITSUBISHI Command WR uses word units When reading 32 points the number of devices is 8 3 FX communication Commands 8 b Example 2 To read the present value of two points T123 and T124 at station No 5 E N 05 123 0
55. in accordance with the send byte count specified above Upper byte Lower byte 1 byte BFM 1001 Ignored 1 31 H 2 byte 1002 Ignored 32 3 byte BFM 1003 Ignored 33 H 4 byte BFM 1004 Ignored 34 H 5 byte BFM 1005 Ignored 35 H 6 byte BFM 1006 6 36 H 7 byte BFM 1007 7 37 H 8 byte BFM 1008 8 38 9 byte BFM 1009 9 39 h Receive buffers 8 byte receive data specified in accordance with the receive upper limit byte count BFM 2 is read to the data registers D301 to D308 in the programmable controller a MITSUBISHI 10 24 FX communication FX2n 2321F 10 3 Example program M8002 FNC79 Transfer of communication format nu IH409F K1 409F 4 gt BFM 0 pulse Block BFM No Transfer Number of source transfer points FNC 79 Transfer of receive upper limit byte count KO K2 K8 K1 FNC 79 H02 Send header KO K 024 gt BFM 4 FNC 79 H03 Send terminator to KO F6 eng 03rH BFM 8 FNC 79 H02 Receive header to KO K8 spy 024 gt BFM 8 FNC 79 H03 Receive terminator TO Ko K ETX Kl 03
56. is set to ON it is regarded that receive is completed and the receive completion status BFM 28 b1 is set Send Header lt BFM 5 upper BFM 4 lower gt Setting range 4 bytes maximum zero suppression The initial value is 0 No used For the send data of the 232IF 4 headers maximum can be specified When the number of head ers is less than 4 the upper 0 s are ignored zero suppression and not transferred BFM 5 3 BFM 4 upper 2 bytes lower 2 bytes b15 1015 00 01010 010 1010 010 01010 010010 1 0 0 0 0 0 0 0 0 2 4th 3rd 2nd 4 Example 02H STX e transmission order is fourth header third header second header first header when 4 10 headers are specified Send Terminator lt BFM 7 upper BFM 6 lower gt Setting range 4 bytes maximum zero suppression The initial value is 0 No used For the send data of the 232lF 4 terminators maximum can be specified When the number of terminators is less than 4 the upper 0 s are ignored zero suppression and not transferred As the first terminator specify an ASCII code from 01H to 1FH As the second to fourth termina tors any ASCII code can be specified The register structure and the transmission order are equivalent to those of the send header described above MITSUBISHI
57. of industrial automation What is sometimes overlooked by the user is the care and attention to detail that is taken with the documentation However to continue this pro cess of improvement the comments of the Mitsubishi users are always welcomed This page has been designed for you the reader to fill in your comments and fax them back to us We look forward to hearing from you Fax numbers TIA Os exert tet ee Rota Mitsubishi Electric i America 01 847 478 2283 Your company Australia 02 638 072 Germany 0 21 02 486 1 12 OUP IOC ANON South Africa 0 27 11444 0223 United Kingdom 01707 278 695 Please tick the box of your choice What condition did the manual arrive in Minor damage LlUnusable Will you be using a folder to store the manual Yes LINo What do you think to the manual presentation L Tidy LIUn friendly Are the explanations understandable Yes LINot too bad L Unusable Which explanation was most difficult to understand Are there any diagrams which are not clear Yes UNo santa What do you think to the manual layout Good too bad L Un helpful If there one thing you would like to see improved what is Thank you for taking the time to fill out this questionnaire We hope you found both the product and this manual easy to use MITSUBISHI i F
58. operation then sets b4 after the receive suspension waiting time BFM 12 has expired To receive the excess data in the interlink connection the rising edge of the b4 is required to be monitored using the sequence program The data as much as the receive byte count BFM 2000 in the receive buffers BFMs 2001 to 2271 or the data as much as the num ber of receive buffers BFM 14 should be read to data registers in the programmable con troller and the receive completion command executed BFM 1 b2 b6 being sent b6 is turned on after the send command BFM 1 b1 is given until the send completion sta tus BFM 28 60 is set 10 FX communication 2 232 10 10 2 18 10 2 19 10 2 20 10 2 21 7 b7 being received b7 is turned on after the head data is received until the receive completion status BFM 28 b1 is set 8 b8 RS b9 ER b12 DR b13 CD b14 CS b15 CI These bits indicate the ON OFF status of the control signals Error Code BFM 29 gt For error code refer to chapter 12 Model Code BFM 30 gt The model code of the 232IF is K7030 The model code is a fixed code assigned to each special extension equipment handled by the FROM TO instruction The programmable controller can distinguish the equipment type by read ing this code Send Byte Count BFM 1000 gt Setting range 0 to 512 when buffer data length is 16 bits 0 to 256 when buffer data length is 8 bits
59. personal computer are turned ON When PLC is in RUN status PLC already can receive data from personal computer When operating program of personal computer data is sent to DO in PLC This data value is A 40 in program At this time this data DO D1 moves to D10 D11 in the PLC 000 After moving data PLC sends data 010 011 the personal computer When receiving data from the PLC the personal computer displays the data 9 14 FX communication RS instruction 9 4 Example program of programmable controller M8002 Sending data and receiving data reset FNC 12 Setting communication format 1 0000 0100 1000 1111 0 4 8 F RS instruction drive The receiving data DO D1 moves to sending data area D10 D11 amp Receive completion reset Send request 5 Example program of cumputer This is an example of a BASIC program for communication of RS instruction communication no protocol communication This BASIC program is written by N88BASIC of Nippon Electric Corporation 10 CLOSE 1 A 40 Text of ASCII stored 20 OPEN COMI AS 1 COM port is opened 30 PRINT 1 A Data is sent to PLC 40 CLOSE 1 FOR I J TO 2000 NEXT 1 50 OPEN COMI AS 1 60 FOR 1 1 TO 100 1 70 IF LOC 1 gt 4 GOTO 100 Length of received data is checked 80 NEXT 90 CLOSE 1 PRINT TIME OUT ERROR END 100 B INPUTS LOC 1 1 110 PRINT B Received data is displayed 120 END 1 T
60. response data ACK from the computer to the transmission of response data STX from the programmable controller should be done after completion of recep tion of on demand data MITSUBISHI 8 17 FX communication 8 10 3 Specification and Example of On demand 1 Command specification Protocol format 1 is shown Added by programmable controller Computer Programmable o Z2 3 ml 82 controller 4 S Z Transmission x data x 8 Do E ON Special auxiliary E relay M8127 bl On demand data is set the head address Write processing lt is written to 08127 and the data length is written to 08128 Notes 1 Specify the data length so as to satisfy the following condition Data length 40H 64 points 13 points for FXoN The PC number FE is added by the programmable controller The station number PC number number of devices and sum check code are expressed in hexadecimal Commands 8 Important e Don t use the on demand function unless the system configuration is 1 1 If the on demand function is used in a multidrop system in which the computer and the programmable controller are connected in 1 n configuration normal communication data in control protocol formats 1 to 4 and on demand data become confused and normal data transmission is not possible MITSUBISHI Commands 8 FX communication 2 Specifica
61. text not to guarantee operation Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples Owing to the very great variety in possible application of this equipment you must satisfy yourself as to its suitability for your specific application s MITSUBISHI vi FX communication Table of Contents G ideline of Safety asss qasaq T WATROGUCTION Sa E 1 1 1 1 T YDOso arreca talora iaia analisti 1 1 1 2 System COnfIouratiorti ii tanec md aea OR UL silla 1 2 m T ient ae 1 2 1 2 2 ParalleliLink fo A ey au GL kaka hA ah Qp 1 2 15210 ite ida 1 3 1 2 4 No Protocol Communication skua 1 4 1 3 Supporting Function and Version eui a lora 1 4 rom Es 2 1 uae ha a Mri M Loue dud 2 1 D2 MA COMMON ccc Ec TT 2 1 DADE CIE LU pP TC 2 1 PARONA E zin atii rette HR vit potestas ccc ma Sanu 2 2 Cr OMM MU RE E 2 2 2 2 Using R92326 Intertae Qs coo t ueber std erdt ee lia etr 2 3 2 2 1 Using RS Instruction or Computer 2 3 sesto DP
62. 0 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 IF HED STX THEN RVCNT STCNT 1 IF HED NAK THEN RVCNT NACNT 1 GOSUB RECWAIT IF ERFLG 99 THEN GOTO ERRORFIN1 BUF BUF RCV PRINTRDATA Display of received data PRINT Received data PRINT HEX ASCII FOR 1 1 TO LEN BUF PRT1 MID BUF 1 1 PRT1 HEX ASC PRT1 IF PRT2 2 THEN PRINT 702 STX GOTO 370 IF PRT2 3 THEN PRINT 03 ETX GOTO 370 IF PRT2 15 THEN PRINT 7715 NAK GOTO 370 PRINT PRT2 CHR amp H22 PRT1 CHR amp H22 NEXT IF HED NAK THEN GOTO ERROROFIN2 DATACHECK Check of received data DDATA STX OOFFO4ABCD ETX 5D Normal data FOR J 1 TO LEN BUF RDATA MID BUF J 1 ODATA MID DDTA J 1 IF RDATA lt gt ODATA THEN GOTO ERRORFIN3 NEXT J PRINT Received data is normal PRINT Loopback test complete GOTO FIN ERRORFIN1 PRINT Data is not received at all or data content is insufficient GOTO FIN ERRORFIN2 ERRORCODE MID BUF 6 2 PRINT Error code ERRORCODES H is received GOTO FIN ERRORFIN3 PRINT Received data is abnormal J th character FIN CLOSE 1 END RECWAIT Wait for receive FOR 1 1 TO TO RCV IF LOC 1 gt RVCNT THEN GOTO BUFIN NEXT IF RCV THEN ERFLG 99 RETURN
63. 0 12 10 2 17 Stat s BFM 286 ure Eee eerie De mter oco oe na 10 13 10 2 18 Error Code BFM 259 gt ii 10 14 10 2 19 Model Code BFM 30 gt i 10 14 10 2 20 Send Byte Count BFM 1000 gt 10 14 10 2 21 Send Buffers BFMs 1001 to 1256 gt eene 10 14 10 2 22 Receive Byte Count BFM 22000 iii 10 15 10 2 23 Receive Buffers BFM 2001 to 2256 gt 10 15 10 2 24 Spare Receive Buffers for Interlink Connection Mode BFM 2257 to 3 2271 10 15 10 3 Hardware Hand Shake Operation ii 10 16 10 3 1 No Hardware Hand Shake ii 10 16 10 3 2 Standard HS292C e eva te p D 10 17 10 3 3 Interlink fasad primas diets riter tom E eee Eo eria COP anal 10 18 10 4 Example Program acuti eo rita 10 19 10 4 1 Example of 16 Bits Data Communication sse 10 19 10 4 2 Example of 8 Bits Data Communication nnns 10 23 MITSUBISHI x FX communication 11 Optional Programming Polla lar ia 11 1 11 1 FX2N 422 BD FXiN 422 BD 11 1 11 2 FXe2n 232 BD FXin 232BD and 232 11 2 1T1 2 1 Connection cables iti eiii
64. 10 2 On demand Control Protocol eene 8 16 8 10 3 Specification and Example of On demand seen 8 18 DoT LO ODD ACK OSE E UD ad n S DR E n m ALME 8 21 MITSUBISHI ix FX communication DIRE 9 1 9 1 Function and 9 1 9 1 Send and Receive Progtatm er rt e Ie E ere a ence ila 9 1 9 1 2 Operation of RS Instruction iii 9 2 9 1 3 Related Flags and Data Registers sstart 9 3 9 2 Hardware Hand Shake Operation nr rr nanna 9 5 9 2 1 FX FX2c FXoN FX1S FX1N and FX5N earlier than V 2 00 9 5 9 2 2 FX2N FX2Nc V 2 00 or later nennen nennt nnne nnne enn nnns 9 9 93 Number of Communication Data ale 9 12 9 321 Deal withi 16 brits Data ie bere ee ec et iu Lor ee t eee s 9 12 9 3 2 Dealwith 8 e e i e Pee etia pee teo te ee i eee 9 13 9 4 Example Program alia 9 14 9 4 1 Personal Computer et 9 14 SM EE 9 16 9 5 Supporting RS Instruction and Programming Protocol 9 18 9 5 1 Programmable Controller and Version i 9 18 9 5 2 Operating Conditions and Format Set Content
65. 10 9 FX communication 2 232 10 10 2 8 10 2 9 10 2 10 Receive Header lt BFM 9 upper BFM 8 lower gt Setting range 4 bytes maximum zero suppression The initial value is 0 No used For the receive data of the 232IF 4 headers maximum can be specified When the number of headers is less than 4 the upper 0 s are ignored zero suppression The register structure and the transmission order are equivalent to those of the send header described above Receive Terminator lt BFM 11 upper BFM 10 lower gt Setting range 4 bytes maximum zero suppression The initial value is 0 No used For the receive data of the 232IF 4 terminators maximum can be specified When the number of terminators is less than 4 the upper 0 s are ignored zero suppression As the first terminator specify an ASCII code from 01H to 1FH As the second to fourth termina tors any ASCII code can be specified The register structure and the transmission order are equivalent to those of the send header described above Receive Suspension Waiting Time lt BFM 12 gt Setting range 0 to 32 767 x 10ms The initial value is 0 ms In the RS 232C interlink connection mode BFM 0 b9 1 b8 1 when receiving data exceeding the receive upper limit byte count BFM 2 the 232lF sets the request to send RS signal to OFF and requests the counterpart equipment to suspend the send operation BFM 12 speci
66. 2 64 The sum check is calculated over C 05 IFF Q this range fx K Computer 35H 46H 57H 52H 4EH 31H 32H 33H 32H 34H i Programmable I i The sum check is calculated 5 controller TIO5 7 9 1234 T B3 over this range X X BOH 35H 46H 46H 37H 42H 43H 39H 91H 32H 33H 34H aH 42H 33H i ve a Present value of T123 7BC9H hexadecimal indicates 31689 in decimal Present value of T124 1234H hexadecimal indicates 4660 in decimal MITSUBISHI 8 4 FX communication Commands 8 8 3 Batch Write of Bit Device BW command 1 Command specification Protocol format 1 is shown Character area A Betch write command bits lt gt T T T T T T T T T zo dv Headdevice Number of O g 82 devices pata of 33 z 5 2 o a amp 5characters 2 characters Specified 8 Computer hexadecimal devices 2 L L L I L L Programmable a 4 wee e controller Specifies the range of devices to be written nn H H 3 0 80H indicates OFF x 1 81H indicates ON i Notes Specify the range and number of devices so as to satisfy the following conditions 1 lt number of devices lt 160 Head device No number of devices 1 max device No The station number PC number number of devices and sum check code are expressed in hexade
67. 28 BE veri SET YOO H Confirming on demand error normal abnormal SET Yoo external output is set 40 END M8128 OFF Normally transmitted ON Data is not transmitted due to error s MITSUBISHI 8 19 FX communication 3 Specification Example 2 To transmit the data stored in data registers D100 and D101 from the programmable control ler when the station number is 0 and data is specified in byte units Commands 8 The PC number FE is automatically added by the programmable controller Computer i Programmable S E controller T 00 3412 7856 1192 X X BOH 30H 46H 45H B1H 32H 33H 34H i37H 38H 35H 36H 32H 7 M8127 Programmable controller Write processing Set ON if a transmission error occurs On demand D8127 100 M8128 ON OFF FTN command D D8128 4 M8129 ON 9 D100 1234H d The 2 hexadecimal digits of D101 5678H each byte are transmitted in ASCII starting with the most significant digit The lower byte of each word is transmitted first Program example M8000 a M81290 c Data transmission set to byte units X000 8002 0 PLS Start command signals a pulse MO M8127 3 MOV 1234 D100 DE Transmission dat
68. 3 xe s s sS x tO tO O O 6 5 3 4 ir 0 data is also reset when Y thereceive completion flag M8123 is reset FX communication RS instruction 9 9 3 2 Deal with 8 bits Data When M8161 is set to ON M8161 is shared by an ASCII instruction a HEX instruction and a CCD instruction 16 bitdata gt M8000 i 8161 8 mode 18161 Ignored Lower 8 bits S m n The upper 8 bits are ignored X010 and the lower 8 bits exclusiuely RS D200 K4 D500 K10 are regarcled as valid Send data STX D200 lower 0201 lower 0202 lower D203 lower ETX Programmdble controller Header Terminator External Head address specified by equipment lt Send byte count gt specified by m pala STX D500lower D501lower D502 lower D503 lower D504 lower D505 lower ETX xterna i gt ii Terminator Programmdble Head address specified by controller n lt It does not exceed the upper limit number of receive data points byte count specified by Receive is completed when the terminator ETX or n points are received 1 Send data and remaining number of send data se s S lt SARRE Send data SD TXD 216 8 4 3 Remaining number 1 of send data D8122 0 2 R
69. 30H 30H 31H 91H ASH 43H Programmable A controller Set ON Reset OFF Set ON eee DEH 35H 46H 46H a MITSUBISHI FX communication Commands 8 8 6 Test of Word Device WT command 1 Command specification Protocol format 1 is shown Test command selective write word Character area C if Zo 3 i Number of Device Device Device Device go UE 28 devices i 25 8 S TRE 3 E 8 lt 2 characters 5 characters 1 4 characters 5 characters 1 4 characters 2 Computer hexadecimal i Je Programmable z 3 controller When specifying bit One word device requires four 858 devices specify the hexadecimal digits Head device Therefore one word is expressed using four characters Notes Specify the range and number of devices 16 bit words so as to satisfy the following conditions 1 lt number of devices lt 10 6 for FXon one unit is 16 points for bit devices The station number PC number number of devices and sum check code are expressed in hexadecimal C200 to C255 CN200 to CN255 which are 32 bit devices cannot be handled in this command 2 Specification example To changing the present value of D500 to 1234H bits Y100 to Y117 to BCA9H and the present value of C100 to 100 at station No 5 with message wait time set to 0 ms
70. 350 is 56ABH 22187 in decimal 22187 in decimal Example 2 When showing the contents of C200 32 bit counter Head device d Data Data evice CN200 0 4234 15678 Bee 35H 36H 87H a oO B15 B14 B13 12 B11 Bio B9 B8 B7 B6 B5 B4 B3 B2 Bo 15 B14 B13 B12 Bio B9 B8 B7 B6 B5 B4 B2 BI BO 011 010 0 1 7011 03111 1 11 1 lt J v The content of the C200 shows 12345678H 305419896 in decimal notation The device code of C200 is CN200 sfa MITSUBISHI 7 15 FX communication 77 Commands and Device Ranges Computer link 7 7 7 4 Commands Maximum No of units per communication Description FX FX2c ASCII Symbol gt FXiN FX2N code 15 FX2NC Bit Reads a group of bit devices X Y M unit Bh 42H S result is in units of 1 device 256 polnie Batch Reads a group of bit devices X Y M 13 words 32 words read Word S result is in units of 16 devices 208 points 512 points unit WR 57H 52H Read TET BT eads a group of word devices D T C result is in units of 1 device 12 pos SE points Bit Writes a group of bit devices X Y M gt unit BW Ser ork S T C data is in units of 1 device AP POMS ponts Batch Writes a group of bi
71. 4 7 FX communication N N network 4 4 3 3 Example of Setting Program For the setting program of the master station and the stations Nos 1 and 2 refer to the program below Master station Slave station No 1 Slave station No 2 Remarks D8176 KO K1 K2 Station No D8177 K2 Total slave station 2 stations D8178 K1 Refresh range Pattern 1 D8179 K3 Retry count 3 times default D8180 K5 Comms time out 50 ms default Station No setting 0 Meng FNC 12 D8176 Required for master MOV station Set range 0 to 7 Total number of slave N FNC12 K2 D8177 stations 2 MOV Setting range 1 to 7 Refresh range setting pa K 1 08178 Pattern 1 Set range 1 to 2 Not required for FNC 12 Refry count setting FARSI MOV 08179 3 3times 12 Comms time out setting MOV K5 08180 5 50ms P 4 3 4 Example of Error Program Master communication error M8183 T Y000 Slave 1 communication error M8184 T Yoo Slave 2 communication error M8185 T 002 Data communication M8191 T Y003 Continued to a b or c in 4 3 5 Program A station cannot recognise its own error An error program for each station is not necessary a MITSUBISHI 4 8 FX communication 4 3 5 Example of Operation Program a Program of master station
72. 450 to M499 50 points Master D500 to D509 10 points D240 to D249 10 points Communication time 70 ms Scan time of master ms Scan time of slave ms Note Parallel link is possible between PLC s in the same series or in other series as long as they are in the group However parallel link between each different group cannot be achieved Groups are separated as follows Group No Series Group 1 FX2N Group 2 FX1N Group 3 FXis Group 4 FXon Group 5 FX FX2c MITSUBISHI 5 2 FX communication 5 2 2 High Speed Mode Special auxiliary relay M8162 Master Slave Automatic communication M8000 Dee DAA H 9 9 Parallel link 5 FX2n FX2nc FXin FX FX2c FX1s FXon Master D490 D491 2 points D230 D231 2 points Communica Slave Spon devices Slave 5 00 D501 2 point D240 D241 2 point ES Master 2 points 2 points Communication time 20 ms Scan time of master ms Scan time of slave ms Note Parallel link is possible between PLC s in the same series or in other series as long as they are in the group However parallel link between each different group cannot be achieved Groups are separated as follows Group No Series Group 1 FX2n FX2nc Group 2 FX1N Group 3 FXis Group 4 FXon Group 5
73. 670 BUFIN Reading of received data 680 690 RCV INPUT RVCNT 1 RETURN MITSUBISHI 7 19 FX communication Computer link 7 3 Operation Start the computer program Send four characters ABCD from the computer to the FX programmable controller The FX programmable controller returns the four characters ABCD back to the com puter d The computer compares the data received from the programmable controller and the orig inal sent data and displays a result message 4 List of result messages o Message Remedy Received data is normal Data sending and receiving is normal Data is not received at all or data content is Check again the writing station No transmission insufficient specification and transmission protocol Error code 00H is received Refer to error code list in chapter 12 is apnormal Check for faulty writing observing writing cautions a MITSUBISHI 7 20 FX Series Programmable Controllers Commands 8 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI
74. 6H 46H 44H B8H 31H OF in hexadecimal Indicates the type name of the Programmable controller is FX FX 2 series a MITSUBISHI 8 13 FX communication 8 9 8 9 1 Commands 8 Global Function GW command This function is to turn on and off the global operation flag at all stations in the multidrop link For an FX series programmable controller this is special auxiliary M8126 and for an A series pro grammable controller it is Xn2 of the computer link unit This function can be used for initialization resetting or simultaneous start stop of all programma ble controller stations Control Specification and Example of Global Function The global function is to turn on or off the special auxiliary relay M8126 global operation flag at all stations in the multidrop link e The station number specified in the control protocol must indicate all stations and is hence specified as FFH FF If other than FFH is specified as the station number the special aux iliary relay M8126 of the specified station is turned on off Noreply is given by the programmable controller to this command Ifthe programmable controller power is turned off the communication format changed or the programmable controller is stopped the special auxiliary relay M8126 of that station is turned off and the global function operation is cleared 1 Control specification Proto
75. ADVANCED AND EVER APYANSINSMIITSUBISHI ELECTRIC MITSUBISHI PROGRAMMABLE CONTROLLERS FX communication Foreword e This manual contains text diagrams and explanations which will guide the reader in the cor rect installation and operation of the communication facilities of FX series It should be read and understood befre attempting to install or use the communication facilities of FX series Further infomation can be found in the manual of each programmable controller If in doubt at any stage of the installation of the communication facilities of FX series always consult a professional electrical engineer who is qualified and trained to the local and national standards which apply to the installation site If in doubt about the operation or use of the communication facilities of FX series please consult the nearest Mitsubisi Electric distributor This manual is subject to change without notice s MITSUBISHI FX communication FX COMMUNICATION RS 232C RS 485 USER S MANUAL Manual number JY992D69901 Manual revision C Date March 2000 Brand and product names describeed by in this manual are trademarks or registered trade marks of the irrespective owners MITSUBISHI i FX communication s MITSUBISHI FX communication FAX BACK Mitsubishi has a world wide reputation for its efforts in continually developing and pushing back the frontiers
76. BR command 1 Command specification Protocol format 1 is shown Character area Betch read bits T T T T T T T T T T T T m 5 S 5 e 88 0 indicates OFF gt 58 8 g g S 2 1 31H indicates ON 8 5 2 lt 5 characters 2 characters 3 3 A 2 Computer hexadecimal d Programmable x si o 58 Dataot m 82 controller Specifies the range of a S h gt specified gt lt o devices to be read devices 2 1 1 lt gt Notes Specify the range and number of devices so as to satisfy the following conditions 1 number of devices lt 256 54 for FXon 256 points are specified by 00H Head device No number of devices 1 max device No The station number PC number number of devices and sum check code are expressed in hexadecimal 2 Command example To read five points of data from X040 to X044 at station No 5 with message wait time set to 100 ms Assuming that X040 and X043 are OFF and X41 X42 and X44 are ON E A Qs FF 0040 05 147 The sum check is calculated e FF over this range Computer SH 35H AGH 52H 7H lt I gt A ast ke Programmable S E
77. ED is not lighted extin guished not lighted at all check the setting of the master station and the slave stations f the RD RXD LED is not lighted extinguished check the wiring 2 Make sure that the master station and the slave stations are set correctly If the setting is incorrect correct it 3 Make sure that the devices for the master station and the slave stations are handled cor rectly If they are handled incorrectly correct the program so that they are handled correctly MITSUBISHI 12 3 12 FX communication Diagnostics 12 12 4 Computer Link 12 4 1 NAK Error Code The error code is sent following a NAK response to indicate the type of error that occurred It is transmitted as two ASCII characters representing the hexadecimal codes ranging from 00H to FFH If two or more errors occur simultaneously the error code with the lowest number is transmitted a Error description 00H 01H 02H Sum error 03H Protocol error the communication protocol does not conform to the format selected with D8120 04H 05H m 06H Character area error the character area is incorrectly defined or the specified com mand is not available 07H Character error the data to be written to a device consists of ASCII codes other than hexadecimal codes 08H 09H 10H PC number error the PC number is not set to FF or not available from this station 11H 17H 18H Remote error remote run sto
78. F SI US m o DEL s MITSUBISHI B 1 FX communication Appendix B MEMO MITSUBISHI B 2 USER S MANUAL FX COMMUNICATION RS 232C RS 485 MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100 8310 TELEX J24532 CABLE TOKYO HIMEJI WORKS 840 CHIYODA CHO HIMEJI JAPAN Effective Mar 2000 JY992D69901C Specification are subject MEE0003 to change without notice
79. FF The sum check is calculated over this range 30H 46H 46H 1234H hexadecimal to DO indicates to write 4660 in decimal ACD7H hexadecimal to D1 indicates to write 21289 in decimal MITSUBISHI 8 7 FX communication Commands 8 8 5 Testof Bit Device BT command 1 Command specification Protocol format 1 is shown Test command selective write bits Character area C N gt Y T T T T T T T T T T T zo Number of Device Device go mop w EB devices E E 85 S g BO IS 3 d characters 5 characters 5 2 Computer hexadecimal ME Programmable zo ia ller 1 character 4 5 2 0 30H indicates reset OFF SE 1 31H indicates set ON Notes Specify the range and number of devices so as to satisfy the following condition 1 number of devices 20 10 for FXoN The station number PC number number of devices and sum check code are expressed in hexadecimal 2 Specification example To set ON M50 OFF S100 and ON Y001 at station No 5 with message wait time set to 0 ms i The sum check is calculated over this range CN E 05 FF 003 M00501 01000 YO00011 EC Q Computer 35H 46H 54H 35H 30H 31H 63H 31H
80. FX2N series using peripheral equipment or program If communi cation is set in such a way communication between peripheral equipment is disabled 11 3 2 Cautions on use Connect a programming tool FX 10P FX 20P A7HGP PHP etc to either a connector built in to the programmable controller the connector of the FX2N 422 BD the connector of the FX2N 232 BD or the connector of the FXoN 232 ADP If the programming tool is connected to both connectors the following phenomena may occur 1 A program in the programmable controller may be different from a program in the program ming tool If the program is modified or the set value of the timer the counter etc is modi fied in this status a part of the program may be damaged and the programmable controller may malfunction 2 If the sampling trace function provided in the programmable controller is used in both ports correct sampling trace results cannot be obtained a MITSUBISHI 11 3 FX communication Optional programming port 11 Memo MITSUBISHI TTE FX communication Diagnostics 12 1 Introduction 2 Wiring 3 opecifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII co
81. Program Used for Setting 0 FNC 12 Moy 08176 pel K2 08177 Ps K 1 D8178 js D8179 p K 6 D8180 Station No setting Required for master station Set range 0 to 7 Total number of slave stations 2 Setting range 1 to 7 Refresh range setting Pattern 1 Set range 1 to 2 Refry count setting 3 3times Comms time out setting 6 60ms A N N network 4 Not required for slave station Make sure to write the program above from step 0 as the N N network parameter setting program This program does not require to be executed because it becomes effective automatically when it is programmed in this position Note Setting of the parameters for the N N network is started at step 0 LD M8038 and fin ished when any instruction or device other than the program above is processed MITSUBISHI FX communication N N network 4 4 3 4 3 1 4 3 2 Example Program System Configuration Master station No 0 Slave station No 1 Slave station No 2 FX 2N FX 2N J J J J J J T T FX 2N 485 BD FX 2N 485 BD FX 2N 485 BD Refresh range 32 bit devices and 4 word devices Pattern 1 Retry count 3 times Comms time out 5 50 ms Operations The following operations are performed in the system configuration above
82. TO instruction before setting bO to ON e BFM 0 communication format e BFMs 9 and 8 receive header e BFMs 11 and 10 receive terminator On the rising edge of bO the error occurrence BFM 28 b3 and the error code BFM 29 are cleared 2 b1 send command On the rising edge of b1 the contents of the send buffers BFMs 1001 to 1256 are sent to the counterpart equipment up to the send byte count BFM 1000 When send is completed the send completion status BFM 28 is set BFM 28 DO is automatically reset when the next send command b1 is given When b1 is given the contents of the following setting items are determined e BFMs 5 and 4 send header e BFMs 7 and 6 send terminator 3 b2 receive completion reset command When b2 is set to ON the following items are cleared BFM 28 b1 receive completion e BFM 2000 receive byte count BFMs 2001 to 42256 receive buffers When receive is completed b2 should be set to ON to clear the receive completion status BFM 28 b1 If BFM 28 b1 is not reset the next data cannot be received When b2 is set to ON the contents of the following setting items are determined e BFMs 9 and 8 receive header e BFMs 11 and 10 receive terminator In the RS 232C interlink connection mode BFM 0 b9 1 b8 1 b2 functions as the receive continuation command to receive data exceeding the receive upper limit byte count BFM 2 and clears the following
83. The BFM 1000 specifies how many bytes out of 512 bytes 256 words in the 16 bit send buffers BFMs 1001 to 1256 are to be sent Send Buffers lt BFMs 1001 to 1256 gt Each of them is a 16 bit buffer to save the send data and accommodates 512 bytes 256 words Note Send receive buffer structure Example 1001 16 bit buffer lt b15 Upper bits Lower bits bo 0011 1 011 3 2 4 1 32 H 2 41 H A 1byte 1byte gt lt 1word gt numeric in the send receive buffer is treated as hexadecimal MITSUBISHI 10 14 FX communication 2 232 10 10 2 22 Receive Byte Count lt BFM 2000 gt Saved value 0 to 512 30 1 when buffer data length is 16 bits 0 to 256 15 when buffer data length is 8 bits The byte count received from the counterpart equipment is saved This value is cleared by the receive completion reset command BFM 1 b2 1 Spare buffers in the interlink connection mode 10 2 23 Receive Buffers lt BFM 2001 to 2256 gt Each of them is a 16 bit buffer to save the data received from the counterpart equipment and accommodates 512 bytes 256 words The buffer structure is equivalent to that of the send buff ers The receive contents are cleared by the receive completion reset command BFM 1 b2 10 2 24 Spare Receive Buffers for Interlink Connection Mode BFM 2257 to 2271 gt Each of them is a sp
84. X communication s MITSUBISHI FX communication Guidelines for the Safety of the User and Protection of the programmable con trollers This manual provides information for the use of the FX series communication unit The manual has been written to be used by trained and competent personnel The definition of such a per son or persons is as follows a Any engineer who is responsible for the planning design and construction of automatic equipment using the product associated with this manual should be of a competent nature trained and qualified to the local and national standards required to fulfill that role These engineers should be fully aware of all aspects of safety with regards to auto mated equipment b Any commissioning or service engineer must be of a competent nature trained and qual ified to the local and national standards required to fulfill that job These engineers should also be trained in the use and maintenance of the completed product This includes being completely familiar with all associated documentation for the said prod uct All maintenance should be carried out in accordance with established safety prac tices All operators of the completed equipment should be trained to use that product in a safe and coordinated manner in compliance to established safety practices The operators should also be familiar with documentation which is connected with the actual operation of the completed equipment
85. a b13 1 b12 0 Both the check sum and ASCII HEX conversion are available 613 1 b12 1 For the check sum addition format refer to the communication format list shown above MITSUBISHI 10 6 FX communication 2 232 10 Note ASCII HEX conversion When execution of the ASCII HEX conversion is specified the hexadecimal numeric data 0 to F inside the send buffers BFMs 1001 to 1256 is converted into the ASCII code then sent The received ASCII code is converted into hexadecimal numeric data 0 to F then saved to the receive buffers BFMs 2001 to 2256 At this time the send receive byte count indicates the number of hexadecimal data a Send format when hexadecimal data is converted into ASCII code Example When the send data 10ABH the header STX and the terminator ETX are sent b15 Send data buffer BFM 1001 bo 5 BFM 0 0 0 0 1 00 0 0 1 0 1 01 0 1 1 1 0 Converted into ASCII 02H 41H 42H 31 H 30H 03H code before send x 2 The send byte count is 4 b Receive format when ASCII code is converted into hexadecimal data Example When the receive data 10 the header STX and the terminator E TX are received b15 50 5 1 1 1 ili T
86. a en ata i SD TXD Data POEM uen SE ud BFM 20 ti completion lt A j BFM 28 4 27 7 LA RS RTS OFF JON Receive data RD RXD fa i OFF suspende i BEM 28 b4 BFM 12 a V N Receive OFF ON X10ms 6 completion 7 3 BFM 28 b1 2 d EN Nono OFF y y P t 7 completion reset command y 9 7 7 BFM 1 b2 1 Turn off using a program When it is not turned off the next data cannot be sent 2 Make sure that the CS CTS in the 2 2321 is turned on while the counterpart equipment is ready for receive 3 Time set by BFM 20 x10ms 4 Time set by BFM 21 x10ms 5 The RS RTS is turned off when the upper limit of receive byte count specified by the BFM 2 is exceeded When the send receive buffer data length is 16 bits BFM 0 b14 0 interrupt send from the counterpart equipment within 30 bytes When the send receive buffer data a length is 8bits BFM 0 b14 1 interrupt send from the counterpart equipment within 15 bits If send is not interrupted all the send data cannot be received 6 Time set by BFM 12 x10ms 7 Turn off using a program When it is not turned off the next data cannot be received 8 After receive is completed and the receive data is read turn off the receive completion flag BFM 28 b1 using a receive completion reset command BFM 1 b2 9 Read the data as much as the receive byte count BFM 14 in the receive buffer BFM 2001 to BFM 2271 to the data registe
87. a is set 7 MOV 5678 D101 eda On demand error flag is reset RST_ M8128 1 cannot start if M8128 is ON RST Y000 RST 001 HH MOV 100 108127 Confirming on demand error normal _ MOV K4 08128 abnormal external output is set M8127 M8128 33 ake SET Y000 Confirming on demand error normal SET Yoo H abnormal external output is set 40 END M8128 OFF Normally transmitted ON Data is not transmitted due to error a MITSUBISHI 8 20 FX communication Commands 8 8 11 Loopback Test The loopback test is the function for testing if communication between the computer and pro grammable controller is operating as normal or not 1 Command Specification Protocol format 1 is shown Loopback test iili Character area A fr T T T m amp 2 S 95 Data gt S 5015 designated 28 8 8 2 characters hexadecimal DO sg characters Computer Programmable gt 52 35 Data m 82 controller 2 characters hexadecimal o same data 3 gt l1 x as character gt lt 3 A area gt 1 sp Character area B Notes Specify the number of characters so as to satisfy the following condition 1 No characters x 254 25 for FXon The station number PC number number of devices and sum check code are expressed in hexadecimal 2 Specification example To test the Loopback with
88. a register D8120 communication format b13 sets whether or not to add the sum check code to the message When b13 1 the sum check code is automatically added to messages when transmitting and a new sum check value is calculated from the Receive data and compared with the received sum check value thereby checking the Receive message When 0130 the sum check code is not added and the Receive data is not checked An example showing how to calculate the sum check code is given below Example When transmitting station number 0 PC number FF command BR device memory batch read message wait time 30 ms and data ABCD in format 1 the sum check code is calcu lated as follows E Station PC No Message Character area Sum N No Command wait time check Q BR code 0 0 3 A C D B D Computer 46H 46H 42H 52H 39H 41H 42H 44H 42H 44H Programmable lt gt E Station PC No controller N No Q 00 30H 30H 46H 46H 42H 52H 33H 41H 42H 02H BOH 46H 46 I __ 43H 44H 2BDH 30ms Message wait time MITSUBISHI 7 10 FX communication Computer link 7 7 4 4 Time out Check Time The time out check time refers to the duration after termination of receive final character received of a failed transmission from the computer to the programmable controller until the send sequence is initialized This check time is specified as f
89. al data registers Programmable controller D8127 Head address D8128 Data length Program Ls Din T f Computer 5 z M Notes This function can only be used when the configuration of the computer and program mable controller is 1 1 8 10 1 Special Devices Used in On demand Function The special data registers and auxiliary relays used in the on demand function are explained in the following table Device Name Description On during execution of on demand On demand handshake ON on demand data being transmitted M8127 signal OFF on demand data transmission complete On if there is error in specified value for data transmission in on demand 8128 On demand error flag ON error OFF no error Word byte data format for on demand data Flag for specifying word M8129 ON byte units 8 bits per data register OFF word units 16 bits per data register D8127 On demand head The head device number of the data area in which the data to be device number register transmitted is stored Set by programmable controllers program D8128 On demand data length The data length to be transmitted by on demand Set by pro register grammable controllers program Notes The on demand handshake signal is a signal which is turned on when data transmis sion to the computer is started from the programmable
90. apter 6 for the RS instruction and example program please refer to chapter 9 Or when using an FX2N 232lF for setting and example program please refer to chapter 10 Optional programming port The port can support a programming protocol if connected to an FX2N 232 BD FXon 32ADP FX1N 232 BD FX2n 422 BD and FX1N 422 BD for FX2N FX2Nc FX1s Series program mable controller For notes on use refer to chapter 11 diagnostics refer to chapter 12 MITSUBISHI 1 1 FX communication 1 2 1 2 1 1 2 2 System Configuration For programming protocol refer to chapter 11 Introduction 1 N N Network FX2N CNV BD FX2N 485 BD FX1N 485 BD FX1N CNV BD T FXon 15 15 FOREN FX2NC MESS FXiN FXON 485ADP FXon 485ADP FXoN 485ADP NC ay NV When not using FX2N 485 BD or FX1N 485 BD in the system total extension distance Max 500m Use Max 50m Total station of this network is Max 8 stations Parallel Link 1 FX2N FX2Nc Shielded twisted pair cable O Using interface Extension distance FX2N 485 BD Max 50 m FX2N FX2N CNV BD FXon 485ADP si 48 Me Den 1 When including FX2N 485 BD in system configuration total extensi
91. are buffer for the interlink connection in the case where the data exceeding 512 bytes is received and is used to receive the data after the request to send RS signal is turned off until the send operation of the counterpart equipment is suspended The receive contents are cleared by the receive completion reset command BFM 1 b2 10 MITSUBISHI 10 15 FX communication 2 232 10 10 3 Hardware Hand Shake Operation 10 3 1 No Hardware Hand Shake Setting BFM 0 b9 b8 0 0 Sendireceive OFF enable i A BFM 1 60 7 Send OFF I ON command BFM 1 b1 Send data SD TXD Send completion BFM 28 b0 Receive data Data 2 Data 3 RD RXD N OFF ON IST OFF 10 2 ON Receive completion BFM 28 b1 3 Receive OFF ON V completion reset lt The receive wait BFM 1 b2 stafus is started 4 4 8 1 Turn off using a program When it is not turned off the next data cannot be sent 2 Time set by BFM 20 x10ms 3 Turn it off using a program When it is not turned off the next data cannot be sent 4 After receive is completed and the receive data is read turn off the receive completion flag BFM 28 b1 using a receive completion reset command BFM 1 b2 MITSUBISHI 10 16 FX communication 2 232 10 10 3 2 Standard RS232C Mode Setting BFM 0 b9 b8 0 1
92. atus of the POWER LED provided in the FX2N 232 IF When it is lighted the drive power is correctly supplied lfitis extinguished supply the drive power correctly 2 Check the status of the SD LED and the RD LED provided in the FX2N 232lF e Ifthe RD LED is not lighted while data is received or the SD LED is not lighted while data is sent check the installation and the wiring When the RD LED is lighted while data is received or the SD LED is lighted while data is sent the installation and the wiring are correct 3 Make sure that the communication setting BFM 0 of the FX2N 232IF is equivalent to that of the external equipment If they are not equivalent each other make them equivalent 4 Make sure the timing of data send receive For example make sure that the counterpart equipment is ready for receive before starting to send data to it 5 When the terminator is not used check whether the send data capacity is equivalent to the acceptable data capacity If the send data capacity may be changed use the terminator 6 Make sure that the external equipment is correctly operating 7 Check whether the type of send data and the type of receive data are equivalent If they are different make them equivalent 12 a MITSUBISHI 12 7 FX communication Diagnostics 12 12 7 Using Optional Programming Port 12 7 1 FX1s FX1N and FX2n c earlier V2 00 1 Make sure that the communication format is set to the initial status 08120
93. cation method Full duplex start stop synchronization and no protocol procedure are used The communica tion format can be specified using the buffer memories BFMs Send receive buffer The send receive buffer can accommodate 512 bytes 256 words When the RS232C interlink connection mode is used data exceeding 512 bytes 256 words can also be received ASCII HEX conversion function The function to convert and send a hexadecimal numeric 0 to F saved in the send data buffer as well as the function to convert a received ASCII code into a hexadecimal numeric 0 to F and save it to the receive buffer are provided a MITSUBISHI 10 1 10 FX communication 10 2 Allocation of Buffer Memories BFM s 2 2321 10 The RS232C interface block FX2N 2321F 2321F transmits data with the programmable controller the buffer memories BFMs 16 bit RAM memories in the 232lF FNC78 FROM and FNC79 TO instructions are used to read and write the buffer memories 10 2 1 BFMList BFM R For read No Name Setting range Initial value W For write 0 Communication format 0087H W 1 Command 0 W 1 to 512 when data length is 16 bits 2 Receive upper limit byte count 1 to 256 when data length is 8 0 W bits 0 is treated as 512 or 256 TEE 1 to 32 767 X10 ms 3 nes ont lima 0 eliminates time out time 9 a
94. cimal 2 Command example To write data into five points from M903 to M907 at station No 0 with message wait time set to 0 ms The sum check is calculated over this range CN E FF BW 0 0903 0501101 26 Q Computer 05 30H 46H 46H 57H 33H 35H 31H 31H 30H 31H 32H 36H da Specifies to turn OFF M903 lt TA Specifies to turn ON M904 K Specifies to turn ON M905 lt 13 46H Specifies to turn OFF 906 g Specifies to turn ON M907 lt MITSUBISHI 8 5 FX communication Commands 8 8 4 Batch Write of Word Device WW command 1 Command specification Protocol format 1 is shown Betch write Command ue Character area C gt m 58 5 5 55 Head device ii Data of sS gt m 38 specified 3 5 characters 2 characters n Computer ze devices Programmable M Ve lt zo gt controller Specifies the range of devices to be read E z One word device requires four hexadecimal digits x Therefore one word is expressed using four characters Notes Specify the range and number of devices 16 bit words so as to satisfy the following conditions 1 lt number of devices lt 64 10 words in the case of bit devices Head device No number of devices number of devices x 16 in the case of bit device
95. col format 1 is shown Global function command Character area A lt gt zo 4 go D Control flag 23 z s E 8 1 characters 8 Computer Programmable When data value is 1 31H global operation flag is tumed on controller When data value is 0 30H global operation flag is tumed off Notes The station number PC number number of devices and sum check code are expressed in hexadecimal 2 Specification example To turn on the global operation flag at all programmable controller stations in the computer link auxiliary relay M8126 in an FX series PC station and Xn2 in an A series programmable controller station The sum check is calculated over this range 7 Q Computer 05H 6 46H 46H 46H 57H 37H Prpgrammable controller Indicates that the global operation flag is turned ON FF is specified to indicate all stations For a specific station specify the station number between 00 to 00 to 1F for A series MITSUBISHI 8 14 FX communication Commands 8 8 10 On demand Function Data transmission between the computer and programmable controller is usually initiated by the computer only The on demand function is used if there is a need to transmit data from the pro grammable controller to the computer The range of data registers containing the data to be sent is specified in speci
96. communication RS instruction 9 9 1 3 Related Flags and Data Registers 1 Send request lt M8122 gt when M8122 is set by a pulse instruction in the receive wait status or the receive completion status data from D200 to DO is sent When send is completed M8122 is automatically reset When the RS instruction drive input X010 is turned on the programmable controller is set to the receive wait status Note In the FX FX2c FXoN FX1s FX1N and earlier versions than V 2 00 of the FX2Nc and FX2N pay attention to the following points While the programmable controller is receiving data send is only performed after receive is completed During this time the send wait flag M8121 is actuated After the head data is received and before the receive completion flag M8123 is turned on it is regarded that a receive is being performed If the send request is given while the head data is received data may be confused 2 Receive completion lt M8123 gt When the receive completion flag M8123 is turned on transfer the receive data to an other save destination then reset the M8123 When M8123 is reset the programmable controller is set to the receive wait status again To reset M8123 use a sequence as described on the previous page When RS instruction drive input X010 is turned on the programmable controller is set to the receive wait status When an RS instruction is executed while D1 is 0 M8123 execution completion flag
97. communication Wiring 2 2 3 3 One pair Wiring FX1N 485 BD A series programmable RS485 422 unit 4 FX2N 485 BD FX 0N 485ADP controller s computer link unit R 1 SDA SDA SDA SDB L R 1 RDA RoB H _ RDB 7 E b FLINK il SG SG i i SG 3 i d SG 3 p 5 FG FG Grounding of registance 100 Q or less 1 Ris the terminating resistor Connect the terminating resistor 1100 between terminals SDA and SDB 2 Connect the shield of the FX2n 485 BD FX1N 485 BD using shielded twist pair cable to ground 1000 or less Please adjust the grounding only to one side 9 Connect terminal FG to each terminal of the programmable controller body grounded with resistance of 1000 or less However for the computer link unit of the A series programmable controller see the manual of the computer link unit 4 If an RS485 232 adapter is required please use the FX 485 PC IF When using the FX 485PC IF with this wiring method either take account for or ignore the echo of the com mands sent by the computer a MITSUBISHI 2 7 FX communication Wiring 2 2 3 4 Two pair Wiring FX1N 485 BD A series programmable RS485 422 unit 4 FX2N 485 BD FX 0N 485ADP controller s computer link unit R 1 SDA SDA SDA SDB L SDB E NE R 1 RDA 4
98. controller TO5 FF01101 05 over this range X X 35H 46H 46H 31H 31H 30H 31H 35H Indicating X044 is ON Indicating X043 is OFF Indicating X042 is ON Indicating X041 is ON Indicating X040 is OFF Notes Message wait time can be specified from 0 to 150 ms in 10 ms increments expressed by OH to FH in hexadecimal Therefore 100 ms is expressed as A a MITSUBISHI FX communication 8 2 Batch Read of Word Device WR command 1 Command specification Protocol format 1 is shown Betch read command oe Character area One word device requires four hexadecimal digits Commands 8 meg 3 Therefore one word is gt F2 3 s 28 a expressed using four o o i zm 5 characters 2 characters 2 characters x i Computer hexadecimal Programmable 58 S m 82 controller Specifies the range of a te 33 specifie Fi devices to be read x devices 8 ai Character area B Notes Specify the range and number of devices 16 bit words so as to satisfy the following conditions devices 1 lt max device No Hence the maximum number of devices is 32 expressed in hexadecimal 2 Command examples a Example 1 1 number of devices lt 64 32 words in the case of bit devices 13 words
99. ct the communication format used m to send receive data in the 2321F L among 9 types shown on the left po em Data The header can be specified in the nator 1111 portion in the communication format MET In the communication format type pei Termi Data CR LF hexadecimal data binary and nator ASCII code can be send and received amp Header Data Sum In the communication format types to the send receive data Header Data am Sum CR should be any ASCII code except the header the terminator CR Header Data iot Sum CR LF Communication can be performed a using the ASCII HEX conversion y Re function by specifying the BFM 0 b13 and the 0 b12 p The ASCII codes available forthe __ did Pese initial terminator are 01H to 1FH e n the RS232C interlink connection mode the communication formats Q to are available 2 bO to b7 data length parity stop bit and baud rate to b7 should be aligned with the communication specification of the connected counter part equipment MITSUBISHI 10 5 FX communication 2 232 10 3 b9 and b8 control line For examples of connecting the equipment corresponding to each setting refer to section 2 2 2 For operation of control line refer to section 10 3 When not used b9 0 b8 0 is specified communication is performed using only the
100. data ABCDE at station No 0 with message wait time set to 0 ms The sum check is calculated over this range CN lt gt E NIOO 1005 ABCDE 78 The sum check is calculated Q over this range Computer 05H 54H 35H 42H 43H 44H 45H B7H 38H lt SN Programmable s le controller FF 05 ABCDE La 35H 42H 44H 45H 1 33H Same data is transmitted MITSUBISHI 8 21 FX communication Commands 8 MEMO MITSUBISHI 8 22 FX Series Programmable Controllers RS instruction 9 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 FX2N 2321F 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers RS instruction 9 MITSUBISHI FX communication RS instruction 9 9 RS instruction This section describes RS instructions For the target devices refer to the application instruction manual of each programmabile controller 9 1 Function and Operation 9 1 1 Send and Receive Program An RS instruct
101. de Lists MITSUBISHI FX communication Diagnostics 12 MITSUBISHI FX communication Diagnostics 12 12 Diagnostics 12 1 Common Items 1 MITSUBISHI 12 1 Check the connection with the communication unit of the programmable controller and the option When the connection is unstable the communication cannot be corrected For the installation and the connection method refer to the manual of the communication unit of the option Check whether the VRRD or VRSC instruction is used in used in the program If it is used delete it turn off the power of the programmable controller then turn it on again Each setting of communication format D8120 parameter of programmable controller by FX PCS WIN E N N network 08173 to D8180 and parallel link M8070 M8071 is suitable for the usage or it checks The communication is not correctly done if setting is not suitable for the usage When each setting is changed please turn off the power supply of the programmable con troller and turn it on again When you use FXoN 485ADP and FX 485ADP please the power supply for the drive must be supplied correctly or check 12 FX communication Diagnostics 12 12 2 N N Network 12 2 1 Error Code When station occur communication error auxiliary relays FX2N M8183 to M8191 FXon M504 to M511 of communication error is ON in the station And the error code put i
102. e FXon 232ADP consumes 5V DC 200 mA from connected programmable controller Make sure that the current consumption of 5V DC for special extensions does not exceed the capacity of the 5V DC power of the FX2N FX2Nc FX1s or FXiN e Programming software FX PCS AT EE Programming software FX PCS WIN E 11 2 1 Connection cables 1 FXan 232 BD RS232C connector of personal computer FX2n 232 BD side Personal computer side F2 232CAB 1 Gender changer D SUB 9 pin FX 232CAB 1 RS232C cross cable D SUB 9 pin to D SUB 9 pin see the reference bellow RS232C cross cable D SUB 25 pin to D SUB 9 pin see the reference D SUB 25 pin bellow F2 232CAB 1 2 FXon 232ADP RS232C connector of personal computer Cable D SUB 25 pin F2 232CAB D SUB 9 pin F2 232CAB 1 MITSUBISHI 11 2 FX communication Optional programming port 11 Note Reference pore ini D SUB 25pin sD SUB 9pin D SUB Spin SD SUB 9pin 1 1 1 4 1 oa 2 2 2 2 5 8 b i 2 2 2 3 3 3 8 3 3 3 2 25pin 5 9pin 25pin 5 5 25pin 25 6 4 9pin 4 6 9pin 6 dp 4 6 6 7 5 5 5 7 5 7 7 20 6 6 4 20 6 20 20 x 4 1 8 SHELL SHELL Frame Frame FX 232CAB 1 2 2 3 3 4 4 9pin 5 5 9pin 6 X 6 8 8 11 3 Cautions on Use 11 3 1 Cautions on Setting Never set communication to the
103. e with the receive upper limit byte count BFM 2 is read to the data registers D301 to D304 in the programmable controller MITSUBISHI 10 20 FX communication 3 Example program MITSUBISHI 2 2321 10 M8002 ENC 79 Transfer of communication format NE TO KO HOO9F K1 009F 4 BFM amp O pulse Block No BFM No Transfer Number of source transfer points FNC 79 Transfer of receive upper limit byte count KO K8 kg S BFMI FNC 79 H02 Send header KO K py KT 02H BFM 4 FNC 79 H03 Send terminator TO K0 K6 ETX K1 03 H gt BFM 6 FNC 79 H02 Receive header e 024 gt BFM 8 FNC 79 H03 Receive terminator e e KA 03 H BFM8 10 X 000 PLS 1 Send command Send command input 1 12 Send byte count mov K9 P 299 D200 FNC 12 21 MOV H3231 D 201 21 FNC 12 H34 D 202 43 MOV 3433 0 43 FNC 12 Send data as many as 9 bytes Moy H3635 2203 65 12 H3837 D 204 87 MOV 383 0 87 da H0039 D 205 9 J Unused urta ENG Transfer of send byte count and send data 79 200 9 BFMtH 000 AO 1000 0200 CKG D20121
104. eceive data and number of receive data S s sss s 6515 91581 Receive data RD RXD saa C8 C8 8 n 6 The number of 5 receive data is also 3 4 reset when the Number of receive data 2 receive completion D8123 0 1 flag 8123 reset MITSUBISHI 9 13 FX communication 9 4 Example Program 9 4 1 Personal Computer RS instruction 9 When a programmable controller is connected to a personal computer and data send receive is performed by the programmable controller 1 System configuration Receive VPU lt I S FX2N 232 BD FX2N Use a communication cable suitable to the arrangement of connector pins of the personal computer used For the representative wiring refer to chapter 2 Communication format If the communication format of the commercial communication software used cannot realize the following setting set the programmable controller in accordance with the commercial communication software The communication format in this example is set as follows Data length 8 bit Parity Even Stop bit 2 bit Baud rate 9 600 bps Header None Terminator None Control line Normal mode 1 Protocol No protocol 3 Operation Power ON Receiving data from personal computer Sending data to personal computer MITSUBISHI PLC and
105. ed data is saved in turn with regard to the receive buffers 2001 to 2256 and the spare receive buffers BFM 2257 to 2271 for interlink connection mode Send Sum Result BFM 15 gt Initial value 0 The check sum value added to the send data is saved The sum check target range and the calculation method are shown below Note Sum check target range and calculation method Example Header Terminator Check sum c Yi S E T T X 11 2 5 X 512 02 80 H 41 H 31 32 H 35H 46 H103 35 H 32H amp Target range gt 30 H 41 31 32 35 H 46 H 03 H 152 H The total value including the terminator and excluding the header 1st byte of the header only is calculated Then the lower 1 byte is converted into the ASCII code and sent or received The data converted into the ASCII code is placed in the order of upper digit and lower digit Receive Sum Result lt BFM 16 gt Initial value 0 The sum check value of the receive data is saved When the check sum added to the receive data is different from the receive sum result receive sum check error occurs The sum check target range and the calculation method are equivalent to those for the send sum result described above s MITSUBISHI 10 11 10 FX communication 2 232 10 10 2 15 10 2 16 Time from CS ON to Send Start lt BFM 20 gt Set value 0 to 32 767 x 10ms The init
106. emote error code 18H is returned to the computer Remote STOP When remote STOP RS command is requested M8037 is set ON at the programmable controller This in turn resets M8035 M8036 and M8037 to OFF and forced RUN mode is disabled the programmable controller switching to STOP However when remote STOP is executes while the programmable controller is not in forced RUN mode the state is not changed and the remote error code 18H is returned to the computer Remote stop Forced run mode YES Special auxiliary relay Remote error code 18H is returned to M8037 is ON computer and the state of programmable controller is not changed V Special auxiliary relays M8035 M8036 M8037 are OFF V Programmable controller is stopped Conditions for Valid Execution of Remote RUN STOP The RUN terminal of the programmable controller is OFF any built in RUN STOP switch is at STOP Remote RUN The programmable controller should be stopped Remote STOP The programmable controller should be in forced run mode Notes Forced RUN mode is not restored after a power failure When the programmable con troller is in forced RUN mode if the power source is turned off and on the special aux iliary relays M8035 M8036 M8037 are all reset to OFF and the programmable controller remains in STOP a MITSUBISHI 8 10 Commands 8 FX communication 8 7 3 Control Specification and E
107. ersion is V 2 00 or later nnn 12 8 Appendix A Further Information Manual LISt nnne A 1 Appendix B ASCII code ListSs KSR aa B 1 MITSUBISHI xi FX communication s MITSUBISHI xii FX Series Programmable Controllers Introduction 1 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Introduction 1 MITSUBISHI FX communication Introduction 1 1 1 1 Introduction Communication Types The FX Series supports the fllowing 5 types of communication 1 N N network Data transfer with FX2n FX2Nc FX1N FX1s FXoN programmable controllers can be per formed on the N N basis They can link data of a small scale system if using this network For system configuration refer to subsection 1 2 1 specifications refer to chapter 3 wiring refer to chapter 2 settings the number of transferred data and example program refer to chapter 4 diagnostics refer to chapter 12 Parallel link Data transfer with
108. explanation of FX1N 422 BD User s Guide JY992D84101 installation and specification regarding the FX1N 422 BD This manual contains written hardware explanation of installation and specification regarding the FX 485 IF FX1N 232 BD Hardware Manual FX1N 485 BD Hardware Manual FX 485 IF Hardware Manual JY992D81801 MITSUBISHI A 2 FX communication Appebdix B 1 Introduction 2 Wiring 3 opecifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Appebdix B MITSUBISHI FX communication Appendix B Appendix B ASCII code Lists Table B 1 ASCII code Lists MR 0 1 2 3 4 5 6 7 0 DLE SP 0 P p 1 SOH DC1 1 A Q a q 2 STX DC2 2 B R b r 3 ETX DC3 3 C S 5 4 4 4 D T d t 5 ENQ NAK 96 5 E U e 6 SYN amp 6 F V f 7 BEL ETB 7 W g w 8 BS CAN 8 H X h x 9 HT EM 9 i y A LF SUB J 7 j 2 B VT ESC I K k FS lt L D CR GS m E SO RS gt N A n
109. fies the time after the request to send RS signal is turned off until the receive suspended status BFM 28 b4 is turned on The value set to the BFM 12 should be equivalent to or more than the time after the 232IF sets the request to send RS signal to OFF until the send operation of the counterpart equipment is completely suspended If the time times out and the receive suspended status BFM 28 b4 is set to ON before the send operation of the counterpart equipment is not suspended the remaining data cannot be received 942 Spare receive buffers Ex BFM 2257 to 42271 5121 Ra oe 0 c WC Receive upper limit SUE byte count BFM 2 et to the time in whic BFM 2000 i i the send operation of the Data receive is counterpart equipment is Request to send RS suspended completely suspended Receive suspended 28 b4 k J Suspension waiting time BFM 12 0 to 32 767 x10ms MITSUBISHI 10 10 FX communication 2 232 10 10 2 11 10 2 12 10 2 13 10 2 14 Number of Remaining Send Data lt BFM 13 gt Saved value 0 to 512 when buffer data length is 16 bits 0 to 256 when buffer data length is 8 bits The send byte count BFM 1000 reduced by the number of data actually sent is during trans mission Number of Receive Buffers lt BFM 14 gt Saved value 0 to 256 15 for spare receive buffers The number of buffers which have actually receiv
110. he send comple tion status bO is set The send completion status bO is automatically reset when the next send command BFM 1 b1 set to ON b1 receive completion When receive of data up to the receive upper limit byte count BFM 2 is completed the receive completion status b1 is set If the receive terminator BFMs 11 and 10 or the receive time out time BFM 3 is set it is regarded that receive is completed when the set condition is satisfied then the receive completion status b1 is set in the same way This status is required to be reset using the sequence program If it is not reset the next data cannot be received This status can be reset using the receive completion reset command BFM 1 b2 b2 receive time out When the receive time out time BFM 3 is reached while data is received the receive time out status b2 is set At the same time the receive completion status b1 is also set This status is automatically reset when the receive completion reset command BFM 1 b2 is executed b3 error occurrence When an error occurs while data is sent or received b3 is set to ON and the error is saved to the error code BFM 29 b4 receive suspended When data exceeding the receive upper limit byte count BFM 2 is received in the RS232C interlink connection mode BFM 0 b9 1 b8 1 the 232IF sets the request to send RS sig nal to OFF requests the counterpart equipment to suspend the send
111. his counter is used for waiting time of receiving data from PLC Please change setting value of counter for personal computer CPU speed MITSUBISHI 9 15 FX communication RS instruction 9 9 4 2 Printer Connecting FX2N 232 BD and printer and printing out the data send from the programmable controller 1 System configuration Send FX 2N 232 BD FX 2N Use a communication cable suitable to the arrangement of connector pins of the printer used For the representative wiring refer to chapter 2 2 Communication format Let the communication format of the programmable controller be in accordance with that of the printer used The communication format in this example is set as follows Data length 8 bit Parity Even Stop bit 2 bit Baud rate 2 400 bps Header None Terminator None Control line No use Protocol No protocol 3 Operation Turn on the power of the this example CR H000D and Power on programmable controller and printer LF HOOOA are written at the check the printer is on line and switch end of the message The printer the programmable controller to RUN moves down one line for each X0000N meessage CR Carriage Return RS instruction Tum on X000 and drive RS amp LF Line Feed drive instruction X001 0N Note lt may be necessary to set Every time X001 is turned on
112. ial value is 0 ms The time after the clear to send CS signal is turned on until the 232lF starts the send operation can be set When control line not used is specified the time after the send command is given until the send operation is started is specified Set BFM 20 when it is required by a modem etc Time from Completion of Actual Send to RS OFF completion flag ON lt BFM 21 gt Set value 0 to 32 767 x 10ms The initial value is 0 ms The time after the 232IF sends the data until the RS signal is turned off and the send completion flag BFM 28 b0 is turned on can be specified Set BFM 21 when it is required by a modem etc MITSUBISHI 10 12 FX communication 2 232 10 10 2 17 Status lt BFM 28 gt Bit Description Bit Description bO Send completion b8 RS RTS b1 Receive completion b9 ER DTR b2 Receive time out b10 Undefined b3 Error occurrence b11 Undefined b4 Receive suspended b12 DSR b5 Undefined b13 DCD b6 Being sent 514 05 CTS b7 Being received b15 CI RI The 232lF status and the send receive result are saved as status information This information can be read from the programmable controller using the FROM instruction then utilized 1 a MITSUBISHI 10 13 b0 send completion When send of data up to the send byte count BFM 1000 is completed t
113. iands sn nte a alia Mte IRAS 7 16 7 7 2 Device specification ranges 7 17 7 8 Example Computer Program for Loopback 7 18 9 COPIES A liu 8 1 8 1 Batch Read of Bit Device BR command 8 2 8 2 Batch Read of Word Device WR command 8 3 8 3 Batch Write of Bit Device BW command ii 8 5 8 4 Batch Write of Word Device WW command ii 8 6 8 5 Test of Bit Device BT COMMANO i 8 8 8 6 Test of Word Device WT command i 8 9 8 7 Remote RUN STOP RR RS commands 8 10 8 7 1 Operation of Remote nnns nnns 8 10 8 7 2 Conditions for Valid Execution of Remote 8 10 8 7 3 Control Specification and Examples of Remote RUN STOP ann 8 11 8 8 Reading The Programmable Controller Type PC 8 12 8 81 CodeS M 8 12 8 8 2 Control Specification and Example 8 13 8 9 Global Function GW command ss cio aco ione ta hier ee 8 14 8 9 1 Control Specification and Example of Global Function seen 8 14 8 10 On demand aine E E 8 15 8 10 1 Special Devices Used in On demand Function i 8 15 8
114. ication cannot be assured because the termi nal may be imperfectly contacted It is recommended to insert a cable integrated by a crimping tool into the terminal 6mm MITSUBISHI 2 1 FX communication Wiring 2 2 1 3 FXon 485ADP 1 The terminal screws of the FX 0N 485ADP are screws and therefore the crimp style ter minal see drawing suitable for use with these screws should be fitted to the cable for wir ing For M3 For M3 6 2mm 6 2mm 0 24 inches J 0 3 0 24 inches O mot or less or less 2 The terminal tightening torque is 0 5 to 0 8 N m 5 to 8 kgf cm tighten securely to avoid malfunction 2 1 4 FX2 40AW 1 The terminal screws for the terminal block of the FX2 40AW are M3 5 screws and therefore the crimp style terminal see drawing suitable for use with these screws should be fitted to the cable for wiring For M3 5 For M3 5 6 8mm 6 8mm 0 27 inches 003 0 27 inches dn or less or less The terminal tightening torque is 0 5 to 0 8 N m 5 to 8 kgf cm tighten securely to avoid mal function a MITSUBISHI 2 2 FX communication Wiring 2 2 2 Using RS232C Interface Below is a typical wiring example Please wire similar to the following pin name when a pin num ber on the side of a counterpart machine differs 2 2 1 Using RS Instruction or Computer Link 1 Terminal specification device Programmab
115. ies Programmable Controllers Computer link 7 MITSUBISHI FX communication Computer link 7 7 Computer Link This chapter explains the details and methods of specifying dedicated protocol used for linking of the FX programmable controller and computer The dedicated protocol is available in two types format 1and format 4 the format names conform to the dedicated protocols used in the computer link unit of the A series programmable controller In this chapter FX2N 232 BD FX1N 232 BD FX0N 232ADP and FX 232ADP refer to 232ADP FX2N 485 BD FX1N 485 BD FX0N 485ADP and FX 485ADP refer to 485ADP FX 485PC IF refer to 485PC IF When interface of programmable controller using RS232 please after read 232ADP instead of 485ADP 7 1 Data Flow by Link Shown below are drawings of data flow for reading writing and status control of the programma ble controller 1 The computer reads data from programmable controller Computer RS232C 485PC IF RS485 485ADP Programmable controller 2 Command 3 9 Various data 0 8 z 12 Response 13 E Device memory o O information Read Signal 1 Programmable converting controller CPU interface information Read 2 The computer sends data to programmable controller RS232C 485PC IF RS485 485ADP Computer 2 Command rogrammable controller data etc 3
116. ies programmable controller FXo FXoN Hardware Manual JY992D47501 This manual contains written hardware explanation of wiring installation and specification etc regarding the FX1s and FXin Series programmable controllers FX Hardware Manual JY992D47401 This manual contains written hardware explanation of wiring installation and specification etc regarding the FX Series programmable controller FX2c Supplementary Manual JY992D50201 This manual contains supplimentary data regarding the FX Series programmable controller Hardware Manual FX1N Hardware Manual JY992D88201 This manual contains written hardware explanation of wiring installation and specification etc regarding the 1 Series programmable controller FX2N Hardware Manual JY992D66301 This manual contains written hardware explanation of wiring installation and specification etc regarding the FX2N Series programmable controller FXe2nc Hardware Manual JY992D76401 This manual contains written hardware explanation of wiring installation and specification etc regarding the FXenc Series programmable controller FX Programming Manual JY992D48301 This manual contens written instructions regarding the FXo FXos FXon FX FX2c FX2n and FXeanc Series programmable controllers FX Programming Manual I JY992D88101 This manual contens written instructions regarding the FX1s FXin FX2N and FXanc Series
117. ink D8128 On demand data length register computer link D8129 Data network Time out timer value RS instruction computer link indicates the use application MITSUBISHI 6 1 FX communication Communication format 6 6 3 Communication Format D8120 Bit Description Name 0 bit OFF 1 bit ON bO Data length 7 bit 8 bit b2 b1 b1 0 0 None b2 Parity 1 Odd 1 1 Even b3 Stop bit 1 bit 2 bit b4 b7 b6 b5 b4 b7 b6 b5 b4 b5 Baud 0 0 1 1 300 0 1 1 1 4 800 b6 rate bps 0 1 0 0 600 1 0 0 0 9 600 p 0 1 0 1 1 200 1 0 0 1 19 200 0 1 1 0 2 400 b8 1 Header None Effective D8124 Default STX 02H b9 Terminator None Effective D8125 Default ETX 03H b12 b11 b10 0 0 0 No use RS232C interface 0 0 1 Terminal mode RS232C interface No 0 1 0 Interlink mode lt RS232C interface gt FX2N V2 00 or b10 protocol more pij Control 0 1 1 Normal mode 1 lt RS232C interface b12 line lt RS485 422 interface gt 3 1 0 1 mode 2 RS232C interface FX only b12 b11 b10 ios 0 0 83485 422 interface 0 1 0 RS232C interface b13 2 Sum check Sum check code is not added Sum check code is added automatically b14 2 Protocol No protocol Dedicated protocol Transmission b15 2 control Protocol format 1 Pr
118. ion sends and receives serial data using the RS232C port optional equipment X010 RS D200 D 0 D500 D 1 Address and Address and number of points number of points of send data of receive data data transmission format can be set using a special data register 08120 Even if the setting of D8120 is modified while an RS instruction is driven such modification is not accepted In a system in which send is not performed set the number of send points to KO In a system in which receive is not performed set the number of receive points to KO MITSUBISHI 9 1 FX communication RS instruction 9 9 1 2 Operation of RS Instruction An RS instruction specifies the head address and the number of points of the send data sent from a programmable controller as well as the head address for receive data save destination and the maximum number of acceptable number of points of receive data The data send receive sequence using an RS instruction is described below Pulse of Send request RS D200 DO D500 01 For operafion refer to section 9 2 9 3 Address and Address and number of points number of points of send data of receive data Writesconfertsofsend ff 0 Writes the contents of DO number of data points of send data and D200 This request is automatically reset Receive compl M8123 SET M8122 ____
119. is cannot be applied for other usage in the user program These devices are used by the N N network MITSUBISHI 4 1 FX communication N N network 4 4 1 2 Data Registers Auxiliary relays E lI esponse Attribute FX2N Description type FX1s FX2NC R D8173 Station No Saves its own station No M L R D8174 Total number of slave Saves total number of M L stations slave stations R D8175 Refresh range Saves refresh range M L W D8176 Station number setting Sets its own station No L Total slave station number Sets total number of N BETT setting slave stations 08178 Refresh range setting Sets refresh range M W R D8179 Retry count setting Sets retry count M W R D8180 Comms time out setting Sets comms time out M Saves current network R D201 D8201 Current network scan time scan time M L Maximum network scan Saves maximum network R D202 D8202 time scan time M L sa Number of communica Number of communication R D203 D8203 arra master station i AN at master sta IL Number of communica D204 to 08204 to Number of communication R D210 2 08210 3 error at slave station m error at slave station M L Code of communication Code of communication R D8211 error at master station error at master station 1 L R D212 to D8212 to Code of communication Code of communication M L D218 2 08218 3 error at slave station error at slave station
120. is not actuated and the programmable controller is not set to the receive wait status If the program mable controller is set from this status to the receive wait status set D1 to a value equivalent to or smaller than 1 then turn off M8123 from the ON status 3 Carrier detection lt M8124 gt When the CD DCD signal channel receive carrier detection is received from the modem to the programmable controller when the line of the modem is established M8124 is turned on While M8124 is turned off the dial No can be sent While M8124 is turned on data can be sent and received MITSUBISHI 9 3 FX communication RS instruction 9 4 Time out evaluation lt M8129 gt Valid in the FX2N FX2Nc programmable controller earlier than V2 00 If receive is not restarted within the time specified by D8129 after the receive data is inter rupted on the midway it is regarded as time out M8129 is turned on and receive is com pleted Refer to the figure below M8129 is not automatically turned off Reset it using a sequence program When this function is used data can be received without using a terminator even in equip ment in which the number of send data may be changed Receive data is interrupted Receive Data A Time out evaluation D8129 x10ms Reset by program M8129 ON Receive completion M8123 ON 5 Time out evaluation time lt D8129 gt Valid in V 2 00 or later of the FX2N FX2NC programmable co
121. istance 3300 BOB S 3300 E LINK G E E SG Sine e FG 2 2 Connect terminal FG to each terminal of the programmable controller main body grounded with resistance of 1000 or less MITSUBISHI 2 9 FX communication Wiring 2 2 4 2 Only FXon 485ADP 1 One pair Wiring FXon 485ADP 485 SDA SDA SDB SDB Terminating BA RDA Terminating resistance registance 1100 Lu Aa eu RDB 1100 LINK i LINK SG a SG FG FG 1 1 Connect terminal FG to each terminal of the programmable controller main body grounded with resistance of 1000 or less 2 Two pair Wiring FXon 485ADP 485 SDA SDA SDB SDB Terminating RDA RDA Terminating resistance registance 3300 bh RDB 3300 LINK LINK SG Vi SG FG Fax 2 Connect terminal FG to each terminal of the programmable controller main body grounded with resistance of 1000 or less MITSUBISHI 2 10 Wiring 2 FX communication Terminating registance 1100 Terminating registance 3300 243 FX2Min 485 BD and FX2n in 485 BD 1 One pair Wiring FX2N 485 BD FX2N 485 BD FX1N 485 BD FX1N 485 BD SDA SDA SDB SDB RDA RDA Terminating resistance 1100
122. items BFM 28 b4 receive suspended e BFM 2000 receive byte count BFMs 2001 to 42256 receive buffers e BFMs 2257 to 2271 spare receive buffers When b2 is set to ON the request to send RS signal is automatically set to ON also 4 b3 error reset When b3 is set to ON the error occurrence status BFM 28 b3 and error code BFM 29 are cleared a MITSUBISHI 10 8 FX communication 2 232 10 10 2 4 10 2 5 10 2 6 10 2 7 Receive Upper Limit Byte Count BFM 2 Setting range 1 to 512 when buffer data length is 16 bits 1 to 256 when buffer data length is 8 bits 0 is regarded as 512 or 256 The initial value is 0 BFM 2 specifies the maximum byte count received by the 232IF When data is received up to the receive upper limit byte count the receive completion status BFM 28 b1 is set When the receive terminator BFMs 11 and 10 or the receive time out time BFM 3 is set and the set condition is satisfied it is regarded that receive is completed even if the data received is within the receive upper limit byte count Receive Time out Time BFM 3 gt Setting range 1 to 32 767 x 10ms 0 eliminates time out time The initial value is 0 BFM 3 specifies the receive data waiting time limit When the next data is not received within the receive time out time starting from the receive edge of each data the receive time out flag BFM 28 b2
123. l link 5 MITSUBISHI FX communication Parallel link 5 5 Parallel link Data transfer with FX2N FX2Nc FX1n FX FX2c programmable controllers can be performed on a 1 1 basis for 100 auxiliary relays and 10 data registers Data transfer with FX1s FXoN program mable controller can be performed on a 1 1 basis for 50 auxiliary relays and 10 data registers For system configuration refer to subsection 1 2 2 5 1 Related Flags and Data Registers Device Operation M8070 Driven when the programmable controller is a master station in a parallel link M8071 Driven when the programmable controller is a slave station in a parallel link M8072 ON while the programmable controller is operating in a parallel link M8073 ON when M8070 M8071 are incorrectly set during parallel link operations M8162 High speed mode for parallel link 2 data words read write only M8070 Parallel link watchdog time Default 500 ms a MITSUBISHI 5 1 FX communication Parallel link 5 5 2 Mode and Link Device 5 2 1 Normal Mode Special auxiliary relay M8162 OFF Master Automatic Slave communication MOO MAA gt MOO MAA jur cre FX2N FX2nc FX FX2c FX1s FXoN Master M800 to M899 100 points M400 to M449 50 points Communica Slave D490 to D499 10 points D230 to D239 10 points tion devices Slave M900 to M999 100 points M
124. le Controller Side RS 232C Device Side Signal FX2N 232 BD FXON i UsesCS RS Signal Uses name FX1N 232 BD 232ADP 232ADP HEBR 25 pin name der 25 pin w s um a un Note When using ER and DR signals please also check if RS and CS signals are needed according to the RS232C device specifications 2 Modem specification device Programmable Controller Side RS 232C Device Side Signal FX2N 232 BD FX Signal UsesCS RS name FX N 232 BD 232ADP 232ADP name eri 25 pin edi m o RD RXD SD TXD ER OTR ma fa ar sc seen s 7 seem 5 7 i essa L s Note The FXoN 232ADP does not monitor the CD pin pin8 3 Computer link Please refer to 2 2 1 1 for wiring MITSUBISHI 2 3 FX communication 2 2 2 Using FX2N 232IF Wiring 2 The signal wiring of the RS232C equipment varies depending on the RS232C connection speci fications Check the specifications of the RS232C equipment used then connect the signals cor rectly Representative wiring examples are shown below 1 Terminal specification device No control line Setting communication format BFM 0 b9 0 b8 0 Programm able Controller Side name name D SUB D SUB po gt a 2 Terminal specification device Use control line a Standard RS232C mode Use cross cable Setting communication format BFM 0 b9 0 b8 1 Programmable Con
125. n 1 Pattern 2 Bit device 0 point Bit device 32 points Bit device 64 points Word device 4 points Word device 4 points Word device 8 points 2 18 22 34 3 26 32 50 4 33 42 66 Total station number 5 41 52 83 6 49 62 99 7 57 72 115 8 65 82 131 Note If N N network is used the scan time of each station programmable controller becomes about 10 percent longer regardless of the number of link station or using communication device pattern 3 2 2 Parallel link 70 for reciprocation Operation cycle of master station Operation cycle of slave station ms 20 for reciprocation Operation cycle of master station Operation cycle of slave station ms Normal Mode High speed mode MITSUBISHI 3 2 FX communication Specifications 3 3 2 3 Computer link Calculations to determine the approximate time until communication is complete 1 Programmable controller gt Computer Communication time Number of total characters based on dedicated protocol x Time to send or receive one character ms Programmable controller s maximum scan time ms x 3 Message wait ms 2 Computer Programmable controller Communication time Number of total characters based on dedicated protocol x Time to send or receive one character ms Programmable controllers maximum scan time ms Message wait ms 1 Please count the number of characters referring to sectio
126. n 7 4 1 and 7 4 2 and chapter 8 2 Please refer to the following expression for the method of calculating this time Time to send or receive one character 1 baud rate x number of bits in character start bit 1 Data length 7 or 8 Parity bit 0 or 1 Stop bit 1 or 2 Example When 1 character 10 bits Data length 7 Parity bit 1 stop bit 1 start bit 1 this time is as follows Baud rate bps Time to send or receive one character ms 300 33 34 600 16 67 1200 8 34 2400 4 17 4800 2 08 9600 1 04 19200 0 52 Note Please refer to following table for the relation between reading word points and communication time Message time Oms Maximum scan time 20ms Dedicated protocol format format 1 Command WR Baud rate 9 600 or 19 200 bps Baud rate bps Reading word points 9 600 19 200 10 0 35 0 2 32 0 4 0 3 64 0 5 0 4 MITSUBISHI 3 3 FX communication Specification 3 MEMO MITSUBISHI 3 4 FX Series Programmable Controllers N N network 4 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A
127. n Computer link 7 5 Message wait This is a delay time required by some computers to switch between send and receive states The message wait time determines the minimum delay before the programmable controller sends data after receiving a message from the computer Set the wait time according to the computer specifications The message wait time may be set between 0 to 150 ms in 10 ms increments The value is set using a single ASCII character 0 to F representing OH to FH 0 to 15 When using the 485PC IF in a 1 n system always set the message to be 70 ms or longer 7 or more If scan time of programmable controller is 70 ms or more on the network message wait time need to set maximum scan time or more Example Setting the message wait time Je Message wait 100 ms A Computer Programmable controller ke ex Transmission starts more than 100 ms later Wait time must be longer than two scan time 6 Sum check code The sum check code is used to verify that the data in a message has not been corrupted It is calculated by adding summing the hexadecimal values of the ASCII character codes in the sum check area of a message The lower two digits in hexadecimal of the summed result the sum check code are then represented as two ASCII characters at the end of the mes sage Note The sum of the decimal ASCII character codes converted to hexadecimal will give the same result Special dat
128. n receive Check wiring power of program 31H L L 2 request from master station before mable controller RUN STOP state parameter error communication parameter RUN is OK M Master station L Slave station 1 Another slave station 2 Self station 12 2 2 Diagnostics 1 Check the status of the RD LED and the SD LED provided on each 485BD If both of them are lighted and extinguished nothing is wrong If the RD LED is lighted extinguished but the SD LED is not lighted extinguished not lighted at all check the setting of the station No the transmission rate baud rate and the total number of slave stations If the RD LED is not lighted extinguished check the wiring 2 Make sure that the communication error FX2N M8183 to M8190 FXon M504 to M511 in each slave station is not turned on and that the data communication flag 2 M8191 FXoN M503 is not turned off When one of the communication error flag is turned on or if the data communication flag is turned off check the error code of data registers FX2n 08211 to D8218 FXon D211 to D218 Please see the following section 12 2 1 MITSUBISHI 12 2 FX communication Diagnostics 12 12 3 Parallel Link 12 3 1 Diagnostics 1 Checkthe status of the RD RXD LED and the SD TXD LED provided on each communica tion unit f both of them are lighted and extinguished nothing is wrong e If the RD RXD LED is lighted extinguished but the SD TXD L
129. ng no protocol communication to programming protocol and back by manipulating the RS instruction and Register D8120 and shown below 1 With the RS instruction On move the data choices shown below into the Register D8120 to use no protocol communication Table Set communication format D8120 Content Item H0086 H0186 H0286 H0386 Data length 7 Bit Parity bit Even number EVEN Stop bit 1 Bit Baud rate bps 9600 bps Header Off On Off On Terminator Off On 2 To use programming protocol turn the RS instruction Off and move the data H0000 into the communication format Register D8120 When the programmable controller is taken out of RUN mode by FX PCS WIN E Software or the front panel switch complete editing and pro gram downloads can be accomplished On line changes can be performed with the program mable controller in Run Mode Example of changing the communication format 08120 between H0086 and 000 The pro grammable controller is first set for no protocol communication using RS instruction I MOV j H0086 08120 RS DO K1 D1 Kt H0000 08120 MITSUBISHI 9 18 FX Series Programmable Controllers 2 2321 10 1 Introduction 2 Wiring 3 Specificatio
130. nk 7 7 6 Character Area Data Transmission The data shown in the following examples are samples of the data used in character area B when reading or character area C when writing data see section 7 4 1 and 7 4 2 7 6 1 Bit Device Memory Bit device memory is handled in 1 bit units 1 point or in word unit 16 points 1 Bit units units of 1 point When handling bit device memory in bit units the specified number of devices in an increas ing order from the specified head device are represented sequentially from the left as 1 31H when ON and as 0 30H when OFF Example When transmitting the on off status of five points from M10 i No of Head device device Data M0016 pons 10101 30H 30H 46H 46H 42H 52H 30H 30H 46H 46H Indicating M14 is ON Indicating M13 is OFF Indicating M12 is ON Indicating M11 is OFF Indicating M10 is ON 2 Word units units of 16 points When handling bit device memory in word units each word 16 bits highest bit being first is expressed as 4 hexadecimal digits each of 4 bits starting with the higher digit Each digit being represented by the appropriate ASCII character Example When transmitting the on off status of 32 points from M16 The number of devices is 02 because word units are used T T T Head device Data Data Mooe PB AB12 34CD 30H 30H 31H 36H 30H 32H 41H 42H 31H 32H 33H 34H
131. ns 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 FX2N 2321F 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers 2 2321 10 MITSUBISHI FX communication 2 232 10 10 2321 10 1 Introduction The RS232C interface block FX2n 232IF hereinafter referred to as 232IF is connected to the FX1N FX2N FX2NC programmable controller to realize full duplex serial data communication with another RS232C interface such as a personal computer bar code reader printer etc 10 1 1 Outline of Product 1 2 Applicable programmable controller The 232lF can be connected a special block of the FX1N FX2N FX2NC programmable controller Control instructions Send receive data is received and sent and diversified control commands are manipulated using the FROM TO instruction Number of I O points and connection method The number of I O points occupied is 8 in all either input or output However the capacity of the 5 V power supplied from the programmable controller is limited The current consumption of the 5 V power of the 232IF is 40 mA Make sure that the total current consumption of the 5 V power including other special blocks is equivalent to or less than that available Communi
132. nstruction driving OFF ON Send data SD TXD on 7 V Send request OFF M8122 Receive data y Receive OFF ON Y D completion M8123 Reset using a program When it is not trurned off the next data cannot be received The receive wait status is started Use terminal mode of control line This mode is available for send only or receive only The control line and the transmission sequence are equivalent to those in the FX2N series whose version is earlier than V 2 00 Refer to paragraph 9 2 1 MITSUBISHI 9 9 FX communication 3 Use normal mode 1 of control line RS instruction driving Send data SD TXD Send request M8122 ER DTR Receive data RD RXD Receive completion M8123 DR DSR MITSUBISHI RS instruction 9 OFF OFF OFF Y ON Data 4 OFF ON Y OFF e ON I y Reset using a program When it is not trurned off the next data cannot be received 9 10 FX communication RS instruction 9 4 Use interlink mode of control line RS instruction driving Send data SD TXD Data 2 Data 4 Send request ON OFF M8122 DR DSR OFF 4 ON Up to 30 characfers can be received 2
133. nto data registers FX2N D8211 to D8218 FXoN D211 to D218 This is error code is following the table Error Error Check Sion Description Checking points Comms After master station send request Check wiring power of program 01H time otiterrar L M to save station no answer passing mable controller RUN STOP state comms time out RUN is OK Station No is not agreement 02H n No L M between the master station and Check wiring the slave station Comms Communication counter is not n 03H counter error L M agreement between the master Check wiring station and the slave station ee Check wiring power of program 04H L M L Ron nal is not right mable controller RUN STOP state RUN is OK station No setting After slave station send answer to 11H Comms M L master station master station do irna pone aaa eT time out error not send request to next slave sta tion RUN is OK T Check wiring power of program 14H L COM Ana is not right mable controller RUN STOP state RUN is OK station No setting 21H Noslaveerror L L 1 Ma No is not in this net Check station No setting Station No is not agreement 22H an NO L L 1 between the master station and wiring the slave station Comms Communication counter is not x 23H Counter eror L L 1 between the master Check wiring station and the slave station Not receive When slave statio
134. ntroller Set the time used for time out evaluation described above The value set here multiplied by 10 ms is regarded as the evaluation time When 0 is set to D8129 the evaluation time is regarded as 100 ms Example When the time out evaluation time is set to 50 ms M8002 MOV K5 D8129 a MITSUBISHI 9 4 FX communication RS instruction 9 9 2 Hardware Hand Shake Operation 9 2 1 FX FX2c FXon FX1s FXin and FX2n earlier than V 2 00 In the FX FX2c FXon FX1s FXin and FX2N earlier than V 2 00 half duplex communication is performed Accordingly when the send flag is turned on while data is received the send wait flag M8121 is turned on When the receive completion flag is changed from OFF to ON send is started 1 Do not use hardware hand shake D8120 b12 b11 010 0 0 0 RS instruction driving Que ON Send data Send request V ON y OFF 3 M8122 x x OFF 4 ON flag M8121 This period should be 100 usor more Receive data l RD RXD Receive ON Y Nz completion M8123 OFF The receive wait lt status is started Reset it using a program When it is not trurned off the next data cannot be received In FX1s FXin FXon FX and 2 series the period should be 2 scan time or more MITSUBISHI 9 5
135. o T4 see the previous page 1 When reading data from the programmable controller to the computer Communication time TO T1 T2 or TW whichever is ar 4 T5 5 1 baud rate x number of bits in 1 1 7 8 T1 x number of characters Start bit Z Stop 1 or 2 Data length 7 or 8 Parity bit 0 or 1 max 1 scan time during RUN message processing is done at END processing a maximum delay of 1 scan could occur depending on message timing during STOP T1 is 1 ms END process time of programmable controller during data communication A delay of at least 2 scans is required However using one pair wiring on the 1 N system configuration this time need to set Time out timer value D8129 1 scan time or more TW set time when message wait is set When writing data from the computer to the programmable controller Communication time TO T1 T2 or TW whichever is T3 1 baud rate x number of bits 1 MU 1 7 8 1 2 x number of characters Start bit ia AN Stop bit 1 or 2 Data length 7 or 8 Parity bit 0 or 1 max 1 scan time during RUN message processing is done at END processing a maximum delay of 1 scan could occur depending on message timing during STOP T1 is 1 ms END process time of programmable controller during data communication TW set time when message wait is set 7 13 FX communication Computer li
136. ollows depending on the model and version of the programmable controller To set the time out check time as 60 ms MOV 08129 Other function information 2 In the case of FXon series turn on 8120 when using the special 08129 PC series Setting range FX1S FX1N 1 to 255 10 to 2 550 ms however a setting of 0 gives 100 ms FX FX2C FX2N FX2NC 1 to 3 276 10 to 32 760 ms however setting of 0 gives 100 ms It must be noted that the time out check time is not updated until the next character is received and hence must be set to at least more than the time necessary to receive one character at the baud rate transmission speed in use When 1 character 12 bits the minimum setting of time out check time is as follows Baud rate bps Time to receive one character ms Time out check time set value 300 40 50ms 5 600 20 30ms 3 1200 10 20ms 2 2400 5 10ms 1 4800 2 5 10ms 1 9600 1 25 10ms 1 19200 0 625 10ms 1 MITSUBISHI 7 11 FX communication Computer link 7 7 5 Communication Timing Chart 7 5 1 Reading Data from Programmable controller x z o x Computer 7 7 Tops Ta T5 j Interface N A More than two
137. on 1 1 slave station 2 2 slave stations 7 7 slave stations MITSUBISHI 4 3 FX communication 4 2 3 Setting the Refresh Range D8178 Set a value 0 to 2 to the special data register D8178 Default 0 This setting is not required for the slave station The devices used in each pattern are occupied by all the stations for the N N network Communication device Refresh range Pattern 0 FX1s FX1N FX2N FX2NC Pattern 1 FX1N FX2N FX2NC Pattern 2 FXin FX2N FX2NC Bit device M 0 point 32 points 64 points Word device D 4 points 4 points 8 points Note N N network 4 Please set the refresh range to pattern 0 When setting it other than pattern 0 all and FXis series units in the system experience a communications error In this case please note that link time becomes long as the FXoN and FX1s communi cation error is occurring 1 In the case of pattern 0 FXon FX1s FX1N FX2N FX2NC Device No Station No Bit device M Word device D 0 point 4 points No 0 D0 to D3 No 1 D10 to D13 No 2 D20 to D23 No 3 D30 to D33 No 4 D40 to D43 No 5 D50 to D53 No 6 D60 to D63 No 7 D70 to D73 a MITSUBISHI FX communication Device No Station No Bit device M Word device D 64
138. on distance max 50m 2 FXin Shielded twisted pair cable O Using interface Extension distance Ex FX1N 485 BD Max 50m 1N FX1N CNV BD FXoN 485ADP Max 500 m 2 2 When including FX1N 485 BD in system configuration total extension distance max 50m 3 FX1s Shielded twisted pair cable O Using interface Extension distance y FX1N 485 BD Max 50 m 1 3 FX1N CNV BD FXoN 485ADP 500 m 3 When including FX1N 485 BD in system configuration total extension distance max 50m 4 FXoN Shielded twisted pair cable O Using interface Extension distance FXON FXon 485ADP Max 500 m MITSUBISHI FX communication Introduction 1 5 FX FXac Shielded twisted pair cable and glassfiber cable O Using interface Extension distance FX2 40AW Shielded twisted pair cable Max 10m FX2 FX2C FX2 40AP Glassfiber cable Max 50m Note Parallel link is possible between the same series PLC s or between other series in the same group However parallel link between each group cannot be achieved Group s are separated as follows Group No Series Group 1 2 Group 2 FX1N Group 3 FXis Group 4 FXon Group 5 FX FX2c 1 2 3 Computer Link 1 Use RS485
139. or programming tool FX 422CAB FX 20P CADP 1 FX 10DM FX 20P CABO or FX 20P CAB FX 20P CADP 220mA FX 10DU E FX 20P CABO or FX 20P CAB FX 20P CADP 220mA FX 20DU E FX 20DU CABO or FX 20DU CAB FX 20P CADP 180mA FX 25DU E FX 30DU E FX 50DU CABO 1M 10M 20M 30M L FX 40DU ES FX 40DU TK ES or FX 40DU CAB 10M 20M 30M FX 20P FX 50DU TK S E CADP F940GOT SWD LWD E 2 _ F930GOT SBD FX 50DU CABO 1M 10M 20M 30M L OmA F9GT HCAB2 150 F9GT HCAB 3M 10M F940GOT SBD LBD H or FX 50DU CABO 1 F9GT HCNB F9GT OmA HCAB 3M 10M GOT A900 Connecting direct I _ CPU port type F9GT CABO 150 10M OmA 1 When using other products or cables please check the product manual for required 5V DC 11 supply Note These products cannot be connected via FX 2PIF to port of FX1N 422 BD or FX2n 422 BD If connecting power supply circuit in PLC will go down MITSUBISHI 11 1 FX communication Optional programming port 11 11 2 FX2n 232 BD FX1n 232BD and FXon 232ADP When an FX2n 232 BD or an FXon 232ADP is installed on the FX2N FX2Nc Series or when an FX1N 232 BD is installed on 1 or FX1s Series a personal computer in which the following soft ware is supported can be connected to each port However the FX2N 232 BD consumes 5V DC 20 mA from the 2 programmable controller the FX1N 232 BD consumes 5V DC 20 mA from the FXin FX1s programmable controller and th
140. otocol format 4 protocol 1 Make sure to set to 0 when computer link used 2 Make sure to set to 0 when no protocol communication used 3 When using RS485 422 interface make setting controll line the same as this But control line of communication is the same as when not using control line operation This connection RS485 is supported in the FXon FX1s FXin FX2N FX2Nc series MITSUBISHI FX communication Communication format 6 6 4 Example of setting program When setting the contents shown on the left perform programming as follows 2 y MOV HocsE 08120 1 Data length 7 bits Parity Even b15 50 08120 0000 1100 1000 1110 Stop bit 2 bits 0 C 8 E Baud rate 9600 bps Protocol No protocol Header No used Terminator used Control line Normal mode 1 MITSUBISHI 6 3 FX communication Communication format 6 MEMO MITSUBISHI 6 4 FX Series Programmable Controllers Computer link 7 1 Introduction 2 Wiring 3 Specifications 4 N N network 5 Parallel link 6 Communication format D8120 7 Computer link 8 Commands for computer link 9 RS instruction 10 2321 11 Optional programming port 12 Diagnostics A Further Information Manual List B ASCII code Lists MITSUBISHI FX Ser
141. p is disabled 12 4 2 Programmable Controller Error Code With the FX series programmable controllers the following errors are not transmitted using a NAK but instead are shown at the programmable controller by switching on special auxiliary relay M8063 and storing the error code in special data register D8063 quu Error description 6301 Parity overrun framing error 6305 Command failure receiving a command other than GW global when the station num ber is FF 6306 Monitor timer over message to be received is insufficient Because these errors are not transmitted it must be programmed at the computer so as to recog nize an error by using a watchdog timer or other monitor timer a MITSUBISHI 12 4 FX communication Diagnostics 12 12 4 3 Diagnostics 1 Checkthe status of the RD RXD LED and the SD TXD LED provided on each communica tion unit f both of them are lighted and extinguished nothing is wrong If the RD RXD LED is lighted extinguished but the SD TXD LED is not lighted extin guished not lighted at all check the setting of the station No and the transmission rate baud rate the RD RXD LED is not lighted extinguished check the wiring and confirm the connec tion with the programmable controller 2 Make sure that the communication procedure is performed correctly If it is not performed correctly correct the setting in the computer
142. points 8 points No 0 M1000 to M1063 DO to D7 No 1 M1064 to M1127 D10 to D17 No 2 M1128 to M1191 D20 to D27 No 3 M1192 to M1255 030 to 037 No 4 M1256 to M1319 040 047 No 5 M1320 to M1383 D50 to D57 No 6 M1384 to M1447 D60 to D67 No 7 M1448 to M1511 D70 to D77 4 2 4 Setting Retry Count D8178 Set a value 0 to 10 to the special data register D8178 Default 3 This setting is not required for the slave station munication error occur in the station 4 2 5 Setting Comms Time out D8179 Set value 5 to 255 to the special data register D8179 Default 5 This value multiplied by 10 ms is duration of the comms time out a MITSUBISHI 2 Inthe case of pattern 1 FX1N FX2N FX2Nc Device No Station No Bit device M Word device D 32 points 4 points No 0 M1000 to M1031 DO D3 No 1 M1064 to M1095 D10 to D13 No 2 M1128 to M1159 D20 to D23 No 3 M1192 to M1223 1030 033 No 4 M1256 to M1287 D40 to D43 No 5 M1320 to M1351 D50 to D53 No 6 M1384 to M1415 060 063 No 7 M1448 to M1479 D70 to D73 3 In the case of pattern 2 FX1N FX2n FX2Nc N N network 4 If a master station tries to communicate with the slave station at this retry count or over com Comms time out is the communication dwell time between the master station and slave station FX communication 4 2 6 M8038
143. programmable controllers FX FXon 485ADP User s Guidel JY992D53201 This manual contains written hardware explanation of installation and specification regarding the FX 485ADP and FXon 485ADP FX 232ADP User s Guide JY992D48801 This manual contains written hardware explanation of installation and specification regarding the FX 232ADP FXon 232ADP User s Guide JY992D51301 This manual contains written hardware explanation of installation and specification regarding the FXon 232ADP FX2N 232 BD User s Guide JY992D66001 This manual contains written hardware explanation of installation and specification regarding the FX2n 232 BD FX2N 485 BD Hardware Manual JY992D73401 This manual contains written hardware explanation of installation and specification regarding the FX2N 485 BD FX2N 422 BD User s Guide JY992D66101 This manual contains written hardware explanation of installation and specification regarding the FX2N 422 BD MITSUBISHI A 1 FX communication Appendix A Table A 1 Further Information Manual List Manual name Manual No Discription This manual contains written hardware explanation of JY992D84501 installation and specification regarding the FX1N 232 BD This manual contains written hardware explanation of JY992D84301 installation and specification regarding the FX1N 485 BD This manual contains written hardware
144. r PC IF A Programmani 2 Stop bit 1 bit Sum check Sum check is used Station No Station No 0 Exclusive protocol format Format 1 According to the above transmission specification the transmission specification and trans mission procedure of the programmable controller are set as follows D8120 H6080 D8121 H0000 For setting and details see chapter 6 and section 7 4 D8129 KO 2 Program example 10 TO 3000 Reception wait counter adjusted depending on computer speed 20 STCNT 14 Normal data length 30 NACNT 7 Data length of error code NAK statement 40 ERFLG 0 50 ENQ CHR 5 K Transmission 60 STX CHR 2 lero 70 ETX CHR 3 00 2 04 ABCD 34 80 NAK CHR amp H15 gi d NEUES 90 DATASEND Data transmission 2 Sse 9 2 100 CLOSE 1 28353 m 110 OPEN COM1 ASH1 z SE o 8 120 SENDDATA OOFFTT204ABCD34 Transmission data 130 PRINT 1 ENQ SENDDATA e 140 REC0 Reception of first character g wn 150 RVCNT 1 160 GOSUB RECWAIT 170 IF ERFLG 99 THEN GOTO ERRORFIN1 180 BUF RCV MITSUBISHI 7 18 FX communication Computer link 7 190 200 HED LEFT BUF 1 IF HED STX OR HED NAK THEN GOTO REC1 ELSE GOTO RECO 210 REC1 Reception of remaining data 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 42
145. re completed Caution When using RS485 wiring one pair see section 2 3 3 remember to take account of or ignore the echo of the commands sent from the computer a MITSUBISHI 7 3 FX communication Computer link 7 7 3 Howto Reada Control Protocol Diagram 1 When the computer reads data from the programmable controller computer programmable controller A C X S E I Computer N Data A Data Programmable I Data controller B a Areas A and C indicate transmission from the computer to the programmable controller b Area B denotes transmission from the programmable controller to the computer The computer program is created so that the data is transmitted in the order read from left to right and the protocol determines that the data is sent in the sequence A B C Example In area A ENQ is transmitted followed by all other data starting to the right after the ENQ 2 When writing data from the computer into the programmable controller computer programmable controller A FEN E Computer Ni Data Programmable A Data controller Areas indicates transmission from the computer to the programmable controller b Area B denotes transmission from the programmable controller to the computer The computer program is created so that the data is transmitted in the order read from left to right and the protocol determine
146. re listed below Signal a Description Signal RR Description STX 02H Start of Text LF OAH Line Feed ETX O3H End of Text CL OCH Clear EOT 04H End of Transmission CR ODH Carriage Return ENQ 05H Enquiry NAK 15H Not Acknowledge ACK 06H Acknowledge a The programmable controller initializes the transmission sequence when receiving any one of ENQ ACK NAK and starts b When EOT or CL code is received as follows the programmable controller initializes the transmission sequence At this time no response is made from the programmable con troller Format 1 Format 4 E E C L O O or or Computer L Computer Programmable Programmable controller controller MITSUBISHI 7 8 FX communication Computer link 7 2 Station number The station number is the number provided at the programmable controller in order to deter mine which programmable controller the computer accesses In the FX series programmable controller the station number is set by the special data register 08121 special D8121 herein after The setting range is OOH to OFH In the case of FXon series turn on M8120 when using the special D8121 For the setting method of an A series programmable controller see the A series manual
147. rs in the programmable controller then turn it ON a MITSUBISHI 10 18 FX communication 10 4 Example Program 10 4 1 Example of 16 Bits Data Communication 2 2321 10 This system configuration describes an example in which data of 16 bit buffer length is sent and received between the equipment of the terminal specifications In this example the ASCII code saved in the data registers D201 to D205 in the programmable controller sent to the counterpart equipment and the data received from the counterpart equipment is saved to the data registers D301 to D304 in the programmable controller 1 System configuration FX programmable contraller FX 2n 232lF Cross cable 2 Example setting buffer memories The items not described here are set to the default respectively a Communication format BFM 0 gt a MITSUBISHI Bit Description Setting bO Data length 1 8 bits BS Parity 1 1 Even 1 0 b3 Stop bit 1 2 bits b4 DS Baudrate 1001 19200 bps b7 68 control li 0 0 Not used b9 ontrol line 0 0 Not use D10 lAddition of CR and LF 0 0 Not added 612 Availability of check sum and Specification item for b13 ASCII HEX conversion 0 0 Not available 16 bit length b14 Send receive buffer data length 0 16 bits b15 Undefined b15 b8 b7 b0 0 0 0100001001 11111
148. rther Information Manual List B ASCII code Lists MITSUBISHI FX Series Programmable Controllers Optional programming port 11 MITSUBISHI FX communication Optional programming port 11 11 Optional Programming Port This section describes connection to peripheral equipment programming tool data access unit and electronic operation terminal using the FX2N 232 BD FX1N 232 BD FXon 232ADP FX1N 422 BD or FX2N 422 BD as well as cautions on communication For the operating procedure of each peripheral equipment and installation of each interface refer to the corresponding manual 11 1 FX2n 422 BD FX1n 422 BD When an FXe2n 422 BD is installed on the FX2n Series or when an FX1N 422 BD is installed on 1 or FX1s Series the following peripheral equipment programming tool data access unit and electronic operation terminal can be connected However the FX2N 422 BD consumes 5V DC 60 mA from the FX2N programmable controller and the FX1N 422 BD consumes 5V DC 60 mA from the FX1s or FX1N programmable controller Make sure that the current consumption of 5V DC for special extensions and peripheral equip ment does not exceed the capacity of the 5V DC power of the FXan FXiN FXis Product Connecting cable Required 5V DC FX 20P E 180mA FX 20P CABO or FX 20P CAB FX 20P CADP FX 10P E 120mA Personal computer F2 232CAB 1 FX 232AW C FX 422CABO or 220mA F
149. s Device 1 character 2 characters with timer and counter device number 4 characters 2 char acters with timer and counter 5 characters 1 Bitdevices T Usable Device specification characters command ecimal octa expression BR WR FXis 2 FXiN FX BW WW Ne BT WT Inputs X X0000 X0000 X0000 X0000 X0000 X0177 X0017 X0337 X0177 X0267 Octal Y0000 Y0000 0000 0000 Y0000 Outputs 0177 Yoo1s YO337 YO177 YO267 M0000 Auxiliary relays 0000 0511 M0000 M1535 M3071 O States 5 S0000 S0127 50000 50999 Special auxiliary relays 8000 8254 M8000 M8255 Decimal Timer contacts T TS000 TS063 TS000 TS255 CS000 CS031 x Counter contacts C CS235 CS254 CS000 CS255 In FX series the timer coil TC and counter coil CC are not supported 2 Word devices ET Usable Device specification characters E Decimal command Device FX octal BR 1N FA2N expression FX1S FX FX2c FXonc ae WW WT Timer current value TN000 TN063 TN000 TN255 O CN000 CN031 Counter current value C CN235 CN254 CN000 CN255 O Data registers D D0000 D0255 00000 00999 D0000 D7999 Decimal x O File registers D D1000 D2499 D1000 D2999 O RAM file registers D D6000 D7999
150. s that the data is sent in the sequence A B Example In area A ENQ is transmitted followed by all other data starting to the right after the ENQ MITSUBISHI 7 4 FX communication Computer link 7 7 4 Basic Formats of Dedicated Protocol There are two formats for the dedicated protocol which may be selected by setting special data register D8120 see chapter 6 The difference between the two formats is whether CR LF is added to each block or not The protocols are format 1 and format 4 The format names conform to the computer link unit for A series programmable controller Basic format of transmitted data Control code 3 Station 2 4 e Message wait amp Character lt Sum check code 1 3 Control code 2 1 Whether or not to add sum check code be selected using the communication format spe cial data register D8120 2 Whether or not to add terminating CR LF codes is determined by the protocol selected MITSUBISHI 7 5 FX communication Computer link 7 7 4 1 Control Protocol Format 1 Control protocol Description T z Q 8 Transmission sequence 2 S 9 la A or T T T T m ol B 9 zz 9 ol I
151. scan di delay is needed iS 1 3 This time becomes 0 when the message wait time is not set or amp when the wait time is less than the processing time needed by 1 n Programmable the programmable controller controller TO Ti 2 gt Programmable controller program END END Step0 END If the wait time has expired the response is sent at completion of the END process otherwise the wait time is checked again during the next END process 7 5 2 Writing Data to Programmable Controller Jm Computer 7 Y Wait TW j EM 3 Interface Writing data This time becomes 0 when the message wait time is not set or when the wait time is less than the processing time needed by Programmable the programmable controller controller To 2 lt a Programmable controller program END END Stepo Step0 END If the wait time has expired the response is sent at completion of the END process otherwise the wait time is checked again during the next END process MITSUBISHI 7 12 FX communication 7 5 3 MITSUBISHI Computer link 7 Communication Time This is to explain the method of calculating the approximate time until all communication is over For the locations of TO t
152. ssing of Send or Receive the scan time is extended typically by about 10 The scan time can be monitored using the special data registers D8010 to D8012 of the programmable controller Note These are in units of 0 1 ms Notes of Computer 1 Conditions under which the transmission sequence is initialized The transmission sequence of the programmable controller is initialized during the following conditions When the power is turned on When data communication is completed normally When control code EOT or CL is received When a NAK control code is received After the time out check time has elapsed see section 7 4 4 2 Occurrence of framing error at the computer When a commercial RS485 interface is used at the computer if nothing is transmitted from the programmable controller to the computer at the interface a framing error may occur at the computer Accordingly read and skip the data at the computer until any one of STX ACK and NAK is transmitted from the programmable controller 3 NAK response from programmable controller NAK response from the programmable controller to the computer is done when an error is detected 4 Command transmission from computer When sending a command from the computer to the programmable controller using the ded icated protocol only send the command after a gap of approximately two programmable controller scans from the time the data communications required by the previous command a
153. t devices X Y 10 words 10 words E write Word S data is in units of 16 devices 160 points 160 points unit hi Writes a group of word devices D T 3 C data is in units of 1 device Bit Set reset individual bit devices X Y unit 42H 54H M S T C selectively in units of 1 10 points 20 points Test device select Set reset bit devices X Y M S 6 words 10 words write selectively in units of 16 devices 96 points 160 points D WT 57H 54H a DT P 2 rite word devices D selectively in units of 1 device S points To pois Remote run RR 52H 52H Remote run stop request to PC Remote stop RS 52H 53H programmable controller E PC type read PC 50H 43H type name code is read Set reset the global flag M8126 for Global GW 47H 57H FX series to all connected 1 point 1 point programmable controllers Send request from programmable On demand controller Possible however only in 1 1 system configuration Characters received from the 25 254 Loopback test TT 54H 54H computer are directly sent back to the characters characters computer Computer except high speed 32 bit counters C200 to C255 a MITSUBISHI 7 16 FX communication Computer link 7 7 7 2 Device specification ranges The following is the device and device number range that can be used in the access of device memory Each device is composed of five character
154. t using the special data register D8120 in a programmable controller Set D8120 in accordance with external equipment used After modifying the setting of the D8120 make sure to turn off the power of the programmable controller then turn it on again n the FXen FX2Nc series this setting can be performed using parameters Related Flags and Data Registers Special Auxiliary Relays Special auxiliary relays Description M8121 Data transmission delayed RS instruction M8122 Data transmission flag RS instruction M8123 Finished receiving flag RS instruction M8124 Carrier detection flag RS instruction M8126 Global flag computer link M8127 On demand handshake flag computer link M8128 On demand error flag computer link M8129 On demand word byte changeover computer link Time out evaluation flag RS instruction M8161 8 bits 16 bits changeover flag RS instruction indicates the use application Special Data Registers Special data registers Description D8120 Communication format RS instruction computer link D8121 Station No setting computer link D8122 Number of remaining data to be transmitted RS instruction D8123 Number of receive data RS instruction D8124 Data header Initial value STX gt RS instruction D8125 Data terminator Initial value ETX RS instruction D8127 On demand head device register computer l
155. tion Example 1 To transmit the data stored in data registers D100 and D101 from the programmable control ler when the station number is 0 and data is specified in word units Computer The PC number FE is automatically added by the programmable controller Programmable S 1 1 rr controller T 00 1284 5678 92 X 02H 30H 46 ASH B1H 32H 33H 34H 36H 37H 38H D3H 32H Ne S J M8127 Programmable Write processing controller Set ON if a transmission error occurs On demand D8127 100 M8128 ON OFF FTN command D D8128 2 M8129 OFF D100 The 4 hexadecimal digits of D101 5678H each word are transmitted in ASCII starting with the most significant digit Program example M8000 M8129 Sy has Data transmission set to word units X000 M8002 0 PLS MO Start command signals a pulse M8127 3 MOV H1234 D100 UAE Transmission data is set T p MOV 5678 D101 T On demand error flag is reset RST M8128 cannot start if M8128 is ON a RST Y000 RST Y001 E MOV K100 108127 On demand is started by specifying transmission MOV Ko D8128 data area head address and data length M8127 M81
156. troller Side name RD RXD RTS CS CTS CD DCD DR SG GND RS MITSUBISHI FX2N 2321F RS 232C Device Side Signal name Communication is performed in accordance with the condition determined by the software in the FX2n 232IF and the counter part equipment As the carrier to send CS sig nal pin of the FX2N 2321F itself receives the request to send RS signal signal transfer is performed as if the counterpart equipment is functioning 1 When the CD signal is not monitored the CD signal pin is not required to be con nected With regard to the CD signal the FX2N 2321F only indicates the status The FX2N 232IF only indi cates the status 2 2 4 FX communication Wiring 2 b Interlink connection mode Use interlink serial cross cable Setting connection format BFM 0 b9 1 b8 1 RS 232C Device Side Signal 9 pin 25 pin name D SUB D SUB Programmable Controller Side Signal name SD TXD RD RXD CS CTS ER DTR DR DTR SG GND FX2N 2321F 3 5 3 Modem specification device Standard RS232C mode Using straight cable Setting communication format BFM 0 b9 0 b8 1 Programmable Controller Side Signal name SD TXD RD RXD RS MITSUBISHI Signal name TXD FX2N 2321F E Em MEME Sl gt lt D 5 2 Dl Sd C RXD RTS 5 CTS R R DTR GND 5
157. type hex hex FXis F2H A2USCPU 82H A2CPU A1 A2USCPU S1 83H FX FX2c 8DH A3CPU A3NCPU ASACPU 94H FX2N FX2NC 9DH A3HCPU A3MCPU A4H A0J2HCPU 98H A3UCPU 84H A1CPU A1NCPU A1H A4UCPU 85H A1SCPU A1SJCPU 98H A52GCPU 9AH A2CPU S1 A2NCPU S1 A2SCPU A2H A73CPU A3H A2ACPU 92H A7LMS F A3H A2ACPU S1 93H AJ72P25 R25 ABH A2CCPU 9AH AJ72LP25 BR15 8BH 8 12 Commands 8 FX communication 8 8 2 Control Specification and Example 1 Control specification Protocol format 1 is shown Programmable controller type name read command T T 58 3 553 gt 58 8 ol 70 o Z 3j 38 x ni o 2 2 Character area B Computer T T T T Programmable o 58 S 82 controller 5 A x gt 8 2 characters x L Notes 1 The station number PC number number of devices and sum check code are expressed in hexadecimal 2 Specification example To read the type name from station No 15 with message wait time set to 0 ms The sum check is calculated over this range j The sum check is oF 0 5 Calculated over A Q this range K Computer 05H BOH 46H 46H 46H 43H 43H 35H 06H BOH 46 46H 46H Programmable S E controller 8 i 8 1 X Indicates station No 15 BOH 4
158. xamples of Remote RUN STOP 1 Control specification Protocol format 1 is shown Programmable controller remote run command RR Programmable controller remote stop command RS T T T Q ecc m 52 4 RR 25 5 7 3 o or ir RS 33 8 Computer T Programmable gt 52 3 controller o g A i Notes The station number PC number number of devices and sum check code are expressed in hexadecimal 2 Operation examples a Example 1 To execute remote RUN at station No 5 with a message wait time set to 0 ms The sum check is calculated over this range VN E N05 FF 10 5 Q Computer 5H 35H 46H 46H 52H 35H Programmable A controller C 05 FF K 35H 46H b Example 2 To execute remote STOP at station No 0 with message wait time set to 0 ms The sum check is calculated over this range E FF RS 0 Q Computer 5H 46H 46H 53H 31H Programmable A controller 00 FF K 06H 46H MITSUBISHI FX communication 8 8 8 8 1 Reading The Programmable Controller Type PC command Commands 8 MITSUBISHI Type Codes P Type code Type code rogrammable controller type Programmable controller
159. zgB 2 3 22 8 E o z gt 5 538 gt 2 893 6 To read data Computer Oo 3 gt oS 5 from the lu Siri grammable Programmable o o Zla gm controller to controller AgR 2 8 5 485 the computer x S 9 amp x L or T T T co U gt Ze Po 5 89 ol 1 1 T T T T meg S S 2 s gs Z B 32 5 225 O 2 aS DE To write data Computer i T from the com Programmable Transmission sequence gt 52 3 puter to the controller o 2 programma gt ble controller or T T T 282 313 gt S 2 A 2 D 1 L 1 Sum check code is used when the sum check flag is set Yes b13 1 in special data register 08120 and not used when set to No 613 0 2 When the sum check flag is set to Yes the sum check is made on the characters in the aster Remarks isked area 3 In the diagram the contents of character area A character area B and character area depend on the individual system but do not differ depending on the format of control protocol For details of each character area see the link contents MITSUBISHI 7 6 FX communication Computer link 7 7 4 2 Control Protocol Format 4 Description Control protocol z o E
Download Pdf Manuals
Related Search
Related Contents
BiPAP Pro 660 User Manual Quick Start Guide Elkay ECTRU12179 Installation Guide Application Note 2 ThermoMap® : A Breakthrough in IC Thermal GE JEJ180 User's Manual 30303 Mail Alert 2 Set.p65 DigiBase Guida dell`utente - Digidesign Support Archives この1台で、モニターにも、簡易PAにも。 便利に使いこなせる多 Copyright © All rights reserved.
Failed to retrieve file