Home

RS-232C Interface Module Type AJ65BT

image

Contents

1. The reception data is interpreted as ASCII data and is converted into binary data before storage in the reception area 1 Transmission order during ASCII BIN conversion transmission During ASCII BIN conversion transmission the data is transmitted from the low order byte and when converted into ASCII code data it is transmitted from the high order byte 2 Reception order during ASCII BIN conversion transmission During ASCII BIN conversion reception the reception data is stored from the low order byte The odd character of the reception data is stored as the upper digit of the 1 byte data after conversion and is converted into binary code data before storage in the reception area R2 Head data External device Buffer memory transmission area reception area YL p Random data section H L C BIA 3 2 0 2 1 Transmission data 00024 ES 43H 42H141H4 33H132H 3041 324 314 size reception 001 024 issi data size 5 Transmission 0212 K Random data section 1 gt 1 Transmission data 024 124 S 1 210 29 A B C reception data O i i i BC3An l l 31H 32H130H 32H133H 41H142H 43H BCu 3Ai i meee L 4 Reception The data size is for a word unit Head data 8 OTHER FUNCTIONS MELSEC A 3 Precautions for using ASCII BIN conversion transmission reception function a The data codes 30H to 39H 0 to 9 and 41H to 46H A to F
2. M30 02 ji CALL FROM HO H200 D200 gt KO D200 mov D200 FROH HO H201 D201 P2 K4 PO 100 M125 100 M130 KI KOZ MELSEC A Set initialization request J Reset initialization request Set the error occurrence flag Complete initialization Pulsate data transmission switch J Set data transmission flag Set transmission data size Set transmission data 41H 42 Set transmission data 43H ddu J Set transmission data 45x 46x J Change to bank 2 Store transmission data in automatic update buffer J Change to bank 0 Set transmission request y Reset data transmission flag Reset transmission request J Set data reception enable flag J Change to bank 2 Read reception data size J Store reception data size Vin Z Store data received from D201 9 PROGRAM EXAMPLES CALL SET X102 X103 Y102 HH Tooo RST R2 error processing X101 SET X103 L x105 m X108 L M135 CALL FROM HO H1B0 D10 CALL SET RST x105 X23 XITA SET Reset SW VIIA XITA E RST PO PO Y91 Error LED M135 YA YA YB Error LED RET MELSEC A T Change to bank 0 Set reception read complete kad 1 Reset reception read complete Reset data reception enable flag 7 Set the error occurrence flag F Change to bank 2 Store error code in D10 to D12 Change t
3. TO RIWT RISEND gt Transmission area 4 FROM RIRD RIRCV H L Reception area 2nd station transmission reception area 1st station transmission reception area 1 Data control data transmission data is stored in the master station transmission area 2 When the intelligent device station access request signal RY n 1 E turns ON the data stored in the transmission area is stored in the R2 3 When the intelligent device station access complete signal RX n 1 E turns ON the response is stored in the master station reception area 4 The data is read from the master station reception area When the dedicated commands RIWT RIRD RISEND RIRCV are used the intelligent device station access request signal RY n 1 E and intelligent device station access complete signal RX n 1 E are controlled by the dedicated commands so the user does not need to establish an interlock 5 PRELIMINARY INFORMATION 5 7 2 Control data MELSEC A 1 Changing the bank when using the A Series master module When using the A series master module AJ61BT11 A1SJ61BT 11 the master station s automatic transmission reception buffer will be bank 1 Thus create a program that changes to bank 1 when reading or writing to the transmission reception buffer and returns to bank 0 when the reading writing is completed When using the dedicated commands RIWT RIRD RISEND RIRCV the bank will be changed automatic
4. 2 Timing chart Programmable controller CPU Word device Reception read complete signal RYn2 Reception normal error read request signal RXn2 RXn3 Master station Automatic update area wt transmission area R2 Reception area S OS reception area External device lt Carried out with sequence program Carried out by R2 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A pe a IIO Control side The reception data is stored in the reception area via the OS reception area When the reception is completed 1 the contents of the reception area are written into the master station automatic update buffer reception area a reception normal read request signal RXn2 or reception error read request signal RXn3 EE turns ON EET reception data is read from the master station automatic update buffer reception area The reception read complete signal RYn2 turns ON Program ane signal turned ON in step 3 turns OFF 7 The reception read complete signal RYn2 turns OFF 1 Indicates the storage of the reception end data size data or the data to the reception end frame into the reception area 3 Program The program for receiving data from an external device using the buffer memory automatic update function is shown below With the following program the R2 buffer memory is used at the default value so the reception is completed when LF An
5. Monitor target RX RY RW 1 Device No 2 Monitor target device 3 Transmission trigger conditions 0 1 Device No Designate the RX RY RW No monitored by the R2 to detect the transmission trigger using the RX RY RW stored in the master station buffer memory as a target Example To designate RX5 of first station s remote module H005 To designate RX5 RX25 of second station s remote module H025 Master station address b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b bO First Koul RXF RSE RSD RXC RXB RXA RX9 RX8 RX7 RX6 Rx5 T RX4 RX3 RX2 T RX1 T RXO station E1 RX1F RX1E RX1D RX1C RX1B RXIA RX19 RX18 RX17 RX16 RX15 RX14 RX13 RX12 RX11 RX10 Second E2 RX2F RX2E RX2D RX2C RX2B RX2A RX29 RX28 RX27 RX26 RX25 RX24 RX23 RX22 RX21 RX20 station E3 RX3F RX3E RX3D RX3C RX3B RX3A RX39 RX38 RX37 RX36 RX35 RX34 RX33 RX32 RX31 RX30 2 Monitor target device The monitor target device designates what the above device No target device is Bit ae ae 7 o Monitor target device a o o 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 3 Transmission trigger conditions The transmission trigger conditions designate the conditions interpreted by the R2 as a data transmission trigger generation when monitoring the monitor target devices Transmission trigger generation ray 3 Monito
6. 2 Designating the transmission data in the transmission area When using the transmission data in the transmission area designate the frame No 8000n The data equivalent to the word byte size designated in the transmission data size designation area will be transmitted from the transmission area 3 Setting the buffer memory The items to be set for the buffer memory used when transmitting data using the transmission frame 2 area are shown below R2 buffer memory Name Details address When transmitting frames using the transmission frame 2 area designate the head No of the transmission table in which the data to be transmitted Transmission table ls designated 1204 head No designation 0 Do not transmit with frame 2 area default value 1 to 100 Head No of transmission data designation destination in transmission table When transmitting frames using the transmission frame 2 area designate the No of transmission tables as 1 to 100 from the table position 42144 No of transmission designated in the transmission table head No designation R2 1201 lable 0 Do not transmit with frame 2 area default value 1 to 100 No of transmission table For frame transmission or monitor transmission using the transmission frame 2 area designate the No of the data frame to be transmitted from er the frames registered in R2 Transmission table 122 to 185x designation On 0 No designation default value No 1 to No
7. time designation signal RXn1 turns ON and the BB11h is stored in the transmission error code area R2 1B1h 0 Unlimited wait 1 to 32767 Transmission timeout time x 100ms The actually transmitted data size is stored when transmission is completed When transmitting frames the head and end frames will also be included in Actual transmission the transmission data size data size storage If ASCII BIN conversion is carried out the transmission data size after conversion will be stored The data size unit follows the word byte unit designation R 2 10201 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 6 2 Matters to know before receiving data When receiving data from an external device first it is confirmed that the reception normal read request RXn2 or reception error read RXn3 is ON and then the data stored in the R2 reception area is read out After reading the reception is completed by turning the reception read complete signal RYn2 ON 1 Reception procedures Start The reception data is stored from the OS reception area to the reception area The R2 turns ON the reception normal read request signal RXn2 or reception error read request signal RXn3 The reception data is read from the R2 reception area using the buffer Sections 5 6 5 7 memory automatic update function or transmission reception buffer After reading the reception read complete signal RYn2 turns ON
8. 112 Reception timeout time designation a a R2 113Hto 1 a System area Use prombted R2 116 Transmission Transmission head frame No eae Eau oe R2 1194 lame T area Transmission end frame No ee G Ni station Possible a 1 Beal System area Use prohibited 11AH Transmission timeout time Transmission timeout time designation R2 11Bxto TEO System area Use prohibited Transmission table head No designation No of transmission tables S Transmission Not Section frame 2 area SOUE required Rosine Transmission table designation 3 SPECIFICATIONS MELSEC A 3 Setting status storage area ie No Station No setting switch switch 1A1H Data link transmission speed setting switch i el a IP ede 1A44 RS 232 C data bit length R2 required possible 1A7H Buffer memory default value setting status storage a E 1 Follows switch setting 4 Communication status storage area Address Name Default Update Initializa EEPROM Reference hexadecimal value tion registration Rz R2 1A8Hto Error code history ES aoe Error code General error code Section storage area required ossible 10 1 1 Error code at transmission ras p i B2u Error code at reception oo System area Use prohibited aoe eee ee ee S kg 2 1B4 Actual transmission data size storage H ee 1B5H Reception frame index No storage eae d B E Bex No of data items in OS reception area data si
9. 9 PROGRAM EXAMPLES R2 error processing M100 X101 SET W135 X103 X105 X108 M125 M130 W135 E J E 4E CALL pR W134 9 SET Y9 Error LED RST M135 RST W134 M100 X105 X23 XITA t SET YHA Reset SW YI1A XITA J E RST YIIA Writ t tput RY Y100 to Y11F LAST W rite remote o 0 i XOF upu gt U Error LED f CALL PO T0 HO H160 K4 100 K2 SFE 2 Program to change to bank 0 MELSEC A Set the error occurrence flag Read error code Turn ON error LED Reset error occurrence flag Error reset request Error reset complete Turn OFF error LED Change to bank 0 Write Y100 to Y11F in RYnO to RY n 1 3 Program to change to bank 1 Specify partial refresh Specify bank 0 Execute partial refresh Specify partial refresh Specify bank 1 Execute partial refresh 9 PROGRAM EXAMPLES MELSEC A 4 Program for setting reception timeout time M138 X11 PIO CALL PI Change to bank 1 MOV KO D20 Set dummy area MOV H112 D2 Set station No request code NOV K10 D22 Transmission buffer write data size MOV Ki D23 Quantity Fixed value MOV H4 D24 Access code attribute Fixed value MOV H112 D25 Set R2 buffer memory address MOV Ki D26 Set No of write points word MOV K20 D27 Set write value 2 sec TU HO HO D20 K8 Store transmission data into transmission buffer CALL PO Change to bank 0 SE
10. Access code attribute each Buffer memory address No of write points word Note that the interlock signal differs between the QCPU Q mode QnACPU and ACPU QCPU A A mode as shown below When using ACPU QCPU A A mode Interlock signal b15 to b8b7 to bO One a RX Complete device RY Request device each RWr Error code storage device When using QCPU Q mode QnACPU Interlock signal b15 to b8b7 to bO RY Request device One word RWT each Error code storage device RX Complete device Complete mode 5 PRELIMINARY INFORMATION MELSEC A 3 When using the TO command Not available when using QCPU Q mode This is used only when writing to the R2 designated buffer memory When using the TO command the master station buffer memory will be used as the transmission buffer for the control data and write data The complete status will be stored in the reception buffer The data designated with the transmission buffer is written to the R2 buffer memory using the intelligent device station access request complete signal RY n 1 E and RX n 1 E Example Writing in the reception complete data size and reception timeout time Address Master module R2 QnA Series A Series Transmission buffer 1 MI 10004 Bank 1 M On Dummy area U M 10014 Bank 1 M 14 Station No request code M 1002 Bank 1 M 2 Transmission buffer write data size byte M 1003 Bank 1 M
11. FRO HO H160 D50 Kl and HOCOO0OOOO _ SR K8Y100 To HO H160 D50 M135 Y91 Error LED M135 M134 YA YA Y9 Error LED PO Kl D50 D50 K2 2 Program for changing to bank 0 M9036 PO SEG SET RST RST K4Y18 MELSEC A Set the error occurrence flag Read error code Turn ON error LED Reset error occurrence flag Error reset request Error reset complete Turn OFF error LED Change to bank 0 Read latest RY information Retrieve RY n 1 E RY n 1 F state Set latest RY n 1 E RY n 1 state Write Y100 to Y11F to RYn0 to RY n 1 M9052 Specify partial refresh yic Specify bank 0 Y1D KaR Execute partial refresh 9 PROGRAM EXAMPLES 3 Program for setting reception timeout time M9036 P10 MOV K1 4 Program for setting transmission timeout time M9036 P20 MOV Ki MOV H4 MOV HITA MOV K20 D21 D31 D32 D33 D34 MELSEC A No of write points Access code attribute R2 buffer memory address Write data 2 sec Dedicated command RIWT Master station head I O No Access destination station No Write data Device to turn one scan ON at completion No of write points Access code attribute R2 buffer memory address Write data 2 sec Dedicated command RIWT Master station head I O No Access destination station No Write data Device to turn one scan ON at completion 9 PROGRAM
12. G RIRD U0 D190 KI H4 H401 D200 D201 D191 D192 D193 D194 7 Program for reading error codes D41 D42 D43 SM400 Moy KI MOV H4 MOV H1BO Woy K3 G RIRD UO D40 D10 SAESAARE MELSEC A R2 station No Access code attribute R2 buffer memory address No of read points Read using dedicated command R2 station No Access code attribute R2 buffer memory address No of read points Read using dedicated command 9 PROGRAM EXAMPLES MELSEC A MEMO 10 TROUBLESHOOTING MELSEC A 10 TROUBLESHOOTING The details of the errors that occurs when using the R2 and the troubleshooting methods are explained in this chapter 10 1 Error codes The error codes stored in the R2 buffer memory are explained 10 1 1 Error code storage area When an error occurs in the R2 programmable controller CPU or master module an error code is stored in the error code storage area of the R2 which is classified by function and the ERR LED turns ON Up to eight error codes that have occurred in the past are stored in order of occurrence in the error code history R2 1A8H to 1AFH The ninth and following error codes are not stored The ERR LED is turned OFF and the error code storage area is cleared by turning the error reset request signal RY n 1 A ON Error code storage buffer memory Up to eight error codes that occurred in the past 1A8H to 1AF Error cod
13. The high order byte is not transmitted RW FFu DCu designation 1 Example When designated RW value is 16706 4142 42x is transmitted B 42u Transmission 1 Refer to section 2 for details on designating RX RY RW 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A code During frame transmission the remote register RW value is referred to Two bytes of the value are transmitted in the order of binary value low order byte and high order byte The low order byte of the designated RW value is the first character and the high order byte is the second character RW FE DDH designation 1 Example When designated RW value is 16706 4142H RW value is transmitted A B 41u 421 Transmission DEn to DFH Use prohibited 1 Refer to section 2 for details on designating RX RY RW d Special characters for sum check codes The special characters for sum check codes are used to transmit and receive the sum check codes in a set range of the statement to enhance the reliability of the data exchanged with an external device The sum check codes and details of data during transmission reception are shown below Special character Details of data during transmission reception and handling by R2 code Transmission reception order The low order 2 bytes of the calculation sum check Transmitted received code are transmitted received as a 2 byte binary code in order of L H Use prohibited
14. Turn OFF error LED 9 PROGRAM EXAMPLES MELSEC A 9 2 4 When using the FROM TO commands with ACPU QCPU A A mode Three R2 modules connected An example of the program for connecting three R2 modules using the FROM TO command with the ACPU QCPU A A mode when using the buffer memory automatic update function is shown below 1 Conditions of program example The program examples in this chapter have been created with the following conditions a System configuration Power CPU Master AX42 AY42 supply station X Y00 to X20 to Y60 to X Y1F X5F YOF R2 Station No 1 Transmission data ABCDEF External device Reception data Random data CR 0Dx or Random data LF 0Ax 1 RS 232 C cable Transmission data ABCDEF External device Reception data Random data CR 0Dx or Random data LF OAn RS 232 C cable Transmission data ABCDEF Reception data Random data CR 0Dx or device Random data LF OAx RS 232 C cable 1 In the program example shown in this section the reception completion is detected by receiving the reception end frame CR 0Dx or LF 0An To detect a reception completion by designating the number of reception data the reception end data size designation R2 111H setting is required Refer to section 6 2 for details 9 PROGRAM EXAMPLES Programmable controller CPU
15. When the QCPU Q mode is used such provisions need not be made Refer to section 5 3 8 for details Read execution nov mov LU ov G RIRD UO D40 KI H4 H1B0 K3 D10 D41 D42 D43 D44 M190 Set R2 station No Access code attribute R2 buffer memory address Reception data size Read execution 5 PRELIMINARY INFORMATION MELSEC A 5 7 4 Writing to the R2 buffer memory When writing to the R2 buffer memory using the transmission reception buffer after the control data and transmission data are written to the transmission buffer the data can be written to the buffer memory by turning the intelligent device station access request complete signal RY n 1 E RX n 1 E ON and OFF 1 Flow of process Programmable controller CPU Master station R2 5 Intelligent device station access complete ON Remote 7 Intelligent device station access Remote input RX complete OFF input RX 2 Intelligent device station access request ON Bit device Remote output RY 3 Transmission data 6 Intelligent device station access request OFF output RY 1 Control data transmission data Word device 2 Timing chart Intelligent device station access request signal RY n 1 E Intelligent device station access complete signal RX n 1 E Programmable controller CPU word device Mas
16. 3 123 45 6 7 8 ON o s s s s y b s s SW1 to 3 Transmission speed 1 1 0O 2400bps 0 O0 f 1 4800bps 1 f 0 1 9600bps o 1 1 19200bps 0 OFF_1 ON Not used aus Data bit length SS ON Stop bit length Connect a CC Link dedicated cable for power supply and data link 2 piece terminal block 7 RS 232 C interface Connect an RS 232 C cable for connection with external device 9 Reset switch Returns to the power ON status Use prohibited 4 PROCEDURES AND SETTINGS BEFORE OPERATION 4 5 Wiring MELSEC A 4 5 1 Precautions for handling the CC Link dedicated cables Avoid the following extreme handling Such handling will damage the CC Link dedicated cables e Compress the cable with a sharp edge e Twist the cable extremely e Pull the cable extremely hard More than permissible tension e Step on the cable e Put an object on the cable e Scratch the cable sheath 4 5 2 Connection of the CC Link dedicated cables CAUTION e Before starting installation or wiring work be sure to shut off all phases of external power supply used by the system Failure to shut off all phases could lead to electric shocks product damage or malfunctioning e Always install the terminal covers enclosed with the product before turning ON the power or operating the product after installation or wiring work Failure to install the terminal cover could lead to electric shocks e Bef
17. Example Completion of frame reception Random data section head frame head frame Reception Reception 4 gt lt Reception end data size The data until the head frame is received is invalid 2 If the reception head frame and reception end frame are designated and 0 is designated for the reception end data size when the reception end frame is received the frame reception will be completed This allows the random data section to have a varied length If the R2 detects an error during data reception the random data section of the data received until immediately before is stored in the reception area of the buffer memory and the reception error read request signal RXn3 turns ON 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 4 Transmitting data at the device and status change 7 4 1 Outline With this function the R2 monitors the device and status according to the details preset by the user When the data transmission command data transmission timing is detected the contents of the user designated transmission table are transmission to the external device Monitor transmission function When the user transmits data with this function the R2 process can be randomly designated by the user Device of master station or status of master station and programmable controller CPU monitored by the R2 to detect the data transmission timing Conditions for establishing data transmission t
18. Generic Terms and Abbreviations Unless specially noted the following generic terms and abbreviations are used in this manual to explain the AJ65BT R2 type RS 232 C interface module Generic term abbreviation Details of generic term abbreviation Abbreviation for AJ65BT R2 type RS 232 C interface module CC Link Abbreviation for Control amp Communication Link system Master module Generic term when using AJ61QBT11 A1SJ61QBT11 AJ61BT11 A1SJ61BT11 QJ61BT11 and QJ61BT11N as the master station Remote module Generic term for AJ65BTB AJBS5BTCL AJ65BT 64AD AJ65BT 64DAV and AJ65BT 64DAI External device Generic term for devices such as ID controller bar code reader and general purpose personal computer connected to R2 for data communication GPPW Generic term for model names SWnD5C GPPW SWnD5C GPPW A SWnD5C GPPW V and SWnD5C GPPW VA n included in the model name indicates a number 4 or more Abbreviation of ADJ2HCPU A1SCPU A1SCPUC24 R2 A1SHCPU A1SJCPU A1SJCPU S3 ASJHCPU A1NCPU A2CCPU A2CCPUC24 A2CCPUC24 PRF A2CJCPU A2NCPU A2NCPU S1 A2SCPU A2SHCPU and A2FXCPU A3ACPUP21 R21 A3NCPU and A3ACPU and A4UCPU Q2ASHCPU S1 Q3ACPU Q4ACPU and Q4ARCPU QCPU Q mode Generic term for Q02CPU QO2HCPU QO6HCPU Q12HCPU and Q25HCPU QCPU A A mode Generic term for QQ2CPU A QO2HCPU A and QO6HCPU A AD N AnNCPU AnACPU AnUCPU QnACPU Definitions and Details
19. Head frame for in zone ON command In zone OFF command Head frame of barcode data Head frame at barcode reader error Frame at no read Head frame at error Synchronous ON command Head frame of synchronous ON command at edge input TOHKEN synchronous OFF command Frame at no read Frame at error End frame Head frame of various commands 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A Default registration No of Frame contents during mame no registered transmission reception Remarks bytes S 39 4 sto 4 x V620 OMRON _ Various command frame 4 XZ CR Check sum FFFAx CR ID R X SUNX End frame ibited 32 1 3 142H to 322 to 14CH 332 150H 336 151H 337 Head frame of various commands ID R X SUNX 15BH 15CH 4 15DH 4 15EH 35 15FH 5 SMO0000 CR 160H 7 SMO0101 CR 161H 353 SM0202 CR 162H to 354 to ae 999 se prohibited A wiv lG ojoj Various command frame oO oO ol oO N 3E7H 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 5 2 Details of user registration frames By preregistering the user registration frames in the EEPROM via the R2 buffer memory these frames can be used to check the transmission reception data transmitted or received with frames and can be used for the transmission data during monitor transmission 1 Characters that can be registered a
20. M100 R2 data link normal 4 Create a program that initializes the R2 Refer to section 5 5 5 Create a program that transmits data to the external device Refer to sections 6 3 1 and 6 4 1 6 Create a program that receives data from the external device Refer to sections 6 3 2 and 6 4 2 7 Create the following program to process the R2 error reset the error M100 X101 Transmission error complete RXn1 SET H135 J Set the error R2 occurrence flag normal Reception error read request RXn3 Initialization error complete RXn5 EEPROM function error complete RXn8 M125 M130 T M135 e r r r dF atti Process program for error L IT TID 1 T Required when using transmission reception RST M135 71 Reset the error occurrence flag YHA X114 Error reset 5 PRELIMINARY INFORMATION MELSEC A 8 Create the following program and write Y100 to Y11F into RYn0 to RY n 1 F Module error master station Module ready master station Local station data link state master station X0 XOF XI r Changeover to bank 0 Write Y100 to Y11F to TO HO H1 N MH Ke RYn0 to RY n 1 F When using QCPU Q mode or QnACPU setting automatic refresh parameters refreshes the contents of the remote input RX and remote output RY automatically Thus the above program is not required a Using the dedicated commands RIRD RIWT RISEND RIRCV When the dedicated commands RIRD RI
21. Reception normal error read request signal RXn2 RXn3 Programmable controller CPU Word device Master station Transmission buffer 2 G gt X i i l Master station Reception buffer Y H gt x ve x 7 i SE i R2 Reception area x gt X 1 x Carried out with sequence program P Carried out by R2 Control side 1 The reception data is stored in the reception area via the OS reception area When the reception from the external device is completed 1 the reception normal read request 2 R2 signal RXn2 or reception error read request signal RXn3 turns ON 3 The read control data is stored in the master station transmission buffer Program 4 The intelligent device station access request signal RY n 1 E turns ON 5 The contents set in the control data are conveyed to R2 6 The control data and reception data are stored in the master station reception buffer 7 The intelligent device station access complete signal RX n 1 E turns ON 8 The intelligent device station access request signal RY n 1 E turns OFF 9 The intelligent device station access complete signal RX n 1 E turns OFF The reception data is read from the master station reception buffer Program 11 The reception read complete signal RYn2 turns ON 12 The signal turned ON in step 2 turns OFF 13 The reception read complete signal RYn2 turns OFF 1 Indicates the storage of the recepti
22. The R2 turns OFF the reception normal read request signal RYn2 or reception error read request signal RYn3 The reception read complete signal RYn2 turns OFF 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 2 Reception area When data is transmitted from the external device to the R2 the data is stored in the R2 reception area This reception area is the R2 buffer memory area where the reception data size and reception data is stored for the programmable controller CPU to read the data received from the external device The reception area size can be set by setting the 2H 3H buffer memory Refer to section 4 for details a Reception area configuration The reception area stores the received data size in the head word and stores the received data in the second and following words The reception data size unit word byte follows r 4 the value set in the buffer memory word byte unit Address Buffer memory designation area R2 1024 i i lt R21400 Pte pases As SIZE The reception data storage size for when reading of the R2 401 S SA Sd S 4 received data to the programmable controller CPU is Reception data requested is written in E storage area A random data section of the received data is stored R2 5FFu ov At default The data amount transmitted in one session from the external device to the R2 must be set to be smaller than the R2 reception data sto
23. The sum check codes in the The low order 1 byte of the calculation sum check en range excluding the head frame code are transmitted received as a 1 byte binary code 1 frame worth of the The low order 1 byte of the calculation sum check transmission reception data code is converted into a 2 digit ASCII code and statement are transmitted and transmitted received received Transmitted received from highest digit Use prohibited The low order 4 bits of the calculation sum check code is converted into a 1 digit ASCII code and transmitted received The low order 2 bytes of the calculation sum check Transmitted received code are transmitted received as a 2 byte binary code in order of L H The low order 1 byte of the calculation sum check code are transmitted received as a 1 byte binary code The sum check codes in the The low order 1 byte of the calculation sum check range including the head frame code is converted into a 2 digit ASCII code and 1 frame worth of the transmitted received transmission reception data statement are transmitted and received Transmitted received from highest digit Use prohibited The low order 4 bits of the calculation sum check code is converted into a 1 digit ASCII code and transmitted received The calculation sum check code is converted into a complement of 2 and the low order 1 byte of the value Transmitted received is converted into a 2 digit ASCII code and from hi
24. Complete status Station No One word Access code attribute each Buffer memory address No of read points word 5 PRELIMINARY INFORMATION MELSEC A 5 When using the RIRCV command This is used to read a R2 designated buffer memory with executing handshake automatically between the master station and R2 When the RIRCV command is used the master station buffer memory is used for the control data size transmission buffer and the master station buffer memory is used for the read data size reception buffer Example Reading the reception data Master module Programmable controller CPU Transmission buffer R2 Address Refer to control data a 10004 to 11FFH of Q QnA Series frei shies Genes Seca On to 1FFH of A Series bank 1 Refer to interlock signal b Address r Q QnA Series A Series Reception buffer 12004 Bank 1 M 2004 __ Complete status m al 12014 Rank 1 M 2014 Station No request code 1202 Bank 1 M 2024 No of read data byte Address i aiaa E eea O oo tat Pe Ae Te Tin R2 ST Aan Reception data size Rees at R2 400 designation area Reception data 1 4014 Pead data Read data _ awsidT Reception data storage TT area Reception data n R2 401 ns l l M 13FFu Bank 1 M 3FFx RIRCV command Reception normal read RIRCV command At reception _ __ execution compl
25. M122 RET MELSEC A Change to bank 1 Set dummy area Set station No request code Transmission buffer write data size Quantity Fixed Access code attribute Fixed R2 buffer memory address Transmission area Set No of write points word Set transmission data size Set transmission data 41H 42H Set transmission data 43H 44x Set transmission data 45x 46x Store transmission data in transmission buffer Change to bank 0 Set intelligent device station access request Reset intelligent device station access request Complete transmission data setting 9 PROGRAM EXAMPLES MELSEC A 7 Program for receiving data M155 M153 XNE P40 CALL Fi Change to bank 1 MOV KU D180 Set dummy area MOV H110 D181 Set station No request code MOV K8 D182 Transmission buffer write data size MOV K1 D183 Quantity Fixed MOV HA D184 Access code attribute Fixed HOV H400 D185 R2 buffer memory address reception area MOV K1 D186 Reception data size TO HO HO D180 K7 Write reception data size read request CALL PO Change to bank 0 SET Y11E Set intelligent device station access request SET M153 M153 X11E wae l Kl RST YUE Set intelligent device station access request SET M154 M154 LAS SET M155 RST M154 RST M153 CALL Pi Change to bank 1 FROM H0 H203 D200 Ki Read reception data size CALL PO Change to bank 0 9 PROGRAM EXAMPLES M155 M158 XNE KO D200 D190 D191 D19
26. The method for receiving data from an external device using the transmission reception buffer is explained in this section 1 Flow of process The flow of the process for receiving data from an external device using the transmission reception buffer is shown below 5 Read command E Programmable controller CPU Master station R2 External 2 Reception normal device error read request ON Bit device 7 Intelligent device station access complete ON Remote B l l Remote input RX 9 Intelligent device input RX station access complete OFF 12 Reception normal error read request OFF 4 Intelligent device station access request ON 8 Intelligent device station access Se Remote Remote 11 Reception read output RY output RY complete ON 13 Reception read complete OFF Word device OS reception Random data area 3 Control data Transmission E227 pane Hier 6 RS be Control data 1 Data reception mission 10 Reception data reception data Reception buffer area When using the RIRD RIRCV command the steps 4 to 9 are carried out automatically 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 2 Timing chart Intelligent device station access request RY n 1 E Intelligent device station access complete RX n 1 E Reception read complete 4 signal RYn2
27. The transmission speed settings do not match ai RA and extemal deyice ransmi sion The mode setting switch or transmission Read the error code from the buffer memory specifications setting switch setting is incorrect check the error details and correct the setting The ERR LED turns ON The R2 detected an error during data Read the error code from the buffer memory and transmission remedy according to the error details The R2 detected and error The R2 detected and error during data reception data reception The R2 detected and error during data reception Read the error code froni thebuffer memory and remedy according to the error details Communication is possible in some cases and not possible in other The signal cable wiring has a contact fault Replace the cable or securely fix the connection cases The parity bit settings do not match KE R2 and external device parity check Non recognizable data is S Y The stop bit length settings do not match Match the R2 and external device stop bit size transmitted or received The transmission speed settings do not match eee R2 and extemal device transmission Carry out the following test on the R2 or master station side to check where the cause is 1 Check the hardware e The R2 must be securely mounted itis not known whether the e None of the module pins must be bent or communication error cause is on abjiormal the R2 side or external device side 2 Test the R2 hardware
28. a complete signal RXn7 RXn8 a a R2 buffer memory R2 1C0u to 1014 R2 buffer memory R2 1C7u to 1EFs R2 buffer memory Setting item Details address Designate the EEPROM function When using the registration frame function designate whether to register read or delete a registration frame 4COu function Buffer memory setting value registration User registration frame registration User registration frame read User registration frame deletion Buffer memory setting value initialization Designate the user registration frame registration No when U istered registering reading or deleting a frame to the EEPROM 1C1H PI SIS When registering the user registration frame if a No of a designation user registration frame already registered the details registered in the EEPROM can be changed Setting value 3E8H to 4AFH 1000 to 1199 User registered Designate the total No of bytes of the registration frame to 1C7u frame byte be registered read to the EEPROM designation Setting value 1 to 80 O Setting possible X Setting not possible Stored 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A R2 buffer Process memory Setting item Details address Register Read Delete When registering a frame designate the data to be registered in order of L and H from the head area of the user registration frame area When reading a frame the registered data wil
29. is data to be transmitted it is not transmitted to the external device External device eo Daa ROEA a from canceled point DSR DR signal 3 Setting the buffer memory When carrying out flow control designate flow control in the R2 buffer memory shown below R2 buffer memory Details address Designate whether to carry out flow control with DTR DSR control or DC code control when exchanging data between the R2 and Elow ontrol external device designation 0 Do not carry out flow control 1 Carry out flow control with DTR DSR control Default value 2 Carry out flow control with DC code control s If the buffer memory is set to Carry out flow control with DTR DSR signal control the RYnA DTR ER signal setting will be invalid e When the above buffer memory setting values have been changed initialize the R2 with the process given in section 8 6 8 OTHER FUNCTIONS MELSEC A In the case the OS reception area over flows e g when the reception data is not read when the flow control is not performed the reception error read request RXn3 turns ON 7 immediately after the reception normal error read request RXn2 RXn3 that has been ON is turned OFF 6 and the error code is stored In that case data in the OS reception area are not transferred to the buffer memory When any over flow occurs turn ON the reception read complete RYn2 again and clear the OS reception area R
30. or CR Dx is transmitted from the external device Refer to section 5 1 for details on the program conditions a When using the FROM TO command with the ACPU QCPU A A mode Confirmation of R2 data link status Refer to section 5 3 3 lasan See he ee oe E ee R2 initialization Refer to section 5 5 1 4 l c R2 normal eee X102 H SET M130 Set the data reception enable flag X103 M130 Y102 CALL P2 Change to bank 2 FROM HO H400 D200 Ki Read the reception data size KO D200 MOV D200 Z Store the reception data size in Z H401 D201 KOZ Read the reception data CALL PO Change to bank 0 SET Y102 Set reception read complete RYn2 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE moo x102 x03 0 HH MELSEC A complete RYn2 RST Y102 Reset reception read RST M130 Reset the data reception enable flag r a R2 error processing Refer to section 5 3 7 l T a Writing of remote output RY Refer to section 5 3 8 a ee ee ee ee ee ee ee A 1 Program to change to bank 0 M9036 Specify partial Po SET M9052 refresh RST Y1C Specify bank 0 RST YiD SEG K4Y18 K4B1 2 Program to change to bank 2 M9036 P2 SET M9052 RST yic SET Y1D SEG K4Y18 K4B1 Execute partial refresh Specify partial refresh Specify bank 2 Execute partial refresh 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A b When using the dedicated command RIFR with th
31. 1 5 6 2 5 7 3 Section 6 2 6 3 6 4 1 6 4 2 Section 7 4 3 Section 8 10 Section 9 2 1 9 2 2 9 2 4 9 3 1 9 3 3 Section 10 1 2 10 3 10 4 Japanese Manual Version SH 3633 G This manual does not guarantee the implementation of industrial rights or other rights and does not authorize the implementation rights Mitsubishi shall not be held liable for any problems regarding industrial rights that occur through the use of the contents given in this manual 1997 MITSUBISHI ELECTRIC CORPORATION A 5 INTRODUCTION Thank you for purchasing the Mitsubishi general purpose programmable controller MELSEC A Always read through this manual and fully comprehend the functions and performance of the A Series programmable controller before starting use to ensure correct usage of this product Make sure that this manual is delivered to the final user CONTENTS Safety PE TUCO Sau a 4 a ty dtita sean E T H Ba meiiaernieoes A 1 REVISIONS 22 4st heniiin inne ie dh deel di eel dhe ae eA Mae die A 5 About 0 Tal ie eee eee neediest ae aa a a eae a e e eae teste aed Oeics A 9 Compliance with the EMC Low Voltage DiIrecive sse eee eee ee ee eee eee A 9 Using TMS T anced nd taeda when cee whan dena whee ion aie cha A 10 Generic Terms and Abbreviations eee eee eee ee eee A 11 Definitions and Details of Tena 7567294750252 2023 deakakidiadkadlididadkabidndkaniadelddakenlias A 12 1
32. 100 1H to 161H 1 to 353 Designate default registration frame 3E8H to 4AFH 1000 to 1199 Designate user registration frame 8000H 32768 Designate transmission area data Example Transmission table head No designation 5 transmission table size 3 Transmission table designation No 5 6 7 02H STX 138H RD 107H ETX FFF 1h Transmission table head No ETX FFF1H No 7 R2 Transmission table size External device such as ID controller 7 USING FRAMES WHEN EXCHANGING DATA 7 3 Receiving data using frames MELSEC A With frame reception when a statement containing data with the same arrangement as the frame registered in R2 the R2 checks the reception statement frame and stores the received data in the buffer memory The frames checked consist of one head frame and one end frame Up to four sets can be set Reception head frame No 108H to 10Bn reception end frame No 10CH to 10FH With frame reception the word byte unit reception timeout time or reception end data size for a random data section can be designated in the same manner as non procedural reception R2 Buffer memory Reception head frame No 4 LR2 1084 No 1 2H Reception end frame No External device Check end frame R2 10C1 No 1 1071 R2 10F4 No 4 Transmission area 1 R2 400 Reception data size R2 4014 Rec
33. 3n Pe i Quantity M 10044 Bank 1 M 4u Access code attribute M 10054 Bank 1 M 5x Buffer memory address M 10064 Bank 1 M 6 No of write points word Address Reception complete daia Reception complete data M 10074 Bank1 M 7 write size designation 1114 size designation area data Reception timeout time Reception timeout time M 10081 Bank 1 IM 8 ption timeout time eception timeout time Mi SIE designation DR2 1126 designation area M 1009 Bank 1 M 9x Reception buffer 2 M 12004 Bank 1 M 200x Complete status Control 12014 Bank 2 M 2014 data Request writing to Intelligent device station TO command R2 buffer memory access request signal RY n 1 E execution Write process complete Completion of writing Intelligent device station to R2 buffer memory access complete signal RX n 1 E 5 PRELIMINARY INFORMATION MELSEC A 1 When writing data to the R2 buffer memory using the TO command the control data and write data are designated in the transmission buffer of the corresponding master station Designated item Details Setting Setting data range side Dummyarea d S Station No designate with high order bytes bits 8 to 15 l Designate the station No of the intelligent device station 0 to 64 User Station No request to be accessed code Request code designate with low order bytes bits 0 to 7 42 la H Desig
34. 46H 47H 31H 32H 33H 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 4 Setting the buffer memory The following buffer memories are related to the transmission of data R2 buffer Name Details memory address Designate the head address of the R2 buffer memory to be used as the Transmission area transmission area head address Always designate 2004 or above which is the user free area designation Set so that the area is not duplicated with areas used by other functions Setting range 200H to 7FEH Default value 2000 Designate the size of the R2 buffer memory used as the transmission area Transmission area size Transmission data size designation area transmission data designation designation area size Set the transmission area size to be 2H or more Set the transmission data and reception data unit word byte for when exchanging data between the R2 and external device 0 Word unit default value Word byte unit 1 Byte unit 10n designation N This is also used as the unit of the values handled in the actual transmission data size storage area R2 1B4x and OS reception area data size storage area R2 1B6x Designate the timeout time from when the transmission request signal RYn0O turns ON a trigger is generated during monitor transmission the transmission starts to when the transmission ends 11A Transmission timeout When the transmission timeout is applied the transmission error complete
35. Device X X110 to X11F Y110 to Y11F M ELSEC A b Relation of programmable controller CPU master station and R2 The contents of RXn0 to RX n 5 F are read into X100 to X15F and the contents of Y100 to Y15F are written into RYn0 to RY n 5 F Master station Address Remote input RX RX n 1 0 to RX n 1 F RX n 2 0 to RX n 2 F RX n 4 0 to RX n 4 F RXn0 to RXnF LE RAAE RX n 3 0 to RX n 3 F RX n 5 0 to RX n 5 F Remote output RY RY n 1 0 to RY n 1 F RY n 2 0 to RY n 2 F RYn0O to RYnF RY n 4 0 to RY n 4 F E0u a Et HI rae all 3a E24 a Ka ys E AE Edu Aa KR I ee HSS 1600 mnd Fer HR s Allies 1624 ibs a eee 1644 o5 RY n 3 0 to RY n 3 F RY n 5 0 to RY n 5 F R2 Remote input RX RXn0 to RXnF RX n 1 0 to RX n 1 F RX n 2 0 to RX n 2 F RX n 3 0 to RX n 3 F RX n 4 0 to RX n 4 F RX n 5 0 to RX n 5 F Remote output RY RYn0 to RYnF RY n 1 0 to RY n 1 F RY n 2 0 to RY n 2 F 4 RY n 3 0 to RY n 3 F RY n 4 0 to RY n 4 F RY n 5 0 to RY n 5 F 4 J st station 2nd station 3rd station 9 PROGRAM EXAMPLES ist station 2nd station 3rd station 2 Buffer memory configuration MELSEC A The buffer memory configuration for this program example is shown below Onto 19FH 118nto 19FH 1A0uto 1BFH 1COuto 2BFH 2COuto
36. EEPROM write timeout e There may be a problem in the hardware so contact error error occurred your nearest dealer or branch office A value other than 0 to 4 EEPROM function was designated for the designation error EEPROM function designation R2 1C0x A value other than 1000 to 1199 was designated for the user registered frame No designation R2 1C01h A value other than 1 to 80 Registration frame was designated for the byte size user registered frame byte designation area size designation R2 1C7H A special character that cannot be used in the user registration frame was used User registration frame No designation error Registration frame designated contents error User registration frame not registered error The designated user registration frame No has not been registered BB8D BB92 The transmission data has Transmission data exceeded the maximum size over error size of the transmission data 10 3 Refer to the buffer memory list in section 3 7 and set the correct data Correct the value designated for the EEPROM function designation R2 1C0u Correct the value designated for the user registered frame No designation R2 1C1H Correct the value designated for the user registered frame byte size designation R2 1C7x Correct the contents of the user registration frame e Check whether the designated user registration frame No has been registered e M
37. KU H110 K8 Ki H4 H1B0 K3 D40 CALL SET SET RST SET SET RST RST CALL D10 CALL D40 D41 D42 042 D44 D45 D46 K7 PO YUE M132 YUE M133 M134 M133 M132 P1 K3 PO Change to bank 1 Set dummy area Set station No request code Transmission buffer write data size Quantity Fixed Access code attribute Access destination R2 buffer memory address No of read points Write to transmission buffer Change to bank 0 Set intelligent device station access request Set error read flag 1 Reset intelligent device station access request Set error read flag 2 Error read completion Reset error read flag 2 Reset error read flag 1 Change to bank 1 Read from reception buffer Change to bank 0 5 PRELIMINARY INFORMATION 1 Program to change to bank 0 M9036 PO SEG 2 Program to change to bank 1 M9036 P1 SEG SET RST RST K4Y18 SET SET RST K4Y18 Specify partial M9052 refresh Yic Specify bank 0 Y1D K4B1 Execute partial refresh Specify partial M9052 refresh Yic Specify bank 1 Y1D K4B1 Execute partial refresh b When using dedicated commands RIRD with QCPU Q mode QnACPU When using dedicated commands RIRD RIRCV RY n 1 E and RY n 1 F are used with the dedicated commands so provisions must be made to prevent the user from rewriting this signal information
38. M110 M100 M115 M110 M114 Y100 Y101 Y102 Y103 Y106 Y107 Y119 A aA A t TT A aA TK YA KO gt 44SS eT 104 M100 M115 X104 RST 104 SET M114 X105 SET M135 M114 X104 X105 SET M115 Data transmission Transmission data ABCDEF X22 PLS M120 Transmission SW M100 N115 100 X100 X101 M130 M135 M120 tS Fb iets M125 CALL P30 M124 SET 100 RST M125 M100 X100 RST Y100 X101 M100 M115 M125 M135 X102 a SET M130 X103 Data reception M130 Y102 P40 P41 102 M100 X102 X103 Y102 j RST 102 RST M130 MELSEC A Set reception timeout time Set transmission timeout time Set initialization data write complete flag Set initialization request Reset initialization request Set the error occurrence flag Complete initialization Pulsate data transmission switch Set data transmission flag Set transmission data Set transmission request Reset data transmission flag Reset transmission request Set data reception enable flag Data reception process read data size Data reception process read data Set reception read complete Reset reception read complete Reset data reception enable flag 9 PROGRAM EXAMPLES R2 error processing H100 X100 SET X103 X105 X108 W125 M130 M135 t CALL H134 KET RST RST M100 W105 X23 X11A KK 8 Reset SY ais RST RST Write remote output RY Y100 to Y11F XO XOF X1 if H CALL
39. MEE HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN N 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPAN AGOYA WORKS 1 14 When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice
40. OUTLINE 1 1to1 4 4 1 Features anei hale dent hate dei Mn eaaa dedi deci de eel deed anil ail deel acelin 1 2 2 SYSTEM CONFIGURATION 2 1to2 2 K SYSTEM COM UM AL ONT a a ewe tas esac an este dhs devas ahs caved das dinza nds castadacdevec ids daved bastante TTT 2 1 2 2 Applicabl SyStEMS Aish fetter ds hier a ela a ates a diel 2 2 3 SPECIFICATIONS 3 1 to 3 26 3 1 General Specifications nisn a are diet a i atest nici ete 3 1 3 2 PEMOnmnanCe SPeCMICATIONS T 3 2 3 3 RS 232 C interface specifications eee e eee 3 3 3 4 General purpose input output SpeCifiCations ececeeecceeeeceeeneeeeeeeeeeeeeeeeeeeeaeeceaeeesaeeecaeeesaneeseaeeneessaees 3 4 320 ISP OPPUNCHON TTT 3 6 3 6 Input output signals for master module sss sese eee eee 3 7 3 6 1 List of input output Signal sss sese ee eee 3 7 3 6 2 Details of input output Signals sss sese eee eee 3 8 NAA DUTeORIMEMON T T ale eae Waele Mea ial iene Biss eth St 3 13 3 6 Transmission delay Ie anari aaan A EAA nee knee AAE ea AEA AEA AAG 3 19 3 9 Transmission reception Hirmer eee ereer eee eee eee 3 20 3 9 1 When using buffer memory automatic Update function sese sees ee ee eee ee eee eee 3 20 3 9 2 When using transmission reception buffer oo eee eee ee ee ee eee 3 23 4 PROCEDURES AND SETTINGS BEFORE OPERATIION 4 1to 4 12 4 1 Procedures before operation sese eee eee eee 4 1 4 2 Precautions for MandlinG eeii R R EE E AEEA RARS EAER EAEEREN 4 3 4 3 Installation
41. R2 detects R2 initialization request ON 5 PRELIMINARY INFORMATION MELSEC A e EEPROM function area R2 24H to 27H This area is used to initialize the EEPROM and to register call and delete the user registration frames When the EEPROM is not to be initialized or when the user registration frames are not to be registered called or deleted the transmission size R2 241 can be set to 0 1 Update timing Update direction Master station to R2 The master station data is stored in the R2 buffer memory at the following timing e Immediately after the R2 detects that the EEPROM function request signal RYn7 has turned from OFF to ON 1 EEPROM function request ON 2 EEPROM function request ON confirmed 3 User registration frame data etc Transmit after R2 detects EEPROM function request ON Master station f User registration frame area R 2 28H to 2B This area is used to store the user registration frame data after the EEPROM has been initialized or the user registration frames have been registered called or deleted with the EEPROM function area If the user registration frame state is not to be confirmed the transmission size R2 284 can be set to 0 1 Update timing Update direction R2 to master station The R2 buffer memory data is stored in the master station at the following timing e Just before the R2 turns the EEPROM function normal complete signal RXn
42. a system using R2 is explained in section 2 1 To find the master module that can use R2 and the CPU version that can use the CC Link dedicated commands Section 2 2 The master module that can use R2 and the CPU version that can use the CC Link dedicated commands are explained in section 2 2 To find the R2 specifications Chapter 3 The R2 specifications are described in Chapter 3 To find the time for transmitting receiving data with R2 Sections 3 8 3 9 The R2 transmission delay time and transmission reception time are explained in sections 3 8 and 3 9 To find the procedures for operating R2 Chapter 4 The procedures for operating the R2 and the methods of checking the module state are explained in Chapter 4 To find how to access the R2 buffer memory Sections 5 6 5 7 The methods of accessing the buffer memory are described in sections 5 6 and 5 7 To exchange data with an external device Chapter 6 The methods of exchanging data with an external device are explained in Chapter 6 To add a frame when exchanging data Chapter 7 The details of the frame and the methods of adding a frame are explained in Chapter 7 10 To find sample programs Chapter 9 Sample programs are described in Chapter 9 11 When trouble occurs Chapter 10 The error code list and troubleshooting are described in Chapter 10 How to Use This Manual is described by purposes of using CSKP Refer to the following and use this manual
43. accident even if any problem or fault should occur in the programmable logic controller device and that backup and fail safe functions are systematically provided outside of the device for any problem or fault 2 The Mitsubishi programmable logic controller has been designed and manufactured for applications in general industries etc Thus applications in which the public could be affected such as in nuclear power plants and other power plants operated by respective power companies and applications in which a special quality assurance system is required such as for Railway companies or Public service purposes shall be excluded from the programmable logic controller applications In addition applications in which human life or property that could be greatly affected such as in aircraft medical applications incineration and fuel devices manned transportation equipment for recreation and amusement and safety devices shall also be excluded from the programmable logic controller range of applications However in certain cases some applications may be possible providing the user consults their local Mitsubishi representative outlining the special requirements of the project and providing that all parties concerned agree to the special circumstances solely at the users discretion IB NA 66781 F RS 232C Interface Module Type AJ65BT R2 User s Manual verr AJ65BT R2 U E MODEL 13JL24 IB NA 66 78 1 F 07 1 1
44. and troubleshooting of the QJ61BT11N system Sold separately SH 080394E 13JR64 AnSHCPU AnACPU AnUCPU QCPU A A mode Programming Manual QJ61BT11 Dedicated Instructions IB 66251 Explains the configuration performance and specifications functions handling wiring and 13J742 troubleshooting of the QJ61BT11 system Sold separately Compliance with the EMC Low Voltage Directive When incorporating the Mitsubishi programmable controller into other machinery or equipment and keeping compliance with the EMC and low voltage directives refer to Chapter 3 EMC Directives and Low Voltage Directives of the User s Manual Hardware included with the CPU module or base unit used The CE logo is printed on the rating plate of the programmable controller indicating compliance with the EMC and low voltage directives To conform this product to the EMC Directive and Low Voltage Directive refer to the Section of CC Link Modules in Chapter 3 EMC Directive and Low Voltage Directive in the User s Manual Hardware of the CPU module used or the programmable controller CPU supplied with the base unit Using This Manual This section Using this manual describes the R2 usage in categories of purpose Refer to the following details when using this manual es 8 To find the characteristics of R2 Section 1 1 The features are described in section 1 1 To find the system configuration Section 2 1 The configuration of
45. and transmission data to be transmitted to the external device The transmission area size can be set by setting the OH and 1H buffer memories Refer to section 4 for details MELSEC A a Transmission area configuration The transmission area stores the data size to be transmitted in the head word and stores the transmission data in the second and following words Address Buffer memory R2 200x R2 2010 l Transmission area R2 3FFu At default Transmission data size designation area Transmission data designation area follows the value set in the buffer memory The transmission data size unit word byte word byte unit designation area R2 102s Designate the data size to be transmitted Sequentially stores the transmission data from the smaller addresses The data amount transmitted in one session from the programmable controller CPU to the external device must be set to be smaller than the R2 transmission data storage area size Transmission data storage area gt Data amount to be transmitted Thus if an amount of data that cannot be stored in the default transmission area is to be transmitted increase the transmission area 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 3 Designating and writing the transmission data The data to be transmitted from the programmable controller CPU to the external device is designated with the R2 buffer memory t
46. assignment The remote register RWw assignment is invalid To validate the remote register RWw assignment change the default value for the buffer memory RWw update validity designation R 2 41h e When the setting values of the 40H to 4A H have been changed always initialize the R2 with the process given in section 8 6 8 OTHER FUNCTIONS 8 6 Initializing the R2 MELSEC A The R2 must be initialized when the contents of the R2 buffer memory R2 OH to 11201 have been changed R2 initialization refers to canceling the processes currently being carried out and resetting the R2 to the startup state The R2 initialization is carried out with the sequence program R2 initialization items During the R2 initialization the following processes related to communication with the external device using the RS 232 C interface are carried out 1 2 1 2 Canceling of transmission reception process Canceling of reception area clear process Cancellation of transmission cancel process Cancellation of forced reception complete process Initialization of flow control process oon E Ww Initialization of frame transmission reception process Initialization of control signal status Initialization of OS reception area Initialization of error causes such as error LED OFF oOo ON During initialization the RX RY RW and buffer memory related to the R2 data link are not initialized
47. be converted into ASCII data and then the sum check will be calculated with the transmission data When receiving the sum check will be calculated with the reception data before binary data conversion R2 External device Buffer memory ASCII data Transmission area reception area p 1 1 4 At transmission Conversion Deen eens Se At reception 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 3 Registering reading and deleting user registration frames Before registering reading or deleting a user registration frame the EEPROM function must be designated the registration frame must be designated and the EEPROM function request signal RYn7 must be turned ON in the R2 buffer memory as shown below The items to be set for the R2 buffer memory for registering reading or deleting a user registration frame are shown below e Input output signals for registering or deleting a user registration frame EEPROM function request signal RYn7 EEPROM function execution A Registration deletion of registration frame EEPROM function normal error complete signal RXn7 RXn8 R2 buffer memory For registration R2 1COs to 1EFs x For deletion R2 14C0n to 1011 e Input output signals for reading a user registration frame EEPROM function execution EEPROM function request signal RYn7 Reading of registration frame B EEPROM function normal error
48. buffer is explained in this section 1 Flow of process The flow of the process for transmitting data to an external device using the transmission buffer is shown below Programmable controller CPU Master station R2 External device 5 Intelligent device station access complete ON Bit device 7 Intelligent device Remot station access input RX complete OFF 0 Transmission complete ON 2 Transmission complete OF Remote input RX 2 Intelligent device station access request ON 6 Intelligent device station access request OFF Remote tput RY output RY 8 Transmission request O output RY put RY L 11 Transmission request OFF Word device 1 Control data transmission data Transmission 3 Transmission data Random data buffer Trans wooed mission 9 Data reception RS 232 C S area Trans mission o When using the RIWT RISEND command the steps 2 to 7 are carried out automatically 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 2 Timing chart Intelligent device station access request RY n 1 E Intelligent device station access complete RX n 1 E Transmission request signal RYn0 Transmission normal error complete signal RXn0 RXn1 2 Programmable controller CPU Word device Master station Transmission buffer Master station
49. by the R2 to detect the timing for transmitting the data hereinafter transmission trigger at the device and status change are described below The targets of the transmission trigger that can designate transmission at the change of the device or status are shown 1 Transmission trigger by monitoring RX RY RW The R2 monitors the following user designated data in the master module on the CC Link and starts the data transmission process when the user designated transmission conditions are established 1 When RX RY changes rising edge falling edge 2 When the RW value changes from 0 to a value other than 0 2 Transmission trigger by monitoring status The R2 monitors the following status in the master module on the CC Link or the programmable controller CPU mounted on the master module and starts the data transmission process when the user designated transmission conditions are established 1 When the CC Link data link status linked stopped changes 2 When the programmable controller CPU operation status running stopped changes 3 When the programmable controller CPU status normal error changes R2 makes a judgment with the normal error access from the R2 to the programmable controller CPU 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 4 3 Setting the R2 buffer memory The items to be set for the buffer memory used when transmitting data monitor transmission at the change of the device or status are explained belo
50. carry out ASCII BIN conversion to transmit receive data as ASCII codes when exchanging data with R2 1031 conversion the external device 0 Do not carry out ASCII BIN conversion Default value 1 Carry out ASCII BIN conversion When the above buffer memory setting values have been changed initialize the R2 with the process given in section 8 6 8 OTHER FUNCTIONS MELSEC A 8 5 RW update function The RW update function assigns part of the R2 buffer memory to the remote registers RW By using this function to assign the R2 buffer memory that constantly changes to the RWr the changes can be detected at a high speed on the master station side If assigned to RWw part of the R2 buffer memory contents can be changed easily If a cause of data communication occurs between the area designated in the R2 buffer memory s RW refresh destination address designation area R2 43H to 4An and the master module s remote register RW the R2 buffer memory data will be updated automatically Master station R2 Buffer memory RWw0 43 1181 b 4 RWrO 441 1BOn fp qrbo o Refresh destination RWw1 454 1498 F 4 e designation RWr1 46 Bv LLL Lana K t Remote register RW PANE aa 1184 7 ked i 1194 10 P T Automatic gt a i update td 1BOx 4 E deer I 1T 1B1H 2 ie basen ad When a cause of automatic update occurs in 1 it is updated automatically When the RW update function i
51. corresponding to the No of points designated in the No of transmission table R2 1211 are transmitted When designating a default registration frame for the transmission table refer to section 7 5 1 When designating a user registration frame refer to section 7 5 2 External R2 device Buffer memory Transmission table head No R2 120 1 H 2 No of transmission DS R2 121 Sad i 4 3 Transmission table designation No 3 80001 1 No 4 1071 No 100 Transmission data size Transmission data R2 3FF Transmission data l EEPROM Registration frame ETX FFF1H Random data STX i No 4 section No 3 No 2 i So 14 SOH 2u STX Data stored in transmission 107 ETX FFF 1x 4AFu User registration frame 1 When designating data written into the transmission area designate 8000n 2 When R2 is the default value indicates the buffer memory address 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 1 Transmitting with a frame added Using the transmission table R2 1220 to 1851 of the No designated in the transmission table head No designation R2 1204 the frames having the No of points designated in the No of transmission table R2 1211 are transmitted The data transmission method is the same as when a frame is not added non procedural communication so refer to Chapter 6
52. data is handled as the transmission reception data in the conversion target range b If ASCII BIN conversion is designated for frame transmission or monitor transmission only the transmission data section contents of transmission area is converted into ASCII data The registration frame head frame end frame when transmitting with transmission frame 1 area is not converted into ASCII data c If ASCII BIN conversion is designated for the frame reception only the reception data section contents stored in the reception area is converted into binary data The reception head frame end frame are compared with the reception data as the registered data d If ASCII BIN conversion is designated for the non procedural transmission or monitor transmission function and the size of the binary data before conversion exceeds 4096 bytes the transmission data size error BB93n will occur e If ASCII BIN conversion is designated for frame transmission reception function and the byte size of the data including the transmission reception data after ASCII BIN conversion the head frame and end frame exceeds 4096 bytes the following errors will occur e When transmitting Transmission data size error BB93x e When receiving Reception data size over error BBA2nH 4 Setting the buffer memory When carrying out ASCII BIN conversion designate the R2 buffer memory shown below R2 buffer memory Name Details address Designate whether to
53. data size is 0 controller CPU Reception data size gt reception end data size reception end Reception data size lt reception end data size frame is set When reception end data size is 0 Pattern No 1 2 Pattern No 2 1 External Random data A Aegis side section 2 Random data section 5 ui U R2 sid lt gt lt gt SEE Reception end Interpreted as data other data size than frame and aborted 1 Pattern No 3 Pattern No 4 Random dat External pate EAR Random data section section device side R2 side lt z 7d 4 gt 4 gt Reception end data size Reception end Interpreted as data other data size than frame and aborted Pattern No 5 Pattern No 6 External Random data section Random data section device side End frame End frame R2 side Reception end data size Pattern No 7 Pattern No 8 2 y Reception start timing gt d E A External amp Y Reception complete timing device side E E Read timing uw R2 side 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A If only the reception head frame is designated the frame reception will be completed when the data size set in the reception end data size designation R2 1111 is received If both the reception head frame and reception end frame are designated the frame reception is completed when the reception end data size is reached The data until the next head frame is received is invalid
54. eee e 7 21 RS 232 C control Signal eee 8 23 Precautions for connections 0 0 4 10 Precautions for handling sese eee eee 4 3 Preliminary Information sese ee eee ee eee ee 5 1 Procedures sss sees 4 1 Procedures before operation sss eee 4 1 Process the error eee eee 5 7 Program basic Tomat sese eee ee eee ee eee 5 6 Program examples eee eee eee 9 1 R Reading and writing the buffer memory Using the buffer memory automatic update UNCON 2 ye lecdid EE hire 5 18 Using the transmission reception buffer 5 28 Reading the buffer memory Using the buffer memory automatic update FUNCHION horaro ciernie ta a 5 18 Using the transmission reception buffer 5 40 Receiving data Matters to KNOW sss sses sese sees eee ee seene eenn 6 5 Using the buffer memory automatic function Pree ME aCe SURETY CER er eer 6 14 Using the transmission reception buffer 6 24 Reception Forced reception eee 8 3 Reception area ee 5 20 6 6 Reception buffer ccsccscceeseeeeeeeeeetees 5 10 Reception TT 7 8 Arrangement sese eee sees eee eree e esse e eee eee eree 6 7 Reception frame setting the buffer memory 7 7 Registering EEPROM eee 8 18 Registering and initializing the EEPROM 8 18 Setting the buffer memory sese ee ee 8 19 Registering Tame ee eee ee eee A 12 7 22 Default registration frames 7 23 User registration frames see eee ee e 7 25 Remote Inputs eee eee eee 3 8 RAGIN D 5 6 Rem
55. environment eee ee eee eee eee 4 5 4 4 Names of each part and setiiings sese eee eee eee 4 6 AO WINING R treet ies tetanic a errata rete Tire Beatie aera terete 4 8 4 5 1 Precautions for handling the CC Link dedicated Cables sese 4 8 4 5 2 Connection of the CC Link dedicated cables sese 4 8 4 5 3 Connection with external device sss ssessesses essere ereenn 4 9 4 6 Checking the modules state Hardware test 0 sese eee 4 11 5 1 System used in this MANUAL cece cece cecedeeeeecedeceeeeedenedeeeseaeseeedaesuaedeaeseaedeaeseaedeaesaedeaesbedeaedeaetaedaedees 5 1 5 2 Programming Precautions sarana ac ite ai ei a A ee ee ee 5 3 5 2 1 About bank changing of the A series master module sees eee eee 5 3 5 2 2 About dedicated commands for use of the buffer memory automatic update function sese 5 5 5 3 Program basic tonna eninin e a a a r 5 6 5 4 Initializing the master statione sucrose aai aaa ae aada aiia 5 9 9 9 Initializing the R23 area a eA na tel dl die ade dai ee Ada ede as 5 12 5 5 1 Using the buffer memory automatic Update function 2 0 sees eee eee eee eee ee 5 12 5 5 2 Using the transmission reception buffer sees ee eee eee ee 5 15 5 6 Reading and writing the buffer memory using the buffer memory automatic update function 5 18 5 6 OUUliNE corinne ririo einai ee enaehdiiee Hane ea Rena nil eohena hea dene el 5 18 5 6 2 Understanding the roles Of each area seene 5 19 5 7 Reading and writin
56. exceed the gratis warranty term before repairs Gratis Warranty Range 1 The range shall be limited to normal use within the usage state usage methods and usage environment etc which follow the conditions and precautions etc given in the instruction manual user s manual and caution labels on the product 2 Even within the gratis warranty term repairs shall be charged for in the following cases 1 Failure occurring from inappropriate storage or handling carelessness or negligence by the user Failure caused by the user s hardware or software design 2 Failure caused by unapproved modifications etc to the product by the user 3 When the Mitsubishi product is assembled into a user s device Failure that could have been avoided if functions or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by industry standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fires or abnormal voltages and Failure caused by force majeure such as earthquakes lightning wind and water damage 6 Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi 7 Any other failure found not to be the responsibility of Mitsubishi or that admitted n
57. lines together with the communication cables or bring them close to each other Failure to do so may cause malfunctions due to noise e Always connect the master module and CC Link dedicated cable at the data link terminal block If the data link terminal block and general purpose output terminal block are incorrectly inserted module trouble could occur Ooo O O OAOA OOOO OOG OQO Ms NY Data link terminal block General purpose input output terminal block 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A The method of connecting the R2 master module and remote module with a CC Link dedicated cable is shown below Master module R2 Remote module pee ee Terminator Ww 14 ae Terminator DB TT Tt Y ve it DG bp ee z S SLD L cC Link dedicated N CC Link dedicated FG cable co cable Always connect the modules on both ends of the data link with the terminator enclosed with the master module Connect across DA DB 4 5 3 Connection with external device The method of connecting the R2 and external device with RS 232 C is show below 1 Example of connection for DC code control and DTR DSR signal control R2 side OTE External device o Cable connection and signal method Signal abbrev eomer abbrev Ae Le Sa Zo epee RS a a cs o ER 2 Example of connection for only DC code control R2 side DTE External device DTE 7 y Cable
58. mode QnACPU An example of the program for using the dedicated commands with the QCPU Q mode QnACPU when using the buffer memory automatic update function is shown below With this program it is assumed that the CC Link parameters are set as follows Module head inpuvouputno TR Remote output RY Station information Transmission outers Reception buffer size Automatic update buffer size 1536 lt GPPW parameter setting screen gt Batch refresh device When the programmable controller series is When the programmable controller series is QCPU Q mode QnACPU No of boards in module 1 Z Boards Blank no setting O boards Set by the sequence program No of boards in module 1 v Boards Blank no setting 0 boards Set by the sequence program 2 3 Sia Na perati tting ettings Haet at ol ies TEE ro Ha S cpu Allconnect count Remote output RY 100 Remote registerfR Wi L Ver 2 Remote neui S Ver 2 Remote outputfR T Ver 2 Remote reaister AWw 7 Special glau S H Retry count 3 q tation information Automatic reconnection staton cout Y PLC down select Stop Scan mode setting eS Station information setting Station information Remote device station initial setting pen f Interrupt setting lt GPPW station information setting screen gt aaae lai Exclusive station Reserve invalid Intelligent buffer select
59. n 1 B turns OFF When the writing is completed initial data read complete RX n 1 9 turns ON and the initial data read request RY n 1 9 turns OFF When these turn OFF initial data read complete RX n 1 9 turns OFF and remote station ready RX n 1 B turns ON Initial data read complete Initial data read request RY n 1 9 R2 writes initialization data to master station Initial data read complete RX n 1 9 Remote station ready RX n 1 B 3 SPECIFICATIONS MELSEC A This signal indicates the R2 error state If the R2 ERR LED is lit the error status RX n 1 A turns ON and when the ERR LED is OFF the status turns OFF When an error occurs the R2 stores the error code in the error code storage area R2 1A8x to 1B2k When the error reset request RY n 1 A is turned ON after remedying the error cause the error status RX n 1 A can be turned OFF When the initialization error complete RXn5 is ON review the R2 initial setting and turn ON the initialization request RYn4 again to reinitialize the setting When the reinitialization is completed normally and the initialization normal complete RX n 1 A Error state RXn4 turns ON the error state RX n 1 A turns OFF When the initialization error complete RXn5 is ON turning ON the error reset request RY n 1 A will not turn OFF the error state RX n 1 A Error state RX n 1 A Any error cause Error reset request RY n 1 A This signal indicates that
60. n 1 F to X100 to X11F Read R2 data link state SW0080 R2 data link normal R2 data link error 9 PROGRAM EXAMPLES R2 initialization initialization data write X11B M100 M110 M140 Ent Ea GALL W145 M140 dF CALL M140 145 J cer R2 initialization initialization execution M100 M115 M110 M114 100 Y101 Y102 103 106 Y107 Y119 r YTTA KO SET M100 M115 X104 i A SET x 105 SET M114 X104 X105 SET Data transmission Transmission data ABCDEF PLS Transmission SW M100 M115 100 X100 X101 M130 M135 M120 H SET M125 GALL H124 SET RST RST M100 X100 RST X101 Data reception M100 M115 M125 M135 X102 SET X103 M130 102 B CALL M160 1 H SET RST M100 X102 X103 Y102 mH RST RST P10 P20 M110 KO 104 P30 M130 P40 MELSEC A Set reception timeout time Set transmission timeout time Set initialization data write complete flag Set initialization request Reset initialization request Set the error occurrence flag Complete initialization Pulsate data transmission switch Set data transmission flag Set transmission data size Set transmission request Reset data transmission flag Reset transmission request Set data reception enable flag Data reception process Set reception read complete Reset reception read complete Reset data reception enable flag
61. of Terms The definitions and details of terms used in this manual are explained below 1 M OOH This indicates the buffer memory address of the master station RA Oe This indicates the buffer memory address of R2 Master station The station that controls the remote station local station and intelligent device station Intelligent device station Slave station on CC Link system that can carry out transient transmission with R2 etc Transient transmission Function that communicates data with a designated station when access is requested from the programmable controller CPU etc Buffer memory automatic update function Function that automatically updates the data between the R2 buffer memory and master stations automatic update buffer Automatic update buffer Buffer memory in master station used for the buffer memory automatic update function in respect to R2 Registration frame Row of data targeted for the fixed format section of the statement transmitted and received between the external device and R2 The registration frames include the default registration frame registered in the R2 and the user registration frame registered by the user using EEPROM Transmission frame 1 area Buffer memory address R2 118H to 119H With frame transmission that uses the transmission frame 1 area a frame can be added each to the head and end of a random data item when transmitting the data 10 Transmission frame
62. of data for transmission reception The progarmmable controller CPU side is calculated by the R2 Sum check code calculation range Calculating the sum check code This is the value obtained by adding the data in the above range as binary data The calculation method is the same as a In case of example H L 02H 10H 41H 31H ABH 12H 03H 0144H The details arrangement when transmitting receiving the corresponding sum check code if a special character code F4n to F9u is contained in the user registration frame is shown with the statements used in the example Special character code Contents during transmission reception arrangement pau Transmission reception of 01H 44H from 44H Transmission reception of 44H F7 Transmission reception of 4 4 from 4 Transmission reception of 4 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 3 Transmission reception data corresponding to FAH The user registration frame section corresponding to the special character code FAH converts the sum check code calculated using the range including the user registration frame head frame of the transmission reception data statement into a complement of 2 The low order 1 byte of the converted value is expressed as ASCII data and then transmitted received e Calculation range Refer to 2 e Calculating the sum check code This is the value obtained adding the data in the above r
63. or cable damage or malfunctioning caused by an improper cable connection Startup Maintenance Instructions A CAUTION e When power is ON do not touch the terminals Doing so can cause an electric shock or malfunction Before cleaning or tightening the terminal screws and module mounting screws be sure to shut off all phases of external power supply used by the system Failure to shut off all phases could lead to module trouble or malfunctioning Do not touch the connector inside the lid at the front of the module Failure to observe this could lead to module trouble or malfunctioning Never disassemble or modify the module Failure to observe this could lead to trouble malfunctioning injuries or fires Do not drop or apply any strong impact to the module Doing so may damage the module Before installing or removing the module on the panel be sure to shut off all phases of external power supply used by the system Failure to shut off all phases could lead to module trouble or malfunctioning Do not install remove the terminal block more than 50 times after the first use of the product IEC 61131 2 compliant Disposal Instructions A CAUTION e When disposing of the product handle it as industrial waste REVISIONS The instruction manual No is described on the lower left of the back cover of this instruction manual Date of ae ea ae o e eee Instruction manual No Revision details ears 1997
64. random data section If data with the same arrangement as the transmission head frame or transmission end frame is contained in the random data section the partner device may incorrectly recognize that data as the transmission head frame or transmission end frame 2 Setting the buffer memory The items to be set for the buffer memory used when transmitting data using the transmission frame 1 area are shown below R2 buffer memory Name Details address R2 118H R2 1194 When transmitting frames using the transmission frame 1 area designate the No of the frame for the data to be transmitted as the head frame Mehta head OH 0 No designation default value f 1H to 161H 1 to 353 Designate default registration frame 3E8H to 4AFH 1000 to 1199 Designate user registration frame When transmitting frames using the transmission frame 1 area designate the No of the frame for the data to be transmitted as the end frame Transmission end Ox 0 No designation default value frame No 1H to 161H 1 to 353 Designate default registration frame 3E8H to 4AFH 1000 to 1199 Designate user registration frame 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 2 2 Transmitting using the transmission frame 2 area Frame transmission with up to 100 frames added is possible Using the transmission table R2 1224 to 1851 of the No designated in the transmission table head No designation R2 1204 the frames
65. request RYn1 will turn OFF Transmission cancel ae request Transmission request RYn0O o sors R2 is transmitting Transmission normal complete RXn0 contents of transmission ae area to external device or Transmission error complete RXn1 Forcibly cancels transmission Transmission cancel request RYn1 RYn2 Reception read Refer to the sections on RXn2 and RXn3 complete When the forced reception complete request RYn3 turns ON reception from the external device will be forcibly completed When the forced reception is completed the reception normal read request RXn2 and reception error read request RXn3 will turn ON When these turn ON forced reception complete request RYn3 will turn OFF and reception read complete RYn2 will turn ON When the reception read complete RYn2 turns ON the reception normal read request RXn2 and reception error read request RXn3 will turn OFF When this turns OFF reception read complete RYn2 will turn OFF Forced reception complete request Forced reception complete request RYN3 Forcibly completes Reception normal read request Te reception RXn2 or Reception error read request RXn3 Receiving data Reception read complete RYn2 Reads reception area with program Initialization request Refer to the sections on RXn4 and RXn65 Os sce pun ale Refer to the section on RXn6 clear request FEPROMUnetion Refer to the sections on RXn7 and R
66. terminal layout before wiring the module Connecting with a power supply other than the rated power supply or incorrect wiring could lead to fires or trouble Tighten the terminal screws within the specified torque range A loose terminal screw could lead to short circuiting or malfunctioning If the terminal screw is too tight dropping or short circuiting could occur due to screw damage Make sure that foreign matter such as cutting chips or wire scraps do not enter the module Failure to observe this could lead to fires trouble or malfunctioning The communication cables and power supply cable connected to the module must be placed in a conduit or fixed with a clamp If the cable is not placed in a conduit or fixed with a clamp the module or cable could be damaged by the cable variation movement or unintentional pulling leading to malfunctioning caused by an improper cable connection Do not install the control lines together with the communication cables or bring them close to each other Failure to do so may cause malfunctions due to noise Do not remove the communication cable or power supply cable connected to the module by pulling on the cable section If the cable has a connector hold the connector at the section connected to the module and remove If the cable does not have a connector loosen the screws at the section connected to the module and remove Pulling on the cable while connected to the module could lead to module
67. the Q series LS 51 2 27 8 x 4 8 8 x 9 6 1 x 30 1 x 4 8 1 x 9 6 1300 0 0 10854us 10 9 ms Data transmission time 20 x 10 9600 0 0208s 20 8ms Transmission time 20 x 2 10 9 x 2 10 9 x 2 20 8 1 10 9 x 6 10 16 16 x 1 067 84 4 89 6606 174 0606 174 1ms 1 R2 R2 internal processing time 2 Data transmission time 3 Transient transmission time 10 words worth 3 SPECIFICATIONS MELSEC A MEMO 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 4 PROCEDURES AND SETTINGS BEFORE OPERATION The operation procedures before starting the R2 operation names and settings of each R2 section wiring method and hardware test are described in this section 4 1 Procedures before operation The procedures before operating the R2 are explained below Y Test the R2 hardware 1 Refer to section 4 6 Hardware test normal Y Test the master module hardware j Hardware test normal Y Connect the master module and module such as the R2 with a CC Link Refer to section 4 5 dedicated cable Connect the R2 and external device with an RS 232 C cable Set each switch on the master module When using the AJ61BT11 or A1SJ61BT11 set SW8 of the condition setting Refer to master module manual switch OFF intelligent mode Set each switch on the R2 E Refer to section 4 4 Y Turn the power ON in the order of the exte
68. the R2 may not detect the transmission trigger If the monitor transmission process and other transmission process non procedural transmission frame transmission are overlapped the R2 will transmit the transmission data in order of transmission process generation Example If a monitor transmission trigger is generated while the R2 is carrying out non procedural transmission frame transmission the monitor transmission will be carried out after the non procedural transmission frame transmission process is completed If multiple monitor transmission triggers occur simultaneously the monitor transmission will be carried out in order of transmission trigger detection 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 5 Registration frames The registration frames include the default registration frames preregistered in the R2 and the user registration frames registered by the user Registration Frame type Outline gl 1 Frame contents Reference frame No The data for codes 01H to FEn 01H to FEH N C T i 1 to 254 corresponding to the registration Default Frame preregistered in R2 No is registered as one byte registration The contents of the frame cannot The arrangement of the data Section 7 5 1 frame be changed 100H to 161H handled by the external device 256 to 353 Jand data assuming special characters are registered e Frame in which random character string is registered by user into R2 EEPROM s Up
69. the R2 can operate Refer to the section for RX n 1 9 ON The R2 is in the operatable state and the initial data read request RY n 1 9 RX n 1 B Remote station ready is OFF An R2 initialization error occurred R2 buffer memory setting value error or when the initial data read request RY n 1 9 is turned ON This signal indicates the R2 access complete state in response to the intelligent device station access request RY n 1 E If not using dedicated commands and directly reading writing from the programmable controller CPU to the master station buffer memory when accessing to the R2 is completed the R2 will turn intelligent device station access complete RX n 1 E ON Intelligent device With this signal the intelligent device station access request RY n 1 E will turn OFF RX n 1 E station access complete Intelligent device station access request Rd Ca Access to the intelligent device station Intelligent device station access complete RX n 1 E 3 SPECIFICATIONS MELSEC A 2 Remote output RY Refer to the sections on RXn0 and RXn1 To cancel the transmission after requesting transmission from R2 the transmission will be canceled when the transmission cancel request RYn1 turns ON When the transmission is forcibly canceled the transmission normal complete RXn0 or transmission error complete RXn1 will turn ON When these turn ON the transmission request RYn0O and transmission cancel
70. the control data size and the reception buffer master module buffer memory for the read data size are used The data designated with the transmission buffer is read from the R2 buffer memory using the intelligent device station access request signal and complete signal RY n 1 E and RX n 1 E Example Reading the error information Address Master module l Transmission buffer 1 QnA Series A Series Re M 10004 Bank 1 M On Dummy area M 10014 Bank 1 M 14 Station No request code M 10024 Bank 1 MI 2 Transmission buffer write data size byte _______ M 10034 Bank 1 M 34 Control Quantity zE data eee M 1004 Bank 1 M 4x Access code attribute M 10054 Bank 1 M 5x Buffer memory address M 10064 Bank 1 MJ 6n No of write points word Reception buffer 2 M 1200 Bank 1 2001 Complete status ri Control T M 12014 Bank 1 2014 data Station No request code M 12024 Bank 1 M 2024 No of read data byte Address r 1A8H l M 12034 Bank 1 M 203 Error code history Error code history storage Se re aera P Tat OH seca area M 1204 Bank 1 M 2044 TOE COOG STONY 149 Read data Ct IIE a HHT pen Peon T TT H I peor ce de during transmission M 12124 Bank1 2124 Error code during transmission 1B1H ege yeu eee M 12134 Bank 1 M 2134 Error code during reception 1B24 Error code during reception rte ht storage ar
71. the master station is the Q series LS 51 2 27 8 x 4 8 8 x 9 6 1 x 30 1 x 4 8 1 x 9 6 1300 0 0 10854us 10 9ms Data reception time 20 x 10 9600 0 0208s 20 8ms Reception time 20 10 9 x 2 10 9 x 2 20 8 32 16 16 x 10 9 512 16 16 x 10 9 4 84 4 3 x 10 9 33 x 10 9 476 8ms 1 RS R2 internal processing time 2 Data transmission time 3 Status storage area request response scan 20H 32 words worth 4 Reception area request response scan 200H 512 words worth 3 SPECIFICATIONS MELSEC A 3 9 2 When using transmission reception buffer The transmission time is the time from when the transmission data is stored in the R2 the transmission request RYn0 is turned ON to when the transmission normal complete RXn0 is turned ON by the R2 The reception time is the time from when the R2 starts receiving the data the reception normal read request RXn2 and reception error read request RXn3 are turned ON by the R2 to when the data is received 1 Calculation expression Details Calculation expression unit ms SM 2 LS x 6 RS data transmission time transient __ Transmission time gC Pats a When the master station transmission time is the A QnA Series SM LS x 3 RS data reception time 4 transient transmission Reception time time 2 SM 2 LS x 4 RS data transmission time transient _ Transmission time ee See When the m
72. to 200 frames can be registered User registration frame 3E8H to 4AFH Random character string 1 to 1000 to 1199 80 bytes designated by user Section 7 5 2 s The contents of the frame can be changed Note that this is not the R2 buffer memory address 7 USING FRAMES WHEN EXCHANGING DATA 7 5 1 List of default registration frames MELSEC A The default registration frames are frames preregistered in the R2 The No of the default registration frame and the contents of the data during transmission reception are shown below Default registration ee No Hexadecimal Decimal No of registered bytes Frame contents during transmission reception Remarks ow o T E 1 to 1H to FEH Same data 1 to FEx as registration frame No For example registration No 2 is data STX 02 Use aa coe a oO FFu 1 byte The actually registered value is the special character FFH and FFn jp foam 266 T oa o e ote ex SSS 1054 21 2 Joone E S E oon 00m FE ETX sum vane FFF 1n 108 264 5 ETX sum check FFF 1 CR LF 109H to 265 to ne STX 0 09 STX 0 0 S ETX STX 0 0 D STX 0 0 E 1304 304 4 TS miade a ESC A 0 CR 2600 Series DENSEILAMBDA STX E R TLMS 3500RV TOHKEN ESC A 1 CR to _ aoa 4 STX CAN CRLF DSSOAF IDEC DATALOGIC 620 OMRON Tso ste e fe i
73. 0 to X11F and the contents of Y100 to Y11F are written into RYnO to RY n 1 F and used Programmable controler CPU Master station ei R2 a Remote input RX l H Device X Address Remote input RX X100 to X10F E0 RXn0 to RXnF RXn0 to RXnF X110 to X11F Elu RX n 1 0 to RX n 1 F RX n 1 0 to RX n 1 F Device Y Remote output RY Remote output RY Y100 to Y10F 1601 RYnO to RYnF RYn0 to RYnNF Y110 to Y11F 1611 RY n 1 0 to RY n 1 F RY n 1 0 to RY n 1 F 5 PRELIMINARY INFORMATION MELSEC A 3 Master station buffer memory settings buffer memory size Transmission buffer Reception buffer Automate update buffer When using the buffer memory Ou Gi 6004 automatic update function Wnenusing the r 2001 2001 0 transmission reception buffer 4 R2 buffer memory setting The R2 buffer memory is used with the factory set state default values 5 PRELIMINARY INFORMATION MELSEC A 5 2 Programming Precautions 5 2 1 About bank changing of the A series master module When using the R2 the master station s automatic update buffer or transmission reception buffer is used With the A Series master module AJ61BT11 A1SJ61BT11 the automatic update buffer and transmission reception buffer are divided with banks When accessing these buffers the bank must be changed When using dedicated commands RITO RIFR RIRD RIWT RISEND RIRCV the bank is changed with the dedicated c
74. 00H to 2FFFH A 1 The data to be stored in the R2 buffer memory is written into the master station s automatic update buffer 2 The data is automatically written in at the R2 timing 3 The data is automatically read at the R2 timing 4 The corresponding master station s buffer memory is read to the data in the R2 buffer memory to be read out 1 OUTLINE MELSEC A 2 Addition of frame during data transmission reception with external device By adding a frame to the head and end a statement format matching the specifications of the external device such as the barcode reader or ID controller can be created and communicated The frames include those that are set as the default and the frames that can be randomly created by the user user registration frame A random frame can be added Random data Data transmission 4 Random data Data reception External device such as barcode reader ID controller general purpose personal computer 3 Automatic transmission possible when user set transmission conditions are established When the user designated transmission conditions changes in RX RY RW etc are established data can be automatically transmitted to the external device gt Master station Monitors the status of RX RY and RW etc Final frame Head frame Random data gt Transmit data after conditions are established External device such as barcode reader ID co
75. 1 11 1 420 11 1x 2 11 1 ae at 149 6 20 11 1 11 1 11 1 20 22 24 11 1 11 1 11 1 149 6 128 8 278 4ms 2 When the master station is the Q series LS 51 2 27 8 x 4 8 8 x 9 6 1 x 30 1 x 4 8 1 x 9 6 1300 0 0 10854us 10 9 ms Data transmission time 20 x 10 9600 0 0208s 20 8ms Transmission time 20 x 2 10 9 x 4 10 9 x 2 20 8 1 10 9 x 6 11 16 72 x 1 13 126 2 78 717 204 917 205 0ms 1 R2 R2 internal processing time 2 Data transmission time 3 Transient transmission time 10 words 1 word transmission data size worth 3 SPECIFICATIONS b MELSEC A Reception time An example for calculating the reception time when receiving 10 words 20 bytes of data is shown below Setting details 156kbps No of connected modules Only one R2 module Master station sequence program scan time 20ms Hypothetical Transmission speed 9600bps Data bit length Stop bit length Parity bit 1 When the master station is the A QnA series LS 51 2 29 4 8 x 4 8 8 x 9 6 1 x 32 4 1 x 4 8 1 x 9 6 1300 11100us 11 1ms Data reception time 20 x 10 9600 0 0208s 20 8ms Reception time 20 11 1 x3 11 1 x 2 20 8 20 11 1 11 1 11 1 20 11 1x2 10 16 16 x 11 1 11 1 11 1 x 1 8 96 3 20 11 1 11 1 11 1 20 22 2 11 1 11 1 96 3 139 9 236 2ms 2 When the master station is
76. 1 1 305ms 2 When the master station is the Q series LS 51 2 27 8 x 4 8 8 x 9 6 1 x 30 1 x 4 8 1 x 9 6 1300 0 0 10854us 10 9ms Data transmission time 20 x 10 9600 0 0208s 20 8ms Transmission time 20 x 2 10 9 x 4 10 9 x 2 T 20 8 136 16 72 x 10 9 9 512 16 72 x 10 9 4 32 16 16 x 10 9 126 2 3 x 10 9 8 x 10 9 3 x 10 9 278 8ms 1 R2 R2 internal processing time 2 Data transmission time 3 Transmission area 1 request response scan 88H 136 words worth 4 Transmission area 2 request response scan 200H 512 words worth Status storage area request response scan 20H 32 words worth 3 SPECIFICATIONS b MELSEC A Reception time An example for calculating the reception time when receiving 10 words 20 bytes of data is shown below Setting details Default value Transmission speed 156kbps No of connected modules Only one R2 module Master station sequence program scan time 20ms Hypothetical 9600bps Data bit length Stop bit length Parity bit 1 When the master station is the A QnA series LS 51 2 29 4 8 x 4 8 8 x 9 6 1 x 32 4 1 x 4 8 1 x 9 6 1300 11100ps 11 1ms Data reception time 20 x 10 9600 0 0208s 20 8ms Reception time 20 11 1 x 3 11 1 x 2 20 8 32 16 16 x 11 1 3 512 16 16 x 11 1 4 96 3 3 x 11 1 33 x 11 1 495 9ms 2 When
77. 1 and A1SJ61QBT11 use the one that has the following number 9707 B or later in the DATE field of the rating plate The module that does not have 9707 B in the DATE field cannot use the R2 lt Large type gt MEESEC ce lt Compact type gt MITSUBISHI PROGRAMMABLE CONTROLLER i _ MODEL 80992D01JHO1 DATE 9707 B A ureusda ELECTRIC CORPORATION JAPAN ade MITSUBISHI ELECTRIC 80992D008H3B Date of Function version Date of Function version manufacture manufacture 2 Restrictions on use of CC Link dedicated commands Depending on the used programmable controller CPU and master module the CC Link dedicated commands may be unusable For details of the restrictions refer to the A Series Master Module User s Manual Details and ANSHCPU AnACPU AnUCPU Programming Manual Dedicated Instructions For program examples using the dedicated commands refer to Section 9 2 2 Section 9 2 3 Section 9 3 2 and Section 9 3 3 3 SPECIFICATIONS MELSEC A 3 SPECIFICATIONS 3 1 General specifications The general specifications of the R2 are shown below Specifications Working ambient o 0 to 55 C temperature Storage ambient o 20 to 75 C 3 temperature Working ambient humidity 10 to 90 RH with no dew condensation Storage ambient humidity 10 to 90 RH with no dew condensation Amplitude When there is 10 to 57Hz 2 10 times each in 57 to 150Hz 9 8m s Vibration resistance X Y and Z 10 to 57Hz i 0 035mm
78. 103 X105 X108 M135 LEDA SUB RIFR HO K1 H400 D200 K LEDR Y102 Y102 M130 M135 RIFR HO MELSEC A Dedicated command RIFR Master station head lO No Read designation station No Read destination buffer memory address R2 Read data No of read point Dedicated command RIFR Master station head I O No Read designation station No Read destination buffer memory address R2 Read data No of read point Set reception read complete Reset reception read complete Reset data reception enable flag Set the error occurrence flag Dedicated command RIFR Master station head I O No 9 PROGRAM EXAMPLES PO SUB Ki SUB H1B LEDC D10 SUB K3 LEDR SE vol Error LED RST W135 M100 x105 X23 XT1A RS RS SE YHA Reset SW YUIA XITA RS Y1T1A Writ t tput RY Y100 to Y11F RS a rite remote outpu 0 Error LED XO XOF XI CALL PO T0 HO H160 K4 100 K2 FEND M9036 SET M9052 RST Y1C RST Y1D SEG MR K4Bi RET END MELSEC A Read designation station No Read destination buffer memory address R2 Read data No of read point Turn ON error LED Reset error occurrence flag Error reset request Error reset complete Turn OFF error LED Change to bank 0 Write Y100 to Y11F in RYnO to RY n 1 gt Change to bank 0 9 PROGRAM EXAMPLES MELSEC A 9 2 3 When using dedicated commands with QCPU Q
79. 14H to 17H 18H to 1BH This area is used to store the data transmitted to the external device from the master station to the R2 When using a reading dedicated device such as a barcode reader the data does not need to be transmitted so the transmission size R2 14H 18H can be set to 0 The default transmission size is 200H so the transmission side can be reduced by setting it according to the No of words being used 1 Update timing Update direction Master station to R2 The master station data is stored in the R2 buffer memory at the following timing e Just after the R2 detects that the transmission request signal RYn0 has turned from OFF to ON 1 Transmission request ON 3 Transmission data Transmit after R2 detects transmis sion request ON 2 Transmission request ON confirmed Chr SS iS R2 External device such as ID controller G Qam Master station c Reception area R2 1Cn to 1FH This area is used to store the data received by the R2 from an external device to the master station When writing with an ID controller etc and there is no need to receive data the transmission size R2 1Cu can be set to 0 The default transmission size is 2000 so the transmission side can be reduced by setting it according to the No of words being used 1 Update timing Update direction R2 to Master station The master station data is stored in the R2 buffer memory at th
80. 15 M110 M114 100 Y101 Y102 Y103 Y106 Y107 Y119 YHA Y119 Y119 M104 M105 M104 P2 KI KI KI Kl Ki KI Ki KI Kt K Ki K K1 Ki PO M110 0 MELSEC A Set initial data read request Reset initial data read request Complete initialization Change to bank 2 Set R2 transmission area size to 1001 Set R2 reception area head address to 300H Set R2 transmission area size to 1001 Set transmission area 2 transmission size to 1001 Set transmission area 2 M station head address to 1C0H Set reception area trans mission size to 100 Set R2 reception area head address to 300x Set reception area M station head address to 2COH Set EEPROM function area transmission size to 0 Set user registration frame area transmission size to 0 Set monitor transmission area 1 transmission size to 0 Set monitor transmission area 2 transmission size to 0 Set reception timeout time to 2 sec Set transmission timeout time to 2 sec Change to bank 0 Set initialization data write complete flag 9 PROGRAM EXAMPLES KQ Sp er M115 X104 RST SET M114 X104 X105 SET Data transmission Transmission data ABCDEF X22 PLS Transmission SW M115 100 X100 X101 M120 bt A O AA ___ SE M125 Woy KB Mov H424 Mov H4443 Mov H4645 CALL TO HO HG0 D100 CALL SET RST x100 RST x101 pata reception SET ers
81. 2 Changeover execution SET M9052 RST Y1C SET Y1D SEG K4Y18 K4B1 MELSEC A Specify partial refresh fes bank 0 Execute partial refresh Specify partial refresh l bank 1 Execute partial refresh Specify partial refresh faes bank 2 Execute partial refresh 5 PRELIMINARY INFORMATION MELSEC A 5 2 2 About dedicated commands for use of the buffer memory automatic update function When the buffer memory automatic update function is used the R2 buffer memory to be specified differs as described below between when the FROM TO command is used and when the dedicated command is used 1 When the FROM TO command is used Specify the buffer memory address of the master station where the buffer memory of the R2 to be accessed is assigned 2 When the dedicated command is used Since the station number of the R2 to be accessed can be set specify the buffer memory of the R2 directly Example When automatic update has been set as described below the contents of the status storage area R2 1A0n of station No 2 are to be read When the FROM TO command is used Specify the buffer memory address of the master station e When the master station is the A series 560H of bank 2 e When the master station is the Q QnA series 2560H When the dedicated command is used Specify the station number 2 and buffer memory address R2 1A0n of the R2 f l Master station buffer memory past
82. 2 D193 D194 D195 D196 KI TIIE M158 NRB XNE H RST YHE SET 4159 M59 XNE SET W160 E KO D200 RST M158 RST M155 NO H203 D201 MELSEC A Change to bank 1 Set dummy area Set station No request code Transmission buffer write data size Quantity Fixed Access code attribute Fixed R2 buffer memory address Reception area Reception data size Write reception data size read request Change to bank 0 Set intelligent device station access request Reset intelligent device station access request Data read complete Set reception data size inZ Change to bank 1 Read reception data Change to bank 0 9 PROGRAM EXAMPLES P50 8 Program for reading error codes M132 X11 M132 XIE M133 XIE MOV MOV MOV MOV MOV MOV MOV TO HO HO FROM HO H203 CALL KU H110 K8 Ki n H180 K3 D40 CALL SET SET RST SET SET RST RST CALL D10 CALL D40 D41 D42 D43 D44 D45 D46 K7 PO Y11E M132 Y11E M133 M134 M133 M132 P1 K3 PO RET END MELSEC A Change to bank 1 Set dummy area Set station No request code Transmission buffer write data size Quantity Fixed Access code attribute Access destination R2 buffer memory address No of read points Write to transmission buffer Change to bank 0 Set intelligent device station access re
83. 2 area Buffer memory address R2 120H to 185n With frame transmission that uses the transmission frame 2 area up to 100 frames can be added when transmitting the data 1 OUTLINE MELSEC A 1 OUTLINE This User s Manual explains the features and specifications of the R2 used as the intelligent device station of the CC Link communication with an external device and the special specifications etc R2 can exchange data with an external device such as an RS 232 C connection type barcode reader ID controller or general purpose personal computer s When a barcode reader is connected yee Programmable controller Master station R2 1 OUTLINE MELSEC A 1 1 Features 1 Easy communication by using the buffer memory automatic update function This function automatically updates the buffer memory between the R2 and master station at the timing set in R2 With this a program to read and write between the R2 and master station can be eliminated As the data can be read and written with just the FROM TO command the program is simplified This can be used with all CPUs lt Carried out with sequence program Programable controller CPU Master station qa Automatically updated y R2 1 2 e H gt Buffer memory mE Automatic Buffer update memory FROM H lt a buffer 1 4 1 The address differs as shown below for the A Series and Q QnA Series A Series Bank 2 M 0H to FFFH Q QnA Series M 20
84. 2 x103 Y102 RST Y102 RST M130 MELSEC A Read R2 data link state SW0080 R2 data link normal R2 data link error Set reception timeout time Set transmission timeout time Set initialization data write complete flag Set initialization request Reset initialization request Set the error occurrence flag Complete initialization Set data transmission flag Set transmission data Set transmission request Reset data transmission flag Reset transmission request Set data reception enable flag Data reception process read data size Data reception process read data Set reception read complete Reset reception read complete Reset data reception enable flag 9 PROGRAM EXAMPLES R2 error processing M135 P50 YO Error LED M135 YA YA Y91 Error LED D50 K8Y100 M100 x101 1 SET X103 m X105 A x108 W125 M130 M135 CALL M190 1 SET a M100 X105 X23 X114 F 1 H SET Reset SW Y11A X114 RST RST RoW o E 2 a a a Oe 1 DFRO H0 H160 D50 DAND H0C0000000 DOR K3Y100 D50 MELSEC A Set the error occurrence flag Read error code Turn ON error LED Reset error occurrence flag Error reset request Error reset complete Turn OFF error LED Read latest RY information Retrieve RY n 1 E RY n 1 F state Set latest RY n 1 E RY n 1 state The program area enclosed by the dotted line is not requi
85. 30 Write 0 in 1C0x to register default value is 4 Kl B30 Ki SET Y107 Set EEPROM function request RYn7 Reset EEPROM function RST Yt07 l request RYn7 X108 8 9 Controlling the RS 232 C signal The status of the RS 232 C interface signals stored in the R2 buffer memory can be read and the output controlled This is carried out with the remote input remote output RX RY 8 9 1 Correspondence of RS 232 C control signal and remote input output signal The correspondence of the RS 232 C interface control signals and the remote input output signals RX RY is shown below Remote input output RS 232 C control Details signal signal CS CTS signal _ The ON OFF state of the input control signal DR DSR signal jis reflected on the corresponding remote input CD signal signal RXn9 to RXnB RS RTS signal The ON OFF state of the remote output signal Output signal l is reflected on the corresponding control RYnA ER DTR signal signal output The area between the RS 232 C control signal and input output signal RX RY is updated every 100ms Refer to section 3 3 for details on each RS 232 C signal 8 OTHER FUNCTIONS MELSEC A 8 9 2 Precautions for using RS 232 C control signal read write function The precautions for reading the control signal status and controlling the output are given below 1 Controlling the RS RTS signal with RYn9 Designate the RS RTS signal status designation R2 1011 t
86. 32 C reception overrun error RS 232 C framing error RS 232 C reception parity error OS reception area overflow error A timeout occurred when using the buffer memory automatic update function A transmission timeout occurred A reception timeout occurred An overrun error occurred during RS 232 C reception A framing error occurred during RS 232 C reception A parity error occurred during RS 232 C reception The OS reception area overflowed 10 2 Increase the transient timeout time designation R2 1051 Correct the flow control state flow control designation R2 1001 and external device flow control designation Check the RS 232 C cable wiring Increase the transmission timeout time designation R2 11Ax value Correct the flow control state flow control designation R2 100 and external device flow control designation Check the RS 232 C cable wiring Increase the reception timeout time designation R2 112n value Decrease the reception end data size designation R2 1111 designated value Decrease the transmission speed Noise may be the cause Correct the specifications for the R2 and external device transmission Noise may be the cause Correct the specifications for the R2 and external device transmission Noise may be the cause Carry out flow control with the external device Correct the flow control designation R2 100x and external device f
87. 3BFH 3COnto 55FH 4D8 to BREL 560xto 57Fx 580xto 67Fx 680xto 77FH 780uto 91FH 898xto 91FH 9201 to 93FH 9401 to A3Fu A40uto B3Fu Master station buffer memory Automatic update buffer bank 2 Initialization area Transmission area 1 Status storage area Transmission area 2 Reception area Initialization area Transmission area 1 Status storage area Transmission area 2 Reception area Initialization area Transmission area 1 Status storage area Transmission area 2 Reception area R2 buffer memory 1st station Initialization area 1A0x worth Transmission area 1 884 worth Status storage area 20x worth Transmission area 2 1000 worth Reception area 100 worth R2 buffer memory 2nd station Initialization area 1A0 worth Transmission area 1 884 worth Status storage area 20 worth Transmission area 2 100 worth Reception area 100 worth R2 buffer memory 3rd station Initialization area 1A0x worth R2 Onto 19FH R2 118xto 19FH R2 1A0n to 1BFH R2 200u to 2FFu R2 300x to 3FFH R2 Onto 19FH R2 118xto 19FH R2 1A0x to 1BFH R2 200n to 2FFu R2 300u to 3FFH R2 Onto 19FH Transmission area 1 884 worth Status storage area 20x worth Transmission area 2 1004 worth Reception area 100 worth R2 1181to 19FH R2 1A0n to 1BFH R2 200u to 2FFu R2 300u to 3FFH 9 P
88. 42 CALL D300 D300 D301 140 M127 140 M132 KOZ bd bi Lot bi MELSEC A Set initialization request Reset initialization request Set the error occurrence flag Complete initialization Pulsate data transmission switch Set data transmission flag Set transmission data size Set transmission data 41H 421 Set transmission data 43H 441 Set transmission data 45H 46H Change to bank 2 Store transmission data in automatic update buffer Change to bank 0 Set transmission request Reset data transmission flag Reset transmission request Set data transmission enable flag Change to bank 2 Read reception data size Store reception data size in Z Store data received from D301 9 PROGRAM EXAMPLES PU Y142 Y142 M132 M137 P2 K3 PQ Y95 Error LED M137 TIBA Y15A Y95 Error LED CALL SET X142 X143 Y142 RST l RST R2 error processing X141 SET X143 HH H X145 HH H X148 M137 CALL Kl FRO HO H930 D16 Kl DALL SET RST X145 X27 X15A J a cer Reset SW Y15A X15A E RsT RST J rer _ _ END MELSEC A Change to bank 0 Set reception read complete Reset reception read complete Reset data reception enable flag Set the error occurrence flag Change to bank 2 Store error code in D16 to D18 Change to bank 0 Turn ON error LED R
89. 7 EEPROM function error complete signal RXn8 ON 2 EEPROM function normal error complete ON 1 User registration frame data Transmit just before EEPROM function normal error complete turns ON Master station 5 PRELIMINARY INFORMATION MELSEC A g Monitor transmission area R 2 2CH to 2Fx 30H to 33H This area is used to store the data transmitted from the external device using the monitor transmission function from the master station to R2 When not using the monitor transmission function the transmission size R2 2Cu 30H can be set to 0 The default transmission size is 200p so the transmission size can be reduced by setting it according to the No of words being used 1 Update timing Update direction Master station to R2 The master station data is stored in the R2 buffer memory at the following timing e Just after the conditions are established in the monitor transmission function 1 Monitor conditions established DA 3 Transmissio SS a External device such as ID controller detects monitor condition establishment 5 PRELIMINARY INFORMATION MELSEC A 2 Buffer memory for setting each area The buffer memories used to set each area s information transmission size head address master side head offset address are shown below Area name Transmission R2 side head E Master station side 2 Fixed value size address offset address Transmissio
90. E SW RESET ROO 12345878 Sf aio IT MITSUBISHI WIELSECAseset R2 Y eel 71 80 RS 232 C vo JE Ld r 4 5 161 gt 170 Unit mm lw gt Appendix Appendix 1 APPENDIX MELSEC A MEMO Appendix 2 INDEX A Applicable systems cccsccesceeeteesees 2 2 Area Buffer Memory asses eee sees eee ee serere ereer eee 5 24 EEPROM function area sss see eee eee 5 22 Initialization area eee eee eee 5 21 Monitor transmission area eee eee 5 23 Reception area eee eee 5 20 Role 1 cd 0 dO 2 CTR OR 2029 L R led 5 19 Status Storage area eee eee eee 5 19 Transmission areg eee ee eee 5 20 User registration area ee eee ee ee 5 22 ASCII BIN Conversion sese eee eee 8 9 PreGautions 320 28 itech a 8 10 Setting the buffer memory eee eee 8 10 Automatic update buffer A 12 5 11 Auxiliary functions sse ee ee eee eee 3 6 B Bank changing eee eee eee eee 5 3 Buffer memory automatic update function A 12 FOatures sees eee eee eee 1 2 Initializing aceite aie ie Aled 5 12 Reading and writing the buffer memory 5 18 Reception data 6 14 Transmission data 6 9 Buffer memory ISL sees eee eee 3 13 C Checking the modules state eee 4 11 Cleaning the OS reception area e 8 15 Confirm Software version cccccececeeeseeeeeeees 8 23 Swi
91. ELIMINARY INFORMATION MELSEC A 4 When using the RIRD command This is used only when reading to the R2 designated buffer memory When the RIRD command is used the master station buffer memory is used for the control data size transmission buffer and the master station buffer memory is used for the read data size reception buffer Example Programmable controller CPU Refer to control data a To read error code during transmission and during reception Master module Transmission buffer R2 Address 1000n to 11FFu of Q QnA Series On to 1FFH of A Series bank 1 Address Q QnA Series A Series 12004 Bank 1 M 200s _ 12014 Bank 1 M 2014 12024 Bank 1 M 2024 Error code during transmission M 1203 Bank 1 M 2034 Read data lora a E sec sence teste see ee hese Error code during reception M 12044 Bank 1 M 2044 a Control data Reception buffer Complete status No of read data byte Address Error code during transmission 1B1H storage area Error code during reception 1B2 storage area Read data Note that the control data differs between the QCPU Q mode QnACPU and ACPU QCPU A A mode as shown below When using ACPU QCPU A A mode Control data Complete status One word No of read points word each Access code attribute Buffer memory address When using QCPU Q mode QnACPU Control data
92. ESET L ERR O L207 ON Q a SOE mnf O 0 89 L RS 232 C vo 5 7 ot JE RS 232 C SDO RDO ERRO XC O XD O YC L YDO ON Power is ON PW state L RUN ON Operating normally OFF Power 24VDC is OFF WDT error is occurring or ON Communicating normally OFF Communication stopped Time over error or the Details OFF Power is OFF the switch setting is incorrect switch setting is incorrect ON Any transmission speed or station number out of range is set Flickering at constant intervals The transmission speed or station number has been changed after the power is turned on Flickering not constant intervals The terminating resistor is not connected The module or CC Link dedicated cable is being affected by noise OFF Communicating normally ON Flashing Data link Sending data State L ERR SD OFF Data link Not sending data Others ON Flashing Data link Receiving data OFF Data link Not receiving data XC XD ON General purpose input XC XD is ON 9 OFF General purpose input XC XD is OFF Yc YD ON General purpose output YC YD is ON i OFF General purpose output YC YD is OFF ON Flashing Sending RS 232 C data RS 232 C SD OFF Not sending RS 232 C data ON Flashing Receiving RS 232 C data RS 232 C RD OFF Not receiving RS 232 C data or ON RS 232 C transmission error OFF No error 4 6 4 PROCEDURES AND SETTING
93. EXAMPLES 5 Program for setting transmission data M9036 P30 MOV M MOV H4 MOV H200 MOV K3 6 Program for reading reception data size M9036 P40 MOV Ki MOV H4 MOV H400 LEDA SUB SUB LEDC LEDC D97 D98 D99 D100 D101 D102 D103 RIWT HO KI D96 M124 LEDR D191 D192 D193 RIRD HO H1 D190 M155 LEDR MELSEC A No of write points Access code attribute R2 buffer memory address Set transmission data size Set transmission data 41H 42H Set transmission data 43H ddu Set transmission data 45u 461 Dedicated command RIWT Master station head I O No Access destination station No Write data Device to turn one scan ON at completion No of read points Access code attribute R2 buffer memory address Dedicated command RIRD Master station head I O No Access destination station No Read data Device to turn one scan ON at completion 9 PROGRAM EXAMPLES 7 Program for reading reception data M9036 P41 MOV D194 D198 MOV H4 D199 MOV H401 D200 8 Program for reading error codes M9036 P50 MOV K3 D41 MOV H4 D42 MOV H1B0 D43 LEDA RIRD SUB HO SUB Ki MELSEC A No of read points Access code attribute R2 buffer memory address Dedicated command RIRD Master station head I O No Access destination station No Read data Device to turn one scan ON at completi
94. F3 D ODH MOV HOA D25 Registration data 3 OAH 7 USING FRAMES WHEN EXCHANGING DATA CALL TO HO HIC D22 CALL SET X107 RST X108 1 Program for changing to bank 0 2 Program for changing to bank 2 P2 K4 PO Y107 Y107 MELSEC A Change to bank 2 Write setting value to R2 Change to bank 0 Set EEPROM function request signal RYn7 Reset EEPROM function request signal RYn7 Specify partial refresh Specify bank 0 Execute partial refresh Specify partial refresh Specify bank 2 Execute partial refresh 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A b When using the dedicated command with the QCPU Q mode QnACPU Registration execution MOV KI MOV H3E8 G RITO UO K1 Hico D20 MOV K5 MOV HOFFO3 MOV HODF3 MoV HOA G RITO U0 Ki Hic D22 SET X107 RST X108 D20 D21 D22 D23 D24 D25 Yt07 Y107 EEPROM function designation 1 No of user registration frame to be registered 3E8H Write setting value to R2 Number of bytes of data to be registered 5 Registration data 1 03H FFH Registration data 2 F3H ODH Registration data 3 OAH Write setting value to R2 Set EEPROM function request signal RYN7 Reset EEPROM function request signal RYn7 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A MEMO 8 OTHER FUNCTIONS MELSEC A 8 OTHER FUNCTIONS R2 and functions special functions other than data communicat
95. Flow of process When setting the initialization data using the buffer memory automatic update function refer to section 5 5 1 2 When using the transmission reception buffer to set the initialization data refer to section 5 5 2 2 Timing chart When setting the initialization data using the buffer memory automatic update function refer to section 5 5 1 3 When using the transmission reception buffer to set the initialization data refer to section 5 5 2 3 Program When setting the initialization data using the buffer memory automatic update function refer to section 5 5 1 4 When using the transmission reception buffer to set the initialization data refer to section 5 5 2 4 8 OTHER FUNCTIONS MELSEC A 8 7 Clearing the OS reception area This function is used to initialize the OS reception area in the R2 When the OS reception area clear request signal RYn6 is turned OFF by the sequence program the R2 OS reception area will be initialized 1 OS reception area a b The OS reception area is the OS area used by the R2 to temporarily store the reception data 1 Data received before a request for reading out receive data to the programmable controller CPU is generated by the user set reception end data size and reception end frame 2 Data received from external device when programmable controller CPU request reading of reception data stored in buffer memory reception area The reception
96. IB NA 66781 A Initial Jul 1997 IB NA 66781 A__ initialprint 0000 OE Apr 1999 1999 IB NA 66781 B Complete review Sep 2002 IB NA 66781 C Equivalent to Japanese version D Addition of description for use of the QCPU Q mode Addition Compliance with the EMC Low Voltage Directive Section 4 5 1 Section 5 2 2 Deletion Section 2 3 Partial Correction SAFETY INSTRUCTIONS About Manuals Chapter 1 Section 2 1 Section 2 2 Section 3 1 Section 3 2 Section 3 3 Section 3 4 Section 3 7 Section 4 1 Section 4 2 Section 4 4 Section 4 5 2 Section 4 5 3 Section 4 6 Section 5 2 Section 5 6 2 Section 8 3 Section 9 1 Section 9 2 4 Section 10 1 2 Section 10 2 Nov 2005 B NA 66781 D Partial Correction SAFETY INSTRUCTIONS About Manuals Generic Terms and Abbreviations Definitions and Details of Terms Section 1 1 Section 2 1 2 2 Section 3 1 3 2 3 4 3 6 1 3 6 2 3 7 3 8 3 9 1 3 9 2 Section 4 2 4 4 4 5 2 4 5 3 Section 5 2 1 5 3 5 4 5 5 1 5 5 2 5 7 1 5 7 2 5 7 3 5 7 4 Section 6 3 1 6 3 2 6 4 1 6 4 2 Section 7 3 1 7 4 3 7 5 2 Section 8 2 8 3 8 4 8 5 8 9 2 Section 9 1 9 2 1 9 2 2 9 2 3 9 2 4 9 3 2 9 3 3 Section 10 1 2 10 3 Addition INDEX Oct 2006 IB NA 66781 E Partial Correction SAFETY INSTRUCTIONS Section 3 2 3 4 4 4 7 3 Nov 2007 IB NA 66781 F Change of a term PLC was changed to programmable controller Partial Correction Section 4 2 4 4 Section 5 1 5 2 1 5 5
97. M 600 MELSEC A 3 Default size of each area When totaled the default size of each area is 600H The size of the master station automatic update area is 1000n so if used with the default setting only two R2 modules can be connected Users using three or more R2 modules must reduce and delete the areas not being used to reduce the automatic update size transmission size Master station automatic update buffer Offset address R2 buffer memory Initialization area Initialization area Transmission monitor transmission area 1 Ld Transmission monitor transmission area 1 Status storage area EEPROM function area User registration frame area Blank Blank Update at timing Transmission monitor for each area Transmission monitor transmission area 2 Lod transmission area 2 Reception area Reception area a Relation of No of modules and each area size As the No of R2 modules being used increases the size of the areas other than the initialization area and status storage area must be reduced or else the master station buffer memory 1000 will be exceeded The sizes of the areas that can be set are described below Status storage area EEPROM function area User registration frame area 1 When connecting two R2 modules Master station automatic update buffer 1000x Initialization 1A0H Status storage area 20011 x 2 C80H The size of the areas other than the initialization area w
98. M139 M140 M139 M138 Change to bank 1 Set dummy area Set station No request code Set transmission buffer write data size Quantity Fixed value Access code attribute Fixed value R2 buffer memory address Set No of write points word Store transmission data into transmission buffer Write data Change to bank 0 Set intelligent device station access request Set reception timeout setting flag 1 Set intelligent device station access request Set reception timeout setting flag 2 Reception timeout setting complete Set reception timeout setting flag 2 Set reception timeout setting flag 1 5 PRELIMINARY INFORMATION MELSEC A 1 Program to change to bank 0 M9036 t Po SET M9052 Specify partial refresh RST Y1C Specify bank 0 RST Y1D SEG K4Y18 K4B1 Execute partial refresh 2 Program to change to bank 1 M9036 P1 SET M9052 S parua SET yic Specify bank 1 RST Y1D SEG KMR KaB Execute partial refresh b When using dedicated commands RIWT with QCPU Q mode QnACPU When using dedicated commands RIWT RISEND RY n 1 E and RY n 1 F are used with the dedicated commands so provisions must be made to prevent the user from rewriting this signal information When the QCPU Q mode is used such provisions need not be made Refer to section 5 3 8 for details Write execution MOV K 021 et R2 station No MOV H4 D22 ccess code attribute MOV H112 D23 R2 buffer memory addre
99. MITSUBISHI RS 232C Interface Module Type AJ65BT R2 User s Manual melse Mitsubishi Programmable Controller e SAFETY INSTRUCTIONS e Always read these instructions before using this equipment Before using this product please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly The instructions given in this manual are concerned with this product For the safety instructions of the programmable controller system please read the CPU module user s manual In this manual the safety instructions are ranked as DANGER and CAUTION WE N Z Indicates that incorrect handling may cause hazardous conditions RE DANGER resulting in death or severe injury T CAUTION Indicates that incorrect handling may cause hazardous conditions a resulting in medium or slight personal injury or physical damage E Note that the CAUTION level may lead to a serious consequence according to the circumstances Always follow the instructions of both levels because they are important to personal safety Please save this manual to make it accessible when required and always forward it to the end user Design Instructions lt DANGER s If a communication error occurs in the data link the following will occur in the station having the communication error Use the communicati
100. Mitsubishi representative explaining a detailed description of the problem 10 10 10 TROUBLESHOOTING MELSEC A 3 Slave station side troubleshooting When link special register SW0080 to SW0083 turned ON Check the module for which SW0080 to SW0083 is ON Is the power ON Yes Turn the power ON Is the supplied voltage within the specified range Is the POWER LED ON Set the supplied voltage to within the specified range The module may be faulty Please consult your local Mitsubishi representative explaining a detailed description of the problem Is RS 232 C cable wired correctly 1 Se LS Correct RS 232 C cable wiring flashing Yes The module may be faulty Please consult your local Mitsubishi representative explaining a detailed description of the problem End 1 continued to next page 10 11 10 TROUBLESHOOTING MELSEC A from previous page 1 s transmission speed setting correct No Is the LRUN LED ON Is the SD LED flashing Correct the transmission speed setting Is the SD LED flashing Reapply power to or reset slave station The module may be faulty Please consult your local Mitsubishi representative explaining a detailed description of the problem Is RS 232 C cable wired correctly 1 Connect RS 232 C cab
101. O Correctly set the setting switch and then turn the power ON or 65 or more transmission again or reset it speed other than 0 to 4 The terminator is not Check that the terminator is connected If not connected connected connect one and then turn the power ON again or reset it e Ground Class 3 grounding both ends of the CC Link dedicated cable s shield wire via the SLD and FG of each The module or transmission module cable i being L A a Securely ground the module s FG terminal e Securely ground the pipe when piping and wiring 10 6 10 TROUBLESHOOTING MELSEC A 10 3 Examples of trouble in general purpose input circuit Examples of trouble that can occur in the general purpose input circuit and the remedies are explained below e Drive with LED display switch e Connect an appropriate resistor so that the DC input sink voltage across the input terminal and COM1 m exceeds the OFF voltage DC input sink signal does Module not turn OFF Resistor Module Example 1 e Lead in from use of two power supplies e Change from two to one power supply DC input sink N Connect a lead in prevention diode Refer to following drawing The input DC input sink signal does E Module not turn ay OFF Example 2 Module lt Example of calculating example 1 gt When the LED display switch is connected to the R2 and the leakage current is 4mA R2 Module Leak
102. ON to when the R2 turns the transmission normal complete RXn0 ON The reception time is the time from when the R2 starts receiving the data to when the reception normal read request RXn2 and reception error read request RXn3 are turned ON by the R2 1 Calculation expressions Calculation expression unit ms SM x 2 LS x 6 RS data transmission time request response Transmission time TE GD When the master station scan time of area to be updated at transmission is the A QnA Series SM LS x 3 RS data reception time SL request response scan Reception time F are time of area to be updated at reception SM x 2 LS x 4 RS data transmission time request response Transmission time tye When the master station scan time of area to be updated at transmission is the Q Series SM LS x 2 RS data reception time oe request response scan Reception time ft of time of area to be updated at reception SM Master station sequence program s scan time LS Link scan time Refer to Master Module User s Manual RS R2 internal processing time Refer to section 3 8 1 1 Data transmission reception time This time is obtained with the data size and RS 232 C transmission speed Example Data size 200 bytes Transmission speed 9600bps data bit length 8 stop bit length 1 parity bit even 200 x 10 9600 0 208s 72 Request response scan of area to be updated at transmission reception This is the response r
103. ROGRAM EXAMPLES 3 Program example a Main program Master station initialization X0 XOF MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV TO HO H80 X6 X7 FROM HO H668 jg K3 DO H2101 H2102 H2103 D20 HO HO H3C0 HO HO H3C0 HO HO H3C0 D23 SET SET LRT D8 RST NO D0 K D20 021 022 K3 023 D24 D25 D26 D27 D28 D29 D30 D31 K9 Yo TB Y6 K Y6 MELSEC A No of connected modules 3 modules Write to master station R2 station information intelligent one station occupied station No 1 R2 station information intelligent one station occupied station No 2 R2 station information intelligent one station occupied station No 3 Write to master station Set station No 1 trans mission buffer size Set station No 1 recep tion buffer size Set station No 1 auto matic update buffer size Set station No 2 transmission buffer size Set station No 2 recep tion buffer size Set station No 2 auto matic update buffer size Set station No 3 transmission buffer size Set station No 3 recep tion buffer size Set station No 3 auto matic update buffer size Write to master station Refresh indication Start data link with buffer memory Turn start request signal OFF when normal Read parameter state when abnormal Turn s
104. Reception buffer id R2 Transmission area gt X a rl 1 i Transmission 1 1 External device Carried out with sequence program PRA eee Carried out by R2 a eae ee Le the writing is completed the intelligent device station access complete RX n 1 E turns 1 The intelligent device station access n aA E turns OFF CE S A 9 The data is transmission from the R2 transmission area to the external gee a transmission normal complete signal RXn0 or transmission error S signal RXn1 ES turns ON 11 The transmission request signal RYn0O turns OFF 12 The signal turned ON in step 9 turns OFF 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 3 Program The program for transmitting the transmission data ABCDEF using the transmission reception buffer is shown below Refer to section 5 1 for details on the program conditions a When using the FROM TO command with the ACPU QCPU A A mode Master station initialization parameter setting data link setting Refer to section 5 4 Transmission execution PLs M120 Pulsate data transmission Initialization o9 000 xio nan W135 M120 swich ac ee ee T T Ll SET 4125 Set data transmission flag M125 CALL P30 Call the transmission data setting program M124 KIS SFT 100 Set transmission request RYn0 _ Sa RT W124 RST M125 hi TTT 100 Reset transmission request RYn0 x101 F R2 error processi
105. Refer to section 4 6 e There must be no error in the hardware test 3 Check the CPU state e There must be no error to cause the CPU operation to stop 10 9 10 TROUBLESHOOTING MELSEC A 10 5 Troubleshooting when the master station s ERR LED flashes The following explains how to troubleshoot the system when the master station s ERR LED flashes 1 Master station side troubleshooting Master station ERR LED flickers Do the parameter settings and system configuration match Correct the parameter settings or mounted system configuration Is the master station link special register SW0080 to SW0083 remote station data link state ON Master station may be faulty Please consult your local Mitsubishi representative explaining a detailed description of the problem Is the master station link special register SW0098 to SWO09B station No duplicate state ON Check the module for which Check the module for which SW0098 to SWOOQ9B is ON SW0080 to SW0083 is ON End 2 Slave station side troubleshooting When link special register SW0098 to SWOO9B turned ON Check the module for which SWO0098 to SWOO9B is ON Are the station No setting switches set correctly Correctly set the station No setting switches Reapply power to or reset slave station The module may be faulty Please consult your local
106. S BEFORE OPERATION MELSEC A Station No setting switch Set the module s station No Default setting 0 STATION NO Setting range 1 to 64 0 Master module x10 sets the 10th place of the station No x1 sets the 1st place of the station No Set the module s operation state Default setting 0 el ans O Seting details be eee Mode for on line communication l transmission reception buffer Set when using the transmission reception buffer Mode for on line communication automatic update function Set when using the buffer memory automatic update function Setting error RUN LED turns OFF Setting error RUN LED turns OFF z Not used Setting error RUN LED turns OFF 6 Notused O lt Setting error RUN LED turns OFF Setting error RUN LED turns OFF 8 Notused sd Setting error RUN LED turns OFF 9 Not used Setting error RUN LED turns OFF Setting error RUN LED turns OFF B Notused Setting error RUN LED turns OFF Setting error RUN LED turns OFF D Hardwaretestmode lt Mode for confirming that module runs independently Setting error RUN LED turns OFF Setting error RUN LED turns OFF o oO oO 5 RS 232 C transmission Set the RS 232 C transmission specifications specifications setting switch ono Setting details Setting switch state FF Default L O ON O eC setting SW sw 1 J 2
107. Set initialization data write complete flag SET M110 M100 M115 M110 M114 Y100 Y101 Y102 Y103 Y106 Y107 Y119 St Ht at E A oo a A A at 8 YA K0 gt _ f SET Y104 Set initialization request M100 M115 X104 RST 104 Reset initialization request SET M114 SET W135 Set the error occurrence flag M114 X104 X105 SET M115 Initialization complete Transmission of data to external device Refer to section 6 3 1 Meee Ce e f c T H ee ee ana of remote output RY Refer to section 5 3 8 Create the following interlock circuit so that the initialization request is made after all request signals RY are turned OFF Forced Os Transmis Reception reception reception EEPROM Transmis sion cancel read output complete buffer clear function Initialization Error reset Initialization sion request request complete request request request request request command RYn0 RYn1 RYn2 RYn3 RYn6 RYn7 RY n 1 9 RY n 1 A M ht it it Lit rH If initialization is carried out while RX or RY is ON the current process will be canceled Start initialization after turning all RY other than RYn4 OFF 5 14 5 PRELIMINARY INFORMATION MELSEC A 5 5 2 Using the transmission reception buffer Initialization using the transmission reception buffer changes the contents of the R2 buffer memory using the transmission reception buffer By using this operation the transmission reception ar
108. T YUE Set intelligent device station access request SET M138 NI XH1E 7 RST YUE Reset intelligent device station access request SET M139 M139 XTE s ge z SET M140 Reception timeout setting complete RST M139 RST M138 RET 9 PROGRAM EXAMPLES MELSEC A 5 Program for setting transmission timeout time M143 X11E P20 CALL Pi Change to bank 1 MOV KU D30 Set dummy area MOV H112 D31 Set station No request code MOV K10 D32 Transmission buffer write data size MOV K1 D33 Quantity Fixed value MOV HA D34 Access code attribute Fixed value MOV H11A D35 Set R2 buffer memory address HOV Ki D36 Set No of write points word KOV K20 D37 Set write value 2 sec TO HO HO 030 K8 Store transmission data into transmission buffer CALL PO Change to bank 0 SET YUE Set intelligent device station access request SET M143 M143 XIE l A l l RST YUE Reset intelligent device station access request SET M144 M144 XIE SET M145 Reception timeout setting complete RST M144 RST M143 RET 9 PROGRAM EXAMPLES 6 Program for setting transmission data M122 XTE P30 MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV T0 HO HO M22 XIE a M123 XIE CALL KU H112 K16 K H4 H200 K4 K3 H4241 H4443 H4645 D93 CALL SET SET RST SET SET RST RST PI D93 D94 D95 D96 D97 D98 D99 D100 D101 D102 D103 K11 PO YUE Ki22 YHE M123 M124 M123
109. This must be set for each connected device Set so that the total of the transmission buffer reception buffer and automatic update buffer is within the range of 80H to 1000H a Transmission buffer reception buffer Set this when communicating with R2 using the transmission reception buffer Designate as the transmission reception data size plus seven words PRELIMINARY INFORMATION An MELSEC A b Automatic update buffer Set this when communicating with R2 using the buffer memory automatic update function When using the R2 automatic update area with the default value 6004 is required Even if the automatic update area size is set to the minimum the default setting area amount 1A0x the status storage area amount 20H must be ensured so set 1COH transmission reception size or more Refer to section 5 6 2 for details on the automatic update area 5 PRELIMINARY INFORMATION 5 5 Initializing the R2 The methods for initializing the R2 are described below 5 5 1 Using the buffer memory automatic update function Programmable controller CPU Initialization when using the buffer memory automatic update function changes the contents of OH to 19FH The values of the initialization area R2 OH to 19FH can be changed by using this operation MELSEC A The transmission reception area address size range of buffer memory to be automatically updated and the parameters etc can be set 1 Before initiali
110. W update station s remote register RW and R2 buffer memory Unit 401 interval time 100ms designation 0 Do not update RW 1 to 32767 Update RW RWw update Designate the validity of the RWw update R2 41H validity 0 Update invalid default value designation 1 Update valid RWr update Designate the validity of the RWr update R2 424 validity 0 Update invalid designation 1 Update valid default value RW refresh Designate the R2 buffer memory address corresponding to A3uto destination the master station side remote register RW address 3 E l 4AH designation 1 RWw remote register write area 43H 45H 47H 49H area 2 RWr remote register read area 44n 46H 48H 4An 8 OTHER FUNCTIONS MELSEC A As the default value the following buffer memory is set in the RW refresh destination address designation area of the buffer memory for the RW update function Designate the address of the R2 buffer memory to be assigned to the remote register RW as necessary BART Remote Default R2 buffer memory indicated with default E ee register value value 43H Transmission head frame No Master station 45H RWw1 1194 Transmission end frame No S R2 474 RWw2 120 Transmission table head No designation Master station 48H RWr2 1B2H Reception error code Data size storage in OS reception area POINT e The 41H to 42h default values are valid only for the remote register RWr
111. WT RISEND RIRCV are used RY n 1 E RY n 1 F are used with the dedicated commands so the user must make sure that this signal information is not rewritten When the QCPU Q mode is used such provisions need not be mode 1 When using ACPU H160 D50 KI Read RY new information DAND H0C0000000 D50 Retrieve RY n 1 E RY n 1 F state DOR K8Y100 D50 Write to RYnO H160 D50 K2 to RY n 1 F 2 To set automatic refresh with QnACPU XU XOF XI H DFRO HO H160 D50 Kl Read RY new information DAND H0C0000000 D50 Retrieve RY n 1 E RY n 1 F state DOR K8Y100 D50 K8Y100 5 PRELIMINARY INFORMATION 5 4 Initializing the master station MELSEC A Create the following program to initialize set the parameters start the data link the master station Refer to section 5 1 for details on the program conditions Example No of connected modules One module Connected station R2 Station No 1 one station occupied XOF is wo MO WV KI bo D 1 Set the No of connected modules TO HO H1 D0 KI J NO K MOV H2101 D4 K 2 Set the station information TO HO H20 D4 KI J WV HO 05 D MOV HO 06 3 Set the master L station buffer memory NOV H600 D7 TO HO H80 D5 K3 G MO SET Yo Refresh indication SET vp S link with buffer ji rst ve If normal reset start request signal X7 FROM HO H668 D8 K If error read parameter state RST YD Reset start request signal When setting the information 1 to 3 as parameters when usi
112. Xn8 request 3 SPECIFICATIONS MELSEC A General purpose external output signal This signal turns the RS RTS signal of the RS 232 C line ON or OFF Note that when RS RTS signal status designation R2 101H is set to Always ON 0 the signal will remain ON even if the RS signal setting RYn9 is turned ON or OFF When controlling the RS signal with the RS RTS signal set the above buffer memory to Follow RYn9 ON OFF 1 This signal turns the ER DTR signal of the RS 232 C line ON or OFF When using DTR DSR ER DR control even if the ER DTR signal RYnA is turned ON or OFF the process will follow the flow control designation R 2 1 100x setting If the ER signal is being controlled with the ER DTR signal RYnA set the above buffer memory to No flow control 0 or Executing flow control by the DC code control 2 This signal indicates the status of the R2 general purpose output YC YD with an ON or OFF state RYnC Corresponds to YC RYnD Corresponds to YD RY n 1 g Initial data read Refer to the section on RX n 1 9 request RY n 1 A Error reset request Refer to the section on RX n 1 A Intelligent device RY n 1 E station access request Refer to the section on RX n 1 E 3 SPECIFICATIONS MELSEC A 3 7 R2 buffer memory list The entire configuration of the R2 buffer memory is explained in this section The contents of the R2 buffer memory are cleared to the default value
113. _ directions No corrosive gases Degree of contamination 42 2 or less 1 Indicates to which power distribution section from the public power distribution network to the in plant machine device the device is assumed to be connected Category II applies to a device fed power from a fixed facility The withstand surge voltage level for a device with a rating up to 300V is 2500V 2 Exponential indicating the degree of conductive matter generated in the environment where device is used In the degree of contamination level 2 only non conductive contaminants are generated However temporary conductivity could occur due to rare condensation 3 Do not use or store the programmable controller in the environment where the pressure is higher than the atmospheric pressure at sea level Otherwise malfunction may result To use the programmable controller in high pressure environment contact your nearest Mitsubishi representative 3 SPECIFICATIONS MELSEC A 3 2 Performance specifications The R2 performance specifications are shown below 1 RS 232 C specifications Transmission speed 300 600 1200 2400 4800 9600 19200bps Select with RS 232 C transmission specification setting Data format Star bit 1 718 1 Yes 0 No 1 2 Communication control flow control 2 Data link specifications Specifications General purpose input output Input side 24VDC Positive common negative common shared type 2 points Outp
114. ace string value ASCII code and transmitted If the value is negative it is transmitted with as the head value and if positive it is transmitted with a space as the head character RW FFu D94 designation 1 Example When designated RW value is 1234 1234 is transmitted as ASCII code 4 3 2 1 34h 33H 32H 31H 20H 2D Transmission During frame transmission the remote register RW value is referred to The value is interpreted as an unsigned value 0 to 65535 the last two digits are converted into a decimal ASCII code and is then transmitted If the RW value referred to has only 1 digit the data will be converted into a 0 value ASCII code and transmitted RW designation 1 FFu DA Example When designated RW value is 1234 34 is transmitted as ASCII code 4 3 34u 33H Transmission During frame transmission the remote register RW value is referred to The value is converted into a 4 digit hexadecimal value character string and transmitted If the converted value has less than 3 digits the data will be converted into a 0 value ASCII code and transmitted RW FFu DBH designation 1 Example When designated RW value is 1234 4D2x 4D2 is transmitted as ASCII code 2 D 4 0 32H 44H 34H 30H Transmission During frame transmission the remote register RW value is referred to The last byte of the value will be transmitted binary value
115. age current ama 24VDC 1 The R2 OFF current does not satisfy 1 7mA so it does not turn OFF In this case connect a resistor as shown below R2 lse mA iZ Input impedance TY 3 3kQ Sa 10 7 10 TROUBLESHOOTING MELSEC A 2 When calculating the terminator R value connect a resistor R so that 1 3mA or more flows to the connected resistor in order to satisfy the R2 OFF current 1 7mA Therefore a value for the resistor R can be calculated by the following formulas IR Iz z input impedance R Resistance Iz 1 7 R lt xz x 3 3 4 3 kQ IR 1 3 R lt 4 3kQ When the resistance R is 3 9kQ power consumption W of the resistor R can be calculated by the following formula W input voltage R 28 87 V 3 9k Q 0 2 W 3 The resistor power capacity is selected to be three to fives times the actual power consumption so connect a 3 9 kQ 1 0 W resistor to the problem terminal 10 8 10 TROUBLESHOOTING MELSEC A 10 4 Troubleshooting per symptom The troubleshooting for symptoms that occur during communication between the R2 and external device is shown below When a trouble occurs check the R2 state and check the items for the corresponding items below Symptom Check whether the RD and SD are correctly connected to the R2 and external device Wire so that the transmission control signal such as the R2 side DSR and CS are turned ON by the exte
116. ake sure that the total of the transmission data size during frame transmission is within 2048 bytes after JIS conversion 10 TROUBLESHOOTING MELSEC A Error code hexadecimal Transmissiondata The transmission data size Correct the transmission data size designation area BB93 i exceeds the transmission R2 2004 at default and the transmission area size size error area size R2 1H Error during When the transmission was transmission requested the transmission e Request the transmission after turning the transmission BB94 cancel request cancel request signal cancel request RYn1 OFF Error name Cause of error Error remedy signal ON RYn1 was already ON User registration The designated user A l s BB95 frame registration frame cannot be Check that the designated user registration frame No transmission error transmitted has been registered A special character that Special character cannot be used for the head BB96 frame during frame Correctly designate the transmission head frame No usage error aie transmission was designated Table PA be Correct the data designated in the transmission table BB97 transmission fransmitting a anemission R2 1220 to 185x and the monitor designation 1 to information error lie was designated 64 R2 78H to F7 Registration frame A special character that cannot be transmitted was Correct the contents of the registration data for the BB98 contents f 3 s use
117. ally by the dedicated commands so the user does not need to change the bank Refer to section 5 2 for details on changing the bank When transmitting data using the transmission reception buffer the control data must be added to the transmission data before transmitting When receiving data the control data will be added to the head of the reception data The following examples are explained in this section for the control data s Transmission buffer address 2000 worth When using A Series master station Bank 1 M 0x to 1FFH When using Q QnA Series master station M 1000n to 14FFH e Reception buffer address 200H worth When using A Series master station Bank 1 M 2000 to 3FFH When using Q QnA Series master station M 1200H to 13FFH Refer to the following manuals for details on the control data when using the dedicated commands RIWT RISEND RIRD RIRCV e When using ACPU QCPU A A mode ANSHCPU AnACPU AnUCPU Programming Manual Dedicated Commands e When using QnACPU QnACPU Programming Manual Special Function Module e When using QCPU Q mode QJ61BT11N QJ61BT11 User s Manual 5 PRELIMINARY INFORMATION MELSEC A 1 When using the RIWT command This is used only when writing to the R2 designated buffer memory When using the RIWT command the master station buffer memory will be used as the transmission buffer for the control data and write data The complete status will be stored in the reception buff
118. ange as binary data and converting it into a complement of 2 In case of example 2 H L 02H 10H 41H 31H ABH 12H 03H 0144H 15 14 13 12 1110 9 8 7 6 5 4 3 2 1 0 Addition value 01444 f0 0 01 0 0 0 0 1 0 1 0 0 0 1 0 0 oO oO jo oO N a K w ro Reversal 14 13 12 11 10 9 Complement of 1 FEBBs 1 1 1 1 1 1 oO F D a K i N ro 4 15 14 13 12 11 10 9 Complement of 2 FEBCx 1 1 1 4 1441 oO jo The low order 1 byte section B C of the complement of 2 FEBCn for 01444 is transmitted received from B e When receiving a registration frame containing a sum check code if the values of the received sum checks do not match a sum check error BB28n will occur e When transmitting a registration frame containing a special character for sum check codes it can be used only for the end frame transmitted with the transmission frame 1 area The frame cannot be used for the end frame of transmission with the transmission frame 2 area e Designation of only a special character for the sum check code in the user registration frame is not possible e When transmitting receiving sum check codes set the RS 232 C data bit length to 8 bits e Multiple sum checks cannot be used in one user registration frame e If ASCIl binary conversion is designated when transmitting the data will
119. ank 0 Execute partial refresh 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 3 Program to change to bank 1 SIS Specify partial SET YIC Specify bank 1 RST YD SEG K4Y18 K4B1 Execute partial refresh b When using dedicated commands RIRD with QCPU Q mode QnACPU When using dedicated commands RIRD RIRCV RY n 1 E and RY n 1 F are used with the dedicated commands so provisions must be made to prevent the user from rewriting this signal information When the QCPU Q mode is used such provisions need not be made Refer to section 5 3 8 for details ed Master station initialization parameter setting data link setting Refer to section 5 4 a n e r e r lama Reading of remote input RX Refer to section 5 3 2 Da ee ei i n n n n s Kd Confirmation of R2 data link status Refer to section 5 3 3 I R2 initialization Refer to section 5 5 2 4 7 PIU ee ee ee R 2 normal complete M125 M135 X102 Set data reception enable iaia P flag X103 M130 Y102 CALLP P40 Call reception data size read program poa Pat Call reception data read program SET Y 102 Reset reception read L complete RYn2 M155 KO D200 M100 X102 X103 Y102 RST vinn Reset reception read complete RYn2 FRST H130 Reset data reception enable flag 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE 1 Program for r
120. ansmission flag M125 MOV K3 D100 Set transmission data size Set transmission data MOV H4241 D101 A 41n B 42u MOV H4443 D102 Set transmission data C 43x D 44n MOV H4645 D103 Set transmission data E 45x F 46x G RITO U0 K1 H200 D100 K4 Store transmission data in automatic update buffer SET 100 Set transmission request RYn0 RST M125 M100 X100 vk RST 100 Reset transmission request RYn0 X101 Writing of remote output RY Refer to section 5 3 8 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 6 3 2 Receiving data from an external device The method for receiving data from an external device using the buffer memory automatic update function is explained in this section 1 Flow of process The flow of the process for reading data received from an external device using the buffer memory automatic update function is shown below Programmable controller CPU Master station R2 External 3 Reception normal device i i error read request Bit device ON Remote 6 Reception normal Remote error read request input RX OFF input RX 5 Reception read complete ON Oooo 7 Reception read Remote Remote complete OFF output RY output RY Word device _ 4 Reception data Automatic Reception Slam area read update 2 Automatic write buffer ft e _ __1_1_1 Trans reception 1 Data reception RS 232 C mission area
121. aster station transmission time is the Q Series SM LS x 2 RS data reception time 1 4 transient transmission Reception time time SM Master station sequence program s scan time LS Link scan time Refer to Master Module User s Manual RS R2 internal processing time Refer to section 3 8 1 1 Data transmission reception time This time is obtained with the data size and RS 232 C transmission speed Example Data size 200 bytes transmission speed 9600bps data bit length 8 stop bit length 1 parity bit even 200 x 10 9600 0 208s 2 Transient transmission time During transmission this is the time for the data to be written from the master station to the R2 During reception this is the time for reading the data from the R2 to the master station Refer to section 5 4 3 in the Q Series Master Module User s Manual for the calculation expressions 3 SPECIFICATIONS MELSEC A 2 Calculation example a Transmission time An example of calculating the transmission time for transmitting 10 words 20 bytes of data is shown below Transmission speed 9600bps Data bit length Stop bit length Parity bit 1 When the master station is the A QnA series LS 51 2 29 4 8 x 4 8 8 x 9 6 1 x 32 4 1 x 4 8 1 x 9 6 1300 11100us 11 1ms Data transmission time 20 x 10 9600 0 0208s 20 8ms Transmission time 20 x 2 11 1 x 6 11 1 x 2 20 8 20 11 1 11 16 72 x 11
122. ating to the buffer memory The RX RY RW reference special characters are written directly after the designating character Example To 123H for RW write as follows in the buffer memory Previous designation data Previous designation data 424 An FRy 42h FFu DA 1231 gt DA FF or 23n DAs RW designation 1231 Ol o 2 45u o Oh H L T H L Previous designation data 2 Designating RX RY RW The RX RY RW designation in the 3rd and 4th bytes of the RX RY RW reference special characters are designated as follow b15 b13b12b11 bo 0 0 1 Device No l For RX RY For RW 0 RY 1 RX e During frame transmission or monitor transmission if the results of analyzing and developing the user registration frame containing a special character exceeds 2048 bytes the transmission data size over error BB92h will occur e When using a special character special character code COH C1H DOH to designate the registration frame No if the same registration frame No is designated in that designated registration frame a special character cannot be contained FFu DOn For RX RY RW designation The special character No cannot contain the COn C1 or DOn character in the registration frame indicated by RW designated with the RX RY and RW designation 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 3 Details of RX RY RW reference special characters code During frame transmission t
123. bit 1 1 bit length i 2 2bits Software version The R2 software version is stored as an ASCII code R2 1BF 41H A to 5AH Z R2 software version 9 PROGRAM EXAMPLES MELSEC A 9 PROGRAM EXAMPLES Examples of R2 programs are given in this chapter 9 1 Conditions for program examples The program examples in this chapter have been created with the following conditions Refer to section 9 2 4 1 for the conditions of the program examples when using three R2 modules 1 System configuration R2 Station No 1 Power cpu Master Ax42 AY42 supply station Transmission data ABCDEF exams oO X Y00 to X20 to Y60 to Osa device 2 Reception data Random data CR 0DuT or Random data LF OAn 1 XIY1F X5F Y9OF CC Link dedicated cable RS 232 C cable 4 In the program example shown in this chapter the reception completion is detected by receiving the reception end frame CR ODx or LF 0An To detect a reception completion by designating the number of reception data the reception end data size designation R2 111H setting is required Refer to section 6 2 for details 2 Relation of programmable controller CPU master station and R2 The contents of RXn0 to RX n 1 F are read into X100 to X11F and the contents of Y100 to Y11F are written into RYnO to RY n 1 F Programmable Controller CPU Master station R2 f wes Sa we Device X Addres
124. ccseeeeeeeeeeeeeeeeeeeeseesaeesaeeseeseesseesaeesaeeseesaeeseeseesieesieeeeesas 7 10 7 4 Transmitting data at the device and status change sese 7 13 FAD QING a a anita e a a E E A Seen 7 13 7 4 2 Devices and statuses that can be designated 7 14 7 4 3 Setting the R2 buffer Memory ecn E E A 7 15 TAA PRECAUTIONS ex fit ser eed Soe tee ce caw cabelas cath saw lida aah glu dS net salud bod gd a 7 21 7 9 Registration Mames eerie EE EREEREER EE AERE ERARE 7 22 7 5 1 List of default registration frames arer zi anete aE Z TO Ea aE AAEE EER 7 23 7 5 2 Details of user registration frames ee eecececeeeeeeeeeeneeeeeeeeeeaeeeaeeeaeeeseeeaeeeaeeeaeeeaeeeaeesaeesaeeeeeeaeeeaeesas 7 25 8 OTHER FUNCTIONS 8 1 to 8 24 8 1 Canceling data communication to an external device sees eee eee eee eee 8 1 8 2 Forcibly completing reception gerrnana anna aE AAA EA eA EAEn RAIE ATRA RARAC Ra ERRi 8 3 9 0 POW CONTO raie aa A Sa Seay hae O HEE A ie 8 6 8 4 ASCII BIN conversion of transmission data sese eee eee 8 10 8 5 RW update FUNCTION misesta ae a a ereta aa air earel raare raa eed ae aeran eaae aaier aaie eeel 8 12 86 Initializing the RZ oenasiorniniianuini ie li A ie A ie lei A ie A ei Ae ide 8 15 8 7 Clearing the OS reception area sees eee e ereer e essere ereer eenn enen 8 16 8 8 Registering and initializing the R2 EEPROM eee eee 8 19 8 9 Controlling the RS 232 C Sighal c ccccccscceecceeeceeseeseedeneegectecceseedeneegecesscesecd
125. ce 2 EEPROM function request ON 4 EEPROM function Paoi Remote outpu request OFF gt RY RY 1 Designate EEPROM function Remote input RX 5 EEPROM function complete OFF TCU Remote input RX Buffer memory 8 OTHER FUNCTIONS MELSEC A 2 Timing chart EEPROM function designation R2 1Co EEPROM function request signal RYn7 EEPROM function normal error complete signal RXn7 RXn8 Carried out with sequence progran d Carried out by R2 Designate the EEPROM function in the EEPROM function designation area R2 1C0x When registering the current buffer memory values as the default values designate 0 To return the values to the default values designate 4 When writing with the buffer memory automatic update function refer to section 5 6 When writing with the transmission reception buffer refer to section 5 7 4 The EEPROM function request signal RYn7 turns ON Program 3 After the EEPROM function execution is completed the EEPROM function normal error complete R2 signal RXn7 RXn8 turns ON 4 The EEPROM function request signal RYn7 turns OFF 5 The EEPROM function normal error complete signal RXn7 RXn8 turns OFF R2 Program 3 Setting the buffer memory The buffer memory items to be set for registering initializing the R2 EEPROM are shown below R2 buffer memo
126. ception timeout time to 2 sec Set transmission timeout time to 2 sec Change to bank 0 Set initialization data write complete flag Set initialization request Reset initialization request Set the error occurrence flag Complete initialization Pulsate data transmission switch Set data transmission flag Set transmission data size Set transmission data 41H 420 Set transmission data 43H 44H Set transmission data 45x 46x Change to bank 2 Store transmission data in automatic update buffer 9 PROGRAM EXAMPLES CALL PO SET Y100 RST M125 M100 X100 RST Y100 X101 Data reception M100 M115 X102 m SET M130 X103 p2 K Z KOZ PO 102 M100 X102 X103 Y102 RST Y102 RST M130 R2 error processing M100 X101 SET M135 X103 X105 X108 M135 CALL P2 FROM HO HIBO D10 K3 CALL PO SET Y91 Error LED MELSEC A Change to bank 0 Set transmission request Reset data transmission flag Reset transmission request Set data reception enable flag Change to bank 2 Read reception data size Store reception data size inZ Store data received from D201 Change to bank 0 Set reception read complete Reset reception read complete Reset data reception enable flag Set the error occurrence flag Change to bank 2 Store error code in D10 to D12 Change to bank 0 Turn ON error LED 9 PROGRAM EXAMPLES PO P2 ee M100 X105 X23 XITA HW s
127. ch R2 normal complete Y100 X100 X101 M120 H sT ma Set data transmission flag M125 MOV K3 D100 Set transmission data size MOV H4241 D101 Set transmission data A 411 B 421 MOV H4443 D102 Set transmission data C 431 D 441 MOV H4645 D103 Set transmission data E 4514 F 461 CALL P2 Change to bank 2 TO HO H200 D100 K4 Store transmission data in automatic update buffer CALL PO Change to bank 0 SET Y100 Set transmission request RYn0 RST M125 M100 X100 i RST Yt00 Reset transmission request RYn0 X101 R2 error processing Refer to section 5 3 7 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 1 Program to change to bank 0 PO ae SET M9052 Specify partial refresh RST Yic Specify bank 0 RST Y1D SEG K4Y18 K4B1 Execute partial refresh 2 Program to change to bank 1 P2 aija SET M9052 Specify partial refresh RST yic Specify bank 1 SET Y1D SEG K4Y18 K4B1 Execute partial refresh 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A b When using the dedicated command RITO with the QCPU Q mode QNACPU i Master station initialization parameter setting data link setting Refer to section 5 4 Reading of remote input RX Refer to section 5 3 2 Confirmation of R2 data link status Refer to section 5 3 3 R2 initialization Refer to section 5 5 1 4 R2 normal Inilalizationyyqg Y Xlo Transmission execution SET M125 Set data tr
128. command RLPA Master station head 1 0 No Parameter storage head device Device to turn one scan ON at completion Read parameter state when abnormal Change to bank 0 Read RXn0 to RX n 1 F to X100 to X11F Read R2 data link state SW0080 R2 data link normal R2 data link error 9 PROGRAM EXAMPLES R2 initialization initial data read 4100 M105 M104 X119 X118 s Ka RST X119 X11B SET M104 X119 X11B H SET RST R2 initialization initialization data write M100 WOS M110 El U LEDA SUB SUB SUB LEDC SUB MOV K20 LEDA SUB SUB SUB LEDC SUB SET R2 initialization initialization execution M100 M115 M110 M114 100 Y101 Y102 Y103 Y106 Y107 Y119 H Y119 Y119 M104 M105 M104 D13 RITO HO Kt H112 012 KI LEDR D14 RITO HO KI HITA D14 Ki LEOR M110 0 MELSEC A Set initial data read request Reset initial data read request Complete initialization Set reception timeout time to 2 sec Dedicated command RITO Master station head I O No Write destination station No Write destination buffer memory address R2 Write data No of write points Set transmission timeout time to 2 sec Set reception timeout time to 2 sec Dedicated command RITO Master station head I O No Write destination station No Write destination buffer memory address R2 Write data No of write points Se
129. connect the RS 232 C interface with an RS 422 device If connected with an RS 422 device the hardware of the connected devices s RS 422 interface could be damaged and communication inhibited 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 4 6 Checking the module s state Hardware test Confirm that the R2 operates normally as a single module Always carry out this test before structuring the system Execute the test with the following procedure Start Disconnect the CC Link dedicated cable for the data link from R2 Mount an RS 232 C single module loopback connector 1 Set the data link related hardware Set the data link transmission speed setting switch Set the mode setting switch to D hardware test mode Turn ON the R2 power Confirm the RS 232 C ERR LED 2 i 1 The specifications of the RS 232 C single module loopback connector are shown below Create the RS 232 C single module loopback connector shown below R2 side DTE Single module loopback Signal abbrev connector CD RD RXD sp Txp 3 pmReR 4 Oo o 5 O S G DSR DR 8 a esem 8 D o IMPORTANT During the hardware test mode the check data is transmitted to the data link when checking the data link loopback so always disconnect the data link wiring 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 2 When normal The RS 232 C ERR LED flickers The state is normal if th
130. connection and signal method Signal abbrev Signal abbrev ee ee E 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 3 Precautions for connections a R2 does not use the CD signal as a control signal in sending receiving data to from an external device b Handle the connection cable s FG signal and shield as described below Connection method FG signal Connect to the body of the Do not short circuit the FG signal and R2 connector SG signal of the connection cable Connect to the body of the When the FG signal and SG signal are R2 connector connected internally on the external Do not connect with the device side do not connect the R2 side external device FG signal with the external device c Ifthe data cannot be communicated due to noise from the external device even when the above wiring and connection are used wire and connect as shown below 1 Connect across the FG of each station with the connection cable s shield For an external device connect as explained in the instruction manual for the external device 2 Connect the signals other than the connection cable s SG and FG asa pair with SG R2 side Shield Partner device side ee Connector body section Se E eS roar Gee RD r o Sp DsR 3 3 DTR DTR r a DSR SG G The R2 FG is connected with the screw fixing section of the connector and is the FG for the module body d Do not
131. crews within the following range Tightening torque range Module installation screw M4 screw 0 78 to 1 18N m Pe Terminal block terminal screw M3 5 screw 0 59 to 0 88N m Pe Terminal block installation screw M4 screw 0 98 to 1 37N m ae ae RS 232 C cable connector screw M2 6 screw 0 20 to 0 39N m a deal E ADE ah ben 2 When using the DIN rail adaptor install the DIN rail while observing the following points a Applicable DIN rail type JIS C 2812 compliant TH35 7 5Fe TH35 7 5Al TH35 15Fe b DIN rail installation screw pitch When installing the DIN rail tighten the screws at a pitch of 200mm or less 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 4 3 Installation environment When installing the programmable controller refer to the CC Link system master module s User s Manual 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 4 4 Names of each part and settings The names of the parts in the R2 the LED details and the settings for each switch are explained in this section PW O RUN O L RUNO sDO RDO LERRO _ a gt Loo 10 ee S e LC I I gt I I gt LC I I gt C I I gt a I I gt LC I I gt C I I t I I C I I d 1 4 3 2 MITSUBISHI MELSECAJesBT R2 ia E SAT NNS RS 232 C R 04 904 S S Os OO L RUNO ERR O YC O U 2 654 654 sdO vD O RDO MODE w sasereg R
132. d command Set initialization data write complete flag Set initialization request Reset initialization request Set the error occurrence flag Complete initialization Set data transmission flag Set transmission data size Set transmission data 41H 42 Set transmission data 43H 441 Set transmission data 45H 46x 9 PROGRAM EXAMPLES G RITO U0 KI H200 D100 SET M100 X100 RST X101 Data reception M100 M115 x102 SET X103 a J M130 Y102 G RIFR UQ K1 H400 D200 o KO D200 dl R RIER U0 Kl H401 D201 SET M100 X102 X103 Y102 RS RS R2 error processing M100 X101 SET X103 X105 X108 M135 G RIFR UQ KI H1B0 D10 SET RS M100 X105 X23 KITA G ea fp Reset SW Y11A KITA E t RS RST K4 100 M125 100 M130 K1 D200 Y102 Y102 M130 M135 K3 YH Error LED M135 Y11A Yuta Y9 Error LED END MELSEC A Write transmission data using dedicated command Set transmission request Reset data transmission flag Reset transmission request Set data reception enable flag Read reception data size Store data received from D201 Set reception read complete Reset reception read complete Reset data reception enable flag Set the error occurrence flag Store error code in D10 to D12 Turn ON error LED Reset error occurrence flag Error reset request Error reset complete
133. d in the designated user designated user registration frame No transmission error registration frame No Reception data The reception data exceeds ls Make sure that the reception data size fits in the value BBA2 siza se Spor the maximum size of the designated with the reception area size designation reception data R2 3x 10 4 10 TROUBLESHOOTING MELSEC A 10 2 Confirming the error with the LED The method for confirming the error with the R2 LEDs is explained in this section Refer to the programmable controller CPU and master module User s Manuals for errors related to the programmable controller CPU and master module 1 When the R2 RUN LED turns OFF Incorrect switch setting Correct the switch setting Section 4 4 Turn the R2 power ON again or reset it A watch dog timer error has If the RUN LED does not turn ON after the power is turned occurred ON again there may be a problem in the hardware Contact your nearest dealer or sales office 2 When the R2 L RUN LED turns OFF Turn the R2 power ON again or reset it A watch dog timer error has If the RUN LED does not turn ON after the power is turned occurred ON again there may be a problem in the hardware Contact your nearest dealer or sales office The cable is Find the transmission cable that is disconnected or short disconnected short circuited circuited and repair Be id master station is in a link Check whether an error has occurred in the maste
134. data designation Set the unit word byte of the transmission data and reception data when exchanging data between the R2 and external device 0 Word unit default value Word byte unit designation 1 Byte unit This is also used as the unit of the values handled by the actual transmission data size storage area R2 1B4n and data size storage area in OS reception area R2 1B6x Designate the timeout time from when the transmission request signal RYnO turns ON during data transmission when trigger is generated during monitor transmission and the transmission starts to when the transmission is completed 17 Au Transmission timeout When the transmission timeout is applied the transmission error designation complete signal RXn1 turns ON and BB11H is stored in the transmission error code area R2 1B1H 0 Infinite wait default value 1 to 32767 Transmission timeout time x 100ms 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A When the setting value for OH to 112H has been changed initialize the R2 as explained in section 8 6 When the setting values for the buffer memory following 113H has been changed the initialization process is not required a Monitor target designation When designating RX RY RW R2 78x 7An F4H F6H Set the transmission trigger detection device for the R2 when carrying out monitor transmission b15 b14 b13 b12 b11 bO T8n ET E Monitor target
135. data stored in the OS reception area is stored transmitted to the buffer memory reception area by the R2 when one of the following Causes occurs 1 When a request for reading out receive data to the programmable controller CPU is generated by the user set reception end data size and reception end frame 2 When reception is forcibly completed The word byte size of the reception data stored in the OS reception area can be confirmed with the following buffer memory Note that when using the buffer memory automatic update function the buffer will be updated at the automatic update timing so the accurate reception data size cannot be read at the reception completion timing To confirm the size of the reception data stored in the OS reception area read the reception data size with the RW update function The contents of the OS reception area cannot be read directly from the programmable controller CPU e Data size storage area in OS reception area R2 1B6u The word byte size of the data stored in the OS reception area of the R2 remaining reception data for which read request has not been made to programmable controller CPU is stored The data size unit follows the word byte unit designation R2 102p The data size in the OS reception area is updated every 100ms b15 bO _ The data size in the OS reception area is stored 8 OTHER FUNCTIONS MELSEC A 2 Flow of process Programmable controllerCPU Master stat
136. e following timing e Just before the R2 turns ON the reception normal read request signal RXn2 reception error read request signal RXn3 3 Reception normal error read request ON 2 Reception data 1 Reception datal Qa ae A i External device such L Master station Transmit just before reception R2 as ID controller or ZZ normal error read turns ON YS barcode reader i Qam 5 PRELIMINARY INFORMATION MELSEC A d Initialization area R2 20H to 23x This area is used to store the initialization parameters in the master station or to read them from the master station This area is required during initialization so use the default values 1 Update timing The data is updated at the following timing s Immediately after the R2 detects that the initial data read request signal RY n 1 9 has turned from OFF to ON Update direction R2 to master station 2 Initial data read request ON confirmed 1 Initial data read request ON if 3 Initialization data Qam Transmit immediately after R2 detects initial data read request ON Master station e Immediately after R2 detects that the initialization request signal RYn4 has turned from OFF to ON Update direction master station to R2 1 Initialization request ON 2 Initialization request ON confirmed gt 3 Initialization data Master station Transmit after
137. e LED flickers for 30 seconds or more When abnormal The RS 232 C ERR LED turns ON The error cause is indicated with the YC LED and YD LED states LED state RS 232 C SDO RDO ERR ROM check error The hardware may be faulty so contact your nearest dealer or Mitsubishi branch RAM check error Disconnect the CC Link dedicated cable If the ERR LED does not flicker even when the Hardware error or CC Link dedicated CC Link dedicated cable is disconnected the cable is still connected hardware may be faulty so contact your nearest dealer or Mitsubishi branch Mount the loopback counter If the ERR LED does not flicker even when Hardware error or RS 232 C loopback l loopback connector is connected the hardware connector is not connected may be faulty so contact your nearest dealer or Mitsubishi branch O OFF ON 5 PRELIMINARY INFORMATION MELSEC A 5 PRELIMINARY INFORMATION 5 1 System used in this manual An example of the sequence program explained in this manual is described for the following system Refer to the CC Link Master Module User s Manual Details for details on the sequence program for the entire CC Link system 1 System configuration for program example wet Programmable controller CPU Master station X0 to X1F YO to Y1F R2 Station No 1 2 Relation of programmable controller CPU master station and R2 The contents of RXn0 to RX n 1 F are read to X10
138. e QCPU Q mode QnACPU Master station initialization parameter setting data link setting Refer to section 5 4 Reading of remote input RX Refer to section 5 3 2 Initialization R2 normal oomplete X102 l SET Set the data reception enable flag X103 M130 Y102 G RIFR UO KI H400 D200 Read the reception data size KO p200 RIFR uo Kt H401 D201 Read the reception data SET Set reception read complete RYn2 M100 X102 X103 Y102 e S A RST Reset reception read complete RYn2 RST Reset the data reception enable flag 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 6 4 Exchanging data using the transmission reception buffer When using the transmission reception buffer data is transmitted and received via the master station transmission reception buffer using the FROM TO command or CC Link dedicated commands RIWT RISEND RIRD RIRCV 1 The address for the transmission reception buffer differs for the A Series master module and Q QnA Series master module Refer to section 5 2 for details on changing the banks e A Series master module Bank 1 M 0H to FFFH Q QnA Series master module M 1000 to 1FFFH When using the RIWT RISEND RIRD RIRCV command the bank is changed automatically so it does not need to be changed by the user 6 4 1 Transmitting data to an external device The method for transmitting data to an external device using the transmission reception
139. e connector wire connections with the maker designated tools and securely connect the connector to the module An incomplete connection could lead to short circuits or malfunctioning s Do not directly touch the conductive section of the module Failure to observe this could lead to module malfunctioning or trouble e Securely fix the module with the DIN rail or installation screw Tighten the installation screw within the designated torque range A loose screw could lead to dropping short circuiting or malfunctioning If the screw is too tight dropping or short circuiting could occur due to screw damage e Securely mount the connector of each connection cable to the mounting section An incomplete connection could lead to malfunctioning caused by an incorrect contact Wiring Instructions A CAUTION e Before starting installation or wiring work be sure to shut off all phases of external power supply used by the system Failure to shut off all phases could lead to electric shocks product damage or malfunctioning Always install the terminal covers enclosed with the product before turning ON the power or operating the product after installation or wiring work Failure to install the terminal cover could lead to electric shocks Always ground the FG terminal with Class D grounding Class 3 grounding dedicated of the programmable controller Failure to do so could lead to malfunctioning Always confirm the product s rated voltage and
140. e eee ee 5 19 SWIC tec ele ereiene 4 7 Confirming States sse eee eee ee 8 23 System configuration 2 1 System used in this manual cee 5 1 T The master modules that can use the R2 2 2 Time Transmission delay time sees eee eee 3 19 Transmission reception time 3 20 Transmission area e 5 20 6 2 Transmission buffer c cccceeeeeeeeees 5 10 Transmission Cancel ee eee 8 1 Transmission data ASCII BIN conversion sse ee eee eee eee 8 10 Designating and writing sese eee ee eee 6 3 Matters to KHnOW sese eee eee 6 1 Using the buffer memory automatic function6 9 Using the transmission reception buffer 6 18 Transmission data at the device and states Te LT 7 13 Transmission delay me sese ee eee 3 19 Transmission frame 1 area eee A 12 7 2 Setting the buffer memory sees ee ee 7 3 Transmission frame 2 area eee A 12 7 4 Setting the buffer memory sees ee ee 7 5 Transmission reception buffer 5 15 5 28 Transmission reception time sese ee ee 3 20 Troubleshooting Confirming with the error code sss se 10 1 Confirming with the LED sees eee ee 10 5 Master stations ERR LED flashes 10 10 SYMPUOM bce eee ee eee 10 9 Trouble in general purpose input circuit 10 7 U User registration Tame eee eee 7 1 7 25 Buffer memory Setting sse eee eee eee 7 34 Normal character eee eee 7 25 Registering reading and deleting 7 34 Special charac
141. e history are stored in order of occurrence The error code that occurs when the initialization error complete signal RXn5 EEPROM function error complete signal RXn8 turns ON or at the transmission timeout is stored Rz 1B1H Error code at The error code that occurs when the transmission transmission error complete RXn1 turns ON is stored General error code Error code at The error code that occurs when the reception R2 1B2H E as read request RXn3 turns ON is stored Error state RX n 1 A Any error occurrence Error reset request RY n 1 A POINT If an initial data read request signal RY n 1 9 error occurs the error handling will not be carried out even if the error reset request signal RY n 1 A turns ON 10 TROUBLESHOOTING MELSEC A 10 1 2 List of error codes The configuration of the error codes stored in the buffer memory and a list of the error codes is given in this section Refer to the respective module User s Manual for details on the error codes that occur in the programmable controller CPU and master module 1 Error code configuration b15 bO Error code Error code list Error code Error name Cause of error Error remedy hexadecimal C Norma 0001 to 4FFF Refer to programmable controller CPU User s Manual B000 to BAFF ot Refer to Master Module User s Manual Automatic update timeout error Transmission timeout error Reception timeout error RS 2
142. e reception area size only the reception data that fits in the reception area will be stored before completing the reception 3 Program The following shows the program that completes reception forcibly The following program assumes that the buffer memory automatic update function is used Refer to Section 5 1 for program conditions a When using the FROM TO command with the ACPU QCPU A A mode Forced reception execution M100 X102 X103 Kd SET Y103 R2 normal X102 RST Y103 X103 CALLP P2 FROMP HO H400 D200 KI MOVP D200 Z FROMP HO H401 D201 KOZ CALLP PO SET Y102 Y102 X102 X103 RST Y102 Set forced reception complete request RYn3 Reset forced reception complete request RYn3 Change to bank 2 Read reception data size Store reception data size in Z Read reception data size Change to bank 0 Set reception read complete RYn2 Reset reception read complete RYn2 8 OTHER FUNCTIONS 1 Program for changing to bank 0 M9036 PO SET M9052 Specify partial refresh RST YICc Specify bank 0 RST Y1D SEG K4Y18 K4B1 Execute partial refresh 2 Program for changing to bank 2 Specify partial refresh Specify bank 2 Execute partial refresh b When using the dedicated command with the QCPU Q mode QnACPU Forced reception execution M100 x102 X103 SET vin Set forced reception completion request RYn3 R2 normal X102 RST vin Reset forced reception completion request RY
143. ea R2 buffer memory Intelligent device station FROM command read request Read process access request signal execution completion RY n 1 E R2 buffer memory Intelligent device station read completion access complete signal Se RX n 1 E 5 PRELIMINARY INFORMATION MELSEC A 1 When reading data from the R2 buffer memory using the FROM command the control data is designated in the transmission buffer of the corresponding master module Designated item Details Setting Setting data range side Dummyarea d S Station No designate with high order bytes bits 8 to 15 l Designate the station No of the intelligent device station 0 to 64 User Station No request to be accessed code Request code designate with low order bytes bits O to 7 40 hee H Designate the read request code Transmission buffer S S write data size byte Fixed value s Quantity Fixed value Access code attribute Fixed value 0004H Buffer memory address Designate the head address 0H or higher of the buffer On to SEFu memory l Designate the data size No of words to be written in so No S read points that the R2 buffer memory address 5FFu is not exceeded 14 to 480 eer wor 5FFH gt buffer memory address 1 No of read points 2 The same details as the data read from the R2 buffer memory with the FROM command is stored in the reception buffer of the corresponding master module Designated Details Setting data side The
144. ea address and size the range of the buffer memory to be automatically updated and the parameters etc can be changed from the default values 1 Before initializing 1 Secure the transmission reception buffer size by initializing the master station Transmission buffer Secure the transmission data size seven words Reception buffer Secure the reception data size seven words 2 Set the R2 mode setting switch to 0 no automatic update function 2 Flow of process Programmable controller CPU Master station R2 Bit device Word device 5 Intelligent device station access complete ON 7 Intelligent device station access Remote complete OFF Remote input RX i a fo Initialization normal error complete ON input RX fh 1 Initialization normal error complete OFF 2 Intelligent device station access request ON 6 Intelligent device station access ee request OFF Remote E Remote output RY 8 Initialization request ON output RY 10 Initialization request OFF 1 Control data initialization data 3 Initialization data Transmission buffer Reception 4 Control data buffer Steps 1 2 6 8 and 10 are carried out Steps 3 4 5 7 9 and 11 are carried out by R2 with the sequence program When using the RIWT RISEND command the steps 2 to 7 are carried out automatically 1 Steps 1 to 7 are carried out for one write operation If writing
145. eading reception data size SH400 P40 MOV Kt MOV H4 MOV H400 MOV KI G RIRD UO D180 D200 D181 D182 D183 D184 M155 2 Program for reading reception data SM400 PA MOV KI MOV H4 MOV H401 MOV D200 G RIRD UO D190 D201 M91 D192 D193 D194 M160 MELSEC A Set R2 station No Access code attribute R2 read destination buffer memory head address No of read points Read reception data size Set R2 station No Access code attribute R2 read destination buffer memory head address No of read points Read reception data 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 USING FRAMES WHEN EXCHANGING DATA 7 1 What are frames Frames are data added to match the external device specifications when transmitting and receiving data When data is transmitted using frames the end and head of the transmission reception data can be judged easily A program for adding the frame does not need to be created by the user when transmitting so the program can be simplified The R2 has the following two types of frames A statement can be transmitted and received by designating the registration No of the default registration frame and user registration frame E Registration nu to FEn The data for codes 01H to FEn 1 to 254 corresponding to the registration No is Frame preregistered in R2 registered as one byte The contents of the frame The arrangement of the data handled Section 7 5 1 can
146. ecceseaeacesacdeceeeeeedensecdeceeeatens 8 22 8 9 1 Correspondence of RS 232 C control signal and remote input output signal sese eee eee 8 22 8 9 2 Precautions for using RS 232 C control signal read write function 00 2 eee ee eee eee ee 8 23 8 10 Confirming the R2 switch states and Software Version eee eee eee eee eee 8 24 9 1 Conditions for program Tue TTT 9 1 9 2 Example of program for using buffer memory automatic update function sse eee eee ee ee ee eee ee e 9 2 9 2 1 When using FROM TO command with ACPU QCPU A A model sss sese eee eee eee 9 2 9 2 2 When using dedicated commands with ACPU QCPU A A model sese sese eee eee 9 6 9 2 3 When using dedicated commands with QCPU Q mode QNACPU sese eee 9 11 9 2 4 When using the FROM TO commands with ACPU QCPU A A mode Three R2 modules connected eee eeceeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeseaeeeaeeeaeeeaeeeaeeeaeesaeenaeeaeeeatesas 9 14 9 3 Example of program for using transmission reception Durer sese eee eee eee eee ee 9 28 9 3 1 When using FROM TO command with ACPU QCPU A A Mode uu sss sese sees eee eee 9 28 9 3 2 When using dedicated commands with ACPU QCPU A A model sese sese eee eee 9 37 9 3 3 When using dedicated commands with QCPU Q mode QnACPU sese eee 9 43 oO T vk gt O oO T N 10 TROUBLESHOOTING 10 T nrs eee LT T 10 1 10 1 1 Error code Storage area onuran eea ehhh ahi Mid ahh eet mie 10 1 10 12 Li
147. eception data S 4 Control data reception data When using the RIRD RIRCV command the steps 2 to 7 are carried out automatically 2 Timing chart Intelligent device station access request signal RY n 1 E g s Intelligent device station access complete signal RX n 1 E Programmable controller CPU word device Master station transmission buffer Master station gt ar reception buffer Y i R2 buffer memory aS 7 Carried out with sequence program Io Carried out by R2 Control side LS control data is written to the master station transmission buffer The intelligent device station access request signal RY n 1 E turns ON Program EE contents set in the control data are conveyed to the R2 R O ap ihe a a G 5 Tre trieligeni devos selon cease complets signal RXTE urns ON j The intelligent device station access request signal RY n 1 E turns OFF Program einige seves station aces complete signa XE ims OFF 8 The reception data is read from the master station reception buffer Program 5 PRELIMINARY INFORMATION 3 Program MELSEC A The program for reading the error codes R2 1B0 to 1B2 is shown below Refer to section 5 1 for details on the program conditions a To use FROM TO command with ACPU QCPU A A mode M132 X11 MOV MOV MOV MOV MOV MOV MOV TO HO HO M132 X11E M133 XI1E FROM HO H203 CALL
148. eception read complete signal RYn2 5 Reception normal error read request signal 3 RXn2 RXn3 6 7 R2 reception area 2 OS reception area OS reception area over flowing Ve S Sess 4 External device Data are transferred from the external device to OS reception area Data in the OS reception area are transferred to R2 reception area After storing data to reception area the reception normal error read request signal RXn2 RXn3 turns ON 4 The OS reception area overflows since data is sent continuously from the external device without being read out from the reception area 5 Turn ON the reception read complete signal RYn2 after reception data are read The reception normal error read request signal RXn2 RXn3 turns OFF with the reception read complete signal RYn2 ON The reception error read request signal RXn3 turns ON since the OS reception area has over flown 8 OTHER FUNCTIONS MELSEC A 8 4 ASCII BIN conversion of transmission data When exchanging data between the R2 and external device the data is transmitted and received as ASCII code data so ASCII BIN conversion can be carried out Set according to the specifications of the external device The R2 converts the data as follows with ASCII BIN conversion e When transmitting The transmission area data is interpreted as binary data and is converted into ASCII data before transmission e When receiving
149. ene a E SS Ver2 Remote input i jonstaioncont T Ver 2 Remote output E E 7 za Ver 2 Remote register Pw Special leuSB mmm G Retry count 3 Automatic reconnection station count D CF PLC down select Stop x Scan mode setting asynchronous Station information setting Station information Remote device station intial setting LT Interupt setting interupt settings 4 lt GPPW station information setting screen gt PE T Exclusive station Reserve invalid Intelligent buffer select word p count station select Send 0 AA Inteligent device station gt 9 PROGRAM EXAMPLES 1 Main program Confirm R2 data link state x0 XOF D AF 1 FROM H0 H680 KINI KI MI M100 NI SS OL R2 initialization Error LED X11B M100 M110 4 CALLP P10 W140 gt _ _ __ J CALLP P20 M145 SET M110 M100 M115 M110 W114 100 Y101 Y102 Y103 Y106 Y107 Y119 A T Ko YI1A o pg TRET 104 M100 M115 X104 1 t 1 RST 104 SE M114 X105 SET M35 M4 X104 x105 SE M115 Data transmission Transmission data ABCDEF M100 H115 Y100 X100 X101 W130 M135 X22 4 4 tt a TET 4125 W125 Transmission SW 1 CALLP pa W180 TO Y100 RST M125 W100 x100 RST Y100 x101 Data reception MI0oO M115 M125 M135 X102 l f t 1 H SET M130 x103 M30 Y102 l ENR CALLP P40 M155 H Hoe Ko D200 p OAL PAN M160 m SET Y102 M155 L HE Ko D200 Moo x10
150. eption data Check head frame 5FFu Reception data EEPROM Registration frame 1n SOH ee Data i reception l Kehz 1071 ETX FFF 1n 4AFu User registration frame STX Random data ETX FFF1n Head 1 section End 1 1 When R2 is the default value indicates the buffer memory address 1 Receiving using frames The head frame set in the reception head frame No designation R2 108H to 10Bu and the end frame designated in the reception end frame No designation R2 10CH to 10Fx are checked and the reception data is recognized The data reception method is the same as when a frame is not used non procedural communication so refer to Chapter 6 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 2 Setting the buffer memory The items to be set for the buffer memory used when receiving data using frames are shown below R2 buffer memory Name Details address When receiving data using frames designate the statement s head end frames Designate the No of the default user registration frame registered in the R2 EEPROM Up to four sets each containing a reception head end frame can be set For the initial value of the reception head end frame No refer to section 3 7 R2 1084 Head frame No 1 Reception head frame Ll R2 z H 1084 to 10BH No designation R2 109x Head frame No 2 anden R2 10Ax Head fra
151. equest scan of each area automatically updated during transmission reception With the default value for transmission the status storage area and transmission area 1 and 2 are updated With the reception default value the status storage area and reception area are updated lt Request response scan of area where data is written from master station to R2 gt Size of data to be automatically updated 16 72 x LS ms Decimal point rounded up lt Request response scan of area where data is written from R2 to master station gt Size of data to be automatically updated 16 16 x LS ms Decimal point rounded up 3 20 3 SPECIFICATIONS MELSEC A 2 Calculation example a Transmission time An example of calculating the transmission time for transmitting 10 words 20 bytes of data is shown below Setting details Default value Transmission speed 156kbps No of connected modules Only one R2 module Master station sequence program scan time 20ms Hypothetical Transmission speed 9600bps Data bit length Stop bit length Parity bit 1 When the master station is the A QnA series LS 51 2 29 4 8 x 4 8 8 x 9 6 1 x 32 4 1 x 4 8 1 x 9 6 1300 11100us 11 1ms Data transmission time 20 x 10 9600 0 0208s 20 8ms Transmission time 20 x 2 11 1 x 6 11 1 x 2 1 20 8 136 16 72 x 11 1 512 16 72 x 11 1 4 32 16 16 x 11 1 149 6 3x 11 1 8 x11 1 3x1
152. er Example Writing in the reception complete data size and reception timeout time Master module Programmable controller CPU Transmission buffer R2 Address Refer to control data a 1000 to 14FFH of Q QnA Series Address _ One word Write Reception complete data size designation 1114 a complete data size designation each data Reception timeout time designation On to 1FFH ees of A Series bank 1 Address Q QnA Series A Series Reception buffer 12004 Bank 1 M 200 Complete status 12014 Bank1 M 2014 Station No request code a Control data Note that the control data differs between the QCPU Q mode QnACPU and ACPU QCPU A A mode as shown below When using ACPU QCPU A A mode When using QCPU Q mode QnACPU Control data Control data Complete status Complete status One word No of write points words Station No each Access code attribute es Access code attribute Buffer memory address Buffer memory address No of write points words 5 PRELIMINARY INFORMATION MELSEC A 2 When using RISEND command This is used to write to a R2 designated buffer memory with executing handshake automatically between the master station and R2 When using the RISEND command the master station buffer memory will be used as the transmission buffer for the control data and write data The complete status will be stored in the reception buffer Example Writing and transmitt
153. er Reset SW YHA XITA l HF RST RST Write remote output RY Y100 to Y11F a XO XOF xi H135 Y11A Y11A y91 Error LED PO K2 ome To HO H160 K4Y100 M9036 H Zi te RST E ORT SEG KMS FEND 9052 Y1c UI K4B1 ae RET M9052 TIC MELSEC A Reset error occurrence flag Error reset request Error reset complete Turn OFF error LED Change to bank 0 Write Y100 to Y11F in RYn0 to RY n 1 gt Change to bank 0 gt Change to bank 2 9 PROGRAM EXAMPLES 9 2 2 When using dedicated commands with ACPU QCPU A A mode MELSEC A An example of the program for using the dedicated commands with the ACPU QCPU A A mode when using the buffer memory automatic update function is shown below Master station initialization x0 MOV MOV MOV MOV MoV MOV FROM HO H668 Read remote input RX X100 to X11F XQ XOF X1 Confirm R2 data link state FRON HO aez MW XF u d FROM HU H680 XOF s E KO KI H2101 HO HO H600 LEDC LEDC D8 CALL K4X100 K1M1 MS LEDR Ki PO K2 Ki W100 D ke io Error LED Synchronization mode invalid No of connected modules 1 module R2 station information intelligent one station occupied station No 1 Set transmission buffer size Set reception buffer size Set automatic update buffer size Dedicated
154. es AONA Seres Automatic update buffer R2 buffer memory Station 1 2 Bank 21 M 0u to 19Eu TMI 2000u to 219FH Initial setting area Initial setting area for 1A0H R2 Onto 19FH M 118x to 19FH M 2118H to 219FH Sending area 1 Sending area 1 for 88x R2 118H to 19FH IM 1A0n to 1BFH M 21A0n to 21BFH Status storage area Status storage area for 20H R2 1A0x to 1BFH Station 1 a R2 2001 to 2FFH R2 3001 to 3FFH M 1COx to 2BFH M 21C0h to 22BFH Sending area 2 for 100n Sending area 2 Receiving area for 100x Receiving area M 2C0n to 3BFH M 22C0n to 23BFH R2 butfer memory Station 2 S 9 Macau to 55Fx M 23C0u to 255FH Initial setting area for 1AQx R2 Onto 19F M 4D8x to 55Fx M 24D8n to 255Fu Sending area 1 for 88x R21 18x to 19FH Scan 24 M 560 to 57FH M 25601 to 257FH Status storage area for 20x R2 1A0u to 1BFH anf Sending area 2 for 100 R2 2 to 2FF M 2580n to 267FH as Hy R212900 to 2FF Receiving area for 1001 When using the dedicated commands specify the station number and R2 buffer memory address R2 900n to 3FFH M 26801 to 277Fu When using the FROM TO commands specify the buffer memory address of the master station where the R2 buffer memory has been assigned 5 PRELIMINARY INFORMATION MELSEC A 5 3 Program basic format The basic format for creating a program is shown below The program is crea
155. eset error occurrence flag Error reset request Error reset complete Turn OFF error LED 9 PROGRAM EXAMPLES 9 3 Example of program for using transmission reception buffer MELSEC A An example of the program for using the transmission reception buffer is given below 9 3 1 When using FROM TO command with ACPU QCPU A A mode An example of the program for using the FROM TO command with the ACPU QCPU A A mode when using the transmission reception buffer is shown below 1 Main program Master station initialization X0 XOF NU MOV TO HO H1 MO MOV TO HO H20 MOV MOV MOV TO HO H80 NO X6 X7 FROM HO H668 Read remote input RX X100 to X11F AU XOF Xt FROM HO HOEO Confirm R2 data link state XO XOF Xt Ked H680 PLS Kt DO H2101 D4 H200 H200 HO DS SET SET L COU RST CALL K4X100 KIMI MO DO Ki D4 Kl Y6 PO K2 Ki Error LED No of connected modules 1 module Write to master station R2 station information intelligent one station occupied station No 1 Write to master station Set transmission buffer size Set reception buffer size Set automatic update buffer size Write to master station Refresh indication Start data link with buffer memory Turn start request signal OFF when normal Read parameter state when abnormal Turn start request signal OFF Change to bank 0 Read RXn0 to RX
156. esh indication SET Y6 Start data link with buffer memory Turn start request signal sr Y6 q g OFF when normal FROM H0 H668 D8 K Read parameter state when abnormal RST YB Turn start request signal Read remote input RX X100 to X11F OFF XO XOF Xi k CALL PO Change to bank 0 FROM H HOEO K4X100 K2 Read RXn0 to RX n 1 F Confirm R2 data link state XO XOF X1 m H680 to X100 to X11F Read R2 data link state SW0080 M100 R2 data link normal R2 data link error Error LED 9 PROGRAM EXAMPLES R2 initialization initial data read M100 M105 M104 X119 X11B HF F HF SET X119 X1 1B TT SET M104 X119 X11B t SET R2 initialization initialization data write M100 M105 M110 K20 K20 CALL SET R2 initialization initialization execution M100 M115 M110 M114 100 Y101 Y102 Y103 Y106 Y107 Y119 IIA Ko 5P SET M100 M115 X104 M14 X104 X105 1 FE SET Data transmission Transmission data ABCDEF X22 Jeg Transmission SW M100 M115 Y100 X100 X101 M120 f F M125 Mov K3 oy H4241 Mov H4443 mov H4645 URU c T Ho H200 D100 P2 Kl P2 04 04 20 25 00 01 02 03 K4 Lad LA Lo LA f Lo Lo Lo J MELSEC A Set initial data read request Reset initial data read request Complete initialization Change to bank 2 Set re
157. etion request signal RXn2 execution normal completion Reception error read At reception request signal RXn3 error completion I Reception read complete Reading of buffer signal RYn2 memory 5 PRELIMINARY INFORMATION a Control data MELSEC A Note that the control data differs between the QCPU Q mode QnACPU and ACPU QCPU A A mode as shown below When using ACPU QCPU A A mode Control data Complete status No of read points word One word Fixed to 0004n each Error confirmation Buffer memory address b Interlock signal When using QCPU Q mode QnACPU Control data Complete status Station No One word Access code attribute each Buffer memory address No of read points word Note that the interlock signal differs between the QCPU Q mode QnACPU and ACPU QCPU A mode as shown below When using ACPU QCPU A A mode Interlock signal b15 to b8b7 to bO One S RX Complete device RY Request device each RWr Error code storage device When using QCPU Q mode QnACPU Interlock signal storage device b15 to b8b7 to DU One word Pee G plete device Complete mode 5 PRELIMINARY INFORMATION MELSEC A 6 Using the FROM command Not available when using QCPU Q mode This is used to read the R2 designated buffer memory When the FROM command is used the transmission buffer master module buffer memory for
158. g the buffer memory using the transmission reception buffer sese ee ee eee 5 28 9 21 QuUING citi E EE ERE EE EEA iia diated hie ell ciel cle nl doles ebb ead eee ech 5 28 SCL ADOUt COMMON ates cc ceteuecttdenceeecetsentienieetels a 5 29 5 7 3 Reading the R2 sH din eT 5 40 5 7 4 Writing to the R2 buffer mema sese ee eee ee ee eee eee 5 43 6 1 Matters to understand before transmitting data oo sese 6 1 6 2 Matters to know before receiving data sese 6 5 6 3 Exchanging data using the buffer memory automatic Update FUNCTION sese eee eee ee eee ee eee 6 9 6 3 1 Transmitting data to an external device esse sese s sese e sese e ereenn 6 9 6 3 2 Receiving data from an external device sese 6 14 6 4 Exchanging data using the transmission reception Duet eee eee ee eee eee 6 18 6 4 1 Transmitting data to an external device sese eee eee 6 18 6 4 2 Receiving data from an external device sss ses ses ses ees sese ereenn 6 24 A Whatare ames cnc nadiintnaineh nade een edn T RA 7 1 7 2 Transmitting data using frames 20 sese eee ee eee eee eee ee 7 2 7 2 1 Transmitting using transmission frame 1 APC eee eee ee eee ee eee eee 7 2 7 2 2 Transmitting using the transmission frame 2 area eee eee ee eee eee ee eee 7 4 7 3 Receiving data USING fames aaaeei 2 013 Z TT REES TET O 2 Ta TER ET Ta TZ aaa TE TIR Ts 7 6 P n H Reception Cette sete cates i eens ee i en ea ee oe a a es a a a Ms eee 7 8 7 3 2 Reading the reception data eeceecceec
159. ghest digit transmitted received 1 If the head frame is not designated the transmission reception data section range will be calculated as the sum check target 7 30 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 1 Transmission reception data corresponding to EEH to F3H The user registration frame section corresponding to the special character Nos EEx to F3H uses the range excluding the head frame of the transmission reception data statement to transmit receive the calculated sum check code as binary ASCIl data User registration frame registration code Transmission reception data corresponding to registration code Transmission reception data code Calculation range The calculation target is the range from the data following the user registration frame 1 head frame worth at the head of the transmission reception data to just before the sum check code is designated Example Arrangement of data for transmission reception User registration frame Random data User registration Head frame frame End frame 10u 03 EE F14 0Du 0An Ei sum iCil The programmable controller CPU Sum check cod ot ean Cone side is calculated by the R2 calculation range Calculating the sum check code This is the value obtained by adding the data in the above range as binary data In case of example H L 41H 31H ABH 12H 03H 0132H The details arrangement when transmitti
160. he ON OFF state of the remote input RX remote output RY is referred Depending on whether the designated RX RY is ON or OFF the designated registration frame s registration data is transmitted FFu COn RX RY designation 1 Registration frame No at ON Registration frame No at OFF Example To transmit designated data with RX1 ON OFF At RX1 ON Transmit registration frame No 3E8H registration data At RX1 OFF Transmit registration frame No 3E9u registration data EE l Cul 0101 3E8x 3E9u During frame transmission the remote register RW value is referred to and the designated registration frame registration data is transmitted according to the results of the comparison with the designated value If the RW value referred to is 8000u the contents of the transmission area are transmitted RW Compari Registration frame No Registration frame No Registration frame No designation 1 son value RW comparison value RW gt comparison value RW lt comparison value To refer to the RW123 value and transmit the designated registration frame data at the following conditions When RW comparison value Transmit registration frame No 3E8x registration data When RW gt comparison value Transmit registration frame No 3E9u registration data When RW lt comparison value Transmit registration frame No 3EAu registration data FFu C1n 1234 5 3E8H 3E9u 3EAn C2uH to CFH Use prohibi
161. hich can be used by the two R2 modules will be C80u The size per module will be 640n Master station 10004 worth Initialization status storage area 1C0x worth 1st station automatic lt update buffer Other area J Initialization status storage area 1COs worth Total C801 6401 per module 2nd station automatic VA date buff lt eae ge Other area gt L 5 PRELIMINARY INFORMATION MELSEC A 2 When connecting four R2 modules Master station automatic update buffer 1000x Initialization 1A0H Status storage area 20011 x 4 900H The size of the areas other than the initialization area which can be used by the four R2 modules will be 900n The size per module will be 2400 Master station 1000 worth Initialization status storage area 1C0x worth 1st station automatic update buffer lt Other area l Initialization status storage area 1C0Ox worth gt 2nd station automatic update buffer Other area K Total 900 Initialization status storage area 1C0 worth 240 per module 3rd station automatic d E update buffer Other area Ka J Initialization status storage area 1C0n worth Ath station automatic J update buffer Oth er area J 3 When connecting eight R2 modules Master station automatic update buffer 10001 Initialization 1A0H Status storage area 20H x 8 2000 The size of the areas other than the initializatio
162. ications eee eee eee ee eee ee 3 1 H Hardware est 4 11 I Initialization area eee ee eee 5 21 Index 1 Initializing Buffer Memory asses sese sees sese e eee e ereer eee 8 14 EEPROM 32 2 3 20k ative casita 8 18 Master station 5 7 asas nadie aiid 5 9 PR e T e 5 12 Using the buffer memory automatic update FUNCION as hapa a aeaaee EREA 5 12 Using the transmission reception buffer 5 15 Initializing the master staon eee eee 5 9 Initializing the R2 see 5 12 8 14 Input output signals Detail xsiicih tet eet ee 3 8 B TTT 3 7 Installation environment eee eee eee e 4 5 L WED E E E E one ee ieee T 4 6 Listiof functions na 3 6 M Main Tunction cicauinie Ane 3 6 Master modules sees eee 2 2 Master station buffer SIze 5 10 Mode setting Switch eee eee eee 4 7 Monitor transmission Devices and statuses that can be designated ne E Se Ren Ree ta tenet i ote Re 7 14 Precautions wicc h2 8 chien nan een 7 21 Setting the buffer memory eee ee ee 7 15 Monitor transmission area eee ee 5 23 N Name of each part and seting sees 4 6 No of connected modules eee 5 9 Normal character 7 25 O Operation display LEDS sese 4 6 QUUING 2 2452 1222 Ha Saa TS iaa 1 1 Outline dimension drawing Appendix 1 P Performance specifications 0 3 2 Programmable controller CPU eee 2 2 Pr6CAUtiONS TTT 4 3 4 8 ASCII BIN Conversion ee ee 8 10 Monitor transmission eee
163. iming Refer to section 7 4 2 Monitor interval time for R2 to monitor device or status used as data transmission timing By using this function the programmable controller CPU does not need to be aware of the data transmission timing Master station RXF Buffer memory RXO RX7FF RX7FO RYF RYO RY7FF RY7FO 1 External device Buffer memory specific application area CEN sled Transmission table 1 Setting for monitor transmission 1 Setting for Transmission transmission table table 3 Transmit data according to details designated in transmission table Generation of transmission trigger Designate the monitor transmission data in the monitor interval time designation R2 70x No of monitor designation R2 71H and monitor designation 1 to 64 R2 78H to F7H areas Designate the No of the registered frame to be transmitted the transmission area can also be designated in the transmission table designation R2 122H to 185n R2 monitors the device or status on CC Link When the transmission trigger is detected the R2 follows the details of the transmission table designated by the user and transmits the contents of the transmission table to the external device 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 4 2 Devices and statuses that can be designated The devices and statuses that can be monitored
164. iming of transmission trigger status generation b14 OFF CC Link data Programmable The transmission trigger is troller CPU Pe Running Stopped generated when the R2 operation status 1 detects a change in each status Programmable controller CPU Error Normal status When the parameters have been set with the GPP function or RLPA command the master station CPU s RUN STOP status will be the trigger generation conditions If the parameters have been set with the sequence program the ON or OFF of the master module s refresh indication YnO will be the trigger generation condition ON CPU operation status running OFF CPU operation status stopped 2 The CPU error will be the condition of generating a trigger for an error related to the stopping of the CPU Refer to the CPU module User s Manual for details c Transmission data designation area R2 79x 7BH F51 F7H 1 When monitoring the device status with the monitor target designation the designation destination of the data to be transmitted if the R2 detects the transmission trigger generation is designated 2 For the transmission data designation the head No of the transmission table in which the transmission data is designated and the transmission table size are designated for the R2 transmission table R2 1224 to 185p b15 b8 b7 bO Transmission No table size s Head No Designate the No of the transmission table in
165. ing 2 word transmission data to master station Master module Programmable controller CPU Transmission buffer R2 Refer to control data a Address M 1000 to 11FFH of Q QnA Series Address Reception data size Transmission data size One word A ei M On to 1FF Trans rE Write data Transmission data 1 HO H asi Transmission data 1 each of A Series bank 1 DSS E area TER Transmission data 2 Transmission data 2 Refer to interlock signal b Address Q QnA Series A Series Reception buffer M 12001 Bank 1 M 200 Complete status Transmission request signal RYn0 Transmission normal complete signal RXn0 Transmission error complete signal RXn1 M 12014 Bank 1 201 Station No request code RISEND command execution complete RISEND command Writing to execution buffer menion ee At transmission normal completion At transmission error completion 5 PRELIMINARY INFORMATION a Control data MELSEC A Note that the control data differs between the QCPU Q mode QnACPU and ACPU QCPU A A mode as shown below When using ACPU QCPU A A mode Control data Complete status No of write points word Fixed to 00041 One word each Error confirmation Buffer memory address b Interlock signal When using QCPU Q mode QnACPU Control data Complete status Station No One word
166. ion R2 3 OS reception area clear complete ON Seto 5 OS reception area clear Remote input RX EE n input RX Remote output RY OS recep tion area 2 OS reception area clear execution Bit device 1 OS reception area clear request ON 4 OS reception area clear request OFF 3 Timing chart OS reception area clear 1 request signal RYn6 gt 2 Clear OS l reception area OS reception area clear 3 complete signal RXn6 lt Carried out with sequence program ores Carried out by R2 Control side 1 The OS reception area clear request signal RYn6 turns ON 2 Clearing of the OS reception area starts When clearing of the OS reception area is completed the OS reception area clear complete signal RXn6 turns ON 4 The OS reception area clear request signal RYn6 turns OFF 5 The OS reception area clear complete signal RXn6 turns OFF e Only the OS reception area is cleared with the OS reception area clear function The R2 buffer memory reception area is not cleared e When using non procedural reception or frame reception if the OS reception area clear function is carried out all of the reception data stored in the OS reception area will be cleared 8 OTHER FUNCTIONS MELSEC A 4 Program The program for clearing the OS reception area clear when the reception error read request turns ON is shown belo
167. ion with an external device are explained in this section 8 1 Canceling data communication to an external device After the transmission request signal RYn0 has been turned ON if the transmission cancel request signal RYn1 is turned ON before the transmission normal error complete signal RXn0 RXn1 turns ON the transmission to the external device will be canceled When this function is executed the transmission error complete signal RXn1 will turn ON The outline of this function is explained using the buffer memory automatic update function 1 Flow of process Programmable controller CPU Master station R2 External device 7 Transmission error complete ON 9 Transmission error Remote complete OFF input RX A Remote I output RY 3 Automatic read Bit device WHF Remote let input RX 2 Transmission request ON 5 Transmission cancel 3 request ON N Remote Transmission request OFF output RY Transmission cancel request OFF Word device 1 Transmission data write 4 Data transmission Rt HT Automatic update buffer Trans mission 6 Transmission cancel area gt lt RS 232 C p Reception 2 Timing chart Programmable Word device controller CPU Transmission data Transmission request signal RYn0 Transmission cancel request signal RYn1 Transmission error comple
168. is to be carried out multiple times because the addresses of the buffer memories to be written are separated etc carry out the steps for each write operation Steps 8 to 11 initialization must be carried out when changing OH to 112H Initialization is not required to change the other buffer memories 5 PRELIMINARY INFORMATION MELSEC A 3 Timing chart Remote station read signal RX n 1 B Intelligent device station access request signal RY n 1 E Intelligent device station access complete signal RX n 1 E Initialization request signal RYn4 Initialization normal error complete signal RXn4 RXn5 Programmable controller CPU word device Y Master station X A i transmission buffer T S reception buffer I 4 R2 buffer memory One write operation Required to change On to 1124 Carried out with sequence program a Carried out by R2 Control side The value of buffer memory to be changed and control data is written to master station s 1 be Program transmission buffer 4 The control data is stored in the master station reception buffer R2 The initialization request signal RYn4 turns ON Program Initialization is carried out by R2 and when completed the initialization normal signal RXn4 or R2 error complete signal RXn5 turns ON 10 The initialization request signal RYn4 turns OFF 11 The signal turned ON in step 9 t
169. ived the R2 turns the reception normal read request signal RXn2 or reception error read request signal RXn3 ON 4 Setting the buffer memory The following buffer memories are related to the reception of data PADUNE Name Details memory address Designate the head address of the R2 buffer memory to be used as the reception area Reception area head Always designate 2000 or above which is the user free area address designation Set so that the area is not duplicated with areas used by other functions Setting range 2004 to 7FEH Default value 4004 Designate the size of the R2 buffer memory used as the reception area Reception data size storage area reception data storage area size Set the reception area size to be 2H or more Reception area size designation 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A D Name Details memory address Set the transmission data and reception data unit word byte for when exchanging data between the R2 and external device Word byte unit 0 Word unit default value 1020 designation 1 Byte unit This is also used as the unit of the values handled in the actual transmission data size storage area R2 1B41 and OS reception area data size storage area R2 1B6x Designate the reception complete data size for setting the reception data random data when receiving frames read to a fixed length Designate the reception complete data size value so that it is smalle
170. l Non procedural data transmission reception with external communication device such as barcode reader ID controller general Chapter 6 purpose personal computer Buffer memory Automatically updates the buffer memory between the R2 automatic and master station at the update timing set in each area of Section 5 6 update the R2 buffer memory Adds a frame registered for R2 at the head and end of the transmission data when transmitting data G Frame addition Automatically transmits data to the external device when the user designated transmission conditions changes in RX RY Section 7 4 RW and status are established Monitor transmission After transmission request is issued from the master station to R2 forcibly cancels the transmission before R2 completes Section 8 1 transmission to external device Transmission cancellation Forcibly completes the reception when reception data from external device has not reached the reception complete data Section 8 2 size etc and reads out the currently received data Stops resumes transmission of data from external device according to open space in R2 OS reception area l Flow control i l Section 8 3 Auxiliary Stops resumes transmission of data from R2 according to requests from external device functions ASCII BIN Carries out ASCII BIN conversion on the S A S Section 8 4 conversion transmitted received data RW update Assigns master station remote register RW and R2 side Sec
171. l be stored with the same details and arrangement as registration Example Details designated in user registration frame area for registering the user registration frame into the EEPROM to transmit the ETX sum check code CR and LF registration code 03h 1C8x User registered FFH F1H ODH OAH to 1EFH b15 b8 b7 bU 2nd byte FFx 1st byte 031 4th byte 0D l 3rd byte F1n 6th byte Ox B byte OA H L L Designate registration data In the above diagram 5 is designated for the registration frame byte size designation R 2 1C7x O Setting possible X Setting not possible Stored 4 Example of program for registering user registration frame An example of a program for registering the user registration frame is shown below The following gives a program example for registering the user registration frame This example assumes that the buffer memory automatic update function is used Refer to Section 5 1 for program conditions a When using the FROM TO command with the ACPU QCPU A A mode Registration execution MOV KI D20 EEPROM function designation 1 MOV H3E8 D21 No of user registration frame to be registered 3E8x CALL P2 Change to bank 2 TO HO HICO D20 K2 Write setting value to R2 CALL PO Change to bank 0 MOV K5 D22 Byte size of data to be registered 5 MOV HOFFO3 D23 Registration data 1 O3x FFH MOV HODF3 D24 Registration data 2
172. l i E de 3 5 i R2 initialization area Carried out with sequence program d Carried out by R2 Control side 1 The initial data read request signal RY n 1 9 turns ON 2 The remote station READY RX n 1 B turns OFF The initialization area R2 OH to 19FH and status storage area R2 1A0u to 1BF are stored in the master station s automatic update buffer 10 The contents of the master station s automatic update buffer are stored in the initialization area R2 0u to 19FH If the R2 initialization is completed with an error remove the cause of the error and repeat the initialization request until the process ends normally R2 will not accept other requests until the initialization is completed normally If an initialization error occurs the remote station READY signal RX n 1 B will turn OFF 5 PRELIMINARY INFORMATION MELSEC A 4 Program Refer to section 5 1 for details on the program conditions Master station initialization parameter setting data link setting Refer to section 5 4 L Reading of remote input RX Refer to section 5 3 2 i Confirmation of R2 data link status Refer to section 5 3 3 M100 M105 M104 X119 X11B SET 119 Set initial data read request R2 normal 119 X11B RST Y119 Reset initial data read request SET M104 M104 Ve qe e SET M105 L Initial data read complete RST M104 M100 w105 ig m
173. ld lead to fires trouble or malfunctioning e Never disassemble or modify the module Failure to observe this could lead to trouble malfunctioning injuries or fires e The module case is made of resin so do not drop it or apply strong impacts on it Failure to observe this could lead to module damage e Tighten the terminal screws within the specified torque range A loose terminal screw could lead to short circuiting or malfunctioning If the terminal screw is too tight short circuiting or malfunctioning could occur due to screw damage e Dispose of this product as industrial waste e Use this module within the general specification environment described in the manual Use in an environment outside the general specification range could lead to electric shocks fires malfunctioning product damage or deterioration e Securely fix the module with the DIN rail or installation screw Tighten the installation screw within the designated torque range A loose screw could lead to dropping short circuiting or malfunctioning If the screw is too tight dropping or short circuiting could occur due to screw damage s Before installing or removing the module on the panel be sure to shut off all phases of external power supply used by the system Failure to shut off all phases could lead to module trouble or malfunctioning 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 1 Tighten the module installation screws and terminal block s
174. le correctly The module transmission speed setting switch may be faulty Please consult your local Mitsubishi representative explaining a detailed description of the problem Are the station No setting switches set correctly Are they duplicated with other station The module station No setting Correctly set the station No switches may be faulty Please consult your local Mitsubishi representative explaining a detailed description of the problem Reapply power to or reset slave station Are the station No setting switches set correctly Are they duplicated with other s Yes X y The module station No setting Correctly set the station No switches may be faulty Please consult your local Mitsubishi representative explaining a detailed y description of the problem Reapply power to or reset slave station End 1 Check for a short circuit reverse connection disconnection the terminator FG connection overall distance and distance between stations 10 12 APPENDIX MELSEC A APPENDIX Appendix 1 Outline dimension drawing 63 5 2 4 5 installation hole 45 N x BRATE STATION NO a x10 xT RS 292 C 204 04 gba PwO s00 xcO E 2 28 2 ss oe NAAN ll L RUNO ERR O yeO G 5 5 s00 yoO MOD
175. llowing interlock circuit to prevent the transmission cancel request signal from being accepted during processes other than the transmission request Transmission Transmission Transmission Transmission request normal error cancel signal complete complete command RYn0 signal RXn0 signal RXn1 i AY f ser evn H 8 OTHER FUNCTIONS MELSEC A 8 2 Forcibly completing reception This function is used to forcibly complete the reception when the reception read request signal is not ON and to read the currently received data With this function if the reception data size data is not received even after a set time the reception is forcibly completed when data for which the head frame end frame cannot be pinpointed is received The outline of this function is explained using the buffer memory automatic update function 1 Flow of process Programmable controller CPU Master station R2 External device 5 Reception normal error read request Bit device ON Remote 9 Reception normal Remote input RX error read request input RX OFF 1 Forced reception complete request ON 6 Forced reception complete request OFF 8 Reception read complete ON Remote output RY 10 Reception read complete OFF Word device Reception area 7 Reception data read 4 Automatic read 3 Transmit to reception area 1 Data reception OS rece
176. low control designation Check the RS 232 C wiring 10 TROUBLESHOOTING MELSEC A Error code Error name Cause of error Error remedy hexadecimal The received check sum is Sum check error incorrect A special character that Special character cannot be used for the head usage area or end frame during frame reception was designation Data that cannot be converted from ASCII to binary was received ASCII gt binary conversion error A command frame that cannot be used with the R2 was used e Correct the registered frame s check sum designation e Check the data received from the external device e Noise may be the cause e Correct the reception head end frame No designation e Check the data received from the external device e Noise may be the cause e Correct the command frame Reception frame There is an error in the data ls Correct the access code No of processing points and BB42 error received by the R2 attribute etc The value designated in the transmission reception area head address designation area of the buffer memory is incorrect Head address BB81 designation error BB82 The value designated in the various assignment designation area of the buffer memory is incorrect Assignment designation error The value designated in the parameter area of the buffer memory is incorrect Parameter error BB83 BB88 BB89 BB8A BB8B BB8C EEPROM write An
177. me No 3 R2 10Bx Head frame No 4 3rd set LR2 10Ch End frame No 1 R2 10D End frame No 2 R2 10E End frame No 3 R2 10F4 End frame No 4 OH 0 No designation 1H to 161H 1 to 353 Designate default registration frame 3E8H to 4AFH 1000 to 1199 Designate user registration frame 10Cu to 10F 4 Reception end frame When the reception head frame No is set to 0 the following reception No designation head frame Nos will be invalid R2 1084 Head frame No 1 109 Head frame No 2 10A Invalid 10Ba Head frame No 4 Designate whether the store the data at the received head frame and end frame sections in the received order into the R2 reception area in the same manner as the random data section Reception head When Do not abort 0 is designated the reception head end frame 1104 frame reception end section data will also be stored in the reception area Esas When Abort 1 is designated the reception head end frame section g data will be aborted and will not be stored in the reception area 0 Do not abort 1 Abort default value During frame reception the No of registration frame set 1 to 4 designated with the reception head frame No designation R2 1 108x to Reception frame 10Bu and reception end frame No designation R2 10Cn to 10Fx 1B5H index No storage used for reception and read request is stored 0 Do not use frames 1 to 4 nth set de
178. mission Monitor transmission Koor reception Frame 1 transmission Frame 2 During transmission The data code 00H NUL data 1 byte is transmitted During reception The check of the section corresponding to the registration frame 1 byte worth is skipped Received as normal data 1HtoBFuH Use prohibited Data in a random registration frame is transmitted according to the RX and RY ON OFF state and RW value comparison Refer to c for details EOu to EDH Use prohibited The check sum corresponding to the designated range of the statement is transmitted and received EEn to FAH lior checking the statement to be transmitted or x x x received Refer to d for details FBn to FEn_ Use prohibited O ee COH to DFH O x FFH The data code FFu data 1 byte is received O Usable X Not usable c RX RY RW reference special characters The RX RY RW reference special characters refer to the ON OFF state of the master station s designated remote input RX remote output RY and the remote register RW value and transmit the designated registration frame data according to the details The RX RY RW reference special characters are designated with the following arrangement FFu Special character code RX RY RW designation Designation of registration frame etc L hon aa v v ist byte 2nd byte 3rd 4th byte 5th byte and followings 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 1 Design
179. n 14H 15H 16H 17H area 18H 19H 1AH 1BH Reception area e R2 1C R2 1Dx R2 1E 1FH Initialization area _ Initialization area _ R2 20n R2 22 23H fame csa R2 2s R32 R2 2A RZ 2B Monitor trans 2CH 2DH 2EH 2FH mission area 30H 31H 32H 33H a Transmission size Designate the size No of addresses to be automatically updated 0 No designation Other than O Transmission size No of words b R2 side head address Designate the head address of the R2 side data range to be automatically updated c Fixed value Designate 4004H Note that the default value is 4004p so this does not need to be changed d Master station side offset address Designate the head address of the master station side data range to be automatically updated Designate using OH for the head address of the automatic update buffer assigned for R2 in the master station automatic update buffer Example When R2 is the 2nd station Buffer memory address Master station 2nd station R2 M 0x R2 0 c Initializati l Z r st station automatic E update buffer 6001 1 Status storage area R2 1A01 On a 3 M 600 wok Initialization area Lo K 19FH 2nd station automatic update buffer 6001 Status storage area TAU i M BFFu 2 8 i Master station side offset address 5 PRELIMINARY INFORMATION M On M 118 M 1A0 M 160 M 1C7 M 1FO M 200 M 400
180. n area When OS reception area clear is completed the R2 turns the OS reception area clear complete RXn6 ON so the OS reception area clear request RYn6 will turn OFF OS reception area aa l clear complete reception area clear request RYn6 R2 clears the OS reception area OS reception area clear complete RXn6 When the R2 EEPROM function is executed after the data is read into the R2 buffer memory 1C0H EEPROM function request RYn7 turns ON l When completed normally EEPROM function normal complete RXn7 turns ON EEPROM function _ wWhen completed abnormally EEPROM function error complete RXn8 turns ON normal complete When these signals turn ON EEPROM function request RYn7 turns OFF EEPROM function request RYn7 R2 executes EEPROM function normal complete EEPROM function EEPROM function Rxn7 or EEPROM function error complete error complete RXn8 This signal indicates the control signal status CS DR CD signal during RS 232 C communication with an ON or OFF state This signal indicates the status of the R2 general purpose external input XC XD General purpose status with an ON or OFF state t input signal Si aes RXnC Corresponds to XC RXnD corresponds to XD When writing in the initialization data before executing initialization the initial data read request RY N 1 9 turns ON and the initialization data is written to the master station At this time remote station ready RX
181. n area which can be used by the eight R2 modules will be 200p The size per module will be 40H Master station 1000 worth r Initialization status storage area 1C0x worth 1st station automatic 2 update buffer Other area L Pa 2nd station automatic J Initialization status storage area 1C0x worth L 3rd station automatic Initialization status storage area 1C0x worth update buffer Other area 4th station automatic Initialization status storage area 1C 0x worth update buffer Other area Total 2001 404 per module 5th station automatic Initialization status storage area 1C0x worth update buffer Other area 6th station automatic Initialization status storage area 1C Ox worth update buffer 7th station automatic ion status storage area 1C0x worth update buffer Other area Initialization status storage area 1C0x worth 8th station automatic 5 PRELIMINARY INFORMATION MELSEC A b An example for reducing each area is shown below Example To transmit and receive 20 word data to connect eight R2 modules Transmission size R2 side head address Master station side offset Area name address EEPROM function area User registration frame area Default value Om 2 20s Monitor transmission area 1 2CH OH 2DH 2FH Monitor transmission area 2 30H OH 31H 33H Master station automatic update buffer offset addres
182. n3 X103 G RIFR UO KI H400 D200 KI Read the number of received data Ki H401 D201 D200 Read received data Set reception read SET Y102 completion RYn2 102 X102 X103 Reset reception read S TES completion RYn2 e Configure the following interlock circuit to prevent the forced reception complete request signal from being accepted during processes other than the reception read request Reception Reception Forced normal error reception complete complete complete signal signal oe RXn2 RXn3 WP 4 f er RYn3 H 8 OTHER FUNCTIONS 8 3 Flow control MELSEC A This function notifies the partner device whether the local station can receive data e When R2 is receiving data Whether to cancel restart transmission to the R2 is notified to the external device according to the amount of space open in the R2 OS reception area s When R2 is transmitting data The transmission from the R2 is canceled restarted according to the requests from the external device The cancel restart is notified with the DC code control or DTR ER DSR DR signal control hereinafter DTR DSR signal control 1 DC code control The R2 notifies the external device whether the local station can receive data by transmitting DC1 DC3 Whether the external device can receive data is confirmed by receiving DC1 DC3 a DC1 DC3 transmission control If the amount of space open in the OS reception area is less than 64 bytes the R2
183. nZ Store data received from D251 9 PROGRAM EXAMPLES H570 D13 e OR O TRET RST Reset SW X125 X25 X13A F l H SE Y13A X13A RS RS CALL SE X122 x123 Y122 RS i RS R2 error processing X121 Ll BE CALL e a PO 122 122 M131 M136 P2 K3 PO Y93 Error LED M136 Y13A Y13A Y93 Error LED RET MELSEC A Change to bank 0 Set reception read complete Reset reception read complete Reset data reception enable flag Set the error occurrence flag Change to bank 2 Store error code in D13 to D15 Change to bank 0 Turn ON error LED Reset error occurrence flag Error reset request Error reset complete Turn OFF error LED 9 PROGRAM EXAMPLES P103 f Station No 3 program R2 initialization initial data read M109 M108 X159 X15B 9 JE j SE HER X159 X15B 7 H RST Y159 SE M108 M108 X159 X15B SE M109 eee eee erect oa z RST M108 R2 initialization initialization data write M109 M112 2 HF GALL P2 F TU HO H781 H100 K TO HO H782 H300 K T0 HO H783 H100 K Fh TU HO H798 H100 K To Ho H79B H100 K TO HO H79C H100 K TO HO H79D H300 K To HO H79F H2GO K To HO H7A4 00 K T0 HO H7A8 HO K 23 TT HO H7AC HO K L 0 HO H7BO HO K T0 HO H892 K20 K TT HO H89A K20 K CALL PO R2 initiali
184. nate the write request code Designate the total No of bytes of the designated data from the following quality items 8 No of write points x2 Transmission buffer Control write data size byte e Control data Quantity to No of write points data e Write data Data to be written into R2 buffer memory Quantity Fixed value Access code attribute Fixed value 0004H Buffer memory address A the head address On or higher of the buffer Ou to SEEH i Designate the data size No of words to be written in so a oo points that the R2 buffer memory address BEE is not exceeded 4 to 480 User wor 5FFH gt buffer memory address 1 No of write points Designate the data to be written into the target R2 buffer memory designated with the control data buffer memory address items and No of write point items Designate the amount for the control data No of write points 2 The following control data is stored in the master module reception buffer Designated Details Setting data side The status when the command is completed is stored 0 Normal completion Other than O Error completion error code Refer to the Master Module User s Manual Details Station No designate with high order bytes bits 8 to 15 Station No The station No of the accessed intelligent device station is stored request code Request code designate with low order bytes bits 0 to 7 The write request code 12h is stored 5 PR
185. ng Refer to section 5 3 7 7 9 G an adrian aalan Aa A 2 a nrar a aa an aana an ep r ann l A O E r ak are m j Writing of remote output RY Refer to section 5 3 8 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 1 Program for setting transmission data M122 MIE P30 CALL Pi Change to bank 1 MOV KU D93 Dummy area MOV H112 D94 Set station No request code MOV K16 D95 Set transmission buffer write data size MOV K D96 Quantity Fixed MOV H4 D97 Access code attribute Fixed MOV H200 D38 Set R2 transmission area address MOV K4 D99 Set No of write points MOV K3 D100 Set transmission data size MOV H4241 D101 Set transmission data A 41H B 42x MOV H4443 D102 Set transmission data C 431 D 44x MOV H4645 D103 Set transmission data E 45x F 46x TO HO HO 093 K11 Store control data transmission data CALL PO Change to bank 0 SET YE Set intelligent device station access request SET M122 M122 X11E RST Y11E Reset intelligent device station access request SET M123 M123 XU1E SET M124 Complete transmission data setting RST W123 RST M122 RET 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE 2 Program to change to bank 0 M9036 PO SET M9052 RST TIC RST Y1D SEG K4Y18 K4B1 3 Program to change to bank 1 M9036 P1 SET M9052 SET Y1ic RST Y1D SEG K4Y18 K4B1 MELSEC A Specify partial refresh Specify bank 0 Execute partial refresh Specify partial refresh Specify ba
186. ng QCPU Q mode or QnACPU the above program is not required 1 No of connected modules M 14 Set the No of remote I O stations remote device stations intelligent device stations and local stations connected to the master station Including the reserved stations 5 PRELIMINARY INFORMATION 2 MELSEC A Station information M 20x 1st module to M 5Fx 64th module Set the type of remote I O station remote device station intelligent device station and local station connected to the master station This must be set for each module connected 15 14 13 12 1110 9 8 7 6 5 4 3 2 1 O bit No of occupied Station type stations Z TAS 1 1 station occupied 1 01H to 64 40x 2 2 stations occupied 3 3 stations occupied 0 Remote 1 0 station 4 4 stations occupied 1 Remote device station 2 Intelligent device station Example To set R2 to station No 30 211 EH E Station No 30 1Ex No of occupied stations R2 occupies one station Station type R2 is an intelligent device station Master station buffer size Default Details value Transmission buffer 1st station intelligent Reception buffer device station Automatic update buffer l Transmission buffer 26th station intelligent device station Reception buffer Automatic update buffer Set the buffer memory size assignment to be used for transient transmission to the intelligent device station
187. ng receiving the corresponding sum check code if a registration code FFH EEn to F3u is contained in the user registration frame is shown with the statements used in the example gt Contents during transmission reception Registration code arrangement EE EEH Transmission reception of 01H 32H from 32H FFn FOH Transmission reception of 32H FFu F1H Transmission reception of 3 2 from 3 FFu F3H Transmission reception of 2 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 2 Transmission reception data corresponding to F4H to F9H The user registration frame section corresponding to the special character codes F44 to F9H transmits receives the sum check code calculated using the range including the user registration frame head frame of the transmission reception data statement as binary data ASCIl data User registration l l frame Random data User registration Head frame frame End frame User registration frame registration code 02H i 104 Dau EE F44 0Du 0An S i D E Sum C L Transmission reception T i L A 1 1 12ABx T check data corresponding to x E x code R F registration code o 1 Transmission reception i Lag eac i Gara data code P 024 104 41n 31H ABn 124 0341444 01H 0DH 0An Calculation range The calculation target is the range from the user registration frame at the head of the transmission reception data to just before the sum check code is designated Example Arrangement
188. nk 1 Execute partial refresh b When using dedicated commands RIWT with QCPU Q mode QNACPU When using dedicated commands RIWT RISEND RY n 1 E and RY n 1 F are used with the dedicated commands so provisions must be made to prevent the user from rewriting this signal information When the QCPU Q mode is used such provisions need not be made Refer to section 5 3 8 for details oot S e e Goat a A es T ey fe 8 R2 normal complete 100 X100 X101 M130 M135 Transmission execution flag SET M125 Set data transmission flag m CALLP pan Call transmission data setting program M180 FSET 100 Set transmission request RYn0 rRST W125 Reset data transmission 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A M100 X100 Y100 Reset transmission request RYn0 X101 Writing of remote output RY Refer to section 5 3 8 1 Program for setting transmission data P30 SM400 Ki D96 Set R2 station No H4 D97 Access code attribute H200 D98 R2 buffer memory address K4 D99 Set No of write points K3 D100 Set transmission data size H4241 D101 Set transmission data A 41H B 42x H4443 D102 Set transmission data C 431 D 441 H4645 D103 Set transmission data E 45x F 46x G RIWT U0 D95 D100 M180 Write data in R2 transmission area 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 6 4 2 Receiving data from an external device
189. not be changed 100H to 161H by the external device and data 256 to 353 assuming special characters are registered Frame in which random character string is registered by user into R2 EEPROM 3E8xH to 4AFH Random character string 1 to 80 Up to 200 frames can be registered 1000 to 1199 bytes designated by user User registration Section 7 5 2 frame The contents of the frame can be changed 1 Note that this is not the R2 buffer memory address R2 adds frame Chr LA E Random data Frame Frame gt External device R2 adds frame such as ID controller 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 2 Transmitting data using frames When transmitting data using frames the following two frame addition methods can be used A word byte unit and transmission timeout time can be designated for the random data section in the same manner as non procedural transmission s Add one frame to the head and end of a random data item and transmit to the external device Use transmission frame 1 area e Add only up to 100 frames and transmit to the external device In this case the random data being transmitted will be handled as part of the frame Use transmission frame 2 area 7 2 1 Transmitting using transmission frame 1 area Designate a frame Bes 1 The data can be transmitted with one frame added to the head and end of the random data For the transmissi
190. ntroller general purpose personal computer 4 Two general purpose input output points each provided as a standard Two points each are provided for the general purpose input and output so the synchronous signal with the barcode reader and ID controller etc can be directly input and output without providing a separate remote I O module 1 OUTLINE MELSEC A MEMO 2 SYSTEM CONFIGURATION MELSEC A 2 SYSTEM CONFIGURATION The system configuration for using R2 is shown explained in this section 2 1 System configuration The system configuration for using R2 is shown below Up to 26 R2 modules can be connected to one master station CC Link master local station master station CC Link master local station local station CC Link dedicated cable AJ65BT R2 Intelligent device station Remote device station N 89 Re 1 station occupation RX RY 32 points each RWr RWw 4 points each Personal computer Bar code reader External device 2 SYSTEM CONFIGURATION MELSEC A 2 2 Applicable systems The master module of the CC Link system that can use R2 and the programmable controller CPU that can use the CC Link dedicated commands are explained in this section 1 Applicable master modules The following indicates the master modules that can use the R2 e AJ61BT11 e A1SJ61BT11 s AJ61QBT11 e A1SJ61QBT11 s QJ61BT11N s QJ61BT11 When using any of the AJ61BT11 A1SJ61BT11 AJ61QBT1
191. o 1 When 0 is designated for the RS RTS signal status designation R2 1014 the RS RTS signal will constantly remain ON even if RYn9 is turned ON and OFF Follows the buffer memory side settings 2 Controlling the ER DTR signal with RYNA Designate 0 or 2 for the flow control designation R2 100p When 1 is designated the RYnA ON OFF will be ignored 3 Setting the buffer memory When controlling the RS 232 C signal designate in the R2 buffer memory shown below R2 buffer memory Name Details address Designate whether to carry out flow control with the DTR DSR control or DC code control when exchanging data between the R2 and external device Flow control 100 designation 0 Do not carry out flow control 1 Carry out flow control with DTR DSR control Default value 2 Carry out flow control with DC code control Designate whether to leave the RS signal status constantly ON or to follow the RYn9 ON OFF state When the RS signal follows the RYn9 ON OFF state the RS signal will be 101H ee output as follows g RYn9 ON RS signal ON RYn9 OFF RS signal OFF 0 Always ON RYn9 ON OFF is invalid 1 Follow RYn9 ON OFF When the above buffer memory setting values have been changed initialize the R2 with the process given in section 8 6 8 OTHER FUNCTIONS MELSEC A 8 10 Confirming the R2 switch states and software version By reading the R2 buffer memory shown below the R2 switch
192. o bank 0 Turn ON error LED Reset error occurrence flag Error reset request T Error reset complete Y Turn OFF error LED 9 PROGRAM EXAMPLES e Station No 2 program R2 initialization initial data read M107 M106 X139 X13B P102 S IBET X139 X138 RST SET M106 X139 X13B SET RST R2 initialization initialization data write M107 NIIT CALL TO HO H3C1 H100 TO HO 4302 H300 T0 HO H3C3 H100 TO HO H3D8 H100 T0 HO H3DB H1C0 T0 HO H3DC H100 TU HO H3DD H300 TO HO H3DF H260 TO HO H3E4 HO T0 HO H3E8 HO T0 HO H3EC HO T0 HO H3FO HO TO HO H4D2 K20 TO HO H4DA K20 CALL SET M111 M116 Y120 Y121 Y122 Y123 Y126 Y127 Y139 Y13A Y139 Y139 M106 NID M106 P2 Ki Ki Ki Kl K1 KI KI KI Ki Ki Ki K1 K1 K1 PO M111 0 MELSEC A Set initial data read request Reset initial data read request Complete initialization Change to bank 2 Set R2 transmission area size to 100H Set R2 reception area head address to 2000 Set R2 reception area size to 1004 Set transmission area 2 transmission size to 1004 Set transmission area 2 M station head address to 1C0H Set reception area trans mission size to 100H Set R2 reception area head address to 2000 Set reception area M station head address to 2COn Set EEPROM function area transmission size to 0 Set user registration frame area transmission size
193. ommands and does not need to be changed by the user After changing to bank 1 or bank 2 and then reading or writing return to bank 0 The information such as RX RY RWw or RWr will not be updated unless the bank is changed to bank 0 A Series master module buffer memory AJ61BT11 A1SJ61BT11 Bank 0 Bank 1 Bank 2 Parameter status On Intelligent device M On Intelligent device information etc station transmission station automatic M FFF M FFF reception buffer M EFF update buffer Q QnA Series master module buffer memory AJ61QBT11 A1SJ61QBT11 QJ61BT11 QJ61BT11N Ou m Parameter status M FFFy information etc M 1000 Intelligent device station transmission M 1F FF reception buffer M 2000 Intelligent device station automatic M 2FFF update buffer H 1 Changing the bank The bank can be changed by turning the master module s Y n 1 C Y n 1 D ON and OFF n indicates the master module s head input output No Y n 4 C Y n 4 D Change to bank 0 Change to bank 1 Change to bank 2 5 PRELIMINARY INFORMATION 2 Program Create the program for changing the bank as shown below Refer to section 5 1 for details on the program conditions a Program for changing to bank 0 Changeover execution SET M9052 RST YIC RST Y1D SEG K4Y18 K4B1 b Program for changing to bank 1 Changeover execution SET M9052 SET Y1C RST Y1D SEG K4Y18 K4B1 c Program for changing to bank
194. ommon method Positive common negative common shared External connection Terminal Signal Terminal Signal 7 point terminal block M3 5 screw enema i ee Ea Applicable wire size wire size 0 7516 2mm S 75 to 2mm RAV1 25 3 5 RAV2 3 5 JIS C 2805 Applicable crimp terminal COM1 compliant 3 SPECIFICATIONS MELSEC A 2 General purpose output specifications Transistor output sink type External connection view No of output points Insulation method Photo coupler insulation Rated load voltage 12 24VDC Working load voltage Sit 10 2 to 28 8VDC ripple rate within 5 range al ye T pos OFF ON 2ms or less ON OFF 2ms or less resistance load Voltage 10 2 to 28 8VDC ripple rate within 5 50mA or less TYP 24VDC per common Current l l Not including external load current Surge killer Common method 2 points common COM2 External connection Terminal Signal Terminal Signal 7 point terminal block M3 5 screw ee eel Ecs Applicable wire size wire size 0 75 to 2mm o 75 to 2mm RAV1 25 3 5 RAV2 3 5 JIS C 2805 Applicable crimp terminal COM2 compliant Internal circuit 3 SPECIFICATIONS MELSEC A 3 5 List of functions The R2 functions are shown below Relation with main function Trans mission Function Explanation Reference Non procedura
195. on Buffer memory automatic update area Buffer memory 1st station s automatic update J Status storage area e Status storage area Monitor transmission area buffer Eo fin ee ee l Monitor transmission area 2nd station automatic update area 1 If a cause of automatic update explained in section 5 6 2 occurs the area is automatically updated Changing the bank when using the A Series master module When using the A Series master module AJ61BT11 A1SJ61BT11 the master station s automatic update buffer will be bank 2 Thus create the program so that the bank is changed to bank 2 when reading to or writing from the automatic update buffer and so that bank 0 is returned to after the reading writing is completed When using the RITO RIFR commands dedicated for the ANSHCPU the bank will not be changed automatically by the commands Thus the bank must be changed by the user Refer to section 5 2 for details on changing the bank Setting the timeout By setting the following buffer memory in the R2 a timeout can be set for exchanging data between the R2 and master station when using the buffer memory automatic update function a Transient timeout designation area RN 2 1051 0 5 seconds 1 to 360 designated time seconds 5 18 5 PRELIMINARY INFORMATION MELSEC A 5 6 2 Understanding the roles of each area When using the buffer memory automatic update function
196. on No of read points Access code attribute R2 buffer memory address Dedicated command RIRD Master station head I O No Access destination station No Read data Device to turn one scan ON at completion 9 PROGRAM EXAMPLES MELSEC A 9 3 3 When using dedicated commands with QCPU Q mode QnACPU An example of the program for using the dedicated commands with the QCPU Q mode QnACPU when using the transmission reception buffer is shown below With this program it is assumed that the CC Link parameters are set as follows Module headinputouiputNo o Remote output RY Station type Intelligent device station No of occupied stations One station occupied Station information Transmission buffer size Reception buffer size 512 Automatic update buffer size 0 SE lt GPPW parameter setting screen gt Batch refresh device When the programmable controller series is When the programmable controller series is QCPU Q mode QnACPU No of boards in module 1 Z Boards Blank no setting 0 boards Set by the sequence program No of boards in module 1 lt l Boards Blank no setting 0 boards Set by the sequence program 1 FZ Stat Ha TTT Operational seting aaa seas Masterson E Type Masterstaion wf E Mode Derea 1 mode E output a a a All comect count RE Remote nowt a F RR Remote output yio pe S o o Remote reciste RW _ S
197. on area Reception area head 4001 address designation Section 2001 i Reception area size designation 6 2 2S e ee eee ee Fixed value 4004n t z w n Q D S n Q w TE fa Q G D Q oa n D Q O A x g gt 2 a G Transmis sion area 1 Fixed value 40041 gt JAR a lz 12 Q 013 18 n a B C w o Qa 1 a N N 2 jo D LH n Q O SE t z n Q D S n v w 0 Q eS D Q oa n D a a T w JRE MERE DE 0 1318 wn D O w lO G L o N 2 lo D LU wn ine Transmis sion area 2 Fixed value 4004H l Master station side offset Automatic update area designation Section M station Required Possible 562 pe G Le BS 5 Ris 12 6 1912 CL 01318 wn D o w 10 EE n a N 2 jo oO wn wn ay pg O as I IF Fixed value 4004H Master station side offset feb Qa Q oO n no D N DS j Transmission size R2 side head address Initial setting Fixed value 40041 4004H Master station side offset Ou address Transmission size IH HG N T Ble L N I MIN Kn 1 T E R2 side head address Fixed value 40041 4004H Master station side offset 1COH address pe D Be N 6 3 SPECIFICATIONS MELSEC A Address Name Default Update Initializa EEPROM Reterence aca ea D tion registration Transmission size
198. on end data size data or the data to the reception end frame into the reception area 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 3 Program The program for receiving data from an external device using the transmission reception buffer is shown below With the following program the R2 buffer memory is used at the default value so the reception is completed when LF Au or CR Dx is transmitted from the external device Refer to section 5 1 for details on the program conditions a When using the FROM TO command with the ACPU QCPU A A mode Master station initialization parameter setting data link setting Refer to section 5 4 Confirmation of R2 data link status Refer to section 5 3 3 R2 initialization Refer to section 5 5 2 4 Initialization M125 W135 x102 A complete SET 130 Set data reception enable If at F fi E flag X103 m30 102 TT OH P40 Call reception data read program M160 s SET Y102 Set reception read complete RYn2 RST M160 M100 K102 X103 Y102 44 Reset reception read RST 102 complete RYn2 RST M130 Reset data reception enable flag r A R2 error processing Refer to section 5 3 7 PaT a rae nn ee ea a aT lama Writing of remote output RY Refer to section 5 3 8 1 Program to read reception data Pt Change to bank 1 D180 Dummy area D181 Set station No request code D182 Set transmis
199. on head frame the registration frame No is designated in the transmission head frame No R2 118h For the end frame the registration frame No is designated in the transmission end frame No R 2 119 When designating the default registration frame refer to section 7 5 1 When designating the user registration frame refer to section 7 5 2 External R2 device Buffer memory Transmission head frame No Transmission end frame No R2 1181 2u 1191 3H Transmission area 1 R2 2004 Transmission data size R2 ieee ee eee ell ee 4AFu User registration frame R2 3FFu Transmission data EEPROM Registration frame Lats 3H 2014 Transmission data ETX Random data STX End frame section Head frame OS Data stored in transmission area Frame designated with 1194 Frame designated with 1184 is added 1 If R2 is the default value indicates the buffer memory address 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 1 Transmitting with a frame added By designating the No of the frame to be added in 118H and 119 the frame will be automatically added when transmitting The data transmission method is the same as when a frame is not added non procedural communication so refer to Chapter 6 Make sure not to include data with the same arrangement as the transmission head frame and transmission end frame in the
200. on status information and configure an interlock circuit in the sequence program so that the system will operate safely Incorrect outputs and incorrect operations can lead to accidents 1 All points of the general purpose input from this module will turn OFF 2 All points of the general purpose output from this module will turn OFF e The input output may turn ON or OFF depending on the module trouble Provide a circuit that externally monitors input output signals that could lead to serious trouble A CAUTION s Do not bind the control wire or communication cable with the main circuit or power wire or place the control wire near these Separate by at least 100mm or more Failure to observe this could lead to malfunctions caused by noise e Always connect the master module and CC Link dedicated cable at the data link terminal block If the data link terminal block and general purpose input output terminal block are incorrectly inserted module trouble could occur OOO O O OOQO OOOO OOH QOH m Data link terminal General purpose input block output terminal block Mounting Instructions A CAUTION e Use this module within the general specification environment described in the manual Use in an environment outside the general specification range could lead to electric shocks fires malfunctioning product damage or deterioration e Always connect the crimp press fit or solder th
201. or l complete signal i 7 RXn0 RXn1 l G Master station Automatic update area eS a j transmission area i 3 j 5 R2 Transmission area XA 1 Transmission complete ett A Transmission External device lt _ Carried out with sequence program Carried out by R2 Control side The transmission data is written into the master station automatic update buffer transmission 1 area Program 2 The transmission request signal RYn0 turns ON a master station automatic update buffer transmission area data is read out and stored in the R2 R2 transmission area 4 The data is transmitted from the transmission area to the external device 5 When the transmission to the external device is completed the transmission normal complete R2 signal RXn0 or transmission error complete signal RXn1 turns ON 6 The transmission request signal RYnO turns OFF 7 The signal turned ON in step 5 turns OFF 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 3 Program The program for transmitting the transmission data ABCDEF using the buffer memory automatic update function is shown below Refer to section 5 1 for details on the program conditions a When using the FROM TO command with the ACPU QCPU A A mode R2 initialization Refer to section 5 5 1 4 l Transmission execution PLS M120 Pulsate data transmission Initialization swit
202. ore cleaning or tightening the terminal screws be sure to shut off all phases of external power supply used by the system Failure to shut off all phases could lead to module trouble or malfunctioning A loose screw could lead to dropping short circuiting or malfunctioning If the screw is too tight dropping or short circuiting malfunctioning could occur due to screw damage e Do not bind the control wire or communication cable with the main circuit or power wire or place the control wire near these Separate by at least 100mm or more Failure to observe this could lead to malfunctions caused by noise e Always ground the FG terminal with Class D grounding grounding resistance 1009 or less or higher dedicated of the programmable controller Failure to do so could lead to electric shock or malfunctioning e Always confirm the product s rated voltage and terminal layout before wiring the module Connecting with a power supply other than the rated power supply or incorrect wiring could lead to fires or trouble e Securely mount the connector of each connection cable to the mounting section An incomplete connection could lead to malfunctioning causes e Be sure to fix the wires or cables by ducts or clamps when connecting them to the module Failure to do so may cause damage of the module or the cables due to accidental pull or unintentional shifting of the cables or malfunctions due to poor contact of the cable s Do not install the control
203. ot to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not available after production is discontinued 3 Overseas service Overseas repairs shall be accepted by Mitsubishi s local overseas FA Center Note that the repair conditions at each FA Center may differ 4 Exclusion of loss in opportunity and secondary loss from warranty liability Regardless of the gratis warranty term Mitsubishi shall not be liable for compensation of damages caused by any cause found not to be the responsibility of Mitsubishi loss in opportunity lost profits incurred to the user by Failures of Mitsubishi products special damages and secondary damages whether foreseeable or not compensation for accidents and compensation for damages to products other than Mitsubishi products replacement by the user maintenance of on site equipment start up test run and other tasks 5 Changes in product specifications The specifications given in the catalogs manuals or technical documents are subject to change without prior notice 6 Product application 1 In using the Mitsubishi MELSEC programmable logic controller the usage conditions shall be that the application will not lead to a major
204. ote Output eee eee 3 11 WING 2250253 ninco nee 5 8 RS 232 C interface specifications 3 3 PreCautions 3 iiccetencncincedinn eine 8 22 RS 232 C transmission specifications setting SWICI T 4 7 RW update function sss sees eee eee 8 11 Setting the buffer memory sese eee 8 12 RX lier ler BAe loreal tt ee ie eh tte 3 8 Reading ssa ois daai ada Oa aioa eok 5 6 Index 2 RY scAcca aint aiauwh Gavia wask 3 11 WAE oinei ener Peer oer ee errr a reer erry 5 8 S Setting the buffer memory ASCII BIN conversion sse ee eee eee eee 8 10 Confirming the software version 8 23 Confirming the Swi eee ee ee ee ee e 8 23 FlOW Controls 2 8 once a eas a aaia 8 8 Monitor transmission sese eee eee eee 7 15 Reception data 6 7 Reception Tame eee eee ee eee 7 7 Registering and initializing the EEPROM 8 19 RW update TunciOn sss sees eee eee eee 8 12 Transmission eee eee eee eee ee 6 4 Transmission frame area ee eee 7 3 Transmission frame 2 area see ee ee 7 5 User registered Tame sese eee 7 34 Setting the buffer memory at reception 6 7 Setting the buffer memory at transmission 4 Setting the timeout eee ee eee eee e 5 18 Special character 7 25 RX RY RW reference eee eee 7 26 Sum check codes sese 7 30 Special characters for sum check codes 7 30 Specification Spaa tees 3 1 Station Information see eee eee eee eee ee 5 10 Station No setting SWitCh eects 4 7 Status Storage APC eee e
205. ption Reception area la RS 232 C 2 Timing chart Programmable controller cpy Yod device Reception read complete 8 signal RYn2 l 10 Reception normal error read request signal RXn2 RXn3 L i 6 Forced reception complete request signal RYn3 0 2 5 Master station Automatic update area AYN reception area l i 4 R2 Reception area NN 4 E OS reception area External device Carried out with sequence program 4 Carried out by R2 8 OTHER FUNCTIONS MELSEC A Control side The data received from the external device is stored in the reception area via the OS reception area 2 re data ove in the OS recepton area is stored in fe recepton eee ___ _a_ The data stored in the reception area is transmitted to the master station automatic update area 3 fire erener vermalen eat maest sara ReRe aaa R 6 The forced reception complete request signal RYn3 turns OFF Program 10 The reception read complete signal RYn2 turns OFF e The forced reception complete is valid only when not even one reception head frame No is designated If the reception head frame No is designated the forced reception complete request signal will be ignored e During forced reception complete when transmitting the reception data stored in the OS reception area to the reception area if the data in the OS reception area exceeds th
206. quest Reset intelligent device station access request Error read complete Change to bank 1 Read from reception buffer Change to bank 0 9 PROGRAM EXAMPLES MELSEC A 9 3 2 When using dedicated commands with ACPU QCPU A A mode An example of the program for using the dedicated commands with the ACPU QCPU A A mode when using the transmission reception buffer is shown below 1 Main program Master station initialization X0 XOF a i MO MOV KO D2 Synchronization mode invalid MOV K D3 No of connected modules 1 module R2 station information intelligent one station occupied station No 1 MOV H2101 D4 MOV H200 D5 Set transmission buffer size MOV H200 D6 Set reception buffer size MOV HO D7 Set automatic update buffer size LEDA RLPA Dedicated command RLPA SUB HO Master station head I O No LEDC D2 Parameter storage head device LEDC M5 Device to turn one scan ON at completion LEDR S tron HO H668 D8 Ki Read parameter state Read remote input RX X100 to X11F when abnormal x0 XOF U Kd CALL PO Change to bank 0 l l FROM HO HOEO K4X100 K2 Read RXn0 to RX n 1 F Confirm R2 data link state to X100 to X11F y Pii Read R2 data link stat FROM HO H680 K1M1 Ki ea ata ink state SW0080 M100 R2 data link normal N aaaeei R2 data link error Error LED 9 PROGRAM EXAMPLES R2 initialization X11B M100 M110 m CALLP P10 M140 n LEA Aa P20 M145 LL RET
207. r station The 24V power is not supplied to the R2 or the voltage is Check the 24V power supply voltage insufficient Correctly set the station No of the duplicate stations and then The station Nos are duplicated 4 R turn the power ON again or reset it The setting switch is not set within the range station No 0 Correctly set the setting switch and then turn the power ON or 65 or more transmission again or reset it speed other than 0 to 4 10 5 10 TROUBLESHOOTING MELSEC A 3 The R2 L ERR LED flickers Return the setting to the previous station No or transmission speed and then turn the power ON again or reset it If the L RUN LED does not turn ON after the power is turned ON again there may be a problem in the hardware Contact your nearest dealer or sales office If the L ERR LED starts to flicker even when the switch The station No or transmission setting has not been changed during operation there may be speed switch is faulty a problem in the hardware Contact your nearest dealer or sales office The station No or transmission speed switch setting was changed during normal operation 4 The R2 L ERR LED turns ON An error occurred in the Check the error code stored in the R2 buffer memory and set communication between the the correct data before turning the power ON again or master station and R2 resetting it The setting switch is not set within the range station No
208. r target condition setting Timing of transmission trigger generation b14 OFF The transmission trigger is At rising edge At falling edge generated when the R2 detection detection detects a change from ON to OFF The transmission trigger is off jenerated when the RWw RWr b14 state is invalid See a RW R to a value other than 0 b Monitor target designation When designating a status R2 78H 7AH F4H F6H Set the transmission trigger detection status for the R2 when carrying out monitor transmission b15 b14 b13 b12 b11 nr Monitor target Monitor target status 0 1 Monitor target status 2 Transmission trigger conditions 1 1 Monitor target status The monitor target status designates the status information monitored by the R2 for detecting the transmission trigger in respect to the information held by the master station programmable controller CPU Bit m 6 rb 3 Monitor target status S Setting prohibited 00 CC Link data link status oa o Programmable controller CPU operation status Programmable controller CPU status 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 2 Transmission trigger conditions The transmission trigger conditions designate the conditions interpreted by the R2 as a data transmission trigger generation when monitoring the monitor target statuses E Transmission trigger generation ne one Monitor target condition setting T
209. r than the reception data storage area size The reception data storage area size is the reception area size minus 1 e For word unit Reception complete data size lt Reception area size 1 e For byte unit Reception complete data size lt Reception area size 1 x 2 annan complete When receiving non procedural data always set the reception complete 111H aie B ed data size 1 or more When receiving data with frames the reception I Gal complete data size 0 or more can be set If the reception complete data size is 0 the reception will be completed when the reception head end frame designated in 1084 to 10FH is received Refer to section 7 3 The data size unit follows the word byte unit designation R2 1021 0 Do not designate reception complete data size default value Other than 0 Reception complete data size Set the timeout time from when the first valid reception data is received to when the reception is completed during data reception When the reception timeout is applied the reception error read request signal RXn3 will turn ON and BB21H will be stored in the reception error code area R2 1B2u 0 Unlimited wait default value 1 to 32767 Reception timeout time x 100ms 1 For non procedural reception The time from when the head data is received to when the reception complete data size data is received Reception timeout time U designation When receiving with frames When
210. rage area size Reception data storage area gt Amount of data received from external device Thus if an amount of data that cannot be stored in the default reception area is to be received increase the reception area 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 3 Arrangement of reception data The arrangement of the data received from the external device when stored in the reception area is shown below 1 A random data section of the received statement is stored in the R2 buffer memory reception data storage area 2 When ASCII BIN conversion is carried out the data converted into binary data is stored 3 The data is stored into the reception data storage area in the order of the smaller addresses L to H received and then the next address L to H Example To store the ten characters ABCDEFG123 of the received random data The reception area is the default value Address Buffer memory R2 4004 Reception data size storage area The received data size 10 characters worth IRZ 4010 is stored according to the word byte unit Head designation R2 102k t R2 402 321GFEDCBA ____ From external gt RZ 403x Reception data storage area device The received data is stored in the order of smaller addresses L to H received and R2404 then the next address L to H R2 4051 R2 4061 When the reception complete data size data has been rece
211. ransmission area 1 2 Write the transmission data size in the transmission data size designation area The data size unit differs according to the word byte unit designation R 2 10201 setting Write the data to be transmitted random data section in transmission statement in the transmission data storage area Example To transmit the ten characters ABCDEFG123 the transmission Address R2 R2 2001 2014 2024 2034 2044 2054 2064 area is the default value Buffer memory Sar e Transmission data size storage area PASE ee Write the transmission data size 10 characters worth E e with the designated value to the word byte unit A LE Sram ot Se a designation R2 1021 D C For word unit 5 44H 0 AH For byte unit 10 HS ea Sieh eS Transmission data storage area designated with the Be Bes D R transmission data size storage area 1 G The transmission data is stored in the order of the Sta A smaller addresses L to H and next address L to 3 2 H 33H 32h 5 4 35x 344 H L When the transmission request signal RYn0 is turned ON after storing the data as shown above the R2 will sequentially transmit the designated data size in order of the smaller addresses in the transmission data storage area To external lt 4 BCDEFG1 device Random data section When not using 2 3 ASCILBIN conversion 41H 42H 43H 44H 45H
212. reception head frame and reception end frame are set Time from when head frame head data is received to when reception end frame end data is received When only reception head frame is set Time from when head frame head data is received to when reception end data size data is received When only reception end frame is set Time from when random data section head data is received to when reception end frame end data is received The word byte size of the data stored in the R2 OS reception area remaining reception data for which read has not been requested to programmable controller CPU is stored This is updated every 100ms The data size unit follows the word byte unit designation R2 10201 OS reception area data size storage 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 6 3 Exchanging data using the buffer memory automatic update function When using the buffer memory automatic update function data is transmitted and received via the master station automatic update buffer transmission area using the FROM TO command or CC Link dedicated command RITO RIFR To use the buffer memory automatic update function set the mode setting switch to 1 buffer memory automatic update function enable and initialize the automatic update buffer refer to section 5 5 1 for details 1 The address for the automatic update buffer differs for the A Series master module and Q QnA Series master module as follows Refer
213. reception head frame is designated the data between the received end frame or the reception end data size data and the next head frame will not be stored in the R2 reception area The data will be ignored Reception Registration frame Random data section Reception data reception head frame or reception end frame data Not stored in Not stored in reception area reception area 2 Make sure not to include data with the same arrangement as the reception head frame and reception end frame in the random data section If data with the same arrangement as the reception head frame or reception end frame is contained in the random data section the R2 may incorrectly recognize that data as the reception head frame or reception end frame 3 The length of the statement that can be received with frame reception must be shorter than the reception data storage area size If the length of the statement to be received exceeds the size of the reception data storage area reception data size over error BBA2u will occur If the reception head frame reception end frame abort designation R2 110n is set to Do not abort 0 the reception head frame end frame size will be contained in the reception data size when the process is completed In this case the reception data size when reading of the reception data to the programmable controller CPU is requested will be as follows Reception data size Reception end data
214. red when the QCPU Q mode is used 2 Program for setting reception timeout time SM400 P10 MOV MOV MOV MOV MOV G RIWT UU D20 Ki D21 H4 D22 H112 D23 Ki D24 K20 D25 D25 M140 R2 station No Access code attribute R2 buffer memory address No of write points Write data 2 sec Write using dedicated command 9 PROGRAM EXAMPLES MELSEC A 3 Program for setting transmission timeout time SM400 e MOV Kt D31 R2 station No Access code ay h4 D32 attribute MOV HITA D33 R2 buffer memory address MOV K1 D34 No of write points MOV K20 D35 Write data 2 sec G RIWT U0 D30 D35 M145 Write using dedicated command 4 Program for setting reception data P30 SM400 WS ov KI D96 R2 station No MOV H4 D97 Access code attribute R2 buffer memory address MOV H200 D98 i HN K4 D99 No of write points Set transmission data wv K3 D100 S Woy naa mo eee date A w ttt ni eevee data Mov H4645 D103 ren n data Write using dedicated SS LT RIWT U0 D95 D100 M180 command 5 Program for reading reception data size SM400 l P40 MOV K1 DI8t R2 station No MOV H4 D182 Access code attribute MOV H400 D183 R2 buffer memory address MOV Kl D184 No of read points G RIRD U0 D180 D200 M155 Read using dedicated command 9 PROGRAM EXAMPLES P50 6 Program for reading reception data SM400 BA MOV MOV MOV MOV
215. rnal device R2 and master module Yy Test the data link line with the master module 1 w NHS Refer to master module manual Line test normal Y Continued on next page 4 PROCEDURES AND SETTINGS BEFORE OPERATION Continued from previous page GO NOU E LG KM Transmitting data to the external device Refer to Section 6 3 1 6 4 1 Exchanging data with the external device Refer to Section 6 3 2 6 4 2 Processing R2 errors Refer to Section 5 3 7 Writing in the remote output RY Refer to Section 5 3 8 Create a program Initializing the master module Refer to Section 5 4 Reading the remote input RX Refer to Section 5 3 2 Confirming the R2 data link state Refer to Section 5 3 3 Initializing the R2 Refer to Section 5 5 Start the data link Completed MELSEC A 4 PROCEDURES AND SETTINGS BEFORE OPERATION MELSEC A 4 2 Precautions for handling lt DANGER CAUTION The precautions for handling the R2 are shown below e Do not touch the terminals or connectors while the power is ON Failure to observe this could lead to electric shocks or malfunctioning e Do not touch the connector inside the lid at the top of the module Failure to observe this could lead to module trouble or malfunctioning e Make sure that foreign matter such as cutting chips or wire scraps do not enter the module Failure to observe this cou
216. rnal device side When carrying out flow control the R2 OS Carry out the reception process so that the open reception area open space is less than 64 bytes S ie Re Oo L ls 263 bytes The transmission speed settings do not match Het R2 and extemal device transmission e Check that the data with the fixed length set on the R2 side has been transmitted from the external device The signal wire connection is incorrect The external device side transmission control RD does not flicker even when a_ signal is not ON statement is transmitted from the external device RD flickered when the statement The transmission complete condition data has not was transmitted from the external been received device but the read request did not turn ON Check whether the end frame has been transmitted when communicating with registration frames The transmission speed settings do not match beans R2 andextemnalkdevice transmission The external device reception complete condition Transmit data that satisfies the external device data has not been transmitted reception complete conditions The statement was transmitted When carrying out flow control the open space in Carry out reception process with the external from the R2 but it was not received the external device OS reception area is device to increase the open space in the external by the external device insufficient device OS reception area
217. ry Name Details address Designate the EEPROM function When using the buffer memory setting value registration function EEPROM function designate whether to register or initialize the buffer memory setting designation values O Buffer memory setting value registration 1COH 4 Buffer memory setting value initialization Buffer memory default The status of the buffer memory when the R2 is started up is stored 1A7H value setting status 0 R2 default values default value storage 1 Default values registered in EEPROM 8 OTHER FUNCTIONS 4 Registration execution Program MELSEC A The following shows the program for registration to the E2PROM of the R2 The following program assumes that the buffer memory automatic update function is used Refer to Section 5 1 for program conditions a When using the FROM TO command with the ACPU QCPU A A mode 1 Program to change to bank 0 2 Program to change to bank 2 Pulsate registration execution signal Change to bank 2 Write 0 in 1COu to register default value is 4 Change to bank 0 Set EEPROM function request RYn7 Reset EEPROM function request RYn7 Specify partial refresh Specify bank 0 Execute partial refresh Specify partial refresh Specify bank 2 Execute partial refresh 8 OTHER FUNCTIONS MELSEC A b When using the dedicated command with the QCPU Q mode QnACPU Registration execution MOV KO D
218. s R2 buffer memory M On Initialization area 1A0x worth Initialization area R2 On G an ransmission area 1 RZ 19F G Status storage area 20x worth Status storage area M 1COu R2 1BFH Transmission area 2 144 worth MIDA Reception area 141 worth Blank Area not updated automatically M 1E74 X gt Reduce area to 1E8 R2 200 R2 213 Blank Area not updated automatically S R2 400x R2 4131 Blank Area not updated automatically 5 PRELIMINARY INFORMATION MELSEC A 5 7 Reading and writing the buffer memory using the transmission reception buffer The method for reading and writing the R2 buffer memory using the transmission reception buffer is described below When the transmission reception buffer is used the required size only can be adequately transmitted so excess data is not transmitted This allows the transmission path efficiency to be improved 5 7 1 Outline When reading and writing the R2 buffer memory using the transmission reception buffer reading and writing are carried out using the intelligent device station access request signal RY n 1 E and the intelligent device station access complete signal RX n 1 E The master station buffer memory uses the transmission reception buffer Programmable controller CPU Master station R2 1st station Buffer memory Transmission reception area 1 IE Saye
219. s Remote input RX Remote input RX X100 to X10F EUu RXn0 to RXnF RXn0 to RXnF X110 to X11F a E1n RX n 1 0 to RX n 1 F ama RX n 1 0 to RX n 1 F Device Y Remote output RY Remote output RY Y100 to Y10F 1604 RYn0 to RYnF RYn0 to RYnF Y110 to Y11F gt H RY n 1 0 to RY n 1 F m RY n 1 0 to RY n 1 F Master station buffer memory settings buffer memory size Transmission Reception buffer Automatic buffer P update buffer When using buffer memory automatic On On 6004 update function When using transmission reception 2001 2001 On buffer 9 PROGRAM EXAMPLES 9 2 Example of program for using buffer memory automatic update function MELSEC A An example of the program for using the buffer memory automatic update function is given below 9 2 1 When using FROM TO command with ACPU QCPU A A mode An example of the program for using the FROM TO command with the ACPU QCPU A A mode when using the buffer memory automatic update function is shown below Master station initialization x0 XOF s L MO MOV K DU No of connected modules 1 module TO HO Hi DO K1 Write to master station R2 station information ay H2101 D4 intelligent one station occupied station No 1 T0 HO H20 D4 Kl Write to master station NOV HO D5 Set transmission buffer size MOV HO D6 Set reception buffer size MOV H600 D7 Set automatic update buffer size T0 HO H80 D5 K3 Write to master station SET Yo Refr
220. s set to Follow RYn9 ON OFF 1 Refer to section 8 9 2 The ER signal setting is invalid when the Flow control designation R2 100n is set to Carry out flow control DTR DSR ER DR control 1 Do not designate the RXn0 to RXn8 RXnE to RX n 1 F RYnO to RYnY RYnB or RYnE to RY N 1 F signals to the following functions Monitor target RX RY for monitor transmission function e Reference RX RY for registration frame RX RY RW reference special character Do not output turn ON the usage prohibited signals If an output is carried out to a usage prohibited signal the programmable controller system could malfunction 3 SPECIFICATIONS MELSEC A 3 6 2 Details of input output signals A detailed explanation of the R2 input output signals is given below The lines in the timing chart indicate the following details 1 Remote input RX Details When transmitting data to an external device connected to R2 after the transmission data is written into the R2 transmission area the transmission request RYn0 is turned ON Rr Transmission normal When the transmission is completed normally transmission normal complete RXn0 n complete turns ON and if the transmission is completed abnormally transmission error complete RXn1 turns ON The transmission request RYn0O turns OFF when these signals turn ON Transmission request RYn0 T E i isi R2 transmits contents Pali ransmission normal complete of transmis
221. s used the data will be written as follows e Master station RWw R2 The data written from the programmable controller CPU to the master station s remote register RWw is automatically written into the R2 target buffer memory when the cause of an automatic update occurs s R2 master station RWr The data in the R2 target buffer memory is automatically written into the corresponding remote register RWr of the master station when a cause of automatic update occurs and can be read to the programmable controller CPU 8 OTHER FUNCTIONS MELSEC A 1 Update timing for RW update function The update of the data in the master module remote register RW and R2 buffer memory is carried out at the following timing by the RW update function a Update interval set in the RW update interval time designation R2 40h b All timings at which following areas shown in section 5 6 2 communicate 1 Status storage area Transmission area Reception area Initialization area EEPROM function area User registration frame area 2 3 4 5 6 7 Monitor transmission area When using the RW update function and buffer memory automatic update function simultaneously make sure that the update areas do not overlap 2 Setting the buffer memory When carrying out RW update designate in the R2 buffer memory shown below R2 buffer memory Name Details address Designate the data update interval time between the master R
222. s user registration frames Up to 200 user registration frames can be registered in the EEPROM Register in frame No 3E8H to 4AFH 1000 to 1199 The characters that can be registered as user registration frames include normal characters and special characters Up to 80 bytes of characters can be registered Character Details One byte of data for data code 00H to FEH Normal character These are the registration codes for the data codes to transmit and receive the 00H to FEH data This is a special code designated with the registration code FFH and Special character a special character code shown in 2 Combination of FFH OOH to FFH 2 Designating a special character Up to 80 bytes of characters with a combination of normal characters data code 01H to FEx and special characters refer to a to d can be designated in the user registration frame area 3E8H to 4AF The method for designating special characters is shown below a Confirmation of special character The special character is configured with the following arrangement Special character code Designated with special character code Sye v 1st byte 2nd byte 3rd byte and following 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A b Functions of special characters and usability during transmission reception Usability Transmission Reception Special p Fane p Function during transmission reception Frame pranns Frame character code trans
223. s when the power is turned OFF However if the user has registered the default values in the R2 EEPROM the EEPROM default values will be written in when the power is turned ON Refer to section 8 8 for details on writing to the R2 EEPROM Refer to the buffer memory list in the following manner Address Default Initializa EEPROM i Name Update registra Reference hexadecimal value tion reg Indicates whether the R2 buffer memory value is updated by the master station or R2 gt M station Updated by the master station e R2 Updated by R2 Both Updated by both master station and R2 Indicates whether initialization is required when the R2 buffer memory values have been changed Initialization Refer to section 8 6 for details on initialization e Required Initialization is required e Not required Initialization is not required Indicates whether the contents of the R2 buffer memory can be registered in the R2 EEPROM Refer to section 8 8 for details on registering to the EEPROM Possible Registration to the EEPROM is possible Not possible Registration to the EEPROM is not possible 7 Indicates the chapter section or page containing detailed explanations EEPROM registration 3 SPECIFICATIONS MELSEC A 1 Area for designating various assignments Default Initializa EEPROM Address exadecimal R2 Transmission area head address designation Transmission area size 6 1 R2 1H gt 200 A designati
224. sed for the DC code control is contained in the transmission reception data use the ASCII BIN conversion function If the ASCII BIN conversion function is not used DC code data used for the DC code control cannot be used 2 DTR DSR signal control The R2 notifies the external device whether the local station can receive data with the DTR ER signal Whether the external device can receive data is confirmed with the DSR DR signal a DTR ER control If the amount of space open in the OS reception area is less than 64 bytes the R2 turns OFF the DTR ER signal and the external device cancels the transmission to the R2 When the reception data is read out from the programmable controller CPU and the amount of space open in the OS reception area reaches 263 bytes or more the DTR ER signal is turned ON and the transmission from the external device to R2 is restarted 8 OTHER FUNCTIONS MELSEC A ON ON OFF OFF DTR ER signal eae enabled at ON i i i Reception disabled at OFF Reception ready R3 R2 complete OS reception area OS reception area 5120 Data storage Pale storage bytes 5120 bytes 263 bytes o L 64 bytes penarea or mere or less Open area Reading of reception data by programmable controller CPU b DSR DR control When the DSR DR signal is ON if there is data to be transmitted the R2 transmits it to the external device If the DSR DR signal is OFF and there
225. signated with reception head end frame No 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 3 1 Reception data The arrangement of data when frames are received is shown below 1 Reception data arrangement The statement when receiving data with frame reception can be received only with the group 1 1 to 4 or group 2 5 to 7 data arrangement shown in the following combination table Thus the reception head end frame No designation R2 108H to 10Bu 10CH to 10FH setting must be carried out with group 1 or group 2 Reception statement Head frame Random data End frame eal A 4 Registration frame Randondaia Registration frame Combination reception head reception end section a External device O Data received No data received If both group 1 and group 2 for example 1 2 and 5 are designated with the head frame or end frame combination designated for the reception head end frame No designation UR 2 108x to 10Br 10CH to 10FH only the reception data for group 1 will be received and processed The reception data for group 2 will be ignored or may not be correctly received and processed 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 1 If there are one or more combinations 1 to 4 in combination table with a reception head frame designated set the reception end data size R2 111H to match the length of the random data section to be received If the
226. sion area to Transmission error RXn1 5 0 RXn0 external device complete or Transmission error complete RXn1 When data is received from an external device connected to R2 and the transmission is completed normally reception normal read request RXn2 turns ON If the transmission is completed abnormally reception error read request RXn3 turns ON Rxn2 Reception normal The reception data is stored in the R2 reception area at this time read request The data in the R2 reception area is read out when these signals turn ON and read complete RYn2 turns OFF when the reading is completed Reception normal read request RXn2 or Reception error read request Reception area is read j with sequence program RXn3 Reception error read request Reception read complete RYn2 The initialization request RYN4 is turned ON to initialize R2 When the R2 is correctly initialized initialization correct complete RXn4 turns ON a Initialization normal and when the process ends abnormally initialization error complete RXn5 turns ON n complete The initialization request signal RYn4 turns OFF when these signals turn ON Initialization request RYN4 Sr ee R2 is initialized Initialization normal complete Rxn5 Initialization error RXn4 n complete or Initialization error complete RXn5 3 SPECIFICATIONS MELSEC A The OS reception area clear request RYn6 is turned ON to abort the data in the R2 OS receptio
227. sion buffer write data size D183 Quantity Fixed 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE D184 D185 D186 K7 PO YITE M153 M53 XHE m RST YUE SET M154 M54 XNE SET M155 RST M154 RST M153 CAL PI FROM H H203 D200 K CALL PO M155 M158 X11 KO D200 P1 D190 D191 D192 D193 D194 D195 MELSEC A Access code attribute R2 read destination buffer memory head address Set reception data size Write control data to reception buffer Change to bank 0 Set intelligent device station access request Reset intelligent device station access request Change to bank 1 Read reception data size Change to bank 0 Change to bank 1 Dummy area Set station No request code Set transmission buffer write data size Quantity Fixed Access code attribute R2 read destination buffer memory head address 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MOV D200 D196 TO HO HO D9 Y CALL PO SET YUE SET M158 M58 XNE RST Y11E SET M159 W59 XUE M160 M158 M155 2 Program to change to bank 0 MELSEC A Set reception data size Write control code to transmission buffer Change to bank 0 Set intelligent device station access request Reset intelligent device station access request Complete reception data read Store No of read points inZ Change to bank 1 Read reception data Change to bank 0 Specify partial refresh Specify b
228. size data size of the received frame data Thus the reception end data size designation and reception data size will not match 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 7 3 2 Reading the reception data The method for reading the reception data during data reception with frame is explained below 1 Comparison with non procedural communication Each timing for the start and completion of reception when receiving data with frame reception and with non procedural communication is shown below For frame reception When receiving data with non procedural Refer to 2 for each timing communication 1 When reception head frame and reception end frame are set When head frame is received 2 When only reception head frame is set When head frame is received 3 When only reception end frame is set When head data of random data section is received If there is no random data section when reception end frame is received When head data is received 1 When reception end data size is received or 1 When reception end data size is received end frame is received Follows preset conditions Refer to section 2 2 When reception error reception timeout etc 2 When reception error reception timeout etc occurs occurs The data to the above reception or error All of the received data is stored in the occurrence is stored in the reception area of the reception area of the buffer memory b
229. size 294 User R2 side head address registration Fixed value 4004 4004H frame area Master station side offset 1C7H address Transmission size Automatic Monitor R2 side head address update area transmis Fixed value 40041 4004y M station Required Possible mae designation sion area 1 g Master station side offset 118H address Transmission size Monitor R2 side head address transmis Fixed value 4004 4004H sion area 2 Master station side offset 200H address Master stationR2 RWw1 elie Ma eae Possible Er R2 46H RW refresh R2 Master station RWr1 destination address R2 474 designation Master station gt R2 RWw2 R2 Master station RW 49H System area Use prohibited Monitor Monitor target designation lo designation 1 _ Transmission data designation Lo Monitor target designation Monitor designation 2 3 SPECIFICATIONS MELSEC A Parameter area Address Default Initializa EEPROM Flow control designation ni a R2 R2 101 RS RTS signal status designation SU Word byte unit designation gt M station Required Possible a mae BIN conversion designation Fa Ker E2 1054 reen timeout time designation KOM R2 106H to 107H E a 6 1 System area Use prohibited Reception head frame No Section 7 3 Reception end frame No M station Required Possible 10En 10FH
230. ss MOV Ki 024 No of write points MOV K20 D25 rite data G RIWT UO D20 D25 M140 Write execution 5 PRELIMINARY INFORMATION MELSEC A MEMO 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE The methods of exchanging data with an external device are described in this section 6 1 Matters to understand before transmitting data When transmitting data to an external device the data is first stored in the R2 transmission area It is then transmitted when the transmission request signal RYn0 turns ON 1 Transmission procedures Start Write the transmission data size and transmission data into the RR L Secti 56 57 transmission area using the buffer memory automatic update function eClOns Se or transmission reception buffer Turn ON the transmission request signal RYn0 The data will be transmitted and after completed the transmission normal complete signal RXn0 or transmission error complete signal RXn1 will turn ON y Turn OFF the transmission request signal RYn0 Y Turn OFF the transmission normal complete signal RXn0 or transmission error complete signal RXn1 End 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE 2 Transmission area When transmitting data to an external device the transmission data is stored in the R2 transmission area This transmission area is an R2 buffer memory area used to write the transmission data size
231. st Of error e el 10 2 10 2 Confirming the error with the LED asses s sese serene 10 5 10 3 Examples of trouble in general purpose input GIrGUIL eee eee eee eee 10 7 10 4 Troubleshooting per Symptom ccsccsecceeccescenscereterscenscetecenecensdenssenscenscensderseenscenseenstenseeuseeneereanensaeties 10 9 10 5 Troubleshooting when the master station s ERR LED ashes eee eee eee eee 10 10 APPENDIX Appendix 1 to Appendix 2 Appendix 1 Outline dimension drawing sss sese eee Appendix 1 INDEX INDEX 1 to INDEX 3 About Manuals The following manuals are also related to this product In necessary order them by quoting the details in the tables below Related Manuals Manual Number Model Code Manual Name Control amp Communication Link System Master Local Module Type AJ61BT11 A1SJ61BT11 User s Manual IB 66721 Explains the configuration performance and specifications functions handling wiring and 134872 troubleshooting of the AJ61BT11 and A1SJ61BT11 system Sold separately Control amp Communication Link System Master Local Module Type AJ61QBT11 A1SJ61QBT11 User s Manual 1B 66722 Explains the configuration performance and specifications functions handling wiring and 134873 troubleshooting of the AJ61QBT11 and A1SJ61QBT11 system Sold separately CC Link System Master Local Module User s Manual QJ61BT11N Explains the configuration performance and specifications functions handling wiring
232. st request request request request command RYn0 RYn1 RYn2 RYn3 RYn6 RYn7 RY n 1 9 RY n 1 A If initialization is carried out while RX or RY is ON the current process will be canceled Start initialization after turning all RY other than RYn4 OFF 5 PRELIMINARY INFORMATION MELSEC A 5 6 Reading and writing the buffer memory using the buffer memory automatic update function 5 6 1 Outline Programmable controller CPU TO RITO The methods for reading and writing the R2 buffer memory using the buffer memory automatic update function is described in this section When the buffer memory automatic update function is used data can be read and written using the FROM TO command so the sequence program can be simplified With the buffer memory automatic update function if a cause of data communication between the R2 buffer memory automatic update area and master station automatic update buffer is generated the data is automatically exchanged and the data in the corresponding area of each station is updated Refer to section 5 6 2 for details on each area and the update timing e Reading The master station buffer memory corresponding to the buffer memory to be read is read out with the FROM RIFR command e Writing Data is written to the master station buffer memory corresponding to FROM RIFR J H the buffer memory to be written in using the TO RITO command Master station R2 1st stati
233. state and software version can be confirmed This is effective for confirming the state when the R2 switch settings are correct but the operation is incorrect When using the buffer memory automatic update function to read refer to section 5 6 Refer to section 5 7 3 when using the transmission reception buffer R2 buffer memory Name Details address Station No setting The state of the R2 station No setting switch is stored R2 1A0 Ba Ae 1 to 64 Station No The state of the R2 data link transmission speed setting switch is stored Unit kbps 156 625 2500 5000 10000 Set data link transmission speed The state of the R2 mode setting switch is stored OH On line mode using transmission reception buffer 1H On line mode using buffer memory automatic update function 2H to CH Not used or Use not possible Data link transmission speed setting switch 1A2H Mode setting switch Du Hardware test mode En FH Not used RS 232 C The transmission speed set in the R2 is stored Unit bps R2 1A3H transmission speed 300 600 1200 2400 4800 9600 19200 Set RS 232 C transmission speed The data bit length set in the R2 is stored RZJ 1Aa4 PS 232 C databit 7 7 bits length S 8 8bits The validity of the parity bit set in the R2 is stored RS 232 C parity bit O No parity bit R2 a s TASH validity 1 Odd parity bit 2 Even parity bit l The stop bit length set in the R2 is stored R2 1A6H RS 232 C stop
234. status when the command is completed is stored 0 Normal completion Other than O Error completion error code Refer to the Master Module User s Manual Details Station No designate with high order bytes bits 8 to 15 Station No The station No of the accessed intelligent device station is stored request code Request code designate with low order bytes bits 0 to 7 The read request code 10h is stored S data size The total No of bytes of the read data is stored System Read data The target R2 buffer memory data designated with the control data buffer memory address bin System byte items and No of read points is stored 5 PRELIMINARY INFORMATION MELSEC A 5 7 3 Reading the R2 buffer memory When reading the R2 buffer memory using the transmission reception buffer after the control data is written to the transmission buffer the data is read from the buffer memory by turning the intelligent device station access request complete signal RY n 1 E RX n 1 E ON and OFF 1 Flow of process 3 Read command Programmable controller CPU Master station R2 5 Intelligent device station access complete ON Remote 7 Intelligent device station access Remote input RX complete OFF input RX Bit device 2 Intelligent device station access request ON 6 Intelligent device station access Remote Remote request OFF output RY output RY 1 Control data Word device 8 R
235. t initialization data write complete flag 9 PROGRAM EXAMPLES KO gf cer Y104 M100 M115 x104 RST Y104 SET M114 x105 s E M135 M114 X104 X105 SET M115 Data transmission Transmission data ABCDEF 2 s M120 Transmission SW M100 M115 100 X100 X101 M120 Ll SET M125 M125 KY SS LU K3 D100 aaaa HA9 D101 aaa tts st I L 10 H4645 D103 ee RITO UB HO J __ _ _ ___ _ _ sur KI J ___ _ _ sur H200 LEDC D100 SUB k4 LEDR SET Y100 RST M125 M100 X100 B LRST 100 X101 Data reception W100 M115 X102 SET M130 x103 MELSEC A 7 Set initialization request J Reset initialization request T Set the error occurrence flag J Complete initialization Pulsate data transmission switch Set data transmission flag J Set transmission data size Set transmission data 41H 42h Lo Set transmission data 43H 441 Set transmission data 45n 46x Lo F Dedicated command RITO J Master station head I O No Write destination station No 4 Write destination buffer memory address R2 J Write data J No of write points J Set transmission request Reset data transmission flag Reset transmission request Set data reception enable flag Lo 9 PROGRAM EXAMPLES M130 Y102 LEDA SUB SUB SUB LEDC SUB KO D200 SET M100 X102 X103 Y102 HH RST R2 error processing RST M100 X101 SET X
236. tart request signal OFF 9 PROGRAM EXAMPLES Read remote input RX X100 to X15F X0 XOF X1 m CALL PO FROM HO HOEO K4X100 KB Confirm R2 data link state x0 XOF xt H680 KIMI K1 Error LED CALL P102 Error LED CALL P103 Write remote output RY Y100 to Y15F Error LED 10 XOF Xi CALL PO H160 K4Y100 K6 b Program to change to bank 0 c Program to change to bank 2 MELSEC A Change to bank 0 Read RXn0 to RX n 5 F to X100 to X15F Read R2 data link state SW0080 Station No 1 R2 data link normal Station No 1 R2 data link abnormal Station No 2 R2 data link normal Station No 2 R2 data link abnormal Station No 3 R2 data link normal Station No 3 R2 data link abnormal Change to bank 0 Write Y100 to Y15F in RYnO to RY n 5 Specify partial refresh Specify bank 0 Execute partial refresh Specify partial refresh Specify bank 2 Execute partial refresh 9 PROGRAM EXAMPLES d Station No 1 program R2 initialization initial data read M104 X119 X118 Piot s lBET X119 X11B RST SET M104 X119 X11B t SET RST R2 initialization initialization data write M105 M110 CALL TO HO Hi H100 TO HO H2 H300 TO HO H H100 TO HO H18 H100 TO HO HIB H1CO TO HO HIC H100 TO HO HID H300 T0 HO HIF H2co TO HO H24 HO TO HO H28 HO TO HO H2 HO TO HO H30 HO T0 HO H112 K20 TO HO HHA K20 CALL SET R2 initialization initialization execution M1
237. tch Stales eee 8 23 Confirming software version eee ee ee e 8 23 Confirming the error with the LED 10 5 Connection with external deice 0 0 4 9 COntrol datas tele d fl aii ee 5 29 FROM command sss sese eee eee eee 5 38 RIRCV COmmand sss sees eee eee eee eee 5 36 RIRD command sss sese 5 35 RISEND Command sese 5 31 RIWT Command sese eee eee eee eee 5 30 TO COmmand sss sees sese 5 33 Controlling the RS 232 C signal 8 21 Precautions 2 is dete hae ae 8 22 D Data link aien it nceteie a dere 4 8 Confirmation State eee eee ee eee 5 7 Transmission speed setting switch 4 7 DC code control sese eee 8 6 Default registration frames 0 00 7 1 7 23 Devices and statuses that can be designated A A ete livid nade ee eee 7 14 DTR DSR signal Control sss 8 7 E EEPROM function area sse eee eee eee 5 22 Error COto 10 2 Storage ACA eee eee 10 1 Examples of trouble in general purpose input Circuiten ocala oe cece L 10 7 F Flow Control sees eee ee 8 6 DC code Control sees eee 8 6 DTR DSR signal control 8 7 Setting the buffer memory sees ee ee 8 8 Forced reception sss sese eee 8 3 Frames araen ici eet aa n a 7 1 QuUING a e ee 1 3 Reading the reception data sees 7 10 Reception sees eee eee eee eee 7 6 Reception data sese 7 8 Transmission eee eee eee ee ee eee 7 2 G General purpose input output specifications 3 4 General specif
238. te signal RXn1 Master station Automatic update area f transmission area R2 Transmission area I 1 1 I I I I ae o a u Transmission vv h I 1 1 iJ LX K External device lt Carried out with sequence program Carried out by R2 8 OTHER FUNCTIONS MELSEC A Control side The transmission data is written to the automatic update buffer transmission area Program ray lite transmission request signal RYn0 turns ON 3 The transmission data in the master station buffer memory is read out and stored in the R2 transmission area The transmission data is transmitted to the external device 8 The transmission request signal RYnO and transmission cancel request signal RYn1 turn OFF 9 The transmission error complete signal RXn1 turns OFF e Transmission using the monitor transmission function cannot be canceled with the transmission cancel function s To resend data that has been canceled with the transmission cancel function carry out the transmission process again The data will be transmitted from the head 3 Program The program for canceling the data transmission is shown below Refer to section 5 1 for details on the program conditions Cancel sra 1 X109 Yu Sans SET Y101 et transmission R2 normal cancel request RYn1 X100 RST Y100 Reset transmission request RYn0 X101 RST Y101 Reset transmission cancel request RYn1 e Configure the fo
239. ted During frame transmission the remote register RW value is referred to and depending on the value the registration frame registration data or the contents of the transmission area are transmitted The designated RW value is interpreted as the registration frame No If the RW value is 8000n the contents of the transmission are transmitted RW FFu DOH designation 1 Example When RW value referred to is 102H Registration frame No 1024 data LF CR OAn OD Transmission D1H to D7H Use prohibited During frame transmission the remote register RW value is referred to The value is interpreted as an unsigned value 0 to 65535 is converted into a 5 digit decimal ASCII code and is then transmitted If the RW value referred to has less than 4 digits the data will be converted into a space string value ASCII code and transmitted RW Example When designated RW value is 1234 1234 is transmitted as ASCII code 4 3 2 1 34H 33H 324 314 204 K Transmission 1 Refer to section 2 for details on designating RX RY RW 7 28 7 USING FRAMES WHEN EXCHANGING DATA Special character code MELSEC A During frame transmission the remote register RW value is referred to The value is interpreted as a signed value 32768 to 32767 is converted into a 6 digit decimal ASCII code and is then transmitted If the RW value referred to has less than 5 digits the data will be converted into a sp
240. ted with the following arrangement Refer to section 5 1 for details on the program conditions 1 Master station initialization Refer to section 5 4 Parameter settings start of data link 2 Reading of remote input RX t 3 Confirmation of R2 data link state t 4 R2 initialization Refer to section 5 5 5 Transmission of data to external device Refer to sections 6 3 1 and 6 4 1 P 6 Reception of data from external device Refer to sections 6 3 2 and 6 4 2 t 7 R2 error processing t 8 Writing of remote output RY 1 Create a program that instructs CC Link refreshing and then starts the data link after the parameters are set Refer to section 5 4 2 Create the following program and read RXn0 to RX n 1 F into X100 to X11F Module error master station Module ready master station Local station data link state master station X0 XOF X1 r Kd Changeover to bank 0 Read RXn0 to RX n 1 F FROM HO HOEO K4X100 K2 to X100 to X11F When using QCPU Q mode or QnACPU setting automatic refresh parameters refreshes the contents of the remote input RX and remote output RY automatically Thus the above program is not required 5 PRELIMINARY INFORMATION MELSEC A 3 Create a program that detects the R2 data link state and establishes an interlock XU XOF XI FROM HO H680 K1M1 K1 Read R2 data link state
241. ter eee 7 25 User registration frame area cere 5 22 Using the transmission reception buffer Reception data 6 24 Transmission data sese 6 18 W Winns ti ote diventtivinth EA EA AR 4 8 Writing to the buffer memory Using the buffer memory automatic update MUNCUON a tr eeti ainda then ein 5 18 Using the transmission reception buffer 5 43 Index 3 WARRANTY Please confirm the following product warranty details before using this product 1 Gratis Warranty Term and Gratis Warranty Range If any faults or defects hereinafter Failure found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company However if repairs are required onsite at domestic or overseas location expenses to send an engineer will be solely at the customer s discretion Mitsubishi shall not be held responsible for any re commissioning maintenance or testing on site that involves replacement of the failed module Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not
242. ter station RY RWw R2 RY RWw Master station RX G L input aster station RX General purpose inpu SM LSx3410 RXnC RXnD Master stati General purpose output aster station Gen purp p ee exes RYnC RYnD SM LSx2 RS SM Master station sequence program s scan time LS Link scan time Refer to Master Module User s Manual RS R2 internal processing time Hi 1 R2 internal processing time The R2 internal processing time is calculated with the following equation R2 internal processing time R2 LS x K constant Transmission 156kbps 625kbps 2 5Mbps 5Mbps 10Mbps spee K constant 2 Calculation example An example for calculating the transmission delay time from the master station RX RWr to R2 RX RWr When only one R2 is connected with SM 20ms and transmission speed 156kbps a When the master station is the A QnA Series LS 51 2 29 4 8 x 4 8 8 x 9 6 1 32 4 1 x 4 8 1 x 9 6 1300 11100us 11 1ms 20 11 1 x3 11 1 x2 75 5ms b When the master station is the Q Series LS 51 2 27 8 x 4 8 8 x 9 6 1 30 1 X 4 8 1 X 9 6 1300 0 0 10854us 10 9ms 20 10 9 xX 2 10 9 x 2 63 6ms 3 19 3 SPECIFICATIONS MELSEC A 3 9 Transmission reception time The transmission reception time is shown below 3 9 1 When using buffer memory automatic update function The transmission time is the time from when the transmission request RYn0 turns
243. ter station transmission buffer Master station reception buffer R2 buffer memory sex 7 _ Carried out with sequence program pali Carried out by R2 Control side 1 The control data and buffer memory value to be changed are written to the master G Program station transmission buffer The intelligent device station access request signal RY n 1 E turns ON Program The contents of the master station transmission buffer are stored in the R2 buffer memory are transmission data 4 The control data is stored in the master station reception buffer Pine intelligent device station access complete signal RX n 1 E turns ON R2 O S The intelligent device station access request signal RY n 1 E turns OFF Program 7 The intelligent device station access complete signal RX n 1 E turns OFF 5 PRELIMINARY INFORMATION M138 M138 M139 XU1E XE XU1E 3 Program MELSEC A The program for writing 20 2 seconds to the reception timeout time designation area R2 1121 is shown below Refer to section 5 1 for details on the program conditions a To use FROM TO command with ACPU QCPU A A mode MoV MOV MOV MOV MOV MOV MOV MOV T0 HO HO CALL KO H112 K10 KI H4 H112 KI K20 D20 CALL SET SET RST SET SET RST RST PI 020 021 D22 D23 D24 D25 D26 D27 K8 PO YE M138 Y11E
244. the RS can receive data When not using DTR DSR control the output signal RYnA is followed DR DSR When using DTR DSR control if this is OFF data will not be transmitted from R2 to the external device Set this to be always ON when the external device is in the reception enabled state When not using DTR DSR control the DSR signal status will be ignored RS a This follows the 101H setting and output signal RYn9 Css eas When the CS signal is OFF data will not be transmitted from R2 to the external device Set this to be always ON when the external device is in the reception enabled state A standard connection example of the RS 232 C cable is given in section 4 5 2 3 3 3 SPECIFICATIONS MELSEC A 3 4 General purpose input output specifications The general purpose input output specifications of the R2 are shown below 1 General purpose input specifications DC input Positive common negative common shared type External connection view No of input points Insulation method Photo coupler insulation Rated input voltage 24VDC Rated input current Approx 7mA _ss lalxe Working voltage range 19 2 to 28 8VDC ripple rate within 5 FE Max No of simultaneous 100 24VDC input points EH omaron H G o a E Response time 2 points common COM1 Internal circuit C
245. the information of each area in the automatic update area designation R2 10H to 33H is important The timing for carrying out automatic update in each area is determined by the R2 The application of each area differs according to the timing 1 Role of each area a Status storage area R2 10x to 13H This area is used to store the error codes and transmission reception data information in the master station This area is required for initialization so use it with the default settings 1 Update timing Update direction R2 to master station The data in the R2 buffer memory is stored in the master station at the following timing 2 Error code transmission reception data information Just before the R2 turns the transmission normal error complete signal RXn0 RXn1 ON Just before the R2 turns the reception normal error read request signal RXn2 RXn3 ON Just before the R2 turns the initialization normal error complete signal RXn4 RXn5 ON Just before the R2 turns the EEPROM function normal error complete signal RXn7 RXn8 ON Just before the R2 detects that the error reset request signal RY n 1 A is ON Just after the R2 detects an error when transmitting data with the monitor transmission function Just before the R2 turns the initial data read complete signal RX n 1 9 ON 1 Transmission error complete 5 PRELIMINARY INFORMATION MELSEC A b Transmission area R2
246. tion 8 5 area to be automatically updated in the buffer memory R2 initialization Initializes the R2 Section 8 6 OS reception area clear Clears the received data stored in the R2 OS reception area Section 8 7 Registers a setting value for the R2 buffer memory s specific application area in the EEPROM or returns the value Registration to registered in the EEPROM to the R2 default value RS EEPROM The value for the R2 buffer memory registered in the EEPROM including the setting values changed by the user is used as an initial value at the time of the R2 startup Reads the status of the RS 232 C interface signal stored in the R2 buffer memory and controls the Section 8 9 output x Section 8 8 RS 232 C signal control O Related lt Not related 3 SPECIFICATIONS MELSEC A 3 6 Input output signals for master module The input output signals RX RY for the R2 master module are explained in this section 3 6 1 List of input output signals A list of the R2 input output signals is shown below Rng aa signal Signal setting 7 Ra RX ae to RY n 1 B to RY n 1 D Use prohibited RX n 1 D Use prohibited RX n 1 E Intelligent device station access complete RY n 1 E Intelligent device station access request RX n 1 F Use prohibited RY n 1 F Use prohibited n Address assigned to master module with station No setting 1 The RS signal setting is valid when the RS signal status designation R2 1011 i
247. to 0 Set monitor transmission area 1 transmission size to0 Set monitor transmission area 2 transmission size to0 Set reception timeout time to 2 sec Set transmission timeout time to 2 sec Change to bank 0 Set initialization data write complete flag 9 PROGRAM EXAMPLES ko gt SET MIT x124 H RST SE X125 HA e R 16 ey X125 X120 X121 44 set Data transmission Transmission data ABCDEF X24 j PLS Transmission SW M117 120 X120 X121 M121 TRET W126 Ss Tee Hoy H4241 Hav H4443 pow HR po LL To HO H580 D105 1 Data reception Amea RT H117 X122 a er X123 L W131 122 o KU D250 CALL A RO HO H680 D250 MOV D250 FROM HO H681 D251 120 M126 Y120 M131 KI KOZ MELSEC A Set initialization request Reset initialization request Set the error occurrence flag Complete initialization Pulsate data transmission switch Set data transmission flag Set transmission data size Set transmission data 41H 42H Set transmission data 43H 44H Set transmission data 45h 46x Change to bank 2 Store transmission data in automatic update buffer Change to bank 0 Set transmission request Reset data transmission flag Reset transmission request Set data reception enable flag Change to bank 2 Read reception data size Store reception data size i
248. to section 5 2 for details on changing the banks e A Series master module Bank 2 OH to FFFH e Q QnA Series master module 20004 to 2FFFH 2 When using the RITO RIFR command the bank is changed automatically so it does not need to be changed by the user 6 3 1 Transmitting data to an external device The method for transmitting data to an external device using the buffer memory automatic update function is explained in this section 1 Flow of process The flow of the process for transmitting data to an external device using the buffer memory automatic update function is shown below Master station R2 External Programmable controller CPU E device 5 Transmission normal error complete ON Bit device Remote input RX 7 Transmission normal error complete OFF Remote input RX 2 Transmission request ON 6 Transmission Remote Remote request OFF output RY output RY Word device 1 Transmission Automatic Random area data write update 3 Automatic read Trans gt buffer mission ppt ptt yt Trans transmis area 4 Data transmission RS 232 C mission sion area 6 EXCHANGING DATA WITH AN EXTERNAL DEVICE MELSEC A 2 Timing chart Programmable Word device controller CPU Transmission data Transmission request signal RYn0 Transmission normal err
249. transmits DC3 to the external device and the external device cancels the transmission to the R2 When the reception data is read out from the programmable controller CPU and the amount of space open in the OS reception area reaches 263 bytes or more DC1 is transmitted to the external device and the transmission from the external device to R2 is restarted External device side R2 side R2 R2 OS reception area OS reception area X XP Data storage 5120 Data storage 5120 ge bytes bytes bytes Open area or more a 7 nws 4 or less Reading of reception data by programmable controller CPU 8 OTHER FUNCTIONS MELSEC A b DC1 DC3 reception control When the R2 receives the DC3 code the transmission to the external device is canceled When the DC1 code is received the transmission to the external device is restarted External device side R2 side When the power is turned ON or the system is initialized the DC1 transmission state reception enable and DC1 reception state transmission enable are set Note that the R2 does not wait to transmit DC1 to the external device or receive DC1 from the external device When carrying out DC code control the DC1 DC3 code received from the external device is not stored in the R2 reception area The DC1 and DC3 codes are 11H and 13H The DC1 and DC3 codes cannot be changed When carrying out DC code control if a DC code data 11H 13H u
250. uch as ID controller Remote UG module 62 C gt ransmission area data rK S 8000x rame No 2H k a E l RX5 ON R2 Setting value Monitor interval time ee re Monitor interval time 200ms designation Monitor designation size o iias Monitor designation size 1 Monitor target designation 1 10055 a Monitor target Rising edge of RX5 Transmission data x S 02014 Jee Transmission data designation designation 1 Data to transmission table No 1 to 2 Transmission timeout Ae Benes 5 designation 0 o es Transmission timeout time 500ms Transmission table au es Transmission table No 1 designation No 1 Registration frame No 2 Transmission table 3000 o es Transmission table No 2 designation No 2 Transmission area data 7 USING FRAMES WHEN EXCHANGING DATA 7 4 4 Precautions MELSEC A Precautions for using the monitor transmission function are explained below 1 The device status for transmission trigger storage is monitored at the interval 3 designated with the buffer memory monitor interval time designation R2 70n The ON OFF status value status state that act as the transmission trigger generation condition must be held for longer than the monitor interval time 100ms If the ON OFF status value status state that act as the transmission trigger generation condition are not held for longer than the monitor interval time
251. uffer memory 1 1 The received statement is stored with the reception head frame reception end frame abort designation R2 110n If the reception head frame reception end frame is not designated only the random data section is stored in the reception area If not even one reception head frame reception end frame is designated the designated frame section and random data section are stored in the reception area with the received order 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A 2 Reception data and read timing The timing when the R2 requests reading of the reception data to the programmable controller CPU according to the end frame and reception end data size is shown below The numbers in the tables indicate the reception statement and timing pattern Nos shown below Timing pattern No refer to diagrams below When random When wnen data section in head mal end reception Random data section frame is 3 frame is E statement is A received A received received Reception data Remarks reception data When reception Reception data size gt reception end data size Ref rto section Lee H 1 for detai reception end Reception data size lt reception end data size 1 1 1 for details When reception end data size is 0 on the data that 7 7 S S can be read by Reception data size gt reception end data size E a e Reception data size lt reception end data size programmable When reception end
252. urns OFF If the R2 initialization is completed with an error remove the cause of the error and repeat the initialization request until the process ends normally R2 will not accept other requests until the initialization is completed normally If an initialization error occurs the remote station READY signal RX n 1 B will turn OFF 5 PRELIMINARY INFORMATION MELSEC A 4 Program Refer to section 5 7 4 for details on writing the data using the transmission reception buffer Refer to section 5 1 for details on the program conditions M100 M110 M140 r 4 Write initialization data to R2 Refer to section 5 7 4 r aie NIS Writing to R2 completed SET 110 Set initialization data write complete flag M115 W110 M114 100 101 102 103 106 Y107 Y119 R2 normal Eat Eat Eat Ko gt 5 ve SET 104 J Set initialization request RYn4 M115 X104 OAE JE RST 104 Reset initialization request RYn4 SET wid X105 SET H135 Set the error occurrence flag H114 X104 X105 SET W115 Initialization complete Create the following interlock circuit so that the initialization request is made after all request signals RY are turned OFF Forced Os Transmis Reception reception reception EEPROM Transmis sion cancel read output complete buffer clear function Initialization Error reset Initialization sion request request complete reque
253. ut side Transistor output sink type 12 24VDC 2 points Terminal block Refer to section 3 4 100 000 times CC Link dedicated cable One minute at 500VAC between DC external terminal batch and grounding batch and grounding With noise width 1s noise frequency 25 to 60Hz noise simulator Tightening torque range 0 78 to 1 18N m i j 24VDC ernal power su P SED Current consumption 0 11A Tolerable instantaneous 2 m i 5 iant ims 0 40Kg power failure time 3 SPECIFICATIONS MELSEC A 3 3 RS 232 C interface specifications The specifications of the RS 232 C interface for connection with an external device are shown below 1 A 3 S S S Signal Signal direction eooo No Nae abbrev ea pee device ese co The following type of connector detection is mounted on the R2 side so a N i 2 2 Receptiondata data RD RXD _ use a mate connector tha l SD TXD matches this type N 4 Data terminal ready ea a 9 pin D SUB female screw 5 Signal ground fixed type DDK Ltd 17L 10090 27 D9AC 7_ Transmission request RS RTS lt 7 8 Transmission enable_ CS CTS pene reer The details of each signal are explained below CD eee The CD signal status can be read with the input signal RXnB ER DTR When using DTR DSR control this is turned ON and OFF according to the empty size of the OS reception area for storing the received data The DTR signal turns ON when
254. w 1 Buffer memory setting items The items to be set for the monitor transmission buffer memory are shown below When carrying out monitor transmission set the following areas and also set the transmission table to be transmitted in the transmission table designation R2 122H to 185n refer to section 7 2 2 with the sequence program R2 buffer memory Name Details address Designate the monitor interval that the R2 monitors the device or Monitor interval time status for detecting the transmission trigger R2 70x designation 0 Do not carry out monitor transmission default value 1 to 32767 Designate the monitor interval time x 100ms Set the No of the set in the monitor designation 1 to 64 R2 78H to F7x by the user for the R2 to monitor the transmission trigger 71H No of monitor designation detection device or status 0 Do not carry out monitor transmission default value 1 to 64 Designate the monitor designation size l Designate a device or status for transmission trigger detection 78H Monitor target When specifying a device refer to a in this section designation rere When specifying a status refer to b in this section 1 Transmission Designate which data are to be sent by the AJ65BT R2 when a R2 79H data transmission trigger occurs designation For details refer to c in this section Monitor target Monitor designation Same as Monitoring setting 1 designation Transmission 64
255. w Refer to section 5 1 for details on the program conditions Data reception from external device Refer to section 6 3 2 6 4 2 i M100 X103 f i Y106 Set OS reception area R2 normal clear request RYn6 X106 RST Y106 Reset OS reception area clear request RYn6 Set reception read SET Y102 complete RYn2 SET M170 M170 X103 X106 RST Y102 Reset reception read complete RYn2 RST M170 8 OTHER FUNCTIONS MELSEC A 8 8 Registering and initializing the R2 EEPROM The R2 buffer memory setting values can be registered in the EEPROM and the values registered in the EEPROM can be returned to the R2 default values The buffer memory setting values including the values changed by the user registered in the EEPROM are used as the default values when starting up the R2 The R2 buffer memories that can be registered in the R2 EEPROM are shown in the EEPROM registration list in section 3 7 After registering to the EEPROM the sequence program for the section of the R2 buffer memory for which the default values have been changed is not required 1 Flow of process To register or initialize the buffer memory setting values designate whether to register or initialize the buffer memory setting values in the EEPROM function designation area R2 1C0n and then turn ON the EEPROM function request signal RYn7 Master station R2 3 EEPROM function complete ON Programmable controller CPU Bit device Word devi
256. which the data to be transmitted is designated with a number between 1 and 100 e Transmission table size Designate the transmission table size in which the data to be transmitted is designated with a number between 1 and 100 7 USING FRAMES WHEN EXCHANGING DATA MELSEC A Example of setting transmission data To transmit the data designated in the transmission tables No 2 to No 4 when a transmission trigger is generated External device R2 buffer memory Transmission table R2 1224 Transmission table No 1 R2 1234 Transmission table No 2 R2 1244 Transmission table No 3 gt R2 1254 Transmission table No 4 Transmission RS 232 C Transmission Transmission Transmission table No 4 table No 3 table No 2 data data data Meg Soin ae In this case set 0302 for the transmission data designation area 0302H it Designate head No of transmission table Designate transmission table size 7 USING FRAMES WHEN EXCHANGING DATA Master station Address 70x 71H 78x 79x R2 11A 1221 R2 1231 MELSEC A 2 Example of setting to buffer memory An example of setting the buffer memory for monitor transmission is shown below The R2 buffer memory is set as follows to monitor the RX5 in the remote I O module of the first station and transmits the contents of the transmission table when a transmission trigger is generated External device s
257. word count station select La 171 intelligent device station lt Intelligent device station lt Exclusive station Noseting Of 0 1536 9 PROGRAM EXAMPLES Confirm R2 data link state XO XOF X1 FROM HO H680 R2 initialization initial data read H100 M105 M104 X119 X11B KINI _ ___ eO Error LED LET 119 X119 X11B 7 J E RST 119 SET M104 M104 X119 X11B H L H SET M105 RST M104 R2 initialization initialization data write M100 M105 M110 MOV K20 D13 Hi RITO Ud K H112 D13 K1 s nv K20 D14 G RITO UU KI HITA D14 KI SET M110 R2 initialization initialization execution M100 M115 M110 M114 Y100 Y101 Y102 103 106 107 119 l Eat l H N TT H H l KO VIIA 5 pF SET 104 M100 M115 X104 RST 104 SET M114 X105 Kl BET M135 M114 X104 X105 f SET M115 Data transmission Transmission data ABCDEF 100 M115 100 X100 X101 X22 a HF A it SET W125 1125 Transmission SW nov K3 D100 e a H4241 D101 tv H4443 D102 tv H4645 D103 MELSEC A Read R2 data link state SW0080 R2 data link normal R2 data link error Set initial data read request Reset initial data read request Complete initialization Set reception timeout time to 2 sec Write using dedicated command Set transmission timeout time to 2 sec Write using dedicate
258. zation initialization execution 7 M119 M112 M118 Y140 141 146 Y159 Y15A 1 Eu Lat ER N l TAU MELSEC A Set initial data read request Reset initial data read request Complete initialization Change to bank 2 Set R2 transmission area size to 100H Set R2 reception area head address to 2000 Set R2 transmission area size to 1004 Set transmission area 2 transmission size to 100H Set transmission area 2 M station head address to 1C0H Set reception area trans mission size to 100 Set R2 reception area head address to 2000 Set reception area M station head address to 2C0OH Set EEPROM function area transmission size to 0 Set user registration frame area transmission size to 0 Set monitor transmission area 1 transmission size to 0 Set monitor transmission area 2 transmission size to 0 Set reception timeout time to 2 sec Set transmission timeout time to 2 sec Change to bank 0 Set initialization data write complete flag 9 PROGRAM EXAMPLES 1 Transmission SW FROM HO HOA4O D300 MOY FROM HO HOA41 Ko gt SET M119 X144 RST SET x145 SET M118 K144 X145 G l H f IF SET Data transmission Transmission data ABCDEF T PLs K3 H4241 H4443 H4645 GALL D110 CALL SET RST RST SET M119 140 X140 XIH M122 L BET M127 MOY wov MOY MOY TO HO H940 X140 X141 Data reception M119 X142 X143 M132 Y1
259. ze storage 2 nS F Follows Not Not Section 3 SPECIFICATIONS MELSEC A EEPROM area Address Nam Default Initializa EEPROM Reference hexadecimal value tion registration Section 8 8 and 1C0H EEPROM function designation oe M station Not Section ae possible 7 5 2 1C1H User User registered trame No designation frame No designation S IC2H10 stam area Use prohibited DENENA 1C7H User registered frame byte designation Section R2 TOR User registered frame ES Sa possible 7 5 2 R2 User free area Address Name Default Update Initializa EEPROM Referens S A tion registration R2 2001 Default transmission data size designation area Not Secti 0 ection M station cA R2 201NI Default transmission data designation area S S possible 6 1 400 Default reception data size designation area Section 401410 Default reception data designation area ce aires possible 6 2 Follows transmis 600 to sion Not Not 7FFu Area not used at default reception required possible Chapter 6 area setting R2 8001 to a ranor CCEE 3 SPECIFICATIONS MELSEC A 3 8 Transmission delay time The transmission delay time time for data to be conveyed is shown below 1 Calculation expressions Calculation expression unit ms When the master Details ake When the master station is the A QnA Ae l station is the Q Series Series Master station RX RWr R2 RX RWr EO aed LSx3 4RS SM LSx3 RS Mas
260. zing 1 Secure the automatic update buffer size 1COH or more by initializing the master station To write OH to 1BFH into the master station 2 Set the R2 mode setting switch to 1 automatic update function enabled 2 Flow of process Master station Bit device Word device 1 Initial data read request ON 5 Initial data read request OFF 9 Initialization request ON 12 Initialization request OFF 8 Initialization data Remote input RX Remote output RY Automatic update buffer 2 Remote station ready OFF 4 Initial data read complete ON 6 Initial data read complete OFF 7 Remote station ready ON 11 Initialization normal error complete ON 13 Initialization normal error complete OFF 3 R2 default value 10 Initialization data Steps 1 5 8 9 and 12 are carried out with the sequence program Steps 2 3 4 6 7 10 and 13 are carried out by R2 R2 Remote input RX Remote output RY initialization area 5 PRELIMINARY INFORMATION MELSEC A 3 Timing chart 1 lt Initial data read request signal a ee RY n 1 9 Initial data read complete signal RX n 1 9 Remote station READY RX n 1 B Initialization request signal RYn4 Initialization normal error complete signal RXn4 RXn5 Master station automatic N update buffer

Download Pdf Manuals

image

Related Search

Related Contents

Classic® 30  Bulletin d`informations : printemps 2006  codac core system version 5.1 release notes  RootShield Bassinage Fongicide biologique en  CHAPTER II: TECHNICAL SPECIFICATIONS AND TEST  

Copyright © All rights reserved.
Failed to retrieve file