Summary of Contents for Mitsubishi Electric MELSEC FX Series
Page 1
MITSUBISHI ELECTRIC MELSEC FX Series Programmable Logic Controllers User's Manual Communications Modules RS-232C, RS-485, RS-422 Art. no.: 070143 15 04 2003 INDUSTRIAL AUTOMATION MITSUBISHI ELECTRIC JY992D69901 Version E...
Page 2
• If in doubt about the operation or use of the communication facilities of FX series please consult the nearest Mitsubishi Electric distributor. • This manual is subject to change without notice.
Page 3
FX communication FX COMMUNICATION (RS-232C, RS-485, RS-422) USER’S MANUAL Manual number : JY992D69901 Manual revision : E Date : April 2003 Brand and product names described by/in this manual are trademarks or registered trademarks of the irrespective owners.
Page 5
Mitsubishi users are always welcomed. This page has been designed for you, the reader, to fill in your comments and fax them back to us. We look forward to hearing from you. Fax numbers: Your name: ........... Mitsubishi Electric................. America (01) 847-478-2253 Your company: ..........
Page 7
FX communication Guidelines for the Safety of the User and Protection of the programmable controllers This manual provides information for the use of the FX series communication unit. The manual has been written to be used by trained and competent personnel. The definition of such a person or persons is as follows;...
Page 8
FX communication • Under no circumstances will Mitsubishi Electric be liable responsible for any consequential damage that may arise as a result of the installation or use of this equipment. • All examples and diagrams shown in this manual are intended only as an aid to understanding the text, not to guarantee operation.
FX communication Further Information Manual List Table 1: Further Information Manual List Manual name Manual No. Description This manual contains written hardware explanation of Hardware Manual JY992D83901 wiring, installation and specification, etc. regarding the FX Series programmable controller. This manual contains written hardware explanation of / FX Hardware Manual JY992D47501...
Page 10
FX communication Table 1: Further Information Manual List Manual name Manual No. Description This manual contains written hardware explanation of -485-BD Hardware JY992D73401 installation and specification regarding the Manual -485-BD. This manual contains written hardware explanation of -422-BD User’s Guide JY992D66101 installation and specification regarding the -422-BD.
FX communication Table of Contents Further Information Manual List ..............vii 1. Introduction ..................... 1-1 1.1 Abbreviations, Generic Names and Terms Used in This Manual ......1-1 1.2 Communication Types ...................1-2 1.3 System Configuration ....................1-3 1.3.1 N:N Network ..........................1-3 1.3.2 Parallel Link ..........................1-3 1.3.3 Computer Link...........................
Page 12
FX communication 4.2 Setting........................4-3 4.2.1 Setting the Station No. (D8176) ....................4-3 4.2.2 Setting the Total Number of Slave Stations (D8177) ............... 4-3 4.2.3 Setting the Refresh Range (D8178)..................4-4 4.2.4 Setting Retry Count (D8179)..................... 4-5 4.2.5 Setting Comms Time-out (D8180) .................... 4-5 4.2.6 Program Used for Setting ......................
Page 13
FX communication 8. Commands....................8-1 8.1 Batch Read of Bit Device (BR command)..............8-2 8.2 Batch Read of Word Device (WR command) ............8-3 8.3 Batch Write of Bit Device (BW command) .............8-5 8.4 Batch Write of Word Device (WW command)............8-6 8.5 Test of Bit Device (BT command)................8-8 8.6 Test of Word Device (WT command) ..............8-9 8.7 Remote RUN/STOP (RR, RS commands) ............8-10 8.7.1 Operation of Remote RUN/STOP ...................
Page 14
FX communication 10.2.13 Send Sum Result <BFM #15> ..................10-11 10.2.14 Receive Sum Result <BFM #16>..................10-11 10.2.15 Time from CS ON to Send Start <BFM #20>..............10-12 10.2.16 Time from Completion of Actual Send to RS OFF (completion flag ON) <BFM #21> ..10-12 10.2.17 Status <BFM #28>...
FX communication Introduction 1 1. Introduction Abbreviations, Generic Names and Terms Used in This Manual Abbreviation List Abbreviation/generic name/term Description Series Generic name of FX Series main units Series Generic name of FX Series main units Series Generic name of FX Series main units FX Series Generic name of FX Series main units...
Introduction 1 FX communication Communication Types The FX Series supports the following 5 types of communication. 1 ) N:N network Data transfer with FX , FX , FX , FX , FX programmable controllers can be performed on a N:N basis. They can link data of a small-scale system if using this network. For the system configuration please refer to subsection 1.2.1, specifications refer to chapter 3, wiring refer to chapter 2, settings and the number of transferred data and example program refer to chapter 4,diagnostics refer to chapter 12.
FX communication Introduction 1 System Configuration For programming protocol refer to chapter 11. 1.3.1 N:N Network FX PLC FX PLC FX PLC FX PLC FX PLC RS-485 RS-485 RS-485 RS-485 RS-485 communication communication communication communication communication equipment equipment equipment equipment equipment Up to eight FX series programmable controllers can be connected.
Page 18
Introduction 1 FX communication 2 ) FX (Shielded twisted-pair cable) # # # # , $ $ $ $ Using interface Extension distance -485-BD Max. 50m (164' 0") -CNV-BD + FX -485ADP Max. 500m (1640' 5") -CNV-BD + FX -485ADP *2 When including an FX -485-BD in the system configuration, thais, total extension distance has a max of 50m...
FX communication Introduction 1 1.3.3 Computer Link 1 ) In the case of 1:N connection using RS-485 (RS-422) Computer RS-232C RS-485(RS-422) FX-485PC-IF + FX -485-BD, + FX -CNV-BD, + FX -485-BD, -485ADP, + FX -CNV-BD, + FX -485-BD + FX -CNV-BD -485ADP A series PLC +...
Introduction 1 FX communication 1.3.4 No Protocol Communication RS-232C Personal computer -232-BD -CNV-BD -232ADP,FX -232ADP -232ADP,FX -232ADP -232-BD FX, FX -CNV-BD -232-BD -CNV-BD 15m(49' 2") *1 Bar code reader FX-232ADP -232ADP,FX -232ADP + FX -CNV-IF -232IF RS-485(RS-422) + FX -CNV-BD Printer + FX -CNV-BD...
FX communication Specifications 2 2. Specifications Communication Specification Computer link N:N network Parallel link No protocol communication (dedicated protocol) Conforming to Conforming to RS-485 Conforming to RS-485 and RS-422 or Transmission standard RS-485 and RS-422 RS-232C RS-485(RS-422): Max. 500m(1640' 5") Transmission distance Max.
Specification 2 FX communication Communication Time 2.2.1 N:N network Communication device Pattern 0 Pattern 1 Pattern 2 Bit device: 0 point Bit device: 32 points Bit device: 64 points Word device: 4 points Word device: 4 points Word device: 8 points Total station number Note;...
FX communication Specifications 2 2.2.3 Computer link Calculations to determine the approximate time until communication is complete. → 1 ) Programmable controller Computer Communication time = Total number of characters based on dedicated protocol × Time to send or receive one character (ms) ×...
FX communication Wiring 3 3. Wiring Terminal layout when using a communication unit, please refer to the individual units manual. Common 1 ) This system is designed to read and write data (forced on/off) while the programmable controller is running. If abnormal data is written to the programmable controller, due to effects of noise, the programmable controller may malfunction and cause machine trouble or an accident.
Wiring 3 FX communication Caution on cable selection 3.1.1 -485-BD, FX -485-BD, FX -485ADP To connect the RS-485(RS-422) unit, use a shielded twist-pair cable. The cable model must be AWG 26 to 16, and the maximum tightening torque must be 0.6 N%m (6 kgf%cm). If a cable other than the AWG 26 to 16 is used, normal communication cannot be assured as the terminal may be imperfectly contacted.
FX communication Wiring 3 Using RS-232C Interface Below is a typical wiring example. Please wire similar to the following pin name, when a pin number on the side of a counterpart machine differs. 3.2.1 Using RS Instruction or Computer Link 1 ) Terminal specification device Programmable Controller Side RS-232C Device Side...
Wiring 3 FX communication 3.2.2 Using FX -232IF The signal wiring of the RS-232C equipment varies depending on the RS-232C connection specifications. Check the specifications of the RS-232C equipment used, then connect the signals correctly. Representative wiring examples are shown below. 1 ) Terminal specification device (No control line) Setting communication format (BFM #0);...
Page 29
FX communication Wiring 3 b ) Interlink connection mode (Use interlink serial cross cable) Setting connection format (BFM #0); b9=1, b8=1 In the interlink connection P rogram m able C ontroller S ide R S -232C D evice S ide mode, data exceeding 512 S ignal S ignal...
Wiring 3 FX communication Using RS-485 Interface 3.3.1 Wiring Selection The wiring of RS-485 can either be one-pair or two-pair. The wiring method is decided according to application usage. Please select the wiring method from the table below. Usage One-pair wiring Two-pair wiring &...
FX communication Wiring 3 3.3.3 One-pair Wiring -485ADP A series programmable -485ADP RS-485 unit *4 -485-BD,FX -485-BD controller's computer link unit (0N) Station Station Station No. 0 No. 1 No. 15 LINK (NC)*5 Class D grounding Note: *1 R is a terminating resistor (110Ω) *2 Make sure to connect the shield of the appropriate cable with the FX -485-BD, FX -485-BD...
Wiring 3 FX communication 3.3.4 Two-pair Wiring -485ADP A series programmable RS-422/RS-485 unit *4 -485ADP -485-BD,FX -485-BD controller's computer link unit (0N) Station Station Station No. 0 No. 1 No. 15 LINK (NC)*5 Class D grounding Note: *1 R is a terminating resistor (330Ω) *2 Make sure to connect the shield of the appropriate cable with the FX -485-BD, FX -485-BD...
FX communication Wiring 3 Parallel Link 3.4.1 -485-BD and FX -485ADP 2N(1N) 1 ) One-pair Wiring -485-BD -485ADP -485-BD Terminating Terminating resistor registor 110Ω 110Ω LINK FG *1 Note: *1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 100Ω...
Wiring 3 FX communication 3.4.2 -485ADP and FX -485ADP 1 ) One-pair Wiring -485ADP -485ADP Terminating Terminating resistor resistor 110Ω 110Ω LINK LINK FG *1 Note: *1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 100Ω...
Page 35
FX communication Wiring 3 3.4.3 -485-BD and FX -485-BD 2N(1N) 2N(1N) 1 ) One-pair Wiring -485-BD, -485-BD, -485-BD -485-BD Terminating Terminating resistor resistor 110Ω 110Ω Class D grounding 2 ) Two-pair Wiring -485-BD, -485-BD, -485-BD -485-BD Terminating Terminating resistor resistor 330Ω...
Wiring 3 FX communication 3.4.4 -485ADP and FX -485ADP 1 ) One-pair Wiring -485ADP -485ADP Terminating Terminating resistor resistor 110Ω 110Ω LINK Note: *1 Connect the terminal FG to the ground terminal of a programmable controller grounded with a resistance of 100Ω or less (Class D grounding). If the programmable controller is not equipped with a ground terminal, connect the terminal FG directly to a ground with the resistance of 100Ω...
FX communication Wiring 3 3.4.7 -40AW and FX -40AW Note: -40AW -40AW *1 Connect the terminal SG to the terminal SG of the basic unit. Two SG terminals are connected to each other internally. 3.4.8 -40AP and FX -40AP -40AP -40AP Note: •...
FX communication N:N network 4 4. N:N Network For diagnostics, please refer to chapter 12. Related Flags and Data Registers 4.1.1 Auxiliary Relays Auxiliary relays Response Attribute Name Description , FX type N:N network Used to set N:N network M8038 M, L parameter setting parameters...
N:N network 4 FX communication 4.1.2 Data Registers Data Registers Response Attribute Name Description , FX type D8173 Station No. Saves its own station No. M, L Total number of slave Saves total number of D8174 M, L stations slave stations D8175 Refresh range Saves refresh range...
FX communication N:N network 4 Setting N:N settings become valid when the program is run or when the power of the programmable controller is turned ON. 4.2.1 Setting the Station No. (D8176) Set a value 0 to 7 to the special data register D8176. Set value Description Master station...
N:N network 4 FX communication 4.2.3 Setting the Refresh Range (D8178) Set a value 0 to 2 to the special data register D8178. (Default = 0) This setting is not required for the slave station. The devices used in each pattern are occupied by all the stations for the N:N network. Refresh range Communication Pattern 0...
FX communication N:N network 4 2 ) In the case of pattern 1 (FX , FX , FX Device No. Station No. Bit device (M) Word device (D) 32 points 4 points No.0 M1000 to M1031 D0 to D3 No.1 M1064 to M1095 D10 to D13 No.2 M1128 to M1159 D20 to D23...
N:N network 4 FX communication 4.2.6 Program Used for Setting Station No. setting: M8038 FNC 12 Required for master D8176 station (Set range: 0 to 7) Total number of slave FNC 12 D8177 stations: 2 (Setting range: 1 to 7) Refresh range setting: FNC 12 Pattern 1...
FX communication N:N network 4 Example Program 4.3.1 System Configuration Master station (No.0) Slave station (No.1) Slave station (No.2) -485-BD -485-BD -485-BD • Refresh range: 32 bit devices and 4 word devices (Pattern 1) • Retry count: 3 times • Comms time-out: 5 (50 ms) 4.3.2 Operations...
N:N network 4 FX communication 4.3.3 Example of Setting Program For the setting program of the master station and the stations Nos.1 and 2, refer to the program below. Master station Slave station No.1 Slave station No.2 Remarks D8176 Station No. ...
FX communication N:N network 4 4.3.5 Example of Operation Program a ) Program of master station RUN monitor M8000 FNC 12 Operation 1) K1X000 K1M1000 Slave 1 communication error M8184 FNC 12 Operation 2) K1M1064 K1Y014 Slave 2 communication error M8185 FNC 12 K1M1128...
Page 50
N:N network 4 FX communication b ) Program of slave station No.1 Counter reset X001 Master communication error M8183 FNC 12 Operation 1) K1M1000 K1Y010 FNC 12 K1X000 K1M1064 Operation 2) Slave 2 communication error M8185 FNC 12 Operation 3) K1M1128 K1Y020 Counter input X000...
Page 51
FX communication N:N network 4 c ) Program of slave station No.2 Counter reset X001 Master communication error M8183 FNC 12 K1M1000 K1Y010 Operation 1) Slave 1 communication error M8184 FNC 12 Operation 2) K1M1064 K1Y014 FNC 12 Operation 3) K1X000 K1M1128 Slave 1...
Page 52
N:N network 4 FX communication MEMO 4-12...
FX communication Parallel link 5 5. Parallel link Data transfer with FX , FX , FX , FX, FX programmable controllers can be performed on a 1:1 basis for 100 auxiliary relays and 10 data registers. Data transfer with FX , FX programmable controller can be performed on a 1:1 basis for 50 auxiliary relays and 10 data registers.
Parallel link 5 FX communication Mode and Link Device 5.2.1 Normal Mode (Special auxiliary relay M8162: OFF) Master Slave Automatic communication M8000 M8000 M8071 M8070 ✰✰ ✰✰ , FX , FX , FX, FX , FX Master M800 to M899 (100 points), M400 to M449 (50 points), →...
FX communication Parallel link 5 5.2.2 High Speed Mode (Special auxiliary relay M8162: ON) Master Slave Automatic communication M8000 M8000 M8070 M8071 M8162 M8162 , FX , FX , FX, FX , FX Master D490, D491 (2 points) D230, D231 (2 points) →...
Parallel link 5 FX communication Example Program 5.3.1 Normal Mode The ON/OFF status of the inputs X000 to X007 in the master station is output to Y000 to Y007 in the slave station (#). When the calculation result (D0+D2) in the master station is 100 or less, Y010 in the slave station is turned on ($).
FX communication Communication format 6 6. Communication format (D8120) This chapter explains setting the communication between no protocol communication (RS instruction) and computer link. For the RS instruction, refer to Section 9. For computer link, refer to Sections 7 and 8. What Is Communication Format? The communication format decides the communication setting (data length, parity, and baud rate, etc.) between computer link and no protocol communication (RS instruction).
Communication format 6 FX communication Communication Format (D8120) Description Name 0 (bit = OFF) 1 (bit = ON) Data length 7 bit 8 bit (b2, b1) ( 0, 0) : None Parity ( 0, 1) : Odd ( 1, 1) : Even Stop bit 1 bit 2 bit...
FX communication Communication format 6 Example of setting program When setting the contents shown on the left, perform programming as follows. Data length 7 bits FNC 12 H0C8E D8120 Parity Even Stop bit 2 bits D8120 = 0000 1100 1000 1110 Baud rate 9600 bps Protocol...
Page 60
Communication format 6 FX communication MEMO...
FX communication Computer link 7 7. Computer Link This chapter explains the details and methods of specifying dedicated protocol used for linking of the FX programmable controller and computer. The dedicated protocol is available in two types, format 1and format 4 (the format names conform to the dedicated protocols used in the computer link unit of the A series programmable controller).
Page 62
Computer link 7 FX communication 3 ) Programmable controller sends data to the computer. 485PC-IF RS-485 Programmable controller 485ADP RS-232C Computer Data Data Program On-demand data Read Send Data Write request+ Device Data data write memory,etc. Comn. Prog. *OS (operating system) is the software for operating (or using) effectively the resources such as the CPU, memory, terminal, file and network.
FX communication Computer link 7 Information Needed Before Programming 7.2.1 Programmable Controller Operation The operation and the scan time of programmable controller using computer link is as follows. While the programmable controller is running, access requests to the programmable controller from the computer are processed on every END processing.
Computer link 7 FX communication How to Read a Control Protocol Diagram 1 ) When the computer reads data from the programmable controller ← (computer programmable controller) Data Data Computer Programmable Data controller a ) Areas A and C indicate transmission from the computer to the programmable controller. b ) Area B denotes transmission from the programmable controller to the computer.
FX communication Computer link 7 Basic Formats of Dedicated Protocol There are two formats for the dedicated protocol; which may be selected by setting special data register D8120(see chapter 6). The difference between these two formats is whether CR LF is added to each block or not. The protocols are format 1 and format 4.
Computer link 7 FX communication 7.4.1 Control Protocol Format 1 Description Control protocol Transmission sequence To read data Computer from the PLC Programmable to the controller computer Computer To write data Programmable Transmission sequence from the controller computer to the PLC 1 ) Sum check code is used when the sum check flag is set “Yes”...
FX communication Computer link 7 7.4.2 Control Protocol Format 4 Description Control protocol Transmission sequence To read data Computer from the PLC to the Programmable computer controller Computer To write data Programmable from the Transmission sequence controller computer to the PLC 1 ) Sum check code is used when the sum check flag is set “Yes”...
Computer link 7 FX communication 7.4.3 Control Protocol Parts Explained This is to explain the content of data set in each control procedure. 1 ) Control codes The control codes are listed below. Code Code Signal Description Signal Description (Hexadecimal) (Hexadecimal) Start of Text Line Feed...
Page 69
FX communication Computer link 7 2 ) Station number The station number is the number provided at the programmable controller in order to determine which programmable controller the computer accesses. In the FX series programmable controller, the station number is set by the special data register D8121(special D8121 hereinafter).
Page 70
Computer link 7 FX communication 5 ) Message wait This is a delay time required by some computers to switch between send and receive states. The message wait time determines the minimum delay before the programmable controller sends data after receiving a message from the computer. Set the wait time according to the computer specifications.
FX communication Computer link 7 7.4.4 Time-out Check Time The time out check time refers to the duration after termination of receive (final character received) of a failed transmission from the computer to the programmable controller, until the send sequence is initialized. This check time is specified as follows depending on the model and version of the programmable controller.
Computer link 7 FX communication Communication Timing Chart 7.5.1 Reading Data from Programmable controller Computer Wait(TW) Interface More than two-scan delay is needed. This time becomes 0 when the message wait time is not set or when the wait time is less than the processing time needed by the programmable controller.
FX communication Computer link 7 7.5.3 Communication Time This is to explain the method of calculating the approximate time until all communication is over. For the locations of T0 to T4, see the previous page. 1 ) When reading data from the programmable controller to the computer Communication time = T0 + (T1 + T2 or TW, whichever is longer) + T3 + T4 + T5 T0, T3, T5 =1/baud rate ×...
Computer link 7 FX communication Character Area Data Transmission The data shown in the following examples are samples of the data used in character area B when reading or character area C when writing data. (see section 7.4.1 and 7.4.2) 7.6.1 Bit Device Memory Bit device memory is handled in 1 bit units (1 point) or in word unit (16 points).
FX communication Computer link 7 7.6.2 Word Device Memory When handling word device memory, each word is expressed as 4 hexadecimal digits (each of 4 bits) starting with the higher digit. Each digit being represented by the appropriate ASCII character. Example 1) When showing the contents of data registers D350, D351 No.of Head device...
Computer link 7 FX communication Commands and Device Ranges 7.7.1 Commands Maximum No. of units Command per communication Description FX, FX ASCII Symbol , FX code Reads a group of bit devices (X, Y, M, 42H, 52H 54 points 256 points unit S, T, C), result is in units of 1 device.
FX communication Computer link 7 7.7.2 Device specification ranges The following is the device and device number range that can be used in the access of device memory. Each device is composed of five characters. Device (1 character, 2 characters with timer and counter) + device number (4 characters, 2 characters with timer and counter) = 5 characters.
Computer link 7 FX communication Example Computer Program for Loopback Test This is an example of a BASIC program for communication of the computer link using a computer, programmable controller 485PC-IF, and 485ADP . (not used outside Japan.) Pleas see loopback test command see section 8.11. 1 ) Setting of transmission specification Item Description...
Page 79
FX communication Computer link 7 190 HED$ = LEFT$(BUF$.1) 200 IF HED$ = STX$ OR HED$ = NAK$ THEN GOTO *REC1 ELSE GOTO *REC0 : ′ Reception of remaining data 210 *REC1 220 IF HED$ = STX$ THEN RVCNT = STCNT-1 230 IF HED$ = NAK$ THEN RVCNT = NACNT-1 240 GOSUB *RECWAIT 250 IF ERFLG = 99 THEN GOTO *ERRORFIN1...
Page 80
Computer link 7 FX communication 3 ) Operation a ) Start the computer program. b ) Send four characters “ABCD” from the computer to the FX programmable controller. c ) The FX programmable controller returns the four characters “ABCD” back to the computer.
FX communication Commands 8 8. Commands This chapter describes the structure and gives examples for each command of the dedicated protocol. See also Chapter 7 “Communication using Dedicated Protocols”. The reference pages for command are given below. Command Description Section Bit devices read in units of 1 point.
Commands 8 FX communication Batch Read of Bit Device (BR command) 1 ) Command specification Protocol format 1 is shown. Batch read command (bits) Character area A Head device Number of "0" (30H) indicates OFF. devices "1" (31H) indicates ON. (5 characters) (2 characters, Computer...
FX communication Commands 8 Batch Read of Word Device (WR command) 1 ) Command specification Protocol format 1 is shown. One word device requires Batch read command (words) Character area A four hexadecimal digits. Therefore,one word is Head device Number of devices expressed using four (5 characters)
Page 84
Commands 8 FX communication b ) Example 2 To read the present value of two points, T123 and T124, at station No.5. The sum check is calculated over T N 1 2 3 this range Computer Programmable The sum check is calculated controller 7 B C 9 1 2 3 4...
FX communication Commands 8 Batch Write of Bit Device (BW command) 1 ) Command specification Protocol format 1 is shown Batch write command (bits) Character area A Head device Number of Data of devices specified (5 characters) (2 characters, devices Computer hexadecimal) Programmable...
Commands 8 FX communication Batch Write of Word Device (WW command) 1 ) Command specification Protocol format 1 is shown Batch write Command (words) Character area C Head device Number of Data of devices specified (5 characters) (2 characters, devices Computer hexadecimal) Programmable...
Page 87
FX communication Commands 8 b ) Example 2 To write to data to two points, D0 and D1, at station No.0 (with message wait time set to 0 ms). D 0 0 0 0 1 2 3 4 A C D 7 Computer Programmable controller...
Commands 8 FX communication Test of Bit Device (BT command) 1 ) Command specification Protocol format 1 is shown Test command (selective write,bits) Character area C Number of Device Device devices (2 characters, (5 characters) (5 characters) Computer hexadecimal) Programmable 1 character controller "0"...
FX communication Commands 8 Test of Word Device (WT command) 1 ) Command specification Protocol format 1 is shown. Test command (selective write,word) Character area C Number of Device Device Device Device devices (2 characters, (5 characters) (4 characters) (5 characters) (4 characters) Computer hexadecimal)
Commands 8 FX communication Remote RUN/STOP (RR, RS commands) 8.7.1 Operation of Remote RUN/STOP When remote RUN/STOP is requested from the computer, the programmable controller forced run mode, and the special auxiliary relays M8035, M8036, M8037 are controlled as follows. •...
FX communication Commands 8 8.7.3 Control Specification and Examples of Remote RUN/STOP 1 ) Control specification Protocol format 1 is shown. Programmable controller remote run command: "RR" Programmable controller remote stop command: "RS" Computer Programmable controller Notes • The station number, PC (PLC) number, number of devices, and sum check code are expressed in hexadecimal.
Commands 8 FX communication Reading The Programmable Controller Type (PC command) 8.8.1 Type Codes Type code Type code Programmable controller type Programmable controller type (hex.) (hex.) A2USCPU A2CPU-A1, A2USCPU-S1 FX, FX A3CPU, A3NCPU A3ACPU , FX A3HCPU, A3MCPU A0J2HCPU A3UCPU A1CPU, A1NCPU A4UCPU A1SCPU, A1SJCPU...
FX communication Commands 8 8.8.2 Control Specification and Example 1 ) Control specification Protocol format 1 is shown. Programmable controller type name read command Character area B Computer Programmable PC type controller name (2 characters) Notes • The station number, PC (PLC) number, number of devices, and sum check code are expressed in hexadecimal.
Commands 8 FX communication Global Function (GW command) This function is to turn on and off the global operation flag at all stations in the multidrop link. For an FX series programmable controller this is special auxiliary M8126, and for an A series programmable controller, it is Xn2 of the computer link unit.
FX communication Commands 8 8.10 On-demand Function Data transmission between the computer and programmable controller is usually initiated by the computer only. The on-demand function is used if there is a need to transmit data from the programmable controller to the computer. The range of data registers containing the data to be sent is specified in special data registers.
Commands 8 FX communication 8.10.2 On-demand Control Protocol 1 ) Control protocol programmable controller On-demand data transmission …… Set the word/byte data format Set on/off special M8129. ON: byte units(8bits), OFF: word units(16bits) …… Set the on-demand data Write the data to be transmitted into data registers.
Page 97
FX communication Commands 8 3 ) On-demand request time chart. • When the computer is transmitting data b) On-demand data Computer Programmable controller On-demand execution flag M8127 Start on-demand, Programmable writing of the on- controller demand data length a ) When on-demand is requested, the on-demand execution signal (special M8127) is immediately turned on.
Commands 8 FX communication 8.10.3 Specification and Example of On-demand 1 ) Command specification Protocol format 1 is shown. Added by programmable controller Computer Programmable Transmission controller data Special auxiliary relay M8127 On-demand data is set, the head address is Programmable Write processing written to D8127 and the data length is...
Page 99
FX communication Commands 8 2 ) Specification Example 1 To transmit the data stored in data registers D100 and D101 from the programmable controller (when the station number is 0, and data is specified in word units) The PLC number "FE" is automatically added by the programmable controller. Computer Programmable controller...
Page 100
Commands 8 FX communication 3 ) Specification Example 2 To transmit the data stored in data registers D100 and D101 from the programmable controller (when the station number is 0, and data is specified in byte units) The PC number "FE" is automatically added by the programmable controller Computer Programmable...
FX communication Commands 8 8.11 Loopback Test The loopback test is the function for testing if communication between the computer and programmable controller is operating as normal or not. 1 ) Command Specification Protocol format 1 is shown. Loopback test command Character area A Data (designated...
FX communication RS instruction 9 9. RS instruction This section refers to the RS instruction. For target devices, refer to the application instruction manual of each programmable controller. Function and Operation 9.1.1 Send and Receive Program An RS instruction sends and receives serial data via the RS-232C port (optional equipment). X010 FNC 80 D200...
Page 104
RS instruction 9 FX communication Operating Conditions and Format Set Content The programmable controller can change from using no protocol communication to programming protocol (and back) by manipulating the RS instruction and Register D8120 and shown below. 1 ) With the RS instruction ON, move the data options shown below into the Register D8120 to use no protocol communication.
FX communication RS instruction 9 9.1.2 Operation of RS Instruction An RS instruction specifies the head address and the number of points of the send data sent from a programmable controller as well as the head address for receive data save destination and the maximum acceptable number of points of receive data.
RS instruction 9 FX communication 9.1.3 Related Flags and Data Registers 1 ) Send request <M8122> When M8122 is set by a pulse instruction in the receive wait status or the receive completion status, data from D200 to D0 is sent. When send is completed, M8122 is automatically reset. When the RS instruction drive input X010 is turned on, the programmable controller is set to the receive wait status.
Page 107
FX communication RS instruction 9 4 ) Time-out evaluation <M8129> (Valid in the FX , FX programmable controller earlier than V2.00) If receive is not restarted within the time specified by D8129 after the receive data is interrupted on the midway, it is regarded as time-out, M8129 is turned on, and receive is completed (Refer to the figure below.).
RS instruction 9 FX communication Hardware Hand Shake Operation 9.2.1 FX, FX , FX , FX and FX (earlier than V 2.00) In the FX, FX , FX , FX and FX (earlier than V 2.00), half duplex communication is performed.
Page 109
FX communication RS instruction 9 2 ) Use terminal mode of control line This mode is available for send only or receive only. a ) Send only RS instruction OFF ON driving Send data Data 1 Data 1 Data 2 SD (TXD) Send request M8122...
Page 110
RS instruction 9 FX communication 3 ) Use normal mode 1 of control line RS instruction OFF ON driving Send data SD Data 1 Data 3 (TXD) Send request M8122 Send wait flag M8121 ER(DTR) Receive data Data 2 RD (RXD) Receive completion M8123...
Page 111
FX communication RS instruction 9 4 ) Use normal mode 2 of control line (FX, FX only) RS instruction OFF ON driving Send data Data 1 Data 3 SD (TXD) Send request M8122 Send wait flag M8121 Check OFF ER(DTR) DR(DSR) Check Receive data...
RS instruction 9 FX communication 9.2.2 , FX (V 2.00 or later) In the FX V 2.00 or later, full duplex communication is performed. When performing half duplex communication, pay rigid attention so that the send flag is not turned on while data is received. If it is turned on, send is started.
Page 113
FX communication RS instruction 9 3 ) Use normal mode 1 of control line RS instruction driving Send data Data 1 Data 4 SD (TXD) Send request M8122 ER(DTR) Receive data Data 2 Data 3 RD (RXD) Receive completion M8123 DR(DSR) Reset using a program.
Page 114
RS instruction 9 FX communication 4 ) Use interlink mode of control line RS instruction OFF ON driving Send data Data 2 Data 4 Data 4 SD (TXD) Send request M8122 DR(DSR) Up to 30 characfers can be received *2 Receive data Data 1 Data 3...
FX communication RS instruction 9 Number of Communication Data 9.3.1 Deal with 16 bits Data When M8161 is set to OFF (M8161 is shared by an ASCII instruction, a HEX instruction and a CCD instruction.) OFF during RUN 16-bit data Upper 8 bits Lower 8 bits M8000...
RS instruction 9 FX communication 9.3.2 Deal with 8 bits Data When M8161 is set to ON (M8161 is shared by an ASCII instruction, a HEX instruction and a CCD instruction.) M8000 16-bit data M8161 8-bit mode Ignored Lower 8 bits S·...
FX communication RS instruction 9 Example Program 9.4.1 Personal Computer When a programmable controller is connected to a personal computer, and data send/receive is performed by the programmable controller 1 ) System configuration R e ce ive S e n d -2 3 2 -B D Use a communication cable suitable to the arrangement of connector pins of the personal computer used.
Page 118
RS instruction 9 FX communication 4 ) Example program of programmable controller M8002 Sending data and receiving data FNC 40 reset. # ZRST Setting communication format.$ FNC 12 H 048F D8120 0000 0100 1000 1111 M8000 FNC 80 RS instruction drive. ( M8123 The receiving data (D0, D1) FNC 15...
FX communication RS instruction 9 9.4.2 Printer Connecting FX -232-BD and printer, and printing out the data send from the programmable controller. 1 ) System configuration Send -232-BD Use a communication cable suitable to the arrangement of connector pins of the printer used.
Page 120
RS instruction 9 FX communication 4 ) Operation Turn on the power of the In this example,CR (H000D) and · programmable controller and printer, LF (H000A) are written at the Power on check the printer is on line and switch end of the message.
FX communication -232IF 10 10. FX -232IF 10.1 Introduction The RS-232C interface block FX -232IF (hereinafter referred to as “232IF”) is connectable with to the FX , FX programmable controller to realize full duplex serial data communication with another RS-232C interface such as a personal computer, bar code reader, printer, etc. 10.1.1 Outline of Product 1 ) Applicable programmable controller...
-232IF 10 FX communication 10.2 Allocation of Buffer Memories (BFM’s) The RS-232C interface block FX -232IF(232IF) transmits data with the programmable controller via buffer memories BFMs (16-bit RAM memories) in the 232IF. FNC78 (FROM) and FNC79 (TO) instructions are used to read and write the buffer memories. 10.2.1 BFM List R:For read...
Page 123
FX communication -232IF 10 Initial R:For read Name Setting range value W:For write Time from CS ON to send start 0 to 32,327 (X 10 ms) Time from completion of actual send to RS OFF 0 to 32,327 (X 10 ms) (completion flag ON) ...
-232IF 10 FX communication 10.2.2 Communication Format <BFM#0> Description Initial value Data length 7 bit 8 bit 1 : 8 bit (00) : None Parity (11) : Even (01) : Odd (11) : Even Stop bit 1 bit 2 bit 0 : 1 bit (0011) : 300 (0100) : 600...
FX communication -232IF 10 Note : Setting example (hexadecimal, constant specification) Data length 8 bits Parity b12 b11 b8 b7 b4 b3 Stop bit 1 bit BFM #0 Baud rate 2400 bps (4063 H ) Control line No used CR, LF No added M8002 FNC 79...
Page 126
-232IF 10 FX communication 3 ) b9 and b8 (control line) For examples of connecting the equipment corresponding to each setting, refer to section 2.2.2. For operation of control line, refer to section 10.3. • When bits b9=0 and b8=0 communication is performed using only the SD and RD signals without using the control line.
Page 127
FX communication -232IF 10 Note : ASCII/HEX conversion When execution of the ASCII/HEX conversion is specified, the hexadecimal numeric data (0 to F) inside the send buffers (BFMs #1001 to #1256) is converted into the ASCII code, then sent. The received ASCII code is converted into hexadecimal numeric data (0 to F), then saved to the receive buffers (BFMs #2001 to #2256).
-232IF 10 FX communication Command 〈BFM #1〉 10.2.3 Description Send/receive enable (ER ON) Send command Receive completion reset command Error reset BFM #1 gives the command for send/receive and the status information reset command to the 232IF. 1 ) b0 (send/receive enable) While b0 is turned on, the 232IF can send and receive data.
FX communication -232IF 10 Receive Upper Limit Byte Count 〈BFM #2〉 10.2.4 Setting range: 1 to 512 (when buffer data length is 16 bits) 1 to 256 (when buffer data length is 8 bits) “0” is regarded as “512” or “256”. The initial value is “0”. BFM #2 specifies the maximum byte count received by the 232IF.
-232IF 10 FX communication 10.2.8 Receive Header <BFM #9 (upper), BFM #8 (lower)> Setting range: 4 bytes maximum, zero suppression The initial value is “0” (No used). For the receive data of the 232IF, 4 headers maximum can be specified. When the number of headers is less than 4, the upper “0”s are ignored (zero suppression).
FX communication -232IF 10 10.2.11 Number of Remaining Send Data <BFM #13> Saved value: 0 to 512 (when buffer data length is 16 bits) 0 to 256 (when buffer data length is 8 bits) The send byte count (BFM #1000) reduced by the number of data actually sent is during transmission.
-232IF 10 FX communication 10.2.15 Time from CS ON to Send Start <BFM #20> Set value: 0 to 32,767 (x 10ms) The initial value is 0 ms. The time after the clear to send (CS) signal is turned on until the 232IF starts the send operation can be set.
FX communication -232IF 10 10.2.17 Status <BFM #28> Description Description Send completion RS (RTS) Receive completion ER (DTR) Receive time-out Undefined Error occurrence Undefined Receive suspended DR (DSR) Undefined CD (DCD) Being sent DS (CTS) Being received CI (RI) The 232IF status and the send/receive result are saved as status information. This information can be read from the programmable controller using the FROM instruction.
-232IF 10 FX communication 7 ) b7 (being received) b7 is turned on after the head data is received until the receive completion status (BFM #28 b1) is set. 8 ) b8 (RS), b9 (ER), b12 (DR), b13 (CD), b14 (CS), b15 (CI) These bits indicate the ON/OFF status of the control signals.
FX communication -232IF 10 10.2.22 Receive Byte Count <BFM #2000> +30*1 Saved value: 0 to 512 (when buffer data length is 16 bits) +15*1 0 to 256 (when buffer data length is 8 bits) The byte count received from the counterpart equipment is saved. This value is cleared by the receive completion reset command (BFM #1 b2).
-232IF 10 FX communication 10.3 Hardware Hand Shake Operation 10.3.1 No Hardware Hand Shake Setting BFM#0 (b9, b8)=(0, 0) Send/receive enable (BFM#1 b0) Send command (BFM#1 b1) Send data Data 1 Data 4 SD(TXD) BFM#20 BFM#20 X10ms X10ms Send completion (BFM#28 b0) Receive data Data 2...
FX communication -232IF 10 10.4 Example Program 10.4.1 Example of 16 Bits Data Communication This system configuration describes an example in which 16-bit buffer length data is sent and received between the equipment of the terminal specifications. In this example, the ASCII code saved in the data registers D201 to D205 in the programmable controller sent to the counterpart equipment, and the data received from the counterpart equipment is saved to the data registers D301 to D304 in the programmable controller.
Page 140
-232IF 10 FX communication b ) Command <BFM #1> M0→b0:Send/receive enable (ER ON) M1→b1:Send command M2→b2:Receive completion reset command M3→b3:Error reset c ) Receive upper limit byte count <BFM #2> 8bytes d ) Header and terminator <BFMs #4 to #11> BFMs #4 and #8 (send/receive header): 02H (STX) BFMs #6 and #10 (send/receive terminator):03H (ETX) e ) Status <BFM #28>...
Page 141
FX communication -232IF 10 3 ) Example program M8002 Transfer of communication format FNC 79 H009F K 1 →BFM#0) (009F Initial pulse Block No. BFM No. Transfer Number of source transfer points Transfer of receive upper limit byte count FNC 79 (K 8→BFM#2) Send header FNC 79...
Page 142
-232IF 10 FX communication 4 ) Operation chart (M0) BFM#1 b0 Send/receive enable (M1) BFM#1 b1 Send command BFM#13 Number of remaining send data Send Send completion status is also reset by next send command. BFM#1001 to #1256 Send buffers BFM#1000 BFM#28 b0 (M10)
FX communication -232IF 10 10.4.2 Example of 8 Bits Data Communication This system configuration describes an example in which 8-bit buffer length data is sent and received between the equipment of the terminal specifications. In this example, the ASCII code saved in data registers D201 to D209 in the programmable controller is sent to the counterpart equipment, and the data received from the counterpart equipment is saved in data registers D301 to D308 in the programmable controller.
Page 144
-232IF 10 FX communication b ) Command <BFM #1> M0→b0:Send/receive enable (ER ON) M1→b1:Send command M2→b2:Receive completion reset command M3→b3:Error reset c ) Receive upper limit byte count <BFM #2> 8 bytes d ) Header and terminator <BFMs #4 to #11> BFMs #4 and #8 (send/receive header): 02H (STX) BFMs #6 and #10 (send/receive terminator): 03H (ETX) e ) Status <BFM #28>...
Page 145
FX communication -232IF 10 3 ) Example program M8002 Transfer of communication format FNC 79 H409F →BFM#0) (409F Initial pulse Block No. BFM No. Transfer Number of source transfer points Transfer of receive upper limit byte count FNC 79 (K 8→BFM#2) Send header FNC 79 →BFM#4)
Page 146
-232IF 10 FX communication 4 ) Operation chart (M0) BFM#1 b0 Send/receive enable (M1) BFM#1 b1 Send command BFM#13 Number of remaining send data Send Send completion status is also reset by next send command. BFM#1001 to #1256 Send buffers BFM#1000 BFM#28 b0 (M10)
FX communication Optional programming port 11 11. Optional Programming Port This section describes connection to peripheral equipment (programming tool, data access unit and electronic operation terminal) using the FX -232-BD, FX -232-BD, FX -232ADP , FX 232ADP , FX -422-BD, or FX -422-BD as well as cautions on communication.
Optional programming port 11 FX communication 11.2 FX -232-BD FX -232-BD FX -232ADP and FX -232ADP When an FX -232-BD an FX -232ADP or an FX -232ADP is installed on the FX , FX Series, or when an FX -232-BD is installed on FX or FX Series, a personal computer in which the following software is supported can be connected to each port.
FX communication Optional programming port 11 Note: Reference RS232C crross cable RS232C crross cable -232CAB-1 -232CAB (D-SUB 25pin→D-SUB 9pin) (D-SUB 9pin→D-SUB 9pin) 25pin 9pin 25pin 25pin 9pin 9pin 25pin 9pin Frame Frame SHELL SHELL FX-232CAB-1 9pin 9pin 11.3 Cautions on Use 11.3.1 Cautions on Setting Never set communication to the FX...
Page 150
Optional programming port 11 FX communication Memo 11-4...
FX communication Diagnostics 12 12. Diagnostics 12.1 Common Items 1 ) Check the connection with the communication unit of the programmable controller and the optional equipment. When the connection is unstable, communication cannot be corrected. For the installation and connection method, refer to the manual of the communication unit of the optional equipment.
Diagnostics 12 FX communication 12.2 N:N Network 12.2.1 Error Code When occurring the communication error, auxiliary relays (FX , FX , FX , FX : M8183 to M8191, FX : M504 to M511) for error flag is turned ON in the station. And the error code is stored into the data registers (FX , FX , FX...
FX communication Diagnostics 12 12.3 Parallel Link 12.3.1 Diagnostics 1 ) Check the status of the RD(RXD) LED and the SD(TXD) LED provided on each communication unit. • If the RD(RXD) and the SD(TXD) LED are lighted and extinguished, nothing is wrong. •...
Diagnostics 12 FX communication 12.4 Computer Link 12.4.1 NAK Error Code The error code is sent following a NAK response to indicate the type of error that occurred. It is transmitted as two ASCII characters representing the hexadecimal codes ranging from 00H to FFH.
Page 155
FX communication Diagnostics 12 12.4.3 Diagnostics 1 ) Check the status of the RD(RXD) LED and the SD(TXD) LED provided on each communication unit. • If both of them are lighted and extinguished, nothing is wrong. • If the RD(RXD) LED is lighted/extinguished but the SD(TXD) LED is not lighted/ extinguished (not lighted at all), check the setting of the station No.
Diagnostics 12 FX communication 12.5 RS Instruction 12.5.1 Diagnostics 1 ) Check the status of the RD (RXD) LED and the SD (TXD) LED provided on the optional equipment. • If the RD (RXD) LED is not lighted while data is received or the SD (TXD) LED is not lighted while data is sent, check the installation and the wiring.
FX communication Diagnostics 12 12.6 FX -232IF 12.6.1 Error code When an error occurs while data is sent or received, BFM #28 b3 is set to ON and the error code is saved in BFM #29. Code Description Causes and countermeasures ...
Diagnostics 12 FX communication 12.7 Using Optional Programming Port 12.7.1 , FX and FX earlier V2.00 2N(C) 1 ) Make sure that the communication format is set to the initial status (D8120 = K0). Using a peripheral equipment, check the communication setting by parameters. If a non- procedure protocol (RS instruction) or dedicated protocol is selected in the setting, clear the setting using the peripheral equipment.
Page 162
HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EURASIAN REPRESENTATIVES MITSUBISHI ELECTRIC EUROPE GEVA AUSTRIA UAB UTU POWEL LITHUANIA Avtomatika Sever Ltd. RUSSIA EUROPE B.V. Wiener Straße 89 Savanoriu pr. 187 Lva Tolstogo St. 7, Off. 311 German Branch AT-2500 Baden LT-2053 Vilnius RU-197376 St Petersburg Gothaer Straße 8...