Home

FX COMMUNICATION (RS-232C, RS-485, RS

image

Contents

1. The 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 232IF 4 terminators maximum can be specified When the number of terminators is less than 4 the upper 075 are ignored zero suppression and not transferred As the first terminator specify an ASCII code from 01H to 1 As the second to fourth terminators any ASCII code can be specified The register structure and the transmission order are equivalent to those of the send header described above MITSUBISHI 10 9 FX communication FX2N 232lIF 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 O 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
2. MITSUBISHI 2 2321 10 M8002 FNC 79 Transfer of communication format ad TO KO KO H409F K1 409FH BFM80 pulse Block No BFM No Transfer Number of source transfer points FNC 79 Transfer of receive upper limit byte count K2 K8 K1 K8 BFM 2 79 H02 Send header to K K4 02 4 FNC 79 Send terminator TO S KA 03 gt 6 79 H02 Receive header K8 024 gt BFM 8 FNC 79 H03 Receive terminator KI osuSBFMiHO X000 PLS M1 Send command Send command input M 1 FNC 12 Send byte count Mov 0200 K9 D200 FNC 12 H31 D 201 1 MOV 3 01115 Program as follows in the same way MOV H32 D202 2 MOV H33 D203 3 MOV H34 D204 4 gt di T 859100155 MOV H35 D205 5 MOV H36 0206 6 MOV H37 D207 7 MOV H38 D208 8 MOV H39 D209 9 J FNC 79 Transfer of send byte count and send data K1000 D200 K 10 0200 9 gt 1000 D205 5 gt 1005 TO D201 1 gt BFM 1001 D206 6 BFM 1006 D202 2 gt 1002 D207 7 gt 1007 D203 3 gt 1003 D208 8 gt BFM 1008 D204 4 gt 1004 0209 9 gt 1009 8000 M8003 I M0 Send receive enable RON Initial pulse NC contact monitor FNC 78 Read
3. FXen 485 BD FXin 485 BD FXenc 485ADP SDA SDA SDB SDB Terminating RDA RDA Terminating resistor resistor 110Q RDB RDB 110Q SG TEE Moo meme UNT SG Class D grounding 2 Two pair Wiring FXen 485 BD FXin 485 BD FXenc 485ADP Terminating SDA SDA Terminating resistor resistor 330Q SDB SDB 330Q Terminating RDA RDA Terminating resistor resistor 330Q RDB RDB 330Q SG SG Class D grounding MITSUBISHI 3 13 FX communication Wiring 3 3 4 6 FX2Nc 485ADP and FX2nc 485ADP 1 One pair Wiring FXe2nc 485ADP FXe2nc 485ADP SDA SDA SDB SDB Terminating RDA RDA Terminating resistor resistor 110Q RDB RDB 1100 SG iy SG Class D grounding 2 Two pair Wiring FXenc 485ADP FXenc 485ADP Terminating SDA SDA Terminating resistor resistor 330Q SDB SDB 3300 RDA RDA Terminating Terminating resistor resistor RDB RDB 330Q 330Q se H Li SG Class D grounding 4 MITSUBISHI ET FX communication 3 4 7 FX2 40AW FX2 40AW and FX2 40AW SA FX2 40AW SB SA Bau SG 1 SB SG 1 3 4 8 2 40 and FX2 40AP FX2 40AP FX2 40AP dp R NN NN MITSUBISHI R
4. 7 1 7 2 Information Needed Before 7 3 7 2 1 Programmable Controller Operation 7 3 7 2 2 Computer Notes 7 3 7 3 How to Read a Control Protocol Diagram 7 4 7 4 Basic Formats of Dedicated Protocol Anneli sires ase 7 5 7 4 1 Control Protocol Format 1 sas naa su 7 6 7 4 2 Control Protocol Format 4 n 7 7 7 4 3 Control Protocol Parts Explained 7 8 7 4 4 Time out Check Time enne 7 11 7 5 COMMUNICATION Timing Chart 7 12 7 5 1 Reading Data from Programmable controller u 7 12 7 5 2 Writing Data to Programmable Controller nennen 7 12 7 5 9 Communication Time iere i tu 7 13 7 6 Character Area Data Transmission 7 14 7 6 1 Bit Device Memory e tee ette pute cupis Pre 7 14 7 6 2 Word Device Memoiyu icd er RERO M RR MUERE ERU GER ARR HERREN ER ERR da 7 15 7 7 Commands and Device Bags ehe E pep iet 7 16 por Kern cct 7 16 7 7 2
5. 10 10 10 2 9 Receive Terminator lt BFM 11 upper BFM 10 gt 10 10 10 2 10 Receive Suspension Waiting Time BFM 32 I 10 10 10 2 11 Number of Remaining Send Data BFM 13 gt a 10 11 10 2 12 Number of Receive Buffers BFM 14 gt 1 u 10 11 MITSUBISHI xi FX communication 10 2 13 Send Sum Result BFM 15 gt aspasia qasan nennen nnns nennen 10 11 10 2 14 Receive Sum Result BFM 16 gt 10 11 10 2 15 Time from CS ON to Send Start BFM 20 gt r eanne 10 12 10 2 16 Time from Completion of Actual Send to RS OFF completion flag ON BFM 21 gt 10 12 10 2 17 Status BFM 428 10 13 10 2 18 lt 25 gt nas Sa Q Qa senes nnne nnns 10 14 10 2 19 Model Code BFM 80 gt cccccceceeeeeeeeeeceseeeaeeceeeeaeecaeseaeeseeseaeeeaaeseaeeseseeeeeseeeseaeenneees 10 14 10 2 20 Send Byte Count BFM 1000 gt rss 10 14 10 2 21 Send Buffers BFMs 1001 to 1256 gt enne 10 14 10 2 22 Receive Byte Count BFM 2000 222 10 15 10 2 23 Receive Buffers BFM 2001 to 22
6. 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 program downloads can be accomplished On line changes can be performed with the programmable controller in Run Mode Example of changing the communication format D8120 between H0086 and H0000 The programmable controller is first set for no protocol communication using the RS instruction MITSUBISHI 12 H0086 D8120 FNC 80 RS DO K1 D1 1 FNC 12 A H0000 D8120 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 acceptable number of points of receive data The data send receive sequence using an RS instruction is described below X010 FNC 80 RS D200 DO D500 1 For operafion refer to section 9 2 9 3 Address
7. 4 Baud rate bps Reading word points 9 600 19 200 10 0 35 0 25 32 0 45 0 35 64 0 55 0 45 MITSUBISHI 2 3 FX communication Specification 2 MEMO 4 MITSUBISHI FX communication Wiring 3 3 Wiring Terminal layout when using a communication unit please refer to the individual units manual Common N 1 This system is designed to read and write data forced on off while the programmable controller is running If abnormal data is written to the programmable controller due to effects of noise the programmable controller may malfunction and cause machine trouble or an accident Therefore 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 distance of more than 100 mm 3 94 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 serious damage to the 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 MITSUBISHI 3 1 FX communication Wiring 3 3 1 Caution on cabl
8. 12 6 2 Diagnostics MITSUBISHI 12 7 1 Check the status of the POWER LED provided in the FX2n 232 IF When it is Lit the power source is correctly supplied II it is extinguished supply from the power source correctly 2 Check the status of the SD LED and the RD LED provided in the FX2n 232 IF elf the RD LED is not Lit while data is received or the SD LED is not Lit while data is sent check the installation and the wiring e When the RD LED is Lit while data is received or the SD LED is Lit 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 FX communication Diagnostics 12 12 7 Using Optional Programming Port 12 7 1 FXis FXin and FXanc earlier V2 00 1 Make sure that the communication for
9. 20 S result is in units of 1 device SAM 00 050 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 r DT eads a group of word devices D T result is in units of 1 device 13 points 64 points Bit Writes a group of bit devices X Y M PW 4289 879 C data is in units of 1 device 3080 160 points 5 Batch Writes a group of bit devices X Y 10 words 10 words E write Word S data is in units of 16 devices 160 points 160 points 8 Writes a group of word devices D I E C data is in units of 1 device Bit Set reset individual bit devices X Y unit BT 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 6words 10 words write Word selectively in units of 16 devices 96 points 160 points unit WT 57H 54H Wim d dev 6 TOS rite word devices D I selectively in units of 1 device 19 points Remote run RR 52H 52H Remote run stop request to PC Remote stop RS 52H 53H Programmable controller 6 2 NE PC type read PC 50H 43H PC 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 controller
10. Bit Description 0 1 Initial value Data length 7 bit 8 bit 1 8 bit b1 b1 00 None b2 Parity 01 Odd 11 Even 11 Even 63 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 Unused b9 Control line 01 Standard RS 232C 00 Unused 11 RS 232C interlink connection mode b10 b10 00 Not added b11 Addition of CR and LF 01 CR only 00 Not added 11 CR and LF b12 RE 00 Not available Availability of check 612 01 ASCII HEX conversion available b13 10 Check sum available 00 Not available 11 Check sum available ASCII HEX conversion available Send receive buffer F b14 data length 16 bit 8 bit 0 16 bit b15 Unused 0 Unused The communication format is determined on the rising edge of the send receive enable command BFM 1 bO Accordingly the communication format setting should be preliminary transferred using the TO instruction before BFM 1 bO is turned ON Also the send header and terminator are determined by 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 terminat
11. Notes Specify the number of characters so as to satisfy the following condition 1 lt No characters lt 254 25 for FXoN The station number PC PLC number number of devices and sum check code are expressed in hexadecimal 2 Specification example To test the Loopback with data ABCDE at station No 0 with message wait time set to 0 ms The sum check is calculated over this range lt gt 00 FFITT 005 ABCDE 78 The sum check is calculated Q over this range Computer 05H 54H 35H 43H 44H 45H 376 lt gt Programmable s de controller 05 Ts 46H 35H 1 42H 43H 44H 45H 33H Same data is transmitted 4 MITSUBISHI 8 21 FX communication Commands 8 MEMO 4 MITSUBISHI 8 22 FX communication RS instruction 9 9 RS instruction This section refers to the RS instruction For target devices refer to the application instruction manual of each programmable controller 91 Function and Operation 9 1 1 Send and Receive Program An RS instruction sends and receives serial data via the RS 232C port optional equipment X010 A 200 DO D500 D 1 Read address Read address and number of number of points of send points of receive data data The data trans
12. 8 12 8 8 2 Control Specification and 8 13 8 9 Global Function GW command epo eR org ER e gr o e ut wan eee veg Fh ng Kee deer Era aps 8 14 8 9 1 Control Specification and Example of Global 8 14 8 10 On demand 8 15 8 10 1 Special Devices Used in On demand Function 8 15 8 10 2 On demand Control Protocol enne nnne nennen nennen nnne 8 16 8 10 3 Specification and Example of 8 18 Bel I 003068C POS eT CNN 8 21 eM Qa da sen 9 1 9 1 Function and Operation 9 1 9 1 1 Send and Rec ive Program 9 1 9 1 2 Operation of RS Instruction eene EEE An EE 9 3 9 1 3 Related Flags and Data 9 4 9 2 Hardware Hand Shake Operation sss 9 6 9 2 1 FX FX2c FXoN 1 FX1N and FX2N earlier than V 2 00 9 6 9 2 2 FX2N FX2NC V 2 00 or later uu 9 10 9 3
13. gt status is started Reset it using a program When it is not trurned off the next data cannot be received OFF ON Y ON pi Note In FX1s FXin FXon FX and FX c series the period should be longes 2 scan times or more 4 MITSUBISHI 9 6 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 LI Receive data RD RXD Data 1 Data 2 ER DTR OFF ON Receive completion OFF ON ON NT M8123 Reset using a program When it is not trurned off the next data cannot be received 4 MITSUBISHI 9 7 FX communication RS instruction 9 3 Use normal mode 1 of control line RS instruction driving SD C Data 3 Send request OFF ON M8122 OFF ON Send wait OFF 0 flag M8121 8 ER DTR OFF on Receive data RD RXD Data 2 Ie Receive completion M8123 OFF ON Y Reset using a program When it is not trurned off the next data cannot be received DR DSR OFF ON This period s
14. 5 0015 5 6 AB1790F 44H 30H 33H 35H 30H 30H 32H 35H 36H 41H 42H 31H 37H 30H 46H 9 6 3p up p eg 7 B15 B14 B13 B12 B11 B10 89 88 87 B6 B5 B4 B2 B1 BO B15 B14 B13 B12 B11 810 89 B8 B7 B6 B5 B4 83 B2 Bi BO 01110 1 0 171 0110 1 0 1 0 1 1 0 0 0 1 0 1 71 1 0 0 0 0 111 111 Contents of D350 is 56ABH Contents of D351 is 170FH 22187 in decimal 5903 in decimal Example 2 When showing the contents of C200 32 bit counter T Head device No of device CM200 Dn 45345878 44H 4EH 32H 30H 30H 30H 81H 31H 32H 33H 34H 35H 36H 37H 38H Data Data 1 2 3 4 5 6 7 8 k gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt B15 B14 B13 B12 B11 B10 89 88 87 B6 B5 B4 B2 81 15 14 B13 B12 B11 810 B9 B8 B7 B6 B5 B4 83 B2 81 BO 01 1 0 0110 11 1 0 1 0 1 o 011111 v The content of the C200 shows 12345678H 305419896 in decimal notation The device code of C200 is CN200 MITSUBISHI 745 FX communication 7 7 Commands and Device Ranges Computer link 7 7 7 1 Commands Maximum No of units Commana per communication Description FX FX2c ASCII FXon Symbol 2 FXin FX2N code FXis FXonc Bit Reads a group of bit devices X Y M i unit
15. T2 Programmable controller program END Step 0 END s Step 0 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 Computer link 7 7 5 3 Communication Time This is to explain the method of calculating the approximate time until all communication is over For the locations of TO to 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 Mn 4 T5 5 1 baud rate x number of bits in 1 1 7 8 number of characters Start bit 7 AN Stop bit 1 or 2 Data length 7 or 8 Parity bit or 1 T1 2max 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 T2 END process time of programmable controller during data communication T4 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 2 When writing data from the computer to the programmable controller Communication time TO T1 T2 or TW whichever is dm
16. n n 3 13 3 4 6 FX2NC 485ADP and FX2Nc 485ADP a aa 3 14 3 4 7 FX2 40AW and FX2 40AW 3 15 3 4 8 FX2 40AP and FX2 40AP L Res eo 3 15 4 1 4 1 Related Flags and Data Registers a 4 1 4 121 Auxiliary Relays u C id u e Fete eret t UE E DR RR Ee Panes 4 1 4 1 2 D ta Registers etti tcn tert ence e en cd P Lo e RE eee Leges 4 2 MITSUBISHI ix FX communication 2 0 Sum setae EP ves Led eee pects 4 3 4 2 1 Setting the Station No D8176 nennen nnne nennen nnns 4 3 4 2 2 Setting the Total Number of Slave Stations 08177 4 3 4 2 3 Setting the Refresh Range 08178 nennen enne nnne 4 4 4 2 4 Setting Retry Count 08179 4 5 4 2 5 Setting Comms Time out D8180 L 4 5 4 2 6 Program Used for Setting _ nennen neret nennen nnne nnne 4 6 4 3 Example a con 4 7 4 3 1 System Configuration 4 7 4 3 2 Operati i p 4 7 4 3 3 Example of Setting Program n 4 8 4 3 4 Example of Error Program nnne A nen
17. 8 This system configuration can achieve full duplex or half duplex communication 4 This system configuration can only achieve half duplex communication 1 4 Supported Functions and Applicable Versions Items FX2N FX2NC FX1N FX1S FX FX2c N N network V2 00 or more No support Parallel link All versions All versions All versions Computer link All versions V1 20 or more V3 30 or more No protocol Use RS instruction All versions V3 00 or more communication Use FX2N 2321F Not supported MITSUBISHI 1 6 FX communication Specifications 2 2 Specifications 2 1 Communication Specification Computer link ENT N N network Parallel link dedicated No protocol communication protocol Transmission standard Conforming to Conforming to RS 485 Conforming to RS 485 and RS 422 or RS 485 and RS 422 RS 232C SES RS 485 RS 422 500 1640 5 Transmission distance Max 500m RS 232C Max 15m 49 2 1 N RS 232C 1 1 Number of stations Max 8 stations 1 1 N is Max 16 E 4 stations RS 485 1 FX FX2c FXoN FX1N FX1S ER dr half duplex communication Communication method Half duplex communication FXaN FXaNC 2 full duplex communication Data length 7 bit 8 bit Parity Fixed None Odd Even Stop bit 1 bit 2bit Baud rate bps 38 400 19 200 300 600 1 2
18. Slave station No 67 Example 1 is slave station No 1 2 is slave station No 2 4 2 2 Setting the Total Number of Slave Stations 08177 Set a value 1 to 7 to the special data register D8177 Default 7 This setting is not required for the slave station Setvalue Description 1 1 slave station 2 2 slave stations 7 7 slave stations 4 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 2 Pattern 1 FXin FX2N FX2Nc Pattern 2 FX1N 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 O all FXon and 1 series units in the system experience a communications error In this case please note that link time becomes as long as the FXon and 1 communication error is occurring 1 In the case of pattern O FXoN FX1s FX1N FX2N FX2Nc Device No Station No Bit d
19. carrying high loads Output terminals YOOO to 003 located near optical connectors must have light loads connector Wiring 3 Note 1 Connect the terminal SG to the terminal SG of the basic unit Two SG terminals are connected to each other internally indicates an optical connector Keep optical connectors away from cabling 3 15 FX communication Wiring 3 MEMO 4 MITSUBISHI 3 16 FX communication 4 N N Network For diagnostics please refer to chapter 12 4 1 Related Flags and Data Registers 4 1 1 Auxiliary Relays N N network 4 Auxiliary relays esponse Attribute FXon FX2n Name Description type FXis FX2nc N N network Used to set N N network MBUSS parameter setting parameters ME Communication error of ON when communication error Mates master station occurs in the master station L R M505to M8184to Communication error of ON when communication error M L M511 2 M8190 2 slave station occurs in the slave station ES ON when communicating to R M503 M8191 Data communication another station M L R Read only W Write only Master station Note L Slave station 1 The number of communication errors that have occurred in each station cannot be counted in the CPU error status the program error status or the stop status 2 Number in accordance with the slave station No Exa
20. 2 485 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 FX2Nc 232ADP Installation Manual JY997D01101 This manual contains written hardware explanation of installation and specification regarding the 2 232 FX2n 232 BD Users Guide JY992D66001 This manual contains written hardware explanation of installation and specification regarding the FX2n 232 BD a MITSUBISHI vii FX communication Table 1 Further Information Manual List Manual name Manual No Description This manual contains written hardware explanation of dic pe Hardware JY992D73401 installation and specification regarding the 485 This manual contains written hardware explanation of FX2n 422 BD User s Guide JY992D66101 installation and specification regarding the FX2n 422 BD This manual contains written hardware explanation of ere Hardware JY992D84501 installation and specification regarding the 9099 FX1N 232 BD This manual contains written hardware explanation of JY992D84301 installation and specification regarding the FX1N 485 Manual BD This manu
21. FX 2N FX 2N J i J J J I 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 1 The input points X000 to X003 M1000 to M1003 in the master station are output to the output points Y010 to Y013 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 Y014 to Y017 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 Y020 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 C1 is reflected on the output point Y005 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 Y006 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 s
22. TO 1 baud rate x number of bits in 1 Mu 1 7 8 x number of characters Start bit Z V Stop bit 1 or 2 Data length 7 or 8 Parity bit 0 or 1 T1 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 T2 END process time of programmable controller during data communication TW set time when message wait is set MITSUBISHI 7 13 FX communication Computer link 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 increasing order from the specified head device are represented sequentially from the left as 1 31H when ON and as 0 when OFF Example When transmitting the on off status of five points from M10 i No of Head device device Data M 1 points 0 0 0 0 5 1010 1 4DH 30H 30H 31H 30H 30H 35H 31H 30H 31H 30H 31H Indicating M14 is ON Indicating M13 is OFF Indicating M12 is ON Indicating M11 is OFF Indicating M10 is ON Word units u
23. 2 s MITSUBISHI FX communication Parallel link 5 5 3 Example Program 5 3 1 The ON OFF status of the inputs X000 to X007 in the master station is output to YOOO to 007 the slave station When the calculation result 00 02 in the master station is 100 or less Y010 in the slave station is turned on The ON OFF status of MO to M7 in the slave station is output to YOOO to YOO7 in the master station The value of D10 in the slave station is set to the timer TO in the master station Master station Slave station Hd ie 18070 Mew 71 FNG 127 K2M800 K2M80 K2Y000 H M8000 ENG 26 8900 FNC IO pago MIO Ho ABD DO D2 D490 M8000 92 E 0102 MOV K2M900 K2Y000 M8000 X010 X0I0 K2MO K2M900 D500 NG Ie D10 D500 END END 5 3 2 High Speed Mode When the calculation result DO 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 Slave station M
24. 8 8 Reading The Programmable Controller Type PC command 8 8 1 Codes Programmable controller type wget Programmable controller type hex hex FXis F2H A2USCPU 82H FXoN 8EH A2CPU A1 A2USCPU S1 83H FX FX2c 8DH A3CPU A3NCPU A3H FX1N 9EH A3ACPU 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 s MITSUBISHI 8 12 FX communication Commands 8 8 8 2 Control Specification and Example 1 Control specification Protocol format 1 is shown Programmable controller type name read command y T T 55 i5 gt 50 2 2 s Oo E o gt 5 3C Character area 8 5 9 9 lt Programmable m 58 E PC type m ge controller 6 gt 9 gt X 2characters gt lt 2 1 gt Notes 1 The station number PC PLC number number of devices and sum check code 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 C N The sum check is E calculated over this A N 0 F F FPPLCO C 5 range Clo F K Comput
25. 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 22 is received in the RS 232C interlink connection mode BFM 0 b9 1 b8 1 the 232IF sets the request to send RS signal to OFF requests the counterpart equipment to suspend the send 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 number of receive buffers BFM 14 should be read to data registers in the programmable controller 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 status BFM 28 bO is set MITSUBISHI 10 13 10 FX communication FX2N 232lIF 10 10 2 18
26. Receive data Data 2 Data 3 RD RXD 8 OFF ON mc Receive completion BFM 28 b1 1 9 Receive OFF ON V completion reset lt The receive wait BFM 1 b2 stafus is started 4 4 3 1 Turn off using program When it is turned ON the next data cannot be sent 2 Time set by BFM 20 x10ms 8 Turn it off using a program When it is turned ON the next data cannot be sent 4 After receive is completed and the data is read turn off the receive completion flag BFM 28 b1 using a receive completion reset command BFM 1 b2 4 MITSUBISHI 10 16 FX communication FX2N 232lIF 10 10 3 2 Standard RS 232C Mode Setting BFM 0 b9 b8 0 1 Send receive _OFFN ON enable BFM 1 60 OFF DR DSR ON 4 BFM 21 X10ms 2 Send OFF ON 21 2 Ny BEM 1 b1 X10ms 5 lt gt RS RTS OFF ON cs crs OFF ON 3 Send data OFF E SD TXD Data 2 BFM 20 BFM 20 Send OFF X10ms 3 X 10ms 3 completion AS lt gt 8 M 28 0 BFM 21 BFM 21 Receive data X10ms 2 RD RXD Receive completion BFM 28 b1 Receive OFF completion reset command lt The receive wait 4 BFM 1 b2 stafus is started OFF 1 Turn off using a program Wh
27. 0 is regarded as 512 or 256 The initial value is 0 BFM 2 specifies the maximum byte count received by the 232 F 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 BFM 83 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 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 Setting range 4 bytes maximum zero suppression The initial value is 0 No used For the send data of the 2321F 4 headers maximum can be specified When the number of headers is less than 4 the upper O s are ignored zero suppression and not transferred BFM 5 BFM 4 lt upper 2 bytes lower 2 bytes b15 0 1615 b0 0 0 0 0 0 0 0 2 4th Il 3rd 2nd 19 Example 02H STX
28. 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 Cl These bits indicate the ON OFF status of the control signals Error Code lt BFM 29 gt For error code refer to chapter 12 Model Code lt 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 reading this code Send Byte Count lt 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 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 b15 Upper bits Lower bits b0 0011 1 01011 1001110010 0 011 3 2 4 1 32 H 2 41 H A 1byte 1byte gt lt k 1word A numeric in the send receive buffer is treated as hexadecimal HEX MITSUBISHI T FX communication FX2N 232IF 10 10 2 22 Receive Byte Count lt BFM 2000 gt
29. 30H 32H 1 32H 33H 34H 41H 43H 37H 46LI 39H Programmable v 8 A controller 2 3 C05 FF The sum check is calculated over this range 46H 46H 1234H hexadecimal to DO indicates to write 4660 in decimal ACD7H hexadecimal to D1 indicates to write 21289 in decimal 4 MITSUBISHI 8 7 FX communication Commands 8 8 5 Test of Bit Device BT command 1 Command specification Protocol format 1 is shown Test command selective us abi Character area C T T T T T T T T E T m zoj Device Device 8 2 O is I 2 O g 3 gt S z 7 characters 5 characters 5 characters 2 gt Computer o hexadecimal g 8 l I 1 Programmable m mas 1 character gt 2 C 0 30H indicates reset OFF CI 2 1 31H indicates set ON x Notes Specify the range and number of devices so as to satisfy the following condition 1 lt number of devices lt 20 10 for FXoN The station number PC PLC 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 The sum check is calculated over this range se E NJO5 BT 003 M00501 01000 00011 EC Computer OS
30. 4 MITSUBISHI 7 2 FX communication Computer link 7 7 2 7 2 1 7 2 2 Information Needed Before Programming Programmable Controller Operation The operation and the scan time of programmable controller using computer link is 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 processing 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 Computer Notes 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 a framing error at the computer side When a commercial RS 485 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
31. CPU FX2 Series Generic name of FX2 Series main units FX2N Series Generic name of FX2N Series main units FX2C Series Generic name of FX2C Series main units FX2NC Series Generic name of FX2NC Series main units EXCPU Generic name of FXo FXoS FX1S FXoN FX1N FX1 FX FX2 FX2N FX2C FX2NC Series main units FX WIN Abbreviation of programming software FX PCS WIN E for FX Series PLC Windows95 Abbreviation of Microsoft Windows95 Windows98 Abbreviation of Microsoft Windows98 Windows NT4 0 Abbreviation of Microsoft Windows NT Workstation 4 0 Others Windows 2000 Abbreviation of Microsoft Windows 2000 Professional Windows Generic name of Windows95 Windows98 Windows NT4 0 and Windows2000 Personal computer PC Personal computer compatible with Windows to which GX Developer or FX PCS WIN E is installed This manual describes the following product in the new name Conventional name New name Remarks GPPW GX Developer Abbreviation of software package SWLID5C GPPW E MITSUBISHI 1 1 FX communication Introduction 1 1 2 Communication Types The FX Series supports the following 5 types of communication 1 N N network Data transfer with FX2N FX2nc FX1n FX1s FXon programmable controllers can be performed on a N N basis They can link data of a small scale system if using this network For the system configuration please refer to subsection 1 2 1 spe
32. For the receive data of the 232IF 4 terminators maximum can be specified When the number of terminators is less than 4 the upper 075 are ignored zero suppression As the first terminator specify an ASCII code from 01g to 1Fy As the second to fourth terminators 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 O 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 232IF sets the request to send RS signal to OFF and requests the counterpart equipment to suspend the send operation BFM 12 specifies 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 542 Spare receive buffers 513 p BFM 2257 to 2271 512 7 dr 0 MN
33. SG So RA a eee FG 1 Note 1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 1000 or less Class D grounding If the programmable controller is not equipped with a ground terminal connect the terminal FG directly to a ground with the resistance of 100Q or less Class D grounding 2 Two pair Wiring FX2N 485 BD FX1N 485 BD FXoN 485ADP Terminating SDA z SDA Terminating resistor resistor 3300 SDB SDB 3300 Terminating PDA RDA resistor RDB d RDB 3302 l LINK li SG EEUU ee aor FG 1 Note 1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 100Q or less Class D grounding If the programmable controller is not equipped with a ground terminal connect the terminal FG directly to a ground with the resistance of 1000 or less Class D grounding MITSUBISHI 3 9 FX communication Wiring 3 3 4 2 FXon 485ADP and FXon 485ADP 1 One pair Wiring FXoN 485ADP FXoN 485ADP SDA SDA SDB SDB Terminating PDA PDA Terminating resistor resistor 1100 F RDB 1100 LINK LINK SG I ky SG APT MM P FG FG 1 Note 1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resis
34. To reset M8123 use a Sequence as described on the previous page When the RS instruction drive input X010 is turned on the programmable controller is set to the receive wait status e When an RS instruction is executed while D1 is 0 M8123 execution completion flag is not actuated and the programmable controller is not set to the receive wait status If the programmable controller is set from this status to the receive wait status set D1 to a value equivalent to or greater 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 4 MITSUBISHI 9 4 FX communication RS instruction 9 4 Time out evaluation lt M8129 gt Valid the FX2n 2 programmable controller earlier than V2 00 If receive is not restarted within the time specified by D8129 after the receive data is interrupted on the midway it is regarded as time out M8129 is turned on and receive is completed 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 equipment in which the number of send data may be chan
35. gt 9 byte send data 123456789 is prepared in ASCII code in accordance with the send byte count specified above BFM 1001 BFM 1002 BFM 1003 BFM 1004 10th byte is not sent BFM 1005 Upper byte b8 gt M18 RS RTS b9 M19 ER DTR b10 M20 Undefined b11 M21 Undefined b12 5M22 DR DSR b13 5M23 CD DCD b14 5M24 CS CTS b15 M925 CI RI Lower byte 2nd byte 1st byte 2 32 1 31 H 4th byte 3rd byte 4 34 3 33 6th byte 5th byte 6 36 H 5 35 8th byte 7th byte 8 38 H 7 37 10th byte 9th byte BEC 9 39 H h Receive buffers BFMs 2001 gt 8 byte receive data specified in accordance with the receive upper limit byte count BFM 12 is read to the data registers D301 to D304 in the programmable controller MITSUBISHI 10 20 FX communication 3 Example program FX2N 232IF 10 M8002 FNC 79 Transfer of communication format mua 1 To lt KO POOPF LI 009FH BFM 0 pulse Block No BFM No Transfer Number of source transfer points FNC 79 Transfer of receive upper limit byte count 2 K8 K1 K85BFM 2 FNC 79 H02 Sen
36. 2 5 Setting Comms Time out 08180 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 Comms time out is the communication dwell time between the master station and slave station MITSUBISHI 4 5 FX communication N N network 4 4 2 6 Program Used for Setting Station No setting 0 8038 FNC 12 08176 Required for master MOV station Set range 0 to 7 Total number of slave FNC 12 2 pg177 stations 2 MOV Setting range 1 to 7 Refresh range setting i K 1 D8178 Pattern 1 Set range 1 to 2 Not required for FNC 12 Ret slave station etry count setting MOV K 3 D8179 3 3times FNC 12 Comms time out setting MOV K 6 D8180 6 60ms y Make sure to write the program above 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 finished when any instruction or device other than the program above is processed MITSUBISHI 4 6 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
37. ASCII characters i e FF When using the on demand function the PLC number is automatically converted to by the programmable controller For the PLC number of programmable controller CPU on the MELSECNET II MELSECNET 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 4 MITSUBISHI 7 9 FX communication 5 Message wait Computer link 7 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 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 needs to be set at maximum scan time or more Example Setting the message wait time z Message wait 100 ms Computer Programmable controller N Wait time must be longer than two
38. CS255 In FX series the timer coil TC and counter coil CC are not supported 2 Word devices TU Usable Device specification characters 2 Decimal command Device Sem 57 octal wn 1N FX2N expression 15 FX FX2c FXonc pA WW WT Timer current value TNOOO TNO63 TNOOO TN255 CNO00 CNO31 Counter current value C CN235 CN254 CNO00 CN255 Data registers D 00000 00255 00000 00999 D0000 D7999 Decimal x O File registers 0 D1000 D2499 D1000 D2999 RAM file registers D D6000 D7999 Special data registers D D8000 D8255 D8000 D8255 Only CNOO0 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 4 MITSUBISHI 747 FX communication 7 8 Computer link 7 Example Computer Program for Loopback Test This is an example of a BASIC program for comm
39. 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 dedicated protocol only send the command after a gap of approximately two PLC scans from the time the data communications required by the previous command was elapsed Caution When using RS 485 wiring one pair see section 2 3 3 remember to take account of or ignore the echo of the commands sent from the computer 4 MITSUBISHI 7 3 FX communication Computer link 7 7 3 How to Read a Control Protocol Diagram 1 When the computer reads data from the programmable controller computer lt programmable controller A C E I Computer N Data Data 9 K Programmable Data controller a Areas indicate transmission from the computer to the programmable controller b Area B denotes transmission from the programmable controller to the computer c 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 t
40. 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 ERRORCODES MID BUF 6 2 PRINT Error code ERRORCODES H is received GOTO FIN ERRORFINS PRINT Received data is abnormal J th character FIN CLOSE 1 END RECWAIT 7 Wait for receive I 1 TO TO RCV IF LOC 1 gt RVCNT THEN GOTO BUFIN NEXT IF RCV THEN ERFLG 99 RETURN 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 computer d The computer compares the data received from the programmable controller and the original sent data and displays a result message 4 List of result messages 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 Err
41. Receive upper limit RU EX byte count BFM 2 et to the time in whic BFM 2000 I the send operation of the Data receive is counterpart equipment is Request to send RS suspended pel suspended Receive suspended M BFM 28 b4 4 Suspension waiting time BFM 12 0 to 32 767 x10ms MITSUBISHI 10 10 FX communication FX2N 232lIF 10 10 2 11 10 2 12 10 2 13 10 2 14 Number of Remaining Send Data lt BFM 13 gt Saved value 1 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 transmission Number of Receive Buffers lt BFM 14 gt Saved value 0 to 256115 for spare receive buffers The number of buffers which have actually received data is saved in turn with regard to the receive buffers BFM 2001 to 2256 and the spare receive buffers BFM 2257 to 2271 for interlink connection mode Send Sum Result lt 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 S E T T X 112 5 X 5 2 02 H 30H 41H 31 H 32H 35 H 46H 03H 35H 32H lt Target range 30 H 41 H 31 H 32 H 35 H 46 H 03 H 152 H The total
42. Unhelpful If there one thing you would like to see improved what is it Could you find the information you required easily using the index and or the contents if possible please identify your experience Thank you for taking the time to fill out this questionnaire We hope you found both the product and this manual easy to use a MITSUBISHI i FX communication a MITSUBISHI FX communication Guidelines for the Safety of the User and Protection of the programmable controllers 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 person 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 automated equipment b Any commissioning or service engineer must be of a competent nature trained and qualified to the local and national standards required to fulfill that job These engineers should also be trained in the use and maintenance of the complet
43. and Address and number of points number of points Pulse of Send of send data of receive data request Writes contents of send Writes the contents of DO number of data points of send data and 0200 This request is automatically reset SET M8122 when send is completed Never reset this request by a program Set send request Receive completion M8123 Moves receive data data to te The receive completion flag M8123 RST M8128 JJJ J should not be reset in a program of continuous operation Reset receive completion flag Note Though an RS instruction can be used in a program as many times as you want make sure that only one RS instruction is driven at any one time Two or more RS instructions 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 FXa2c assure the OFF time is equivalent to or longer than two scan times between completion of send and the start of receive or between completion of receive and the start of send In the FX2n and FX2nc whose version 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 Thi
44. by 02 16 points bits per one word unit 4 MITSUBISHI 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 A MI05 0 123 02 64 Thesumcheckis calculated over C 05 FF Q this range K Computer 5 35H 46H 46H 57H 52H 31H 32H 33H 32H V hon E The sam check 05 FF 7BC9 234 T B3 over this range X X 02H 35H 46H 37H 42H 39H 81H 32H 33H 34H 33H MV d 27 Present value of T123 7BC9H hexadecimal indicates 31689 in decimal Present value of T124 1234H hexadecimal indicates 4660 in decimal 4 MITSUBISHI m FX communication Commands 8 8 3 Batch Write of Bit Device BW command 1 Command specification Protocol format 1 is shown Batch write e bits Character area A zo b zz Head device Number of Data of 2 5 g o devices th 23 z 29 5 38 5characters 2 characters specified T Computer hexadecimal devices T ON Programmable controller Specifies the range of devices to be written 0 30H indicates OFF 1 31H indicates ON Notes Specify the range and number of devices so as to satisfy the following conditions 1 lt number of devices lt 160
45. depending on the RS 232C connection specifications Check the specifications of the RS 232C equipment used then connect the signals correctly Representative wiring examples are shown below 1 Terminal specification device No control line Setting communication format BFM 0 b9 0 b8 0 Programmable Controller Side gt Ded STE Signal e accordance with the condition determined by the software oax s 2 the FXen 2321F and the NEN 3 2 seo 2 3 counterpart equipment 2 Terminal specification device Use control line a Standard RS 232C mode Use cross cable Setting communication format BFM 0 b9 0 b8 1 As the carrier to send CS Programmable Controller Side RS 232C Device Side signal pin of the FX2N 232IF Signal 9 pin 25 pin secu itself receives the request to send RS signal signal transfer S CT is performed as if the 7 counterpart equipment is cts functioning CD DCD Note 1 When the CD signal is not monitored the CD signal pin is not required to be connected With regard to the CD signal the 2 2321 only indicates the status 2 The FXeN 232lF only indicates the status MITSUBISHI T FX communication Wiring 3 b Interlink connection mode Use interlink serial cross cable Setting connection format BFM 0 b9 1 b8 1 In the interlink connection Programmatie Controller Side RS 232C Device Sid
46. equipment may not be able to receive data or the send receive data may be damaged In full duplex communication the send wait flag M8121 is not turned on In 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 instruction driving N SD TXD Send request OFF 8122 Receive data Receive OFF ON 7 9 7 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 FX N series whose version is earlier than V 2 00 Refer to paragraph 9 2 1 4 MITSUBISHI 9 10 FX communication RS instruction 9 3 Use normal mode 1 of control line RS instruction driving OFF ON Send data Send request OFF ON M8122 ER DTR OFF ON N Receive data RD RXD Receive completion M8123 DR DSR OFF ON N n N Reset using a program When it is not trurned off the next data cannot be received 4 MITSUBISHI 9 11 FX communication 4 Use interlink mode o
47. is forced to wait until completion of transmission of response data STX to the command data ENQ from the computer Transmission of response data ACK from the computer to the transmission of response data STX from the programmable controller should be done after completion of reception of on demand data MITSUBISHI 8 17 FX communication Commands 8 8 10 3 Specification and Example of On demand 1 Command specification Protocol format 1 is shown Added by programmable controller Computer _ gt Programmable DENES controller 9 amp B Transmission _ 92 C gt data gt C 1 i gt Special auxiliary SOFF relay M8127 On demand data is set the head address is Programmable Write processing X lt written to 08127 and the data length is written to D8128 Notes Specify the data length so as to satisfy the following condition Data length lt 40H 64 points 13 points for FXon The PLC number FE is added by the programmable controller e The station number PLC number number of devices and sum check code are expressed in hexadecimal Important 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 e programmable controller are connected in 1 n configuration normal communication data in control protocol form
48. 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 4 MITSUBISHI 741 FX communication Computer link 7 7 5 Communication Timing Chart 7 5 1 Reading Data from Programmable controller 2 III gt III C o Computer 7 7 Wait TW IT 14 15 25 Interface N 4m a More than two scan E delay is needed lt IS N gl 8 This time becomes 0 when the message wait time is not set or i i when the wait time is less than the processing time needed by Programmable the programmable controller controller TO T1 72 4 Programmable controller program END Step O END Siep O lia Step 0 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 z Computer F 7 LL IT Interface I 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 I the programmable controller controller TO
49. program When setting the contents shown on the left perform programming as follows FNOV HOC8E D8120 a 1 D8120 000 1100 1000 1140 Stopbit 2bits 0 C 8 E Baud rate 9600 bps Protocol No protocol Header No used Terminator No used Control line Normal mode 1 4 MITSUBISHI 6 3 FX communication Communication format 6 MEMO 4 MITSUBISHI 64 FX communication 7 Computer link 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 FXon 232ADP and FX 232ADP refer to 232ADP FX2N 485 BD FX1N 485 BD FXoN 485ADP and FX 485ADP refer to 485ADP FX 485PC IF refer to 485PC IF When interface of programmable controller using RS 232C 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 programmable controller 1 The computer reads data from programmable controller 2 Computer information Read RS 232C 2 Command data etc Reque
50. request Check wiring power of programmable 31H comms L L 2 from master station before controller RUN STOP state RUN is parameter error communication parameter 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 f both of them are lighted and extinguished nothing is wrong f 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 elf 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 FX2n 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 D8211 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 Check the status of the RD RXD LED and the SD TXD LED provided on each communication unit If the RD RXD and the SD TXD LED are lighted and extinguished nothing is wrong e f the RD RXD LED is lighted extinguished but the S
51. 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 PLC and personal computer are turned ON When is RUN status PLC can receive data from personal computer iS Receiving data When operating program of personal computer data is sentto IC from personal DO in PLC This data value is A 40 in program At this time e computer data DO D1 moves to D10 D11 in the PLC After moving data PLC sends data D10 D11 to the personal computer When receiving data from the PLC the personal computer displays the data Sending data to personal computer MITSUBISHI 9 15 FX communication RS instruction 9 4 Example program of programmable controller M8002 Sending data and receiving data reset FNC 12 Setting communication format H 048F D8120 b15 bO 1 0000 0100 1000 1111 0 4 8 F RS instruction drive BMOV moves to sending data area D10 D11 PLF M20 RST M8123 Receive completion reset SET Send request 5 Example program of computer This is an example of a BASIC program for communication of RS instruction communicatio
52. the Remarks asterisked 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 7 7 FX communication Computer link 7 7 4 8 Control Protocol Parts Explained This is to explain the content of data set in each control procedure 1 Control codes The control codes are listed below Signal H mal Description Signal H Description STX 02H Start of Text LF OAH Line Feed ETX 03H 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 controller Format 1 Format 4 E IL 0 0 TIR IF or or Computer L Computer LL Programmable Programmable controller controller 4 MITSUBISHI 7 8 FX communication Computer link 7 2 Station number The station number is the number prov
53. time when the data saved in the receive buffers is read to data registers in the programmable controller using the sequence program the remaining data can be received Make sure to perform the RS 232C interlink connection when specifying this mode 4 b11 and b10 addition of CR and LF Set these bits as follows Not added b11 0 b10 0 e CR only is added b11 0 b10 1 CRand LF are added 611 1 b10 1 For the CR LF addition format refer to the communication format list shown above 5 b13 and b12 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 e The ASCII HEX conversion only is available b13 0 b12 1 The check sum only is available b13 1 b12 0 Both the check sum and ASCII HEX conversion are available b13 1 b12 1 For the check sum addition format refer to the communication format list shown above MITSUBISHI 10 6 FX communication FX2N 232lIF 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 BFM
54. 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 MITSUBISHI 10 11 10 FX communication FX2N 232lIF 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 initial value is O ms The time after the clear to send CS signal is turned on until the 232IF 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 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 bO is turned on can be specified Set BFM 21 when it is required by a modem etc 4 MITSU
55. 0 RECO Reception of first character 150 RVCNT 1 160 GOSUB RECWAIT 170 IF ERFLG 99 THEN GOTO ERRORFIN1 180 BUF RCV MITSUBISHI Data transmission Transmission data OOIFFTT2 04ABCD34 uU OUZ O S 66C gt 20383 8 3 566255 5 Z 37o 9 5 2 Q 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 420 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 l 1 TO LEN BUF PRT1 MID BUF 1 PRT1 HEX ASC PRT1 IF PRT2 2 THEN PRINT 02 STX GOTO 370 IF PRT2 3 THEN 03 ETX GOTO 370 IF PRT2 15 THEN PRINT 15 GOTO 370 PRINT PRT2 CHR amp H22 PRT1 CHR amp H22 NEXT IF HED NAK THEN GOTO ERROROFIN2 DATACHECK Check of received data STX OOFFO4ABCD ETX 5D 7
56. 00 2 400 4 800 9 600 19 200 Header character Fixed Terminator character None effective Control line Format 1 Protocol Format 4 None pens Sum check Fixed effective Supported programmable FX2N FX2NC Controller CXI8 FX2N FX2NC FX1N 1 FXoN FX FX2c 1 FX2N FX2Nc FXin FX1s and FXon PLCs are supported 2 When using an FXon 485ADP or FX2Nc 485ADP this system is only half duplex MITSUBISHI 2 1 FX communication Specification 2 2 2 Communication Time 2 2 1 N N network Communication device Pattern 0 Pattern 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 a N N network is used the scan time of each station programmable controller becomes about 10 percent longer regardless of the number of link stations or the communication device pattern used 2 2 2 Parallel link 70ms for reciprocation Operation cycle of master station Normal Mode Operation cycle of slave station ms 20ms for reciprocation Operation cycle of master station Highspeed mode Operation cycle of slave station ms MITSUBISHI 2 2 FX communication Specifications 2 2 2 3 Comp
57. 035 M8036 M8037 are all reset to OFF and the programmable controller remains in STOP 4 MITSUBISHI 8 10 FX communication Commands 8 873 Control Specification and Examples 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 Qn m zo 9 88 58 85 z O or g z Computer ae 8 1 1 1 1 T Programmable gt z x controller o x DE 1 Notes The station number PC PLC 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 LN gt E N05 FF IRRIO C5 Q Computer 35H 46H 52H 35H Programmable A controller 05 K 35H 46H 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 00 FF IRS 0 C 1 Q Computer 52H 53H 31H Programmable A controller CI00 FF K 4 MITSUBISHI FX communication Commands 8
58. 1 847 478 2283 MIDDLE EAST REPRESENTATIVE llan amp Gavish Ltd Automation Service 24 Shenkar St Kiryat Arie IL 49001 Petah Tiqva Phone 972 0 3 922 18 24 Fax 972 0 3 924 07 61 e mail iandg internet zahav net ISRAEL TEXEL Electronics Ltd ISRAEL Box 6272 IL 42160 Netanya Phone 972 0 9 863 08 91 Fax 4972 0 9 885 24 30 e mail texel meGnetvision net il GEVA AUSTRIA UAB UTU POWEL LITHUANIA Avtomatika Sever Ltd RUSSIA Wiener Stra e 89 Savanoriu pr 187 Lva Tolstogo St 7 Off 311 AT 2500 Baden LT 2053 Vilnius RU 197376 St Petersburg Phone 43 0 2252 85 55 20 Phone 370 0 52323 101 Phone 7 812 11 83 238 Fax 43 0 2252 488 60 Fax 370 0 52322 980 Fax 7 812 11 83 239 e mail office geva at e mail powel utu lt e mail as avtsev spb ru TEHNIKON BELARUS INTEHSIS SRL MOLDOVA CCM5V5 RUSSIA Oktjabrskaya 16 5 Ap 704 Cuza Voda 36 1 81 Promyshlennaya St 42 BY 220030 Minsk MD 2061 Chisinau RU 198099 St Petersburg Phone 375 0 17 22 75 704 Phone 373 0 2 562 263 Phone 7 812 325 36 53 Fax 375 0 17 22 76 669 Fax 373 0 2 562 263 Fax 7 812 147 20 55 tehnikon belsonet net intehsisemdl net consys consys spb ru Getronics b v BELGIUM Getronics b v NETHERLANDS Electrotechnical RUSSIA Control Systems Pontbeeklaan 43 B 1731 Asse Zellik Phone 32 0 2 467 17 51 Fax 32 0 2 467 17 45 e mail
59. 10 3 error at slave station slave station 1 R D211 D8211 Code of communication Code of communication error at master station error at master station 1 R D212 to D8212to Code of communication Code of communication M L D218 2 D8218 3 error at slave station error at slave station 1 D219 to D255 Not used For internal processing Read only W Write only 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 Number Same meaning but looks better 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 Number Same meaning but looks better 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 e Devices M503 M511 and 0201 0255 in the FXon and FX1s cannot be used in the program These devices are used by the N N network 4 MITSUBISHI FX communication N N network 4 4 2 Setting N N settings 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 D8176 Set a value 0 to 7 to the special data register D8176 Set value Description 0 Master station
60. 120 2 Whether or not to add terminating CR LF codes is determined by the protocol selected 4 MITSUBISHI 7 5 FX communication Computer link 7 7 4 1 Control Protocol Format 1 Description Control protocol z Transmission sequence gt SB Z gt 5 6 A or T T T T T T m o 898 sz 9 gt o 9 C 2 28 8 8 6 8 5 2 8 38 gt 8 93 o 2 To read data Computer o 5 9 5 os AN 5 6 from the PLC Programmable PESCE 9m to the controller 4125 o s B 822 x 8 xx 1 or Y T T T z 2 gt Z 181 551 gt 23 5 C T 9 iss lE z7 O 3 9 5 9 3 5 Z 5 o 8 Computer alog 6 2 To write data from the Programmable Transmission sequence gt 50 2 computer to controller r gt o 2 the PLC x 532 1 1 OF T T T U m 26 C 3 gt x 5 8 1 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 Remarks asterisked area 3 In the diagram the contents of character area A character area B and character area C
61. 2N 232 BD FX2N CNV BD FXoN 232ADP FX2N CNV BD FX2NC 232ADP FX2NC FXON FXoN 232ADP FX2Nc 232ADP FX1N FX1S FXiN 232 BD FX1N CNV BD FXoN 232ADP FX1N CNV BD FX2NC 232ADP FX2 FX2c FX 232ADP Computer Y Total extension distance is 15m 49 2 MITSUBISHI 1 5 FX communication Introduction 1 1 3 4 No Protocol Communication r RS 232C Personal computer 3 73 73 FX2N FX2N FX FX2N CNV BD FX2N 232 BD 2NC FXoN 232ADP FX2NC 232ADP FXoN 232ADP FX2NC 232ADP 4 FXoN 4 FX4N 4 FX1N 232 FX FX2c FXIN CNV BD yi 282 BD Max 1 E FX1N 232 BD Bar code reader FX 232ADP FXoN 232ADP FX2NC 232ADP lt FX2N LBS FX2NC FX2Nc CNV IF FX2N 232lF RS 485 RS 422 4 3 FX2N FX2N CNV BD Printer EX1N FX1N CNV BD FX2N FX2N 485 BD FX1s FX1N CNV BD XS FXoN FX2NC SS Max 500m FXoN 485ADP FX2Nc 485ADP lt 1640 5 2 y FX1N FX1N 485 BD 15 FX1N 485 BD 1 The RS 485 RS 232C signal convertor is necessary in the case of an RS 485 interface for a computer connection 2 When using an FX1N 485 BD a FX2N 485 BD in a system the total extension distance has a max of 50m 164 0 But RS 485 RS 232C signal convertor is necessary in the case of an RS 232C interface for a computer connection
62. 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 chapter 6 for the RS instruction and example program please refer to chapter 9 Or when using an FXan 232lF for setting and example program please refer to chapter 10 Optional programming port The port can support programming protocol if connected to an FX2n 232 BD FXon 232ADP FX2Nc 232ADP FX1N 232 BD FX2n 422 BD and FX1in 422 BD for the FX2N FX2Nc FX1N FX1s Series programmable controller For notes on use refer to chapter 11 diagnostics refer to chapter 12 MITSUBISHI 1 2 FX communication Introduction 1 1 3 System Configuration For programming protocol refer to chapter 11 1 3 1 N N Network RS 485 RS 485 RS 485 RS 485 RS 485 communication communication communication communication communication equipment equipment equipment equipment equipment Up to eight FX series programmable controllers can be connected The total extension distance is 500 1640 5 when only the FXoN 485ADP and FX2NC 485ADP are used in the configuration and 50m 164 0 when the FX1N 485 BD and FX2N 485 BD are used FX Series PLC Interface FXoN FX2NC FXoN 485ADP FX2NC 485ADP FX1N CNV BD FXoN 485ADP 1 FX1N FX1N CNV BD FX2NC 485A
63. 43H44H42H Programmable controller 30H 30H 46H 46H 42H 52H 33H 41H 42H MITSUBISHI 43H 44H 2BDH PLC No E Station N No 0 O F F 02H30H30H46H46H 30ms Message wait time FX communication Computer link 7 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 follows depending on the model and version of the programmable controller To set the time out check time as 60 ms M8002 ENC 12 2 08129 Other function information 2 Inthe case of FXoN series turn on M8120 when using the special 08129 PC series Setting range FXoN 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
64. 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 FX2Nc Group 2 FX1N Group 3 FXis Group 4 FXon Group 5 FX FXe2c 4 MITSUBISHI 5 2 FX communication 5 2 2 High Speed Mode Special auxiliary relay M8162 ON gt CD Master Automatic communication Dee DAA Doo Parallel link 5 FX2N 2 FXin FX FX2c FXis FXon Master 1 D490 D491 2 points D230 D231 2 points Communication Slave po Cam devices Slave 00 0501 2 point D240 D241 2 point L 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 FX
65. 5 7 7 20 6 6 4 7 7 1 20 6 20 20 8 8 8 SHELL SHELL Frame Frame r FX 232CAB 1 2 2 go 4 4 9pin 5 5 6 6 8 8 11 3 Cautions on Use 11 3 1 Cautions on Setting Never set communication to the FX1s FX1N FX2n and 2 series using a peripheral equipment or program If it is set in such a way communication with peripheral equipment is disabled 11 3 2 Cautions on use Connect a programming tool FX 10P FX 20P 7 etc to either a connector built in programmable controller or connector in optional unit 2 FX2N 422 BD FX2n 232 BD FX2nN CNV BD FXon 232ADP 2 FX2nc 232ADP FX2Nc FXon 232ADP FX2Nc 232ADP FXin FX1s FX1N 422 BD FX1N 232 BD FX1N CNV BD FXon 232ADP FX1N CNV BD FX2Nc 232ADP If the programming tool is connected to the both connectors the following phenomena may occur 1 program in the programmable controller may be different from a program in the programming tool If the program is modified or the set value of a timer counter etc is modified 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 the both ports correct sampling trace results cannot be obtained 4 MITSUBISHI 11 3 11 FX communication Optional programming port 11 Memo 4 MITSUBISHI jd FX communic
66. 56 gt nnne 10 15 10 2 24 Spare Receive Buffers for Interlink Connection Mode BFM 2257 to 112271 10 15 10 3 Hardware Hand Shake 10 16 10 3 1 No Hardware Hand Shake n 10 16 10 3 2 Standard RS 232C Mode eene nnne nennen nennen nnne nnns 10 17 10 3 3 Interlink Mode ceteri c ee e e eeu ee dade ze teu deve vee de eee ey 10 18 10 4 Example Programi LS gt 10 19 10 4 1 Example of 16 Bits Data Communication eect eeeceee tence 10 19 10 4 2 Example of 8 Bits Data Communication a 10 23 11 Optional Programming eret i pe eet 11 1 11 1 FX2N 422 BD FX1N 422 BD 11 1 11 2 FX2N 232 BD FX1N 232 BD FXON 232ADP and FX2NC 232ADP 11 2 11 2 13 Cautions 0n USS ue 11 3 11 3 1 Cautions on Setting a 11 3 11 3 2 Cautions ON Use oorr rout etra ee op lieve dase eed esp aT dede sive vealed Tei seruo Rol oo ede 11 3 12 DIadhnosti6s Ju dbi 12 1 COMMON NOMS Data A rnc ga ON nr 12 1 12 2 NERENGUNOER SEO ea ino coda in EQ a
67. 8000 8000 II M8070 8071 8162 8162 M8000 FNG 19 D490 K100 M10 FNG 0 DO D2 D490 MTO YO10 X010 X010 FNC 12 D1 D D500 M V 0 500 END END Note In the normal mode FNC 81 PRUN instruction can be used for However this instruction is only supported for FX1s FXin FX FX2c FX2n FX2nc programmable controller MITSUBISHI m FX communication Communication format 6 6 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 6 1 What ls 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 set 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 In the FX2N FXanc series this setting can be performed using parameters 6 2 Related Flags and Data Registers 6 2 1 Special Auxiliary Relays Special auxiliary relays Description M8121 Data transmission delayed RS instruction M8122 Data transmiss
68. 886 77 500 Fax 358 0 9 886 77 555 e mail info beijer fi UTECO A B E E 5 Mavrogenous Str GR 18542 Piraeus Phone 302 0 10 42 10 050 Fax 302 0 10 42 12 033 e mail sales uteco gr GREECE Meltrade Automatika Kft 55 Harmat St HU 1105 Budapest Phone 36 0 1 2605 602 Fax 36 0 1 2605 602 e mail office meltrade hu HUNGARY SIA POWEL Lienes iela 28 LV 1009 Riga Phone 371 784 22 80 Fax 371 784 2281 e mail utuGutu lv LATVIA Sirius Trading amp Services srl ROMANIA Str Biharia No 67 77 RO 013981 Bucuresti 1 Phone 40 0 21 201 1146 Fax 40 0 21 201 1148 e mail sirius siriustrading ro INEA d o o SLOVENIA Stegne 11 SI 1000 Ljubljana Phone 386 0 1 513 8100 Fax 386 0 1 513 8170 e mail inea inea si Beijer Electronics AB SWEDEN Box 426 S 20124 Malm Phone 46 0 40 35 86 00 Fax 46 0 40 35 86 02 email infoGbeijer se ECONOTEC AG Postfach 282 CH 8309 N rensdorf Phone 41 0 1 838 48 11 Fax 41 0 1 838 48 12 e mail info econotec ch SWITZERLAND GTS Dar laceze Cad No 43 Kat 2 TR 80270 Okmeydani Istanbul Phone 90 0 212 320 1640 Fax 90 0 212 320 1649 email gts turk net TURKEY CSC Automation Ltd UKRAINE 15 M Raskova St Fl 10 Office 1010 UA 02002 Kiev Phone 380 0 44 238 83 16 Fax 380 0 44 238 83 17 e mail csc aGcsc a kiev ua Electrotechni
69. BISHI 10 12 FX communication FX2N 232lIF 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 DR DSR b5 Undefined DCD b6 Being sent b14 05 CTS b7 Being received CI RI The 232IF status and the send receive result are saved as status information This information can be read from the programmable controller using the FROM instruction 1 bO send completion When send of data up to the send byte count BFM 1000 is completed the send completion 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 8 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
70. C number error the PLC number is not set to FF or not available from this station 11H to 17H 18H Remote error remote run stop 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 iS Error description 6301 Parity overrun framing error 6305 Command failure receiving a command other than GW global when the station number 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 recognize an error by using a watchdog timer or other monitor timer MITSUBISHI 12 4 FX communication Diagnostics 12 12 4 8 Diagnostics 1 Check the status of the RD RXD LED and the SD TXD LED provided on each communication unit f both of them are lighted and extinguished nothing is wrong e fthe RD RXD LED is lighted extinguished but the SD TXD LED is not lighted extinguished not lighted at all check the setting of the station No and the transmission rate baud rate e fthe RD RXD LED is not lighted extinguished check the wiring and confirm the connection with the programmable controller 2 Make sure t
71. D TXD LED is not lighted extinguished not lighted at all check the setting of the master station and the slave stations If 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 correctly If they are handled incorrectly correct the program so that they are handled correctly 4 MITSUBISHI 12 3 12 FX communication Diagnostics 12 12 4 Computer Link 12 4 4 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 ae een Error description 00H 01H 02H Sum error 03H Protocol error the communication protocol does not conform to the format selected with D8120 04H 05H 06H Character area error the character area is incorrectly defined or the specified command is not available 07H Character error the data to be written to a device consists of ASCII codes other than hexadecimal codes 08H 09H OAH PLC number error the PLC number is not set to FF or not available from this station OBH to OFH 10H PL
72. DB 3300 SG Class D grounding FX communication Wiring 3 3 4 4 FX2nc 485ADP and FXon 485ADP 1 One pair Wiring FXenc 485ADP FXon 485ADP SDA SDA SDB HH SDB Terminating RDA RDA Terminating resistor resistor 1102 RDB RDB 1102 L i LINK SG FG SG lt Note 1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 1000 or less Class D grounding If the programmable controller is not equipped with a ground terminal connect the terminal FG directly to a ground with the resistance of 1000 or less Class D grounding 2 Two pair Wiring FXenc 485ADP FXon 485ADP Terminating SDA SDA Terminating resistor resistor 3300 3 SDB SDB E 3302 Terminating RDA RDA Terminating resistor resistor 3300 RDB 3300 RDB LINK SG d FG SG DEREN 1 Note 1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 1000 or less Class D grounding If the programmable controller is not equipped with a ground terminal connect the terminal FG directly to a ground with the resistance of 100Q or less Class D grounding MITSUBISHI 3 12 FX communication Wiring 3 3 4 5 FX2n iN 485 BD and FX2nc 485ADP 1 One pair Wiring
73. DP FX1N 485 BD FX2N CNV BD FXoN 485ADP FX2N FX2N CNV BD FX2NC 485ADP FX2N 485 BD 1 3 2 Parallel Link D Q 1 FXen FXanc Shielded twisted pair cable Using interface Extension distance FX2N 485 BD Max 50m 164 0 FX2N FX2N CNV BD FXon 485ADP FX2N CNV BD FX2NC 485ADP E 1 gay 1 FXoN 485ADP Max 500m 1640 5 FX2NC 485ADP FX2NC Note 1 When including an FX2N 485 BD in the system configuration thais total extension distance has a max of 50m 164 0 MITSUBISHI 1 3 FX communication 2 FXin Shielded twisted pair cable Introduction 1 Using interface Extension distance FX1N 485 BD Max 50m 164 0 FX1N FX1N CNV BD FXoN 485ADP FX1N CNV BD FX2NC 485ADP Max 500m 1640 5 2 When including an FXin 485 BD in the system configuration thais total extension distance has a max of 50m 164 0 3 FX1s Shielded twisted pair cable Using interface Extension distance FX1N 485 BD Max 50m 164 0 FXis FX1N CNV BD 4 FXoN 485ADP _ FX1N CNV BD FX2NC 485ADP Max 500m 1640 5 3 When including an FX1N 485 BD in the system configuration thais total extension distance has a max of 50m 164 0 4 FXon Shielded twisted pair cable Using interface Extension distance FXoN 485ADP FXON F
74. Device specification ranges 7 17 7 8 Example Computer Program for Loopback 7 18 MITSUBISHI x FX communication BA GOMMANG 8 1 8 1 Batch Read of Bit Device BR command 8 2 8 2 Batch Read of Word Device WR 8 3 8 3 Batch Write of Bit Device BW 8 5 8 4 Batch Write of Word Device WW commandod 8 6 8 5 Test of Bit Device BT COmlimialid OR o YE Mae Fe 8 8 8 6 Test of Word Device WT command 8 9 8 7 Remote RUN STOP RR RS commands sss 8 10 8 7 1 Operation of Remote nennen nennen nennen tenent nennen nnns 8 10 8 7 2 Conditions for Valid Execution of Remote RUN STOP a 8 10 8 7 3 Control Specification and Examples of Remote 8 11 8 8 Reading The Programmable Controller Type PC command 8 12 9 8 T Type
75. E PME tana ates aec i 12 2 jx zudem 12 2 ABEL 12 2 12 3 Parallel 12 3 12 91 DIAQNOSUICS ie o aus ua n Sek eases ime titudine ue 12 3 12 4 COGO as ea 12 4 12 4 2 Programmable Controller Error Code a 12 4 1224 3 DIAQNOSUICS 12 5 12 5 RS IMSUUICUON 12 6 z L uu 12 6 S92 32 us ak Reese dide 12 7 12 GA Error COGO n he ad edunt wee asta asla a uspha 12 7 12 6 2 Diagnostics cr ret o e ERA MEET EU Hr 12 7 12 7 Using Optional Programming Port eiie eto eoe cae et este 12 8 12 7 1 FX1S FX1N and FX2N C earlier V2 00 a a 12 8 12 7 2 FX2N FX2NC whose version is V 2 00 or later a 12 8 Appendix A ASGCIlcode TS 1 MITSUBISHI xii FX communication 1 1 1 Manual Introduction Abbreviation List Introduction 1 Abbreviations Generic Names and Terms Used in This Abbreviation generic name term Description FX1S Series Generic name of FX1S Series main units FXON Series Generic name of FXON Series main units FX1N Series Generic name of FX1N Series main units FX Series Generic name of FX Series main units
76. ECTRIC INDUSTRIAL AUTOMATION Gothaer Strasse 8 D 40880 Ratingen Phone 4 49 2102 486 0 Hotline 49 1805 000 7650 Fax 49 2102 486 7170 megfa mail meg mee com www mitsubishi automation de www mitsubishi automation com PLC11 04 Printed in Germany
77. Example program M8000 Handled by 8 bit data HOO6F 08120 80 80 010 11 050 Ps M0 D10 D11 Setting communication format RS instruction driving 015 b0 0000 0000 0110 1111 D 0 0 6 F gt Writing send data D17 D18 D19 D20 M8122 Send request END MITSUBISHI 9 17 FX communication RS instruction 9 4 Operation Turn on the power of the In this example CR H000D and programmable controller and printer LL 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 Turn on X000 and drive RS LF Line Feed drive instruction X001 0N Note lt may be necessary to set Every time X001 is turned on the the DIP switches of your printer Data send contents of D200 to D210 are sent Check your printer manual for to the printer and test line is howto configure the serial printed communications 4 MITSUBISHI 9 18 FX communication FX2N 232lIF 10 10 FX2u 2321F 10 1 Introduction The RS 232C interface block FX2N 232IF hereinafter referred to as 232IF is connectable with to the FX2N FX2Nc programmable controller t
78. H BOH 35H 46H 46H 54H 33H 30H 35H 30H biH 53H 30H 31H 30H 30H 30H 30H 30H SH 43H Programmable A controller Set ON Reset OFF Set ON 35H 46LI 46H 4 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 T T T T T T T T T T T Number of Device Device Device Device m E lt 85 devices 85 2 ao I o 5 2 characters 5 characters 4 characters 5 characters 4 characters Computer hexadecimal 8 1 1 1 1 1 Programmable PA RENNES 2 E 600016 When specifying bit One word device requires four hexadecimal 2 devices specify the Head digits device Therefore one word is expressed using four characters Notes 1 Specify the range and number of devices 16 bit words so as to satisfy the following conditions 1 lt number of devices x 10 6 for FXon one unit is 16 points for bit devices The station number PC PLC number number of devices and sum check code are expressed in hexadecimal e 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 o
79. Head device No number of devices 1 max device No The station number PC PLC number number of devices and sum check code are expressed in hexadecimal ON 21 4 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 LN E NIOO FFBW 0 M0903 05 01101 26 Q Computer 5 57H 39H 33H 35H 31H 31H B2H Specifies to turn OFF M903 lt A Specifies to turn ON M904 K Specifies to turn ON M905 lt Specifies to turn OFF M906 Specifies to turm ON M907 4 MITSUBISHI 8 5 FX communication Commands 8 8 4 Batch Write of Word Device WW command 1 Command specification Protocol format 1 is shown Batch write words Character area C T T T T T T T T T Head device Number of 80 m 2 v Data of 85 s 8 5 characters 2 characters specified gt Computer o l 28 hexadecimal devices 8 Programmable 20 7 controller Specifies the range of devices to be read 8 9 2 5 One word device requires four hexadecimal digits gt 35 Therefore one word is expressed using fou
80. ISHI ELECTRIC EUROPE B V German Branch Gothaer Stra e 8 D 40880 Ratingen Phone 49 0 2102 486 0 Fax 49 0 2102 486 1120 e mail megfamail meg mee com EUROPE MITSUBISHI ELECTRIC FRANCE EUROPE B V French Branch 25 Boulevard des Bouvets F 92741 Nanterre Cedex Phone 33 1 55 68 55 68 Fax 33 155 68 56 85 e mail factory automation framee com MITSUBISHI ELECTRIC IRELAND EUROPE B V Irish Branch Westgate Business Park Ballymount IRL Dublin 24 Phone 353 0 1 419 88 00 Fax 353 0 1 419 88 90 e mail sales info meir mee com MITSUBISHI ELECTRIC ITALY EUROPE B V Italian Branch Via Paracelso 12 1 20041 Agrate Brianza MI Phone 39 039 6053 1 Fax 39 039 6053 312 e mail factory automation itmee com MITSUBISHI ELECTRIC SPAIN EUROPE B V Spanish Branch Carretera de Rub 76 80 E 08190 Sant Cugat del Vall s Phone 34 9 3 565 3131 Fax 34 9 3 589 2948 e mail industrial sp mee com MITSUBISHI ELECTRIC UK EUROPE B V UK Branch Travellers Lane GB Hatfield Herts AL10 8 XB Phone 44 0 1707 27 61 00 Fax 44 0 1707 27 86 95 e mail automation meuk mee com MITSUBISHI ELECTRIC JAPAN CORPORATION Office Tower Z 14 F 8 12 1 chome Harumi Chuo Ku Tokyo 104 6212 Phone 81 3 6221 6060 Fax 81 3 6221 6075 MITSUBISHI ELECTRIC USA AUTOMATION 500 Corporate Woods Parkway Vernon Hills IL 60061 Phone 1 847 478 21 00 Fax
81. LF Communication can be performed i using the ASCII HEX conversion RUE 4 eo Data CR function by specifying the BFM 0 b13 and the 0 b12 p e The ASCII codes available forthe i Li ig rl initial terminator are 01H to 1FH Inthe RS 232C interlink connection mode the communication formats to are available 2 bO to b7 data length parity stop bit and baud rate bO to b7 should be aligned with the communication specification of the connected counterpart equipment MITSUBISHI 10 5 FX communication FX2N 232lIF 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 bits b9 0 and b8 0 communication is performed using only the SD and RD signals without using the control line e When standard RS 232C mode is specified b9 0 b8 1 a cross cable is required to connect the equipment of terminal specifications and a straight through cable is required to connect the equipment of modem specifications When RS 232C interlink connection mode is specified b9 1 b8 1 the request to send RS signal functions as the signal to enable receive in the 232IF When receiving data exceeds 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 operation At this
82. Number of Communication Dal eoe 9 13 9 3 1 Deal with 16 bits 9 13 9 3 2 Deal with 8 Dits Data saroidagi ini eee ene ra eae 9 14 9 4 Programs _ lt _ lt _ _ 9 15 9 4 1 5 9 15 NAH dinge MEC 9 17 10 FXONSZO2IE ce cumin Eod ec cdd ceo Seca oco x nde daa Ra a ERE 10 1 os rero SHT E luin DR EFE UE 10 1 10 1 4 Outliie 10 1 10 2 Allocation of Buffer Memories BFM 5s 7 10 2 10 2 10 2 2 Communication Format lt 0 gt 10 4 10 2 3 Command BFM 17 aiad teak cet esci esie aside oe 10 8 10 2 4 Receive Upper Limit Byte Count BFM 2 10 9 10 2 5 Receive Time out Time BFM 9 gt r 10 9 10 2 6 Send Header BFM 5 upper BFM 4 lower essssseeeneeneennnns 10 9 10 2 7 Send Terminator lt 7 upper BFM 6 lower 10 9 10 2 8 Receive Header BFM 9 upper BFM 8 gt
83. Operation chart M1 Send lt M10 Receive lt M11 M2 BFM 1 b0 Send receive enable FX2N 232IF 10 BFM 1 b1 Send command BFM 13 Number of remaining send data BFM 1001 to 1256 Send buffers EO D gt MX STX 1001 lower 1002 lower 1002 upper 1003 lower 1003 upper 1004 lower 1004 upper 1005 lower ETX 1001 upper Send completion status is also reset by next send command BFM 28 b0 Send completion wv BFM 1000 Send byte count 14 Number of receive buffers EFC BFM 2000 Receive byte count ind 01 8 67 Contents of receive buffers are also cleared BFM 2001 to 2256 Receive buffers STX 2001 lower ETX 2001 upper 2002 lower 2002 upper 2003 lower 2003 upper 2004 lower 2004 upper 2 S 8 STX ETX BFM 28 b1 Receive completion BFM 2 Receive upper limit byte count 2 1 BFM 1 62 Receive completion reset command ew A A 4 MITSUBISHI 10 22 FX communication 10 4 2 Example of 8 Bits Data Communication FXz2N 232lF 10 This system configuration describes an example in which 8 bit buffer len
84. SD TXD Remaining number of send data D8122 s ooo Ta Ex 8565 cy 4 2 1 0 2 Receive data and number of receive data Receive data RD RXD Number of receive data D8123 MITSUBISHI 51 5155 e 585858 xe sssi 519 x tO tO 5 6 The number of receive 4 data is also reset when 9 3 Y the receive completion 1 flag M8123 is reset 9 13 FX communication 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 M8000 8 bit mode 16 bit data gt RS instruction 9 Ignored Lower 8 bits The upper 8 bits are ignored and the lower 8 bits exclusiuely ETX m m FN I D200 K 4 D500 K 10 are regarcled as valid Send data STX 0200 lower 0201 lower 0202 lower D203 lower ETX Programmdble controller Header Terminator External Head address specified by equipment Send byte count specified by m Receive data STX D500 lower D501 lower D502 lower 0503 lower D504 lower D505 lower External Bend N equipment gt Programmable Head address specified by controller l
85. Saved value 0 to 512 30 1 when buffer data length is 16 bits 0 to 256 15 1 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 BFM 2001 to 34412256 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 buffers 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 112271 Each of them is a spare buffer for the interlink connection in the case where the data exceeding 512 bytes is received and also used to receive 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 4 MITSUBISHI 10 15 FX communication FX2N 232lIF 10 10 3 Hardware Hand Shake Operation 10 3 1 No Hardware Hand Shake Setting BFM 0 b9 b8 0 0 Send receive OFF enable 4 1 60 2 oe Send OFF ON command BFM 1 b1 Send data SD TXD Data 4 f BFM 20 3 Xi ms 2 Send completion BFM 28 b0
86. TSUBISHI 3 5 Wiring 3 FX communication 3 3 Using RS 485 Interface 3 3 4 Wiring Selection The wiring of RS 485 can either be one pair or two pair The wiring method is decided according to application usage Please select the wiring method from the table below Usage One pair wiring Two pair wiring No protocol Half duplex communication 2 Use RS instruction 1 Full duplex communication 3 x It is necessary to set the message x wait time to 70 ms or less Dedicated protocol It is not necessar P y to set the A Use computer link 1 massage wait time to 70 ms or less e Use the on demand function x Parallel link 4 N N network Recommendation O OK x Cannot use Note 1 When this product is added to the system please match the wiring to the existing method of the system 2 When using an 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 8 Please use the FX2n programmable controller and FX2N 485 BD together Full duplex combination cannot be achieved with other configurations 4 For wiring parallel link see section 2 4 3 3 2 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 resistor Orange Orange Brown 3300 1 4W
87. 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 turned ON the next data cannot be received 8 After receive is completed and the 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 registers in the programmable controller then turn it ON MITSUBISHI 10 18 FX communication 10 4 Example Program 10 4 1 Example of 16 Bits Data Communication FX2N 232IF 10 This system configuration describes an example in which 16 bit buffer length data 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 en programmable contraller FX an 2321F Cross cable 2 Example setting buffer memori
88. X2NC 485ADP Max 500m 1640 5 5 FX LX2C Shielded twisted pair cable and glassfiber cable Using interface Extension distance FX2 40AW Shielded twisted pair cable Max 10m 32 9 FX2 FX2c FX2 40AP Glassfiber cable Max 50m 164 0 Note Parallel link is only possible between the same series of 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 FX2N FX2NC Group 2 FX1N Group 3 FX1S Group 4 FXON Group 5 FX FX2c s MITSUBISHI FX communication Introduction 1 1 333 Computer Link 1 In the case of 1 N connection using RS 485 RS 422 Computer RS 232C RS 485 RS 422 w FX2 FX2N FX2N 485 BD FX2N FX2N CNV BD 485 BD FX2Nc 485ADP FX1S FXIN CNV BD FX2c EXIS E BD FXon 485ADP FX1N FX1N CNV BD A series PLC e FXMBSADP 15 710 24 Up to sixteen FX series programmable controllers can be connected The total extension distance is 500m 1640 5 when only the FXoN 485ADP and FX2Nc 485ADP are used in the configuration and 50m 164 0 when the FX1N 485 BD and FX2N 485 BD are used 2 In the case of 1 1 connection using RS 232C FX2N FX
89. afa MITSUBISHI ELECTRIC MELSEC FX Series Programmable Logic Controllers User s Manual Communications Modules RS 232C RS 485 RS 422 Art no 070143 15 04 2008 MITSUBISHI ELECTRIC NDUSTRIAL AUTOMATION Version E FX communication Foreword This manual contains text diagrams and explanations which will guide the reader in the correct installation and operation of the communication facilities of FX series It should be read and understood before attempting to install or use the unit Further information can be found in the respective manual of each programmable controller f 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 that applies to the installation site f in doubt about the operation or use of the communication facilities of FX series please consult the nearest Mitsubishi Electric distributor This manual is subject to change without notice s MITSUBISHI FX communication FX COMMUNICATION RS 232C RS 485 RS 422 USER S MANUAL Manual number JY992D69901 Manual revision E Date April 2003 Brand and product names described by in this manual are trademarks or registered trademarks of the irrespective owners s MITSUBISHI i FX communication a MITSUBISHI FX communication FAX BACK Mi
90. al contains written hardware explanation of FX1N 422 BD User s Guide JY992D84101 installation and specification regarding the FX1N 422 BD FX 485 IF Hardware Manual JY992D81801 This manual contains written hardware explanation of installation and specification regarding the FX 485 IF s MITSUBISHI viii FX communication Table of Contents Further Information Manual vii NETTE NET 1 1 1 1 Abbreviations Generic Names and Terms Used in This Manual 1 1 1 2 Gommounication TVDES etos los 1 2 1 3 System Configuration ms pnt ode eden nd 1 3 1 34 NN Network ku u 1 3 1 3 2 ren iocis Da iki cat Mes are ct horde ean see asennad cedo ue 1 3 1 3 3 Computer LINK uu u 1 5 1 3 4 No Protocol COMMUNICATION a a a a 1 6 1 4 Supported Functions and Applicable Versions 1 6 2 2 1 2 1 Communication Specification He FEE D AES 2 1 2 2 Communication Time dicc e vta x e rc 2 2 2 271 NEN TIeEWOTK acte kaaman hyk duin nein sl seein o
91. ammable 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 remote 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 y YES Special auxiliary relay M8037 is ON Remote error code 18H is returned to computer and the state of programmable controller is not changed V Special auxiliary relays M8035 M8036 M8037 are OFF 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 controller is in forced RUN mode if the power source is turned off and on the special auxiliary relays M8
92. aracter is received Therefore receive points need to set 30th or more 8 Reset using a sequence program If itis turned ON the next data cannot be received In the interlink mode make sure to set the number of receive points to 30 characters or more 4 MITSUBISHI FX communication 9 3 9 3 1 Deal with 16 bits Data Number of Communication Data RS instruction 9 When M8161 is set to OFF M8161 is shared by an ASCII instruction a HEX instruction and a CCD instruction RUN SEE lt 16bitdata Upper 8 bits Lower 8 bits M8000 16 bit mode 16 bit data is divided into the ower 8 bits and the upper 8 S gt 5 bits then sent received X010 n D200 K4 D500 K10 data dbl STX D200 lower D200 upper 0201 lower 0201 upper ETX rogrammdble H Temi troll eader erminator extemal Head address specified by equipment Send byte count gt specified by m 899 STX D500 lower D500 upper D501 lower D501 upper 0502 lower D502 upper ETX xterna i Terminator Eie Head address specified by controller lt not exceed the upper limit number gt of receive data points byte count specified by n Receive is completed when the terminator ETX or n points are received 1 Send data and remaining number of send data Send data
93. aster communication error M8183 FNC 12 MCV K1M1000 K1Y010 FNC 12 MOV K1X000 K1M1064 Slave 2 communication error M8185 12 A MOV K1M1128 K1Y020 Counter input X000 T C 1 D 1 C 1 Y005 1070 Slave 2 Contact of communication slave 2 C2 error device M8185 M1140 Y006 FNC 12 MOV K 10 D 10 Slave 2 communication error M8185 FNC 20 ADD DO D 20 D 11 END s MITSUBISHI N N network 4 Operation 1 Operation 2 Operation 3 Operation 4 Operation 5 Operation 6 8 Operation 7 4 10 FX communication N N network 4 Program of slave station No 2 Counter reset X001 RST C 2 Master communication error M8183 y 42 1000 K1Y010 Operation 1 Slave 1 communication error M8184 12 i A MOV K1M1064 K1Y014 Operation 2 FNC 12 MOV K1X000 K1M1128 Operation 3 Slave1 Contact of communication slave 1 C1 error device M8184 M1070 Y005 Operation 4 Counter input X000 I C2 V006 Operation 5 1140 FNC 12 i MOV K 10 D 20 Operation 6 7 Slave 1 communication error M8184 r FNC 20 ADD DO D 10 D 21 END 4 MITSUBISHI 4 11 FX communication N N network 4 MEMO 4 MITSUBISHI 4 12 FX communication Parallel li
94. ation Diagnostics 12 12 Diagnostics 12 1 Common Items 1 Check the connection with the communication unit of the programmable controller and the optional equipment When the connection is unstable communication cannot be corrected For the installation and connection method refer to the manual of the communication unit of the optional equipment 2 Check whether the VRRD or VRSC instruction is the program If it is used delete it turn off the power of the programmable controller then turn it on again 3 Each setting of communication format D8120 parameter of programmable controller by FX PCS WIN E N N network D8173 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 controller and turn it on again 4 When using FXon 485ADP and FX 485ADP the power supply must be supplied correctly 4 MITSUBISHI 12 1 12 FX communication 12 2 N N Network Diagnostics 12 12 2 1 Error Code When occurring the communication error auxiliary relays 2 FX2nc FXin FX1s M8183 to M8191 FXon M504 to M511 for error flag is turned ON in the station And the error code is stored into the data registers 2 2 1 FX1s 08211 to 08218 FXon D211 to D218 This
95. ats 1 to 4 and on demand data become confused and normal data transmission is not possible 4 MITSUBISHI FX communication Commands 8 2 Specification Example 1 To transmit the data stored in data registers D100 and D101 from the programmable controller when the station number is 0 and data is specified in word units Computer The PLC number FE is automatically added by the programmable controller Programmable Ss DAE SENSE controller T IOOFE1234567 8792 X X 02H80H30H46H45H31H32H33H34H 35H36H37H38H03H39H32H lt M8127 cR m Programmable Write processin controller 9 Set ON if a transmission error occurs On demand D8127 100 M8128 ON OFF la command D8128 2 M8129 OFF 8100 1234H The 4 hexadecimal digits of D101 5678H each word are transmitted in ASCII starting with the most significant digit Program example M8000 8129 Data transmission set to word units X000 M8002 0 PLS MO jT v v6 Start command signals a pulse MO M8127 3 1234 D100 ee Transmission data is set 7 FNG 12 5678 D101 On demand error flag is reset RST M81281 o7 cannot start if M8128 is ON RST 000 RST Y001 PFMOv K100 D8127 ifyi issi MOV On demand is started by sp
96. ave 2 communication error Data communication M8191 Continued to a b or c in 4 3 5 Program Y000 Y001 Y002 Y003 A station cannot recognize its own error An error program for each station is not necessary MITSUBISHI FX communication 4 3 5 Example of Operation Program a Program of master station 4 MITSUBISHI RUN monitor M8000 I FNC 12 MOV K1X000 K1M1000 Slave 1 communication error M8184 FNC 12 At MOV K1M1064 K1Y014 Slave 2 communication error M8185 FNC 12 ME MOV K1M1128 K1Y020 Slave 1 communication error M8184 4 IIC12 D1 MOV Contact of slave 1 C1 device M1070 Y005 Slave 2 communication error M8185 FNC 12 Mt MOV K 10 D2 Contact of slave 2 C2 device M1140 T Y006 Slave 1 Slave 2 communication Communication error error M8184 M8185 12 MOV K 10 D3 FNC 12 MOV K 10 DO 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 X001 RST C 1 M
97. between terminals SDA and SDB and between 3300 terminals RDA and RDB Use the resistors offered as 1 4 W accessories with the product 2 In the case of one pair wiring connect the terminal resistor 1100 1 2W between terminals RDA and RDB Use the resistors offered as accessories with the product 110 Q 1 2W Brown Jr Brown MITSUBISHI 3 6 FX communication Wiring 3 3 3 3 One pair Wiring FX2NC 485ADP A series programmable RS 485 unit 4 FX1N 485 BD FX2N 485 BD FX 0N C485ADP controller s computer link unit Td Station Station 0 gt No Acn NO SDA SDA r7 SDA SDB SDB J SDB II Roa RDA L 804 LB gt RDB Li ME sa Li Ul sG 3 FG Class D grounding Note 1 Ris a terminating resistor 110Q 2 Make sure to connect the shield of the appropriate cable with the FX2n 485 BD FX1N 485 BD or FX2nc 485ADP to ground that has a resistance of 1000 or less Class D grounding 9 Make sure to connect the terminal FG to the ground terminal of a programmable controller grounded with resistance of 100Q or less Class D grounding However for a computer link unit of the A series programmable controller see the manual of the computer link unit 4 When using an RS 232C 485 converter use the FX 485PC IF Have in mind that echo occurs on the RS 232C side if one pair wiring is performed u
98. 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 b 0 1 0 1 1 200 1 0 O 1 19 200 0 1 1 0 2 400 bg Header None Effective D8124 Default STX 02H 9 1 Terminator None Effective D8125 Default ETX 03H b12 b11 b10 0 0 0 No use lt RS 232C interface 0 0 1 Terminal mode RS 232C interface No 0 1 0 Interlink mode RS 232C interface gt FX2n V2 00 or b10 protocol more b11 Control 0 1 1 Normal mode 1 RS 232C interface b12 line lt RS 485 RS 422 interface gt 3 1 0 1 Normal mode 2 lt RS 232C interface FX FX2c only b12 b11 b10 Computer IC 0 0 RS 485 RS 422 interface 0 1 0 RS 232C interface b13 2 Sum check Sum check code is not added Sum check code is added automatically b142 Protocol No protocol Dedicated protocol Transmission b152 control Protocol format 1 Protocol 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 RS 485 RS 422 interface make setting control line the same as this But control line of communication is the same as when not using control line operation This connection RS 485 is supported in the FXon FX1s FX1N FX2n FX2Nc series MITSUBISHI FX communication Communication format 6 6 4 Example of setting
99. cal RUSSIA Systems Siberia Shetinkina St 33 Office 116 RU 630088 Novosibirsk Phone 7 3832 22 03 05 Fax 7 3832 22 03 05 e mail info eltechsystems ru Elektrostyle RUSSIA ul Garschina 11 RU 140070 Moscow Phone 7 095 514 9316 Fax 7 095 514 9317 mail infoGestl ru Elektrostyle RUSSIA Krasnij Prospekt 220 1 Office No 312 RU 630049 Novosibirsk Phone 7 3832 10 66 18 Fax 7 3832 10 66 26 mail infoGestl ru ICOS RUSSIA Industrial Computer Systems Zao Ryazanskij Prospekt 8a Office 100 RU 109428 Moscow Phone 7 095 232 0207 Fax 7 095 232 0327 e mail mail icos ru NPP Uralelektra ul Sverdlova 11a RU 620027 Ekaterinburg Phone 7 34 32 53 27 45 Fax 7 34 32 53 27 45 e mail elektra etel ru RUSSIA SSMP Rosgidromontazh Ltd 23 Lesoparkovaya Str RU 344041 Rostov On Don Phone 7 8632 36 00 22 Fax 7 8632 36 00 26 e mail RUSSIA STC Drive Technique RUSSIA ul Bajkalskaja 239 Office 2 23 RU 664075 Irkutsk Phone 7 3952 2438 16 Fax 7 3952 23 02 98 email privod irk ru STC Drive Technique Poslannikov Per 9 str 1 RU 107005 Moscow Phone 7 095 790 72 10 Fax 7 095 790 72 12 email infoGprivod ru RUSSIA AFRICAN REPRESENTATIVE CBI Ltd Private Bag 2016 ZA 1600 Isando Phone 27 0 11 928 2000 Fax 27 0 11 392 2354 e mail cbi cbi co za SOUTH AFRICA MITSUBISHI EL
100. cial point which the user of the associate software element should be aware of 6 Indicates a point of interest or further explanation a MITSUBISHI 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 understanding the text not to guarantee operation Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples Please contact a Mitsubishi Electric distributor for more information concerning applications in life critical situations or high reliability s MITSUBISHI vi FX communication Table 1 Further Information Manual List Further Information Manual List Manual name Manual No Description FX1s Hardware Manual JY992D83901 This manual contains written hardware explanation of wiring installation and specification etc regarding the FXis Series programmable controller FXo FXon Hardware Manual JY992D47501 This manual contains written hardware explanation of wiring installation and specification etc regarding the FXo and FXon Series programmable controllers FX Hardware Manual JY992D47401 This manual contains written hardware explanation of wiring installation and specifica
101. cifications refer to chapter 3 wiring refer to chapter 2 settings and the number of transferred data and example program refer to chapter 4 diagnostics refer to chapter 12 Parallel link Data transfer with FX2n FX2nc FX1n FX and FX2c programmable controllers can be performed on a 1 1 basis for 100 auxiliary relays and 10 data registers With the FX1s and FXon data transfer is performed for 50 auxiliary relays and 10 data registers For the system configuration please refer to subsection 1 2 2 specifications refer to chapter 3 wiring refer to chapter 2 setting and example program refer to chapter 5 diagnostics refer to chapter 12 Computer link Data transfer using dedicated protocol Data transfer with RS 485 RS 422 units can be performed on a 1 n 16 basis using dedicated protocol For the system configuration please 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 RS 232C 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 232IF special function block For the system configuration please refer to subsection 1 2 3 specifications refer to chapter
102. d header K 02 4 FNC 79 H03 Send terminator TO KO K6 ETX K1 O34 BFMtt6 FNC 79 H02 Receive header To K8 K 02 8 FNC 79 Receive terminator KI 034 gt BFM 10 X 000 PLS M1 Send command Send command input 1 12 Send byte count FNC 12 21 D MOV H3231 D 201 FNC 12 H34 D 202 43 MOV 3433 0 FNC 12 Send data as many as 9 bytes mov M3635 0203 65 123456789 FNC 12 H 7 D 204 87 MOV 383 0 FNC 12 0039 D 205 9 MOV Unused CRM yo ies byte count and send data FNC 79 D200 K 9 BFM 1000 To K1000 D200 K6 D2012 4 BFM81001 D202 4 3 gt 1002 0203 6 5 gt BFM 1003 D204 8 7 gt 1004 0205 _ 9 gt 1005 8000 M8003 II r MO Send receive enable Initial pulse NC contact 10 monitor FNC 78 Read of status From 28 KAM10 BFM 28 615 to bO gt M25 to M10 Block No BFM No Number of lestination transter points M10 yo Status monitor upon necessity Y1 Error occurrence E 20 M 35 Error reset Error reset input M11 Read of receive buffers c KO 2001 0301 K4 2001 0301 Receive 2002 0302 completion BFM 2003 gt D303 BFM 2004 D304 Receive completion reset 25 command M8000 FNC 79 Transfer of command KO KIMO M3 to MO gt BFM 1 b3 to b0 s MITSUBISHI 10 21 FX communication 4
103. data 0 to 256 when data length is 8 bits 14 Number of receive buffers Oto 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 MITSUBISHI 10 2 FX communication 2 232 10 BFM Initial R For read No ERU 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 to 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 256 when data length is 8 bits 0 NW 1001 to Send buffers 0 W 1256 to 512 30 1 2000 Receive byte count Oto 256 15 1 0 R 2000 to Receive buffers 0 R 2256 72236 Spare receive buffers for interlink E 0 R 42271 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 4 MITSUBISHI 10 3 10 FX communication 10 2 2 Communication Format lt BFM 0 gt FX2N 232IF 10
104. data from the programmable controller to the computer The range of data registers containing the data to be sent is specified in special data registers Programmable controller D8127 Head address D8128 Data length Program L Din Computer Lis eA SA D n m 1 Notes This function can only be used when the configuration of the computer and programmable 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 M8128 On demand error flag OFF no error Word byte data format for on demand data Flag for specifying word 8129 ON byte units 8 bits per data register ot byte date Tone OFF word units 16 bits per data register On demand head The head device number of the data area in which the data to be D8127 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 register programmable controll
105. 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 2 25 5 Transmission sequence gt LL gt gt AM a 2 or ve 59 5 2 9 ajor EF dei FE To read data 2952 582 2 53 098 gt from the PLC Computer gt 2 8 58 gt 6 gt to the Programmable e e Bla SO m Por computer controller 41258 o s 8 4832 o z 5 o3 2 T 3 2 x 2 or e IE 2 lt a o gt 68 Oo A 312 8 sme sen 2 C s m o S99 sx 80 or 6 3 58 8 92 3 zoo g C t o 8 Z 5 0902 8 m4 omputer i To write data Al oo from the Programmable Transmission sequence 9 Jor computer to controller gt 6 o the PLC 3 2m 1 or gt 682 85 5 MA 2 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
106. e mode data exceeding 512 Signal 9 pin 25 pin E D SUB D SUB bytes upper limit of the receive SD TXD 2 buffer in the FX2N 232IF can be AD RXD received 2 7 4 _ 5 20 _ Fon 6 _ 56 6M9 s 7 Note 1 The FX2N 232lF only indicates 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 3 Modem specification device Standard RS 232C mode Using straight cable Setting communication format BFM 0 b9 0 b8 1 Controller Side RS 232C Device Side Signal 9 pin 25 pin name D 208 D SUB DR Note 1 The LX2M 232IL indicates the status exclusively _ 2 20 i 22 2 When the CD signal is not monitored the CD signal is not required to be connected With regard to the CD signal the FX2N 232IF indicates the status exclusively 3 When the Cl signal is not required the Cl signal pin is not required to the connected With regard to the signal the FX2N 232IF indicates the status exclusively MI
107. e selection 3 1 1 FXin 485 BD FX2n 485 BD FX2nc 485ADP To connect the RS 485 RS 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 communication cannot be assured as the terminal may be imperfectly contacted It is recommended to insert a cable integrated by a crimping tool into the terminal FX1N 485 BD FX2N 485 BD FX2NC 485ADP LC EL 8mm 0 32 6mm 0 23 Number of cables connected to terminal and their specification FX1n 485 BD FX2n 485 BD FX2nc 485ADP When connecting 1 cable AWG26 16 AWG26 16 When connecting 2 cables AWG26 20 Tightening torque 0 6N m 0 4 to 0 5N m 3 1 2 485 1 The terminal screws of the FX oN 485ADP are screws therefore crimp style terminal see drawing suitable for use with these screws should be fitted to the cable for wiring For M3 For M3 6 2mm 6 2mm 0 24 inches mes 0 24 inches C mic 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 3 1 3 FX2 40AW 1 The terminal screws for the terminal block of the FX2 40AW are M3 5 screws therefore crimp style terminal see drawing suitable for use with these screws should be fitted to the cab
108. ecifying transmission data gt L FNC 12 08128 area head address and data length M8127 M8128 AT 33 SET Y000 Confirming on demand error normal abnormal external M8128 9 W i SET Yo01 output is set 40 END M8128 OFF Normally transmitted ON Data is not transmitted due to error MITSUBISHI 8 19 FX communication Commands 8 3 Specification Example 2 To transmit the data stored in data registers D100 and D101 from the programmable controller when the station number is 0 and data is specified in byte units The PC number FE is automatically added by the programmable controller Computer Programmable controller JFE 3412 7856 T 92 X 45H B1H 32H 33H 34H 97H 38H 35H 36H 32H M gt M8127 Write processin controller g Set ON if a transmission error occurs On demand D8127 100 M8128 ON OFF FTN command 08128 4 M8129 0M D100 1234H 2 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 2 8129 Data transmission set to byte un
109. ed product This includes being completely familiar with all associated documentation for the said product All maintenance should be carried out in accordance with established safety practices c All operators of the completed equipment see Note should be trained to use this product in a safe manner in compliance to established safety practices The operators should also be familiar with documentation which is associated with the operation of the completed equipment 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 throughout 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 QP P s o o 5 2 o 4 Indicates special care must be taken when using this element of software 5 Indicates a spe
110. en it is turned ON the next data cannot be sent 2 Time set by BFM 21 x10ms 8 Time set by BFM 22 x10ms 4 Turn off using a program When it is turned ON the next data cannot be received 5 After receive is completed and the data is read turn off the receive completion flag BFM 28 b1 using a completion reset command BFM 1 b2 10 MITSUBISHI 10 17 FX communication FX2N 232lIF 10 10 3 3 Interlink Mode Setting BFM 0 b9 b8 1 1 Send receive OFF ON enable BFM 1 60 DR DSR OFF ON E X 1 Send command OFF ON 2 BFM 1 61 OFF 2 CS CTS BFM 20 X10ms 3 BFM 20 X10ms 3 Send dat Ni end data od SD TXD 2 Send OFF ON mc completion gt BFM 20 BFM 28 X10ms 4 de RS RTS OFF i Receive data RD RXD Receive OFF suspended BFM 28 b4 M Receive OFF ON X10ms 6 I completion 7 x BFM 28 b1 PA E Receive OFF Y Y Y completion reset 4 9 E 8 7 7 BFM 1 b2 1 Turn off using a program When it is turned ON the next data cannot be sent 2 Make sure that the CS CTS in the FX2n 232IF is turned on while the counterpart equipment is ready for receive 8 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
111. er s program Notes The on demand handshake signal is turned on when data transmission to the computer is started from the programmable 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 4 MITSUBISHI 8 15 FX communication Commands 8 8 10 2 On demand Control Protocol 1 Control protocol programmable controller On demand data transmission Set the word byte data format Set on off special M8129 ON byte units 8bits OFF word units 16bits Set the on demand Write the data to be transmitted into data registers gt Reset the on demand error Turn off on demand error flag special M8128 If special M8128 is ON on demand can not V be started Start on demand esee 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 completed M8127 is turned off 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 k On dema
112. er 5 6 6 6 35 D6H30H46H46H46H Programmable S E controller TO F 8 D T 8 1 Indicates station No 15 X X D2H30H46H46H46H38H44H03H38H31H OF in hexadecimal Indicates the type name of the Programmable controller is FX FX2c series 4 MITSUBISHI 8 13 FX communication Commands 8 8 9 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 programmable controller it is Xn2 of the computer link unit This function can be used for initialization resetting or simultaneous start stop of all programmable controller stations 8 9 1 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 The station number specified in the control protocol must indicate all stations and is hence specified as FF If other than FFH is specified as the station number the special auxiliary relay M8126 of the specified station is turned on off No reply 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 s
113. error code is following the table Error Error Check r code Meaning station station Description Checking points Comms After master station send request Check wiring power of programmable 01H time o terror L M save station no answer passing controller RUN STOP state RUN is comms time out Ok Station No is not agreement 02H EH No L M between the master station and the Check wiring slave station Comms Communication counter is not 03H co ntererror L agreement between the master Check wiring station and the slave station aH Check wiring power of programmable eo DN L ML eommunication format is not right 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 time out error not send request to next slave Ok station Check wiring power of programmable M L gommunication format is not right controller RUN STOP state RUN is Ok station No setting The station No is not in this 21H No slave error L L 1 network Check station No setting Station No is not agreement 22H Sion L L 1 between the master station and the Check wiring slave station Comms Communication counter is not 23H Countereer L L 1 agreement between the master Check wiring station and the slave station Not receive When slave station receive
114. es The items not described here are set to the default respectively a Communication format BFM 40 MITSUBISHI Bit Description Setting bO Data length 1 8 bits d Parity 1 1 Even 10 b3 Stop bit 1 2 bits b4 b Baud rate 1001 19200 bps b7 08 control li Not used b9 ontrol line 0 0 Not use D10 Addition 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 xj 16 bit length b14 Send receive buffer data length 0 16 bits b15 Undefined b15 b8 b7 b0 0 0 000001001 111 1 0 0 9 009F 10 19 FX communication b Command lt BFM 1 gt M0O b0 Send receive enable ER ON M1 b1 Send command M2 gt b2 Receive completion reset command M3 gt b3 Error reset FX2N 232IF 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 lt BFM 28 gt b0 M10 Send completion b1 M11 Receive completion b2 M12 Receive time out b3 M13 Error occurrence b4 M14 Receive suspended b5 gt M15 Undefined b6 M16 Being sent b7 M17 Being received f Send byte count lt BFM 1000 gt 9 bytes 9 Send buffers lt BFMs 1001
115. evice M Word device D 0 point 4 points No 0 DO 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 4 MITSUBISHI FX communication 2 In the case of pattern 1 FX1N FX2n 2 Device No Station No Bit device M Word device D 32 points 4 points No 0 M1000 to M1031 D0 to D3 No 1 M1064 to M1095 D10 to D13 No 2 M1128 to M1159 020 to 023 No 3 M1192 to M1223 030 to D33 No 4 M1256 to M1287 040 to D43 No 5 M1320 to M1351 D50 to D53 No 6 M1384 to M1415 060 to 063 No 7 M1448 to M1479 D70 to D73 3 In the case of pattern 2 FX1N FX2n FX2NC N N network 4 Device No Station No Bit device M Word device D 64 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 D37 No 4 M1256 to M1319 D40 to D47 No 5 M1320 to M1383 050 to 057 No 6 M1384 to M1447 D60 to D67 No 7 M1448 to M1511 07010 077 4 2 4 Setting Retry Count 08179 Set a value 0 to 10 to the special data register D8178 Default 3 This setting is not required for the slave station If a master station tries to communicate with the slave station at this retry count or over communication error occur in the station 4
116. f 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 O ms The sum check is calculated over this range LN gt BCA9 CN100 le FF 100500 11234 Y0100 0064 07 Computer D5H 35H 46H 57H 54H 90H 33H 4 35H 91H 32H 33H 34H 30H 31H 42H ASH 39H AEH 31H 30H 36H 34H 37H Programmable gt lt gt lt gt controller L 05 FF K 8 e A 06H 30H 46H 46H Indicates to change the 110 11010 51 Indicates to change the contents of D500 to itt itt Hit present value of C100 to 1234H or 4660 in I L x i x x x 64H or 100 in decimal 1111111100000000 7654321076543210 Each bit 0 1 indicates reset OFF or set ON respectivly s MITSUBISHI 8 9 FX communication 8 7 8 7 1 8 7 2 Commands 8 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 programmable controller and forced RUN mode becomes active the progr
117. f control line RS instruction driving Send data SD TXD Send request M8122 DR DSR Receive data RD RXD Time out evaluation flag M8129 Receive completion M8123 ER DTR RS instruction 9 OFF ON Data 2 Data 4 Data 4 ON OFF Up to 30 characfers can be received 2 evaluation time pial Y 3 Reset it using a program When it is not trurned off the next data cannot be received OFF ON Y 7 ON V 95 ON OFF 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 ch
118. following conditions 1 lt number of devices lt 64 32 words in the case of bit devices 13 words for FXoN Head device No number of devices number of devices x 16 in the case of bit devices 1 lt max device No When reading 32 bit devices C200 to C255 the returned data is a double word Hence the maximum number of devices is 32 The station number PC PLC number number of devices and sum check code are expressed in hexadecimal 2 Command examples a Example 1 To read 32 points of data from X040 to X077 at station No 5 with message wait time set to 100 ms E A Bos FFI WRIOX0040 02 48 The sum check is calculated 095 Computer 35H 46H 57H 52H B0H 32H over is Programmable u E controller The sum check is calculated Tlos i123 4 ABCD 08 over this range X X 35H 46H BIH 32H 33H 42H 38H a 1 j 2 3 4 A D y 1 1 11 0 0 1 1 0 X X X X X X X X X X X X X X X X X X 0 0000 s 00000 0000 0000 5 55 5 4 44447 7776 6666 7 2107 32107 2107 3210 Notes e Command WR uses word units When reading 32 points the number of devices is specified
119. g items are determined BFMs 5 and 4 send header 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 BFM 2000 receive byte count BFMs 2001 to 2256 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 BFMs 9 and 8 receive header BFMs 11 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 items BFM 28 b4 receive suspended BFM 2000 receive byte count BFMs 2001 to 2256 receive buffers 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 FX2N 232lIF 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
120. ged Receive data is Receive A interrupted Data 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 controller 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 D8129 is set to 0 the evaluation time equates to 100 ms Example When the time out evaluation time is set to 50 ms M8002 FNC 12 MOV K5 D8129 4 MITSUBISHI 9 5 FX communication RS instruction 9 9 2 Hardware Hand Shake Operation 9 2 1 FX FX2c FXon FXis FXin and FXan earlier than V 2 00 In the FX FX2c FXon FX1s FX1N and FXan 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 08120 b12 b11 610 0 0 0 RS instruction driving OFF ON Send data SD TXD M8122 Send request V ON OFF 7 ON Send wait i flag M8121 u This period should be z 100 usor more Receive data RD RXD Data Z oaas 3 Receive completion M8123
121. gth data is sent and received between the equipment of the terminal specifications In this example the ASCII code saved in data registers D201 to D209 in the programmable controller is sent to the counterpart equipment and the data received from the counterpart equipment is saved in data registers D301 to D308 in the programmable controller 1 System configuration 2 programmable controller FX2n 2321F Cross cable 2 Example setting buffer memories This items not described here are set to the default respectively a Communication format BFM 40 MITSUBISHI Bit Description Setting bO Data length 1 8 bits x Parity 1 1 Even b3 Stop bit 1 2 bits B 10 DS Baud rate 1001 19200 bps b7 08 control li 0 0 Not used b9 ontrol line 0 0 Not use D10 Addition of CR and LF 0 0 Not added b12 Availability of check sum and 1 i Specification item for ASCII HEX conversion 0 0 Not available E bn length b14 Send receive buffer data length 0 8 bits b15 Undefined b15 b8 b7 b0 0 1 0 0 0 0101100 111 11 11 1 1 4 0 9 409 10 23 FX communication FX2N 232IF 10 b Command lt BFM 1 gt M0 b0 Send receive enable ER ON M1 b1 Send command M2 gt b2 Receive completion reset command M3 gt b3 Error reset Receive upper limit byte c
122. h 2 2 2 2 32233322 222 _ _ _ _ _ _ _ _ _ 2 2 2 2 3 COMPUTE ee 2 3 B VVININIG iyi 3 1 3 1 Caution on cable SSIGCUON sic mt ex corvi c o o e e a den 3 2 3 1 1 FX1N 485 BD FX2N 485 BD 2 485 n n tnn 3 2 NEN HT EUR PEERS 3 2 ___ _ _ _ _ _ _ __________ ____ __ 3 2 3 2 Using RS 2320 Interface i aout iius netu e ib dent aa 3 3 3 2 1 Using RS Instruction or Computer Link 3 3 32 2 sing FX28 232 F aaa AE do A RA eua lan 3 4 3 3 USING FiS 485 InterfdeB 3 6 3 941 Wiring Selection ced tete tte t rea re d tres 3 6 3 3 2 Terminali esIslOr uice eee rente uq D DT Seda 3 6 3 9 3 One paltr WIIG 22 5 tice re tee eee te ede ce ipo ute ire S Ge saath ce EGO ERE ES 3 7 3 3 4 Twospair WITING uite tit E 3 8 3 4 Parallel bns iei ooo potett oe vad eee er aaa tem eoe et totu diei eee ies 3 9 3 4 1 FX2N 1N 485 BD and FXoN 485ADP a n n 3 9 3 4 2 FXoN 485ADP and FXoN 485ADP n a naa 3 10 3 4 3 FX2N 1N 485 BD and FX2N 1N 485 BD n t 3 11 3 4 4 FX2NC 485ADP and 485 n n n naa 3 12 3 4 5 FX2N 1N 485 BD and FX2Nc 485ADP
123. hat the communication procedure is performed correctly If it is not performed correctly correct the setting in the computer 3 Check the NAK error code and programmable controller error code Please see the following section 12 4 1 and section 12 4 2 4 MITSUBISHI 12 5 12 FX communication Diagnostics 12 12 5 RS Instruction 12 5 1 Diagnostics 1 Check the status of the RD RXD LED and the SD TXD LED provided on the optional equipment e Ifthe RD 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 2 Cheek 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 3 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 4 Make sure that the external equipment is operating correctly 5 Check whether the type of send data and the type of receive data are equivalent If they are different make them equivalent 6 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 wh
124. he FX2n programmable controller the FX1N 232 BD consumes 5V DC 20 mA from the FX1N FX1s programmable controller and the FXoN 232ADP FX2nc 232ADP consumes 5V DC 200mA 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 FXeN FX2Nc FX1s FX1N Programming software FX PCS AT EE Programming software FX PCS WIN E 11 2 1 Connection cables 1 FXoN 232 BD FX1N 232 BD FX2nc 232ADP RS 232C connector of FX2n 232 BD FX1N 232 BD personal computer FX2uc 232ADP side ore Cap Se F2 232CAB 1 Gender changer RS 232C cross cable D SUB 9 pin to D SUB 9 pin see the reference bellow RS 232C 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 RS 232C connector of personal computer Cable D SUB 25 pin F2 232CAB D SUB 9 pin F2 232CAB 1 4 MITSUBISHI 11 2 FX communication Optional programming port 11 Note Reference _RS232C crross cable RS232C crross cable 232 D SUB 25pin gt D SUB 9 D SUB 9pinD SUB 9pin 1 1 1 4 1 1 1 7 2 2 2 2 s 8 2 2 2 3 3 3 3 3 3 3 3 2 25pin 5 9pin 25 9 5 25pin 25pin 6 4 9pin 9pin 4 6 9pin 6 4 6 6 5 5 7
125. he computer into the programmable controller computer programmable controller A _ E Computer Data Programmable Data controller L B a Areas A indicates transmission from the computer to the programmable controller b Area B denotes transmission from the programmable controller to the computer c 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 Example In area A ENQ is transmitted followed by all other data starting to the right after the ENQ MITSUBISHI X4 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 these 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 the A series programmable controller Basic format of transmitted data Control code 4 Station No i PLC No i Command Message wait en Character Sum check code 1 i Control code CR LF 2 gt Note 1 Whether or not to add sum check code can be selected using the communication format special data register D8
126. hould be 100 us or more Note When using FX1s FX1n FXon FX or FXec this period should be longer than 2 scan times or more 4 MITSUBISHI 9 8 FX communication RS instruction 9 4 Use normal mode 2 of control line FX FX2c only RS instruction driving OFF ON Send data SD TXD Send request M8122 Send wait flag M8121 Oo Le VA so Le VA Check OFF ER DTR OFF ON DR DSR OFF ON S4 4 Check 25 gt OFF Receive data 3 RD RXD N Receive completion OFF ON M8123 1 Please turn OFF ER of DR DSR later 2 When the data is sent please turn OFF DR DSR When it is turned ON the next data cannot be communicated 3 When sending data to the programmable controller please check to turn OFF the ER DTR signal 4 Reset using a program When it is turned ON the next data cannot be received 5 This period should be longer than 2 scan times or more 4 MITSUBISHI 9 9 FX communication RS instruction 9 9 2 2 2 FXanc V 2 00 or later In the FX2N 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
127. ided at the programmable controller in order to determine which programmable controller the computer accesses In the FX series programmable controller the station number is set by the special data register D8121 special 08121 hereinafter The setting range is 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 Computer FX FX FX FX series series series series 485PC IF T 485ADP T 485ADP 1 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 FNC 12 m 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 specified range 00H to OFH For example setting in a random order or skipping numbers is acceptable 3 PLC number The PLC number is the number identifying the programmable controller CPU on the A series MELSECNET II or MELSECNET B Accordingly the PLC number for an FX series programmable controller is FFy and is represented as two
128. ile data is received or sent 7 In the Series V 2 00 or later an RS instruction is not executed if the counterpart equipment receives NAK Arrange the system so that the RS instruction is executed even if the counterpart equipment receives NAK 4 MITSUBISHI 12 6 FX communication Diagnostics 12 12 6 FX2n 2321F 12 6 1 Error code When an error occurs while data is sent or received BFM 28 b3 is set to ON and the error code is saved in BFM 29 Code Description Causes and countermeasures 0 No error Communication format such as baud rate is not Receive parity error overrun error framin party 9 matched 575 Control timing is not matched Undefined Defective receive character Receive data is not ASCII code Receive sum is not equal calculated sum result 4 Receive sum check error BEM 16 Receive buffer overflow only in interlink RECEIVE Din ST ETN Byles 5 connection mode mc ue 6 Baud rate setting error Non existing baud rate is specified 7 Receive CR error CR is not placed in correct position 8 Receive LF error LF is not placed in correct position 9 Send receive initial terminator setting error Initial terminator is other than 01H to 1FH jo Receive terminator error Receive terminator is not placed in correct position or not matched 11 Undefined 12 Transmission sequence error Transmission sequence is not matched
129. infoautomation getronics com Control Systems Donauweg 2 B NL 1043 AJ Amsterdam Phone 31 0 20 587 67 00 Fax 31 0 20 587 68 39 e mail info gia getronics com Systems Siberia Partizanskaya St 27 Office 306 RU 121355 Moscow Phone 7 095 416 4321 Fax 7 095 416 4321 e mail info eltechsystems ru TELECON CO BULGARIA Beijer Electronics AS NORWAY 4 A Ljapchev Blvd Teglverksveien 1 BG 1756 Sofia N 3002 Drammen Phone 359 0 2 97 44 05 8 Phone 47 0 32 24 30 00 Fax 359 0 2 97 44 06 1 Fax 47 0 32 84 85 77 e mail email info beijer no INEA CR d o o CROATIA MPL Technology Sp zo o POLAND Losinjska 4 a HR 10000 Zagreb Phone 385 0 1 36 940 01 Fax 385 0 1 36 940 03 mail ineaGinea hr ul Sliczna 36 PL 31 444 Krak w Phone 48 0 12 632 28 85 Fax 48 0 12 632 47 82 e krakow mopl pl AutoCont CZECH REPUBLIC Control Systems s r o Nemocnicni 12 CZ 702 00 Ostrava 2 Phone 420 59 6152 111 Fax 420 59 6152 562 e mail consys autocont cz louis poulsen DENMARK industri amp automation Geminivej 32 DK 2670 Greve Phone 45 0 70 10 15 35 Fax 45 0 43 95 95 91 e Ipiaelpmail com UTU Elektrotehnika AS P rnu mnt 160i EE 11317 Tallinn Phone 372 0 6 51 72 80 Fax 372 0 6 51 72 88 e mail utu utu ee ESTONIA Beijer Electronics OY FINLAND Ansatie 6a FIN 01740 Vantaa Phone 358 0 9
130. ion 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 8129 On demand word byte changeover computer link Time out evaluation flag RS instruction M8161 8 bits 16 bits changeover flag RS instruction indicates the applicable application 6 2 2 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 gt RS instruction D8127 On demand head device register computer link D8128 On demand data length register computer link D8129 Data network Time out timer value RS instruction computer link indicates the applicable application MITSUBISHI 6 1 FX communication Communication format 6 6 3 Communication Format D8120 Bit Description No Name 2 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
131. its X000 M8002 0 PLS a Start command signals a pulse MO M8127 3 FNG 12 1234 D100 e Transmission data is set 7 FNG H5678 D101 On demand error flag is reset n RST M8128 70 cannot start if M8128 is ON RST YOOO 5 RST 001 FNC 12 MOV K100 DETEN i Confirming on demand error normal FNG 12 KA D8128 abnormal external output is set M8127 M8128 33 cd SET Y000 Confirming on demand error normal M8128 3 i SET Y001 abnormal external output is set 40 END M8128 OFF Normally transmitted ON Data is not transmitted due to error 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 programmable controller is operating as normal or not 1 Command Specification Protocol format 1 is shown Loopback test command Character area A T T T m zo v 95 Daa 8 98 5 59 5 designated o3 o A Zo o o 5 o Z gt characters 2 characters hexadecimal Computer oo 8 8 UN Programmable zo 2 195 m 82 controller 2 characters hexadecimal 7 5 same data _ S gt 2 5 x gt Aarea X 2 S A
132. ive 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 FX2N 232lIF 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 232 IF 1 bO send receive enable While bO is turned on the 2321 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 TO instruction before setting bO to ON BFM 0 communication format BFMs 9 and 8 receive header BFMs 11 and 10 receive terminator On the rising edge of 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 b0 is set BFM 28 bO is automatically reset when the next send command b1 is given When b1 is given the contents of the following settin
133. le for wiring For M3 5 For M3 5 6 8mm 6 8mm 0 27 inches 00 8 0 27 inches c 00 8 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 malfunction 4 MITSUBISHI 3 2 FX communication Wiring 3 3 2 Using RS 232C Interface Below is a typical wiring example Please wire similar to the following pin name when a pin number on the side of a counterpart machine differs 3 2 1 Using RS Instruction or Computer Link 1 Terminal specification device Programmable Controller Side RS 232C Device Side Uses CS RS Uses DR ER Signal name 9 pin D 25 pin SUB D SUB D SUB D SUB re SD TXD 3 4 0 5 3 2 2 7 s s pes Note When using ER and DR signals please also check if RS and CS signals are needed according to the RS 232C device specifications 2 Modem specification device Programmable Controller Side RS 232C Device Side Uses CS RS Uses DR ER Signal 9 pin 25 pin name 9 pin 25 pin D SUB D SUB D SUB D SUB re re copcp 1 8 ra t 8 EE s s roso s Note The FXon 232ADP and FXe2uc 232ADP does not monitor the CD pin pin8 3 Computer link Please refer to 2 2 1 1 for wiring MITSUBISHI 3 3 FX communication Wiring 3 3 2 2 Using FX2n 232IF The signal wiring of the RS 232C equipment varies
134. mat is set to the initial status 08120 KO Using a peripheral equipment check the communication setting by parameters If a non procedure protocol RS instruction or dedicated protocol is selected in the setting clear the setting 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 FX N 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 4 MITSUBISHI 12 8 FX communication Appendix A Appendix A ASCII code Lists Table B 2 ASCII code Lists ee 0 1 2 3 4 5 6 7 0 DLE SP 0 P 1 5 DC1 1 q 2 STX DC2 2 B R b r 3 ETX DC3 3 S C 5 4 DC4 4 D T d t 5 ENQ NAK 96 5 E U e 6 SYN amp 6 F V f 7 BEL ETB 7 G VV w 8 BS CAN 8 H X h x 9 HT EM 9 i y A LF SUB J Z j z B VT ESC Fi K k FS lt L D CR GS SO RS gt N n F SI US 9 DEL s MITSUBISHI A 1 FX communication Appendix A MEMO MITSUBISHI A 2 MITSUBISHI ELECTRIC HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EURASIAN REPRESENTATIVES MITSUB
135. mission format be set using the special data register D8120 Even if the setting of D8120 is modified while an RS instruction is driven such modification are not accepted In a system in which a send operation is not performed set the number of send points to KO In a system in which a receive operation is not performed set the number of receive points to KO Supporting RS Instruction and Programming Protocol When using the RS instruction in conjunction with a FX2n 232 BD or FXon 232ADP FX2Nc 232ADP the user can switch between no protocol communication and the programming tool Programming Protocol under the following conditions Accordingly when data is received from the counterpart equipment while an RS instruction remains OFF will be sent back to the counterpart equipment Programmable Controller and Version Supporting Version FX2n_ 2 01 or more FX2Nc All products V2 01 or more MITSUBISHI 9 1 FX communication Operating Conditions and Format Set Content RS instruction 9 The programmable controller can change from using 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 options shown below into the Register D8120 to use no protocol communication Table Set communication format D8120
136. mple FXon 1 4 MITSUBISHI FX2N FX2N FX1N Slave station No 1 is M505 Slave station No 7 is M511 Slave station No 7 is M8190 Note Devices M503 to M511 in the FXoN and FX1s cannot be used in the program These devices are used by the N N network Slave station No 2 is M506 Slave station No 1 is M8184 Slave station No 2 is M8185 FX communication N N network 4 4 1 2 Data Registers Data Registers Attribute FXon FXon Name Description type FX1is 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 D8176 Station number setting Sets its own station No M L D8177 Total slave station number Sets total number of M setting slave stations w D8178 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 R D202 D8202 Maximum network scan Saves maximum network M L time scan time Number of Number of communication ho R D203 D8203 communication error at L error at master station master station 1 Number of D204 to D8204 Number of communication R x communication error at M L D210 2 082
137. n no protocol communication This BASIC program is written by not know overseas 10 CLOSE 1 40 Text of ASCII stored 20 OPEN 1 AS 1 1 port is opened 30 PRINT 1 A Data is sent to PLC 40 CLOSE 1 FOR l J TO 2000 NEXT 1 50 COM1 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 100 BS INPUT LOC 1 1 110 PRINT B Received data is displayed 120 END 1 This counter is used for waiting time of receiving data from PLC Please change setting value of counter for personal computer CPU speed MITSUBISHI 9 16 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 en 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
138. nd Receive Nu Check that the received data On demand data has a PLC number of FE on demand data automatically attached This can be used to identify on demand data V Data processing V CL Completion of Receive MITSUBISHI 8 16 FX communication Commands 8 3 On demand request time chart When the computer is transmitting data 2 On demand data Computer e Programmable controller gt 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 reception of command data ENQ from the computer 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 N On demand data 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
139. nen nnns 4 8 4 3 5 Example of Operation Program nennen nennen nnne enne nnne nnne 4 9 I C ae aaa 5 1 5 1 Related Flags and Data Registers 5 1 5 2 Mode and Link DEVICE eia ded 5 5 2 5 2 1 Normal Mode Special auxiliary relay M8162 5 2 5 2 2 High Speed Mode Special auxiliary relay M8162 ON 5 8 5 3 Exarrple PROG GAIN s eie deae deer em Pr 5 4 5 9 1 Normal eterne edle eere pepe n ee cene adea cede eee er ees 5 4 5 3 2 High 5 4 6 Communication format 08120 6 1 6 1 What Is Communication Format rra 6 1 6 2 Related Flags and Data 6 1 6 2 1 Special Auxiliary Relays nennen nennen nennen nennen 6 1 6 2 2 Special Data Registers _ _____ _ _ _ __ _ _ _ 6 1 6 3 Communication Format D8120 6 2 6 4 Example 6 3 Z CORDES LINK et EE 7 1 Flow by
140. nge Computer 35H t6H AGH 52H 1H 30H 34H 30H 35H g7H lt 3 gt 06H 35H Programmable S E 200016 The ia check is calculated 05 IEF 01101 Tlos over this range X X 02H 35H 46LI 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 4 MITSUBISHI FX communication Commands 8 8 2 Batch Read of Word Device WR command 1 Command specification Protocol format 1 is shown One word device requires four hexadecimal digits Batch read 800000900 words Character area A m zo v Headdevice Number of 8 Therefore one word is gt gt gt ex i gt 2785 8 devices 3 expressed using four o 5 Z 27 X 5 characters 2 characters 5 Z Computer o 9 29 hexadecimal 8 characters T T Programmable gt Dataof m controller Specifies the range of 4 980 the devices to be read S gt 509004 X devices lt 9 lt Character area B Notes Specify the range and number of devices 16 bit words so as to satisfy the
141. nits 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 No of Head device device Data Data oint 16 12 34CD ADH 30H 30H 31H 36H 30H 32H 41H 42H 31H 32H 33H 34H 43H 44H A B 1 2 3 4 e C D B15 814 B13 B12 B11 B10 B9 88 B7 B6 BS B4 B2 B1 BO 815 814 813 812 811 810 B9 88 B7 B6 BS B4 B3 B2 BO 1101110 1 0 111 1 1 0 0 111 101110 0 111 1111011 MM MM MM MM MM MM MMMM MM MMMM MM MMM MMMM 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 Lowest bit of 1st word of 2nd wor 1 Represents ON 0 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 character Example 1 When showing the contents of data registers D350 D351 Head device M00 Data Data device
142. nk 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 programmable 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 4 MITSUBISHI 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 MLIL1 MEIE NN Dirt DOO lt _ J Dxx Doo MERC FX2N FX2nc FX FX2c FX1s FXoN Master M800 to M899 100 points M400 to M449 50 points Communication gt Slave D490 to D499 10 points D230 to D239 10 points devices Slave M900 to M999 100 points M
143. o realize full duplex serial data communication with another RS 232C interface such as a personal computer bar code reader printer etc 10 1 1 Outline of Product 1 Applicable programmable controller The 232lF can be connected as a special block of the FX2N FX2nc programmable controller 2 Control instructions Send receive data is received and sent and diversified control commands are manipulated using the FROM TO instruction 3 Number of I O points and connection method The 232IF occupies 8 points that can be allocated as either inputs or outputs 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 4 Communication method Full duplex start stop synchronization and no protocol procedure are used The communication format can be specified using buffer memories BFMs 5 Send receive buffer The send receive buffer can accommodate 512 bytes 256 words When the RS 232C interlink connection mode is used data exceeding 512 bytes 256 words can also be received 6 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
144. of status amp 9 28 K4M10 K1 BFM828 b15 to bo M25 to M10 10 Block No BFM No Transfer Number of destination transfer points M10 YO eds completion Status monitor upon necessity Go Error occurrence X001 Error reset Error reset input M11 FNC 78 Read of receive buffers T prom K0 2001 D301 8 BFM 2001 D301 BFM 2005 D305 Receive BFM 2002 D302 BFM 2006 D306 comple BFM 2003 D303 BFM 2007 D307 tion BFM 2004 D304 2008 0308 2 Receive completion reset command M8000 FNC 79 Transfer of command 1 IM0 M3to MO gt BEM 1 b3 to bO 10 25 FX communication 4 Operation chart FX2N 232lF 10 0 BFM 1 bo i M BFM 1 bt Send command 19 8 7 1 13 65 Number of remaining 2 LLLA Send lt send data 555555555 Send completion status is also reset BFM 1001 to 1256 5 B 8 z by next send command E Send buffers ss2228282252 BFM 1000 u M10 BFM 28 bO Send byte count Send completion 8 5 6 RH 14 3 4 ERE Number of receive 12 buffers 0 458 ___ 2000 137 m x 0 E Receive byte count 0 TN 4 Contents of receive buffers are also cleared When not reset eceive BFM 2001
145. or are exclusively 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 FX2N 232lIF 10 Note Setting example hexadecimal constant specification Data length 8 bits Parity Odd b5 bi2 bii b8 b7 b4 b3 bo Stop bit 1 bit BFM 0 o 1t o o o o o o o 1 1 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 EE TO H4063 ASCII HEX conversion used pulse Block BFM Set Number of Buffer data length 8 bits value 1 Communication format Select the communication format used ae to send receive data via the 2321F among the 9 types shown on the left SENE Data emi The header can be specified in the poem nator portion of the communication E Temi cp format nalor n the communication format type IEEE Temi 3 Data CR LF hexadecimal data binary and nator ASCII code can be sent and received Header Data nator Sum In the communication format types to the send receive data Header Data Sum CR should be any ASCII code except the header terminator and CR Header Data Tem Sum CR
146. or FX 20P CAB FX 20P CADP FX 10P E 120mA Personal computer F2 232CAB 1 FX 232AW C FX 422CABO or 220mA For 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 OmA FX 50DU TK S E CADP F940GOT SWD LWD E E _ _ E _ 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 1M F9GT HCNB F9GT OmA HCAB 3M 10M GOT A900 Connecting direct _ _ CPU port type F9GT CABO 150 10M OmA 1 When using other products or cables please check the product manual for required 5V DC supply Note These products cannot be connected via FX 2PIF to port of FXin 422 BD or FX2N 422 BD If connecting power supply circuit in PLC will go down 11 FX communication Optional programming port 11 11 2 FX2n 232 BD FX1n 232 BD FXon 232ADP and FX2uc 232ADP When an FX2N 232 BD an FXon 232ADP or an FX2nc 232ADP is installed on the FX2n 2 Series or when an FX1N 232 BD is installed on FX1N or FX1s Series a personal computer in which the following software is supported can be connected to each port However the FX2n 232 BD consumes 5V DC 20 mA from t
147. or code OOH is received Refer to error code list in chapter 12 Received character is abnormal 0 th character Check for faulty writing observing writing cautions 4 MITSUBISHI 7 20 FX communication Commands 8 8 Commands This chapter describes the structure and gives examples for each command of the dedicated protocol 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 86 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 name code is read 8 8 GW Global signal is turned on off on all linked programmable controllers 8 9 On demand function Send request is issued from the Programmable controller 8 10 There is no command TT Characters received from the compute
148. ount lt BFM 2 gt 8 bytes 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 Status lt BFM 28 gt b0 M10 Send completion b1 M11 Receive completion b2 M12 Receive time out b3 M13 Error occurrence b4 M14 Receive suspended b5 gt M15 Undefined b6 M16 Being sent b7 M17 Being received Send byte count lt BFM 1000 gt 9bytes Send buffers lt BFMs 1001 gt 9 byte send data 123456789 is prepared in the ASCII code in accordance with the send byte count specified above b8 M18 RS RTS b9 M19 ER DTR b10 M20 Undefined b11 M21 Undefined b12 M22 DR DSR b13 M23 CD DCD b14 M24 CS CTS b15 M25 CI RI Upper byte Lower byte 1 byte BFM 1001 1 31 H 2 byte BFM 1002 2 32 H 3 byte BFM 1003 3 33 H 4 byte BFM 1004 4 34 H 5 byte BFM 1005 5 35 6 byte BFM 1006 6 36 H 7 byte BFM 1007 7 37 H 8 byte BFM 1008 8 38 H 9 byte BFM 1009 9 39 H h Receive buffers MITSUBISHI 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 10 24 FX communication 3 Example program
149. r 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 1 lt max device No The station number PC PLC 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 FF WW 0 M0640 22347 AB96 05 Q Computer BOH 46H 46H 57H 57H 30H IDH 30H 36H 34H BOH 32H 92H 33H 34H 37H 41H 42H 39H 22 BOH 35H The sum check is calculated 7 al over this range K BOH 30H 46H 46H 0010 0011 0100 01101 101 0 1011 1001 0110 0 MMMMMMM MMMM 666 6666666 6666 555 4444776 5555 543 321010989 9876 Notes e Command WW uses word units When writing 32 points the number of devices is specified by 02 16 points bits per one word unit 4 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 N00 0 D0000 021234 ACD7 F9 Q Computer 30H 46H 67H 57H BOH 44H
150. r are directly returned to the computer 8 11 4 MITSUBISHI 8 1 FX communication Commands 8 8 1 Batch Read of Bit Device BR command 1 Command specification Protocol format 1 is shown Batch read command bits Character area A T T T T T T T T T Head device Number of 8 9 unu indi m 50 ke devices 23 indicates OFF gt 29 z O 2 1 31H indicates ON 0 o 3 z 2 38 characters 2 characters gt sS z Computer 9 hexadecimal gt f 1 T T T Programmable 9 9 Dato 82 controller Specifies the range of a 9 5 53 devices to be read x gt amp devices X 8 gt lt Y Character area B Notes Specify the range and number of devices so as to satisfy the following conditions 1 lt number of devices 256 54 for FXoN 256 points are specified by OOH Head device No number of devices 1 lt max device No The station number PC PLC 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 05 LL MX000940 05147 The sum check is calculated 05 over this ra
151. s 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 eharacteis computer Computer except high speed 32 bit counters C200 to C255 s 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 characters Device 1 character 2 characters with timer and counter device number 4 characters 2 characters with timer and counter 5 characters 1 Bit devices Device specification characters Mise Decimal octal pevce FX n expression BR WR FXis FX FX2c FX1N BW WW FX2Nc BT WT Inputs X X0000 X0000 X0000 X0000 X0000 X0177 X0017 X0337 X0177 X0267 Octal Y0000 0000 YOOOO 0000 YOOOO Putpuis Y 0177 voots YO337 YO177 YO267 az M0000 o Auxiliary relays M M0000 MO51 1 M0000 M1535 M3071 States S S0000 S0127 S0000 S0999 Special auxiliary relays M M8000 M8254 M8000 M8255 Decimal Timer contacts TS000 TS063 TS000 TS255 CS000 CS031 x t tact Counter contacts C CS235 CS254 CS000
152. s 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 10ABp the header STX and the terminator ETX are sent b15 Send data buffer BFM 1001 bo S E 8MMM0 10 0 0 1 1 o 1 0 1 1 A B Converted into ASCII 02 H 41H 42 31H 30H code before send 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 ETX are received b15 b0 S E olololilolololo iloliloli 0 111 T T 4 81 90 1 0 A B Receive data buffer 02HM1H42H 31H 30H03H 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 rece
153. s OFF time is not required in the FX2n FX2Nc whose version is V 2 00 or higher because full duplex communication is enabled While an RS instruction is driven modification to D8120 is not accepted Turn OFF the RS instruction then modify the setting 4 MITSUBISHI 9 3 FX 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 FXis FXin 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 e When the receive completion flag M8123 is turned ON transfer the receive data to another save destination then reset M8123 When M8123 is reset the programmable controller is set to the receive wait status again
154. scan time Transmission starts more than 100 ms later 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 message Note The sum of the decimal ASCII character codes converted to hexadecimal will give the same result Special data 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 e When b1320 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 PLC number FF command BR device memory batch read message wait time 30 ms and data ABCD in format 1 the sum check code is calculated as follows E Station N No Q PLC No 0 F Computer 05H30H30H46H46H Command B R 42H 52H Message Character area Sum wait time check 3 JA 0 8 D 33H 1H42H
155. sing the FX 485PC IF 5 n the case of FX2nc 485ADP 4 MITSUBISHI 37 FX communication Wiring 3 3 3 4 Two pair Wiring FX2NC 485ADP A series programmable RS 422 RS 485 unit 4 FX1N 485 BD FX2N 485 BD FX 0N j C485ADP controller s computer link unit Station Station Station R 1 SDA No 0 No 1 15 R 1 3 5 SDA SDA SDA SDB SDB SDB Ja RDA RDA RDB RDB RDB SG SG 3 FG Class D grounding Note 1 Ris a terminating resistor 330Q 2 Make sure to connect the shield of the appropriate cable with the FX2N 485 BD FX1N 485 BD or FX2nc 485ADP to ground that has a resistance of 1000 or less Class D grounding 9 Make sure to connect the terminal FG to the ground terminal of a programmable controller grounded with resistance of 1009 or less Class D grounding However for a computer link unit of the A series programmable controller see the manual of the computer link unit 4 When using an RS 232C 485 converter use the FX 485PC IF 5 n the case of FX2nc 485ADP 4 MITSUBISHI 3 8 FX communication Wiring 3 3 4 Parallel Link 3 4 1 FX2n iN 485 BD and FXon 485ADP 1 One pair Wiring FX2N 485 BD FX1N 485 BD FXON 485ADP SDA f SDA SDB SDB Terminating ApS Terminating resistor W registor 1100 806 DE 1100 LINK
156. st k 2 OS operating system is the software for operating or using effectively the resources such as 8 Response Device memory information Write Programmable controller CPU information Write 485PC IF RS 485 3 Computer RS 232C 485PC IF RS 485 485ADP Programmable controller 2 Command 4 9 Variousdata 1 _____ QU OS Program 5 12 Response 043 Jo lt 14 2 Device memory information Read Signal paal 5 Read 1 Programmable controller CPU 9 memory etc interface The computer sends data to programmable controller 7 the CPU memory terminal file and network MITSUBISHI 485ADP Programmable controller OS Program 5 Write Device imemory etc 7 1 FX communication Computer link 7 3 Programmable controller sends data to the computer Computer RS 232C 485PC IF RS 485 485ADP Programmable controller 4 6 Data 5 Data _ _ _____ Program On demand data request data write Device i memory etc OS operating system is the software for operating or using effectively the resources such as the CPU memory terminal file and network
157. t 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 Send data SD TXD Remaining number of send data D8122 sl z 9 lalo SIo S S C CC CL 4 3 2 1 0 2 Receive data and number of receive data Receive data RD RXD Number of receive data D8123 MITSUBISHI o0 o 0 o 9 o S sess ss 8515 91581 LO tO tO CL 6 The number of 5 receive data is also 3 4 reset when the 2 receive completion 0 1 flag M8123 reset Terminator 9 14 FX communication RS instruction 9 9 4 Example Program 9 4 1 Personal Computer When a programmable controller is connected to a personal computer and data send receive is performed by the programmable controller 1 System configuration Receive lt Send FXen 232 BD F Xeon Use a communication cable suitable to the arrangement of connector pins of the personal computer used For the representative wiring refer to chapter 2 2 Communication format If the communication format of the commercial communication software used cannot realize the following
158. tance of 100Q or less Class D grounding If the programmable controller is not equipped with a ground terminal connect the terminal FG directly to a ground with the resistance of 100Q or less Class D grounding 2 Two pair Wiring FXoN 485ADP FXoN 485ADP Terminating SDA SDA Terminating resistor resistor 3300 SDB SDB 3300 Terminating RDA RDA ee resistor 3300 Ji RDB 3300 LINK LINK sa t F SG FG FG 1 Note 1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 100Q or less Class D grounding If the programmable controller is not equipped with a ground terminal connect the terminal FG directly to a ground with the resistance of 1000 or less Class D grounding MITSUBISHI 3 10 FX communication Wiring 3 3 4 3 FX2n iN 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 Terminating RDA RDA Terminating resistor resistor 1100 RDB RDB 1100 SG SG Class D grounding 2 Two pair Wiring FX2N 485 BD FX2N 485 BD FX1N 485 BD FX1N 485 BD Terminating SDA resistor 3300 SDB Terminating RRA resistor 3300 RDB SG MITSUBISHI SDA Terminating resistor SDB 3300 RDA Terminating resistor R
159. tation 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 D11 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 4 7 FX communication 4 3 8 Example of Setting Program N N network 4 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 x Comms time out 50 ms default Station No setting 0 M6038 FNC 12 08176 Required for master MOV station Set range 0 to 7 Total number of slave FNC 12 k 2 pg177 stations 2 MOV Setting range 1 to 7 Refresh range setting S US K 1 D8178 Pattern 1 Set range 1 to 2 Not required for seas Ret slave station etry count setting MOV 08179 3 3times FNC 12 Comms time out setting MOV 5 08180 5 50ms 4 3 4 Example of Error Program M8183 Master communication error M8184 Slave 1 communication error M8185 Sl
160. tation is turned off and the global function operation is cleared Notes The station number PC PLC 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 PLC station and Xn2 in an A series programmable controller station 1 Control specification Protocol format 1 is shown Global function command Character area A Y gt T T MI 6 gt C 55 Control flag 25 2 O 5 Z SB characters gt 2 28 8 Programmable gt 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 The sum check is calculated over this range my E NIFF GW 01111 7 Q Computer p5H 46H 57H 61H 7H Prpgrammable controller Indicates that the global operation flag is tumed ON FF is specified to indicate all stations For a specific station specify the station number between 00 to OF 00 to 1F for A series 4 MITSUBISHI m 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
161. the receive buffer are provided MITSUBISHI 10 1 10 FX communication 10 2 Allocation of Buffer Memories BFM s 2 232 10 The RS 232C interface block FX2n 232IF 232IF transmits data with the programmable controller via buffer memories BFMs 16 bit RAM memories in the 232IF FNC78 FROM and FNC79 TO instructions are used to read and write the buffer memories 10 2 1 BFM List 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 TUE 1 to 32 767 X10 ms 3 Receive time out time 0 eliminates time out time 0 4 Send header lower 2 bytes 0 no header 5 Send header upper 2 bytes 4 bytes max zero suppression 0 0 no 6 Send terminator lower 2 bytes 7 Send terminator upper 2 bytes 4 bytes max zero suppression ee W 8 Receive header lower 2 bytes 0 no header 9 Receive header upper 2 bytes max zer Suppression 0 id Receive terminator lower 2 10 bytes 9 100 11 Receive terminator upper 2 4 bytes max zero suppression een W bytes Receive suspension waiting ale time in interlink connection 9 Ww 0 to 512 when data length is 16 13 Number of remaining send bits 0 R
162. tion etc regarding the FX Series programmable controller FX2c Supplementary Manual JY992D50201 This manual contains supplementary data regarding the FX Series programmable controller Hardware Manual FXin Hardware Manual JY992D88201 This manual contains written hardware explanation of wiring installation and specification etc regarding the FXin Series programmable controller FXe2n Hardware Manual JY992D66301 This manual contains written hardware explanation of wiring installation and specification etc regarding the FXeN Series programmable controller FX2Nc Hardware Manual JY992D76401 This manual contains written hardware explanation of wiring installation and specification etc regarding the FX2Nc Series programmable controller FX Programming Manual JY992D48301 This manual contains written instructions regarding the FXo FXos FX FX2c FX2n and FXanc Series programmable controllers FX Programming Manual II JY992D88101 This manual contains written instructions regarding the FX1s FXin FXaN and 2 Series programmable controllers FX FXon 485ADP Users Guide JY992D53201 This manual contains written hardware explanation of installation and specification regarding the FX 485ADP and FXon 485ADP FX2Nc 485ADP Installation Manual JY997D01201 This manual contains written hardware explanation of installation and specification regarding the
163. to 2256 E Receive buffers 6 858568 ER E 2 d Km Es ca BFM 2 BEMH2R bt Receive completion BFM 1 b2 M2 Receive completion reset command 4 MITSUBISHI 10 26 FX communication Optional programming port 11 11 11 1 4 MITSUBISHI 11 1 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 FX2Nc 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 FX2n 422 BD FX1N 422 BD When an FX2N 422 BD is installed on the FX N Series or when an FX1N 422 BD is installed on FX1in 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 equipment does not exceed the capacity of the 5V DC power of the FX2N FX1N or FXt1s Product Connecting cable Required 5V DC FX 20P E 180mA FX 20P CABO
164. tsubishi has a world wide reputation for its efforts in continually developing and pushing back the frontiers 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 process 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 Your NaMe ee iecit eR RR RR E Rare rig Mits biShi Electrigzz eL d b exea e an Reno America 01 847 478 2253 Your company Australia 02 638 7072 0 21 02 4 86 1 12 Your locations Spain 34 93 589 1579 United Kingdom 01707 278 695 Please tick the box of your choice What condition did the manual arrive in LlGood Minor damage LlUnusable Will you be using a folder to store the manual L1Yes LINo What do you think to the manual presentation ITidy LlUnfriendly 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 LlYes LINo 195 WICH See CIE t L sa unu u a ba What do you think to the manual layout LiINottoo bad L
165. unication of the computer link using a computer programmable controller 485PC IF and 485ADP not used outside Japan Pleas see loopback test command see section 8 11 1 Setting of transmission specification Item Description Communication method Half duplex communication method Synchronizing Start stop synchronization format method method Baud rate 9600 bps g Start bit 1 bit amp Datalength 7 bit Parity bit Personal 8 Stop bit 1 bit dd Sum check Sum check is used Station No Station No 0 Exclusive protocol Formati 4 8 FX series i x programmable D controller P According to the above transmission specification the transmission specification and transmission procedure of the programmable controller are set as follows D8120 H6080 D8121 H0000 D8129 K0 2 Program example 10 20 30 40 TO 3000 NACNT 7 ERFLG 0 STCNT 14 For setting and details see chapter 6 and section 7 4 Reception wait counter adjusted depending on computer speed Normal data length Data length of error code NAK statement ENQ 5 STX CHR 2 CHR 3 CHR amp H15 90 DATASEND 100 CLOSE 1 110 1 1 120 SENDDATA OOFFTT204ABCD34 Transmission data 130 PRINT 1 ENQ SENDDATA 14
166. uter link Calculations to determine the approximate time until communication is complete 1 Programmable controller Computer Communication time Total number of characters based on dedicated protocol x Time to send or receive one character ms Programmable controllers 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 Note 1 Please count the number of characters with reference section 7 4 1 and 7 4 2 and chapter 8 2 Please refer to the following expression for time calculation 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 O 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 the 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

Download Pdf Manuals

image

Related Search

Related Contents

Courses de Côtes & Sprints  取扱説明書    LES CONTRATS À TERME : MODE D`EMPLOI  81-0357-01  東芝反射笠用カバラ ・ ガー ドの取扱説明書  Crear un archivo de etiquetas  CHAPTER 1  MotorCycle Alarm by    

Copyright © All rights reserved.
Failed to retrieve file