Home

1 - LC Automation

image

Contents

1. dd ir M main unit and then attach the 1640 5 communication adapter to the left RS 232C 15 rH side of the main unit 49 2 Communication Expansion FX3UC 32MT LT 2 adapter board Communication FX3UC Series RS 485 500 m adapter D DS DSS Attach the communication adapter 1640 5 to the left side of the main unit RS 232C 15m 49 2 4 Communication FX3GC Series adapter ik For combinations of communication equipment for each FX Series refer to the next page 19 A 9ult nQ ep UO D Q O A o 5 o uelis S uoneunBiuo buum dnjes uoneounuuo5 Qf o smes wwo pue seoi e peje es pJepuelg snaaow Wl spueuJlulo5 jasen OO uoneoyioads uoneoyioads 9 e S Lo h suJeJ60Jd unea F X3G F X3u F X3cc FX3uc Series Programmable Controllers 3 System Configuration User s Manual MODBUS Serial Communication Edition 3 2 Applicable FX PLC and Communication Equipment 3 2 Applicable FX PLC and Communication Equipment 20 Select the most suitable combination of optional communication equipment from the table below and put a check mark in the Check column of the corresponding equipment For communication in accordance with RS 232C FX Series Communication equipment option D id Check mE 15
2. 2 Response message format Slave Master When completed normally uoneunBiuo waisks QJ suoneoyioeds N Function code Dat Function Number of Device data code read bytes 02H buum dnjeg uoneounuuo5 Ol Device data 1 to n b7 b6 b5 b4 b3 b2 Device data 1 Bit device storage order G6 oD 32 0 Device data n 380 17 Q U w 9 D cao 62 The read input statuses are stored in order from low order to high order bits When the number of read points is not a multiple of 8 the excess bits turn to O pyepuels Shadow spueuJlulo5 When completed with an error Function code Data Function Exception code code 1 82H jaisejy OO uoneoyioads 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents uoneoyioeds 9Ae S Lo h suJeJ60Jgd unea 59 F X3c FX3u F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 7 MODBUS Standard Commands 7 6 Read Holding Registers Command Code 0x03 7 6 Read Holding Registers Command Code 0x03 Reads the values of one or more holding registers 1 Request message format Master Slave Function code Function code 03H Head holding register number
3. 1000 ms 1ms 5 2ms 19200bps T15 5ms T11 5 2ms 5ms 5ms 15 2ms T12 x 1ms 25 Bytes in Response 10bits T13 1000 ms 1ms 14 0ms 19200bps Ts 15 2ms 1ms 14 0ms 30 2ms 18 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 3 System Configuration User s Manual MODBUS Serial Communication Edition 3 1 System Configuration 3 System Configuration This section explains the configuration of communication equipment operating in accordance with RS 485 and RS 232C and the selection of equipment required by FX3G FX3U FX3GC F X3auc PLCs 3 1 System Configuration This section outlines the system configuration required to use MODBUS serial communication 4 E indicate the communication equipment combination patterns Communication equipment operating e SUE in accordance with MODBUS RS 485 FXPLC Important point in selection Cre elon or RS 232C distance aA j Attach the connector conversion RS 485 500 m i I adapter to the main unit and 1640 5 AT then attach the communication RS 232C 15m E adapter to the left side of the main 49 2 unit Communication Connector FAECES adapter conversion adapter Attach the expansion board to the RS 485 500 m
4. MODBUS Master RTU Mode m 2000 D8409 l Slave Response Timeout 2 seconds 2000ms OV K400 D8410 M Turn Around Delay 400 ms Message to Message Delay 10 ms Number of Retries 3 Retries b15 bO The Communication Status Information 0000 0000 0000 0001 Setup is set 0 0 O0 1 Store Counter to D Devices MOV Communication Status Device Range Setup Storage Head Device D100 1 Available only in FX3u and FX3uc PLCs Cautions on programming MODBUS communication parameters with structured ladder FBD When you program MODBUS communications parameters with structured ladder FBD the MOV commands must be connected using the ENO output and the EN input Program example MODBUS Serial Communication Setup M8411 MOV MOV MOV MOV EN ENO EN ENO EN ENO EN ENO H1097 s di D8400 H1 s di D8401 K2000 45S di D8409 K400 4s d D8410 MOV MOV MOV MOV EN ENO EN ENO EN ENO EN ENO K10 S di D8411 K3 4S d D8412 H1 4S d D8415 K100 15 d D8416 35 h 9ut nQo uoneunBiuo waisks QJ suoneoyioads N buum A Q o 3 3 c 2 z e 5 o smes wwo pue seoi e peje es piepuejs snaaow Wl spueululo5 jese y OO uoneayioads uoneoyioads 9Ae S Lo umo suJeJ60Jd unea F X3c FX3u F Xacc F Xauc Series Programmable Controllers 9 Communication Setup User s Manual MODBUS Serial Communication Edition 5 2 Example of communication setup Cautions on programmi
5. 381 0 26 615 401 Fax 381 0 26 615 401 SIMAP s r o J na Derku 1671 SK 911 01 Trenc n Phone 421 0 32 743 04 72 Fax 421 0 32 743 75 20 PROCONT spol s r o Presov K peln 1 A SK 080 01 Presov Phone 421 0 51 7580 611 Fax 421 0 51 7580 650 INEA RBT d o o Stegne 11 SI 1000 Ljubljana Phone 386 0 1 513 8116 Fax 386 0 1 513 8170 Beijer Electronics AB Box 426 SE 20124 Malm Phone 46 0 40 35 86 00 Fax 46 0 40 93 2301 Omni Ray AG Im Schorli 5 CH 8600 D bendorf Phone 41 0 44 802 28 80 Fax 41 0 44 802 28 28 GTS TURKEY Bayraktar Bulvari Nutuk Sok No 5 TR 34775 Yukar Dudullu Umraniye ISTANBUL Phone 90 0 216 526 39 90 Fax 90 0 216 526 3995 CSC Automation Ltd 4 B M Raskovoyi St UA 02660 Kiev Phone 380 0 44 494 33 55 Fax 380 0 44 494 33 66 Systemgroup 2 M Krivonosa St UA 03680 Kiev Phone 380 0 44 490 92 29 Fax 380 0 44 248 88 68 MALTA MOLDOVA NETHERLANDS NETHERLANDS NORWAY PORTUGAL ROMANIA SERBIA SLOVAKIA SLOVAKIA SLOVENIA SWEDEN SWITZERLAND UKRAINE UKRAINE TOO Kazpromavtomatika KAZAKHSTAN Ul Zhambyla 28 KAZ 100017 Karaganda Phone 7 7212 50 10 00 Fax 7 7212 50 1150 MIDDLE EAST REPRESENTATIVES I C SYSTEMS LTD EGYPT 23 Al Saad Al Alee St EG Sarayat Maadi Cairo Phone 20 0 2 235 98 548 Fax 20 0 2 235 96 625 GIRIT CELADON LTD 12 H aoma
6. Hardware with JY997D45201 product Hardware Manual Edition For detailed explanation refer to the FX3GC Series User s Manual Hardware Edition Additional FX3GC Series Details about the hardware including I O Manual User s Manual JY997D45401 specifications wiring installation and 09R533 Hardware Edition maintenance of the FX3GC PLC main unit BIFX3uCc PLC main unit I O specifications wiring and installation of the UNE PLC main unit FX3UC D DS DSS extracted PP FX3UC D DS DSS Series from the FX3UC Series User s Manual with JY997D28601 A ko diet Hardware Manual Hardware Edition For detailed explanation P refer to the FX3UC Series User s Manual Hardware Edition I O specifications wiring and installation of the PLC main unit FX3UC 32MT LT 2 extracted FX3UC 32MT LT 2 from the FX3UC Series User s Manual Supplied with JY997D31601 Hardware Manual Hardware Edition For detailed explanation refer to the FX3UC Series User s Manual Hardware Edition Additional FX3UC Series Details about the hardware including I O Manaa User s Manual JY997D28701 specifications wiring installation and 09R519 Hardware Edition maintenance of the FX3UC PLC main unit product F X3G F X3u F X3cc FX3uc Series Programmable Controllers Related manuals User s Manual MODBUS Serial Communication Edition Essential manual OManual required depending on application Manual with additional manual f
7. S3 22 and 81 B k Use 0 as the Slave Node Address for Broadcast commands S Slave Command Code Command Node Command Parameters input Address code normally ON ow OOl amp eoe a E e Command Parameters depending on the Command Code See Section 8 3 Command Code See Section 8 3 Slave Node Address OOH to 20H 0 to 32 uoneoyioads 9Ae S h suJeJ60Jgd unea 87 F X3G F X3u F Xacc F Xauc Series Programmable Controllers 8 Master Specification User s Manual MODBUS Serial Communication Edition 8 3 ADPRW Command Parameters 8 3 ADPRW Command Parameters The following table shows the required command parameters for each command code S3 Device Address Device Count Sub command Source Data Dei Sub command Code Data AND Mask Destination PLC Device OR Mask ode Applicable Devices D R indexing Ke H PLC Destination Device head address 4H MODBUS Address Applicable D ReMeY S evice Count 1 i Devices indexin PRO SELS 0000H FFFFH E Block Length S3 15 16 PLC Destination Device head address Read Discrete Device Count 1 2000 Devices indexing Inputs OOOOH FFFFH Block Length S3 15 16 PLC Destination Device head address me MODBUSIAIISSS Sovice Counti d25 Applicable 5 amp indexing eed Devices Register 0000H FFFFH Block Length PLC Destination Device head address 4H MODBUS Address Applicable Read Input Device Coun
8. 00004 to FFFFu H L 2 Response message format Slave Master When completed normally Function code Read points 00014 to 007Du H L Function Number of code read bytes 034 m nx2 Device data 1 Device data n Number of read bytes n x 2 gt When completed with an error Function code 1 For example if n 4 the number of bytes is calculated as 4 x 2 8 bytes Data Function code 83H Exception code 2 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 60 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 7 Read Input Registers Command Code 0x04 A 7 7 Read Input Registers Command Code 0x04 9ut nQ Reads the values of one or more input registers 1 Request message format Master Slave Function code Function Head input register number Read points code 00004 to FFFFu 00014 to 007Dx 044 H L 2 Response message format Slave Master When completed normally uoneunBiuo waisks QJ suoneoyioeds N Function code Function Number of 2E Device data code read bytes 1 a 041 m 2nx2 buum
9. Communication ADP 8 1 MODBUS Master Command List ewe Sica nts Command Name Details Code Code 0x07 Read Exception Status Read 1 byte of vendor specified data Return Query Data Loop back function Restart communication Remote Communication Reset 0x01 Read binary R W devices 0x02 Read binary RO devices 0x03 Read 16 bit R W register 0x04 Read 16 bit RO register 0x05 Write single binary device 0x06 Write single 16 bit register device Se 0x01 Restart Communication Option Read 16 bit register of vendor specified data Change ASCII mode End of Message character Switch slave to Listen Only Mode Ox0A Clear all counters and the diagnostic registers duos Read number of detected messages Diagnosis Sa EBSSSON AON tor Read number of detected comm errors Read number of detected exception OxOD Return Bus Exception Error Count God Read number of received requests Read No Response counter of the slave Read NAK counter of the slave Return Slave Busy Count Read Busy counter of the slave 0x12 Return Bus Character Overrun Read Bus Character Overrun counter of the Count slave OxOB Get Comm Event Counter Read comm event counter oxoc Get Comm Event Log Read comm event log OxOF Write Multiple Coils Write multiple binary R W devices 0x10 Write Multiple Registers Write multiple 16 bit R W registers 0x11 Report Slave ID Read Slave ID code data Manipulate slave register with AND Mask OR M
10. D8401 Channel 1 MODBUS Protocol Channel 1 MODBUS ud Slave Response Timeout Channel 1 MODBUS oni Turn Around Delay D8411 Channel 1 MODBUS Message to Message Delay t For Descriptions refer to Chapter 6 D8412 Channel 1 MODBUS Number of Retries Channel 1 MODBUS De Slave Node Address Channel 1 MODBUS D8415 Communication Status Information Setup Channel 1 MODBUS D8416 Communication Status Device Range Setup F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 12 Troubleshooting 12 5 Checking Setting Contents and Errors aW Device D8420 D8421 D8429 D8430 D8431 D8432 D8434 D8435 D8436 ITI Pe Co 3 D wn Channel 2 MODBUS Communication Format Channel 2 MODBUS Protocol Channel 2 MODBUS Slave Response Timeout Channel 2 MODBUS Turn Around Delay Channel 2 MODBUS Message to Message Delay Channel 2 MODBUS Number of Retries Channel 2 MODBUS Slave Node Address Channel 2 MODBUS Communication Status Information Setup Channel 2 MODBUS Communication Status Device Range Setup Available only in FX3U and FX3uc PLCs Description For Descriptions refer to Chapter 6 If the correct contents are not stored in the above devices check the sequence program 2 Checking for setting errors 1 Error flags If the parameter settings include an error the serial communication error flag and the MODB
11. D8435 and D8416 D8436 PLC destination devices are latched therefore the Master s devices will be cleared at power ON and when the PLC is switched from STOP to RUN For Slave devices the event and error counters will be cleared when the communication is reset a counter reset command is received at power ON and when the PLC is switched from STOP to RUN The following table shows the communication status of the event and error counters and the communication event log data for the following scenario D8415 11H i e store event counter and event log into D devices D8416 100 i e head device is set to D100 Device Desorption Vali Deals CRT Number of messages that a remote node has uoneunBiuo waisks QJ suoneoyioeds N Head Device Bus Message Master detected on the bus k D100 Counter Slave Note Messages with false CRC LRC are not taken into account 4 This counter is incremented if one of the following errors occur Head Device 1 Bus Communication Master e CRC LRC mismatch R a D101 Error Counter Slave Bit level error overrun parity error Received telegram length is lt 3 characters RTU or lt 8 characters ASCII Master Number of received exception error responses Head Device 2 Exception Error Master D102 Counter Slave WM D e c O O fe 3 3 c 5 z e 3 Slave Number of exception conditions detected by R the remote node including excepti
12. F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 7 11 6 Clear counters and diagnostic register sub command code 0x0A Clears counters e g message count The following counters will be cleared Refer to Chapter 6 Bus message count Bus communication error count Exception error count Slave message count Slave no response count Slave NAK count Slave busy count Character overrun error count Communications event count Refer to Section 7 12 The FX3U FX3UC bit devices displayed in the diagnostic register are not reset so the diagnostic register will be overwritten in the next scan by the actual state of the error flags The error flags can be reset by PLC program or monitoring device 1 2 70 Request message format Master Slave Function code Sub function code Function Sub function code code 000An 08u Response message format Slave Master When completed normally The slave returns the request message received from the master without change When completed with an error Function code Data Function Exception code code 88H 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed con
13. L TI Number of read bytes n x 2 gt 1 For example if n 4 the number of bytes is calculated as 4 x 2 8 bytes dnjeg uoneounuuo5 Ol When completed with an error Function code Data Function Exception poyejay code code 2 84H pue seoi e Q O 3 3 Co o 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents pyepuels Shadow spueululo5 jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 61 F X3c FX3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 8 Write Single Coil Command Code 0x05 7 8 Write Single Coil Command Code 0x05 Writes a value ON OFF to one coil 1 Request message format Master Slave Function code Function code 054 Coil number 00004 to FFFFu H L 2 Response message format Slave Master When completed normally ON OFF specification 0000u OFF FFOOH ON H L The slave returns the request message received from the master without change When completed with an error Function code Data Function code 85u Exception code 1 Exception and error codes are stored in spec
14. LF moles OD OAH n 0 to 252 Error check calculation range Note The Longitudinal Redundancy Checking LRC field is one byte containing an 8 bit binary value The LRC value is calculated by the transmitting device which appends the LRC to the message The device that receives recalculates an LRC during receipt of the message and compares the calculated value to the actual value it received in the LRC field If the two values are not equal an error results A procedure for generating an LRC is 1 Add all bytes in the message excluding the starting colon and ending CRLF Add them into an 8 bit field so that carries will be discarded 2 Subtract the final field value from FF hex all 1 s to produce the ones complement 3 Add 1 to produce the twos complement 4 Fora transmit frame the LRC is calculated before converting to ASCII F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 2 Frame Specifications A The following are calculation examples in the case where function code 01H is sent to station No 2 9ut nQ The following table illustrates the LRC calculation procedure when sending a request message LRC in request message transmission Station No address field 02 0000 0010 Function code 01 0000 0001 Head coil number H 00 0000 0000 Head coil number L 00 0000 0000 Read po
15. product i For computer link or non protocol communication by RS instructions refer also to the FX Series User s Manual Data Communication Edition Handling procedures of the RS 485 communication special adapter For MODBUS serial communication network Supplied refer also to the FX3G FX3U F X3GC F X3UC FX3U 485ADP MB Series User s Manual MODBUS Serial A with JY997D26301 GM ds product Installation Manual Communication Edition For N N link parallel link computer link or non protocol communication by RS instructions refer also to the FX Series User s Manual Data Communication Edition FX3G FX3U FX3GC FX3UC Series User s Manual uS Additional Explains the MODBUS serial communication SP anual OSS Sena JY997D26201 work in FX3G EX3U EX3GC FEX3UC PLCs pee Communication Edition this manual Manual for N N link parallel link computer link and non protocol communication by RS instructions FX2N 2321F Details about simple N N link parallel link Additional FA Series Users Manual computer link and non protocol O Data Communication JY997D16901 p Ab Cabs 09R715 Manual a communication RS instruction and FX2N Edition 2321F F X3c F Xau F X3cc FX3uc Series Programmable Controllers Generic Names and Abbreviations Used in Manuals User s Manual MODBUS Serial Communication Edition Generic Names and Abbreviations Used in Manuals Abbreviation generic name Name Programmable controllers FX3G
16. waisks QJ suoneoyioeds N The format of the device allocation data set is as follows MSB D8470 Heb D8471 Suum Device allocation Device code PLC head device address data 4bit 16bit Where MSB Most Significant Bit LSB Least Significant Bit Device code defines which FX3U FX3UC device type shall be mapped into coils or Holding Register Abit dnjeg uoneounuuo5 Ol OH M special M mapped into Coils 1H S mapped into Coils 2H TS mapped into Coils 3H CS mapped into Coils Se 4H Y mapped into Coils 3 El 5H X mapped into Coils D o 6H M special M mapped into Holding Registers a 7H S mapped into Holding Registers 8H TS mapped into Holding Registers T 9H CS mapped into Holding Registers oe AH Y mapped into Holding Registers 329 BH X mapped into Holding Registers S AS CH D special D mapped into Holding Registers DH R mapped into Holding Registers EH TN mapped into Holding Registers FH CN mapped into Holding Registers jese y OO Ww UO D oO o e o uoneoyioads h suJeJ60Jd unea 97 F X3G F X3u F Xaec F Xauc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 4 User defined MODBUS Device Address Assignment 98 Size 12bit 1 to 2048 blocks The size of 1 block is defined for the PLC devices as follows Bit device D is OH
17. 1 1 Read Data S3 1 Applicable D R indexing Devices Write Count CS3 Block Length Read Count S3 1 dnjeg uoneounuuo5 Ol 91 A 9ut nQ uoneunBiuo waisks QJ suoneoyioads N buum smes wwo pue seoi e peje es sngaon Wl spueuJlulo5 pyepuejs mi D 2 O qp zh O fed a o ES h suJeJ60Jd unea F Xac F X3u F Xacc F Xauc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 1 MODBUS Slave Command Code List 9 Slave Specification This chapter explains the configuration of the slave for MODBUS Serial Communication 9 1 MODBUS Slave Command Code List 0x01 Read binary R W devices 0x02 Read binary RO devices 0x03 Read 16 bit R W register 0x04 Read 16 bit RO register 0x05 Write single binary device 0x06 Write single 16 bit register device Read 1 byte of vendor specified data CH1 M8060 M8067 CH2 M8060 M8062 M8438 M8064 M8067 Return Query Data Loop back function Restart communication Restart Communication Clear all counters 0x01 Option Recover from listen only mode Reset event log if requested Read 16 bit register of vendor specified data CH1 M8060 M8067 0x02 Return Diagnostic Register CH2 M8060 M8062 M8438 M8064 M8067 Note High byte is unused Change ASCII Input Change ASCII mode End of Message 0x03 oy character After response is mode slave wi
18. 12 slave s wee Return Slave Busy perth ke x Subsection E Count 7 11 13 slave Sn celia Subsection 5 0x12 Character Overrun x Overrun counter 7 11 14 Count nO of the slave 2g o3 Get Communication ed OxOB communication x Section 7 12 D Event Counter o event counter _ _ Read 0x0C 1 oot CODIIDUNICSHOU communication x Section 7 13 6 Event Log oom event log ogo 0 Write multiple i i A958 398 OxOF Write Multiple Coils binary R W um v Section 7 14 S devices P o Write Multiple Write multiple 16 1 to 123 a Read Slave ID l Os 1 990 Mm Manipulate slave ato 0x16 Mask Write Register register with AND 1 point Section 7 17 Mask OR Mask Read 1 to 8 Read Write Multiple e 2d Write 125 points 0x17 P S multiple 16 bit EI x Section 7 18 85 Registers R W registers Write 1 to o 5 g 121 points S 1 Available only in FX3u and FX3uc PLCs uoneoyioeds 9Ae S Lo h suJeJ60Jgd unea 49 F X3G F X3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 1 MODBUS Standard Commands Support List e FX3G FX3U FX3GC FX3UC command code correspondence table Command Subcommand Command Name FX3G FX3Gc FX3u FX3uc Reference Code Code 0x01 Read Read Coils Dow ow Section 7 4 0x02 Read Discrete Inputs eenn 2p Section 7 5 0x03 Read Holding Registers a Section 7 6 0x04 Read Input Registers v v Section 7
19. 158 00 Praha 5 Phone 420 251 551 470 Fax 420 251 551 471 MITSUBISHI ELECTRIC EUROPE B V French Branch 25 Boulevard des Bouvets F 92741 Nanterre Cedex Phone 4 33 0 1 55 68 55 68 Fax 33 0 1 55 68 57 57 MITSUBISHI ELECTRIC EUROPE B V Irish Branch Westgate Business Park Ballymount IRL Dublin 24 Phone 353 0 1 4198800 Fax 353 0 1 4198890 MITSUBISHI ELECTRIC EUROPE B V Italian Branch Viale Colleoni 7 I 20041 Agrate Brianza MB Phone 39 039 60 53 1 Fax 39 039 60 53 312 MITSUBISHI ELECTRIC EUROPE B V Poland Branch Krakowska 50 PL 32 083 Balice Phone 48 0 12 630 47 00 Fax 48 0 12 630 47 01 MITSUBISHI ELECTRIC EUROPE B V 52 bld 3 Kosmodamianskaya nab 8 floor RU 115054 Moscow Phone 7 495 721 2070 Fax 7 495 721 2071 MITSUBISHI ELECTRIC EUROPE B V Spanish Branch Carretera de Rubi 76 80 E 08190 Sant Cugat del Vall s Barcelona Phone 902 131121 34 935653131 Fax 34 935891579 MITSUBISHI ELECTRIC EUROPE B V UK UK Branch Travellers Lane UK Hatfield Herts AL10 8XB Phone 44 0 1707 27 61 00 Fax 44 0 1707 27 86 95 MITSUBISHI ELECTRIC CORPORATION Office Tower 7 14 F 8 12 1 chome Harumi Chuo Ku Tokyo 104 6212 Phone 81 3 622 160 60 Fax 81 3 622 160 75 MITSUBISHI ELECTRIC AUTOMATION Inc 500 Corporate Woods Parkway Vernon Hills IL 60061 Phone 1 847 478 21 00 Fax 1 847 478 22 53 EUROPE FRANCE IRELAND ITALY
20. 3989 Qo e a EE a o jese y OO op UO D Q O i o 25 uoneoyioeds S suJeJ60Jd unea 95 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 4 User defined MODBUS Device Address Assignment 9 4 User defined MODBUS Device Address Assignment MODBUS Device Address Assignment is available only in FX3U and FX3uc PLCs Up to eight PLC device ranges can be mapped to the MODBUS Device Address range in a user defined order The procedure for creating user defined mapping can be seen in the program example below When user defined mapping is set up by special data registers D8470 to D8485 in the MODBUS Configuration Program the default MODBUS device assignment becomes invalid and mapping according to the user s program occurs Note When changing the MODBUS configuration the user must reset the power in order that new parameters are recognised Program for Setting up MODBUS Slave MODBUS Serial Communication Setup D8400 For more details on the Communication Setup M8411 p Parameters refer to Section 5 2 of this manual E MOV D8401 E MOV D8414 MOV D8415 raraj M Program for User Defined MODBUS Device Assignment on rt MR MOV D8471 Haad Device Aut D Monsig X0 X37 ov D8472 viene ovid yr e ERN D8473 Head Device peels 196 Mapping M128 M191 MODBUS Device Mapping 3 MOV H8008 D8474 TS mapped
21. 6 for storage location confirmation methods and other detailed S 38 contents S jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 7T F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 7 11 14 Return bus character overrun count sub command code 0x12 78 Reads out the number of times the request message size exceeds the upper limit to the master 1 Request message format Master gt Slave Function code Sub function code Function Sub function code code 0012 084 2 Response message format Slave Master When completed normally Function code Sub function code Data Function Sub function code Bus character overrun code 0012u count value 08u 0000H to FFFFu H b 1 Refer to Chapter 6 for the relevant counts count clear methods and precautions When completed with an error Function code Data Function Exception code code 88x 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents Note Refer to Subsection 7 2 1 for details on the size of request messages F X3G F X3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Stan
22. 7 0x05 Write Single Coil Section 7 8 0x06 Write Single Register o v v Section 7 9 0x07 Read Exception Status a Section 7 10 0x00 Return Query Data Subsection 7 11 1 e Subsection 0x01 Restart Communication Option x v 2 Return Diagnostic Register Eco td Subsection 0x03 Change ASCII Input Delimiter x v 2A Clear Counters and Diagnostic Register uc Subsection OxOB Return Bus Message Count x v 0x08 7 11 7 Diagnosis i Return Bus Communication Error Count Bera Subsection OxOD Return Bus Exception Error Count x v we OxOE Return Slave Message Count subsection 7 11 10 Subsection OxOF Return Slave No Response Count app 0x10 Return Slave NAK Count x v subsection 7 11 12 0x11 Return Slave Busy Count x v subsection 7 11 13 Subsection 0x12 Return Bus Character Overrun Count dd OxOB Get Communication Event Counter OoOo x v v Section 7 12 Ox0C Get Communication Event Log Section 7 13 OxOF Write BUDE Coils 0v Section 7 14 A NY SN XA SN QT NY NS x S x x n 0x11 Report Slave ID v Section 7 16 0x16 Mask Write Regter v Section 7 17 e FX3G FX3U FX3GC FX3uUC frame mode correspondence table FX3G FX3Gc FX3U FX3uc Frame mode RTU ASCII 50 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 2 Frame Specifications A 7 2 Frame Specifications euino The following show
23. 7 CN mapped into H register Block Size 8 MODBUS Device Mapping 7 Head device address 200 Mapping CN200 CN207 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 4 User defined MODBUS Device Address Assignment The following tables provide the values for MODBUS address allocation for Bit devices and word devices for O the example stated above Bit device Coils Read Write FX3u FX3uc Device 0x0000 0x001F XO X37 2 0x0020 0x005F M128 M191 El Oo F Word device Holding Register Read Write FX3u FX3uc Device Ox0000 0x0007 TS0 TS127 3 0x0008 0x0009 CS128 CS159 GL 0x000A 0x00D9 D1000 D1207 as D OxOODA 0x01D9 RO R255 9 0x01DA 0x01E9 CN200 CN207 1 CN200 CN207 are 32bit counters 4 The following table provides an example of an invalid user defined device allocation a Device Allocation Device Code BOCK size i Sumber Boo neag Device PLC Mapping of Devices Address Data set 5 1 D8470 4bit oH X D8470 12bit 2 D8471 M 4bit X xd X0 X37 eg 2 D8472 4bit OH M D8472 12bit 4 D8473 128 ed z ve d uL 4M128 M191 3 3 D8474 4bit 8H TS D8474 12bit D8475 Ros dud 4bit TS 12bit TSO0 TS127 6 NOT MAPPED O98 CS240 CS271 358 exceeds the valid no 4 D8476 4bit 9H CS 20 D8476 12bit 20 D8477 2400 rangeforCS Emorhas PiS Occurred so the assignment is stopped T 5 D8478 4bit C
24. Bed a lwemesesweemed ell 2ec J a ohinieseueen Eocene Eee Re ee Bate duimeseeses ed t L Control number t Control number Month Example Dec Month Example Jan 1 to 9 January to September 1 to 9 January to September X October Y November Z December X October Y November Z December Year Example 2009 Last digit of year Year Example 2010 Last two digit of year 11 wm O D O O e o 2 o co ec 50 ct mer c3 E o o 5 Suum dnjeg uoneounuuo5 Qf o smes wwo pue seoi e peje es spueululo5 piepuejs snaaow wl jesey OO uoneoyioads uoneoyioads 9Ae S e h suJeJ60Jd unea F X3G F X3u F X3cc FX3uc Series Programmable Controllers 1 Outline User s Manual MODBUS Serial Communication Edition 1 5 Programming Tool Applicability 1 5 Programming Tool Applicability 1 5 1 For applicable versions It is not possible to create programs in FX3G FX3u and FX3uc PLCs using programming tools of inapplicable versions It is possible to create programs in FX3Gc PLC using programming tools of inapplicable versions by selecting FX3G as the alternative model as far as such programming tools are applicable to FX3G PLC The following programming tools and versions are applicable for the FX3G FX3U FX3GC F X3UC series 1 Japanese versions Model name Media model name is shown below FX3U and FX3uc PLCs GX Works2
25. Ch2 cannot be set for non protocol communication using the RS instruction 2 When using remote maintenance on ch2 use GX Works2 or GX Developer For applicable versions of GX Works2 and GX Developer refer to the FX Series User s Manual Data Communication Edition 3 Only a CF card special adapter is available When a CF card special adapter is used it is handled in the same way as a communication special adapter and occupies one communication port channel FX3U and FX3uc PLCs Ver 2 61 or later support CF card special adapters Only one CF card special adapter can be connected to the main unit Example When using MODBUS Serial Communication on ch1 MODBUS Serial Communication can not be set on ch2 Example2 When using MODBUS Serial Communication on ch1 N N Networking can be used on ch2 For more details on using N N Networking and MODBUS Serial Communication refer to Section 5 3 F X3c F Xau F X3cc FX3uc Series Programmable Controllers 4 Wiring User s Manual MODBUS Serial Communication Edition 4 1 Wiring Procedure 4 Wiring This chapter explains the wiring WIRING PRECAUTIONS D ANGER Make sure to cut off all phases of the power supply externally before attempting installation or wiring work Failure to do so may cause electric shock or damage to the product Make sure to attach the terminal cover offered as an accessory before turning on the power or initiating operation after installati
26. Code 0x11 9ut nQ Acquires the information of the slave FX Series MODBUS Communication ADP mounted station into the master Available only in FX3U and FX3uc PLCs 1 Request message format Master gt Slave Function code Function code 114 uoneunBiuo waisks QJ suoneoyioeds N 2 Response message format Slave Master When completed normally Function code Data buum Function Number of PLC CPU PLC CPU code bytes type STOP RUN 11H 02u F3u state n2 00u STOP FFu RUN The slave FX Series MODBUS Communication ADP will return F3 as the PLC CPU type data to the dnjeg uoneounuuo5 Ol Master A O D D When completed with an error n o a 5 cao 62 Function code Data Function Exception code code ODS 914 E FE ai o 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 83 F X3c FX3u F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 7 MODBUS Standard Commands 7 17 Mask Write Register Command Code 0x16 7 17 Mask Write Register Command Code 0x16 84 Available only in FX3U and FX3uc PLCs Masks the
27. D register 2 events z Event Log Slave D111 D142 Note For details refer to Subsection 9 5 1 HR Read W Write 1 Eventand Error counters 2 Communication event log suJeJ60Jd unea 47 F X3G F X3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 1 MODBUS Standard Commands Support List 7 MODBUS Standard Commands The following chapter explains in detail MODBUS Communication For standard use of the FX3G FX3u FX3GC FX3UC MODBUS Serial function please refer to Chapter 8 Master Specification or Chapter 9 Slave Specification I MODBUS Standard Commands Support List The following table indicates a list of the MODBUS standard functions supported by the FX Series MODBUS Communication ADP Accessible Command Name Devices per Broadcast Reference Message 0x01 Read Read cois REAO DIRATA 1 102090 x Section 7 4 Read Cols ES points 0x02 Read Discrete Read binary RO 1to EIL Section 7 5 Inputs devices points 0x03 Read Holding Read 16 bit R W 1 to 125 x Section 7 6 Registers register points 0x04 Read Input Read 16 bit RO 1to 125 Section 7 7 Registers register points 0x05 Write Single Coil yes Olen aly sm Section 7 8 device 0x06 ds ange is acia ot 1 point v Section 7 9 Register register device Read Exception Bese ah M el 0x07 P vendor specified x Section 7 10 Status data Loop back Subsection Restart co
28. Data is received but is not sent Off Data is sent but is not received Off Off Data is not sent nor received While MODBUS serial communication is functioning normally both LEDs flash brightly If they are not flashing check the wiring communication settings and error statuses of the master and slave stations 12 3 Checking the Installation and Wiring 1 Mounting status Verify that the communication equipment is securely connected with the PLC If the communication equipment is not securely connected communication will not function correctly For the mounting method refer to the respective communication equipment manual 2 Wiring Verify that all communication equipment is correctly wired If the wiring is incorrect communication will not function correctly For the wiring check method refer to Chapter 4 12 4 Checking the Communication Settings and Sequence Program 1 Communication setting using sequence program Verify that the communication format registers D8120 D8400 and D8420 are being set correctly If a communication port is set twice or more communication is disabled After changing any settings make sure to reboot the PLC s power For the MODBUS communication settings refer to Chapter 5 113 F X3c F Xau F X3cc FX3uc Series Programmable Controllers 12 Troubleshooting User s Manual MODBUS Serial Communication Edition 12 5 Checking Setting Contents and Errors 12 5 2 Communication se
29. Flag is OFF move bit data values into Y0 Y3 M8402 CALL om When Error Flag is ON call Error Handling Routine M100 M101 M102 M103 SET wo Start Command Sequence MO ADPRW M1000 H Read Coils Command M8029 M8402 Command Complete Processing CALL om When Error Flag is ON call Error Handing Routine RST Mo Reset Read Coil Command SET Set Next Command in Sequence 1 Available only in FX3u and FX3uc PLCs 110 F X3c F Xau F X3cc FX3uc Series Programmable Controllers 11 Practical Program Examples User s Manual MODBUS Serial Communication Edition 11 1 Setting Program for Master Station M1 Command Complete Processing 1 2 M8029 M8402 CALL om When Error Flag is ON call Error Handing Routine RST Reset Read Holding Registers Command SET Set Next Command in Sequence M2 ADPRW H4 HOF K32 Kie X000 H write Coils Command NOUO MEOS Command Complete Processing CALL om When Error Flag is ON call Error Handing Routine RST Reset Write Coil Command SET Set Next Command in Sequence Bunoouse qnou H4 K4 Write Registers Command Command Complete Processing When Error Flag is ON call Error Handing Routine Reset Write Registers Command FEND End MODBUS Command Sequence Error Processing Routine M8000 PO MOV D8402 D4000 Store MODBUS Error Code to D4000 MOV D8403 D4001 Store MODBUS Error Details to D4001 MOV D8404 D4002 Store MODBUS Error Step to D4002 SRET End Error Processing Routine 11
30. Manual MODBUS Serial Communication Edition Table of Contents 9 Slave Specification 92 9 1 MODBUS Slave Command Code List esses nne 92 9 2 MODBUS device address allocation oio t toc 19399906901 402902 IE IORER LUE Doe 22 cs Rose o cesse deceat 93 9 3 MODBUS device address allocation Default Values eeeeseeeeeseeeenreeeernnenn 93 9 4 User defined MODBUS Device Address ASSIQNMEeM ccccccseeeeeeeeeeeeeeeeeeeeaeeeeeeseeeeeseaaeeenens 96 9 4 1 Format of the user defined device allOCAation ccccccccccsseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeessaeeeeeesseeeeeeeaeeeas 97 9 4 2 Example of user defined device allocation cccccccccccsecccceeceeceeceeeaeceseaeceesaaeeeseaeeesaaeeessaeesseaaes 99 9 05 omimitnicaton EvVehtiOgsesueiatiu eo 21 9 500059050901 5909 0 9128005850800 990 1069040 1955929991 90001 9D SERIE ON LOS as 103 9 5 1 lt COMMUMIGAHONS event log e a io ree oe e Ee CUL een PU M Ep dale tere 103 9 5 2 Communication event log timing and storage format seesesesseeeeeeeeeeeennnnn 104 10 Creating Programs 106 10 1 Checking Contents of Related DeVICES cccccceccccseseeccaeeeeeeceeseeeceeeeeseeaeesseaeeeesseeeessseeeenes 106 10 2 Creating Programs for the Master Station sees 106 10 3 Creating Programs for the Slave Station seesesssssssseseeeeeeeeneneeen nennen 107 10 4 Cautions on Program Cr
31. SWLIDNC GXW2 J GX Developer SWLID5C F GPPW J Applicable version Remarks Ver 1 07H or later Model selection FX3U FX3UC Ver 8 45X or later Model selection FX3U C Model selection Not selected Online mode FX 30P Ver 1 11 orlater Model selection FX3U C Offline mode FX3G PLC GX Works2 A SWCIDNC GXW2 J Ver 1 20W or later Model selection FX3G FX3GC GX Developer SWOIDSC F GPPW J Ver 8 72A or later Model selection FX3G Model selection Not selected Online mode FX 30P Ver 1 11 or later Model selection FX3G C Offline mode FX3Gc PLC GX Works2 SWODNC GXW2 J Ver 1 77F or later Model selection FX3G FX3GC Model selection Not selected Online mode Model selection FX3G C Offline mode 1 Select FX3G in model selection for GX Works2 earlier than Ver 1 77F 2 Select FX3G in model selection for the offline mode in FX 30P earlier than Ver 1 30 FX 30P Ver 1 30 or later F X3G F Xau F X3cc FX3uc Series Programmable Controllers 1 Outline User s Manual MODBUS Serial Communication Edition 1 5 Programming Tool Applicability 2 English versions Model name Media model name is shown below FX3U and FX3uc PLCs GX Works2 SWLIDNC GXW2 E GX Developer SWLID5C F GPPW E Applicable version Remarks Ver 1 08J or later Model selection FX3U FX3UC Ver 8 45X or later Model selection FX3U C Model selection Not selected Online mode FX 30P
32. Series Generic name of FX3G Series PLCs Generic name of FX3G Series PLC main units FX3U Series Generic name of FX3U Series PLCs Generic name of FX3U Series PLC main units FX3GC Series Generic name of FX3GC Series PLCs Generic name of FX3GC Series PLC main units FX3UC Series Generic name of FX3UC Series PLCs FX3UC PLC or main unit Generic name of FX3UC Series PLC main units Expansion boards Generic name of expansion boards The models shown below FX3G 232 BD FX3G 422 BD FX3G 485 BD FX3G 2AD BD FX3G 1DA BD FX3G 8AV BD FX3U 232 BD FX3U 422 BD FX3U 485 BD FX3U USB BD FX3U 8AV BD and FX3U CNV BD Expansion board Special adapters Generic name of special high speed I O adapters special communication adapters CF card special adapters and special analog adapters Connectable equipment may vary depending on the main unit For connectable equipment refer to the User s Manual Hardware Edition of the main unit Special adapter Generic name of special high speed I O adapters The models shown below Special high speed N10 adapter ex 3u 2HSY ADP and FX3U 4HSX ADP Special communication Generic name of special communication adapters The models shown below adapter FX3U 232ADP MB FX3U 485ADP MB FX3U 232ADP and FX3U 485ADP CF card special adapter Generic name of CF card special adapters CF ADP FX3U CF ADP Generic name of special analog adapters The models shown below Special analog adapter FX3U 4AD ADP FX
33. Ver 1 11 orlater Model selection FX3U C Offline mode FX3G PLC GX Works2 SWLIDNC GXW2 E GX Developer SWLID5C F GPPW E Ver 1 08J or later Model selection FX3G FX3GC Ver 8 72A or later Model selection FX3G 02 UO D Q O i o 5 o wm oS 50 ct as ea o ct o 5 Model selection Not selected Online mode FX 30P Ver 1 11 or later P Model selection FX3G C 2 Offline mode 4 FX3Gc PLC GX Works2 m a SWODNC GXW2 E Ver 1 77F or later Model selection FX3G FX3GC Model selection Not selected Online mode xd Ver Tee ODISIER Model selection FX3G C Offline mode 5 1 Select FX3G in model selection for GX Works2 earlier than Ver 1 77F ie oo 2 Select FX3G in model selection for the offline mode in FX 30P earlier than Ver 1 30 53 si ej o smes wwo pue seoi e peje es snaaow Wl spueululo5 pyepuejs jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea 13 F X3c F X3u F X3cc FX3uc Series Programmable Controllers 2 Specifications User s Manual MODBUS Serial Communication Edition 2 1 Communication Specifications 2 Specifications This chapter explains the communication specifications and performance 2 1 Communication Specifications MODBUS Serial Communication can be implemented according to the specifications shown in the table below with the corresponding special adapter attached to the PLC either the FX3u 23
34. WM D e O O O 3 3 5 z m 3 smes wwo snaaow N spueululo5 pJepuels jesey OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3c F X3u F Xacc F Xauc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 3 Special Auxiliary Relays fe Device Valid Detailed Description Set while the master sends retries when the slave fails to respond in time Special clear conditions 1 Power on M8408 M8428 Retry Master 2 STOP to RUN R 3 If another MODBUS command is triggered As long as the slave responds on one of the retries the error flag will not be set Set if a response timeout occurs Special clear conditions 1 Power on M8409 M8429 Timeout Master 2 STOP to RIN Ea R 3 If another MODBUS command is triggered Note If the number of retries is gt O the error flag is not set until the selected number of retries failed by a timeout or another failure R Read W Write 1 Available only in FX3u and FX3uc PLCs 46 F X3G F Xau F X3cc FX3uc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 4 Communication status A 6 4 Communication status 9ut nQ The communication status is available only in FX3u and FX3uc PLCs The event and error counters will occupy ten devices beginning from the device defined by D8415
35. bit register MSB Carry Flag Load the register whose 16 bits are all 1 02H Station No Exclusive OR XOR Shift 1 Generator polynomial Exclusive OR XOR Shift2 Generator polynomial Exclusive OR XOR Shift3 Shift4 Generator polynomial Exclusive OR XOR uoneunBiuo waisks QJ suoneoyioeds N Shift5 Shift6 Generator polynomial Exclusive OR XOR buum Shift7 Shift8 Generator polynomial Exclusive OR XOR dnjeg uoneosunuuo5 Ol O7H Function Exclusive OR XOR Shift 1 Generator polynomial Exclusive OR XOR pue seoi e peje es O O 3 3 co a 7 Shift2 Generator polynomial Exclusive OR XOR Shift3 Generator polynomial Exclusive OR XOR puepuels SNddoW spueuJlulo5 Shift4 Shift5 Generator polynomial Exclusive OR XOR O jesey OO uoneoyioads Shift6 Shift7 Shift8 CRC value uoneoyioads 9Ae S Address field Function code CRC Error check h suJeJ60Jgd unea 53 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 2 Frame Specifications 54 b ASCII mode The ASCII mode is available only in FX3U and FX3uc PLCs In this mode frames are received or sent in units of 2 characters 2 bytes of ASCII codes The frame specifications are compliant with the MODBUS protocol specifications Function code Error check END CR
36. changed before each command execution Note 2 If a value less than 3 5 character times end of message detection time is selected the master will wait for at least 3 5 character times Note 3 The Turn Around delay and Message to Message delay must be set for the slowest slave in the network This value defines the minimum waiting time between two messages This time is used to detect the end of a message Valid values 0 to 16382 ms 0 will be interpreted as 3 5 character times according to the selected baud rate If a value less than 3 5 character times is selected the master will at least wait 3 5 character times Message to Master Note 1 The Turn Around delay and Message to Message delay D8411 D8431 Message delay Slave must be set for the slowest slave in the network Note 2 For the master station changes can be made anytime for startup and maintenance times for this set value However please do not change during normal operation For the slave station this set value can never be changed Note 3 When you set the baud rate to 38400 bps or more in a FX3G FX3Gc Series PLC please set D8411 D8431 to be 3ms or more When D8411 D8431 is set at less than 3ms it may not be able to communicate normally In the situation where a slave does not respond within the set time by the Slave Response Timeout the master will try to retransmit the message a set number of retries before it D8412 D8432 Number Of TNR terminates the
37. code 0002u 08u 2 Response message format Slave Master When completed normally uoneunBiuo waisks QJ suoneoyioeds N Function code Sub function code buum Function Sub function code Diagnostic register code 00021 value 08h H H L OOH M8060 M8067 FX3u FX3uc When using CH1 for MODBUS communication dnjeg uoneosunuuo5 Ol M8060 M8062 M8438 M8064 M8067 When using CH2 for MODBUS communication 1 When using 3rd party products The high byte H does not equal 00H For further information on the specifications for the slave refer to Chapter 9 poyejay When completed with an error pue seoi e Q O 3 3 Co o Function Exception code code 884 puepuels Shadow spueuJlulo5 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jgd unea 67 F X3c FX3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 7 11 4 Change ASCII input delimiter sub command code 0x03 Changes the 2nd byte LF OAH of the end code in the ASCII mode to a specified data The specified data is stor
38. command was 0207 The received data does not match the byte Master See above AE LEUR that the count value within the telegram or the device Slave i count exceeds the maximum limit for the dins Foum or TG PE command is within the limits of the Slave and Master Protocol error may occur if you dont program correctly Unconvertible Character Error aster See Corrective 0208 When in ASCII mode a byte code can not be See above Actions for Error Slave converted Code 207 any character except 0 9 and A F a f Unsupported Command Code Error Verify that the command used is s The requested Command Code is invalid or SIANG One ADOVE within the Master and not supported Slave specifications Master Related Devices M amp D Corrective Action Slave m UU lt x 2 O Qo 35 DL o gt amp n 117 F X3c FX3u F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 12 Troubleshooting 12 6 MODBUS Error Code List 118 MODBUS Error Code 0210 0211 0212 0213 0214 0215 Error Name and Details Invalid Device Address The selected MODBUS Device Address or the Device Address Device Count exceeds the supported range of this slave Communication Timeout Timeout occurred after the set number of retries failed Exception Response Error Slave answers by exception response See Exception Code List at the end of this S
39. event log data is displayed in the communication status area The events of the event log are stored to the communication status area as shown below For more information on Communication Status refer to Section 6 4 D8415 11H i e store event counter and event log into D devices D8416 100 i e head device is set to D100 D100 Event and Error counter D109 For details refer to Section 6 4 D110 event log length in bytes New values D111 event log byte 0 D112 event log byte 2 D113 event log byte 4 MEN D141 event log byte 60 D142 event log byte 62 Ups Note If the number of communications event logs exceeds 64 the oldest log is deleted and the latest log is stored to Communications event log 0 2 Communications event log response format if ADPRW command is used For command code 0x0C get communication event log When executing the ADPRW command command code Ox0C Get Communication Event Log the slaves response data is stored in the following format Example Read event log from slave 4 FNC276 a Dew Du Tem High byte Low byte Programming state FFFFH programming command in process DEUM 0000H 7 no program Command in process always OOOOH in case of FX3u FX3uc slave D2001 Event counter D2002 Bus message counter New values D2003 event log length in bytes D2004 event log byte 0 A D2005 event log byte 2 D2006 event log byte 4 T 3 E D2034 event log byte 60 Old values D2035 event log byte 62 N
40. indexing Sub function FH Return Slave No 0 fixed Response Counter Applicable Devices Block Length 1 Point D R indexing a o2 O qp zh O fed a o ES h suJeJ60Jgd unea 89 F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 8 Master Specification 8 3 ADPRW Command Parameters Command Code 8H Diagnosis BH Get Comm Event Counter CH Get Comm Event Log FH Write Multiple Coils 10H Write Multiple Registers 11H Report Slave ID S3 E Device Address Device Count Sub command Sub command Code Data AND Mask Applicable Devices D R indexing Ke H PLC Destination Device head address PLC Destination Device head address Pu PLC Destination Device head address 0 fixed juna D R indexing PLC Destination Device head address Programming State D 1 Event Counter 0 fixed 0 fixed Applicable D R indexin Devices J Block Length 2 Point PLC Destination Device head address Programming State 1 Event Counter 2 Bus Message Counter 0 fixed 0 fixed RS en 4 35 Up to 64 Bytes Event Log 2 log bytes word Applicable 5 R indexing Devices Block Length 4 36 Point PLC Source Device head address D ReKeH MeX Y S indexing 15 16 PLC Source Device head address Applicable D R Ke H Devices indexing Block Length PLC Destination Dev
41. into H registers Block Size 8 MODBUS Device Mapping 3 Head Device address 0 Mapping TSO TS127 Note For details on User defined device assignment refer to Subsection 9 4 1 96 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 4 User defined MODBUS Device Address Assignment A 9 4 1 Format of the user defined device allocation euino The user defined device allocation affects only the RW areas Coils and Holding Register The mapping of the Read Only RO areas discrete inputs and Input Register is fixed and cannot be changed from the default setting One set of configuration information requires two special data registers where up to eight PLC device areas can be mapped into the MODBUS slave address area The user defined devices are then mapped to the top of the MODBUS address range of coils or Holding Register The PLC devices are mapped in the order given by the device allocation data sets 1 to 8 D8470 D8471 D8484 D8485 Note The values set for D8470 D8485 by the MOV command are checked at the initialisation phase after power ON If the values are valid they will be moved into the special data registers D8470 D8485 In the event that an error is detected the MOV command will not be executed and the corresponding special data registers and all subsequent registers up to D8485 will be set to O uoneunBiuo
42. on Set to Error Details for MODBUS Error Code in ch1 D8402 D8422 MODBUS Communication Error Code on ch2 Set to corresponding MODBUS Error Code on ch2 D8423 MODBUS Communication Error Details on Set to Error Details for MODBUS Error Code in ch2 D8422 D8438 Serial Communication Error Code 2 ch2 Set to 3821 representing MODBUS Error on ch2 For the MODBUS Error Code List refer to Section 12 6 12 6 MODBUS Error Code List 116 Note Only one channel can be used for MODBUS serial communication MODBUS Error Code 0201 0202 0203 Master Related Devices M amp D Corrective Action Slave Error Name and Details CH1 M8063 set to ON D8063 set to 6321 M8402 set to ON D8402 set to MODBUS Error Code M8403 set to ON Verify that the Failed to detect MODBUS communication AS Ser O SMOR RE Spacia adapter Master Details Adapters are being Slave CH2 M8438 set to ON used D8438 set to 3821 FX3U 485ADP MB M8422 set to ON or FX3U 232ADP MB D8422 set to MODBUS Error Invalid Hardware Setup Details Channel number 1 or 2 Code M8423 set to ON D8423 set to Error Details Invalid Parameter Setup hvad Parameter MODBUS communication parameter settings voles ui NOE De l entered into the are invalid l Master corresponding data Slave SEL Neve registers Details Special D register Device Address Check MODBUS causing the error code COPI duration Od e g Invali
43. s Manual MODBUS Serial Communication Edition Outline Precautions e This manual provides information for the use of the FX3G FX3U F X3GCc F X3auc Series MODBUS serial communication The manual has been written to be used by trained and competent personnel The definition of such a person or persons is as follows 1 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 2 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 completed 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 oO All operators of the completed equipment should be trained to use that product in a safe and coordinated manner in compliance to established safety practices The operators should also be familiar with documentation which is connected with the actual operation of the completed equipment Note The term completed equipment refers t
44. to BH 1 word 16 bit devices D and R register is CH or DH 16 word TN and CN 0 199 CD is EH or FH 1 word 32 bit counter CN 200 255 is FH 1 double word Note If the above range is exceeded or the selected value exceeds the valid range for the PLC device defined in CO a MODBUS communication error will occur FX3U FX3UC PLC head device address 16bit Valid values are 0 32767 although this is dependent on the PLC device defined in CD Note For the head device addresses 0H to 5H D must be a multiple of 8 For the head device 6H to BH these values must be multiples of 16 If a device address is selected that is not a multiple of 8 or 16 respectively a MODBUS communication error will occur X and Y addressing should always be completed in octal i e 00 20 40 etc If the selected head device address or its combination with the block length exceeds the valid range for the selected PLC device a MODBUS communication error will occur If the setting of and is correct and the device mapping is valid the values will be moved into the special data registers D8470 D8485 In the event that an error is detected the MOV will not be executed and the corresponding special data registers and all subsequent registers up to D8485 will be set to O If an error occurs during the device allocation mapping will be stopped at the first invalid mapping value However any mapping operations that have been successfully executed
45. to Chapter 6 Communications event log Refer to Section 9 5 1 Clears the data when the communications event log clear is specified in the request message 1 Request message format Master Slave Function code Sub function code Data Function Sub function code Clear setting of code 00014 Communications event log 084 00001 Do not clear FFOOun Clear H b 2 Response message format Slave Master When completed normally The slave returns the request message received from the master without change However if a request message is received during listen only mode the status will only return to online mode and no response message will be returned When completed with an error Function code Data Function Exception code code 88H 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 A 7 11 3 Return diagnostic register sub Command code 0x02 9ut nQ Reads out the diagnostic register of the remote node to the master 1 Request message format Master Slave Function code Sub function code Function Sub function code
46. torque shown in the table above use the following refer to the table above screwdriver or an appropriate replacement grip diameter approximately 25mm 0 98 Reference FX3u 485ADP MB Manufacturer Model name Phoenix Contact SZS 0 4 x 2 5 30 F X3c FX3u F X3cc FX3uc Series Programmable Controllers 4 Wiring User s Manual MODBUS Serial Communication Edition 4 4 Connection Diagram for MODBUS RS 232C A 4 3 3 Connecting terminal resistors euino Make sure to provide a terminal resistor at each end of the line 1 When using the FX3u 485ADP MB The FX3u 485ADP MB has a built in terminal resistor Set the terminal resistor selector switch accordingly Terminal resistor selector Switch CD x D e zh Q RV ct o o w Os 50 ct as c co et o 5 4 4 Connection Diagram for MODBUS RS 232C Representative wiring examples are shown in this section When pin numbers in the counterpart equipment are different wire the pins as shown below 4 4 1 Connection diagram between FX PLC and MODBUS RS 232C equipment Ext t ting i d 9 ernal equipment operating IN accordance c3 PEC Sige with MODBUS RS 232C 53 When CS and When DR and si FX3U 232ADP MB RS are used Nae ER are used 9 pin D Sub 9 pin 25 pin 9 pin 25 pin D Sub D Sub D Sub D Sub P ft 6 OUD D RDO PE D SOTHO AL RS RTS ER DTR 2a n NM 7 QOn 580 1 For third party external equipment requi
47. 0000u to FFFFH Bus message count value 0000u to FFFFu 9 Communications event log No 0 Communications event log No 63 L H L H Number of read bytes 1 Since the FX Series MODBUS Communication ADP does not support any program commands OOOOH is always stored 2 Refer to the following for the relevant counts count clear methods and precautions Refer to Section 7 12 3 Refer to the following for the relevant counts count clear methods and precautions Refer to Chapter 6 4 For information on the Communication Event Log and Communication event log Timing and Communication event log Format refer to Section 9 5 When completed with an error Function code Data Function code 8Cu Exception code 5 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 14 Write Multiple Coils Command Code OxOF A 7 14 Write Multiple Coils Command Code 0x0F euino Writes values ON OFF to multiple coils 1 Request message format Master Slave Function code Data S Function Head coil number Write points N
48. 00Enu 08h 2 Response message format Slave Master When completed normally Function code Sub function code Data Function Sub function code Slave message count value code 000En 00004 to FFFFu 08u H b 1 Refer to Chapter 6 for the relevant counts count clear methods and precautions When completed with an error Function code Data Function Exception code code 88u 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 74 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 A 7 11 11 Return slave no response count sub command code OxOF euino Reads to out the number of broadcast request messages received to the master 1 Request message format Master Slave Function code Sub function code Function Sub function code code OOOFH 084 2 Response message format Slave Master When completed normally uoneunBiuo waisks QJ suoneoyioeds N Function code Sub function code Data Function Sub function code Slave no response count code OOOFH value 08u 0000u to FFFFn 1 Suum 1 Refer to Chapter 6 for the rele
49. 1 F X3c FX3u F X3cc FX3uc Series Programmable Controllers 11 Practical Program Examples User s Manual MODBUS Serial Communication Edition 11 2 Setting Program for Slave Station 11 2 Setting Program for Slave Station After MODBUS Communication Setup the FX MODBUS Slave station can be used to execute any User Program while the Master station reads and writes devices An example Slave station program is shown below Program for setting a MODBUS Slave For more details on the Communication Setup M Mid siii Parameters refer to Section 5 2 of this manual MEM MOV H11 D8401 E MOV User Program 1 Available only in FX3u and FX3uc PLCs 112 F X3c FX3u F X3cc FX3uc Series Programmable Controllers 12 Troubleshooting User s Manual MODBUS Serial Communication Edition 12 1 Checking the FX3G FX3U FX3GC FX3UC PLCs Version Applicability m uU U e O Oo 322 a 0o3g amp n 12 Troubleshooting This chapter explains troubleshooting 12 4 Checking the FX3G FX3u FX3Gc FX3uc PLCs Version Applicability Verify that the FX3G FX3U FX3GC F X3UC Series PLCs main unit is an applicable version For the version applicability check refer to Section 1 3 12 2 Checking the Communication Status Based on LED Indication Check the status of the RD and SD indicator LEDs provided in the optional equipment LED status Operation status o p s Flashing Data is being sent and received Flashing
50. 127 and onward M8029 for the Master For more details on Master Station instructions refer to Chapter 8 For cautions on program creation refer to Section 10 4 10 3 Creating Programs for the Slave Station Create a program for the slave station with user defined MODBUS Device Address Assignment similar to the example program in Section 9 4 of this manual 107 A 9ut jnQ uoneunBiuo waisks QJ suoneoyioads N buum dnjeg uoneounuuo5 Ol smes wwo pue seoi e peje es puepuejs sngaon Wl spueululo5 jasen OO uoneoyioedgs mi o2 O qp j O ev a o ES F X3c FX3u F X3cc FX3uc Series Programmable Controllers 10 Creating Programs User s Manual MODBUS Serial Communication Edition 10 4 Cautions on Program Creation 10 4 Cautions on Program Creation 108 1 MODBUS Configuration Request Flag M8411 When setting up FX MODBUS Serial Communication on either Channel 1 or 2 be sure to use Special Auxiliary Relay M8411 as shown in Chapter 5 of this manual Using the ADPRW Command 1 When using the ADPRW command in the FX MODBUS Master make sure the driving contact of the ADPRW command stays ON until the command has been completed M8029 2 When driving multiple ADPRW commands at the same time in the FX MODBUS Master only one command will be executed at a time The next ADPRW command in the program is executed after the current command has been comple
51. 2767 the value will become a negative number To see the step numbers above 32767 the user must convert the step number to an unsigned value 39 A 9ut nQ uoneunBiuo waisks QJ suoneoyioads N buum WM D e O Q o 3 3 c 2 z e 3 smes wwo snaaow N spueululo5 puepuels jese y OO uoneoyioedg uoneoyioeds 9Ae S Lo umo suJeJ60Jgd unea F X3c FX3u F X3cc FX3uc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 1 Special Data Registers Special Data Register Valid Detailed description Communication Master D8405 D8425 Formeat Slave This device stores the communication format set in the PLC Display Displays the End Of Message character used in ASCII mode By default this is the LF 0x0A character Special clear conditions ASCII Input D8406 D8426 x D Master 1 Power on Delimiter Slave Note In the Master this character can be changed by the user program For the slave this is a read only device Refer to the Change ASCII Input Delimiter command in the Subsection 7 11 4 Last step number of the MODBUS command that was executed 0 if no command is executed in the program After the ADPRW command has been executed the last step number will be retained in the device register Sesiuni Special clear conditions D8407 D8427 e EE j Master 1 Power on 3 2 STOP to RUN Note If the step
52. 2ADP MB or FX3U 485ADP MB The communication format protocol etc are determined by the communication setup using a sequence program as described in Chapter 5 Specifications FX3U 232ADP MB FX3U 485ADP MB Either 1 MODBUS Master or 1 Channels per PLC 1 Channel MODBUS Slave channel Communication Interface RS 232C RS 485 300 600 1200 2400 4800 9600 19200 38400 57600 or 115200 bps BEREITS FX3U FX3UC 7 bit or 8 bit AA g FX3G FX3Gc 8 bit Transmission Specifications Stop Bit 1 bit or 2 bit Transmission Distance varies Up to 15m 49 2 Up to 500m 1640 5 depending on communication equipment type MT The ASCII mode is available Communication Protocol RTU or ASCII only in FX3u and FX3uc PLCs 16 Slaves Number of Slaves varies Number of Slaves 1 Slave 328 depending on communication gue equipment type FX3U FX3UC 14 14 Diagnostic functions Number of Functions Master Function FX3G F X3Gc 8 No diagnostic functions Number of Simultaneously 1 Instruction Executable Instructions Maximum Write Data 123 words or 1968 coils Maximum Read Data 125 words or 2000 coils FX3U FX3uc 14 14 Diagnostic functions FX3G FX3Gc 8 No diagnostic functions Item Remarks Transmission Speed Transmission Distance Number of Functions Number of Simultaneous Acceptable Request Slave Function 1 Request Message Messages Station Number 1 to 247 i External Dimensions 90 H x 17 6 W 74
53. 30P Operation Manual F X3G F Xau F X3cc FX3uc Series Programmable Controllers 1 Outline User s Manual MODBUS Serial Communication Edition 1 1 Outline of System 1 Outline This chapter outlines the MODBUS serial communication network 1 1 Outline of System The MODBUS serial communication network allows up to 32 slaves to be controlled by one master in accordance with RS 485 to link devices or one directly linked slave in accordance with RS 232C 1 Up to 32 slaves can be controlled by one FX3G FX3U F X3GC FX3uc MODBUS Master 2 Master and Slave functionality 3 RTU and ASCII mode The ASCII mode is available only in FX3U and FX3uc PLCs 4 One channel per PLC can be used for MODBUS serial communication 1 MODBUS Master channel or 1 MODBUS Slave channel 5 Transmission speed up to 115 2 kbps 6 The MODBUS Master function uses a new PLC command dedicated to MODBUS serial communication Important points and reference In the case of RS 485 33 units a Number of linked units a 500 m 1640 5 aaan Total extension distance For the specifications FX PLC FX PLC FX PLC lr haber Master station Slave station No 1 01H Slave station No 32 20H For applicable PLC models refer to Section 1 3 Communication Communication Communication equipment operating equipment operating equipme
54. 3U 4DA ADP FX3U 3A ADP FX3U 4AD PT ADP FX3U 4AD PTW ADP FX3U 4AD PNK ADP and FX3U 4AD TC ADP Generic name of special adapter connection conversion adapter The models shown below Connector conversion adapter FX3G CNV ADP Peripheral equipment Peripheral equipment Generic name of programming software handy programming panels and display units Programming tools Programming tool Generic name of programming software and handy programming panels Programming software Generic name of programming software Abbreviation of programming software packages SWLIDNC GXW2 J and SWODNC GXW2 E Abbreviation of programming software packages SWLID5C GPPW J and SWOD5C GPPW E A programming panel Generic name of programming panels FX 30P FX 20P E and FX 10P E Manuals FX3G Hardware Edition FX3G Series User s Manual Hardware Edition FX3U Hardware Edition FX3U Series User s Manual Hardware Edition FX3GC Hardware Edition FX3GC Series User s Manual Hardware Edition FX3UC Hardware Edition FX3UC Series User s Manual Hardware Edition Programming Manual FX3G FX3U FX3GC F X3UC Series Programming Manual Basic amp Applied Instruction Edition Communication Control Edition FX Series User s Manual Data Communication Edition Analog Control Edition FX3G F X3U F X3GC F X3UC Series User s Manual Analog Control Edition Positioning Control Edition FX3G F X3U FX3GC F X3UC Series User s Manual Positioning Edition FX 30P Manual FX
55. 4 1 Wiring Procedure 1 Selecting the connection method Select the wiring method suitable to the application For details refer to Section 4 2 Preparing for wiring Prepare cables and terminal resistors required for wiring For details refer to Section 4 3 Turning OFF the power to the PLC Before wiring make sure that the PLC power is OFF Wiring communication equipment Connect communication equipment operating in accordance with MODBUS RS 485 or MODBUS RS 232C For communication in accordance with MODBUS RS 232C refer to Section 4 4 For communication in accordance with MODBUS RS 485 refer to Section 4 5 27 A 9ut nQo uoneunBiuo wasg QJ suoneoyioads N dnjeg Q o 3 3 c 5 z e 3 o smes wwo pue seoi e peje es spueululo5 piepuejs snaaow Wl jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3c FX3u F X3cc FX3uc Series Programmable Controllers 4 Wiring User s Manual MODBUS Serial Communication Edition 4 2 Selecting Connection Method 4 2 Selecting Connection Method When using MODBUS serial communication communication can be achieved in accordance with MODBUS RS 232C or RS 485 For the FX3G FX3U FX3GC F X3uc only one channel can be used for MODBUS serial communication Master or Slave 4 2 1 For communication in accordance with MODBUS RS 232C 1 to 1 connection For communication in accordance with MODBUS RS 232
56. 999 MELTRADE Kft Fert utca 14 HU 1107 Budapest Phone 36 0 1 431 9726 Fax 36 0 1 431 9727 Beijer Electronics SIA Ritausmas iela 23 LV 1058 Riga Phone 371 0 784 2280 Fax 371 0 784 2281 Beijer Electronics UAB Savanoriu Pr 187 LT 02300 Vilnius Phone 370 0 5 232 3101 Fax 370 0 5 232 2980 AUSTRIA BELARUS BELGIUM BELGIUM BULGARIA CROATIA CZECH REPUBLIC DENMARK ESTONIA FINLAND GREECE HUNGARY LATVIA LITHUANIA MITSUBISHI ELECTRIC ALFATRADE Ltd 99 Paola Hill Malta Paola PLA 1702 Phone 356 0 21 697 816 Fax 356 0 21 697 817 INTEHSIS srl bld Traian 23 1 MD 2060 Kishinev Phone 373 0 22 66 4242 Fax 373 0 22 66 4280 HIFLEX AUTOM TECHNIEK B V Wolweverstraat 22 NL 2984 CD Ridderkerk Phone 4 31 0 180 46 60 04 Fax 31 0 180 44 23 55 Koning amp Hartman b v Haarlerbergweg 21 23 NL 1101 CH Amsterdam Phone 31 0 20 587 76 00 Fax 31 0 20 587 76 05 Beijer Electronics AS Postboks 487 N0 3002 Drammen Phone 47 0 32 24 30 00 Fax 47 0 32 84 85 77 Fonseca S A R Jo o Francisco do Casal 87 89 PT 3801 997 Aveiro Esgueira Phone 351 0 234 303 900 Fax 4 351 0 234 303 910 Sirius Trading amp Services srl Aleea Lacul Morii Nr 3 R0 060841 Bucuresti Sector 6 Phone 40 0 21 430 40 06 Fax 40 0 21 430 40 02 INEA RBT d o o Izletnicka 10 SER 113000 Smederevo Phone
57. BUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 10 Read Exception Status Command Code 0x07 7 10 Read Exception Status Command Code 0x07 Reads error status Available only in FX3U and FX3uc PLCs 1 Request message format Master Slave Function code Function code 074 2 Response message format Slave Master When completed normally Function code Data Function code 07u Error information 1 Vendor specific data When completed with an error Function code Function Exception code code 2 87H 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 64 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 A 7 11 Diagnostics Command Code 0x08 euino Executes the various diagnostics and checks the FX Series MODBUS Communication ADP Available only in FX3U and FX3uc PLCs 7 11 1 Return query data sub command code 0x00 Returns the contents of the request message without change Used to check if the network or the target device is operating normally Loopback test 1 Request message format Master Slave Func
58. C 1 to 1 connection is possible Make sure that the total extension distance is 15m 49 2 or less FX PLC FX PLC Master station Slave station No 1 01H Communication Communication equipment operating equipment operating in accordance with in accordance with MODBUS RS 232C MODBUS RS 232C 15 m 49 2 4 2 2 For communication in accordance with MODBUS RS 485 1 to N connection For communication in accordance with MODBUS RS 485 up to 32 PLC Slave Nodes can be connected to one Master Node Make sure that the total extension is 500m 1640 5 or less FX PLC FX PLC FX PLC Master station Slave station No 1 01H Slave station No 32 20H MITSUBISHI Communication Communication Communication equipment operating equipment operating equipment operating in accordance with in accordance with in accordance with MODBUS RS 485 MODBUS RS 485 MODBUS RS 485 500 m 1640 5 Note MODBUS Slave Nodes do not need to be numbered in any specific order 28 F X3c FX3u F Xacc F Xauc Series Programmable Controllers 4 Wiring User s Manual MODBUS Serial Communication Edition 4 3 Selecting Cables and Terminal Resistors RS 485 A 4 3 Selecting Cables and Terminal Resistors RS 485 euino Select cab
59. Changes for the Better 5 MITSUBISHI PROGRAMMABLE CONTROLLERS MEUS EC MODBUS Serial Communication Edition 3G X 3ac y z X gt gt GEE S2fety Precautions NIE Read these precautions before use Before installation operation maintenance or inspection of this product thoroughly read through and understand this manual and all of the associated manuals Also take care to handle the module properly and safety This manual classifies the safety precautions into two categories K DANGER and A CAUTION DANGER Indicates that incorrect handling may cause hazardous conditions resulting in death or severe injury CA TION Indicates that incorrect handling may cause hazardous conditions resulting in U medium or slight personal injury or physical damage Depending on the circumstances procedures indicated by NCAUTION may also cause severe injury It is important to follow all precautions for personal safety Store this manual in a safe place so that it can be taken out and read whenever necessary Always forward it to the end user 1 DESIGN PRECAUTIONS DANGER e Make sure to have the following safety circuits outside of the PLC to ensure safe system operation even during external power supply problems or PLC failure Otherwise malfunctions may cause serious accidents 1 Most importantly have the following an emergency stop circuit a protection circuit an interlock circuit for opposite move
60. D mm Special Adapter i Weight 1 Applicable for products manufactured in July 2012 or later manufacturer s serial number 127 or later The year and month of production of the special adapter can be checked from the manufacturer s serial number S N indicated on the label For manufacturer s serial number refer to Section 1 4 Caution When you set the baud rate to 38400 bps or more in a FX3G FX3GC Series PLC please set D8411 D8431 to be 3ms or more When D8411 D8431 is set at less than 3ms it may not be able to communicate normally 14 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 2 Specifications User s Manual MODBUS Serial Communication Edition 2 1 Communication Specifications Note o This table details the specifications when using MODBUS communication The FX3U 485ADP MB and FX3u 3 232ADP MB also features FX3U 485ADP and FX3u 232ADP functionality respectively Therefore the following communication types are also available when using the following modules N N network Parallel link Computer link Non protocol communication and Inverter communication Computer link Non protocol communication Programming communication and Remote maintenance FX3U 485ADP FX3U 232ADP For further information on the communication types and please refer to the FX Series User s Manual Data Communication Edition uoneunBiuo uejs c QJ suoneoyoeds buum dnjeg uoneounuuo5 Qf o smes wwo pue s
61. F Write Multiple Coils Write multiple binary R W devices 0x10 Write Multiple Registers Write multiple 16 bit R W registers Slave ID details PLC run stop state RUN Status RUN FFH 4 0x11 Report Slave ID STOP 00H Slave ID F3H FX3U FX3UC same as computer link x16 Mask Write Register s s slave register with AND Mask OR ask 0x17 ipei mte MRS Read Write multiple 16 bit R W registers 1 Available only in FX3u and FX3uc PLCs 9 2 MODBUS device address allocation The following information details device allocation when using default values and how to create user defined device address allocation values 9 3 MODBUS device address allocation Default Values The following table provides the default values for MODBUS address allocation for Bit devices and word devices e For FXaU FX3uc Series PLCs Bit device MODBUS Binary Device Address Discrete Inputs Read Only Coils Read Write 0x0000 0x1DFF 0x0000 0x1DFF MO M7679 Ox1E00 0x1FFF Ox1E00 0x1FFF M8000 M851 1 0x2000 0x2FFF 0x2000 0x2FFF S0 S4095 FX3uU FX3uc Device 0x3000 0x31F F 0x3000 0x31FF TSO TS511 0x3200 0x32FF 0x3200 0x32FF CS0 CS255 0x3300 0x33FF 0x3300 0x33FF YO Y377 93 A 9ut nQ uoneunBiuo waisks QJ suoneoyioads N buum dnjeg uoneounuuo5 Ol smes wwo pue seoi e peje es sngaon Wl spueululo5 pJepuels jesey OO Ww UO D oO o e o uoneoyioads h s
62. H D 0 D8478 12bit 130 D8479 10000 AT ee ooz Skipped due to error S5 O 23 amp 0 6 D8480 4bit DH R gt 0 D8480 12bit 160 D8481 0 0 c 225 Skipped due to error o 7 D8482 4bit FH CN gt 0 D8482 12bit 160 D8483 2000 Do ME Skipped due to error 8 8 D8484 4bit 00 D8484 12bit 0 D8485 ia Unused oz Rd in 9 uoneoyioeds S suJeJ60Jd unea 101 102 F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 9 Slave Specification 9 4 User defined MODBUS Device Address Assignment The following tables provide the default values for MODBUS address allocation for Bit devices and word devices for the example stated above Bit device Coils Read Write 0x0000 0x001F 0x0020 0x005F Word device Holding Register Read Write 0x0000 0x0007 FX3uU FX3uc Device X0 X37 M128 M191 FX3U FX3uc Device TSO TS127 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 5 Communication Event log 9 5 Communication Event log This section details the communication event log details for the MODBUS slave device The communication event log is available only in FX3u and FX3uc PLCs 9 5 1 Communications event log 1 Communications event log information in the communication status area If configured in D8415 D8435 and D8416 D8436 the
63. O 3 Note For details refer to Section 9 4 3 Co If a MOV H D8478 is triggered by LD M8411 during the MODBUS initialization the slave device mapping can be d Doo Slave changed by the user Rw D8479 inn 7 Note For details refer to Section 9 4 99s If a MOV H D8480 is triggered by LD M8411 during the 3 2 g MODBUS initialization the slave device mapping can be S d Dee Slave changed by the user Rw j D8481 gea by i Note For details refer to Section 9 4 8 If a MOV H D8482 is triggered by LD M8411 during the T MODBUS initialization the slave device mapping can be ioe d dicm Slave changed by the user Ij D8483 xiii S O Note For details refer to Section 9 4 B If a MOV H D8484 is triggered by LD M8411 during the MODBUS initialization the slave device mapping can be 9 pores Slave changed by the user Co Co D8485 gen my 2g O qp Note For details refer to Section 9 4 8 R Read W Write 1 Values must be written to these Device registers using the MODBUS configuration block using M8411 For details refer to Section 9 4 2 Available only in FX3u and FX3uc PLCs umo suJeJ60Jd unea 43 F X3c F X3u F Xacc F Xauc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 2 Communication setting for MODBUS 6 2 Communication setting for MODBUS 44 The following devices are used in the communication setting Whe
64. POLAND RUSSIA SPAIN JAPAN USA MITSUBISHI ELECTRIC GEVA Wiener Strafe 89 AT 2500 Baden Phone 43 0 2252 85 55 20 Fax 4 43 0 2252 488 60 TECHNIKON Oktyabrskaya 19 Off 705 BY 220030 Minsk Phone 375 0 17 210 46 26 Fax 375 0 17 210 46 26 ESCO DRIVES amp AUTOMATION Culliganlaan 3 BE 1831 Diegem Phone 32 0 2 717 64 30 Fax 32 0 2 717 6431 Koning amp Hartman b v Woluwelaan 31 BE 1800 Vilvoorde Phone 32 0 2 257 02 40 Fax 32 0 2 257 02 49 INEA RBT d o o BOSNIA AND HERZEGOVINA Aleja Lipa 56 BA 71000 Sarajevo Phone 387 0 33 921 164 Fax 387 0 33 524 539 AKHNATON 4 Andrei Ljapchev Blvd PO Box 21 BG 1756 Sofia Phone 359 0 2 817 6000 Fax 359 0 2 97 44 06 1 INEA RBT d o o Losinjska 4 a HR 10000 Zagreb Phone 385 0 1 36940 01 02 03 Fax 385 0 1 36 940 03 AutoCont C S s r o Technologick 374 6 CZ 708 00 Ostrava Pustkovec Phone 420 595 691 150 Fax 420 595 691 199 Beijer Electronics A S Lykkeg rdsvej 17 DK 4000 Roskilde Phone 45 0 46 75 76 66 Fax 4 45 0 46 75 56 26 Beijer Electronics Eesti OU P rnu mnt 160i EE 11317 Tallinn Phone 372 0 6 51 81 40 Fax 372 0 6 5181 49 Beijer Electronics OY Peltoie 37 FIN 28400 Ulvila Phone 4 358 0 207 463 540 Fax 358 0 207 463 541 UTECO 5 Mavrogenous Str GR 18542 Piraeus Phone 30 211 1206 900 Fax 30 211 1206
65. Q or less resistance 100 Q or less 1 Make sure to perform Class D grounding on the shield of the twisted pair cable connected to the FX3u 485ADP MB 2 Make sure to provide a terminal resistor at each end of a line The FX3U 485ADP MB has a built in terminal resistor Set the terminal resistor selector switch accordingly 32 F X3c FX3u F X3cc FX3uc Series Programmable Controllers 4 Wiring User s Manual MODBUS Serial Communication Edition 4 6 Grounding A 4 6 Grounding 9ut nQ Grounding should be performed as stated below e The grounding resistance should be 100 Q or less e Independent grounding should be performed for best results When independent grounding can not be performed perform shared grounding as shown in the following figure For details refer to the Hardware Edition Other Other Other e men e men e men K quipr quipr quipi Independent grounding Shared grounding Common grounding Best condition Good condition Not allowed uoneunBiuo wasg QJ suoneoyioeds N The grounding wire size should be AWG 14 2 mm or larger The grounding point should be close to the PLC and all grounding wires should be as short as possible dnjeg Q o 3 3 c 5 z e 3 o smes wwo pue seoi e peje es spueululo5 piepuejs snaaow Wl jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea 33 F X3c FX3u F Xacc F Xauc Series Programmable Controll
66. Serial Communication Edition 2 Specifications 2 2 Link Time Example Link Time Calculations Master processing time Tm D8411 5ms Max Scan Time 5ms Command Read Holding Registers 0 9 Command Code 0x03 Frame Mode RTU Mode Bytes in Request 8bytes 1byte Address 5byte Frame 2byte CRC Bytes in Response 25bytes 1byte Address Echo 22byte Frame 2byte CRC Character Length 10bits 1bit Start 8bit Data Length Obit Parity 1bit Stop Baud Rate 19 2Kbps Slave Delay 10ms T4 5ms 5ms T1 INT eap 5ms 1 1 5ms 10ms oms T6 1ms 8 Bytes in Request 10bits T7 a ad 1000 ms ims 5 2ms 19200bps T8 10ms 25 Bytes in R 10bit To eyes In Response DIS 4000 ms 1ms 14 0ms 19200bps 3 5 Ch t 10bits T10 clare cc 1000 ms 1ms 2 8ms 19200bps T5 1ms 5 2ms 10ms 14 0ms 2 8ms 33ms 33ms T2 INT 5ms 1 5ms 6 1 5ms 35ms T3 1ms Tm 5ms 35ms 1ms 41ms Slave processing time Ts Command Read Holding Registers 0 9 Command Code 0x03 Frame Mode RTU Mode Bytes in Request 8bytes 1byte Address 5byte Frame 2byte CRC Bytes in Response 25bytes 1byte Address Echo 22byte Frame 2byte CRC Character Length 10bits 1bit Start 8bit Data Length Obit Parity 1bit Stop Baud Rate 19 2Kbps D8411 5ms Max Scan Time 5ms 8 Bytes in Request 1Obits T14
67. US communication error flag turn ON Verify that the devices shown in the table below are OFF Device M8063 M8402 M8403 M8422 M8423 M8438 Serial Communication Error 1 ch1 MODBUS Communication Error ch1 MODBUS Communication Error Latched MODBUS Communication Error ch2 MODBUS Communication Error Latched Serial Communication Error 2 ch2 Description Turns ON when abnormality occurs using serial communication on ch1 Turns ON when a MODBUS command error occurs using ch1 ch1 Turns ON after a MODBUS command error has occurred using ch1 Turns ON when a MODBUS command error occurs using ch2 ch2 Turns ON after a MODBUS command error has occurred using ch2 Turns ON when abnormality occurs using serial communication on ch2 115 ueJ60Jgd JeonoeJg F X3c F Xau F X3cc FX3uc Series Programmable Controllers 12 Troubleshooting User s Manual MODBUS Serial Communication Edition 12 6 MODBUS Error Code List 2 Error codes When a communication error occurs while using MODBUS communication the corresponding communication error flag turns ON and the MODBUS error code is stored in the corresponding data register Device Description D8063 Serial Communication Error Code 1 ch1 Set to 6321 representing MODBUS Error on ch1 D8402 MODBUS Communication Error Code on ch1 Set to corresponding MODBUS Error Code on ch1 D8403 MODBUS Communication Error Details
68. X3U CNV BD FX3U 232ADP MB FX3U 232ADP MB FX3U 485ADP MB 9 pin D Sub male FX3U CF ADP When a FX3U CF ADP is used it occupies one communication port channel 22 F X3c FX3u F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 3 System Configuration 3 2 Applicable EX PLC and Communication Equipment For communication in accordance with RS 485 FX Series Communication equipment option bdo Check D MITSUBISHI C o 0 14 point 24 point FX3G CNV ADP When using channel 1 ch 1 in BFP FX3U 485ADP MB type European terminal block 500 m 1640 5 500 m 1640 5 FX3G CNV ADP FX3U 485ADP MB FXo6 40 point 60 point European terminal block When using channel 2 ch 2 FA BL q 9n j umen om oom H H H it n MITSUBISHI A eit Dealt 4 laa un 500 m FX3G CNV ADP FX3U L ADP MB FX3U 485ADP MB 1640 5 Where LI represents European terminal block 232 and 485 Ch2 is not available when the FX3G 232 BD FX3G 422 BD FX3G 485 BD or FX3G 8AV BD is connected in the second expansion board slot When using channel 1 ch 1 500 m 1640 5 FX3u 485ADP MB European terminal block When usin
69. X3u F X3cc FX3uc Series Programmable Controllers 12 Troubleshooting User s Manual MODBUS Serial Communication Edition 12 6 MODBUS Error Code List MODBUS m Master oo Error Error Name and Details Related Devices M amp D Corrective Action SE Code Slave 38 Illegal Data Value Data value does not match MODBUS Pike 0216 uA Slave See above Actions for Error specification Code 207 i e Write Single Coil 5H value other than l OFF OOOOH or ON FFOOH Illegal Instruction Use Dots oal ADPRW command used in Slave mode SAVE DEE DOVE a M D8401 or D8421 bit 4 ON l ADPRW User Command Error The PLC source destination device of the ADPRW command is invalid or the occupied See above Verify that the PLC device range exceeds the valid area command is within 0218 Master AND the Master Details M8067 set to ON D8067 Specification and H Byte 0 set to 6705 or 6706 device range L Byte 1 5 according to the invalid parameter of the ADPRW command to IQD 1 Available only in FX3u and FX3uc PLCs 119 F X3c F Xau F X3cc FX3uc Series Programmable Controllers 12 Troubleshooting User s Manual MODBUS Serial Communication Edition 12 6 MODBUS Error Code List 1 Exception codes supported by FX3G FXS3U FX3GC FXsuc MODBUS Slave The following table outlines the exception codes supported by the MODBUS slave device Exception Exception name Details code 01H Illegal Function The requested function code is
70. ___ 1 Max Scan Time Max Scan Time T4 D8411 or D8431 depending on the Communication Channel T5 T2 UNT pe Max Scan Time i 1 Max Scan Time 5 2 TO T7 T8 T9 710 T6 less than 1ms Number of Bytes in Request Character Length bits Baud Rate bps T8 Slave Delay Time depending on the Slave Number of Bytes in Response Character Length bits Baud Rate bps T7 1000 ms 1ms 1000 ms 1ms RTU Mode h bi T10 3 5 Characters Character Length bits 1000 ms 1ms Baud Rate bps ASCII Mode T1020 T3 less than 1ms The Slave processing time Ts can be calculated in milliseconds ms as follows Character Length bits Start bit 1bit Data Length 7bit or 8bit Parity Obit or 1bit Stop bit 1bit or 2bit Ts T11 T12 T13 T1172 T14 T15 Max Scan Time TS Number of Bytes in Request Character Length bits 1000 ms 1ms Baud Rate bps T15 D8411 or D8431 depending on the Communication Channel T12 less than 1ms Number of Bytes in Response Character Length bits T13 1000 ms 1ms Baud Rate bps 17 O D uoneunBiuo uejs c QJ suoneoyoeds buum dnjeg uoneounuuo5 Qf o smes wwo pue seoi e peje es snaaow Wl spueuJlulo5 pyepuels jasen OO uoneoyioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS
71. a FX3u 8AV BD is used it occupies one communication port channel ch1 LRiL 1 15m bm 49 2 FX3U CNV BD FX3u 232ADP MB FX3u 232ADP MB FX3U 485ADP MB 9 pin D Sub male FX3U CF ADP When a FX3U CF ADP is used it occupies one communication port channel When using channel 1 ch 1 15m 49 2 FX3u 232ADP MB 9 pin D Sub male When using channel 2 ch 2 FX3UC c D DS DSS ED ber 49 2 FX3u 232ADP MB FX3u 232ADP MB FX3U 485ADP MB 9 pin D Sub male FX3U CF ADP When a FX3U CF ADP is used it occupies one communication port channel 21 A 9ut jnQ ep UO D Q O A o 5 o Uejs S uoneunBiuo buum dnjeg uoneounuuo5 Qf o smes wwo pue seoi e peje es snaaow Wl spueululo5 pJepuels jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3G F X3u F X3cc FX3uc Series Programmable Controllers 3 System Configuration User s Manual MODBUS Serial Communication Edition 3 2 Applicable FX PLC and Communication Equipment FX Series Communication equipment option ird Check When using channel 1 ch 1 15m 49 2 FX3uU CNV BD FX3u 232ADP MB 9 pin D Sub male When using channel 2 ch 2 15m E i 49 2 FX3u L BD FX3u 232ADP MB FX3UC 32MT LT Where O represents 9 pin D Sub male 2 232 422 485 USB and 8AV When a FX3u 8AV BD is used it occupies one communication port channel ch1 F
72. able size oss Applicable 0 22t00 AWG20 DUE AWG22 to AWG20 0 4 0 017 Tighten the terminals to a torque of 0 22 to 0 25 N m Do not tighten terminal screws exceeding the specified torque Failure to do so may cause equipment failures or malfunctions With regard to the cable end treatment use a stranded cable or solid cable as it is or use a bar terminal with insulating sleeve FX3U 485ADP MB 2 5 0 09 When leaving the cable end as it is Twist the end of stranded cables so that the individual wires do not poke out Do not plate the cable end Approx 9 mm 0 35 When using a bar terminal with insulating sleeve Because it is difficult to insert a cable into the insulating sleeve Insulating sleeve depending on the cable sheath thickness select the proper cable according to the outline drawing Reference Manufacturer Caulking tool ug 0 55 s Phoenix Contact AI 0 5 8WH REIRET AER or CRIMPFOX 6T F 1 Old model name CRIMPFOX ZA 3 2 Old model name CRIMPFOX UD 6 Contact area Crimp area Tool When tightening a terminal on the European terminal block use a Select a small straight shaped commercial screwdriver as shown in the figure screwdriver ith on the right sirolah tip Note If the diameter of screwdriver grip is too small the required tightening A gt kE torque will not be able to be achieved To achieve the appropriate For size A and size B tightening
73. accept no responsibility for actual use of the product based on these illustrative examples This manual content specification etc may be changed without a notice for improvement The information in this manual has been carefully checked and is believed to be accurate however if you have noticed a doubtful point a doubtful error etc please contact your local Mitsubishi Electric representative Registration MODBUS is a registered trademark of Schneider Electric S A The company name and the product name to be described in this manual are the registered trademarks or trademarks of each company F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition Table of Contents Table of Contents SAFETY PRECAUTION iiiter b CI EE pisa aai iina 1 Related mMmantdalS airnn 6 Generic Names and Abbreviations Used in Manuals cessere 8 1 Outline 9 Asch OUTING OT 49 VS EGTTI coo 5525 203 905096 0955658 5805001 9819216030 808005002 926000 883690 0 02 002 200090 8 6000002 48 N00 SERO ROUEN IS DENS LEE 9 12 Major PPr cedures urnul Cbperdllori zuerst arme Rea de cam cds ela Me ta 10 1 3 PLC Communication Type Applicability 2 nto trees Do rotten Dn rene ette se Dn Rr tem inel suene 11 1 91 Applicable versions iden ota en stdaxor eio ed text atate bere ate niue duces cae cicuta is eat da sac ee iale 11 1 4 Manufacturer s serial n
74. ails refer to the cautions for the master Cautions on programming MODBUS communication parameters with ST The same cautions as those mentioned for the master apply For details refer to the cautions for the master 36 F X3c F Xau F X3cc FX3uc Series Programmable Controllers 9 Communication Setup User s Manual MODBUS Serial Communication Edition 5 3 Simultaneous N N Networking and MODBUS Communication 5 3 Simultaneous N N Networking and MODBUS Communication When MODBUS communication and N N Network are used simultaneously N N Networking must be setup first at program step 0 After which it is possible to program the MODBUS communication setup as shown below Program for setting up N N Networking N N Networking Setup on Channel 1 For more details on N N Networking refer to the M8038 0 MOV D8176 FX Series User s Manual Data Communication Edition K2 D8177 lt lt lt lt O O O O lt lt lt lt 0 D8178 3 D8179 K5 D8180 Program for setting up a MODBUS Slave For more details on the Communication Setup Parameters refer to Section 5 2 of this manual MODBUS Serial b15 bO Communication Yo rad Channel 2 Th communication 0001 0000 1001 0111 26 MOV H1097 D8420 format is set 1 0 9 7 bit Even 1 bit 19200bps RS485 b15 bO MOV H11 D8421 The protocol is set 0000 0000 0001 0001 0 0 T 4 HH MODBUS Slave RTU Mode O K10 D8431 Message to Message Delay 10
75. al Communication Edition 3 3 Limitation when ch1 and ch2 are used at the same time 3 3 Limitation when ch1 and ch2 are used at the same time 26 Communication setting on Ch2 1 When using Channel 1 ch1 and Channel 2 ch2 at the same time the available communication type combinations are limited For more details refer to the table below Communication channel ch2 Communication channel ch 1 Communication Expansion Communication Expansion FX3gc FX3u FX3GC FX3UC PLCs special adapter board special adapter board v Applicable Not applicable Communication Setting on Ch1 MODBUS Inverter pon abs Oper Heus Programming Remote 3 N N Parallel Computer Communica Communica Serial Com Communi i Communica Mainte f CF card ee Networking Link Link tion RS tion RS2 munication cation tion nance instruction instruction MODBUS Serial z F T P y Communication Example 1 v paralellik f v7 v v v v Jj v Y Y Computertink f 7 v7 v J v v v J J Inverter v v v v v v v v 4 Communication Non protocol Communication v v v v v v v v v v RS2 instruction Programming Ji 7 yf 7 y J J Communication Remote T f V v v v v v v v Maintenance 1
76. anges in product specifications The specifications given in the catalogs manuals or technical documents are subject to change without prior notice Product application 1 In using the Mitsubishi MELSEC programmable logic controller the usage conditions shall be that the application will not lead to a major accident even if any problem or fault should occur in the programmable logic controller device and that backup and fail safe functions are systematically provided outside of the device for any problem or fault 2 The Mitsubishi programmable logic controller has been designed and manufactured for applications in general industries etc Thus applications in which the public could be affected such as in nuclear power plants and other power plants operated by respective power companies and applications in which a special quality assurance system is required such as for Railway companies or Public service purposes shall be excluded from the programmable logic controller applications In addition applications in which human life or property that could be greatly affected such as in aircraft medical applications incineration and fuel devices manned transportation equipment for recreation and amusement and safety devices shall also be excluded from the programmable logic controller range of applications However in certain cases some applications may be possible providing the user consults their local Mitsubishi represen
77. ask 0x17 Read Write Multiple Registers Read Write multiple 16 bit R W registers 0x16 Mask Write Register 1 Available only in FX3u and FX3uc PLCs F X3G F X3u F X3cc FX3uc Series Programmable Controllers 8 Master Specification User s Manual MODBUS Serial Communication Edition 8 2 FNC 276 MODBUS Read Write Instruction A 8 2 FNC 276 MODBUS Read Write Instruction 9ut nQ F X3Gc I AEC F X3uc Ver 2 40 um 8 2 1 Outline This instruction allows the MODBUS Master to communicate read write data with its associated Slaves 1 Instruction Format 16 bit Instruction Ee 32 bit Instruction Operation Condition FNC276l ADPRW Continuous 11 steps ADPRW Operation uoneunBiuo waisks QJ suoneoyioads N 2 Set Data Command Parameter depending on the Command Code See Section 8 3 16 bit binary Command Parameter depending on the Command Code See Section 8 3 Bit or 16 bit binary 3 Applicable Devices ELA Lo E CSS Lon 5 OMe Go Ree eee Sse Titi ty LLL liL ee ee dnjeg uoneounuuo5 Ol So itil t tt ty faye Pe fey S S e 398 Y v v v Loa amp S d e d d 8 A pL d Pe fee VV Ea jl do 7 i oO Oz A Except special auxiliary relay M and special data register D 380 35 U Zr o 8 2 2 Explanation of function and operation 1 16 bit operation ADPRW N Command Code is operated on Slave Node according to Parameters S2
78. ata sub command code 0x00 sesssssssssssesseeeeeeen nennen nenne 65 7 11 2 Restart communications option sub command code 0x01 eeeeeeeeeeeerrereee 66 7 11 3 Return diagnostic register sub Command code 0x02 esessseesseeeeeneeen ees 67 7 11 4 Change ASCII input delimiter sub cCommand code 0x03 esseeeseeeeeeeeenrre 68 7 11 5 Force listen only mode sub command code 0x04 seessseeseeeennn eene 69 7 11 6 Clear counters and diagnostic register Sub command code OXOA ccccccseseeeeeeeeeeeeeeeneeeees 70 7 11 7 Return bus message count sub command code OXOB ccccccseeeeeeeeeeeeeeeeeeeeesaeeeeeeeeeeeeeeeas 71 7 11 8 Return bus communication error count sub command Code OXOC cccceseeeeeeeeeeeeeeeseaeeeees 72 7 11 9 Return bus exception error count sub command code OXOD cccceeseeeeeeeeeeeeeesaaeeeeeeeaeeeees 73 7 11 10 Return slave message count sub command code OXOE ccccsececeeseeeeeeeseseeeesseeeeeesaaaeeees 74 7 11 11 Return slave no response count sub command code OXOF cccccesseeeeeeeeeeeeeeaaeeeeeseaeeeees 15 7 11 12 Return slave NAK count Sub command code 0x10 cceecceecsseeeeeeeeeeeeeeseeeeeeesaeeeeeeseeeeeeeeas 76 7 11 13 Return slave busy count sub command code 0x11 77 7 11 14 Return bus character overrun count Sub command code 0x12 cceeeeeeeseeeeee
79. be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not exceed the gratis warranty term before repairs Gratis Warranty Range 1 The range shall be limited to normal use within the usage state usage methods and usage environment etc which follow the conditions and precautions etc given in the instruction manual user s manual and caution labels on the product 2 Even within the gratis warranty term repairs shall be charged for in the following cases a Failure occurring from inappropriate storage or handling carelessness or negligence by the user Failure caused by the user s hardware or software design b Failure caused by unapproved modifications etc to the product by the user c When the Mitsubishi product is assembled into a users device Failure that could have been avoided if functions or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by industry standards had been provided d Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced e Relay failure or output contact failure caused by usage beyond the specified Life of contact cycles f Failure caused by external irresistible forces such as fires or abnormal voltages and failure caus
80. before the error occurrence will be effective For Auxiliary Relays Data Registers and Counters it is necessary to separate the mapping for standard and special devices as well as 16 and 32 bit devices According to this rule it is not possible to map standard Auxiliary Relay MO M7679 and Special Auxiliary Relay M8000 M851 1 in the same mapping command The same applies for Data Registers amp Special Data Registers 16 bit counters amp 32 bit counters F X3G F X3u F X3cc FX3uc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 4 User defined MODBUS Device Address Assignment 9 4 2 Example of user defined device allocation The following table provides an example of a valid user defined device allocation Robo RS Block Size Number of PLC Head Device P CMEOS ocation evice Code apping DAE Devices 2 Address 1 D8470 4bit Coil 0 31 Coil 32 95 H Register 0 7 H Register 8 9 H Register 10 217 H Register 218 473 H Register 474 489 8 D8484 4bit O D8484 1 2bit ef D8485 pou Unused The example program below shows the defined MODBUS defined device allocation for the table on the previous page 2 D8472 4bit D8474 4bit 4 D8476 4bit oO O 99 A euino uoneunBiuo waisks QJ suoneoyioeds N Suum dnjeg uoneounuuo5 Ol smes wwo pue seoi e peje es sngaon Wl spueululo5 pJepuels
81. cation setting for MODBUJS sssssssesssssseee nennen nnne nnne nennen nnne 44 6 5 Special AUXlar V RElay C B M 45 6A CONIC AOI Stall hee alice det nu N eeitsasdiu luat indecseuta cutie im t ess aT tetas Ime E uud 47 7 MODBUS Standard Commands 48 7 1 MODBUS Standard Commands Support List cc cece ccecceceececeeeeceeeeseeeeeseeeeeseeeeseeeeseeseeaeeeees 48 FA FLAME SOCCINCAUONS MUROS ENDE T 51 TZ i VARS TOO oet rcr adie nt ec ae nn SedenceieonnG ae eswieee 52 7 3 Protocol Data Unit Formats by COMMANGG cceccccceeeeeeeeeeeeeeeeeeeeaeeeeeeseeeeeeseeeeesseeeeeseaeneeeeas 56 7 4 Read Coils Command Code OX01 eese eene nnne nnne 58 7 5 Read Discrete Inputs Command Code 0x02 cccceccecseeeeeeeeeeeeeeeeeeeeseeeeesseeeeeseeeeeeeseeeeesaaeeeeeas 59 7 6 Read Holding Registers Command Code OX03 cccceccceeeseeeeeeeeeeeeseeeeesseeeeeeeeeeesseeeeeeeseeeeeeas 60 7 7 Read Input Registers Command Code Ox04 sssssssssssssseesseseee nennen 61 7 8 Write Single Coil Command Code 0x05 cccccccsseceecseeeeeeeeeceeseeeeesseeeseesseeeesaeeeeessesessaaneeseas 62 7 9 Write Single Register Command Code 0x06 sees nnne nnne nnn nnns 63 7 10 Read Exception Status Command Code 0x07 esses 64 7 14 Diagnostics Command Code 0x08 o iom e E oa Eme cr tease tono eae 65 7 11 1 Return query d
82. ce Coils Read Write 0x0000 0x1DFF MO M7679 Ox1E00 Ox1FFF M8000 M851 1 0x2000 0x2FFF S0 S4095 0x3000 0x313F TS0 TS319 0x3140 0x31FF unused address 0x3200 0x32FF CS0 CS255 0x3300 0x337F YO Y177 0x3380 0x33FF 2 unused address XO X177 2 If unused addresses are accessed an error will occur F X3G F X3u F X3cc FX3uc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 3 MODBUS device address allocation Default Values A Word device 9ut nQ MODBUS Word Device Address i FX3G FX3Gc Device Input Register Read Only Holding Register Read Write 0x0000 0x1F3F 0x0000 0x1F3F DO D7999 Ox1F40 0x213F Ox1F40 0x213F D8000 D851 1 2 0x2140 O0x7 EFF 0x2140 Ox7EFF RO R23999 7 Ox7F00 0xA13F Ox7F00 0xA13F unused add ress 8 e 0xA140 0xA27F 0xA140 0xA27F TNO TN319 2 0xA280 0xA33F 0xA280 0xA33F unused address H OxA340 0xA407 OxA340 0xA407 CNO CN199 3 0xA408 0xA477 0xA408 0xA477 CN200 CN255 2 OL e wn OxA478 0xA657 OxA478 0xA657 MO M7679 g E 0xA658 0xA067 7 0xA658 0xA67 7 M8000 M8511 zi OxA6 8 0xA 7 7 OxA6 8 0xA 7 7 S0 S4095 OxA 8 0xA 8B OxA778 OxAT78B TS0 TS319 4 OxA78C 0xA797 OxA78C 0xA797 unused address lt 0xA798 0xA7A7 0xA798 0xA7A7 CS0 CS255 E OxA7A8 OxA AF OxA7A8 OxAT7AF Y0O Y177 OxA7BO OxA7B7 OxA7BO OxA7B7 unused address 1 If unused addresses are accessed an error will occur DO 23 2 CN200 255 are 32 bit counters z si ej OUD o0 zm
83. ces and Communication Status User s Manual MODBUS Serial Communication Edition 6 1 Special Data Registers Special Data Register Valid Detailed description Displays the protocol that the serial port is currently using Programming Port Protocol Programming Port Modem Mode Computer Link N N Network Communication Master 4 RS Command D8419 D6439 Mode Slave 5 R82 Command Parallel Link Inverter Communication Command Variable analog potentiometer expansion board is used A 9ut nQ c Oo 4o00ci co PnDhD CO MODBUS Serial 10 CF ADP 2 Ww cO D O h e D o 5 wn OW os 50 ct one c3 c D z O 2 If a MOV H D8470 is triggered by LD M8411 during the MODBUS initialization the slave device mapping can be D8470 Slave changed by the user D8471 4 Note For details refer to Section 9 4 If a MOV H D8472 is triggered by LD M8411 during the MODBUS initialization the slave device mapping can be 2 e Slave changed by the user D8473 gea Dy Note For details refer to Section 9 4 5 If a MOV H D8474 is triggered by LD M8411 during the MODBUS initialization the slave device mapping can be aa Boara Slave changed by the user 53 D8475 i 8 Note For details refer to Section 9 4 2 If a MOV H D8476 is triggered by LD M8411 during the MODBUS initialization the slave device mapping can be DD Slave changed by the user Rw D8477 ged 9y
84. cessing of a MODBUS command is completed Command Special clear conditions M8029 Execution Master Complets 1 Power on i 2 STOP to RUN 3 If another command using M8029 is triggered including another MODBUS command If the MODBUS stack is processing a command no further commands can be triggered until the current i h E i MODBUS Haei vH dp and the Command Execution M8401 M8421 Request in Master l Process Special clear conditions 1 Power on 2 STOP to RUN Set during the processing of the current MODBUS command error one Master M8402 M8422 Communication Special clear conditions Slave Error 1 Power on 2 STOP to RUN 3 If another MODBUS command is triggered Set once a MODBUS command error has been processed M8403 M8423 d ii Master M8063 M8438 EAE Slave Special clear conditions Error latched 1 Power on 2 STOP to RUN 0 Normal processing 1 Listen only mode Special clear conditions 1 Power on 2 Reception of a restart command from the master M8404 M8424 ad a Slave Note Received messages are evaluated but no Mode action takes place and no response is sent The only exception is the reset communication option command diagnosis 0x08 sub command 0x01 If this command is received the slave recovers from listen only mode without sending a response all subsequent commands to this slave will be answered with a response as usual 45 A 9ut nQ uoneunBiuo wasg QJ suoneoyioeds N buum A
85. command processing with a timeout error Retries Valid values O to 20 times If a value of 20 or more is set the number of retries used by the master is set to 20 a Slave node address Valid range 1 to 247 D8414 D8434 pera Slave Note If during the initialization a value outside the valid range is detected the configuration is invalid and the slave will not respond to any requests Rw Rw 41 A 9ut nQ uoneunBiuo waisks QJ suoneoyioeds N buum WO D o ee o3 gt C o smes wwo piepuejs snaaow Wl spueululo5 jese y OO uoneoyioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3c F Xau F X3cc FX3uc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 1 Special Data Registers Special Data Register Valid Detailed description Defines the device range that is used to store the communication state event amp error counter and or event log Contents Bit No 0 bit OFF 1 bit ON E Master stored Slave Communication Status Information Setu p 4 bO Event and error Counter values Counter values counter are not stored are stored b4 Event log vent log is not Event log is Slave Only stored Communication b8 status storage D register R register device type One MODBUS event is one byte so one 16 bit register will hold two events F
86. d slave number channel 1 Details Vas Prog D 8414 l Channel Double Use Make sure only one Single channel used for more than one type Master S a above Channel is setup for of communication Slave MODBUS Serial i e MODBUS and N N Networking Communication configured for the same channel F X3c FX3u F Xaac F Xauc Series Programmable Controllers 12 Troubleshooting User s Manual MODBUS Serial Communication Edition 12 6 MODBUS Error Code List MODBUS Error Error Name and Details Code Check Bit level Error aeter Communication 0204 Slave See above Format data register Parity overrun rx register or framing error D8400 or D8420 for errors Check the Communication Format Turn Around CRC LRC Error Delay and Message TN to Message Delay 0205 Message CRC LRC is invalid or message Slave See above data registers for length lt 3 characters RTU or lt 8 characters errors ASCII D8400 and D8410 D8411 or D8420 and D8430 D8431 Check the Turn Bus Character Overrun Around Delay and Message to Message When more than 256 bytes are Delay data registers 0206 received in RTU mode more than 513 Master Sce above for errors bytes in ASCII mode Slave D8410 D8411 or Slave only When another telegram is D8430 D8431 received while the former request is still Also verify that the in process serial port settings are correct Verify that the Slave is using MODBUS Serial Communication and Data Length Mismatch E
87. dard Commands User s Manual MODBUS Serial Communication Edition 7 12 Get Communications Event Counter Command Code OxOB A 7 12 Get Communications Event Counter Command Code 0x0B euino Acquires the number of messages whose requested actions read write diagnostics etc have been normally completed Available only in FX3U and FX3uc PLCs Note Only normally completed messages are counted 1 Request message format Master Slave Function code Function code OBu uoneunBiuo waisks QJ suoneoyioeds N 2 Response message format Slave Master When completed normally Suum Function code Data Function Program command status Communications code 00004 1 event count value OBn 00004 to FFFFu 2 dnjeg uoneounuuo5 Ol H L H b 1 Since the FX Series MODBUS Communication ADP does not support any program commands 0000H is stored 2 The count is stopped if it has reached FFFFH Reset the counter by either of the following methods when restarting the count EE Clearing the counter and diagnostic register Refer to Subsection 7 11 6 389 C o Restart communications option Refer to Subsection 7 11 2 Ss Power OFF ON or the PLC state is changed from STOP RUN Note puepuejs Sngaow The communications event counter counts only when the processing read write diagnostics etc has completed normally The communication
88. e 88H Exception code 2 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for contents 76 storage location confirmation methods and other detailed F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 A 7 11 13 Return slave busy count sub command code 0x11 euino Reads out the number of busy responses to the master The FX Series MODBUS Communication ADP always returns O 1 Request message format Master Slave Function code Sub function code Function Sub function code code 00114 084 b 2 Response message format Slave Master When completed normally uoneunBiuo waisks QJ suoneoyioeds N Function code Sub function code Data Suum Function Sub function code Slave busy count value code 0011 x 0000 x 084 dnjeg uoneounuuo5 Ol 1 Refer to Chapter 6 for the relevant counts count clear methods and precautions When completed with an error Function code Data Function Exception Soe code code 2 328 88u 0 OL Dw 9 D cao 62 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case Qo zx of error completion Refer to Chapter
89. e coils 1 Request message format Master Slave Function code Function code 01H Head coil number 00004 to FFFFH H L 2 Response message format Slave Master When completed normally Function code Function code 01H Number of read bytes Read points 0001H to 07DOu H L Number of read bytes n gt a Device data 1 to n b7 b6 Device data 1 Device data n b5 b4 b3 b2 Bit device storage order The read coil statuses are stored in order from low order to high order bits When the number of read points is not a multiple of 8 the excess bits turn to 0 When completed with an error Function code Data Function code Exception 81H code 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 58 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 5 Read Discrete Inputs Command Code 0x02 A 7 5 Read Discrete Inputs Command Code 0x02 9ut nQ Reads the status ON OFF of one or more inputs 1 Request message format Master Slave Function code Function Head input number Read points code 00004 to FFFFH 00014 to 07DOd 024
90. e message and compares the calculated value to the actual value it received in the CRC field If the two values are not equal an error results A procedure for generating a CRC is 1 Load a 16 bit register with FFFF hex all 1 s Call this the CRC register 2 Exclusive OR the first 8 bit byte of the message with the low order byte of the 16 bit CRC register putting the result in the CRC register 3 Shift the CRC register one bit to the right toward the LSB zero filling the MSB Most Significant bit Extract and examine the LSB Least Significant bit 4 If the LSB was 0 Repeat Step 3 another shift If the LSB was 1 Exclusive OR the CRC register with the polynomial value 0xA001 1010 0000 0000 0001 5 Repeat Steps 3 and 4 until 8 shifts have been performed When this is done a complete 8 bit byte will have been processed 6 Repeat Steps 2 through 5 for the next 8 bit byte of the message Continue doing this until all bytes have been processed 7 The final content of the CRC register is the CRC value 8 When the CRC is placed into the message its upper and lower bytes must be switched as described below F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 2 Frame Specifications A The following is a calculation example in the case where function code 07H is sent to station No 2 9ut nQ CRC error check procedure 16
91. eation ssssssssssssssssseseeee nennen nnne nnne rns nnn nnn nnn 108 11 Practical Program Examples 110 11 1 Setang Program Tor Master Stati n carriicms ote ri Eo e I E seer Pa pU eben Pie 110 11 2 Setting Program Tor Slave Statlori ie c eee d pee eee aoke ie qubs i rane NM qun fu fade 112 12 Troubleshooting 113 12 1 Checking the FX3G FX3U FX3GC FX3UC PLCs Version Applicability 113 12 2 Checking the Communication Status Based on LED Indication sseessssssssse 113 12 9 Checking the Installation and WIFID ss oii ne pott pte FERE RI MEH o RES Ra TRIS UN OUR MUN MU DM eM E Mp HEPU 113 12 4 Checking the Communication Settings and Sequence Program secceeeseeeeeeeeeeeeseeeeeeens 113 12 5 Checking Setting Contents and EmO Sieisen ai n eE AA EEA T EE 114 126 MODBUS Error Code LISE iore or botes ea o Ea 116 Warranty coor a E eee en ieee ind 121 Revised HISTOY criniera a a teenies 122 F X3G F X3u F X3cc FX3uc Series Programmable Controllers Related manuals User s Manual MODBUS Serial Communication Edition Related manuals For a detailed explanation of the MODBUS serial communication network in FX3G FX3U FX3GC F X3uC PLCs refer to this manual For hardware information and instructions on the PLC main unit other special function units blocks etc refer to the appropriate manuals For acquiring required manuals contact the distributor
92. ection Details H Byte Abnormal function code L Byte Exception code Slave Node Address Mismatch The Slave Node address of the response does not match the Slave Node address of the request Details H Byte requested Slave Node address L Byte received Slave Node address Function Code Mismatch The function code of the response does not match the function code of the request Details H Byte requested function code L Byte received function code Illegal Broadcast Command Slave receives broadcast request for command unsupported by broadcast function Details Non Diagnosis Commands L Byte Command Code Diagnosis Commands Command Code 08H Sub Command Code Master Slave Slave See above Slave See above Related Devices M amp D Corrective Action Verify that the MODBUS Device Address Allocation of the Slave is set correctly Ensure master data is in a valid range for a selected command Confirm that the master is accessing valid device ranges Verify that the Slave Node Address and communication parameters are setup correctly Verify that the command and command parameters used is within the Master and Slave specifications See Corrective Actions for Error Code 207 See Corrective Actions for Error Code 207 Verify that the command is within the Slave Specifications and that broadcasting is applicable Chapter 7 F X3c F
93. ed by force majeure such as earthquakes lightning wind and water damage g Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi h Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not available after production is discontinued Overseas service Overseas repairs shall be accepted by Mitsubishi s local overseas FA Center Note that the repair conditions at each FA Center may differ Exclusion of loss in opportunity and secondary loss from warranty liability Regardless of the gratis warranty term Mitsubishi shall not be liable for compensation of damages caused by any cause found not to be the responsibility of Mitsubishi loss in opportunity lost profits incurred to the user or third person by Failures of Mitsubishi products special damages and secondary damages whether foreseeable or not compensation for accidents and compensation for damages to products other than Mitsubishi products replacement by the user maintenance of on site equipment start up test run and other tasks Ch
94. ed in D8406 D8426 Address field 2 characters Function code 2 characters n x 2 characters 2 ch t n 0 to 252 characters 1 Request message format Master gt Slave Function code Sub function code Change this into a specified data Data Function code 084 Note Sub function code 00034 Input delimiter setting OOH to FFu Ox3A 0 9 0x30 0x39 A F 0x41 0x46 and a f 0x61 0x66 should not be used as they might occur within the message and cause false end of frame detection 2 Response message format Slave Master When completed normally The slave returns the request message received from the master without change When completed with an error Function code Data Function code 88H Exception code 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 68 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 A 7 11 5 Force listen only mode sub command code 0x04 euino Places a slave into the offline mode Used when disconnecting a slave from the network When FX Series MODBUS Communication ADP is set in the lis
95. eeaeeeeesaaeeeees 78 7 12 Get Communications Event Counter Command Code OXOB ccccceeseeeeeseeeeeeeeeeeeeeaeeeeeeas 79 7 13 Get Communications Event Log Command Code OXxOC ccecccceseeeeeeeeeeeeeaeeeeseeeeeeseaaeeeeeas 80 7 14 Write Multiple Coils Command Code OXOF c cccccccseeeeeesseeeeeseeeeeeseeeeeeaeeeeesseeeeesseeeeesaaeeeeeas 81 7 15 Write Multiple Registers Command Code 0X10 ccccccccseeeeeeeeeeeeeaeeeeeeseeeeeeaeeeeeeseeeeesaeeeeeeas 82 7 16 Report Slave ID Command Code 0X11 eese nne nnne 83 7 17 Mask Write Register Command Code 0x16 ccccccccseceeeeeeeeeeeseeeeeseeeeesseeeeesseeeeeeseeeeesaeeeeneas 84 7 18 Read Write Multiple Registers Command Code 0X17 ccccccseeeeeceeeeeeeeeeeeeseeeeeeaeeeeeeeaeeeeeens 85 8 Master Specification 86 8 1 MODBUS Master Command List ccccccecccceececeeeeeceeeeeeeeeeceeceseeeceseeeesseeeeseeseeseeeesseeesseeesaneeees 86 8 2 FNC 276 MODBUS Read Write Instruction lsseeesssesssssssseeeeneeeenneenn enne 87 SEM MEI m TP 87 8 2 2 Explanation of function and operation ccc ceccccceecccceceeceeeeeceeeeeeceeececeeeeeeseeeeseeeeeeseaeeesaeeeeessaes 87 8 3 ADPRW Command Parameters ccccccceccccececeeececeeeeeseececeeeeeseeeecsaeeeseueessaeeeseusesseeeeseneessneeeeas 88 F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s
96. eoi e peje es spueululo5 piepuejs snaaow Wl jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea 15 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 2 Specifications User s Manual MODBUS Serial Communication Edition 2 2 Link Time 2 2 Link Time The link time indicates the cycle time in which a Master module completes a single command with a Slave as illustrated by the diagram below XO ww MO FNC276 Kk kk ADPRW M8029 ww Instruction execution complete flag MO M8029 Master processing time Tm T1 T2 T3 aster Message to Message Delay cune KR 2 K Request Sending Slave Delay Response l Receiving 19 9 Character iwait processing T6 T7 T8 T9 T10 T4 T42 T3 Request Receiving Slave Message to N Message Dela m processing T14 Tb FE Slave processing time Ts 16 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 2 Specifications User s Manual MODBUS Serial Communication Edition 2 2 Link Time The Master processing time Tm can be calculated in milliseconds ms as follows where INT n indicates the concatenation of any remaining decimal values Character Length bits Start bit 1bit Data Length 7bit or 8bit Parity Obit or 1bit Stop bit 1bit or 2bit Tm 7 T1 T2 T3 T4 T1 INT ___
97. eption code 05H or 06H when using FX3U slave unsupported fixed to 0 Slave NAK Negative acknowledge exception sent exception code 07H when using FX3U slave unsupported fixed to 0 Write timeout error occur when using FX3U slave unsupported fixed to 0 Currently in listen only mode Slave send event fixed to 1 Slave send event fixed to O Note As the FX Series MODBUS Communication ADP will never be in a state that details exception code 05H to 07H Therefore the bits 2 3 amp 4 will always read 0 when using a FX Series MODBUS Communication ADP 3 When switching to the listen only mode The slave stores this kind of event to the communications event log when switching to the listen only mode 04H is stored to the communications event log b7 b6 b5 b4 b3 b2 b1 b0 0 0j0 0 0 1 0j 0 104 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 5 Communication Event log A 4 When processing restart communications option The slave stores this kind of event to the communications event log when processing the restart communications option OOH is stored to the communications event log b7 b6 b5 b4 b3 b2 b1 bO euino 5 Clearing the communications event log The communications event log can be cleared by either of the following Clear setting of the communications event log with the restart communications option Refer t
98. ers 9 Communication Setup User s Manual MODBUS Serial Communication Edition 5 1 Setup method for MODBUS serial communication 5 Communication Setup This chapter explains the setup method for using the MODBUS protocol with an FX3G FX3U FX3GC FX3UC PLCs and MODBUS Communication ADP 5 1 Setup method for MODBUS serial communication MODBUS communication is setup via the PLC program using GX Works2 or GX Developer 5 2 Example of communication setup To initiate the setup the PLC program must use the auxiliary relay M8411 for Channel 1 or Channel 2 When the PLC program contains the LD M8411 instruction it is then possible to configure the MODBUS functionality using MOV operations The communication parameters for MODBUS communication can be setup using the following ladder code Parameters for a Master using Channel 1 D8411 For Descriptions refer to Chapter 6 1 Available only in FX3u and FX3uc PLCs F X3c FX3u F Xacc F Xauc Series Programmable Controllers 9 Communication Setup User s Manual MODBUS Serial Communication Edition 5 2 Example of communication setup The ladder code for setting the Master parameters can be expressed as follows Program for setting up a MODBUS Master b15 bO 0001 0000 1001 0111 MODBUS Serial Communication Setup The commumcaten 0 Mes format is set 1 0 9 7 bit Even 1 bit 19200bps RS485 i b15 bO MOV The protocol is set 0000 0000 0000 0001 0 0 0 1
99. es Programmable Controllers 1 Outline User s Manual MODBUS Serial Communication Edition 1 3 PLC Communication Type Applicability 1 3 PLC Communication Type Applicability 1 3 1 Applicable versions The communication type is applicable in the following versions PLC Applicable version Remarks FX3G Series Ver 1 30 or later FX3U Series Ver 2 40 or later FX3GC Series Ver 1 40 or later From first product FX3UC Series Ver 2 40 or later 1 Version check The D8001 D8101 decimal special data register contains information for determining the PLC version D8001 D8101 ral fal fal p 1 PLC type and version PLC type Example 24 FXs3u FX3uc Series 26 FXac FX3cc Series 1 4 Manufacturer s serial number check method of special adapter 1 Checking the nameplate The year and month of production of the special adapter can be checked from the manufacturer s serial number S N indicated on the label adhered to the left side of the product Example FX3U 485ADP MB manufacture s serial number 1010001 MITSUBISHI PRR ere Left side MODEL FXsu 485ADP MB us LISTED 80M1 IND CONT EQ C PA MITSUBISHI ELECTRIC CORPORATION MADE IN JAPAN Actual product nameplate differs from the example shown above Product during December 2009 or earlier Product from January 2010 ejz 0 o 0 1 0 1 6 6 6 1 bok bleneenesessend Lensnencenessedi
100. from where your product was purchased Essential manual OManual required depending on application Manual with additional manual for detailed explanation Manual Model Contents number name code Manual name Manuals for PLC main unit MF X3G PLC main unit I O specifications wiring and installation of the Supplied FX3G Series PLC main unit FX3G extracted from the FX3G x with Hardware Nania JY997D33401 Series User s Manual Hardware Edition For product detailed explanation refer to the FX3G Series User s Manual Hardware Edition Additional FX3G Series Details about the hardware including I O Manual User s Manual JY997D31301 specifications wiring installation and 09R521 Hardware Edition maintenance of the FX3G PLC main unit BIFX3U PLC main unit I O specifications wiring and installation of the Supplied FX3U Series PLC main unit FX3U extracted from the FX3U A with Hardware Manual JY997D18801 Series User s Manual Hardware Edition For product detailed explanation refer to the FX3U Series User s Manual Hardware Edition Additional FX3U Series Details about the hardware including I O User s Manual JY997D16501 specifications wiring installation and 09R516 Manual Hardware Edition maintenance of the FX3U PLC main unit BIFX3GC PLC main unit I O specifications wiring and installation of the PLC main unit FX3GC extracted from the BURP Ie FX3GC Series FX3GC Series User s Manual
101. g channel 2 ch 2 500 m 1640 5 xui m Sit a ipu a f FX3u 232ADP MB FX3U 485ADP MB FX3u 485ADP MB European terminal block 23 A euino ep UO D Q O A o 5 o uejs S uoneunBiuo buum A dnjeg uoneounuuo5 Qf o smes wwo pue seoi e peje es snaaow Wl spueululo5 pyepuels jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3G F X3u F X3cc FX3uc Series Programmable Controllers 3 System Configuration User s Manual MODBUS Serial Communication Edition 3 2 Applicable FX PLC and Communication Equipment FX Series Communication equipment option ird Check When using channel 1 ch 1 500 m 1640 5 b FX3U CNV BD FX3U 485ADP MB European terminal block H 500 m ps 1640 5 FXsU LI BD FX3U 485ADP MB FX3U Where L1 represent either European terminal block 232 422 485 USB and 8AV When a FX3u 8AV BD is used it occupies one communication port channel ch1 E H ET H pe L B 500 m BET x 1640 5 FX3U CNV BD FX3u 232ADP MB FX3u 485ADP MB FX3U 485ADP MB European terminal block FX3U CF ADP When a FX3U CF ADP is used it occupies one communication port channel When using channel 1 ch 1 500 m 1640 5 Eom FX3U 485ADP MB e European terminal b
102. ial data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 62 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 9 Write Single Register Command Code 0x06 A 7 9 Write Single Register Command Code 0x06 euino Writes a value to one holding register 1 Request message format Master Slave Function code Function Holding register number Write data code 00004 to FFFFu 00004 to FFFFu 06H H b H L 2 Response message format Slave Master When completed normally The slave returns the request message received from the master without change uoneunBiuo waisks QJ suoneoyioeds N When completed with an error Suum Function code Data Function Exception code code 86x dnjeg uoneounuuo5 Ol 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents pue seoi e peje es Q O 3 3 Co o pyepuels Shadow spueuJlulo5 jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 63 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MOD
103. ice head address Slave ID 1 RUN STOP State Applicable Devices Block Length 2 Point Source Data Destination PLC Device OR Mask Sub function 10H Return NAK Counter Sub function 11H Return Slave Busy Counter Sub function 12H Return Character Overrun Counter MODBUS Address Device Count Applicable Devices 0000H FFFFH 1 1968 Block Length MODBUS Address Device Count 1 123 0000H FFFFH i D R indexing F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 8 Master Specification 8 3 ADPRW Command Parameters Command Code 16H Mask Write Register 17H Read Write Multiple Registers S2 S3 Device Address Sub command Code Device Count Sub command Data AND Mask I Source Data Destination PLC Device OR Mask Applicable Devices D R indexing Ke H MODBUS Address AND Mask 0000H FFFFH 0000H FFFFH MODBUS Address Device Count Write Address 0000H FFFFH Write Count 1 121 1 Read Address 0000H FFFFH 1 Read Count 1 125 1 Available only in FX3u and FX3uc PLCs OR Mask 0000H FFFFH Applicable D R Ke H Devices indexing Block Length 1 Point PLC Destination Device head address Write Data 1 1 Write Data 2 Write Count 1 Write Data S3 83 Read Data 1 S3 1 Read Data 2 S4 Read Count
104. ints H 00 0000 0000 Read points L 08 0000 1000 OB F4 F5 Addition result 0000 1011 Bit reversal 1 1111 0100 1 2 s complement 1111 0101 uoneunBiuo waisks QJ suoneoyioads N LRC Error check buum San Address field Function code Head oT number Read points LRC i Error check CR LF on OOH OOH 08H dnjeg uoneounuuo5 Ol pue seoi e peje es Q O 3 3 Co o pyepuels Shadow spueuJlulo5 jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 55 F X3G FX3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 3 Protocol Data Unit Formats by Commands 7 3 Protocol Data Unit Formats by Commands This section describes MODBUS protocol data unit formats used by the FX Series MODBUS Communication ADP 1 Precautions a When the FX Series MODBUS Communication ADP receives a broadcast request message Although the processing requested by the request message is performed etc no response message is sent to the master b When the FX Series MODBUS Communication ADP receives a request message in the listen only mode Received messages are evaluated but no action takes place and no response is sent The only exception is the reset communication option command diagnosis 0x08 sub command 0x01 If this command is received the slave recovers from listen only mode w
105. ithout sending a response all subsequent commands to this slave will be answered with a response as usual For further information refer to Chapter 6 2 When the processing is completed in error at the slave FX Series MODBUS Communication ADP When the processing read write diagnostics etc requested by the request message is completed in error an exception code is sent to the master Response message formats when completed with an error in Section 7 4 to 7 18 a Storage location of exception code and error code Refer to Chapter 6 for storage location confirmation methods and other detailed contents 56 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 3 Protocol Data Unit Formats by Commands 3 How to see the request response message formats provided in Section 7 4 to 7 18 a Request Response message format diagram The following shows how to see the request response message format diagrams provided in Section 7 4 to 7 18 Area name Function code Frame contents gt Function Head coil number Read points code 0000H to FFFFH 0001H to 07DOH For request message format 01H Setting range For response message format H L Tae Sled Ome i y When a single data is expressed by 2 bytes response message 1 byte 8 bits 1 byte 8 bits set the upper byte 8 bits as H and the lower byte 8 bits a
106. jese y OO Ww UO D oO o e o uoneoyioads S suJeJ60Jgd unea F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 9 Slave Specification 9 4 User defined MODBUS Device Address Assignment 100 MODBUS Serial Communication Setup M8411 D8400 T fee ERE MOV H11 perpe pe Les Dem Program for Setting up MODBUS Slave For more details on the Communication Setup Parameters refer to Section 5 2 of this manual Example Program for User Defined MODBUS Device Assignment MODBUS Device Mapping 1 X mapped coils Block Size 2 MODBUS Device Mapping 1 Head device address 0 Mapping X0 X37 MODBUS Device Mapping 2 M mapped into coils Block Size 4 MODBUS Device Mapping 2 Head device address 128 Mapping M128 M191 MODBUS Device Mapping 3 TS mapped into H register Block Size 8 MODBUS Device Mapping 3 Head device address 0 Mapping TSO TS127 MODBUS Device Mapping 4 CS mapped into H register Block Size 2 MODBUS Device Mapping 4 Head device address 128 Mapping CS128 CS159 MODBUS Device Mapping 5 D mapped into H register Block Size 13 MODBUS Device Mapping 5 Head device address 1000 Mapping D1000 D1207 MODBUS Device Mapping 6 R mapped into H register Block Size 16 MODBUS Device Mapping 6 Head device address 0 Mapping RO R255 MODBUS Device Mapping
107. lag Destination Device Head DO M8029 8 coil device values starting at MODBUS Address 100 of Slave 0x02 are read to the first 8 RST wo bits in DO of the Master 1 Available only in FX3u and FX3uc PLCs 106 F X3c F Xau F X3cc FX3uc Series Programmable Controllers 10 Creating Programs User s Manual MODBUS Serial Communication Edition 10 3 Creating Programs for the Slave Station Restart Communication with Slave 0x0A Program for Restarting Communication Slave Address 0x0A Command Code 0x08 Subcommand Code 0x01 Subcommand Parameter OxFFOO Reset Event Log Destination Device Head RO Communication is restarted between the M8029 RST M10 Master and Slave 0x0A and the Slave Communication Event Log and Event and Error Counter is reset M10 ADPRW H8 H1 HOFFOO Command Complete Flag Program for Reading Writing Multiple Registers D10 Command Parameters D10 90 Read Write Multiple Registers from to Slave 0x05 D11 150 M20 MOVP K90 D12 27 MOVP K150 D13 31 Slave Address 0x05 Command Code Ox17 Bas Write Address 90 D10 MOVP K31 Read Address 150 D11 Write Count 27 D12 Read Count 31 D13 Source Destination Device Head D100 27 register device value starting at D100 of ODE RUD the Master are written to MODBUS Address 90 and onward for Slave 0x05 and 31 register device values starting at MODBUS Address Command Complete Flag 150 of Slave 0x05 are read to D
108. les using the procedure described below 4 3 1 Twisted pair cable Use shielded twisted pair cables for connecting communication equipment operating in accordance with MODBUS RS 485 1 Cable structural drawing reference op Uo D O O e o 2 o wm Og 50 ct rer c3 E e a o 5 Example of two pair cable structural drawing Example of three pair cable structural drawing 2 RS 485 cable specifications Item Description Cable type Shielded cable 5 Number of pairs 2p 3p 29 Conductor resistance 20 C 88 0 km or less 78 Insulation resistance 10000 MQ km or more 8 Dielectric withstand voltage 500VDC 1minute 5 Electrostatic capacitance 1 kHz 60nF km or less by an average 6 Characteristic impedance 100 kHz 1107 10 Q OUO apa C o ea EE a0 gs Sx 2 9 uoneoyioeds 9Ae S Lo h suJeJ60Jd unea 29 F X3c FX3u F X3cc FX3uc Series Programmable Controllers 4 Wiring User s Manual MODBUS Serial Communication Edition 4 3 Selecting Cables and Terminal Resistors RS 485 4 3 2 Connecting cables 1 European type terminal block Use shielded twisted pair cables for connecting communication equipment operating in accordance with MODBUS RS 485 The table below shows applicable cables and tightening torques Cable size when Cable size when Bar terminal with Tool size eme A one cable is two cables are Insulating sleeve torque connected connected c
109. ll Delimiter ey change the delimiter Switch slave to Listen Only Mode Note When the slave enters Listen Only Mode active communication controls are turned off 0x04 Force Listen Only Mode except for the Restart Communication Option 0x08 command While the device is in this mode Diagnosis any MODBUS messages addressed to it or broadcast are monitored but no actions will be taken and no responses will be sent OxOA eee Poe Clear all counters and the diagnostic registers Diagnostic Register Return Bus Message Count Read number of detected messages Return Bus Communication Read number of detected communication Ox0C Error Count errors Return Bus Exception Error Read number of detected exception OxOD c Count conditions Mu i Read number of received requests Count dd Mo QspoSe Read No Response counter of the slave Return Slave NAK Count Read NAK counter of the slave Return Slave Busy Count Read Busy counter of the slave Return Bus Character Read Bus Character Overrun counter of the 0x12 Overrun Count slave 0x07 Read Exception Status 92 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 2 MODBUS device address allocation Command Code Subcommand Command Name Details Code 0 op Get Communication Event Read communication event counter A Counter 4 Get Communication Event m Ox0C Log Read communication event log OxO
110. lock FX3UC D DS DSS J 1 500 m p 1640 5 FX3U 232ADP MB FX3U 485ADP MB FX3U 485ADP MB European terminal block FX3U CF ADP When a FX3U CF ADP is used it occupies one communication port channel 24 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 3 System Configuration User s Manual MODBUS Serial Communication Edition 3 2 Applicable FX PLC and Communication Equipment FX Series Communication equipment option ird Check When using channel 1 ch 1 500 m 1640 5 FX3U CNV BD FX3U 485ADP MB European terminal block When using channel 2 ch 2 500 m Heal E 1640 5 FXs3u L BD FX3U 485ADP MB FX3UC 32MT LT Where L1 represents European terminal block 2 232 422 485 USB and 8AV When a FX3u 8AV BD is used it occupies one communication port channel 2s 500 m 1640 5 FX3uU CNV BD FX3u 232ADP MB FX3u 485ADP MB FX3U 485ADP MB European terminal block FX3U CF ADP When a FX3U CF ADP is used it occupies one communication port channel 25 A 9ut jnQ ep UO D Q O A o 5 o Uejs S uoneunBiuo buum dnjeg uoneounuuo5 Qf o smes wwo pue seoi e peje es snaaow Wl spueuJlulo5 pJepuels jasen OO uoneoyioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3G F X3u F X3cc FX3uc Series Programmable Controllers 3 System Configuration User s Manual MODBUS Seri
111. ltage lines Install module so that excessive force will not be applied to the built in programming port power connectors I O connectors communication connectors or communication cables Failure to do so may result in wire damage breakage or PLC failure GHEE S2fety Precautions IE Read these precautions before use 2 WIRING PRECAUTIONS DANGER Make sure to cut off all phases of the power supply externally before attempting installation or wiring work Failure to do so may cause electric shock or damage to the product Make sure to attach the terminal cover offered as an accessory before turning on the power or initiating operation after installation or wiring work Failure to do so may cause electric shock Make sure to observe the following precautions in order to prevent any damage to the machinery or accidents due to abnormal data written to the PLC under the influence of noise 1 Do not bundle the main circuit line together with or lay it close to the main circuit high voltage line or load line Otherwise noise disturbance and or surge induction are likely to take place As a guideline lay the control line at least 100mm 3 94 or more away from the main circuit or high voltage lines 2 Ground the shield wire or shield of the shielded cable at one point on the PLC However do not use common grounding with heavy electrical systems Make sure to properly wire to the terminal block European type in accordance with
112. m 49 2 FX3G 14 point 24 point FXaG CNV ADP FX3U 232ADP MB type 9 pin D Sub male 15m 49 2 FX3U 232ADP MB 9 pin D Sub male FX3G 1 og 40 point 60 point type 15m 49 2 FX3G CNV ADP FX3U LIADP MB FX3U 232ADP MB Where O represents 9 pin D Sub male 232 and 485 Ch2 is not available when the FX3G 232 BD FX3G 422 BD FX3G 485 BD or FX3G 8AV BD is connected in the second expansion board slot When using channel 1 ch 1 15m 49 2 FX3u 232ADP MB 9 pin D Sub male When using channel 2 ch 2 ch1 yr ipei fan omm op ae 1 it i ET d aa stl FX3u 232ADP MB FX3u 232ADP MB FX3U 485ADP MB 9 pin D Sub male d 15m 49 2 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 3 System Configuration User s Manual MODBUS Serial Communication Edition 3 2 Applicable FX PLC and Communication Equipment FX Series Communication equipment option ird Check When using channel 1 ch 1 15m 49 2 FX3U CNV BD FX3u 232ADP MB 9 pin D Sub male p HE 15m be din I 49 2 B n FX3u L BD FX3u 232ADP MB FX3U Where L1 represents either 9 pin D Sub male 232 422 485 USB and 8AV When
113. mber register number bytes device data m device data n 174 0000H to FFFFH 00014 to 007Dx 00004 to FFFFH 0001H to 00794 DM 1 in to O0F2u H L H L H L H L BE Number of bytes m x 2 1 The number of the specified write points must be matched with the number of bytes uoneunBiuo wasg QJ suoneoyioads N Suum 2 Response message format Slave Master When completed normally Function code Function Number of Read EP Read code bytes device data device data 17u nx2 1 n dnjeg uoneounuuo5 Ol H D H D s Number of bytes n x 2 gt When completed with an error pue seoi e peje es Q O 3 3 Co o Function code Data Function code Exception 974 code 2 pyepuejs Sngaow spueuJlulo5 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 85 F Xac F X3u F Xacc F Xauc Series Programmable Controllers 8 Master Specification User s Manual MODBUS Serial Communication Edition 8 1 MODBUS Master Command List 8 Master Specification This chapter explains the MODBUS Master functions supported by the FX Series MODBUS
114. ments such as normal vs reverse rotation and an interlock circuit to prevent damage to the equipment at the upper and lower positioning limits 2 Note that when the PLC CPU detects an error such as a watchdog timer error during self diagnosis all outputs are turned off Also when an error that cannot be detected by the PLC CPU occurs in an input output control block output control may be disabled External circuits and mechanisms should be designed to ensure safe machinery operation in such a case Note that the output current of the service power supply for sensors varies depending on the model and the absence presence of extension blocks If an overload occurs the voltage automatically drops inputs in the PLC are disabled and all outputs are turned off External circuits and mechanisms should be designed to ensure safe machinery operation in such a case Note that when an error occurs in a relay triac or transistor output device the output could be held either on or off For output signals that may lead to serious accidents external circuits and mechanisms should be designed to ensure safe machinery operation in such a case CAUTION Do not bundle the main circuit line together with or lay it close to the main circuit high voltage line or load line Otherwise noise disturbance and or surge induction are likely to take place As a guideline lay the control line at least 100mm 3 94 or more away from the main circuit or high vo
115. mmunication l eru Subsection 0x01 Communication Remote l e 7 11 2 Option Communication Reset Return Diagnostic ida our Subsection 0x02 register of vendor Register 7 11 3 specified data 0x08 Change ASCII Diagnosis Change ASCII Input mode End of Subsection 0x03 ie v Delimiter Message 7 11 4 character 0x04 Force Listen Only Switch slave to Subsection Mode Listen Only Mode 7 11 5 Clear Counters and Ceara Coumigrs Subsection Ox0A and the diagnostic Diagnostic Register 7 11 6 registers 0x0B Return Bus bes a zi Subsection Message Count 7 11 7 messages Command Subcommand Code 48 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 1 MODBUS Standard Commands Support List A Accessible O Command Subcommand Code Command Name Devices per Broadcast Reference 3 Message Return Bus Read number of E detected Subsection Ox0C Communication x communication 7 11 8 2 Error Count errors Return Bus Read number of detected Subsection Q 0x0D Exception Error x x exception 7 11 9 e Count D conditions OxOE Return Slave Read number of x Subsection 3 Message Count received requests 7 11 10 Read No oS 0x08 OxOF Return Slave No Response x Subsection es Diagnosis Response Count counter of the 7 11 11 slave S Return Slave NAK SEO Subsection 4 0x10 counter of the x Count 7 11
116. more after the response from the PLC has been received Command Next Command sending sending 100us or more PLC side Master External equipment Slave 100us or more External equipment Master PLC side Slave 109 A 9ut nQ uoneunBiuo waisks QJ suoneoyioeds N buum dnjeg uoneounuuo5 Ol smes wwo pue seoi e peje es sngaon Wl spueuJulo5 pJepuels jesey OO uoneayioads mi D 2 O qp j O ev a o ES F X3c FX3u F X3cc FX3uc Series Programmable Controllers 11 Practical Program Examples User s Manual MODBUS Serial Communication Edition 11 1 Setting Program for Master Station 11 Practical Program Examples This chapter gives practical program examples of how FX MODBUS Serial Communication can be used 11 1 Setting Program for Master Station The FX MODBUS Master station can be used to execute a sequence of MODBUS commands in a cycle as shown in the following program The following program example reads coils reads holding registers writes coils and writes to registers repeatedly while using an Error Handling routine Program for setting up a MODBUS Master M8411 H1081 D8400 For more details on the Communication Setup 0 MON Hio D8400 Parameters refer to Section 5 2 of this manual MOV K100 D8416 1 ADPRW M100 Read Discrete Inputs Command M8029 M8402 Command Complete Processing MOV K1M100 K1Y000 When Error
117. ms MOV D8434 Slave Node Address Slave Number 1 b15 bO The Communication MOV H11 D8435 Status Information 0000 0000 0001 0001 Setup is set 0 0 1 4 Store Counter and Log to D Devices MOV K100 D8436 Communication Status Device Range Setup Storage Head Device D100 1 Available only in FX3u and FX3uc PLCs 37 A 9ut nQ uoneunBiuo wasg QJ suoneoyioeds N buum Q o 3 3 c 2 z e 5 o smes wwo pue seoi e peje es snaaow Wl spueululo5 pJepuels jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3c F Xau F X3cc FX3uc Series Programmable Controllers 9 Communication Setup User s Manual MODBUS Serial Communication Edition 5 4 Cautions on Communication Setup 5 4 Cautions on Communication Setup 38 1 Timing of Communication Parameters Though the MODBUS communication parameters are setup using the PLC program the parameters become effective only after the PLC power is switched from OFF to ON N N Networking and MODBUS Communication If N N Networking and MODBUS communication are setup for the same channel the N N Networking will operate however the MODBUS settings will be ignored If this situation occurs a channel double use error Error Code 203 in D8402 or D8422 will be displayed for the corresponding channel within the PLC For details on MODBUS errors and error devices refer to Chapter 12 Using the MODBUS Co
118. n using the communication port Ch1 set D8400 When using the communication port Ch2 set D8420 1 D8400 and D8420 communication format By setting values to D8400 or D8420 the data length parity baud rate etc can be set The table below shows the contents of D8400 and D8420 Contents 0 bit OFF 1 bit ON Bit No Parity b1 b2 b1 b2 Parity 0 0 Not provided 0 1 Odd 1 1 Even b4 b7 b6 b5 b4 b7 b6 b5 b4 b7 b6 b5 b4 b5 0 0 1 1 300 0 1 1 1 4800 1 0 1 1 57600 bG Baud rate bps 0 1 0 0 600 1 0 0 0 9600 1 1 0 0 Reserved b7 0 1 0 1 1200 1 0 O 1 19200 1 1 0 1 115200 1 0 1 1 0 2400 1 0 1 0 38400 b12 H W type RS232C RS485 1 Please set data length as 8 bits for of RTU mode In the case of 7 bits there is a possibility that data may be missing F X3c FX3u F Xaac F Xauc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 3 Special Auxiliary Relays 6 3 Special Auxiliary Relays The table shows the Special Auxiliary Relays used for MODBUS serial communication Special Device a Valid Detailed Description R W CH1 CH2 MODBUS LD M8411 can be used to trigger a set of subsequent Master MOV commands that initialize the MODBUS function M8411 Configuration Slave Request Flag Note For details refer to Section 5 2 This bit is turned on if the pro
119. nd functions of the special data registers and special auxiliary relays are described for MODBUS serial communication 6 1 Special Data Registers The table shows the Special Data registers used in MODBUS serial communication Special Data Register Valid Detailed description Communication Master This device sets the communication format D8400 D8420 Ha Format Note For details on communication format refer to Section 6 2 Selection of the channel used RTU or ASCII mode and Master or Slave identification Contents Bit No 0 bit OFF 1 bit ON bO Protocol Other communication MODBUS Selection protocol serial line D8401 D8421 Protocol nern pg Masten SVS OpBUS Masir OPRU RW Slave setting Slave i b8 RTU ASCII 5 Note When both flags bO of D8401 and bO of D8421 are turned on priority will be given to CH1 and CH2 will no longer operate Current error code generated by the MODBUS function Communication Master ENEN D8402 D8422 Special clear conditions Error Code Slave 1 Power on 2 STOP to RUN master only Current error details Special clear conditions Master D8403 D8423 Error Details ISlave 1 Power on 2 STOP to RUN master only Note Refer to the Error table in Section 12 6 STEP number of the first ADPRW command that caused the original error Special clear conditions Error step ONEN D8404 D8424 abet Master 2 STOP to RUN Note If the step number is greater than 3
120. nfiguration Request Flag M8411 The Auxiliary Relay M8411 is a special relay used for MODBUS Serial Communication setup only Do not use the PLC ladder program or any other External Devices to set or reset this relay at any time Do not use any coils or conditionals before the MODBUS Configuration Request Flag or between the MODBUS Configuration Request Flag M8411 and the MOV commands Using other coils or conditionals before or after the MODBUS Configuration Request Flag during Communication Setup will invalidate the MODBUS Communication Parameters and thereby disable MODBUS Serial Communication When LD M8411 is used twice or more only the MODBUS communication parameters setup by the last LD M8411 becomes effective and the MODBUS communications parameter setup by any other LD M8411 becomes invalid Because of this it is recommended that LD M8411 is only used once Communication Setup Syntax All MODBUS Communication Parameters must be setup using the MOV command and Constants meaning a K or H value Using non constant indirect devices during communication setup will invalidate the MODBUS Communication Parameters and thereby disable MODBUS Serial Communication F X3c FX3u F Xaac F Xauc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 1 Special Data Registers 6 Related Devices and Communication Status In this section the device numbers a
121. ng MODBUS communication parameters with ST When you program MODBUS communication parameters with ST please program the MOV commands in the same way as the following program example Program example MOV MOV MOV MOV MOV MOV MOV MOV M8411 H1097 D8400 H1 D8401 K2000 D8409 K400 D8410 K10 D8411 K3 D8412 H1 D8415 K100 D8416 Parameters for a Slave using Channel 1 D8414 For Descriptions refer to Chapter 6 D8415 Communication Status Information Setup D8416 Communication Status Device Range Setup 1 Available only in FX3u and FX3uc PLCs The ladder code for setting the Slave parameters can be expressed as follows Program for setting up a MODBUS Slave b15 bO 0001 0000 1001 0111 MODBUS Serial Communication Setup The communication 0 peed D8400 format is set 1 0 9 7 bit Even 1 bit 19200bps RS485 i b15 bO H11 The protocol is set 0000 0000 0001 0001 MO 0 0 1 1 MODBUS Slave RTU Mode Message to Message Delay 10ms Slave Node Address Slave Number 1 b15 bO The Communication Status Information 0000 0000 0001 0001 Setup is set 0 0 1 1 Store Counter and Log to D Devices Communication Status Device Range Setup Storage Head Device D100 1 Available only in FXau and FX3uc PLCs Cautions on programming MODBUS communication parameters with structured ladder FBD The same cautions as those mentioned for the master apply For det
122. nt operating For selection refer to in accordance with in accordance with in accordance with Chapter 3 MODBUS RS 485 MODBUS RS 485 MODBUS RS 485 For wiring refer to phe Chapter 4 In the case of RS 232C 15 m 49 2 FX PLC FX PLC Master station Slave station No 1 01H Communication Communication equipment operating equipment operating in accordance with in accordance with MODBUS RS 232C MODBUS RS 232C Note MODBUS Slave Nodes do not need to be numbered in any specific order N O D o zh C O e N 94 50 ct e c3 S F O buum dnjes uoneounuuo5 Qf o smes wwo pue seoi e peje es piepuejs snaaow Wl spueululo5 jasen OO uoneoyioedg uoneouioeds 9 e S Lo h suJeJ60Jgd unea F X3G F X3u F X3cc FX3uc Series Programmable Controllers 1 Outline User s Manual MODBUS Serial Communication Edition 1 2 Major Procedures until Operation 1 2 Major Procedures until Operation The flow chart below shows the procedure for setting up the MODBUS serial communication network MODBUS Serial Communication Refer to Chapter 1 e Outline of system Applicable PLC versions Applicable programming tools Outline Refer to Chapter 2 Check communication specifications Communication specifications Communicati
123. number is greater than 32767 the value will become a negative number To see the step numbers above 32767 the user must convert the step number to an unsigned value The current value of retries that the master is sending to process the request D8408 pg42g Current Retry Master Special clear conditions Value 4 Power on 2 STOP to RUN 3 Next MODBUS command After the master sends a request and no response is received from the slave within the specified time the master will retry to send the message or terminate the processing of the command with a time out error depending on the setting of the number of Slave Response retries D8412 D8432 D8409 D8429 Timeout Master Valid values 0 to 32767 ms 0 will default the timeout to 3 seconds Note This value can also be changed before each command execution 40 F X3G F Xau F X3cc FX3uc Series Programmable Controllers 6 Related Devices and Communication Status User s Manual MODBUS Serial Communication Edition 6 1 Special Data Registers Special Data Register Valid Detailed description The turnaround delay defines the minimum delay time that the master has to wait after the transmission of a broadcast message before transmitting the next request This delay allows the slaves to process the broadcast message and prepare the reception of the next request Valid values 0 to 32767 ms 0 will set the timeout to 400 ms Turn Around Aa Delay MARISE Note 1 This value can also be
124. nut Street 1L 42505 Netanya Phone 972 0 9 863 39 80 Fax 972 0 9 885 24 30 CEG INTERNATIONAL Cebaco Center Block A Autostrade DORA Lebanon Beirut Phone 961 0 1 240 430 Fax 4 961 0 1 240 438 AFRICAN REPRESENTATIVE CBI Ltd SOUTH AFRICA Private Bag 2016 ZA 1600 Isando Phone 27 0 11 977 0770 Fax 27 0 11 977 0761 ISRAEL LEBANON Mitsubishi Electric Europe B V FA European Business Group Gothaer Stra e 8 D 40880 Ratingen Germany FACTORY AUTOMATION _ Tel 49 0 2102 4860 Fax 49 0 2102 4861120 info mitsubishi automation com www mitsubishi automation com
125. o Subsection 7 11 2 Power OFF ON or the PLC state is changed from STOP RUN uoneunBiuo waisks QJ suoneoyioeds N buum dnjeg uoneounuuo5 Ol smes wwo pue seoi e peje es SpueuJuo5 pJepuelsg sngaon Wl jese y OO op UO D Q O i o 25 uoneoyioeds S suJeJ60Jd unea 105 F X3c F Xau F X3cc FX3uc Series Programmable Controllers 10 Creating Programs User s Manual MODBUS Serial Communication Edition 10 1 Checking Contents of Related Devices 10 Creating Programs This chapter explains how to setup FX MODBUS Serial Communication and how to create programs for the Master and Slave stations 10 1 Checking Contents of Related Devices For a full description of the PLC devices used by FX MODBUS Serial Communication please refer to Chapter 6 of this manual 10 2 Creating Programs for the Master Station Programs allowing the master station to read and write slave station devices can be created similar to the example below Program for setting up a MODBUS Master MODBUS Serial Communication Setup M8411 ES e400 For more details on the Communication Setup Parameters refer to Section 5 2 of this manual peat 2000 e409 EN m EM D8410 E D8411 MOV H101 D8415 MOV K100 D8416 Program for Reading Coils Read Coils from Slave 0x02 Slave Address 0x02 MODBUS Address 100 Device Count 8 Command Complete F
126. o a third party constructed device which contains or uses the product associated with this manual This product has been manufactured as a general purpose part for general industries and has not been designed or manufactured to be incorporated in a device or system used in purposes related to human life Before using the product for special purposes such as nuclear power electric power aerospace medicine or passenger movement vehicles consult with Mitsubishi Electric This product has been manufactured under strict quality control However when installing the product where major accidents or losses could occur if the product fails install appropriate backup or failsafe functions in the system When combining this product with other products please confirm the standard and the code or regulations with which the user should follow Moreover please confirm the compatibility of this product to the system machine and apparatus which a user is using e f in doubt at any stage during the installation of the product always consult a professional electrical engineer who is qualified and trained to the local and national standards If in doubt about the operation or use please consult your local Mitsubishi Electric representative e Since the examples indicated by this manual technical bulletin catalog etc are used as a reference please use it after confirming the function and safety of the equipment and system Mitsubishi Electric will
127. on or wiring work Failure to do so may cause electric shock WIRING PRECAUTIONS NC AUTION Make sure to observe the following precautions in order to prevent any damage to the machinery or accidents due to abnormal data written to the PLC under the influence of noise 1 Do not bundle the main circuit line together with or lay it close to the main circuit high voltage line or load line Otherwise noise disturbance and or surge induction are likely to take place As a guideline lay the control line at least 100mm 3 94 or more away from the main circuit or high voltage lines 2 Ground the shield wire or shield of the shielded cable at one point on the PLC However do not use common grounding with heavy electrical systems Make sure to properly wire to the terminal block European type in accordance with the following precautions Failure to do so may cause electric shock equipment failures a short circuit wire breakage malfunctions or damage to the product The disposal size of the cable end should follow the dimensions described in the manual Tightening torque should follow the specifications in the manual Twist the end of strand wire and make sure that there are no loose wires Do not solder plate the electric wire ends Do not connect more than the specified number of wires or electric wires of unspecified size Affix the electric wires so that neither the terminal block nor the connected parts are directly stressed
128. on protocol Number of Slaves Refer to Chapter 3 Determine system configuration and selection System configuration e Select communication equipment Refer to Chapter 4 Perform wiring Wiring procedure Wiring example Programming tool Connect PLC Turn ON power Refer to Chapter 5 Set up PLC communication e MODBUS serial communication setup in PLC Create communication parameter setting programs Refer to Chapter 6 Check communication status eo Communication Check related special data registers and auxiliary relays Refer to Chapter 7 8 9 10 Create programs e Master and Slave communication setup Create programs using ADPRW command Basic program Based on the SD RD lamp lighting status and the contents of error check devices verify that communication is functioning correctly If there are any problems with communication refer to the troubleshooting chapter Chapter 12 Refer to Chapter 11 Practical program examples Program examples for both Master and Slave are shown 1 For the corresponding programming tool to PLC connection method refer to the Programming Communication Chapter of the FX Series User s Manual Data Communication Edition or the corresponding programming tool manual For details on operating procedures refer to the corresponding programming tool manual 10 F X3G F Xau F X3cc FX3uc Seri
129. ons caused by broadcast messages In this case no exception response is sent Head Device 3 Slave Message Slave Number of messages addressed to the slave R D103 Counter including broadcast Head Device 4 Number of received messages for which the slave z 4 ana RESPONDE Slave did not return a response Number of received R D104 SHEET broadcasted messages Y Q R o Head Device 5 Number of times the slave responds with a NAK Slave NAK Counter Slave exception This is always 0 when using FX3u D105 F X3UC Head Device 6 Number of times the slave respond with a busy 4 Slave Busy Counter Slave exception This is always 0 when using FX3u R D106 FX3UC Master Number of times the master detected a character overrun condition snaaow Wl spueululo5 pJepuels Head Device 7 Character Overrun Master D107 Counter Slave i Slave Number of times the slave detected a character overrun condition 8 This counter is incremented for each successful z message completion It is not increased in the o 5 Head Device 8 EUER i a following cases a D108 i al st ave Exception responses 9 Poll commands Fetch event counter commands Head Device 9 9 Not used D109 S5 lt Head Device 10 Number of events stored in the event log M 9 Event Log Length Slave R x D110 Note For details refer to Subsection 9 5 1 S A Head Device 11 to 42 Up to 64 events Each
130. or detailed explanation Manual name Manual Contents pecs number name code Programming Basic amp Applied Instruction FX3G FX3U FX3GC FX3UC PLCs FX3G F X3U F X3GC FX3UC CE l Items related to programming in PLCs Additional SANGS c rogramming including explanation of basic instructions Manual JY997D16601 UCITIg exper dd 09R517 Manual applied instructions and various devices in Edition Radina MELSEC Q L F Structured Programming methods specifications Manual Programming Manual SH 080782 functions etc required to create structured 13JW06 Fundamentals programs m FXCPU Structured Additional Programming Manual JY997D26001 Devices parameters etc provided in 09R925 Manual j structured projects of GX Works2 Device amp Common FXCPU Structured Additional Programming Manual Sequence instructions provided in structured Manual Basic amp Applied RSS CUM projects of GX Works2 O9R926 Instruction T FXCPU Structured et l Additional Programming Manual JY997D34801 Application functions provided in structured 09R927 Manual dau projects of GX Works2 Application Functions Manuals for MODBUS serial communication network Handling procedures of the RS 232C communication special adapter For MODBUS serial communication network Supolied refer also to the FX3G FX3U FX3GC FX3UC pp FX3U 232ADP MB Series User s Manual MODBUS Serial A with JY997D26401 d an Installation Manual Communication Edition
131. or further details refer to Subsection 9 5 1 D8415 D8435 Note For Event and error counter and Event log details refer to Section 6 4 Defines the PLC head device address of the device block that will store the communication status information Counter values occupy 10 devices and the event log requires 33 devices Therefore if both are displayed a total of 43 devices are required According to these rules the maximum valid range will be Communication Mast For D D8416 D8436 Status Device S Counter only 0 7990 i e D8415 D8435 01H Range Setup Log only 0 7967 i e D8415 D8435 010H Log and counter 0 7957 i e D8415 D8435 011H For R Counter only 0 32758 i e D8415 D8435 0101H Log only 0 327395 i e D8415 D8435 0110H Log and counter 0 32725 i e D8415 D8435 0111H Note If the above mentioned rule is violated neither counter nor event log is stored and an error is generated In the event of a communication error this register holds the error code corresponding to the error occurring during the MODBUS communication T Special clear conditions Communication Master D8063 D8438 Error Code ise 1 Power on Note In the event of a Ch1 error MODBUS communication error 6321 will be stored in D8063 In the event of a Ch2 MODBUS communication error 3821 will be stored in D8438 42 F X3G F Xau F X3cc FX3uc Series Programmable Controllers 6 Related Devi
132. ote If the number of communications in the event log exceeds 64 the oldest log is deleted and the latest log is stored to Communications event log O 103 A euino uoneunBiuo wasg QJ suoneoyioeds N Suum dnjeg uoneosunuuo5 Ol snes wwo pue seoi e pajejoY sngaon Wl spueululo5 pJepuels jese y OO Ww UO D oO o e o uoneoyioads S suJeJ60Jd unea F Xac F X3u F Xacc F Xauc Series Programmable Controllers 9 Slave Specification User s Manual MODBUS Serial Communication Edition 9 5 Communication Event log 9 5 2 Communication event log timing and storage format 1 When receiving a request message The slave stores this kind of event to the communications event log before executing the processing of the request message For the relevant communications event 1 is stored b7 b6 b5 b4 b3 b2 b1 bO L1 j1 0 1 0 1 0 O O 1 0 0 EE Unused Fixed to 0 Communication error Unused Fixed to 0 Bus character overrun error In listen only mode Broadcast message reception Fixed to 1 2 When sending a response message The slave stores this kind of event to the communications event log after sending the response message For the relevant communications event 1 is stored b7 b6 bS b4 b3 b2 b1 bO 0 1 1 0 0 0 0 j1 0 1 0 Read exception sent exception code 01H to 03H Slave abort exception sent exception code 04H Slave busy exception send exc
133. ring the Control Signal connect these pins 3 3 c The FX3u 232ADP MB does not require these pins to be connected ato N O 3 2 uoneoyioads 9Ae S Lo h suJeJ60Jd unea 31 F X3c FX3u F Xacc F Xauc Series Programmable Controllers 4 Wiring User s Manual MODBUS Serial Communication Edition 4 5 Connection Diagram for MODBUS RS 485 4 5 Connection Diagram for MODBUS RS 485 4 5 1 X One pair wiring FX3u A85ADP MB FX3U 485ADP MB FX3U 485ADP MB FX3U 485ADP MB Master Slave Slave Slave T nos JO p T mu ens se SDB E soe ps 110 0 i E 110 0 co co i i i i i H 1 i i 1 i i i i i i i i A i i i i i i i i j i i i i i i i i T i j E f Class D grounding Class D grounding Class D grounding resistance 100 Q or less resistance 100 Q or less resistance 100 Q or less 1 Make sure to perform Class D grounding on the shield of the twisted pair cable connected to the FX3u 485ADP MB 2 Make sure to provide a terminal resistor at each end of a line The FX3uU 485ADP MB has a built in terminal resistor Set the terminal resistor selector switch accordingly 4 5 2 Two pair wiring FX3u 485ADP MB FX3u 485ADP MB FX3u 485ADP MB FX3u 485ADP MB Master Slave Slave Slave BEI o MET T Terminal Terminal resistor resistor 330 Q n Q a SG m e Class D grounding Class D grounding Class D grounding resistance 100 Q or less resistance 100
134. rn 0 fixed o g R e indexing Diagnostic Register Block Block Length 1 Point uoneunBiuo waisks QJ suoneoyioads N Sub function Data ASCII Mode response echo of S3 End of Message Character i i ADPIC AUS D R e indexing Devices OOH FFH Block Length 1 Point Sub function 4H 0 fixed Force Listen Only pm Mode es g Note Requires the 0 fixed Restart Communication Block Length 0 command to reset 1H Slave response echo of Sub function 3H Change ASCII Input Delimiter Suum dnjeg uoneounuuo5 Ol 8H Sub function AH Diagnosis Clear Counter and 0 fixed Applicable 5 Diagnostic Register Devices Block Length 1 Point QUO 99 PLC Destination Device head address 3 8 g Sub function BH Applicable D oy Return Bus Message 0 fixed PP i D R e indexing co Devices Counter Block Length 1 Point 7 Sub function CH PLC Destination Device head address me Return Bus Applicable E s 380 Communication Error o Devices i Saneex ng a2 2 S Counter Block Length 1 Point PLC Destination Device head address Sub function DH Return Bus Exception 0 fixed Error Counter Applicable Devices Block Length 1 Point PLC Destination Device head address D R e indexing Sub function EH Return Slave 0 fixed Message Counter Applicable Devices Block Length 1 Point PLC Destination Device head address D R
135. s L Note no switching of the high and low byte takes place big endian b Frame mode of the message format The messages shown in Section 7 4 to 7 18 are displayed in RTU format The ASCII mode is available only in FX3U and FX3uc PLCs For use in ASCII mode convert the values into ASCII codes Conversion example RTU mode Function code Data Function Head coil number Read points code 006EH 003FH 01H H H Convert RTU mode to ASCII mode ASCII mode Function code Data Head coil number Function code 0 1 0 6 30H 31H 30H 36H H L c Response message format The response message formats issued from the slave to the master differs depending on whether the slave has normally completed or failed to handle the requested processing read write diagnostics etc The formats for normal and error completions are shown in Section 7 4 to 7 18 57 A euino uoneunBiuo waisks QJ suoneoyioeds N buum dnjeg uoneounuuo5 Ol pue seoi e peje es Q 3 3 Co o puepuejs Sngaaow spueuJlulo5 jese y OO uoneayioads uoneoyioads 9Ae S Lo h suJeJ60Jd unea F X3c FX3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 4 Read Coils Command Code 0x01 7 4 Read Coils Command Code 0x01 Reads the status ON OFF of one or mor
136. s 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 15 Write Multiple Registers Command Code 0x10 7 15 Write Multiple Registers Command Code 0x10 Writes values to multiple holding registers 1 Request message format Master Slave Function code Data Function Head holding Write points Number of n code register number bytes nx 2 1 104 00004 to FFFFu 00014 to 007Bu 0002u to OOF6x T4 Number of bytes n x 2 gt 1 The number of the specified write points must be matched with the number of bytes H L H L 2 Response message format Slave Master When completed normally Function code Dat js Head holding register number Write points ese The value same as in the The value same as in the 10H request message is stored request message is stored H L H L When completed with an error Function code Data Function Exception code code 90 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 82 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 16 Report Slave ID Command Code 0x11 A 7 16 Report Slave ID Command
137. s dope aa se ade yo ee adie ei eee ae 30 4 3 3 Connecting terminal resistors eeesssssssssssssssssseeeeeeen nennen nennen nnne nne rn nnne nnn nennen nnn nnn 31 4 4 Connection Diagram for MODBUS RS 2320C sssssssssssssseeee eene nennen nnne nnn nnne nnn nnns 31 4 4 1 Connection diagram between FX PLC and MODBUS RS 232C equipment 31 4 5 Connection Diagram for MODBUS RS 485 ssssssssssssssesee essen nnne nnne nnne nans 32 ASA One OIG WINING ERREUR TEE 32 A52 TWO Dall WIRING coast sid Svr eee die dn as cance uch GR ers nnn eda tlc save cucu aaah ees EAE bile usns mies cd vendo E aN 32 OGOUN an Uu emm 33 5 Communication Setup 34 5 1 Setup method for MODBUS serial communication cccccsecceceeceeeeeeseeeeeceeeesseeeeseeesseeeeeaeeeees 34 5 2 Example of communication setup lseeesssessssssssssssseeee nennen nnne nnne stans 34 5 3 Simultaneous N N Networking and MODBUS Communication cccccccecceeeeeeeeeeeeeeeeeesaeeeees 37 5 4 Cautions on Communication SEtUP cccccesccccssceceeeeeceececeeeeceucecsaseeseucesseeeseusessueeessusessueeenees 38 F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition Table of Contents 6 Related Devices and Communication Status 39 O6 4 specia Data dsegdiSlB S usobiicescc lecti ena a etu a uda educated bise 39 6 2 Communi
138. s event counter does not count in the case of the following spueuJlulo5 he processing has completed with an error When receiving a request message containing a function code that the FX Series MODBUS Communication ADP does not support When receiving the Get communications event counter Command Code OxOB jese y OO uoneoyioads When completed with an error Function code Data Function Exception code code 3 8Bu uoneoyioeds 9Ae S h 3 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents suJeJ60Jd unea 79 F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 7 MODBUS Standard Commands 7 13 Get Communications Event Log Command Code OxOC 7 13 Get Communications Event Log Command Code 0x0C 80 Acquires the communications event log of the FX Series MODBUS Communication ADP into the master Available only in FX3U and FX3uc PLCs Request message format Master Slave 1 Function code Function code OCH 2 Response message format Slave Master When completed normally Function code Function Number of code read bytes OCH Program command status 0000n 1 Communications event count value
139. s the frame specifications for the MODBUS protocol Jmm MODBUS Protocol Data Section Section 7 3 to section 7 18 The following table details the frame specification for the MODBUS Protocol Area name Description When the master sends a request message to a slave 0 Sends a request message to all the slaves Broadcast 1 to 247 Sends a request to a specific Slave number uoneunBiuo waisks QJ suoneoyioeds N Address field Note 247 is the MODBUS maximum address number The FX3U MODBUS Master can address from 1 to 32 stations within this range When the slave sends a response message to the master The host station number is stored when sending a response message Suum When the master sends a request message to a slave The master specifies the number of the action to be taken by the slave d When the slave sends a response message to the master A requested function code is stored in the case of normal completion The most significant bit turns ON in the case of error completion dnjeg uoneounuuo5 Ol When the master sends a request message to a slave The information needed to execute the action specified by a function code is stored Data When the slave sends a response message to the master The execution result of the action specified by a function code is stored An exception code is stored when failed The node adds the check code automatically to all transmitted messages and Error check 1 recalc
140. ser s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 7 11 8 Return bus communication error count sub command code 0x0C 72 Reads out the number of error messages detected on the line to the master 1 Request message format Master gt Slave Function code Sub function code Function Sub function code code O000CH 08x H L 2 Response message format Slave Master When completed normally Function code Sub function code Data Function Sub function code Bus communication code 000Cu error count value 08x 00004 to FFFFu 1 H b H L 1 Refer to Chapter 6 for the relevant counts count clear methods and precautions When completed with an error Function code Data Function Exception code code 88H 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents F X3c FX3u F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 7 MODBUS Standard Commands 7 11 Diagnostics Command Code 0x08 7 11 9 Return bus exception error count sub command code 0x0D Reads out the number of exception errors to the master 1 Request message format Master Slave Function code Function code 084 Sub f
141. t 1 125 D R indexing Register 0000H FFFFH Block Length PLC Source Device head address MODBUS Address HORN E 5H 0 fixed Applicable Y S indexing Write Single Coil 0000H FFFFH Devices bit OFF 1 bit ON Block Length 1 Point PLC Source Device head address 6H MODBUS Address Applicable D R K H Write Single 0 fixed Heures ndei Register 0000H FFFFH d Block Length 1 Point 7H PLC Destination Device head address Read Exception 0 fixed 0 fixed piane D R indexing State Block Length 1 Point Sub command Code OH 4H AH 12H Loop back Test Data Sub function Data Slave response echo of Sub function OH loop back data Loop back Test GppucaDe D R indexing 0 65535 Devices Block Length 1 Point 8H Diagnosis 88 F X3G F X3u F Xaec F Xauc Series Programmable Controllers 8 Master Specification User s Manual MODBUS Serial Communication Edition 8 3 ADPRW Command Parameters A oy z Device Address Device Count Sub command l Source Data 3 Doi Sub command Code Data AND Mask Destination PLC Device OR Mask ode Applicable Devices D R indexing Ke H Sub function 1H Restart Communication Sub function Data Slave response echo of 0x0000 Do Not Reset god D R indexing Event Log iiic Note Resets Slave Block Length 1 Point Listen Only Mode OxFFOO Reset Event Log PLC Destination Device head address Sub function 2H A ficable Retu
142. tative outlining the special requirements of the project and providing that all parties concerned agree to the special circumstances solely at the users discretion 121 Warranty F X3c FX3u F X3cc FX3uc Series Programmable Controllers Revised History User s Manual MODBUS Serial Communication Edition Revised History Date Description 4 2007 First Edition 12 2009 FX3G FX3UC Series are added Errors are corrected 10 2010 Caution on setup of MODBUS communication parameters is added Caution on using ASCII mode is added e GX Works2 is added Errors are corrected 2 2012 e FX3GC Series is added e Addition and revision of other descriptions Errors are corrected 7 2012 Capability to connect 32 slaves is added e Additional baud rates are added Errors are corrected FX3G FX3u FX3Gc FX3uc SERIES PROGRAMMABLE CONTROLLERS USER S MANUAL MODBUS Serial Communication Edition a MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN HIMEJI WORKS 840 CHIYODA CHO HIMEJI JAPAN MODEL CODE 09R626 JY997D26201E Effective July 2012 MEE Specifications are subject to change without notice MITSUBISHI 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 MITSUBISHI ELECTRIC EUROPE B V org sl CZECH REP Czech Branch Avenir Business Park Radlick 714 113a CZ
143. ted 3 When programming the ADPRW command in a STL instruction Make sure to let the state relay remain ON until communication with an other station is completed If the state relay is set to OFF during communication the ADPRW command is stopped in the middle of execution and another ADPRW command cannot be started Program a sequence while observing the following cautions Add M8029 instruction execution complete flag ON condition to the state relay transfer condition and provide such an interlock that the state relay ON OFF status does not change during communication with another station If the state relay is set to OFF during communication the remaining communication can be completed by setting the state relay to ON again When resetting many state relays all at once using the ZRST FNC 40 instruction etc make sure that the M8401 or M8421 communication port busy condition is OFF X000 Reset input MO M8401 FNC 40 S999 ZRST 4 Using an ADPRW command in a program flow The ADPRW command cannot be used in the following program flows State relays SO to S999 are reset all at once Communication port busy Program flow disabling ADPRW command Remarks Between CJ and P instructions Conditional jump Between FOR and NEXT instructions Repeat Between P and SRET instructions Subroutine Between and IRET instructions Interrupt routine 5 Caution on writing during RUN Condition in which the ADPRW command can be wri
144. ten only mode the status is as follows e Ignores all request messages except for those of restart communications option Refer to Subsection 7 11 2 Stops counting of the diagnostic counter Refer to Chapter 6 e Continues recording with the communications event log Refer to Section 9 5 1 Request message format Master Slave Function code Sub function code uoneunBiuo wasg QJ suoneoyioeds N Function Sub function code code 00044 08u Suum 2 Response message format Slave Master When completed normally No response message is returned because the listen only mode offline status is active When completed with an error dnjeg uoneounuuo5 Ol Function code Data Function Exception code code 88H OS gee S D OD apa Dw 92 eu D 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents puepuejs Sngaow Note spueuJlulo5 1 Whether the FX Series MODBUS Communication ADP has been switched to listen only mode or not is indicated by M8404 M8424 2 The listen only mode can be changed to online mode by either of the following Restart communications option Refer to Subsection 7 11 2 Power OFF ON jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jgd unea 69
145. tents F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 A 7 11 7 Return bus message count sub command code 0x0B euino Reads out the number of messages detected on the line to the master 1 Request message format Master Slave Function code Sub function code Function Sub function code code 000Bu 08u 2 Response message format Slave Master When completed normally uoneunBiuo waisks QJ suoneoyioeds N Function code Sub function code Function Sub function code Bus message count value code 000Bu 00004 to FFFFx 08x Suum H b H L 1 Refer to Chapter 6 for the relevant counts count clear methods and precautions dnjeg uoneounuuo5 Ol When completed with an error Function code Function Exception code code 881 poyejay pue seoi e Q O 3 3 Co o 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents pyepuels Shadow spueuJlulo5 jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 71 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands U
146. the following precautions Failure to do so may cause electric shock equipment failures a short circuit wire breakage malfunctions or damage to the product The disposal size of the cable end should follow the dimensions described in the manual Tightening torque should follow the specifications in the manual Twist the end of strand wire and make sure that there are no loose wires Do not solder plate the electric wire ends Do not connect more than the specified number of wires or electric wires of unspecified size Affix the electric wires so that neither the terminal block nor the connected parts are directly stressed Do not touch any terminal while the PLC s power is on Doing so may cause electric shock or malfunctions Before cleaning or retightening terminals cut off all phases of the power supply externally Failure to do so may cause electric shock Before modifying or disrupting the program in operation or running the PLC carefully read through this manual and the associated manuals and ensure the safety of the operation An operation error may damage the machinery or cause accidents e Do not change the program in the PLC from two or more peripheral equipment devices at the same time i e from a programming tool and a GOT Doing so may cause destruction or malfunction ofthe PLC program so may cause destruction or malfunction of the PLC program Do not disassemble or modify the PLC Doing so may ca
147. tion code Sub function code Data Function Sub function code Arbitrary data code 00001 08x uoneunBiuo waisks QJ suoneoyioeds N Suum 2 Response message format Slave Master When completed normally The slave returns the request message received from the master without change When completed with an error dnjeg uoneounuuo5 Ol Function code Data Function Exception code code 884 OUD Seg AE 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case 3 n of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents pyepuejs Sngaow spueuJlulo5 jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 65 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 7 11 2 Restart communications option sub command code 0x01 66 Initializes the communication port of the receiving channel side and restarts the slave function Restart is performed after returning the response message corresponding to a request message The operation status returns to online mode when it was in the listen only mode The following data are cleared when executing the restart communications option Event and Error counter Refer
148. tten While the PLC is in the STOP status the ADPRW command can be written during RUN Condition in which the ADPRW command cannot be written The ADPRW command cannot be written during RUN If an ADPRW command is written during RUN during communication or if an ADPRW command is deleted while in RUN communication may be disabled after that In such a case set the PLC to STOP and then to RUN mode again to initialize the status Reading Coils When using the Read Coils command Command Code 0x01 in the FX MODBUS Master with a word device i e D or R as the destination device only the number of bits assigned in the device count of the ADPRW command will be overwritten The remaining bits of the word device will not be affected When the FX series PLC is the slave station Please set master station side Turn Around Delay as equal to one or more scan times of FX Series slave station F X3c FX3u F X3cc FX3uc Series Programmable Controllers 10 Creating Programs User s Manual MODBUS Serial Communication Edition 10 4 Cautions on Program Creation 5 When the ASCII mode is used Only in the FX3u FX3uc PLC e When the FX series PLC is a Master Set the waiting time for receiving a response after sending a command transmission from the PLC to 100yus or more Command sending e When FX series PLC is a Slave When a command is transmitted to the PLC from another device the next command transmission should be transmitted 100us or
149. tting using parameters Verify that the communication setting parameters are suitable for use If the communication setting parameters are not suitable for use communication will not function correctly After changing any setting make sure to reboot the PLC s power For the MODBUS communication settings refer to Chapter 5 Presence of RS or RS2 instructions Verify that neither the RS nor RS2 instructions are being used on the same channel as the MODBUS communication If either instruction is being used on the same channel delete it and then cycle the PLC power Presence of IVCK IVDR IVRD IVWR IVBWR and IVMC instructions Verify that none of the dedicated Inverter communication instructions are being used on the same channel as the MODBUS communication If any of the instructions are being used on the same channel delete it and then cycle the PLC power Presence of FLCRT FLDEL FLWR FLRD FLCMD and FLSTRD instructions Verify that none of the dedicated the CF ADP instructions are being used on the same channel as the MODBUS communication If any of the instructions are being used on the same channel delete them and then cycle the PLC power Checking Setting Contents and Errors 114 1 Checking the setting contents Each FX PLC has devices for checking the communication settings Verify that the correct contents are stored in the devices shown in the table below D8400 Channel 1 MODBUS Communication Format
150. uJeJ60Jd unea F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition 9 Slave Specification 9 3 MODBUS device address allocation Default Values 94 Word device 0x0000 0x1F3F Ox1F40 0x213F 0x2140 0xA13F 0xA140 0xA33F 0xA340 0xA407 0xA408 0xA477 0xA478 0xA657 0xA658 0xA677 0xA678 OxA777 0xA778 0xA797 0xA798 0xA7A7 OxA7A8 OxA7B7 0xA7B8 0xA7C7 MODBUS Word Device Address Input Register Read Only FX3u FX3uc Device Holding Register Read Write x e e P e x TI Qo TU DO D7999 D8000 D8511 RO R32767 TNO TN511 CNO CN199 CN200 CN255 M0 M7679 E M8000 M851 1 3 S0 S4095 TS0 TS511 CS0 CS255 z Y0 Y377 X0 X377 ol ololol ololololo X X X X NES ERE a gt P gt N gt NI oO o KR BR amp lbl e gt lTn JIa a wy Oo BR A AL B GC GO O P O CO ol ol CO CO O CO o XI x1 KI KI X XIXI X X gt gt gt gt P S P P N NINI OIOI BR BRI o gt Ol NINI AINI Of we S NINININI NIN omy onn 7 O x gt N Qo O x gt N 2 N N 2 Qo O x gt N UJ N 1 CN200 255 are 32 bit counters For FX3G FX3Gc Series PLCs Bit device Discrete Inputs Read Only 0x0000 0x1DFF Ox1E00 0x1FFF 0x2000 0x2FFF 0x3000 0x313F 0x3140 0x31FF 0x3200 0x32FF 0x3300 0x337F 0x3380 0x33FF 0x3400 0x347F MODBUS Binary Device Address FX3G FX3Gc Devi
151. ulates the check code for any received message The received message is discarded if it has an error pue seoi e peje es Q 3 3 Co D 1 The error check method differs depending on the frame mode See Subsection 7 2 1 Note puepuejs Sngaow spueuJlulo5 Refer to the Subsection 7 2 1 for the data size of each area jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 51 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 2 Frame Specifications 7 2 1 Frame mode 52 For the FX Series MODBUS Communication ADP the following frame modes are available The frame mode of the FX Series MODBUS Communication ADP must be consistent with that of the target device 1 Available frame modes a RTU mode In this mode frames are received or sent in binary codes The frame specifications are compliant with the MODBUS protocol specifications Address field Function code Data Error check Slat Address field 3 5 character 0 to 252 3 5 charact time or more 1 byte 1 byte bytes time or more 1 byte Error check calculation range Note The Cyclical Redundancy Checking CRC field is two bytes containing a 16 bit binary value The CRC value is calculated by the transmitting device which appends the CRC to the message The device that receives recalculates a CRC during receipt of th
152. umber check method of special adapter eeeseesssssss 11 Teo FOGrammihG FOOLZDDICODID erengan a eat idea om ro dae oa dae ober tata nae ener 12 T 5 T ROF applicable VerSIOLIS Gauss tec actae dub dong dee bed ande co tue toe to io Soe AEEA recat piscari LU p ene 12 2 Specifications 14 2 1 Communication Specifications uestis n Loa Rin ES ec aeneus tuldaset heu ete Sie eut atn uta tanti a etc i da sco cun p dde bassE 14 Pia dag E a TETTE RT MR RR ere eae we oe 16 3 System Configuration 19 o NSLS C ONTOUrAUO M a aah ce E Ee ek Ey ck HET 19 3 2 Applicable FX PLC and Communication Equipment ccccccecccceceseeeeeseeeeeseeeeseeeeeseeeesaeeeeas 20 3 3 Limitation when ch1 and ch2 are used at the same time eseeseeseeeeeeeeeereee 26 4 Wiring 27 Al Wino Procedir mE E 27 4 2 Selecting Connection Method cccccccseececcseececceeececcauececceeuceecauucecsseeeessueeessueeesssaeeessseeseessaaes 28 4 2 1 For communication in accordance with MODBUS RS 232C 1 to 1 connection 28 4 2 2 For communication in accordance with MODBUS RS 485 1 to N connection 28 4 3 Selecting Cables and Terminal Resistors RS 485 cccccssscceeseeeeeeseeeeeseeeeeesaeeeesaaeeeessaeeeesaees 29 AO PWISTCO Dal CADIC cscs zocgs sen aes C PNPEN 29 49 2 Connecting Cables 4 9 moros Ove Um tdi ci edi
153. umber of Device 3 code 00004 to FFFFH 00014 to 07BO dex n data S OF 0001 to 1 E OOF61 na Number of bytes n x oS a 7 es i z z P d S Device data 1 to n b7 b6 Device data 1 Suum Data storage order Device data n dnjeg uoneounuuo5 Ol The values ON OFF stored into the device data 1 to n are written to the coils in order from low order to high order bits of the device data 1 The number of the specified write points must be matched with the number of bits specified as the number of bytes For example when the write points are set to 16 set the number of bytes to 2 bytes Soe 16 bits EE 2 Response message format Slave Master m When completed normally Function code OnE ONO HE Function Head coil number Write points D code The same head coil number The same write points P OF H value as in the request value as in the request message is stored message is stored H b H L When completed with an error jese y OO uoneayioads Function code Data Function Exception code code 2 8F x uoneoyioads 9Ae S Lo 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents h suJeJ60Jd unea 81 F X3G F X3u F X3cc FX3uc Series Programmable Controller
154. unction code Sub function code 000D4 H b 2 Response message format Slave Master When completed normally Function code Sub function code Data Function code 084 Sub function code 000D Exception error count value 00001 to FFFFu 1 Refer to Chapter 6 for the relevant counts count clear methods and precautions When completed with an error Function code Data Function code 88u Exception code 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents 73 A euino uoneunBiuo waisks QJ suoneoyioeds N Suum dnjeg uoneounuuo5 Ol pue seoi e peje es Q O 3 3 Co o pyepuejs Sngaow spueuJlulo5 jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 7 11 10 Return slave message count sub command code OxOE Reads out the number of messages processed by the slave to the master Including broadcast messages 1 Request message format Master gt Slave Function code Sub function code Function Sub function code code 0
155. unsupported by the slave The requested device address or device address device count 02H NEJA OENVICE BOUES exceeds the supported range of this slave One of the fields within the request exceeds the allowed value e g 03H Illegal data value the implied length the device count An unrecoverable error occurred while the slave was processing the 04H Slave device failure request 120 F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition Warranty 1 Please confirm the following product warranty details before using this product Gratis Warranty Term and Gratis Warranty Range If any faults or defects hereinafter Failure found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company However if repairs are required onsite at domestic or overseas location expenses to send an engineer will be solely at the customer s discretion Mitsubishi shall not be held responsible for any re commissioning maintenance or testing on site that involves replacement of the failed module Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall
156. use fire equipment failures or malfunctions For repair contact your local Mitsubishi Electric representative Turn off the power to the PLC before connecting or disconnecting any extension cable Failure to do so may cause equipment failures or malfunctions Turn of the power to the PLC before attaching or detaching the peripheral devices expansion boards special adapters and expansion memory cassette Failure to do so may cause equipment failures or malfunctions F X3c F Xau F X3cc FX3uc Series Programmable Controllers User s Manual MODBUS Serial Communication Edition FX3G FX3U FX3GC F X3UC Series Programmable Controllers User s Manual MODBUS Serial Communication Edition Foreword This manual explains the MODBUS serial communication provided in FX3G F Xsu F Xacc F Xauc Series Programmable Controllers and should be read and understood before attempting to install or use the unit Store this manual in a safe place so that you can take it out and read it whenever necessary Always forward it to the end user This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual O 2007 MITSUBISHI ELECTRIC CORPORATION F X3c F Xau F X3cc FX3uc Series Programmable Controllers User
157. values stored in a single holding register with AND or OR and writes the value The masked values written to the holding register are as shown below Result Current Contents AND And Mask OR Or Mask AND NOT And Mask 1 Request Message Format Master Slave Function code Data Function Target holding register code number 16H 0000u to FFFFu H L AND mask value 00004 to FFFFn H L 2 Response message format Slave Master When completed normally Function code Function code 96H Exception code OR mask value 00004 to FFFFu H L 1 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents F X3G F X3u F Xaec F Xauc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 18 Read Write Multiple Registers Command Code 0x17 A 7 18 Read Write Multiple Registers Command Code 0x17 euino Available only in FX3U and FX3uc PLCs Reads from and writes to multiple holding registers Writing is executed first and reading is then executed 1 Request message format Master Slave Function code Data Function Read head holding Read points Write head holding Write points Number of Write Write m 1 code register nu
158. vant counts count clear methods and precautions dnjeg uoneounuuo5 Ol When completed with an error Function code Function Exception code code 2 88H poyejay pue seoi e Q O 3 3 Co o 2 Exception and error codes are stored in special data registers and special auxiliary relays in the case of error completion Refer to Chapter 6 for storage location confirmation methods and other detailed contents pyepuejs Sngaow spueuJlulo5 jese y OO uoneoyioads uoneoyioads 9Ae S h suJeJ60Jd unea 75 F X3G F X3u F X3cc FX3uc Series Programmable Controllers 7 MODBUS Standard Commands User s Manual MODBUS Serial Communication Edition 7 11 Diagnostics Command Code 0x08 7 11 12 Return slave NAK count sub command code 0x10 Reads out the number of NAK responses to the master The FX Series MODBUS Communication ADP always returns 0 1 Request message format Master Slave Function code Sub function code Function Sub function code code 0010n 084 2 Response message format Slave Master When completed normally Function code Sub function code Data Function Sub function code code 0010u 084 1 Refer to Chapter 6 for the relevant counts When completed with an error Function code Slave NAK count value 0000n 1 count clear methods and precautions Data Function cod

Download Pdf Manuals

image

Related Search

Related Contents

Bedienungsanleitung - beim Kreisfeuerwehrverband Cloppenburg    2002 GMC Envoy Manual - Dealer e  Guida per l`utente  報道関係者各位 【上海問屋限定販売】 ゴルフやサーフィンゴルフや  Avaya Business Communications Manager - CallPilot Message Networking User Guide  GsmAlarm  Lire le document - Ireps Aquitaine  Genesis Scan EHJ-250  Suelos laminados Compact Loc  

Copyright © All rights reserved.
Failed to retrieve file