Mitsubishi Electric FX5 User Manual

Melsec iq-f series
Hide thumbs Also See for FX5:
Table of Contents

Advertisement

MELSEC iQ-F
FX5 User's Manual (Serial Communication)

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric FX5

  • Page 1 MELSEC iQ-F FX5 User's Manual (Serial Communication)
  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety in order to handle the product correctly. This manual classifies the safety precautions into two categories: " WARNING"...
  • Page 4 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 FX5 User's Manual (Hardware). Tightening torque should follow the specifications in the FX5 User's Manual (Hardware).
  • Page 5 ● Do not disassemble or modify the PLC. Doing so may cause 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.
  • Page 6: Introduction

    If in doubt about the operation or use, please consult your local Mitsubishi Electric representative. • Mitsubishi Electric will not accept responsibility for actual use of the product based on these illustrative examples. Please use it after confirming the function and safety of the equipment and system.
  • Page 7 MEMO...
  • Page 8: Table Of Contents

    CONTENTS SAFETY PRECAUTIONS ..............1 INTRODUCTION .
  • Page 9 Cable ................. . 53 Termination resistor setting .
  • Page 10 Second parameter specification code ............117 Troubleshooting .
  • Page 11 Configuring detailed setting of protocols ............172 Operations for protocol setting data .
  • Page 12: Relevant Manuals

    Describes basic knowledge required for program design, functions of the CPU <JY997D55401> module, devices/labels, and parameters. MELSEC iQ-F FX5 Programming Manual (Program Design) Describes specifications of ladders, ST, FBD/LD, and other programs and labels. <JY997D55701> MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Describes specifications of instructions and functions that can be used in programs.
  • Page 13: Terms

    •  indicates a variable part to collectively call multiple models or versions. (Example) FX5U-32MR/ES, FX5U-32MT/ES  FX5U-32M/ES • For details on the FX3 devices that can be connected with the FX5, refer to FX5 User’s Manual (Hardware). Terms Description ■Devices...
  • Page 14 Abbreviation of MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks) Functions/Function Blocks) Communication manual Generic term for MELSEC iQ-F FX5 User's Manual (Serial Communication), MELSEC iQ-F FX5 User's Manual (MODBUS Communication), MELSEC iQ-F FX5 User's Manual (Ethernet Communication), and MELSEC iQ-F FX5 User's Manual (SLMP) •...
  • Page 15: Chapter 1 Outline

    MC protocol is used to access CPU module and external devices (PC, GOT, etc.) from equipment that supports Page 48 MC protocol via Ethernet or serial communication. The serial port of the FX5 is capable of communication with MC protocol 3C/4C frame. Inverter communication An FX PLC can control up to 16 inverters via RS-485 communication.
  • Page 16: Chapter 2 N:n Network

    This chapter explains the N:N Network. Outline of System N:N Network allows connection of up to eight FX5 PLCs or FX3 PLCs via mutually linked devices through communication in accordance with RS-485. • One of three patterns can be selected according to the number of devices to be linked.
  • Page 17: Procedures Before Operation

    Procedures before Operation The flow chart below shows the N:N Network setting procedures up until data link: Check communication specifications Refer to Page 16 Specifications. • Communication specifications, link specifications Link pattern and number of link points • • Link time System configuration and selection Refer to Page 15 System Configuration.
  • Page 18: Specifications

    Transmission standard RS-485 standard Maximum overall distance When only FX5-485ADP is used in the configuration: 1200 m or less When the built-in RS-485 port, FX5-485-BD When configuring with FX5-485ADP or FX3U-485ADP: 500 m or less and 485-BD for FX3 Series are all connected:...
  • Page 19: Link Specifications

    The devices to be occupied are assigned according to the head number of the link device. When an FX3 PLC are used, even if the link device numbers are different from that of FX5 PLC (the link device numbers of FX3 PLC are fixed), the link devices corresponding to its station number are linked.
  • Page 20 However, the link device numbers are linked to the corresponding devices. The link device head number of FX5 PLC can be set individually for each station; however, unifying the numbers in the system is recommended to prevent disordered numbers.
  • Page 21: Wiring

    (AWG24 to 20)  Two wires 0.2 mm (AWG24) FX5UC CPU module built-in RS-485 port One wire 0.3 to 0.5 mm 0.3 to 0.5 mm FX5-485-BD (AWG22 to 20) (AWG22 to 20) FX5-485ADP  Two wires 0.3 mm (AWG22) 2 N:N NETWORK...
  • Page 22 • Twist the end of stranded wire and make sure that there are no loose wires. • Please do not solder plate the ends of the cable. Dimensions of the cable end FX5U CPU module built-in RS-485 port FX5UC CPU module built-in RS-485 port, FX5-485-BD, FX5-485ADP 9 mm 5 mm (0.2")
  • Page 23: Termination Resistor Setting

    *1 Make sure to perform Class-D grounding on the shield of the twisted pair cable to be connected. *2 Make sure to provide a termination resistor at both ends of the wire. The built-in RS-485 port, FX5-485-BD and FX5-485ADP have buil- tin termination resistors.
  • Page 24: Grounding

    • The grounding point should be close to the PLC, and all grounding wires should be as short as possible. Communication Setting For the FX5 communication settings of this function, parameters are set using GX Works3. For details about GX Works3, refer to GX Works3 Operating Manual.
  • Page 25 Window The following screen will be displayed if [FX5-485-BD] is set for the extended board and [N:N Network] is set for the communication protocol type. Fixed setting and SM/SD setting are the same as in the case of built-in RS-485 port (CH1).
  • Page 26 Set the following items for the serial ports that use N:N Network. However, only one channel can be set to the N:N Network. Items Setting value Reference section  Basic Settings Extended Board When using this function, select [FX5-485-BD]. Communication Protocol Type When using this function, select [N:N Network]. Fixed Setting Host Station No. 0(Master) Page 17 1 to 7: (Slave station)
  • Page 27: Programming

    In N:N Network, pattern 0, 1 or 2 can be set according to the refresh range value. The number of used devices varies depending on the pattern. About FX5 PLC program and communication test, refer to FX Series User's Manual - Data Communication Edition. Communication setting Serial communication setting are as follows.
  • Page 28 Link device The devices are assigned according to the set pattern in the the refresh range setting as the following set device number (All stations, bit device (M): 4000, word device (D): 1000) set at the head. (Page 17 Link specifications) ■Pattern 0 Station Master...
  • Page 29: Communication Test

    Communication test It is recommended to wire the master station and slave station, perform communication settings, and then execute the communication test using the following procedure to confirm proper operation. Communication test program is not required during operation. Communication test process After configuring the communication setting of the master station and slave station, and programming, turn the CPU module power supply OFFON or reset the system.
  • Page 30 Test program for communication (slave station) Determine the station number of each slave station, and then transfer a program corresponding to the station number to each slave station. Assign station numbers from "1" in the ascending order. (Use one station number only once. Do not skip station numbers). RUN monitor SM400 Steps for reading information from a slave station...
  • Page 31: Create The Master Station Program

    Create the master station program Create programs for the master station. Arbitrarily create programs for reading and writing link devices. Program for indicating link errors This program is required to indicate the N:N Network status. Create this step for each connected slave Data transfer sequence error in station.
  • Page 32 Program for reading link devices (slave station → master station) This program is required to read information from Data transfer each slave station to the master station.Monitor link sequence error in errors in each slave station, and read them. slave station No. 1 M4064 SM9041 The information from M4064 (link device) is read to...
  • Page 33: Create Programs For The Slave Stations

    Create programs for the slave stations Create programs for the slave stations. Arbitrarily create programs for reading and writing link devices. The following program is for the slave station of station number 1. Program for station number 2 and later are similar. Program for indicating link errors This program is required to indicate the N:N Network Data transfer...
  • Page 34: Cautions On Program Creation

    Program for reading link devices (slave station ← master or slave station) This program is required to read information from the master station or another slave station to a slave station. Data transfer Monitor link errors in each slave station, and read sequence error in slave station No.
  • Page 35: Troubleshooting

    • Precaution when changing the station number and number of slave stations Only when the station number and number of slave stations are set with latch setting can the setting values be written to the corresponding word device from a program or an engineering tool and the setting be changed by powering OFFON or a system reset.
  • Page 36: Checking Sequence Program

    Serial communication error ■Error flags If a communication error occurs in the N:N Network, the serial communication error flag turns ON. Verify that the device specified in the table below is ON. FX5 only FX3 Series Name Descriptions compatible...
  • Page 37 Data transfer sequence error ■Check while data transfer sequence is being executed Verify that the device specified in the table below is ON. While N:N Network is being executed, the data transfer sequence ON flag remains ON. FX5 only FX3 Series Name Descriptions...
  • Page 38: Related Devices

    *1 Not supported for data transfer sequence error. *2 Station in which error occurred *3 Any slave station other than the slave station in which error occurred Related Devices List of related devices Special relay ■FX5 only Device Name Descriptions Dete Available station...
  • Page 39 Device Name Descriptions Dete Available station ction Master Slave stations station (Station No. 0)   SM9041 Data transfer sequence error Turns ON when data transfer sequence error of slave station (Slave station 1) occurs (Except station 1) However, data sequence errors that occurred in the local ...
  • Page 40 Special Register ■FX5 only Device Name Descriptions Dete Available station ction Master Slave stations station (Station No. 0)   SD9040 Station number settings Provided to check the station number. status (Station 1 to 7)   SD9041 Number of slave stations Provided to check the number of slave stations.
  • Page 41 Device Name Descriptions Dete Available station ction Master Slave stations station (Station No. 0)   SD9062 Data transmission error code Number of data transfer sequence errors occurred in other (slave station 1) slave station. (Except station 1) However, data sequence errors that occurred in the local ...
  • Page 42 Device Name Descriptions Dete Available station ction Master Slave stations station (Station No. 0)   SD8439 Serial communication Store the communication function of the serial operation mode (CH2) communication operation with the SM/SD compatible with (Station 1 to 7) FX3 Series in CH2.
  • Page 43: Details Of Related Devices

    The "FX3 Series-compatible" device operates only the channel which is specified in the SM/SD settings. Serial communication error Turns ON when an error occurs in serial communication. These flags are for check of the serial communication error. FX5 only FX3 Series Descriptions...
  • Page 44 Data transfer sequence ON Turns ON the data send operation with the master station and also the other slave stations. FX5 only FX3 Series compatible Descriptions SM9056 SM8191 ON: Data transfer sequence processing OFF: Data transfer sequence is stopped R: Read only Precautions Do not turn ON with program or engineering tool.
  • Page 45 Station number settings status Stores the set station number in the communication settings (Page 22). This device is for checking the setting status of station number of the local station. FX5 only FX3 Series compatible Descriptions SD9040 SD8173 0: Master station...
  • Page 46 Number of slave stations setting status Stores the set number of slave stations in the communication settings. Use this device to check the number of slave stations set in the master station. FX5 only FX3 Series compatible Descriptions SD9041 SD8174...
  • Page 47 Refresh range setting status Stores the set refresh range in the communication settings (Page 22). Use this device to check the refresh range set in the master station. FX5 only FX3 Series compatible Descriptions SD9082 SD8175 0: pattern 0 1: pattern 1...
  • Page 48 Present link scan time This device stores the current value of the network cycle in the N:N Network. FX5 only FX3 Series compatible Descriptions SD9043 SD8201 0 to 32767 (10 ms) R: Read only Precautions Do not change the value with program or engineering tool.
  • Page 49 Station Station Station Station Station Station No. 0 No. 1 No. 2 No. 3 No. 4 No. 5 No. 6 No. 7 FX5 only SD9061 SD9062 SD9063 SD9064 SD9065 SD9066 SD9067 SD9068 FX3 Series compatible SD8211 SD8212 SD8213 SD8214 SD8215...
  • Page 50: Chapter 3 Mc Protocol

    An MC protocol is a protocol to access an equipment compatible with MC protocol from a CPU module and external equipment (PC or indicator etc.) using serial communication. In case of a serial port of FX5, communication is possible by MC protocol QnA-compatible 3C/4C frame. Function Summary An MC protocol function is a function to access an equipment compatible with MC protocol from a CPU module and counterpart device equipments (PC or GOT etc.) using serial communication.
  • Page 51: Procedures Before Operation

    Since it is built-into the CPU module, there is no need to add 50 m or less equipment. Communication FX5-485-BD Mounted on top of the CPU module, there is no change in the 50 m or less board installation space requirements.
  • Page 52: Specifications

    RS-485 Distance varies depending on communication • When FX5-485ADP is used: 1200 m or less equipment type. • When using built-in RS-485 port or FX5-485-BD: 50m or less RS-232C: 15 m or less Protocol type MC protocol (dedicated protocol) 3C/4C frame There are format1/ format4 /format5.
  • Page 53 *3 This is the number of characters when format1 is used and the sum check is not provided at the time of execution of batch read/write command. When format4 is used, add "4" to this value. Further, when the sum check is provided, add "4" to this value also. Further, when specifying an extension, add "+7"...
  • Page 54: Wiring

    When using MC protocol 3C/4C frame, connection can be achieved in accordance with RS-232C or RS-485 (RS-422) communication. In FX5, it is possible to use a serial port for up-to a maximum of 4 channels simultaneously by using MC protocol. Depending on each serial port, the available communication and channel number are decided.
  • Page 55: Cable

    (AWG24 to 20)  Two wires 0.2 mm (AWG24) FX5UC CPU module built-in RS-485 port One wire 0.3 to 0.5 mm 0.3 to 0.5 mm FX5-485-BD (AWG22 to 20) (AWG22 to 20) FX5-485ADP  Two wires 0.3 mm (AWG22) Precautions Do not tighten terminal screws exceeding the specified torque range.
  • Page 56 • Twist the end of stranded wire and make sure that there are no loose wires. • Please do not solder plate the ends of the cable. Dimensions of the cable end FX5U CPU module built-in RS-485 port FX5UC CPU module built-in RS-485 port, FX5-485-BD, FX5-485ADP 9 mm 5 mm (0.2")
  • Page 57: Termination Resistor Setting

    Termination resistor setting Make sure to provide a termination resistor at both ends of the wire. The built-in RS-485 port, FX5-485-BD and FX5-485ADP have a built-in termination resistor. Set the termination resistor selector switch as below. Wiring Termination resistor selector switch 330 ...
  • Page 58 *1 Make sure to perform Class-D grounding on the shield of the twisted pair cable to be connected. *2 Make sure to provide a terminal resistor at the end of each line. Set built-in RS-485 port, FX5-485-BD, and FX5-485ADP to 330 ...
  • Page 59: Grounding

    • The grounding point should be close to the PLC, and all grounding wires should be as short as possible. Communication Setting For the FX5 communication settings of this function, parameters are set using GX Works3. For details about GX Works3, refer to GX Works3 Operating Manual.
  • Page 60 Window The following screen will be displayed if [FX5-232-BD] or [FX5-485-BD] is set for the extended board and [MC Protocol] is set for the communication protocol type. Fixed setting and SM/SD setting are the same as in the case of built-in RS-485 port (CH1).
  • Page 61: Mc Protocol Command

    The following settings are unnecessary (fixed values). Items Descriptions Start bit 1 bit Header Not added Terminator Not added Control mode Control procedure CR and LF no addition Latch Setting Set the necessity of the corresponding SD (special register) latch. Descriptions Setting range Compatible devices...
  • Page 62 Name Comm Sub- Contents of processing Number of points ands comm processed in one- time update Random writing 1402H 0001H Writes data in 1-bit unit to a bit device by randomly specifying the device number. 188 points (Device Write 0000H •...
  • Page 63: Applicable Device

    Specify devices and device number range that are there in the targeted unit for performing data reading, writing etc. In 3C/4C frame, in the following "Device Code", specify a device of the access point. Division Device Type Device Code Device No. FX5 device (Device specification available format: Long) ASCII code Binary code ...
  • Page 64: Troubleshooting

    [Binary code] When a device code is less than the specified size, add "00H" at the end of the device code. *2 : FX5 device : No FX5 device *3 It is necessary to make "Device memory extension specification" of the sub-command to ON (1).
  • Page 65: Checking Sequence Program

    Checking sequence program An error may occur when a serial port using MC protocol is specified in a command that will be used in inverter communication, non-protocol communication or predefined protocol support function. (Page 212 Combined Use of Serial Communication) Checking the communication setting Verify that protocol type is "MC Protocol".
  • Page 66 Parity error • The parity bit settings do not match. • Match the settings of FX5 PLC and counterpart equipment. • A disturbance occurred in the line due to power supply • Clear the error information by error initialization request (YE/ ON/OFF of the counterpart station.
  • Page 67: Related Devices

    When an error code above is stored, check the following items: Name Description of error Troubleshooting Parity, overrun or framing error The transfer data is abnormal. Check the transfer specifications set using parameters, and execute communication again. Command error When the station number was FFH, any command Modify the specified command to execute the other than "GW"...
  • Page 68: Details Of Related Devices

    Details of related devices The devices described below are used in MC protocol. Serial communication error Turns ON when an error occurs in serial communication. These flags are for check of the serial communication error. Description SM8500 SM8510 SM8520 SM8530 Turns ON when an error occurs in serial communication.
  • Page 69 Serial communication settings Stores the set communication parameter in the communication settings when turning OFFON the PLC power or resetting the system. (Page 57 Communication Setting) Description SD8502 SD8512 SD8522 SD8532 Stores the setting of the communication parameter. R: Read only The descriptions of the communication parameters are as follows.
  • Page 70 Message system Stores the settings of the message system (format1, 4, 5) that is set in the parameter. Description SD8741 SD8751 SD8761 SD8771 Stores the setting of the message system. R: Read only Precautions Do not turn ON or OFF with program or engineering tool. Time out judge time Stores the judgment time until the error when a data reception is stopped from the counterpart equipment, set in the parameter when the power supply is turned OFFON or system is reset.
  • Page 71: Chapter 4 Inverter Communication

    This chapter explains inverter communication. Function Outline Inverter communication function allows connection between an FX5 PLC and up to 16 inverters through RS-485 communication, and monitors operations of inverters, gives various commands to inverters and reads and writes inverter parameters.
  • Page 72: Procedure Before Operation

    Procedure before Operation The flow chart below shows the Inverter Communication setting and sequence programs creation procedure until data link: Check communication specifications Refer to Page 71 Specifications. • Applicable inverter Operation commands and parameters • • Execution time of inverter communication System configuration and selection Refer to Page 70 System Configuration.
  • Page 73: Specifications

    Maximum of 16  Transmission standard RS-485 standard  Maximum overall distance When FX5-485ADP is used: 1200 m or less When using built-in RS-485 port or FX5-485-BD: 50 m or less  Protocol type Inverter computer link  Control procedure Asynchronous system ...
  • Page 74 Inverter Read contents Applicable inverter Instruction A800 F700PJ F700P A700 E700 E700EX D700 V500 code (hexadecimal)         Operation mode         Output frequency/speed     ...
  • Page 75: Time Required For Inverter Communication Instructions

    Time required for inverter communication instructions Outline The period of time after one inverter communication instruction is driven until communication with the inverter is completed (SM8029 turns ON) is considered as the required time for the inverter communication instruction as shown. Inverter communication instruction SM8029...
  • Page 76 Calculation method The required time "Tinv" for inverter communication instruction in units of "ms" is calculated as follows. "INT(n)" in the calculation formula indicates an integer obtained by truncating decimal places of "n". ■Length of 1 character In inverter communication, the communication setting is as shown in the following table. The length of 1 character is as shown in the following expression.
  • Page 77 ■Number of sent/received characters Inverter Parameter/ First Second Third communication instruction code Send Receive Total Send Receive Total Send Receive Total instruction       IVCK H73, H7A, H7F, H6C       Other than above ...
  • Page 78 Calculation example This is a calculation example for the following communication settings and scan time when communicating with an inverter. Communication speed = 19200[bps] Length of 1 character = 10[bit] Scan time = 10[ms] ■Calculation example 1 Calculation of required time when Pr. 3 is read by the IVRD instruction Tinv=T =181[ms] =10[ms], T...
  • Page 79: Wiring

    ■Calculation example 3 Calculation of required time when Pr. 10 to Pr. 14 [(s2) = 5] are written by the IVBWR instruction Tinv=T =851[ms] =10(s2)=50[ms], T =1[ms] Calculate "T " as follows because Pr.10 to Pr. 14 do not require change of the 2nd parameter and the time required for writing is same in each parameter.
  • Page 80: Connection Method

    Single wire Termination resistor (RJ45 connector) (Use twisted pair cable or (Which is built in the FX5 PLC, and must be 10BASE-T cable for LAN.) arranged by the user for the inverter, and supplied with or built in for other communication...
  • Page 81 • In the case of 1-to-n connection Termination 10BASE-T 10BASE-T resistor cable cable Distributor Distributor Distributor 10BASE-T 10BASE-T 10BASE-T cable cable cable 10BASE-T cable connector connector connector • Because the termination resistor cannot be connected to the inverter, use a distributor. •...
  • Page 82: Cable

    ■FR-A5NR (V500 Series only) • In the case of 1-to-1 connection When a distributor is not used FR-A5NR Twisted pair cable Termination resistor • In the case of 1-to-n connection When a distributor is not used Twisted pair cable Twisted pair cable Termination resistor Twisted pair cable FR-A5NR...
  • Page 83 • Twist the end of stranded wire and make sure that there are no loose wires. • Please do not solder plate the ends of the cable. Dimensions of the cable end FX5U CPU module built-in RS-485 port FX5UC CPU module built-in RS-485 port, FX5-485-BD, FX5-485ADP 5 mm 9 mm (0.2")
  • Page 84: Connection Devices (Rj45 Connector And Distributor)

    Because it is difficult to insert a cable into an insulating sleeve depending on the thickness of the cable sheath, select the proper cable according to the outline drawing. FX5U CPU module built-in RS-485 port FX5UC CPU module built-in RS-485 port, FX5-485-BD, FX5-485ADP Contact area...
  • Page 85: Termination Resistor Setting

    Termination resistor setting Set or connect termination resistor of the inverter farthest from the FX5 PLC. For details on connection, refer to Page 84 Connection diagram. At the FX5 PLC The built-in RS-485 port, FX5-485-BD and FX5-485ADP have a built-in termination resistor.
  • Page 86: Shielded Wiring

    A800/F700P/A700 series ■Built-in RS-485 terminal • When one inverter is connected Set the termination resistor selector switch to "110 ". Built-in RS-485 port FX5-485-BD FX5-485ADP Twisted pair cable (0.3 mm or more) Set the termination resistor selector switch to "100 ".
  • Page 87 • When multiple (up to 16) inverters are connected Set the termination resistor selector Set the termination resistor switch to "110 ". selector switch of the farthest Built-in RS-485 port inverter to "100 ". FX5-485-BD Twisted pair cable FX5-485ADP (0.3 mm or more) 0.3 mm or more...
  • Page 88 • When multiple (up to 16) inverters are connected (4-wire type) Connect a termination resistor of 100 , 1/2 W (not supplied) Set the termination resistor selector to the most distant inverter. switch to "110 ". Built-in RS-485 port FX5-485-BD Distributor Distributor Distributor FX5-485ADP 10BASE-T 5 4 3 6 1...
  • Page 89 ■FR-E7TR • When one inverter is connected (4-wire type) Set the termination resistor selector Built-in RS-485 port switch to "110 ". FX5-485-BD FX5-485ADP Twisted pair cable (0.3 mm or more) Set the termination resistor selector switch to "100 ". 0.3 mm...
  • Page 90 • When one inverter is connected (2-wire type) Set the termination resistor selector Built-in RS-485 port switch to "110 ". FX5-485-BD FX5-485ADP Twisted pair cable (0.3 mm or more) Crossover Set the termination resistor selector switch to "100 ". wiring 0.3 mm...
  • Page 91: Grounding

    ■FR-A5NR • When one inverter is connected Set the termination resistor selector switch to "110 ". Built-in RS-485 port FX5-485-BD FX5-485ADP Twisted pair cable (0.3 mm or more) Connect the termination resistor connection piece. 0.3 mm or more Terminal array...
  • Page 92: Inverter Communication Settings

    Inverter Communication Settings Before connecting an inverter to a PLC, set parameters related to communication in the inverter parameter unit (PU) in advance. For details on each function, refer to the inverter manual for each respective series. Model Model Connection Relevant parameters Reference classification...
  • Page 93 Parameters (test operation, operation) Parameters that must be adjusted for test operation and operation are as follows. Parameter Parameter item Setting Set conditions group value N035 RS-485 communication number of 9999 Set the value shown on the left during adjustment, and set a value retries from 1 to 10 during operation.
  • Page 94: Freqrol-F700P/A700 Series

    FREQROL-F700P/A700 series Connection destination: Built-in RS-485 terminal Contents of communication setting (essential items) The table below shows parameters which should be set in all cases. Parameter No. Parameter item Setting Set conditions value Pr.331 RS-485 communication station 0 to 31 Up to 16 inverters can be connected.
  • Page 95: Freqrol-F700Pj/E700/D700/E700Ex Series

    Parameters (set as needed) The table below shows parameters to be considered when using various system configuration and inverters. For the method of use, refer to the respective inverter manual. Parameter No. Parameter item Setting Set conditions value Pr.342 Communication EEPROM write 0 or 1 0: Write to EEPROM and RAM selection...
  • Page 96: Freqrol-V500 Series

    ■Cautions during setting Caution for setting the PU communication check time interval (Pr.122) Description Setting value During adjustment or when communication with the PLC is not executed 9999 periodically When communication with the PLC is not executed Set the communication time in the following cases. 1 to 9998 •...
  • Page 97: Plc Communication Settings

    1: RAM is written. PLC Communication settings For the FX5 communication settings of this function, parameters are set using GX Works3. For details about GX Works3, refer to GX Works3 Operating Manual. Setting of parameter differs according to the module used. The procedure for each module is as follows.
  • Page 98 Window The following screen will be displayed if [FX5-485-BD] is set for the extended board and [Inverter Communication] is set for the communication protocol type. Fixed setting and SM/SD setting are the same as in the case of built-in RS-485 port (CH1).
  • Page 99: Programming

    The following settings are unnecessary (fixed values). Items Description Start Bit 1 bit Header Not Added Terminator Not Added Control Mode None Sum Check Code Not Added Control Procedure None FX3 Series-compatible SM/SD When using the FX3 Series compatible SM/SD storage area, set to use special devices for either the FX3 Series CH1 or CH2. FX3 Series compatible devices corresponding to the specified channel can be used.
  • Page 100 ■Communication execution state output device The inverter communication instruction of the FX5 specifies communication execution state in operand (d) or (d2). Bit device (3 bit occupied) outputs according to state of inverter communication instruction (execution in progress/normal completion/error completion); the state can be confirmed from specified bit device.
  • Page 101 • Inverter communication instructions standby for 11 ms after acquiring a communication port, and then starts communication. Even if the drive contact turns ON, the inverter communication instruction stands by until (SM8920) turns ONOFF when the SM8920 inverter communication busy flag has been turned ON by other inverter communication instruction.
  • Page 102 To acquire the result of each inverter communication instruction, program as necessary just below the inverter communication instruction using these flags. ■Related devices • Special relays FX5 dedicated Description SM8029 Instruction execution completed SM8500...
  • Page 103 ■Operation of instruction execution complete flag When communication with an inverter is completed, the instruction execution completed flag (SM8029) turns ON, and remains ON for 1 scan. SM8029 indicates completion of IVDR instruction communication as shown below, when M0, M2 are OFF and M1 is ON. If inverter communication instruction ends normally, instruction execution normal end flag (Page 98) turns ON simultaneously with SM8029.
  • Page 104 ■When programming an inverter communication instruction in a state of an STL instruction Do not turn state OFF until communication with the inverter is finished. Program in accordance with the following sequence. • Add SM8029 (instruction execution complete flag) ON condition to the state relay transfer condition, and provide interlock such that the state relay ON/OFF status does not change during communication with an inverter.
  • Page 105: Inverter Operation Monitoring Instruction

    Inverter operation monitoring instruction This instruction reads the operation status of an inverter. For information concerning inverter communication instruction expressions and execution format, refer to Programming Manual (Instructions, Standard Functions/Function Blocks). IVCK Ladder FBD/LD ENO:=IVCK (EN, s1, s2, n, d1, d2); (s1) (s2) (d1) (d2)
  • Page 106 Operation error Operation errors pertaining to the instruction are as follows. Operation Error Flag Operation Error Description Codes SM56 SM8067 SD8067 1810 When specified channel is used with another instruction. 2820 When specified device exceeds the device range. 3405 When the value specified for (s1) is other than K0 to 31. When the value specified for (n) is other than K1 to 4.
  • Page 107: Inverter Operation Control Instruction

    Inverter operation control instruction This instruction writes an inverter operation required set value to an inverter. For information concerning inverter communication instruction expressions and execution format, refer to Programming Manual (Instructions, Standard Functions/Function Blocks). IVDR Ladder FBD/LD ENO:=IVDR (EN, s1, s2, s3, n, d); (s1) (s2) (s3) Setting data...
  • Page 108 Operation error Operation errors pertaining to the instruction are as follows. Operation Error Flag Operation Error Description Codes SM56 SM8067 SD8067 1810 When specified channel is used with another instruction. 2820 When specified device exceeds the device range. 3405 When the value specified for (s1) is other than K0 to 31. When the value specified for (n) is other than K1 to 4.
  • Page 109: Inverter Parameter Read

    Inverter parameter read This instruction reads an inverter parameter to the PLC. For information concerning inverter communication instruction expressions and execution format, refer to Programming Manual (Instructions, Standard Functions/Function Blocks). IVRD Ladder FBD/LD ENO:=IVRD (EN, s1, s2, n, d1, d2); (s1) (s2) (d1) (d2)
  • Page 110 Operation error Operation errors pertaining to the instruction are as follows. Operation Error Flag Operation Error Description Codes SM56 SM8067 SD8067 1810 When specified channel is used with another instruction. 2820 When specified device exceeds the device range. 3405 When the value specified for (s1) is other than K0 to 31. When the value specified for (s2) is outside the range that can be specified.
  • Page 111: Inverter Parameter Write

    Inverter parameter write This instruction writes a value from the PLC to a parameter in an inverter. For information concerning inverter communication instruction expressions and execution format, refer to Programming Manual (Instructions, Standard Functions/Function Blocks). IVWR Ladder FBD/LD ENO:=IVWR (EN, s1, s2, s3, n, d); (s1) (s2) (s3) Setting data...
  • Page 112 Operation error Operation errors pertaining to the instruction are as follows. Operation Error Flag Operation Error Description Codes SM56 SM8067 SD8067 1810 When specified channel is used with another instruction. 2820 When specified device exceeds the device range. 3405 When the value specified for (s1) is other than K0 to 31. When the value specified for (s2) is outside the range that can be specified.
  • Page 113: Inverter Parameter Block Write

    Inverter parameter block write This instruction writes parameters of an inverter at one time For information concerning inverter communication instruction expressions and execution format, refer to Programming Manual (Instructions, Standard Functions/Function Blocks). IVBWR Ladder FBD/LD ENO:=IVBWR (EN, s1, s2, s3, n, d); (s1) (s2) (s3) Setting data...
  • Page 114 Writing contents in case of (s2): K8, (s3): D200 (s3) D200 Parameter No. 1 (s3)+1 D201 Parameter 1 value (s3)+2 D202 Parameter No. 2 (s3)+3 D203 Parameter 2 value (s2)×2 = Number of occupied word devices (s3)+14 D214 Parameter No. 8 (s3)+15 D215 Parameter 8 value...
  • Page 115 Program example Writes upper limit frequency (Pr. 1): 120 Hz, lower limit frequency (Pr. 2): 5 Hz, acceleration time (Pr. 7): 1 second, deceleration time (Pr. 8): 1 second for inverter (station No. 5) from PLC (CH1). Writing contents: Parameter No. 1 = D200, 2 = D202, 7 = D204, 8 = D206, upper limit frequency = D201, lower limit frequency = D203, acceleration time = D205, deceleration time = D207 Initial pulse SM402...
  • Page 116: Multiple Inverter Commands

    Multiple inverter commands This instruction writes 2 types of settings (operation command and set frequency) to the inverter, and reads 2 types of data (inverter status monitor, output frequency, etc.) from the inverter at the same time. For information concerning inverter communication instruction expressions and execution format, refer to Programming Manual (Instructions, Standard Functions/Function Blocks).
  • Page 117 Program example Writes (s3): run command (expansion), (s3) +1: setting frequency (RAM) and reads (d1): inverter status monitor (expansion), (d1) +1: output frequency (rotation speed) for inverter (station No. 0) from FX5 PLC (CH1). Send/receive type code: H0000 • (s3): Run command (expansion) Runs inverter in forward or reverse by forward rotation command (M21)/reverse rotation command (M22).
  • Page 118 RUN monitor SM400 Initial value at startup: MOVP K6000 60 Hz Switch Switch command command (Speed 1) (Speed 2) Write contents to Inverter Operation speed: 40 Hz MOVP K4000 Transmission data 2 (s3)+1 Switch Switch command command (Speed 2) (Speed 1) MOVP K2000 Operation speed: 20 Hz...
  • Page 119: Second Parameter Specification Code

    Second parameter specification code When handling the following parameters in inverter communication, it is necessary to select second parameters. In IVRD, IVWR, and IVBWR instructions, when a value shown in the tables below is set in (s2) ((s3) in IVBWR instruction), the extension parameter and second parameter are automatically overwritten, and parameter values are either read or written.
  • Page 120 Parameter Name Second parameter specification code [Value to be specified in (s2) in IVRD and IVWR instruction for parameter No. (decimal)] Terminal 4 frequency setting gain 1905 PID display bias coefficient PID display bias analog value 1934 PID display gain coefficient PID display gain analog value 1935 FREQROL-A700 series...
  • Page 121: Troubleshooting

    Parameter Name Second parameter specification code [Value to be specified in (s2) in IVRD and IVWR instruction for parameter No. (decimal)] Terminal 4 frequency setting bias 1904 Terminal 4 frequency setting gain frequency Terminal 4 frequency setting gain 1905 Frequency setting voltage bias frequency (Built-in potentiometer) Frequency setting voltage bias 1922...
  • Page 122: Checking Installation

    If an inverter communication error occurs, it is processed as a serial communication error. (Page 101) Serial communication error ■Error flags The following devices turn ON when an error occurs during serial communication. FX5 dedicated FX3 Series Name Description compatible...
  • Page 123 ■Error code When the serial communication error turns ON, the error code is stored in the corresponding device specified in the table below. FX5 dedicated FX3 Series Name Description compatible SD8500 SD8510 SD8520 SD8530 SD8063 SD8438 Serial communication error When a serial communication error occurs, code the error code is stored.
  • Page 124 Operation error ■Error flags The operation error flag turns ON when an operation error occurs in the inverter communication instruction. Verify that the device specified in the table below is ON. FX5 dedicated Name Description Latest self-diagnostic error Turns ON when an operation error occurs.
  • Page 125: Related Devices

    4.10 Related Devices List of related devices Special relay ■FX5 only Device No. Name Description SM8029 Instruction execution Turns ON when execution of instruction is completed, and remains completed ON for 1 scan. SM8500 SM8510 SM8520 SM8530 Serial communication error Turns ON when an error occurs in serial communication.
  • Page 126: Details Of Related Devices

    Instruction execution completed Turns ON when the execution of inverter communication instruction is completed, and remains ON for 1 scan. When an error occurs in an inverter communication instruction, remains ON for 1 scan in the same way. FX5 dedicated Description SM8029 When execution of instruction is completed, turns ON for 1 scan.
  • Page 127 Devices are cleared when power is turned OFFON, STOPRUN, system is reset or SM50 (Error Detection Reset Completion) is turned ON. IVBWR instruction error The devices turn ON when a parameter number or set value specified in IVBWR instruction is outside the allowable range. FX5 dedicated FX3 Series Description compatible...
  • Page 128 Serial communication error code Stores the error code (Page 120) when the inverter communication instruction error occurs. FX5 dedicated FX3 Series Description compatible SD8500 SD8510 SD8520 SD8530 SD8063 SD8438 When a serial communication error occurs, the error code is stored.
  • Page 129 Devices are cleared when power is turned OFFON, STOPRUN, system is reset or SM50 (Error Detection Reset Completion) is turned ON. IVBWR instruction error parameter number These devices store the parameter number in which an error has occurred when IVBWR instruction error flag turns ON. FX5 dedicated FX3 Series Description compatible...
  • Page 130: Chapter 5 Non-Protocol Communication

    • Up to 4096 points of data can be sent, and up to 4096 points of data can be received. • Data transfer is enabled when the connected equipment supports non-protocol serial communication. • The overall distance is 1200 m maximum. (Applies only when configured by FX5-485ADP) System...
  • Page 131: Procedure Before Operation

    Procedure before Operation The flow chart below shows the Non-Protocol Communication setting procedure up until data link: Check communication specifications Refer to Page 130 Specifications. • Communication specifications Communication applicability • System configuration and selection. Refer to Page 129 System Configuration. Wiring Refer to Page 131 Wiring.
  • Page 132: Specifications

    RS-485 and RS-422 standard RS-232C standard Maximum overall distance When FX5-485ADP is used: 1200 m or less 15 m or less When using built-in RS-485 port or FX5-485-BD: 50 m or less Number of Transfer Data 0 to 4096 ...
  • Page 133: Wiring

    Wiring This section explains about the wiring. Wiring procedure Preparing for wiring Prepare cables and termination resistors required for wiring. (Page 131 Cable) Turn OFF the PLC power Before wiring, make sure that the PLC power is OFF. Wire the communication equipment Connect the RS-485, RS-232C communication equipment.
  • Page 134 • Twist the end of stranded wire and make sure that there are no loose wires. • Please do not solder plate the ends of the cable. Dimensions of the cable end FX5U CPU module built-in RS-485 port FX5UC CPU module built-in RS-485 port, FX5-485-BD, FX5-485ADP 5 mm 9 mm (0.2")
  • Page 135: Termination Resistor Setting

    SZS 0.42.5 Termination resistor setting Make sure to provide a termination resistor at both ends of the wire. The built-in RS-485 port, FX5-485-BD and FX5-485ADP have a built-in termination resistor. Set the termination resistor selector switch as below. Wiring Termination resistor selector switch 330 ...
  • Page 136: Connection Diagram

    Connection diagram RS-232C communication equipment ■Connector pin arrangement FX5-232-BD, FX5-232ADP Signal name Function D-SUB 9-pin (male) Pin No. CD (DCD) Receive carrier detection RD (RXD) Receive data SD (TXD) Send data ER (DTR) Send request SG (GND) Signal ground DR (DSR)
  • Page 137 *1 Make sure to perform Class-D grounding on the shield of the twisted pair cable to be connected. *2 Make sure to provide a termination resistor at both ends of the wire. The built-in RS-485 port, FX5-485-BD and FX5-485ADP have built- in termination resistors.
  • Page 138: Grounding

    • The grounding point should be close to the PLC, and all grounding wires should be as short as possible. Communication Settings For the FX5 communication settings of this function, parameters are set using GX Works3. For details about GX Works3, refer to GX Works3 Operating Manual.
  • Page 139 Window The following screen will be displayed if [FX5-232-BD] or [FX5-485-BD] is set for the extended board and [Non-protocol Communication] is set for the communication protocol type. Fixed setting and SM/SD setting are the same as in the case of built-in RS-485 port (CH1).
  • Page 140 Set the following items for the serial ports that use non-protocol communication. Items Setting value Reference section  Basic Settings Extended Board When using this function, select [FX5-232-BD] or [FX5-485- BD]. Communication Protocol Type When using this function, select [Non-protocol Communication]. Advanced Settings Data Length 7bit/8bit...
  • Page 141: Programming

    Programming This section explains how to create programs for non-protocol communication using RS2 instruction and how such programs operate. For details on related devices, refer to Page 156 Related Devices. For communication settings, refer to Page 136 Communication Settings. Serial data communication This section explains the function, operation and programming method of the RS2 instruction.
  • Page 142 When headers are set in the communication settings (Page 136), the set values are stored in SD8623 and SD8624 for CH1, SD8633 and SD8634 for CH2, SD8643 and SD8644 for CH3 and SD8653 and SD8654 for CH4. Up to four headers can be set. Header FX5 dedicated First header Second header Third header...
  • Page 143 When terminators are set in the communication settings (Page 136), the set values are stored in SD8625 and SD8626 for CH1, SD8635 and SD8636 for CH2, SD8645 and SD8646 for CH3 and SD8655 and SD8656 for CH4. Up to 4 terminators can be set. Terminator FX5 dedicated First header Second header Third header...
  • Page 144 Function and operation RS2 instruction specifies head device of the send data, no. of data, head device for storing the received data, the maximum no. of data that can be received. Create a program as shown below. Drive contact D100 D200 •...
  • Page 145 Send/receive data and amount of data RS2 instruction can handle sent and received data in two modes, 16-bit mode and 8-bit mode. The processing mode is set in the communication settings, and when the RS2 instruction is drive, the mode is switched to the set mode. The handling of data is as follows.
  • Page 146 • Receive data and amount of data received Header Data area Terminator Sum data The order is different from the data area. High High High High High order of order of order of order of order of order of order of order of order of order of...
  • Page 147 ■8-bit mode monitor SM400 16-bit data D100 D200 Ignored Lower 8 bits The upper 8 bits are ignored. Serial communication setting Only the lower 8 bits are valid. • Header : [Added] [DLE + STX (SD8623: 0210H, SD8624: 0000H)] • Terminator : [Added] [DLE + ETX (SD8625: 0310H, SD8626: 0000H)] •...
  • Page 148 The higher-order 8 bits of data of the receive data storage destination device holds the data previously received. Operation during data send When the sending request flag is set to ON while RS2 instruction is driven, the PLC sends the data stored in (s) to ((s)+(n1)-1). Name FX5 dedicated Send request flag SM8561 SM8571 SM8581 SM8591 When sending of the data is completed, the sending request flag is automatically set to OFF.
  • Page 149 Operation during data receive When executing the RS2 instruction, the PLC waits to receive. When the PLC receives data from the counterpart equipment and receiving data is completed, the receiving completed flag turns ON. Name FX5 dedicated Receiving completed flag SM8562 SM8572...
  • Page 150 The time-out flag does not automatically turn OFF. Reset using program. While it remains ON, the PLC cannot receive the next set of data. When the receiving completed flag is set to OFF, the time-out flag is also set to OFF. Using this function, the PLC can receive data from equipment where the amount of send data varies without the terminators.
  • Page 151 Half-duplex, bi-directional communication operation ■Send completed  start send operation When sending of the data is completed, the sending request flag is automatically set to OFF. When RS2 instruction is executed again after the sending request flag is set to ON, the PLC starts to send. ■Send completed ...
  • Page 152: Operation Of Control Line (Rs-232C)

    ■For receive data The order is different Header Data area Terminator Sum data from the data area. High High High High High order Low order order of order of order of order of order of order of order of order of of sum of sum SD8623...
  • Page 153 Normal mode Use this mode for only sending or only receiving. ■Send only RS2 instruction The message 1 is interrupted OFF ON execution because DSR is turned off. SD(TXD) Message Message Message Send data Sending request DR(DSR) (Other device → FX) Sending wait flag ER(DTR) (FX →...
  • Page 154 *1 On the external equipment side, set the DR (DSR) signal to ON when the external equipment is ready to receive. The FX5 PLC sends the send data when both the DR (DSR) signal and the sending request turn ON.
  • Page 155: Precautions For Program Creation

    *2 In the interlink mode, the PLC sets ER (DTR) to OFF when the amount of data already received becomes "Number of bytes to be received -30", and asks the external equipment to stop sending. After this send request, the PLC can only receive up to 30 characters and no more, so the external equipment temporarily stops sending, and then sends the remaining data after the ER (DTR) signal turns ON again.
  • Page 156: Troubleshooting

    Checking absence/presence of errors Serial communication error ■Error flags If a communication error occurs in the non-protocol communication, the serial communication error flag turns ON. Verify that the device specified in the table below is ON. FX5 dedicated FX3 Series Name Description compatible...
  • Page 157 ■Error codes When the serial communication error turns ON, the error code is stored in the corresponding device specified in the table below. FX5 dedicated FX3 Series Name Description compatible SD8500 SD8510 SD8520 SD8530 SD8063 SD8438 Serial communication error When a serial communication error occurs, code the error code is stored.
  • Page 158: Related Devices

    Related Devices List of related devices Special relays ■FX5 only Device No. Name Description SM8500 SM8510 SM8520 SM8530 Serial communication error Turns ON when an error occurs in serial communication. SM8561 SM8571 SM8581 SM8591 Send request flag When this device is set to ON, the PLC starts to send.
  • Page 159: Details Of Related Devices

    The "FX3 Series-compatible" device operates only the channel which is specified in the SM/SD settings. Serial communication error Turns ON when an error occurs in serial communication. These flags are for check of the serial communication error. FX5 dedicated FX3 Series Description...
  • Page 160 Sending wait flag These devices remain ON while the PLC is waiting to send. FX5 dedicated FX3 Series Description compatible SM8560 SM8570 SM8580 SM8590 SM8401 SM8421 These devices turn ON when serial communication is waiting to send. R: Read only •...
  • Page 161 Carrier detection flag These devices turn ON/OFF in synchronization with the CD (DCD) signal. FX5 dedicated FX3 Series Description compatible SM8563 SM8573 SM8583 SM8593 SM8404 SM8424 When the CD (DCD) signal of the counterpart device that is communicating via communication is turned ON, this synchronizes with it and turns ON.
  • Page 162 ON. A lag of maximum 1 scan time occurs due to processing in the END processing. Precautions Do not turn ON or OFF with program or engineering tool. Serial communication error code When a serial communication error occurs, these devices store the corresponding error codes (Page 155). FX5 dedicated FX3 Series Description compatible SD8500...
  • Page 163 They are cleared by turning the PLC power OFFON, RUNSTOP or by resetting the system. Amount of remaining send data This stores the amount of remaining send data. These devices store the counted value in 8-bit (1 byte) units. FX5 dedicated FX3 Series Description...
  • Page 164 These devices store the received sum check value. When the sum check code is set to [Added] in the communication settings (Page 136), the sum check is executed for the receive data. These devices store the sum added to the received data sent from the counterpart equipment. FX5 dedicated FX3 Series Description...
  • Page 165 When the sum check code is set to [Added] in the communication settings, always select [Added] for the terminator. Time-out time These devices set the evaluation time for error when receiving of data is interrupted. (Unit: ms) FX5 dedicated Description SD8621...
  • Page 166 These devices store the contents of terminators 1 to 4 set in the communication settings (Page 136). When the terminators are set to [Added] in the communication settings, the terminators are added to the send and receive data. Up to four terminators can be added in each channel. Terminator FX5 dedicated First Second Third header...
  • Page 167: Chapter 6 Predefined Protocol Support Function

    • The protocol can use the general-purpose protocol library, which is pre-registered in the serial communication protocol support tool. Additional protocols can be registered. • Data transfer is enabled when the connected equipment supports non-protocol serial communication. • The overall distance is 1200 m maximum. (Applies only when configured by FX5-485ADP) Counterpart Engineering tool...
  • Page 168: Procedure Before Operation

    Procedure before Operation The flow chart below shows the Predefined Protocol Support Function setting and sequence program creation procedure up until communication with a counterpart device: Check communication specifications Refer to Page 167 Specifications. Communication specifications • • Predefined protocol specifications System configuration and selection Refer to Page 166 System Configuration.
  • Page 169: Specifications

    RS-485 and RS-422 standard RS-232C standard Maximum overall distance When FX5-485ADP is used: 1200 m or less 15 m or less When using built-in RS-485 port or FX5-485-BD: 50 m or less Protocol type Predefined protocol support  Control procedure...
  • Page 170: Communication Type

    Maximum data length: 2048 bytes Communication Settings For the FX5 Series communication settings of this function, parameters are set using GX Works3. For details about GX Works3, refer to GX Works3 Operating Manual. Setting of parameter differs according to the module used. The procedure for each module is as follows.
  • Page 171 Navigation Window  Parameter  FX5UCPU  Module Parameter  Extended Board Window The following screen will be displayed if [FX5-232-BD] or [FX5-485-BD] is set for the extended board and [Predefined Protocol Support Function] is set for the communication protocol type.
  • Page 172: Protocol Setting

    Protocol Setting Protocols can be selected and edited from the libraries that are pre-registered in GX Works3 or registered by the user. Execute the protocol setting from a protocol setting window displayed by the following operation in GX Works3. ToolPredefined Protocol Support FunctionCPU(Serial)New The fields in the protocol setting window are as follows.
  • Page 173: Adding Protocols

    The procedure to set a protocol on the protocol setting screen is as follows. Adding protocols Select or create a protocol from libraries. Page 171 Adding protocols Configuring detailed setting of protocols Set the information and operation of protocols. Page 172 Configuring detailed setting of protocols Setting packets Set the packets of protocols.
  • Page 174: Configuring Detailed Setting Of Protocols

    Configuring detailed setting of protocols Set the send/reception parameters of the added protocol. Set the detailed setting of the protocol on the screen displayed by the following operation. Protocol setting screen  Select a row of any protocol on the protocol setting screen  Edit Protocol Detailed Setting Window The setting item of above screen is follows.
  • Page 175 Item Description Setting requirement Setting range Predefined User Add New Protocol Protocol Library Library    Number of Send Set the number of times the CPU module retries to send 0 to 10 Retries when the sending from the CPU module has not been completed within the set time of monitoring time.
  • Page 176: Operations For Protocol Setting Data

    Operations for protocol setting data The protocol setting data can be written to the CPU built-in memory or an SD memory card. The written protocol data in the memory can be read and verified. The following describes the operations for the protocol setting data. Writing protocol setting data Write the protocol setting data on the screen displayed by the following operation.
  • Page 177 The following data is not displayed even when reading from CPU module because it will not be written as a protocol setting data. However, the protocol selected from the predefined library is displayed. • Manufacturer • Packet name • Type, Version, Explanation in the protocol detailed setting •...
  • Page 178: Packet Setting

    Packet Setting The send packet to the counterpart device and the receive packet from the counterpart device of when process is executed are registered in a protocol. The packet which are set with the predefined protocol support function is created with some elements.
  • Page 179: Header

    Item Description Setting requirement Setting range Predefined User Add New Protocol Protocol Library Library ■List of elements    Element No. These numbers indicate the order of elements. When 1 to 32 any element number is changed, the elements are arranged in the numerical order.
  • Page 180: Terminator

    Considerations for configuring packet element • Only one header can be used in a packet. • A header can be set only at the head of a packet. Data area Header Terminator Terminator Use this element when a code or character string indicating the end of the packet is included. Window Item Description...
  • Page 181: Length

    Length Use this element when an element indicating the data length is included in a packet. • When sending: Calculates the data length of a specified range, and adds the result to a send packet. • When receiving: Verifies the data (value) corresponding to the length in the received data as the data length of the specified range.
  • Page 182: Static Data

    Caution • When the number of digits of calculation result is greater than that specified in Data Length, digits greater than the specified digit are omitted (ignored). When 2 bytes is specified in Data Length and the calculation result is 123 bytes, the data length is considered as 23. •...
  • Page 183: Non-Conversion Variable

    Non-conversion Variable Use this element to send the data in the data device as a part of a send packet, or store a part of a receive packet to the device. Use when there is a variable element in the packet format that depends on the system. For data examples of non-conversion variable, refer to Page 219 Data examples of Non-conversion Variable.
  • Page 184 *2 For the variable data length, the data storage area is decided by specifying the data length storage area. (Page 182 When Fixed Length/Variable Length is Variable Length) Configuration of the data storage area ■When Fixed Length/Variable Length is Fixed Length An area starting from the device number which is specified on the Element Setting screen is considered as the data storage area.
  • Page 185 ■Settable devices Settable devices to data storage area is follows. Device Setting range Remarks Input 0 to 1023 When the assignment has been changed, the devices including the one having the maximum device number after the change can be Output accessed.
  • Page 186: Conversion Variable

    Conversion Variable This element converts the numerical data in the value of device to an ASCII string and sends it, or converts the received data (ASCII string) to numerical data and stores it to the device. When a variable element that is dependent on the system exists during packet formatting, use this function.
  • Page 187 Item Description Blank-padded Character • 0 Select a character used to fill upper digits when the number of digits of data is not Variable at Send • Space Number of Digits and the number of digits of transmitted/received data is less than the specified number of send digits of data.
  • Page 188 Setting item Occupied size in data storage area per one data Conversion Unit Number of Decimals Double Word No Decimal point/Fixed point 2 words Variable point 4 words ■Data storage area configuration per one data The following shows the data storage area configuration per one data. Case of Conversion Unit is Word Number of Decimals No decimal Point/Fixed point...
  • Page 189 Conversion Sign Conversion unit Range of value HEX  ASCII hexadecimal  Word 0H to FFFFH ASCII hexadecimal  HEX Double word 0H to FFFFFFFFH ■Settable devices Settable devices to data storage area is follows. Device Setting range Remarks Input 0 to 1023 When the assignment has been changed, the devices including the one having the maximum device number after the change can be...
  • Page 190 Caution ■A string other than '0'-'9', 'A'-'F', or 'a'-'f' is received When Conversion is ASCII HexadecimalHEX, an error may occur if a string other than '0'-'9', 'A'-'F', or 'a'-'f' is received. ■A string other than '0'-'9' is received When Conversion is ASCII DecimalHEX, an error may occur if a string other than '0'-'9' is received. However, the error does not occur in the following cases.
  • Page 191: Check Code

    Check Code Use this element when an element indicating check code data is included in a packet. CPU module automatically calculates a specified check code at timing of sending/receiving, and adds it to a send packet or detects an error of a receive packet. Window Item Description...
  • Page 192: Non-Verified Reception

    Considerations for configuring packet element • Only one check code can be placed in a packet. • A check code can be placed in any position of the data portion or after a terminator. However, one or more elements are needed before the check code.
  • Page 193: Programming

    Programming This section explains how to create programs for predefined protocol support function using S(P).CPRTCL instruction and how such programs operate. For details on related devices, refer to Page 204 Related Devices. For communication settings, refer to Page 168 Communication Settings. For protocol settings, refer to Page 170 Protocol Setting.
  • Page 194 ■Control data Device Item Description Setting Set by range  Result of executed The result of executed S(P).CPRTCL instruction is stored. When two or more protocols are System protocols executed, the execution result of the protocol executed last is stored. •...
  • Page 195 Processing details • Protocols registered with the engineering tool are executed. The communication CH specified by (n1) is used and the protocol to be executed follows the control data of the device specified by (s) or later. • Protocols are executed consecutively for the number of the protocols specified by (n2) (up to eight protocols) in one instruction execution.
  • Page 196 Stored value Protocol execution status Description Receiving Data was received from the counterpart device and the receive processing is being executed. Any of the following processing is included in this status. • Data verification processing • General data processing of when a CPU device is specified as a variable Completed The execution of a protocol has been completed.
  • Page 197 Protocol Cancel Executing protocol can be canceled by the cancel request (“1” is set for the protocol cancel setting value). (Page 209 Protocol cancel specification) Then canceled protocol ends abnormally. When two or more protocols are executed consecutively, executing protocol ends and following protocols are not executed. Drive S(P).CPRTCL instruction Completion device (d)
  • Page 198 ■Monitor start When 0001H is set for send/receive data monitoring function setting, the device number of monitoring data and the number of monitor data are initialized and monitoring is started. When monitoring is started, monitoring (0002H) is written to send/ receive data monitoring function setting.
  • Page 199 Two words from the start device number are used for the device number of monitoring data and the number of monitor data. The devices with the device numbers after the first two words are used for the monitor data area. Monitoring data device No.
  • Page 200: Program Example

    Program example The following shows an example of a program to execute consecutively the protocols in order of protocol numbers 4, 7, and 5 from the communication board (CH2) with the predefined protocol support function. Program example Drive Drive S(P).CPRTCL instruction instruction = SD9102 K1 Protocol number executed first (4)
  • Page 201 When the send/receive data monitoring function is used, add a program as follows. Program example Monitor start Monitor start trigger Monitoring FMOV H0D00 0 clear Monitor data. SD9240 Monitor start instruction Monitor start Turn on "Monitoring" = SD9240 H2 when the monitoring starts. Monitoring setting error is detected.
  • Page 202: Troubleshooting

    Troubleshooting This chapter explains troubleshooting and error codes. Checking communication status based on LED display Check the status of the LED display of [RD] and [SD] on the CPU module or the communication board/communication adapter. LED status Operation status Data is being sent or received. Data is being received, but not being transmitted.
  • Page 203 ■Error codes When the serial communication error turns ON, the error code is stored in the corresponding device specified in the table below. And be stored in resulting of executed S(P).CPRTCL instruction (operand (s)). Name Description SD8500 SD8510 SD8520 SD8530 Serial communication error When a serial communication error occurs, code...
  • Page 204 Error codes Name Description of error Error handling (hexadecimal) 7D21H Decimal point • An out-of-range decimal point position is set when the • Check the set decimal point position. place number of decimals is set to variable point. • Check the number of digits setting, and set the specification •...
  • Page 205 • Rewrite the program, reset the CPU module, and perform RUN. If the same error persists, it may be due to a hardware failure of the CPU module. Contact your local Mitsubishi Electric representative. 3405H Operation error The operand device number range or data value set for the Check the data specified by the S(P).CPRTCL...
  • Page 206: Related Devices

    6.10 Related Devices List of related devices Special relays Device No. Name Description SM8500 SM8510 SM8520 SM8530 Serial communication error Turns ON when an error occurs in serial communication. R: Read only Special registers Device No. Name Description SD8500 SD8510 SD8520 SD8530 Serial communication error...
  • Page 207: Details Of Related Devices

    Details of related devices The devices described below are used in predefined protocol support function. Serial communication error Turns ON when an error occurs in serial communication. These flags are for check of the serial communication error. Description SM8500 SM8510 SM8520 SM8530 Turns ON when an error occurs in serial...
  • Page 208 Bit No. Name Description 0 (bit = OFF) 1 (bit = ON) Baud rate b7, b6, b5, b4 (0,0,1,1): 300 bps (0,1,0,0): 600 bps (0,1,0,1): 1200 bps (0,1,1,0): 2400 bps (0,1,1,1): 4800 bps (1,0,0,0): 9600 bps (1,0,0,1): 19200 bps (1,0,1,0): 38400 bps (1,0,1,1): 57600 bps (1,1,0,1): 115200 bps Precautions...
  • Page 209 Predefined protocol setting data error When a protocol setting data error was detected, information to identify the error position is stored. ■Predefined protocol setting data error information: Protocol No. When a protocol setting data error was detected, the number of the protocol where the error has occurred is stored. Starting from the smallest protocol number, protocols are checked in order, and the number of the protocol where the error has first been detected is stored.
  • Page 210 ■Predefined protocol setting data error information: Element No. When a protocol setting data error was detected, the number of the element where the error has occurred is stored. Starting from the smallest element number, elements are checked in order, and the number of the element where the error has first been detected is stored.
  • Page 211 Protocol execution status The status of a protocol in execution is stored. For details, refer to Page 193. Description SD9150 SD9170 SD9190 SD9210 0: Unexecuted 1: Waiting for transmission 2: Sending 3: Waiting for data reception 4: Receiving 5: Completed R: Read only Precautions Do not change the value with program or engineering tool.
  • Page 212 Send/receive data monitoring function option setting The data area full stop specification and 1-packet stop specification of the send/receive data monitoring function can be enabled or disabled by storing a value. For details, refer to Page 195 Send/receive data monitoring function. Description SD9231 SD9241...
  • Page 213 Monitoring data size specification The size of word devices used as the monitor data areas with the send/receive data monitoring function is stored in word units. For details, refer to Page 196 Monitor data. Description SD9234 SD9244 SD9254 SD9264 0 to 32765 W: Write only Precautions When a device value is changed after the send/receive data monitoring has been started, the change is not reflected.
  • Page 214: Appendix

    APPENDIX Appendix 1 Combined Use of Serial Communication Channel specification The same serial port cannot be used for more than one communication function. Duplicate channel numbers cannot be specified in communication settings, but an error may still result if channel numbers for communications functions other than the designated function are specified in the following commands.
  • Page 215: Appendix 2 Operation Image And Data Structure Of Predefined Protocol

    The specified packet is transmitted once. Counterpart Terminator Header Data area CPU module device The operation is as follows. ■Normal completion FX5 CPU module Drive S(P).CPRTCL instruction Completion device (d) Completion status indication device (d)+1 Send packet Counterpart device Send packet ■Error completion (transmission monitoring timeout error)
  • Page 216 For verification mismatch, the receive data is discarded, and the CPU unit waits for the next receive data. (Page 216 Operation Image and Data Structure of Predefined Protocol) Settable receive packet (expected packet) is up to 16. Verification mismatch FX5 CPU module Counterpart device Receive packet Header...
  • Page 217 (Page 216 Operation Image and Data Structure of Predefined Protocol) Settable receive packet (expected packet) is up to 16. FX5 CPU module Counterpart device...
  • Page 218: Verification Operation

    • When variables are included in receive packet elements, variable parts are not verified. • When more than one receive packet is specified, received data is verified with the receive packet information of the first registered packet in the order of registration. The receive processing is performed once received data match one of the receive packet number, and further verification is not performed.
  • Page 219: Data Examples Of Length

    Operation performed for verification mismatch When receive data does not match with all receive packets, the receive data is discarded. Note that discarding receive data does not cause an error. Receive packet Packet No.1 Packet No.2 Packet No.3 Packet No.16 (expected packet) Verification Verification...
  • Page 220 ■Data flow is Reverse Direction Code type Data length 1 byte 2 byte 3 byte 4 byte  ASCII hexadecimal 20 (32H 30H) 201 (32H 30H 31H) 2010 (32H 30H 31H 30H)  ASCII decimal 85 (38H 35H) 852 (38H 35H 32H) 8520 (38H 35H 32H 30H) ...
  • Page 221: Data Examples Of Non-Conversion Variable

    Calculating range The following shows specification examples of the calculating range of Length. Packet Packet Packet Packet Packet Packet element 1 element 2 element 3 element n-2 element n-1 element n Packet format Header Length Static data Variable Terminator Check code Calculating range when specifying 1 to n Example 1 Calculating range when specifying 3 to (n-2)
  • Page 222: Data Examples Of Conversion Variable

    Data examples of Conversion Variable Shows the data examples of element conversion variable that can be placed in a packet. Data example The following table shows send data when a packet consists of [Header], [Conversion variable], [Terminator] and data stored in the data storage area is D0=837 (0345H), D1=18 (0012H).
  • Page 223 Item Description Data Storage Area Specification Send data [Header]345,[Terminator] [Header]_ 345,_ _ 12[Terminator] [Header]345,12[Terminator] *1 The "_" indicates a space. Operation of Sign Character ■Sending Conversion: HEXASCII Decimal Number of Send Data: 1 Conversion Unit: Word Number of Send Digits of Data: 5 Unigned Data Storage Area Send...
  • Page 224 Operation of Number of Decimals ■Sending Fixed point Conversion: HEXASCII Decimal Number of Send Data: 2 Conversion Unit: Word Number of Send Digits of Data: 4 Number of Decimals: 1 Data Storage Area Send 123.4 1234 (04D2H) First data Value 567.8 5678 (162EH) Value...
  • Page 225 Variable Point Conversion: ASCII DecimalHEX Number of Send Data: 2 Conversion Unit: Word Number of Send Digits of Data: 4 Receive Data Storage Area 1234 (04D2H) Value 123.4 First data Decimal point 10 (000AH) position area 5678 (162EH) Value 5.678 Second data Decimal point 1000 (03E8H)
  • Page 226 ■Receiving Comma (Space too) Conversion: ASCII DecimalHEX Number of Send Data: 1 Conversion Unit: Word Number of Send Digits of Data: 4 Receive Data Storage Area “1” “2” “3” “4” “,” 1234 (04D2H) First data Conversion: ASCII DecimalHEX Number of Send Data: 2 Conversion Unit: Word Number of Send Digits of Data: 4 Receive...
  • Page 227: Data Examples Of Check Code

    Data examples of Check Code Shows the data examples of element check code that can be placed in a packet. Calculation procedure for horizontal parity The following show procedures for calculating horizontal parities using the following sample data. Horizontal “Q” “J”...
  • Page 228 ■Data Flow: Reverse Direction No complement calculation is designated (Reference) Hexadecimal: 15H, Decimal: 21 Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte 4 byte  ASCII hexadecimal 51 (35H 31H) 510 (35H 31H 30H) 5100 (35H 31H 30H 30H) ...
  • Page 229 Two's complement is designated (Two's complement for 0000 0015H: FFFF FFEBH) When Code Type is ASCII Decimal, the lower one word is extracted and converted from hexadecimal to decimal. (hexadecimal: FFEBH, decimal: 65515) Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte...
  • Page 230 ■Data Flow: Reverse Direction No complement calculation is designated (Reference) Hexadecimal: 1FDH, Decimal: 509 Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte 4 byte  ASCII hexadecimal DF (44H 46H) DF1 (44H 46H 31H) DF10 (44H 46H 31H 30H) ...
  • Page 231 Two's complement is designated (Two's complement for 0000 01FDH: FFFF FE03H) When Code Type is ASCII Decimal, the lower one word is extracted and converted from hexadecimal to decimal. (hexadecimal: FE03H, decimal: 65027) Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte...
  • Page 232 CRC error checking procedure 16-bit register (MSB) Flag Calculating procedure Shift 1 0100 0000 1001 1100 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1110 0000 1001 1101 Shift 2 0111 0000 0100 1110 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1101 0000 0100 1111...
  • Page 233: Data Examples Of Non-Verified Reception

    Data examples of Non-verified reception Shows the data examples of element non-verified reception that can be placed in a packet. The usage example for non-verified reception is shown below. Example of format of packet from other device Data to be read Variable number 1 byte 2 byte...
  • Page 234: Appendix 3 Ascii Code Table

    Appendix 3 ASCII Code Table ASCII code table (8-bit code expressed in hexadecimal) Hexadecimal value " & < > APPENDIX Appendix 3 ASCII Code Table...
  • Page 235: Index

    INDEX 0 to 9 ......81 ......168,176 10BASE-T cable Packet .
  • Page 236: Revisions

    Chapter 1, 2, 3, Section 4.2, 4.5, 4.7, 4.8, 4.10, 5.3, 5.5, 5.6, 5.7, 5.8, 5.9, Chapter 6, Appendix 1, 2 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.
  • Page 237: Warranty

    WARRANTY Please confirm the following product warranty details before using this product. Gratis Warranty Term and Gratis Warranty 2. Onerous repair term after discontinuation of production Range If any faults or defects (hereinafter "Failure") found to Mitsubishi shall accept onerous product repairs for be the responsibility of Mitsubishi occurs during use of seven (7) years after production of the product is the product within the gratis warranty term, the...
  • Page 238: Trademarks

    TRADEMARKS   Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Ethernet is a trademark of Xerox Corporation.  MODBUS is a registered trademark of Schneider Electric SA. Phillips is a registered trademark of Phillips Screw Company. The company name and the product name to be described in this manual are the registered trademarks or trademarks of each company.
  • Page 240 Manual number: JY997D55901B Model: FX5-U-SC-E Model code: 09R540 When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. HEAD OFFICE: TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN HIMEJI WORKS: 840, CHIYODA MACHI, HIMEJI, JAPAN Specifications are subject to change without notice.

Table of Contents