Home
Programming Manual (Special Function Module) IB(NA
Contents
1. 41HW A 424 B 1 41H A 44H D 434 c to 494 0 46H F i 45u E se Gea a me vee come ys gt aceon PRN NE mmm Ri SiC OrnA 2 PRN instructions automatically conduct the ON OFF control of com puter link module X n 0 send completed and Y n 10 send request by internal processing and so control does not need to be conducted by the user 3 The number of data designated at n can be set within the following range AJTC A iiaa 1 to 127 words Word units 1 to no protocoi send buffer memory length set AJ71C24 83 S6 S8 value 1 words AJ71UC24 Byte units 1 to no protocol send buffer memory sengin set value 1 x 2 bytes Set following items when the computer link module data unit designa tion and buffer memory length are not used in power on setting e No protocol word byte designation Power on word e No protocol send buffer memory first address designation Power on OH e No protocol send buffer memory length designation Power on 80H 4 The unit of the number of data designated at n differs depending on the data unit designation word or byte of the computer link module Send data set at S also differs depending whether the designated unit is words or bytes Word unit designation Byte unit designation m C ee 3 t t U 1 4 See Fire word s 2 Fourth word 83 PT Nth yt 8 4 5 The bit device designated at D aut
2. 10 secs S1 8 1 to 2767 1 to 32767 Length of write data unit word Designates number of words when writing data of device designated at S2 ot ued eg em Clock set flag When S1 is 0080H 0081n error completion type is 1 the validity or invalidity of data from S1 12 to S1 15 is stored S1 9 S1 10 0 Invalid 1 Valid re CE een ie Upper 8 bits minute 00H to 59H OOOOH to 5959H Lower 8 bits second 00H to 59H Day of the week when error occurred S1 15 Day of the week 0000H Sunday to 0006H Saturday 0000k to 0006H il s1 16 Error detected network number eae ee aa S1 17_ Error detected station number aa ieee ae 1 See the following manual for details about error codes when operation Is ended with an error AJ71QC24 Serial Communication Modute User s Manual S1 11 Year last 2 digits month when error occurred Upper 8 bits year 00H to 99H Lower 8 bits month 01H to 12h Day hour when error occurred Upper 8 bits day 01H to 31H Lower 8 bits hour 00H to 23x Minute second when error occurred 1 12 1 13 S1 14 10 38 SWRITE Function 1 Stores data stored in devices starting from that designated at S2 to the word devices of the AJ71QC24 designated by the special function module station number in the control data starting from the device designated at D1 The completion device d
3. 1 A program which when XO turns ON sends the data of DO to D4 in word units to the external device connected to the RS 232C interface of the AJ71C21 S1 installed at I O numbers X Y020 to X Y03F is shown here MO turns ON on completion of instruction execution Ladder mode 0 x T R ry u Sets once after CPU RUN in the communication data word unit designation st Mo 9 AH wt K5 WD W List mode 0 wD x21 1 AM x20 2 ANI X10 3 TOP A E202 K0 Xl 8 SET m0 9 WD W 10 AN X20 1 AND Xi 12 G PRRZ 12 15 DO W 21 Ro bi5 6867 bO External device S1 4DH M 49H 1 fje o gt MITSUBISHI ords PR2 PR4 MELSEC QnA 8 2 Data Send up to 00H Code Internal Device MELSECNET I0 Special System User Direct Ji3 i3 Function Register Zn U 31 G 3 instruction symbol Execution condition C represents PR2 or PR4 Command PR2 PR4 nmn oma GS AER Command ere ES a Set Data SetData Description Data Type Head I O number of AJ71021 S1 16 bit binary fee o fet device number of devices storing send Character string D Number of the bit device turning ON on completion of processing Function 1 Sends data from between the device number designated at S and the device number storing 00H to the external device connected to the AJ71621 S1 When send processing is completed automatically turns ON the bit device designated at D after only 1 scan In s
4. The send data set in S differs according to the computer link module data unit designation word or unit Word unit designation Byte unit designation b16 to b8 b7 b bo Tenth b e Ninth b e The bit device designated at D automatically turns ON when the END instruction is executed in the scan completing the send processing and turns OFF at the END instruction of the next scan Used as PR instruction execution completion flag PR Operation Errors Program Example 1 1 In the following cases an operation error occurs the error flag SM0 turns ON and the error code is stored in SDO e When 00H is not stored between the device number designated at S and the last device number of the applicable device Error code 4100 e When the number of send data is outside the following range Error code 4100 AJT ITCZ innr 1 to 127 words Word units 1 to no protocol send buffer memory length set AT REISS Byte units 1 to o ato tend buffer AJ71UC24 j eee memory length set value 1 x 2 bytes e When the module attempting access is not a special function module Error code 2110 e When computer link module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of computer link module control instruction devices is illegal Error code 4301 e When a non designatable device is desi
5. 2 1 Classification of instructions The instructions for special function modules can be broadly divided into the following Classification of Processing Details Description AD61 S1 Read count values and write set value data and Chapter 5 control instructions preset data p AD59 S1 Send data to the printer read write data from to Chapter 6 control instructions the memory card P Conduct data communications with the MELSECNET MINI S3 data link system remote terminal modules AJ71PT32 S3 control instructions Chapter 7 AJ71C21 S1 Communicate with external devices in the no protocol mode and read write data from to Chapter 8 control instructions RAM memory Computer link Communicate with external devices in no Chapter 9 module instructions protocol mode P AJ71QC24 Conduct data communication with external control instructions devices connected to AJ71QC24 or between Chapter 10 AJ71QC24s ID interface Read write ID data through an ID controller to Chapter 11 module instructions an ID data carrier P 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS i ee anete ee ee MELSEC QnA 2 2 How to Read Instruction Tables The instruction tables in Section 2 3 have the following format Table 2 1 How to Read Instruction Tables Basic Category Be Ay Processing Details Execution Numb Steps Reads the key input data from the operation box connected e weut un ntJor o2 n2 H
6. Bence bBb7 bO CZ gt External device S S 1 S 2 S 3 S 4 N External device n 9 bytes haama o gt ABCDEFGHI PRN2 PRN4 2 PRN2 and PRN4 instructions conduct ON OFF control of AJ71021 S1 X n 2 X n 7 send completed Y n 12 and Y n 17 request to send automatically by internal processing and so these controls do not need to be conducted by the user 3 The number of data designated at n can be set within the following ranges Word unit 1 to no protocol send buffer memory length set value 1 words Byte unit eee 1 to no protocol send buffer memory length set value 1 x 2 bytes Set the following items when the AJ71C21 S1 data unit designation and buffer memory length are not used in the designations at power on e No protocol word byte designation Power on words e No protocol send buffer memory first address designation Power on RS 232C 0H RS 422 100H e No protocol send buffer memory length setting Power on 80H The number of data designated at n differs according to the AJ71C021 S1 data unit designation word or byte Furthermore the send data set in S also differs depending on the word byte unit 4 Word unit designation Byte unit designation Evora Co b15 b0 b15 b amp b7 bO C m _ s 1 S 2 Twos s 2 S 3 Feurmwort s 3 o Sjee twos 5 The bit device designated at D automatically t
7. a When the user registration frame is deleted the device designated at S1 1 is made 3 When the device designated at S1 1 is 3 the frame number designated at S1 2 is deleted b The device storing the registered number of bytes designated at S1 3 and the registration data designated at S2 are not used by PUTE instructions but are required for the PUTE instruction format Set dummy data in S1 3 and a dummy device in S2 During execution of a PUTE instruction it is nor possible to execute another PUTE instruction or a GET instruction If an attempt is made to execute a PUTE or GET instruction when a PUTE instruction is already being executed the system waits until the completion of the PUTE instruction already being executed 10 7 PUTE Se rn erm AE Sis A 5 The normal error completion of PUTE instructions can be confirmed by means of the completion device D or status indication device D 1 at completion a Completion device Turns ON at END processing of the scan completing PUTE instruction and turns OFF at the next END processing b Completion status indication device Tums ON OFF depending on the status when PUTE instruction is completed e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing PUTE instruction turns OFF at next END processing Operation at PUTE instruction execution END END END END processing processing proc
8. store the written data Pn iumo wn Function 1 Writes n words of data stored from the device number designated by S2 onward to address numbers starting with that designated by S1 of the memory card installed in the AD59 S1 51 AD59 memory card address S1 1 Area number l RAM Designated S2 Designated aree firat address 40 S2 1 1 aava n words gt w L S2 n n 51 S1 1 1 area number a Oo 432m O j 1254 O 432m U O s2 41 prea tumber 126 OOO m s2 42 8321 When nes words C gt td sa asam s2 43 FOO 126 F000 s2 4 129 PUT Operation Errors 2 3 4 5 Since when data is written to a memory card using the PUT instruction area switching is performed automatically in internal processing in accordance with the ON OFF control of AD59 S1 I O signals Y n 10 Y n 11 the user does not have to perform area switching The first address number designated at S is within the range O to FFFH The area number designated at S 1 is within the range 0 to 3 The number of words designated at n is within the range 1 to 4096 Note that it is not possible to write data to a destination that overlaps two or different area more areas in the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e The address number designated by S1 exceeds the range 0 to FFFH Error code 4100 e The area number designate
9. Error code 4302 Program Example 1 A program which when XO turns ON transmits the data of DO D4 in word units to the external device connected to the AJ71C24 S3 installed at I O numbers X Y020 X YO3F is shown here MO turns ON on completion of instruction execution Ladder mode K1 F7 Sets once after CPU RUN in accordance with the communication data word unit designation List mode 0 D x27 1 ANI X2D 2 TOP He H103 KO n 7 LD X0 8 AD 27 9 M 12 10 G PRN v2 15 M K3 9 D PRN MELSEC QnA b5 t bB twt b 49 i 400 M 534 S S4H T ao ou he E 534 S 1 49 i ao _1 480 H External device MITSUBISHI ie MELSEC QnA 9 2 No Protocol Mode Data Send Up until 00H Code MELSECNET 10 Special Direct JU Function Register Zn Execution condition Command PR Eya n Oe Oe Command r H a Set Data Description Data Type un Head O number of computer link module 16 bit binary Instruction Symbol ome First device number of devices storing send data Character string Dy Bit device turning ON at processing completion C Function 1 Sends the data from between the device number designated at S to the device number storing 00H to the external device connected to the computer link module When send processing is completed the bit device designated at D automatically turns ON after only 1 scan bS b 87 t amp W S s
10. RAM Designated address S2 1 ye n words E tz i i s2 n 1 n 1 S2 j Designated aron fret address 4 PUT Operation Errors MELSEC QnA st si 1 Pree RAM area S2 soe tee Hi s2 2 When nas words ars o na S2 4 2 3 4 5 6 1 When data is written to RAM memory by a PUT instruction the ON OFF control of AJ71C021 S1 X n c RAM write completed Y n 1c request to write to RAM is automatically conducted by internal processing and so does not need to be conducted by the user The first address number designated at S1 is within the range 0 to 7FFH The area number designated at S1 1 is within the range 0 to 79 The number of words designated at n is within the range 1 to 2048 However writing to multiple areas is not possible The bit devices designated at D automatically turns ON on execution of the END instructions of the scan completing write processing and turns OFF at the END instruction of the next scan l Used as PUT instructions execution completion flag In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the designated module is AJ71C21 Error code 2112 e When the address number designated at S1 exceeds the range 0 to 7FFH Error code 4100 e When the area number designated at S1 1 exceeds the range 0 to 79 Error code 4100 e When the n
11. Sot Data Description DataType AJ71PT32 S3 head I O number Permissible number of received data and number of 16 bit binary received data Head number of device storing received data D2 Number of the bit device turning ON on completion of processing ona Remote terminal number of AUSSPTF R2 receiving data 16 bit binary Function 1 Receives data within the permissible range designated at n1 from the external device connected to AJ71PT32 S3 remote terminal No n2 AJ35PTF R2 and stores data from device number designated at D1 onwards When receive processing is completed automatically turns ON bit de vice designated at D2 after only 1 scan Permissible number of received data Number of received data m v wwe n Remote terminal No n2 ET 01 AJTIPT ne External device gt aser gt 353 C 01 MELSEC i e e D1 n D1 n 1 Stores OOH in D1 n 1 only when permissible number of received data 2 l number of received data INPUT MELSEC QnA 1 The G P INPUT command cannot be made into a pulse 2 Execute G P INPUT when I O signal read request is ON device Permissible number of received data Number of received data niet Remote terminal No n2 Byte dee Rast one me joo ome ore Ra gt ome a aguante Onsa Caan Qt mG ba cise ink O1 4 2 3 4 In receive processing by INPUT instructions reading of data received
12. e BIDOUT instructions If an attempt is made to execute any of the above instructions while an ONDEMAND instruction is being executed the system waits until the ONDEMAND instruction already being executed is completed 3 Normal error completion of ONDEMAND instructions can be confirmed by means of the completion device D or completion status indication device D 1 a Completion device Turns ON at END processing of the scan completing ONDEMAND instruction and turns Off at next END processing b Completion status indication device Turn ON OFF depending on status at time of completion of ONDEMAND instructions e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing ONDEMAND instruction and turns OFF at next END processing Operation at ONDEMAND instruction execution END END END END processing processing processing processing 1 ONDEMAND Completion of rea of t instruction user registration rane by execution t ONDEMAND instruction ONDEMAND h Instruction 1 ION Completion OFF device sits EEA ee Completion OFF eae Statue indication device i Normal l i completion A 1 scan i l 1 10 14 ONDEMAND Operation Errors 1 Program Example 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Erro
13. e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of ID interface module instruction devices is illegal Error code 4301 e When a non designatabie device is designated Error code 4302 Program Example 1 A program which when XO turns ON reads 5 words of data from ID data carrier address 100 through channel 1 of the ID interface module installed at 1 O numbers X Y60 to X Y7F and stores this data from DO onwards is shown here X Y80 7F ID data carrier Channel 1 ee Sorter Ladder mode List mode oH e m ue Kioo DO K W 0 LD x0 1 GP IDRD U6 K100 D0 K5 wo 13 END Operation Completion of reading by IDRD1 instruction 0 END 0 END 0 END 0 END 0 ENO Sequence program 9 _ ON Execute command X0 o fo OFF Completion device MO f ION Error completion ee Completion status OFF indication device M1 Normal completion 1 scan 11 5 IDWD1 IDWD2 MELSEC QnA 11 3 Writing to ID Data Carrier MELSECNET 10 Special Direct JIN Function Register Instruction symbol Execution condition C represents 1 or 2 Command IDWD1 IDWD2 ml cow fj h fom io z ft Command _ IDWD1 IDWD2 a emol
14. 1 fi 2 4 O must be stored here 3 If the execution condition is executed during ON the SPBUSY instruction is executed every scan while the read command is ON if it is executed once at ON it is only executed in one scan when the read command goes from OFF to ON 10 31 PBUSY ht a ra MELSEC QnA Operation Errors 1 in the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When a non designatable device is designated Error code 4302 Program Example A program which turns M10 ON on execution of a PRR instruction for channel 1 of the AJ71QC24 installed at O numbers X Y20 to X Y3F is shown here Ladder mode List mode 0 wD 54400 1 AM IF 2 GP SPBUSY R 910 9 WAD Ki D10 12 Aie ri D10 15 OUT B10 16 BO 10 32 READ MELSEC QnA 10 10 Reading Devices at Other Stations Internal Device MELSECNET 10 Special System User Direct J I Function Module Index Register zn Instruction Symbol Execution condition Command READ m Porm Tm Te To Command READ a Set data Head I O number of host station AJ71QC24 16 bit binary st First device n
15. Command SPBUSY r CCOR Set Data un Head 1 0 number of the Head VO number of the AU71C21 51 Device name name Device number storing read communication Function 1 Reads the execution status of the following instructions of AJ71C21 S1 and stores it to the device designated at D e PRN2 PRN4 PR2 PR4 instructions data send instructions e INPUT2 INPUT4 instructions data receive instructions e GET PUT instructions instructions for reading writing RAM memory data 2 For the execution status stored in D 1 is stored in the corresponding bit when by any instruction is started and 0 is stored when the processing is completed Processing completed of instruction is the point when the instruction completion flag designated bit device moves from ON to OFF b15 b5b4b3b2b1 b0 t Eas Stores execution status of PRN2 and PR2 instructions Always stores 0 Stores execution status of INPUT2 instructions Stores execution status of PRN4 PR4 instructions Stores execution status of INPUT4 instructions Stores exeoution status of GET PUT instructions 0 b15 b0 om Jama soras 0r 1 The G P SPBUSY command cannot be made into a pulse 2 Execute the G P SPBUSY when 1 O signal read request is ON SPBUSY Operation Errors Program Example 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module
16. D4 4am 1 48 H S3 data sO o tink system Stored automatically MINI MELSEC QnA 7 5 Remote Terminal Module Communication internal Device MELSECNET 10 System User Direct JUNI Special Function cerd aw ee eee fe foe ee ae oo O X Y pom me e Cid os ovom ssi Instruction Symbol Execution condition Command MINI Ege MINI Set Data Function Remote terminal module No n1 Buffer memory MELSEC QnA Set Data Description Data Type AJ71PT32 S3 head I O number Oom Module number of communicating remote terminal module 16 bit binary First address number of area buffer memory conducting remote terminal module communication First number of device storing data to be read Device name First device number of devices in which data to be written is stored Sona Number of points of data subject to reading writing 16 bit binary D2 Number of the bit device turning ON on completion of processing D3 Any dummy output Y device number no operation eit 1 Out of the remote terminal modules connected to AJ71PT32 S3 con ducts communications with remote terminal module designated at n1 MINI standard protocol conforming remote terminal modules can communicate by MINI instructions 2 In communications with remote terminal modules by MINI instructions the AJ71PT32 S3 request to send send completed signal request to read read compl
17. E n Indicates the basic number of steps for individual instructions See Section 3 3 for a discussion of the number of steps TAREE The mark indicates instructions for which subset processing is possible See the QnACPU Programming Manual Common Instructions for details of the subset processing 8 iris Indicates the page numbers where the individual instructions are discussed 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIO a MELSEC QnA l i 2 3 List of Special Function Module Instructions 1 AD61 S1 control instructions Writes preset data designated Ex Basic Cc Number of Steps TE PVWR1 in S to CH 1 of AD61 S1 7 designated in Un Writes preset data designated in S to CH 2 of AD61 S1 7 designated in Un Writes set value data designated in S to CH 1 of AD61 S1 designated in Un designated in S to CH 2 of coincident judgments AD61 S2 designated in Un Reads present value data from CH 1 of AD61 S1 designated in Un and stores data in the word device number designated in D Reads present value data from CH 2 of AD61 S2 designated in Un and stores data in the word device number designated in D 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTI Se ee ee MELSEC QnA 2 AD59 S1 control instructions Basic Instruction ta Execution um Sub EI oe m eee tre uaa of Steps epe Outputs the number of bytes aren un
18. Forced stop SPCLR 3 CONFIGURATION OF INSTRUCTIONS 3 3 1 CONFIGURATION OF INSTRUCTIONS This chapter describes the following points of difference between the spe cial function module instructions and the QnACPU common instructions e instruction configuration e Instruction execution conditions eNumber of Steps For information on items other than those described here refer to the QnACPU Programming Manua Common Instructions Instruction Configuration Special function module instructions for QnACPU can be divided into a G instruction name part and a device part The applications of the instruction part and device part are as follows eG instruction part Indicates the function of the instruction eDevice part Indicates the data used for the instruction The device part is divided into I O No source data and destination data 1 1O No Un a The I O No indicates the location where the special function module is installed b The upper three digits of the head I O number of the special func tion module when expressed as a four digit hexadecimal number are set for Un For example if the special function module is allocated to X Y0120 X Y15F 012 is set for Un 2 Source S a The source is the data used for the operation b It takes the following forms depending on the devices designated with each instruction e Constant eee Designates the numerical values
19. In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO When the control data contents are outside the setting range Error code 4100 When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 A program which when X0 turns ON stores data received in channel 2 to D10 and onwards is shown here The number of received data and permissible number of received data is set to 20 Control data is stored in DO to D3 Ladder mode List mode Oo LD wo 1 MOVP R D0 1 W K0 De 7 WW E20 D3 10 GP INPUT 00 DO D10 Mo 19 BD 10 24 BIDOUT MELSEC QnA 10 7 Data Send of Designated Number of Data in Bidirectional Protocol Internal Device MELSECNET 10 Special ind System User Direct JOG Function R n py Module ad i Zn Instruction Symbol Execution condition Command f BIDoUT m Hke eee Command BIDOUT r COEM Set data Set Data Data Type AJ71QC24 head 1 O number 16 bit binary an First device number of devices storing contro data Device name 82 First device number of devices sto
20. n font Ts Pe ow Set Data SetData Description Data Type oom Head I O number of ID interface module 16 bit binary Fmt First address of iD data carrier ee i device number of devices storing write ata Oooo om e Number of write data 0 to 3900 16 bit binary Number of bit device turning ON at execute D completion at error completion D 1 also turns ON Function 1 Writes n2 points of data starting from the device designated at S to ID data carrier addresses starting at the one designated at n1 through the ID interface module designated by the head I O number 2 After writing is completed at the END instruction execution of the scan completing the instruction the bit device designated at D turns ON and automatically turns OFF after one scan At error completion the completion status indication device D 1 also turns ON for one scan 3 IDWD1 instructions execute by ID interface module channel 1 and IDWD2 instructions by channel 2 4 There is no operation when the value designated at n2 is 0 5 Error completion occurs when the address designated at n1 or the number of data designated at n2 exceeds the permissible range for the ID data carrier 11 6 IDWD1 IDWD2 aren R PA 1 Si CAL Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the number of points n2 from the device number designated
21. 00 ccc e cece ee eee eens 1 1 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS 0cceceees 2 1 2 10 2 1 Classification of Instructions 2 0 0 ccc eee ce tee een eens 2 1 2 2 Howto Read Instruction Tables 0 ccc cece eee nee enes 2 2 2 3 List of Special Function Module Instructions 0 0 0 c cece eee eee 2 4 CONFIGURATION OF INSTRUCTIONS cece cece cece ee eeeeveecs 3 1 3 3 3 1 Instruction Configuration 00 0 ccc cece eee ee tee e een e tenes 3 1 3 2 Instruction Execution Conditions 0 ccc cece eee eee tenes 3 2 3 3 lt Number OF SIGNS 02s athe ah alae dee cae cee a e ae ea ke Coulee diana 3 3 HOW TO READ EXPLANATIONS FOR INSTRUCTIONS 0eccceeees 4 1 4 3 AD61 S1 CONTROL INSTRUCTIONS cece cece nen cerevececsnes 5 1 5 7 5 1 Setting Preset Value Data eee cee eee PVWR1 PVWR2 5 2 5 2 Setting Set Value Data for Greater Smaller Equal Judgments 0005 SVWR1 SVWR2 5 4 5 3 Reading Present Value cece cee eae PVRD1 PVRD2 5 6 AD59 S1 CONTROL INSTRUCTIONS ccc cece cence eet e eee reneees 6 1 6 13 6 1 Sending to the Printer any Number of Character Data PAN 5 gc03 asides 6 2 6 2 Sending to the Printer Characters up to OOH Code PR eva aade ys 6 5 6 3 Reading Data from Memory Card 00 eee GET o icivecacenawag 6 8 6 4 Writing Data to a Memory Card cece ee eee PUT ioraa iaa 6 11 AJ7
22. 01 02 n2 processing the bit device ON the word device number On completion of the designated in D2 is turned Communicates with a remote terminal module which conforms to MINI default protocol and is connected to wt PT32 S3 designated in n errors at remote terminal Resets remote terminal errors occurring at the AJ71PT32 S3 designated by Un Stores the processing status at the AJ71PT32 S3 designated by Un in the word DN number designated by communica Stops the communication processing between the remote terminal module designated by S and the AJ71PT32 S3 designated by Un Forced stop of communi cation processing 1 The MINI Instruction has 5 steps and the MINIEND instruction has six steps 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS MELSEC QnA d AJ71021 S1 contro instructions tnstruction Execution t eee ep pounce to number of points cren vn 9 0 H designated by n stored from the word device whose number is designated by S onward from the RS 232C interface of the AJ71C21 S1 ar eat ote Un in the no erme Jo HID ocol mode r _ un aso Hn completion of the processing the bit device designated in D is turned ON Outputs data corresponding to STH she nomie 2 points a TE cra Jees TEH dosignatod by n stored trom or the word device whose number is designated by S onward from t
23. 100 mm otherwise malfunctions may occur due to noise Cautions on Mounting Use the PC in an environment that conforms to the general specifications in the manual Using the PC in environments outside the ranges stated in the general specifications will cause electric shock fire malfunction or damage to deterioration of the product Make sure that the module fixing projection on the base of the module is properly engaged in the module fixing hole in the base unit before mounting the module Failure to mount the module properly will result in malfunction or failure or in the module falling Extension cables should be securely connected to base unit and module connectors Check for loose connection after installation A poor connection could result in contact problems and erroneous inputs outputs Plug the memory cassette firmly into the memory cassette mounting connector Check for loose connection after installation A poor connection could result in erroneous operation Plug the memory firmly into the memory socket Check for loose connection after installation A poor connection could result in erroneous operation Cautions on Wiring e Switch off the external power supply before staring installation and wiring work Failure to do so could result in electrical shocks and equipment damage After installation and wiring is completed be sure to attach the terminal cover before switching the power ON and starti
24. 32 bit data or the first number of double word 32 bit binary devices can be used al Indicates that character string data can be used Indicates that device names can be used 6 Indicates the function of the instruction 7 Indicates the conditions that will cause errors and the error numbers 8 A simple program example in both ladder and list formats is given here The contents of each device when the program is executed are also indicated 5 AD61 S1 CONTROL INSTRUCTIONS MELSEC QnA 5 AD61 S1 CONTROL INSTRUCTIONS AD61 S1 control instructions are instructions for writing and reading data to an AD61 S1 The following table shows AD61 S1 control instructions Writes channel 1 preset data to buffer memory addresses 1 and 2 Writes channe 2 preset data to buffer PVWR2 memory addresses 33 and 34 Writes channe 1 set value data to buffer SVWR1 memory addresses 6 and 7 Writes channel 2 set value data to buffer SVWR2 memory addresses 38 and 39 Reads channel 1 present value count PVRD1 input value to buffer memory addresses Reading 4 and 5 present value Reads channel 2 present value count PVRD2 input value to buffer memory addresses 36 and 37 When the module model name is not registered in the parameter settings no error occurs even if AD61 S1 control instructions are executed with respect to an AJ71021 S1 However note that when AD61 S1 control instructions are executed with respect to an A
25. ON 10 28 BIDIN Function MELSEC QnA 1 1 See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 2 When bytes designated sets number of bytes when words designated sets number of words in AJ71QC24 3 The meanings of the entries in the set by column in the table above are as follows e User Data set by the user before executing BIDIN instruction e System Result of BIDIN instruction execution stored by QnACPU 1 Stores data received in bidirectional protocol of AJ71QC24 designated at Un according to control data from the device designated at S1 onwards to the devices starting from the one designated at S2 2 The following instructions cannot be simultaneously executed in channels executing BIDIN instructions e Other BIDIN instructions e INPUT instructions if an attempt is made to execute any of the instructions above while a BIDIN instruction is being executed the system waits until the BIDIN instruction being executed is completed 3 Normal error completion of BIDIN instructions can be confirmed by means of the completion device D or completion status indication device D 1 a Completion device Turns ON at END processing of scan completing BIDOUT instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on status at completion of BIDIN instruction e Normal
26. Special System User Direct Ji Function Module Instruction Symbol Execution condition Command SPBUSY r esPausy un 0 Command seeusy r HA oH Set Data Set Data Data Type Un Head 1 O number of computer link module 16 bit binary D Device number storing read communication status 32 bit binary Function 1 Reads the execution status of the following instructions of the com puter link module and stores the status to the device designated at D e PRN PR instructions data send instructions e INPUT instructions data receive instructions 2 For the execution status stored in D 1 is stored in the correspond ing bit at the start of processing and 0 is stored when processing is completed The completion of instruction processing instruction indicated by the instruction completion flag designated bit device turning from ON to OFF r b15 to b2 bi b0 0 t Sores execution status of PRN PR instructions Sites Stores execution status of INPUT2 instructions bis b ry Operation Errors 1 In the following cases an operation error occurs the error flag SM0 turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When computer link module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is ille
27. ajoo Command INPUT r kee Set data Sot Data Data Type AJ71QC24 head I O number 16 bit binary EE First device number of devices storing control data Device name sz First device number of devices storing received data Number of the bit device turning ON at execution completion Control data e Sets the send channel 1 Channel 1 2 Channel 2 Stores the result of receive 2 INPUT instruction S 1 Receive result 0 Normal System other than 0 Error code S 2 bb haa A e Sets the number of receive data fs ep S 3 Srl ag e Sets the permissible number of words for S2 pow 1 The G P INPUT command cannot be made into a pulse S 0 Receive channel 2 Execute G P INPUT when I O signal read request is ON 10 22 INPUT Function MELSEC QnA 1 t See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 2 When bytes designated sets number of bytes when words designated sets number of words in AJ71QC24 3 The meanings of the entries in the set by column in the table above are as follows 1 2 3 e User Data set by the user before executing INPUT instruction e System Result of INPUT instruction execution stored by QnACPU Stores data received in no protocol mode AJ71QC24 designated at Un according to the control data of the devices designated
28. at S exceeds the applicable device Error code 4101 e When the value designated at n2 is outside the range 0 to 3900 Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of ID interface module instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 X Y80 X Y7F ID data carrier Program Example 1 A program which when XO turns ON writes the data stored in DO to D4 to 5 words from ID data carrier address 100 through channel 2 of the ID interface module installed at I O numbers X Y60 to X Y7F Ladder mode List mode sytem w no w s m gt See instruction device 0 1D x0 1 GP IDWD2 U6 K100 DO 15 MO 13 BO Operation Completed of writing by IDWD2 instructions 0 END 0 END 0 END 0 END Sequence program Execute command X0 w e on res iat Completion device M0 l 4 1 ry a ee a ae ie lt Completion Status OFF a indication device M1 Normal completion 1 scan 11 7 IDARD1 IDARD2 MELSEC QnA 11 4 Continuous Reading from ID Data Carrier Usable Devices Internal Device MELSECNET 10 Special System User File Direct JUN Functio
29. attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 1 A program which turns M10 ON when the PR2 instructions or PRN2 instruction is executed at the AJ71C21 S1 installed at 1 O numbers X Y020 to X YO3F is shown here Ladder mode Onty extracts the 0 bit List mode S400 x20 edie MELSEC QnA 8 7 Forced Stop of Communication Processing Usable Devices Internal Device MELSECNET 10 Index System User Direct cero 3 Register lt i nat Instruction symbol Execution condition Command SPBUSY H SPBUSY Set Data Description Data ae un Hon W O number of the AJ71C021 S1 16 bit 16 bit binary First device number of the devices storing the Function 1 Forcibly cancels AJ71C21 S1 communication processing i e processing by PR N 2 PR N 4 and INPUT instructions or accessing RAM memory processing by GET and PUT instructions 2 The cancel processing is set in S The cancel setting is conducted by setting 1 in the applicable device for cancel processing b15 b5b4b3b2b1 b0 0 aree i i 7 to Sending by PRN2 PR2 instruction
30. control data i Device nam S2 First device number of devices storing send data Bit device number turning ON at completion of sending fet Controli data to b7 to bO Loe a ee Execution type bit 0 0 No arrival confirmation Execution of the SEND instruction is ended on completing transmission of the send data 1 Arrival confirmation Execution of the SEND instruction is ended on arrival of the send data at the send destination station Error completion type bit 7 0 Not necessary to set the clock when error occurs Not necessary to set clock data when error occurs in 1 11 to S1 15 1 Necessary to set the clock when error occurs Necessary to set clock data when error occurs in S1 11 to S1 15 Clock data controlled by error detection station Completion status S1 1 o Normal end Other than Error completion Channel used by host station S1 2 Designates the interface of the host station AJ71QC24 sending data Target station storing channel 1 43 Designates the interface of send destination station S1 AJ71QC24 sending data at the same interface as S1 2 above 10 42 SEND MELSEC QnA RN ee Het Target station network number a ae ee eee 81 45 Target station number a eee 2 ee Special function module station number S1 6 Designates target station AJ71QC24 station number O to 31 when sending to target station 1 Number of retransmissions Send request Designates the
31. e No protocol word byte designation address 103 e No protocol send buffer memory first address designation address 104 e No protocol send buffer memory length designation address 105 No protocol receive buffer memory first address designation address 106 e No protocol receive buffer memory length designation address 107 e No protocol receive END number of data designation address 108 The above buffer memory set values are valid when model name reg istration has been performed ib MELSEC QnA 9 1 No Protocol Mode Data Send of Designated Number of Bytes Usable Devices Internal Device MELSECNET 10 Special System User Direct JIN Function Module Instruction Symbol Execution condition Ani r HAr a yH Set Data Set Data Description Data Type Un Head I O number of computer link module 16 bit binary on Number of send data words or bytes om First device number of devices storing send data Character string D Number of the bit device turning ON on completion of processing Function 1 Sends n number of bytes words data stored in the device number des ignated from S onwards to the external device connected to the com puter link module When send processing is completed the bit device designated at D automatically turns ON after only 1 scan 1S t MBD b s l Saj o e O S aE SE For n 9 9 s 1 S 2 S 3 48H H 1 47H C s 4 S 5 External device
32. f OFF aes e a ee Completion device M0 Completion status indication device M1 OFF Normal completion 1 scan 11 9 IDAWD1 IDAWD2 MELSEC QnA 11 5 Continuous Writing to ID Data Carrier internal Device fatal Special aF User File Direct Jt Function wora n Module UING SS Register Instruction symbol Execution condition C represents 1 or 2 Command IDAWD1 IDAWD2 F como TT To Command IDAWD1 IDAWD2 f emmo fj n m To e o Head 1 O number of 1D controller 16 bit binary fom o First address of ID data carrier BOE loci ee device number of devices storing write n Number of write data 0 to Number of write data 0 to 3900 16 bit 16 bit binary Number of bit device turning ON at execution D2 SALON at error completion D 1 also turns O Funetion 1 Writes n2 points of data from the device designated at S to the ID data carrier address designated at n1 onwards through the ID interface module designated by the head I O number 2 When the ID data carrier is not in the range of communication with the ID reader writer the system waits for the ID data carrier to enter the range of communication and then writes data to it 3 When continuous writing is completed at the END instruction execution of the scan completing the instruction the bit device designated at D turns ON and automatically turns OFF after one scan At err
33. first ID interface module instructions If other ID controller dedicated instructions have already been executed the initial settings of these instructions are ignored 11 2 IDINIT1 IDINIT2 TEE EE EA AELS CT A Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of ID interface module instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 1 The initial setting data content is not checked in IDINIT1 or IDINIT2 instructions If the initial setting data is outside the setting range the ID interface module conducts contro by using default values 11 3 IDRD1 IDRD2 MELSEC QnA 11 2 Reading from ID Data Carrier internal Device MELSECNET 10 Special System User Fite Direct Jis i Function Register Module Instruction symbol Execution condition C represents 1 or 2 Command IDRD1 IDRD2 Fi ew o e o Command IDRD1 IDRD2 io eroro C w j om joof e o Head i O number of ID interface module 16 bit binary mt First address of ID data carrie
34. following the last device number storing received data n n biS b8b7 bO Automatically stores 00H Automaticalty stores O0H INPUT2 INPUT4 MELSEC QnA 8 When the number of received data is higher than the permissible number of received data the 00H code which is added to the end of the received data is stored in the device number immediately following the device numbers of the permissible number of received data Word unit designation Byte unit designation a C Ewo a 0ye nea C 7 words 1 18 bytes b15 b0 b15 bBb7 bO on C rm _ on omame reine Cor rowmone Taare eee eee ory onee mam 01 2 1 3 ores Onea rm ores ones 000 or 8 N 9 The bit device designated at D2 automatically turns ON on execution of the END instruction of the scan completing the receive processing and turns OFF at the END instruction of the next scan Used as INPUT 2 and INPUT 4 execution completion flag Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the range of the number of data designated at n starting from the device number designated at D exceeds the last device number of the applicable device Error code 4101 e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used with the
35. is an odd number Stored in the higher bytes of the fast device number storing received data Received data is an even number Stored in next device number of last device number storing received data Word unit designation Byte unit designation net net w o wy b e 1s amp BY O b Automatically stores 00H Automaticatly stores 0000H INPUT Operation Errors Program Example 8 9 1 1 MELSEC QnA When the number of received data is larger than the permissible num ber of received data the 00H code added to the end of the received data is stored in the device number immediately following the device number of the range of permissible number of received data Word unit designation Byte unit designation n _S words n 10 bytes net n 1s o wer e o enih byte Ninth byte ert i i 1 1 t 1 1 1 4 The bit device designated at D2 automatically turns ON when the END instruction is executed in the scan completing the reception and turns OFF at the END instructions of the next scan Used as an execution completion flag for INPUT instructions in the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the range of the number of data designated at n starting from the device number designated at D exceeds the last device number of the applicable device Error code 4100 e
36. is illegal Error code 4301 e When a non designatable device is designated Error code 4302 GET MELSEC QnA Program Example 1 A program which when XO turns ON stores data from addresses OH to 4H of RAM number 1 of the AJ71C21 S1 installed at 1 O numbers X Y020 to X YO3F to DO to D4 is shown here MO turns ON on completion of instruction execution Ladder mode x0 x21 0 A A w w D10 Designates first address of RAM memory Designates the RAM number of the RAM G GET V2 DIO KS DO W List mode instruction Devio 0 1D X0 1 ANI X20 2 AND X21 3 mv HO D10 5 Mov rst DU 7 G GET U2 DIO K5 D0 wo 17 BO AJ71021 S1 RAM No 1 of 15548 PUT MELSEC QnA 8 5 Write to RAM Memory MELSECNET 10 Special Direct Ji2 I5 Function Module UGG Index Register Zn Instruction symbol Execution condition Command PUT SL 4 Cer e To 1 Command if oar e 1 a ae First I O number of AJ71021 S1 S1 First address number of RAM memory storing 16 bit binary write data ae a Number of words of write data D Number of the bit device turning ON on completion of processing 1 Writes n words of data stored from the device number designated at S2 onwards to AJ71C21 S1 RAM memory addresses starting from the address number designated by S1 Set Data Function S1 71021 S1 RA S1 1 AJ71021 S1 RAM area address L
37. n s o H fesignated by n2 of the data ere uf Ts oH stored in the word device ripe number after the one designated in S to the printer connected to the AD59 S1 designated in Un orm Tole STH the completion of the output t crew Jun a so the bit device designated in D is turned ON Outputs the teog oes from cpr u a s oH the word device number after poog the one designated in S to Eur the OOH code to the printer connected to the AD59 S1 designated by Un On completion of the output oer us a s oH the bit device designated in orar juni nts o D a tured ON Reads the data stored in th number of points designated eet jon sn 0 by n after the address AF ike designated in S from the memory card connected to the 6 10 AD59 S1 designated in Un and writes the data to word Reads the data stored in the number of points designated in n starting from the word device number after the one designated in S2 and writes devices starting from the word if r jun sn device number designated by it to addresses after that D eur unlsi n s2 designated by S1 in the ce put un si n s2 H memory card connected to the AD59 S1 designated by Un 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS MELSEC QnA 3 AJ71PT32 S3 MELSECNET MINIS 3 master module control instructions Instruction Execution Basic sup iva ME ill a data from operation box c
38. on word e No protocol send buffer memory first address designation Power on OH e No protocol send buffer memory length designation Power on 80H AJ71024 S3 S6 S8 AJ71UC24 The permissible number of received data designated at n1 is a setting made to secure the range of devices for storing received data and the data storage destination is the number of devices designated by n starting from the device number designated at D1 The number of data actually received is automatically stored in n 1 n Permissible number ot received data 1 Number of received D1 D1 1 D1 2 D1 3 D1 4 01 5 D1 6 D1 7 INPUT ee eee ea oe EGONA 5 When the number of data actually received is higher than the permissi ble number of received data designated at n only the permissible number of received data is stored and the remaining received data is discarded 6 nand n 1 set value and stored value units differ according to the com puter link module data unit designation The data stored in D1 also differs according to the unit words or bytes Word unit designation Byte unit designation n Ceon net Coe n n 1 01 D1 1 01 2 D143 D1 4 D1 5 D1 6 D1 7 4 1 i 1 1 1 7 In byte unit designation depending on whether the received data is odd or even numbered the 00H code added to the end of the re ceived data is stored as below Received data
39. the ID interface module designated by the head O number Function 2 When batch writing of same data is completed at the END instruction execution of the scan completing instruction the bit device designated at D turns ON and automatically turns OFF after the next scan At error completion the completion status indication device D 1 also turns ON for one scan 3 IDFILL1 instructions are executed with respect to ID interface module channel 1 and IDFILL2 instructions with respect to channel 2 4 There is no operation when the value designated at n2 is 0 5 Error completion occurs when the address designated at n1 or the number of data designated at n2 exceeds the permissible range for the ID data carrier 11 14 IDFILL1 IDFILL2 ees MEL SEC QnA Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO l e When the value designated at n2 is outside the range 0 to 3900 Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of ID interface module instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program E
40. the status of data reception from the second remote terminal module c Stores the status of data transmission to the eighth remote terminal module Stores the status of data reception from the eighth remote terminal module b1S t b11b10 to bBb7 w b4b3 to bo D 1 Stores the status of data transmission to the ninth remote terminal module Stores the status of data reception from the ninth remote termina module Stores the status of data transmission to the tenth remote terminal module Stores the status of data reception from the tenth remote terminal module f ir Stores the status of data transmission to the fourteenth remote terminal module Stores the status of data reception from the fourteenth remote terminal module 7 28 SPBUSY Operation Error 1 in the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO a When the module attempting access is not a special function module Error code 2110 When AJ71PT32 S3 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which turns M10 ON when remote terminal no 1 of AJ71PT32 S3 installed in 1 O number X Y020 X YO4F is send
41. used for the operation Since constants are set when the pro gram is created they cannot be chang ed during execution of the program If a constant is used with variable data use index qualification e Bit device word device Designate the devices in which the data used for the operation is stored The data must be stored in the desig nated device before the operation is executed By changing the data stored in a designated device during program execution the data used with the instruction can be changed 3 Destination D a The destination stores the data that results from the operation b It is essential to set a device to store data as the destination 3 CONFIGURATION OF INSTRUCTIONS ERE N a a Pe e EE ET ERIE MELSEC QnA 3 2 Instruction Execution Conditions There are two types of execution conditions for the special function module instructions for QnACPU e Executed while ON Instruction executed while the input condition is ON Example G INPUT instruction G PVWR1 instruction e Executed at leading edge Instruction executed only at the leading edge OFF ON of the input condition Example GP INPUT instruction GP PVWR1 instruction Special function module instructions are available as both executed while ON and executed at leading edge types e Executed while ON instruction G Instruction name e Executed at leading edge GP instruction name In the case of the CMODE
42. using link dedicated instructions a Method of establishing an interlock between external device and The time interval is set by the user according to the system Communication by link dedicated instructions QnACPU When the external device and QnACPU are connected in a 1 n or m n configuration an interlock must be established between the external device and each QnCPU so that the external device and each QnACPU do not use the RS 422 485 line at the same time Example of how to establish an interlock Example The possibility of executing QnACPU link dedicated instructions is controlled by external devices by means of dedicated protocol global functions 1 1 Command Command of cempend message message e No 1 OFF No n OFF ON No n OFF The external device ignores communication data when the global signal is ON irae signal eae zeman data when the Communication global signal is ON by link dedicated instructions Global signal Hier H The external device ignores l specifications b Simultaneous execution of multiple instructions c The QnACPU cannot simultaneously execute multiple link dedicated instructions with the same interface CH1 or CH2 of the relay AJ71QC24 designated It is essential to wait for the completion of data sending by one link dedicated instruction before executing the next link instruction Operation is terminated by an error if instructions are simultaneously ex
43. within the WDT time 1 to 2767 seconds Length of received data unit word 1 9 Stores the number of words of received data stored in 1 to 480 device designated at S2 Clock set flag o Invalid S1 11 Stores the validity invalidity of data in S1 12 to 1 15 1 Valid when S1 is 0080H the error nd type is 1 p Year last 2 digits month when error occurred 81 12 Upper 8 bits year OOK to 99H 0001H to 9912H Lower 8 bits month 01H to 12H Day hour when error occurred S1 13 Upper 8 bits day 01H to 31H 0100H to 3123H Lower 8 bits hour OOH to 23H Minute second when error occurred S1 14 Upper 8 bits minute 00H to 59H 0000H to 5959H Lower 8 bits second 00H to 59H Day of the week when error occurred S1 15 Day of the week 0000H Sunday to 0006H Saturday 0000H to 0006H fe aif eee 10 47 RECV a ee ee ee ee eee EL SEGONA Function Operation Errors 1 2 3 Stores data sent by SEND instruction from the control data host channel of the AJ71QC24 designated at Un to word devices starting from that designated at S2 AJ71QC24 control instructions cannot be executed simultaneously in two or more places for the same channel of the same AJ71QC24 If the execution conditions come into effect simultaneously in 2 or more places subsequently executed AJ71QC24 control instructions must wait until a channe becomes available To use AJ71QC24 control i
44. 1 e When a non designatable device is designated Error code 4302 Program Example 1 The following is an example program which when X0 is turned ON writes DO and D1 set data to the buffer memory for channel 1 of the AD61 installed at I O numbers X Y020 to X YO3F Ladder mode List mode Hiem em 0 LD X0 8 po 1 G SVWRI U2 8 END AD61 buffer memory PVRD1 PVRD2 MELSEC QnA 5 3 Reading Present Value Usable Devices Internal Device MELSECNET 10 Special System User Direct Jis i gt Function sit word vanes Instruction symbol Execution condition Cc epresents PVRD1 or PVRD2 command pevao evoa JL p fat hH command a pvrDi pvAbe F eee Oe Set Data Head device number of devices to store the fF read present value 32 bit binary 1 Reads present value from AD61 S1 and stores in the device designated at D in present value reading data is read directly from the AD61 S1 buffer memory The channel and buffer memory address for reading the present value differ according to the instructions used instruction Read Ghannel Rona Bunar Memory Aderes Function Address PVRAD1 instructions D 1 0 higer bits lower bits ee Present data PVRD2 instructions 2 In the reading of present values by PVRD1 and PVRD2 instructions the ON OFF control of the AD61 S1 present value read requests Y n 15 Y n 1c is conducted automatically by intern
45. 1 in the host station The completion device designated at D2 turns ON when the reading of device data from the target station is completed AJ71QC24 control instructions cannot be executed simultaneously in two or more places for the same channel of the same AJ71QC24 If the execution conditions come into effect simultaneously in 2 or more places subsequently executed AJ71QC24 control instructions must wait until a channel becomes available To use AJ71QC24 control instructions using the same channel in 2 or more places use the completion device as the communication start command and conduct sequential execution Normal error completion of read instructions can be confirmed by means of the completion device D or completion status indication device D 1 a Completion device Turns ON at END processing of scan completing READ instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on status at completion of READ instruction e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing READ instruction and turns OFF at next END processing Operation at execution of READ instruction 1 END EN END END processing processing processing processing Sequence ep e program ND ssin 1 Completion of reception Y Read instruction aa iste READ instruction READ Poa instruction sase execution Compl
46. 10 as a dummy 4 Reading Writing Clock set flag When S1 is 0091 completion type for error is 1 the validity or invalidity of data from S1 12 to S1 15 is stored o Invalid Valid Y ar last 2 digits month when error occurred Upper 8 bits year 00H to 99H Lower 8 bits month 01H to 12H 0001H to 9912H Day hour when error occurred Upper 8 bits day 01H to 31H Lower 8 bits hour OOH to 23H 0100H to 3123H Minute second when error occurred Upper 8 bits minute 00H to 59H Lower 8 bits second 00H to 59H 0000H to 5959H continued 10 51 REQ MELSEC QnA Setting Details eae Ee __ Target Station t User System Day of the week when error occurred Eri Day of the week 00001 Sunday to 00061 Saturday 0000H to 0006H E T ke enne Error detected network number Request data 1 Remote RUN STOP Setting Details Setting Range Data Set By 2 Remote contol control S2 1 Remote control request content 0001H ee RUN Designates contents of request for remote control 0003H Remote STOP Mode 0001H Does not S2 2 During remote RUN designates whether or not to forcibly forcibly execute RUN 0002H Forcibly Designates 0001H in remote STOP executes 0000H Does not clear 0001H Clears During remote RUN designates whether or not to clear or latch QnACPU device memory ie initializi
47. 1PT32 S3 CONTROL INSTRUCTIONS ssssuessesesssssossesess 7 1 7 31 7 1 Key Input from Operation Box 0 6 cee eee ee eee INPUT 7 3 7 2 No Protocol Mode Data Send of Designated Number of Bytes PRN 7 7 7 3 No Protocol Mode Data Send up until OOH Code PR iciicccceatades 7 11 7 4 No Protocol Mode Data Receive 00 eee eee INPUT eos tees 7 15 7 5 Remote Terminal Module Communication MINI 7 21 7 6 Remote Terminal Module Error Reset 6 MINIERR 7 27 7 7 Reading Communication Status 0 00 SPBUSY 7 28 7 8 Forced Stop of Communication Processing SPCLR 7 30 AJ71C21 S1 CONTROL INSTRUCTIONS 2 ccc ccc eeccerenevece 8 1 8 23 8 1 Sending Designated Number of Bytes of Data societies PRN2 PRN4 8 2 8 2 Data Send up to 00H Code ccc cece ee eee PR2 PR4 8 6 8 3 Receiving Data ic cccpciesecinee dt aiaaw tee boyd Coa ees INPUT2 INPUT4 8 9 8 4 Read RAM Memory cece eee ee eee eee GET eer 8 14 8 5 WritetoRAMMemory cece cece ee eee eee PUT i alg wie 8 17 8 6 Reading Communication Status 000 SPBUSY 8 20 8 7 Forced Stop of Communication Processing SPCLR 8 22 9 COMPUTER LINK MODULE CONTROL INSTRUCTIONS is widen aaews 9 1 9 18 9 1 No Protocol Mode Data Send of Designated Number
48. 24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 10 26 aaa MELSEC QnA Program Example 1 A program which when X30 turns ON sends data byte designation stored in D10 D14 from channel 1 is shown here Control data is stored in DO to D2 Ladder mode List mode o D 130 1 Move Ki D0 4 MOVP K10 D2 7 GP BIDOUT v0 D0 D10 M0 16 END 10 27 BIDIN MELSEC QnA 10 8 Data Receive in Bidirectional Protocol Internal Device ij eee Special ind eer User a Function R n he Module leas GE n ee a Instruction Symbol Execution condition Command me m n o e a Command si ae COMENCE Set data Description Data Type n AJ71QC24 head I O number 16 bit binary First device number of devices storing control data Device name First device number of devices storing received data Number of the bit device turning ON at execution Bit completion Control data e Sets the receive channel Receive channel 1 Channel 1 2 Channel 2 e Stores result of receive by BIDIN instruction 0 Normal other than 0 Error code S 2 Renee ol received e Sets the number of receive data Ste 2 Permissible number S 3 of received data e Sets the permissible number of words for S2 1 G P BIDIN commands cannot be changed into pulse Receive result 2 Execute G P BIDIN when I O signal read request is
49. 41 L Computer gt link External device module Shows the end of data Example The following situation arises when ABCDEFGH is stored from the device designated at S onwards 15 b bB b ww S External device S 1 444 D 1 43u C 41H A s 2 46n F 1 45a to48HH joo ysl aan a i am o mk gt ABCDEFGH aa ee S 4 Indicates the end of the data PR 2 3 4 5 6 PR instructions automatically conduct ON OFF control of computer link module X n 0 send completed and Y n 10 request to send in in ternal processing and so this control does not need to be conducted by user 00H cannot be set as data in the send data stored from the device number designated at S onwards 00H is the send data END designation The number of data that can be sent at one time is shown below 70 2 Gate ne asia aani 1 to 127 words Word units 1 to no protocol send buffer memory length set AJ71024 S3 S6 S8 value 1 words AJ71UC24 Byte units 1 to no protocol send buffer memory length set value 1 x 2 bytes Set the following items when the computer link module data unit designation and buffer memory length are not used in power on set ting e No protocol word byte designation Power on word e No protocol send buffer memory first address designation Power on 0H No protocol send buffer memory length designation Power on 80H
50. A 1 When AJ71QC24 control instructions are used control is conducted in accordance with the following buffer memory setting values e On demand buffer memory address designation AOH 140H e Send buffer memory first address A2H 142 e Send buffer memory length designation A3H 143H e Receive buffer memory first address A6H 146H e Receive buffer memory length designation A7H 147 2 AJ71QC24 control instructions cannot be used for the following computer link modules Computer link module control instructions see Chapter 9 cannot be used for AJ71QC24 type serial communication modules e AJ71C24 computer link modules e AJ71C24 S3 computer link modules e AJ71C24 S6 computer link modules e AJ71G24 S8 computer link modules e AJ71UC24 computer link modules 3 See the following manual for details of the AJ71QC24 serial communication module e AJ71QC24 Serial Communication Module User s Manual 10 2 10 AJ71QC24 CONTROL INSTRUCTIONS 1 About other station access with AJ71QC24 control instructions link dedicated instructions The following is a general description of data communications using the AJ71QC24 operation mode and link dedicated instructions which refers to accessing other stations via an AJ71QC24 by using following link dedicated instructions in the AJ71QC24 control instructions e READ instruction e SWRITE instruction e SEND instruction e RECV instruction e REQ instruction a AJ71QC24 operat
51. Byte unit designation bis t b8b7 to bo Data end designation Eighth byte Sevenin bye ae a Data end S 5 OoOo o Oooow ae designation PR Operation Errors 5 The remote terminal number designated at n is the number previously 6 set in the initial data ROM for the corresponding AJ35PTF R2 The remote termina number setting is conducted by the remote termi nal data setting in the SWOSGP MINIP initial data setting The bit device designated at D automatically turns ON on execution of the END instruction of the scan completing the transmission proc essing and turns OFF at the END instruction of the next scan Used as an execution completion flag for PRN instructions Communication with a remote terminal module connected to AJ71PT32 S3 can only be conducted when the AJ71PT32 S3 communications start signal Y n 28 is ON If the instructions are executed when the communications start signal Y28 is OFF no error occurs however the bit device set for use as a completion flag wil not turn ON In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO No 00H code is stored between the device number designated at S and the final device number of the relevant device Error code 4100 When the number of send data is outside the following range Error code 4100 Word unit 1 to TO area setting capacity 1 words Byte unit 1 t
52. D turns ON and automatically turns OFF after one scan At error completion the completion status indication device D 1 also turns ON for one scan 4 IOCMP1 instructions are executed with respect to ID interface module channel 1 and IDCMP2 instructions with respect to channel 2 5 There is no operation when the value designated at n2 is 0 6 Error completion occurs when the address designated at n1 or the number of data designated at n2 exceeds the permissible range for the ID data carrier 11 12 IDCMP1 IDCMP2 Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the range designated at S2 exceeds the applicable device range of the device designated at S Error code 4101 e When the value designated at n2 is outside the range 0 to 3900 Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of ID interface module instruction devices is illegal error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which when XO is ON compares 5 word data from ID data carrier address 100 through channel 2 of the ID interface mo
53. END 10 42 10 13 Receiving Data From Other Stations 86 RECV 10 46 10 14 Other Station Transient Transmission Request REQ 10 50 11 ID INTERFACE MODULE INSTRUCTIONS cccceececccsscees 11 1 11 17 11 1 ID Controller initial Setting 0 cee eee eee IDINIT1 IDINIT2 11 2 11 2 Reading from ID Data Carrier cee ee eee IDRD1 IDRD2 11 4 11 3 Writing to ID Data Carrier 0 ee eee IDWD1 IDWD2 11 6 11 4 Continuous Reading from ID Data Carrier IDARD1 IDARD2 11 8 11 5 Continuous Writing to ID Data Carrier IDAWD1 IDAWD2 11 10 11 6 Data Comparison with ID Data Carrier IDCMP1 IDCMP2 11 12 11 7 Batch Writing Same Data to ID Data Carrier IDFILL1 IDFILL2 11 14 11 8 Copying between ID Data Carriers 00 IDCOPY1 IDCOPY2 11 16 APPENDIX satana Dianaaa snares E A EEEE APP 1 APP 1 APPENDIX 1 LIST OF PROCESSING TIMES 0 cece eee cee eee eee APP 1 ie ERAL D GEN L DESCRIPTION MELSEC QnA 1 GENERAL DESCRIPTION i This anual describes instructions that are useful when using a special function module with a QnACPU Section 2 3 lists the instructions described i in this anual see Section 2 3 for details of the instructions which can be used 11 Related Programming Manuals QnACPU Programming Manual Co
54. ET instruction execution stored by QnACPU 10 10 GETE _MELSEC QnA Function 1 Reads designated user registration frame data at the AJ71QC24 designated by Un QnACPU AJ710C24 User registration frame Length of read bytes 2 During GETE instruction execution other GETE instructions or PUTE instructions cannot be executed if an attempt is made to execute a GETE or PUTE instruction during GETE instruction execution the system waits until completion of the execution of the instruction already being executed 3 GETE instruction normal error completion can be confirmed by comple tion device D or completion status indication device D 1 a Completion device Turn ON at the END processing of the scan completing GETE instruction and turns OFF at the next END processing b Completion status indication device Turn ON OFF depending on the status at the time of completion of GETE instruction e Normal completion Stays OFF no change e Error completion Turns ON at END processing of the scan completing GETE instruction and turns OFF at the next END processing Operation at GETE instruction execution END END END END processing processing processing processing Sequence Program eau GETE instruction Completion of reading i user registration frame by 1 GETE instruction GETE i instruction execution ON Completion OFF device Completion OFF pee es stat
55. H to 1299H Lower 8 bits year OOH to 99H Changing hour day S2 4 Upper 8 bits hour 00H to 23x 0001H to 2331H Lower 8 bits day 01H to 31H Changing second minute S2 5 Upper 8 bits second 00H to 59H 0000H to 5959H Lower 8 bits minute OOH to 59H Changing day of the week S2 6 Day of the week 0000H Sunday to 0006H Saturday 0990H ie 9096h Note 1 Clock data cannot be written when the target QnACPU is system protected when system protect switch SW5 is ON Each request is error completed Response data 1 Reading clock data e ee Read month year last 2 digits Setting Range Data Set By Target staton 1 User System D1 Upper 8 bits month 01H to 12H Lower 8 bits year OOH to 99H Read hour day D1 1 Upper 8 bits hour OOH to 23H 0001H to 2331H Lower 8 bits day 01H to 31H Read second minute D1 2 Upper 8 bits second 00H to 59H Q000H to 5959H Lower 8 bits minute OOH to 59H Read day of the week 10 53 REQ Function Operation Errors 1 2 3 Sends the request data from S1 onwards to AJ71QC24 designated at control data special function module station number AJ71QC24 control instructions cannot be executed simultaneously in two or more places for the same channel of the same AJ71QC24 if the execution conditions come into effect simultaneously in 2 or more places subsequently executed AJ71QC24 control i
56. J71021 S1 the AJ71021 S1 may not operate normally PVWR1 PVWR2 MELSEC QnA 5 1 Setting Preset Value Data Internal Device MELSECNET 10 Special System User Direct J I Function Instruction symbol Execution condition __ represents PVWR1 or PVWR2 command PVWR1 PVWR2 m es el command PVWR1 PVWR2 ery o_ un AD61 S1 head i O number 16 bit binary Head device number of devices storing the ae preset value to be written 32 bit binary 1 Writes to AD61 S1 the preset value which is stored in the device designated at S The preset value writes data directly to the AD61 S1 buffer memory The channel and buffer memory address for writing the preset value differ according to the instructions used Inatruction Write Channel Write Butter Memory Address Set Data Function AD61 buffer memo Address PVWR1 instructions 1 channel 1 preset value Gower bite S 1 S higher bits lower bits aaam Preset value data aww higher bits 2 In the writing of preset values by PYWR1 and PVWR2 instructions the ON OFF control of the AD61 S1 preset commands Y n 11 Y n 18 is conducted automatically by interna processing The user does not need to conduct the ON OFF control of the preset command 3 The preset value designated at S and S 1 is within the range 0 to 16777215 PVWR2 instructions 34 PVWR1 PVWR2 Operation Errors 1 In th
57. M program SWRITE l Completion of sending instruction t dueto SWRITE instruction execution i SWRITE Sena l 1 instruction 1 1 i t ION 1 i Completion OFF i i device A A 1 1 1 10N r 1 cae ucampietioi Completion i status indication OFF H Jao 1 device i o Target station operation at SWRITE execution END END END END Target processing processing i processing processing statlon eee program Completion ot reception of device data designated by SWRITE instruction 1 ON i Target station OFF em Le bes completion eee re J device i i i 1 scan 1 k 10 39 SWRITE Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range l Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 10 40 SWRITE SA a eee R Wii SE C CnA Program Example A program which writes data to the AJ71QC24 of special function module station number 2 in a multidrop system is shown here Request
58. MITSUBISHI QnACPU PROGRAMMING MANUAL Special Function module Qn ESEE Mitsubishi Programmable Controller REVISIONS The manual number is given on the bottom left of the back cover Jul 1996 IB NA 66616 A First edition SAFETY CAUTIONS You must read these cautions before using the product In connection with the use of this product in addition to carefully reading both this manual and the related manuals indicated in this manual it is also essential to pay due attention to safety and handle the product correctly The safety cautions given here apply to this product in isolation For information on the safety of the PC system as a whole refer to the CPU module User s Manual These SAFETY CAUTIONS are classified into two grades DANGER and CAUTION DANGER Safety caution given when incorrect handling could result in hazardous situations involving the possibility of death or serious injury CAUTION Safety caution given when incorrect handling could result in hazardous situations involving the possibility of moderate or light injury or damage to property Note that depending on the circumstances failing to follow a A CAUTION may also have very serious consequences Both of these classes of safety caution are very important and must be observed Store this manual carefully in a place where it is accessible for reference whenever necessary and forward a copy of the manual to the e
59. O number First device number of devices storing contro data Device name s2 First device number of devices storing send data Number of the bit device turning ON at execution completion Control data e Sets the send channel 1 Channel 1 2 Channel 2 Stores result of reading by ON DEMAND instruction Send channel o Normal S1 1 Send result other than 0 Error code S1 2 pears ot send e Sets number of data to send ptt 1 1 See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 2 When bytes designated sets number of bytes when words designated sets number of words in AJ71QC24 3 The meanings of the entries in the set by column in the table above are as follows e User Data set by the user before executing ONDEMAND instruction System Result of ONDEMAND instruction execution stored by QnACPU 10 13 oe MELSEC QnA Function 1 Sends data stored from the device designated at S2 onwards by the on demand function in dedicated protocol to the AJ71QC24 designated at Un according to the control data from the device designated at S1 onwards QnACPU AJ71QC24 rc Channels in use set A by control data a af 2 The following instructions cannot be simultaneously executed in channels executing ONDEMAND instructions e Other ONDEMAND instructions e OUTPUT instructions e PRR instructions
60. RECV FL eRe w 03 Command RECV T Rev u o o o Head 1 0 number of host station AJ71QC24 16 bit binary First device number of devices storing contro data Device name pty First device number of devices storing received data 02 Bit device number turning ON at receive completion CE Set data 10 46 RECV MELSEC QnA Control data Setting Range Data Set By Target staton 1 Uaer System Setting Details b15 to b7 to b0 ae eae ee l Error completion type bit 7 0 Not necessary to set the clock when error occurs Not necessary to set clock data when error occurs in S1 11 to S1 15 1 Necessary to set the clock when error occurs Necessary to set clock data when error occurs in S1 11 to S1 15 Clock data controlled by error detection station Completion status 0 Normal end Other than O Error end Channel used by host station Designates the AJ71QC24 interface number reading received data Send source station channel S1 2 S1 3 Stores the number of the AJ71QC24 Interface sending the 2 CH2 send source station data S1 4 Send source station network number ae ee ee ee S1 5 Send source station number eo ae ee Lee ee ce Arrival WDT time unit second A O default 10 secs 1 8 Designates the WDT time until execution end of RECV 1 to 32767 instruction Error ends when cannot receive data
61. RUNOUCHI TOKYO 100 0005 TELEX J24532 CABLE MELCO TOKYO NAGOYA WORKS 1 14 YADA MINAMI 5 HIGASHI KU NAGOYA JAPAN When exported from Japan this manual does not require application to the Minisiry of International Trade and Industry for service transaction permission _ Specifications subject to change without notice Printed in Japan on recycled paper
62. When the module attempting access is not a special function module Error code 2110 e When computer link module control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of computer link module control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 A program which when X0 is ON receives 5 words of data from the external device connected to the AJ71C24 S3 installed at I O numbers X Y020 X YO3F and stores the data to DO D4 is shown here MO turns ON on completion of instruction execution Ladder mode P in E HGS D K Sets once after CPU RUN in the communica tion data word unit designation xo Ed Mov x5 DIO Designates number of received data G IMUT 2 DIO DO MO List mode _instruction _ Device 0 1D 1 ANI X27 2 TOR Re H103 KO fl 7 D x0 8 AD 27 9 ANI XZD 10 hud r5 D10 12 G INPUT 2 D10 DO MO 21 ED D10 5 permissible number of recelved data D11 5 number of received data DS te we 87 t bo External device SEB DO 49H I 404 M D1 53H S 54H T 71 D2 42H B 554 U MITSUBISHI C gt pu gt 5 S3 S 490 49H I 48 H OoOo ow D4 05 Stored automatically 9 14 SPBUSY MELSEC QnA 9 4 Reading Communication Status internal Device MELSECNET 10
63. Write to wite command Set control data mov H81 00 H Sets S1 execution type error completion type Nov K2 D2 H Sets channel CH2 used by S1 2 host station Fwov ko DS KS JH Sets S1 3 to S1 5 Sets S1 6 special function module station Sets S1 7 number of retransmissions 5 times 08 H Sets S1 8 arrival WDT time 2 seconds QC24 WDT command signal ready error MO XIB XIE XIF ues op swre vo oo ozo nioo wi wti j SWRITE instruction execution X1B is a signal used with respect to external devices to enable use of the line ee eee Jcs ne ca was oom een eae eee oS Processi ram at norma operation completion iis r t Takes corrective action according to error code of Pica ay ead gat se eg eee ge ee aM D1 storing S1 1 completed status M2 turns ON OFF ding on normal completion or error completion of SWR instruction M1 turns ON for only 1 scan at completion of execution of SWRITE instruction Host station 10 41 SEND MELSEC QnA 10 12 Sending Data to Other Stations Internal Device MELSECNET 10 Special Index ace User Direct J 3 7 Function Register Module Zn me pt Ce ee ee ON Instruction Symbol Execution condition Command SEND m COOC Command SEND Ez CEMC Set data Set Data Description Data Type Head 1 O number of host station AJ71QC24 16 bit binary S1 First device number of devices storing
64. a 1 2Min 13 iMa 14m Ht hin 1 Touch key pan njo zju sja sfna sjin tm 7i 8 gt Mombrane key biS b1i2bii to b b7 to bs b3 bO or codacaccnecnnstia rouy D1 1 L_ O stored artesian pare ry r m aaa a D1 42 Cois stored koy y ONOFF The status of bits in D1 to D1 2 is as follows 1 is sorea in bits corresponding to ON keys and 0 in bits corresponding to OFF keys The permissible number of received data designated at n1 is the set ting made to secure the range of devices for storing received data and the data storage destination is the device numbers starting from the device number designated at D1 and equivalent to the number of points designated at nt The number of data actually received is automatically stored in the ni 1 device number nt Permissble number of received data ni 1 Number or feceived data 01 Oi Possible range of D1 2 received data stored D1 3 D1 4 The number of data received due to key operation at the operation box is 3 words Accordingly set the permissible number of data designated in n1 to 3 or more If 2 or less is set it is not possible to store the statuses for all key operations status ON OFF status of membrane keys not stored D1 D1 4 INPUT 5 The bit device designated at D2 automatically turns ON on execu tion of the END instruction of the scan completing receive processing and turns OFF at the END instruction o
65. a a a oo ee characters 14 108 sa R N 96 characters 136 10 s FROM 1 timo 12s 48 FROM 16 timos 1 318 92 49 e a AJ71C21 81 control instructions l2 charactors 136 o2 s PRN2 PRN4 f Se charactors 136 o2 51 Ta charactors 125 oa a raises Tee charactors 125 o d i lt iaT NPUT2INPUTA O T nae feswords w 1 5 CTE Computer link module control instructions 2 charactors 138 104 52 96 characters psa 104 52 Berase Lo e doo oeoo o 96 characters Cae eas 4e O INPUT L i E i ES APP 1 IMPORTANT Design the configuration of a system to provide an external protective or safety inter locking circuit for the PCs Under no circumstances will Mitsubishi Electric be liable or responsible for any consequential damage that may arise as a result of the installation or use of this equipment All examples and diagrams shown in this manual are intended only as an aid to understanding the text not to guarantee operation Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples Owing to the very great variety in possible applications of this equipment you must satisfy yourself as to its suitability for your specific application ry y 13JF48 IB NA 666 16 A 9606 MEE Aa MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENKI BLDG MA
66. al processing The user does not need to conduct the ON OFF control of the present value read request PVRD1 PVRD2 Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When AD61 S1 contro instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AD61 S1 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 The following is an example program which when XO is turned ON reads present values for channel 1 of the AD61 installed at I O numbers X Y020 to X Y03F to DO and D1 Ladder mode List mode 0 LD x0 8 DD 1 G PVRD1 U2 DO 8 END AD61 buffer oe om Toe bB8b7 bO 3 ee D1 ee 6 AD59 S1 CONTROL INSTRUTIONS as MELSEC QnA 6 AD59 S1 CONTROL INSTRUCTIONS AD59 S1 control instructions are instructions for reading and writing data to memory cards installed in an AD59 S1 and for sending data to connected printers The following table shows the AD59 S1 control instructions Sends designated number of character data OPAN to connected printer section 6 1 Sends character data up to OOH code to connected printer Reading Reads data from ins
67. am which when X30 turns ON sends data byte designation stored in D10 D14 from channel 1 is shown here Control data is set in DO to D2 Ladder mode List mode mu n i 0 LD 130 wy Ke m 1 OVP x 4 MVP Kio e w wb O W 7 GP OUTPUT w D10 M 16 END 10 18 PRR MELSEC QnA 10 5 Data Send Using Send Schedule Table in No Protoco l Mode Internal Device MELSECNET 10 Special System User Direct JING Function index Register Module Zn instruction Symbol Execution condition Command en e OO Command r ee OO Description Data Type a head I O number First device number of devices First device number of devices storing control data control data Device name name Number of the bit device turning ON at execution completion Set data Control data e Sets the send channel Send channel 1 Channel 1 2 Channel 2 e Stores result of send by PRR instruction Send result 0 Normal other than 0 Error code e Sets whether or not to add CR LF to send data i i Not add CR LF designation Add CR LF CR LF addition S 3 Send pointer e Sets send schedule pointer 1 to 100 S 4 No of schedules e Number of schedules used for send 1 to 100 1 1 See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 The meanings of the entries in the set by column in the table above are as follows e User Data se
68. ansmission to the eighth remote terminal module Stores the status of data reception trom the eighth remote terminal module b15 t DbI1bIO to B86 b7 to b bs te bo wa ee ae Stores the status of data transmission to the ninth remote terminal module Stores the status of data reception from the ninth remote terminal module Stores the status of data transmission to the tenth remote terminal module Stores the status of data reception from the tenth remote terminal module rr Stores the status of data transmission to the fourteenth remote terminal module Stores the status of data reception from the fourteenth remote terminal module SPCLR aE ems Ai SEC ry A Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which stops transmission to remote terminal module No 1 of AJ71PT32 S3 installed in I O number X Y020 X Y04F Ladder mode Stores 1 in bit corresponding to send processing of remote termina
69. at S1 onwards to devices starting at the one designated at S2 The following instructions cannot be executed in channels executing INPUT instructions e Other INPUT instructions e BIDOUT instructions If an attempt is made to execute either of the above instructions while an INPUT instruction is being executed the system waits until the PRR instruction being executed is completed Normal error completion of INPUT instructions can be confirmed by means of the completion device D or completion status indication device D 1 a Completion device Turns ON at END processing of scan completing INPUT instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on status at completion of INPUT instruction e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing INPUT instruction and turns OFF at next END processing Operation at execution of INPUT instruction END ENO END END processing Processing _ processing processing Sequence program i INPUT Completion of reception i instruction due fo INPUT instruction execution 1 INPUT instruction oe Completion OFF device 1 Error ION completion 4 1 eS co et ass Ss aes sas 1 Completion i status indication device i 1 Normal i completion 1 scan a_l i k 10 23 INPUT Operation Errors Program Example 1 1
70. ation Module User s Manual Detailed Information for details of the AJ71QC24 operation mode Possible range of access with other stations The following indicates the stations which can be accessed when ac cessing other stations via an AJ71QC24 with link dedicated instructions In the following descriptions these accessible stations are expressed as target station 1 Target station 1 a The access described here is access between QnACPUs which is via AJ71QC24 only and where the AJ71QC24s are connected by RS 232C RS 422 interfaces or by RS 422 485 interfaces b The connected QnACPUs QnACPUs 1 to 9 in the following diagram can conduct data communications by link dedicated instructions c When AJ71QC24s are connected by RS 422 485 interfaces access between QnACPUs is possible even if external devices are connected in the circuit AJ71QC24s connected by RS 232C RS 422 interfaces 1 1 connection possible Example 1 2 lt 2 gt 00104 RS 232C RS 422 AJ71QC24s connected by RS 422 485 interfaces 1 1 1 n m n connections possible Example 10 4 10 AJ71QC24 CONTROL INSTRUCTIONS Command We ON ON External device AJ71QC24 side QnACPU at station No 1 where AJ710024 is installed QnACPU at station No n where AJ71QC24 is installed i 3 Cautions when accessing other stations The following describes cautions when accessing other stations via an AJ71QC24
71. b15 bBb7 bO S 1 fourth chamoter third character S 2 emreneer iamauncnr nnmberetshenaen gt a la a The situation when the characters ABCDE stored in D200 to D202 are sent to the printer is shown below b15 bBb7 bO 424 B 41n A 44H D 43H C P 6 characters 46H F 45H E 4 Cannot be output to printer because only 5 characters D200 D201 D202 T ABCDE PRN FE ASE enemas We SECO f Operation Errors 2 3 4 5 6 7 1 AD59 S1 initial setting takes place automatically during CPU RUN The number of characters no of bytes that can be designated at n is 1 to 1024 Character data stored from the device number designated at S and onwards is set using ASCI codes 00H to FFH The bit device designated at D automatically turns ON on execution of the END instruction of the scan completing the character output processing and turns OFF at the END instruction of the next scan Processed as a PRN instruction execution completed flag Processing of output to the printer by PRN instructions is conducted in byte units Character data stored from the device number designated at S onwards is automatically rearranged so that it can be processed in byte units PRN instructions can only be executed when AD59 S1 X n 4 FIFO memory empty is ON lf PRN instructions are run when X n 4 is OFF no processing is performed The b
72. completion Stays OFF no change e Error completion Turns ON at END processing of scan completing BIDIN instruction and turns OFF at next END processing Operation at execution of BIDIN instruction END END END END processing processing processing processing Sequencm t program 1 Execution of Completion of reception i BIDIN instruction Ti due fo BIDIN Instruction I I BIDIN instruction TON I 1 Completion OFF i device i l Error 1 ON completion i i i 1 Completion SIAS indication i 1 levice i completion i t 1 scan t 1 10 29 Operation Errors Program Example 1 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 A program which when X30 turns ON stores data received in channel 2 to D10 and onwards is shown here The number of received data and permissible number of received data is set to 20 Control data is stored
73. corrective action according to error code of SSP SESS MES Scie saan aie eee D1 storing S1 1 completed status M2 turns ON OFF Gependin on normal operation completion or error completion of READ instruction M1 turns ON for only 1 scan at completion of READ instruction execution 10 36 SWRITE MELSEC QnA 10 11 Writing to Other Station Devices internal Device MELSECNET 10 Special eile Index System User Direct Jis Function Register Module Instruction Symbol Execution condition 7 Command SWRITE M ae pe ae Lele Command i inane i Ce COC CO Oe Oe Set data Set Data Description Data Type AJ71QC24 head I O number 16 bit binary st First device number of devices storing control data First device number of devices of host station storing write data Device name First device number of devices of other station storing write data D2 Bit device of host station turning ON at write completion aa D3 Bit device of target station turning ON at write completion Control data z Data Set By Setting Details etting Range Data Set By Target station 1 Uoer syeten b15 to b7 to b0 Cae ae Execution type bit 0 0 No arrival confirmation Execution of SWRITE instruction is completed at completion of sending request to write 1 Arrival confirmation Execution of SWRITE instruction is completed at completion of writing data
74. ct to an AJ71PT32 S3 set in the extension mode If the instructions are executed with an AJ71PT32 S3 or AJ71PT32 set in the VO dedicated mode an error occurs and no processing takes place 2 An initial data ROM must be installed in an AJ71PT32 S3 used with AJ71PT32 S3 control instructions An AJ71PT32 S3 cannot be controlled if the initial data ROM is not installed Furthermore a message ROM must also be installed if an AU35PT OPB M1 AJ35 OPB P1 operation box is used See the SWOSGP MINIP Operating Manual for details about creat ing the initial ROM and message ROM 3 In communications between AJ71PT32 S3 and AJ71PT32 and batch refresh type remote I O modules a program can be created without worrying about the buffer memory address by setting auto matic refresh in the parameter settings When automatic refresh setting is performed the batch refresh communication data buffer memory is communicated automatically with AJ71PT32 S3 or AJ71PT32 Accordingly it is possible to communicate with a batch refresh type remote 1 O module using a device allocated to the communication data storage device See the QnACPU User s Manual for details 4 When conducting communications between AJ71PT32 S3 and re mote terminal modules with AJ71P7T32 S3 control instructions be fore executing the instructions the AJ71PT32 S3 communications start signal Y n 28 must be turned ON by the sequence program If the instructions are executed while t
75. d by S1 1 exceeds the range 0 to 3 Error code 4100 e When the number of words designated at n exceeds the range 1 to 4096 Error code 4100 e When the range of number of words designated at n from first address number designated at s exceeds the FFFH address Error code 4100 e The range of the number of words designated by n from the first device number designated by S2 exceeds the final device number of the relevant device Error code 4101 e When the module attempting access is not a special function module Error code 2110 e When AD59 S1 control instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AD59 S1 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 PUT MELSEC QnA Program Example 1 A program which when XO turns ON writes the data of DO to D4 to addresses OH to 4H of area number 1 of the AD59 memory card is shown here Ladder mode 0 wy OKO D10 Designates first address mW K D Designates area number G PUT 02 D10 5 bo List mode 0 LD xo MOV KO D10 3 MOV K Di 5 G PUT 02 D10 K5 DO 14 DD mof o fret address on n O area number MEMO 7 AJ71PT32 S3 CONTROL INSTRUCTIONS MELSEC QnA 7 AJ71PT32 S3 CONTROL INSTRUCTIONS AJ71PT32 S3 control instructions are ins
76. designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which when XO turns ON receives 5 words of data from an external device connected to the RS 232C interface of the AJ71C21 S1 installed at 1 O numbers X Y020 to X YO3F and stores the data to DO to D4 is shown here MO turns ON on completion of instruction execution Ladder mode I2 X20 MiO P 0 v E202 KO t Sets once after CPU RUN in the communication data word unit designation SET Nio Designates number of received data r 9 A5 MY KS Dio 6 1euT2 uz DO DO MO INPUT2 INPUT4 List mode External device MITSUBISHI 0 l 2 3 Jaze gazeg BEERE PegnEy BSEsenN Ad71021 s1 E MELSEC QnA oop a received data bi5 49x I b8 b7 bO t 4DH M D1 534 S 544 T 42H B 554 U D3 534 S 49H I D4 49H I 48H H Om DS Stored automatically GET MELSEC QnA 8 4 Read RAM Memory MELSECNET 10 Special Direct JN Function Module USAGI Instruction symbol Execution condition n Atea eH 5 HA erer Head I O number of AJ71C21 S1 S First address number of RAM memory storing 16 bit binary read data 2 eect Number of words of data to b
77. devices This section describes how to read the detailed explanation of instructions given in Section 5 and later sections MELSEC QnA CO paseme PVWA1 or PYWR2 Th pe rere F See e 4 5 6 1 Writes to AD61 81 the preset value which ie stored in the devicedesignated at S The preset valve wiltes data directy to the ADG 1 81 buffer memory The channel and buifer memory address for writing the proest value differ ecoording to the Proset vee 2 in the writing of preset values by PVWIA1 and PYWRZ2 instructions the ON OFF contro of the ADO 1 81 preset commands Yeis Yaet io conducted autom atically by intemal The user dose not need to conduct the OWOFF control of the preset commend 3 The preset value designated at 8 and 8 1 is within the range 0 to 16777215 1 Instruction symbol 2 Section number and general description of the instruction 3 O indicates the devices that can be used with the instruction The classes of use into which the devices that can be used are divided are as follows Internal Device MELSECNET 10 Special System User Direct JEN Function Module Register UST Gis Character string constant 1 The devices that can be set are indicated in the Constant and Other columns 2 FX and FY can only be used with bit data and FD can only be used with word data 4 HOW TO READ EXPLANATIONS FOR INSTRUCTIONS povi evite Ce a a EN an er Ope
78. devices is illegal e When a non designatable device is designated Error code 4301 Error code 4302 1 A program which when XO turns ON sends D0 D4 data in word units to an external device connected to a remote terminal no 1 AUSSPTF R2 of a AJ71PT32 S3 installed in O number X Y020 X Y04F is shown here MO turns ON at instruction execution completion Ladder mode Sets once after CPU RUN in communication data word unit designation Turns ON the AJ71PT32 S3 communications start List mode Lerten bees al 57 l T r 860 zi u 7 mr Ye a B D 3 A 140 10 a X41 lI G PRN rd Do w 2 2 w 2S MELSEC Remote termina no 1 NETMINI S3 D1 saw S 54 1 ADM to daa tak ata bak system D2 424 B 85H U 5 words COZ hurip fsa R2 D3 53n S 1 49u 1 32 83 Ema 4m D i 48n H g device MITSUBISHI PR MELSEC QnA 7 3 No Protocol Mode Data Send up until 00H Code Usable Devices Internal Device MELSECNET 10 Special System User Direct JNS Funetion Register instruction Symbol Execution condition pare aaa CO processing a Remote terminal number of AUS5PTF R2 sending data Function 1 Sends data between the device number designated at S and the device number storing 00H to an external device connected to the AJ35PTF R2 whose remote terminal No is n of the AJ71PT32 S3 When send processing is completed automatically turns ON th
79. ding to error code pat ic eh i a she oleae of D1 storing S1 1 completed status M2 turns ON OFF depending on the normal completion error completion of REQ instruction M1 turns ON for only 1 scan at REQ instruction execution completion 10 55 MEMO ID INTERFACE MODULE INSTRUCTION MELSEC QnA 11 ID INTERFACE MODULE INSTRUCTIONS ID interface module instructions are instructions for reading writing data to ID data carriers through ID interface modules The following table shows ID interface module instructions ID controller initial IDINIT1 Writes channel 1 or channel 2 control data to ID interface 11 1 setting IDINIT2 module buffer m mory nsadng from ID data IERD Reads data from ID data carrier through channels 1 or 2 oe to ID data owes Writes data to ID data carrier through channels 1 or 2 eE Continuous reading IDARD1 Reads data after the ID data carrier has entered the from ID data carrier IDARD2 communication range with the ID reader writer Continuous writing to ei Writes data after the ID data carrier has entered the ID data carrier DAWD2 communication range with the ID reader writer Data comparison with IDCMP1 Compares the data of the ID data carrier and of the 11 6 ID data carrier IDCNP2 device memory Batch writing of same IDFILL1 Batch writes the same data into a designated area of the 11 7 data to ID data carrier IDFILL2 ID data carrier Copying between ID IDCOPY 1 Copies data between 2 ID data carriers throu
80. dule installed in 1 O number X Y60 to X Y7F with word point data from DO X Y600X Y7F ID data carrier D3 38x DA 4a OI SHU H eee writer o me me o roo w rs w 0 x0 1 GP IDOP2 U6 E100 DO I5 Mo 13 BND Operation Completion of comparison due to IDCMP2 instruction 0 END 0 END 0 END 0 END Sequence program _ _ __ __ __ ON Execute command X0 ON OFF Pen eee ens ioe Completion device M0 l 10N Error completion r 4 4 Completion status OFF led ee aan ee ee a ee indication device M1 Normal completion 1 scan 11 13 IDFILL1 IDFILL2 MELSEC QnA 11 7 Batch Writing Same Data to ID Data Carrier Usable Devices S ee Device MELSECNET 10 Special ot Data System ee Direct JENN Function a Constant Module garor K H TRY zn Instruction symbol Execution condition C represents 1 or 2 Command IDFILL1 IDFILL2 g eom O o e o Command IDFILL1 IDFILL2 ae emm C w fom o e ow ee eae Head I O number of ID controller a First address of ID data carrier 16 bit binary Write data or first device number of devices storing write data Number of write data 0 to 3900 Number of bit device turning ON at execute completion at error completion D 1 also turns ON 1 Writes data designated at S from ID data carrier address designated at nt to an area of the number of data designated at n2 through
81. e bit device designated at D after only 1 scan bis B7 d B S N Remote terminal No n S 1 S 2 co wrer CO AJ35PTF R2 gt _ External device n 32 S3 MELSEC ees a NET MIN S3 data syn 00 TT ink system Shows the end of data MELSEC QnA b6 b wey b fe s p S 1 44n D 1 438 C 41H A to 48H 1 S 2 CSE C FAUSSPTF R2 S 3 aon 1 4 O NETANE S 4 data iink system D Shows the end of data External device ABCDEFGHI 2 In send processing by PRN instructions writing of transmission data to AJ71PT32 S3 buffer memory and ON OFF processing of O signal request to send send completion are conducted automatically by inter nal processing so does not need to be conducted by the user 3 The number of data which can be sent at one time is shown below Word unit 1 to TO area setting capacity 1 words Byte unit 1 to TO area setting capacity 1 x 2 bytes When using the AJ71PT32 S3 the data unit word or byte and the TO area must be set in advance in the AJ71PT32 S3 e Data unit designation Set in the AJ71PT32 S3 buffer memory remote terminal parameter by TO instruction e TO area setting Set in the initial data ROM by remote terminal data setting in initial data setting using SWOSGP MINIP 4 The send data set in S differs depending on the data unit designa tion word byte set in AJ71PT32 S3 Word unit designation
82. e following cases an operation error occurs the error flag SM0 turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When dedicated instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AD61 S1 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 The following is an example program which when X0 is ON writes the preset data of DO and D1 to the buffer memory for channel 1 of the AD61 installed at I O numbers X Y020 to X Y03F Ladder mode List mode 0 LD X0 1 G PYWRI U2 DO 8 END AD61 buffer memory D1 bo asec a 1 23 1 66k 12366H io 5 SVWR1 SVWR2 MELSEC QnA 5 2 Setting Set Value Data for Greater Smaller Equal Judgments Usable Devices internal Device MELSECNET 10 Special al lt a vere JUG in RR UONGI Instruction symbol __ represents SVWR1 or SVWR2 command SVWR1 SVWR2 m Fr a SVWR1 SVWR2 F Saja CAO AD61 S1 head I O number 16 bit binary Head device number of devices storing the t hi preset Value to be written 32 bit binary 1 Writes to AD61 S1 the set value which is stored in the device designated at S This set value is a standard value against which the present count is compared to judge whe
83. e read ow First number of device First number of device storing data to be read data to be read Device name name D2 Number of the bit device turning ON on completion of processing Function 1 Reads n words of data from the AJ71C21 S1 RAM memory area address number designated at S and stores data from the device number designated at D1 onwards When read processing is completed automatically turns ON the bit device designated at D2 after only one scan AJ71C21 S1 RAM area address s 1 Set Data Designated address Designated RAM number fret address 0 D1 Ge a ye es 1 D1 1 01 2 2 i nwords O gt ithe i t 1 GET MELSEC QnA s s 1 8 area number AJ71C21 S1 RAM area 108 a 01 RAM number 109K 123W D o 1236 Operation Error 2 3 4 5 6 1 1104 S452 When net worde gt o2 O a 1110 ors Foo tam 10850 coryea 1055 When the RAM memory is read with a GET instruction ON OFF control of AJ71C21 S1 X n b request to read RAM and Y n 10 RAM read completed are automatically conducted by internal processing and so do not need to be conducted by the user The first address number designated at S is within the range 0 to 7FFH The RAM number designated at S 1 is within the range 0 to 79 The number of words designated at n is within the range 1 to 2048 However reading from multip
84. ecuted Wiring connection when via RS 422 485 interface When accessing other stations via the RS 422 485 interface of the AJ71QC24 with a system configuration of 1 n at the relay RS 422 485 interface side connect external devices on the line and between AJ71QC24s by connecting the wiring in the same way as for as an m n connection 1 2 See the AJ71QC24 Serial Communication Module User s Manual for details of the dedicated protocol global functions See the AJ71QC24 Serial Communication User s Manual for details of the wiring method for a m n connection 10 5 PUTE MELSEC QnA 10 1 Writing User Registration Frame to EEPROM Usable Devices Internal Device MELSECNET 10 Special System User Direct JLN Function index Register Module mG an Instruction Symbol Execution condition Command Sui m CO Command PUTE r 4 em e e a Set data AJ71QC24 head I O number 16 bit binary es First device number of devices storing control data s2 First device number of devices storing registered data Number of bit device which turns ON at execution Device name Control data Ina PUTE instruction designates whether to register or delete registered data designated at S2 Register 1 Delete 7 3 Register S1 0 delete designation ee result of registration deletion by PUTE instruction Register Normal delete result thar than 0 Er
85. ecuted in other than the operation panel or AJ35PTF R2 Error code 4104 e When the module attempting access is not a special function module Error code 2110 e When AJ35PTF R2 control instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AUS5PTF R2 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 1 The following is an example program which when XO turns ON stores to DO D2 the touch key and membrane key input status from an operation panel connected as remote terminal no 1 of the AJ71PT32 S3 installed at I O numbers X Y020 to X YO4F MO turns ON at instruction execution completion Ladder mode Turns ON the AJ71PT32 S3 communication start aa nes B 0 Designates the number of input points 1eeT U2 DIO DO M0 KI List mode 0 19 co 1 al 40 2 Of 4s 3 DD X0 4 M 140 5 MI 6 W B D10 8 on D10 Do w a 19 DD Operation box MELSECNET MINI S3 data link DO ouch key Di input status Se Lea e E 32 83 pera Input status Remote terminal no 1 PRN MELSEC QnA 7 2 No Protocol Mode Data Send of Designated Number of Bytes MELSECNET 10 Special Direct JUA Function irae Constant Module 7 UNG Instruction Symbol Execution condition Command ib FL i Com i sl e e PRN Command r Po
86. end processing the target interfaces differ according to the instructions used PR2 RS 232C interface PR4 RS 422 interface b15 b8b7 b0 S S 1 S 2 C gt External device S n Indicates the end of the data b15 bBb7 b0 indicates the end of the data External device S 5 1 S 2 S 3 S 4 41H A 4BH H c gt ABCDEFGH PR2 PR4 2 PR instructions conduct ON OFF control of AJ71021 S1 X n 2 X n 7 send completed Y n 2 Y n 7 receive completed automatically in internal processing and so the control does not have to be conducted by the user 3 OOH cannot be set as data in the send data stored from the device designated at S onwards 00H is the send data completed designation 4 The number of data which can be sent at one time is shown below Word unlit eens 1 to no protocol send buffer memory length set value 1 words Byte unit eee 1 to no protocol send buffer memory length set value 1 x 2 bytes Set the following items when the AJ71C21 S1 data unit designation and buffer memory length are not used in the settings at power on e No protocol word byte designation Power on words No protocol send buffer memory first address designation Power on RS 232C 0H RS 422 100H e No protocol send buffer memory length setting Power on 80H 5 The send data set in S differs depending on the AJ71C21 S1 data
87. esignated at D2 turns ON when writing of the device data to the target station is completed 2 AJ71QC24 control instructions cannot be executed simultaneously in two or more places for the same channel of the same AJ710C24 If the execution conditions come into effect simultaneously in 2 or more places subsequently executed AJ71QC24 control instructions must wait until a channel becomes available To use AJ71QC24 control instructions using the same channel in 2 or more places use the completion device in communication start commands and conduct sequential execution 3 An interlock signal for use at execution of the SWRITE instruction can be established with the completion device D2 or the completion status indication device D2 1 a Host station completion device Turns ON at END processing of scan completing SWRITE instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on status at time of completion of SWRITE instruction Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing SWRITE instruction and turns OFF at next END processing c Target station completion device Turns ON at END processing of scan completing SWRITE instruction and turns OFF at next END processing Operation at execution of SWRITE instruction END END END END processing processing processing Processing Sequence n
88. essing processing Sequence H program 1 PUTE instruction Register delete user ft Bare nian PUTE i fees instruction 1 execution ON f i 1 t OFF 1 register delete t t 0N Completion a en or a co device i Error ION completion cc Completion OFF status indication device t I t i t i 1 I i t 1 I t 4 t 1 t 4 t Normal completion Operation Errors 1 in the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module l Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 10 8 PUTE Program Example MELSEC QnA 1 A program which when X30 turns ON registers 8 bytes of data stored in D4 D7 to user registration frame number 1000 is shown below Control data is set in DO to D3 Ladder mode List mode 0 D 10 1 MOV Ki D0 4 OVP 11000 D2 7 Ww K8 D3 10 GP POTE w DO M w 18 END 2 A program which when X30 turns ON deletes the user registration frame nu
89. eted signal and buffer memory address are automat ically controlled and so do not need to be set by the user 3 MINI instructions are used in combination with FROM TO instructions and PRC instructions and the group of instructions must always be ended by a MINIEND instruction Between MINI MINIEND instructions a maximum of 32 FROM TO instructions can be described PRC instructions are used as FROM TO instructions 01 01 1 D1 2 n3 words i 2 aaa Pe i O D1 n MINI ee i MELSEC QnA Remote terminal module No n1 Buffer memory a The remote terminal module number designated at n1 sets allocated module numbers for remote terminal modules conducting communica tions __ The remote terminal module number is the allocated number in the _AJ71PT32 S3 initial data ROM rening for each remote terminal mod ule os l 5 The buffer memory J desiansted in n2 Joe onstak the head number of the buffer memory address of the remote terminal module which con ducts communications _ The communicating area is the range of the number of points _ designated at n3 from the address number designated at n2 onwards See the User s Manual for each remote tonne module for details on _ buffer memory addresses 6 The device ibe designated at D1 designates the first number of the device storing the read data The read data is stored in the range of the number of points desig nated at ns f
90. etion i t device aaa 1 Err Completion In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 10 35 READ a Rl Si CK Program Example A program which reads data from the AJ71QC24 of special function module station number 2 in a multidrop system is shown here Regua a A Set control data Sets S1 rror completion type Sets channel CH2 used by S1 2 host station Sets S1 3 to S1 5 Sets S1 6 special function module station number target station AJ71QC24 Sets S1 7 number of retransmissions 5 times Sets S1 8 arrival WOT time 2 seconds Sets S1 9 read data length 4 words Sets read command flag Reed Glebe QC24 WDT command signal ready error MO XIB XIE XIF k m READ instruction execution MO X1B is a signal used with respect to external devices to t prcoesaney prooram ai nonnsl oparaion completion _ ae Takes
91. f the next scan Used as an execution completion flag for INPUT instructions 6 The remote terminal number designated in n2 is the number previously set in initial data ROM for the corresponding operation box The remote terminal number setting is conducted by the remote terminal data setting in the SWOSGP MINIP initial data setting 7 In reception of keyed in data from the operation box the ON OFF status of the key reads by the INPUT instruction is held until the INPUT instruction is executed again if the ON OFF statuses of multiple keys are changed between executions of the INPUT instruction only the ON OFF status of the first key changed is stored and the ON OFF status of keys changed after that cannot be detected Communication with a remote terminal module connected to AJ71PT32 3 can only be conducted when the AJ71PT32 S3 communications start signal Y n 28 is ON If the instructions are executed when the communications start signal Y n 28 is OFF no error occurs but the bit device set for use as a completion flag does not turn ON INPUT Operation Errors Program Example 1 In the following cases an operation error occurs the error flag SM0 turns ON and the error code is stored in SDO e When the range of the number of data designated at n2 from the device number designated at D1 onwards exceeds the last device number of the corresponding device Error code 4101 e When INPUT instructions are ex
92. gal Error code 4300 e When the number of computer link module control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Y th E EET MELSEC QnA Program Example 1 A program which turns M10 ON when PR instructions are executed in AJ71C24 S3 installed in O number X Y020 X Y03F Ladder mode v2 D10 WO Kl D10 Dio Cue Turns M10 ON OFF by 0 bit 1 0 List mode o wb 4400 1 AD x27 2 ANI 3 G SPBOSY vz DIO 10 WD Kl D10 13M ti D10 16 OUT M10 17 DO dabei MELSEC QnA 9 5 Forced Cancellation of Communications Processing Internal Device MELSECNET 10 Special System User Direct JIG Function Module Register Zn Instruction Symbol Execution condition Command sree m S a Command ee r CENE Set Dat Head I O number of computer link module 16 bit 16 bit binary First device number of the devices storing the data KA designated for the stop 32 bit binary Function 1 Forcibly cancels communication processing processing by PRN PR INPUT instructions of computer link module 2 Setting of the cancel processing is conducted at S The cancel setting is made by setting 1 in the applicable device for cancel processing b15 b2 bi b0 S Ignores 0 1 Sending by PRN PR instructions status Receiving by INPUT instructions b15 w i S 1 a aes Ignores the 0 1 status of each bit 3 When process
93. ges Word unit 1 to TO area setting capacity 1 words Byte unit 1 to TO area setting capacity 1 x 2 bytes When using the AJ71PT32 S3 the data unit word or byte and the TO area must be set in advance in the AJ71PT32 S3 e Data unit designation Set in the AJ71PT32 S3 buffer memory remote terminal parameter by TO instruction e TO area setting Set in the initial data ROM by remote terminal data setting in initial data setting using SWOSGP MINIP PRN Operation Error 4 The unit of the number of data designated at n1 and the allowable 5 6 1 setting range differ depending on the TO area setting in the AJ71PT32 S3 data unit designation word byte and the initial data remote terminal setting Furthermore the send data set in S also differs depending on the word byte unit Word unit designation Byte unit designation ns te bo n v w d7 to bo Fourth wes 5 1 1 1 t 1 J we ww wend Eighth byte Seventh byte The remote terminal number designated in n2 is the number pre viously set in the initial data ROM for the corresponding AJ35PTF R2 The remote terminal number setting is conducted by the remote terminal data setting in the SWOSGP MINIP initial data setting The bit device designated at D automatically turns ON on execution of the END instruction of the scan completing the transmission processing and turns OFF at the END instruction of
94. gh channels data carriers IDCOPY2 1 and 2 1 See the following manual for details about the ID interface module ID reader writer and ID data carrier AJ711ID1 R4 AJ71ID2 R4 and A1SJ711D2 R4 A1SJ711D2 R4 ID Interface Module User s manuals 1IB 66595 11 1 IDINIT1 IDINIT2 MELSEC QnA 11 1 ID Controller Initial Setting internal Device MELSECNET 10 System User Direct JUNI Instruction symbol Execution condition J represents 1 or 2 IDINIT1 IDINIT2 cont u s Set Data un Head 1 O number of Head 1 0 number of ID controller controller 16 bit 16 bit binary First device number of devices storing Initial e Number of retries designation Sets the number of retries if communications between the ID data carrier and reader writer could not be conducted normally Initial Set Data 1 to 10 0 no retries Processing unit designation Sets whether the communication with the ID data carrier is conducted in word units or byte units x O word unit 1 byte unit _ Function 1 Writes initial set data of devices from that designated at S onwards to the ID interface module designated by the head I O number 2 IDINIT1 instructions conduct initial settings for ID interface module channel 1 and IDINIT2 instructions for channel 2 3 Conduct the initial setting with these instructions after starting the system and before executing the
95. gnated Error code 4302 A program which when XO turns ON sends data in word units from the data stored in DO to 00d to an external device connected to the AJ71024 S3 installed at I O numbers X Y020 X Y03F is shown here MO turns ON on compietion of instruction execution Ladder mode Sets once after CPU RUN in accordance with the communication data word unit designation List mode instruction Device 0 wD x 1 M rp 2 TOP A H103 Ko rat 7 D 10 8 AD 27 9 AN 2 10 G PR v2 D0 W 16 DOD PR bt5 to b8 b7 to bo DO 45H E i 40x M D1 534 S 4cH L 4DH M D2 434 C 1 45k E to 41H A an ps ain A SF Gig lt D4 MELSEC QnA External device MELSEC A INPUT MELSEC QnA 9 3 No Protocol Mode Data Receive Usable Devices MELSECNET 10 Special Direct J I Function Module UNG I Instruction Symbol Execution condition INPUT INPUT Set Data Set Data Description Data Type un Head I O number of computer link module Permissible number of received data and number of 16 bit binary received data pty Head number of device storing received data D2 Number of the bit device turning ON on completion of processing Function 1 Receives data from the external device connected to the computer link module within the permissible range of data designated at n and stores it from device number designated at D1 onwards On completion
96. gnated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control Instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 10 48 RECV Program Example 1 A program which reads data written by the SEND instruction to channel 2 of the AJ71QC24 installed at X Y10 to X Y2F to D300 onwards is shown here Control data set Set control data command MOVE K2 022 H Sets channel CH2 used by S1 2 host station ee lt i SS Se SR Ss See See S aie Takes corrective action according to error code eee et ewe nt en neem eeeeees of D21 storing S1 1 completed status M5 turns ON OFF depending on normal operation end error end of RECV instruction M4 tums ON for only 1 scan at completion of execution of RECV instruction 10 49 RE MELSEC QnA 10 14 Other Station Transient Transmission Request Internal Device EA Special h index ae ow User oa ws a peupe Register UNG Zn sty ee ee E od Instruction Symbol Execution condition Command m Lomo o a om Set data C un araca maano mum OOO O Sennan ioar Br sevis turning ON atexeouton comprenon e __ 10 50 REQ MELSEC QnA Control data Es Setting Range Data Set By Setting Detalls b15 to b7 to b to bo Pe A Error completion type bit 7 0 Not necessary to set the clock when error occur
97. gram H 1 PRR instruction i mpletion of sending by H execution ERRA instruction i PRR instruction i i 1 JON i i f t compten F ooo device 1 i 1 Error r i 1 ON completion Completion OFF i status indication device i i Normai i 1 completion i i 1 1 scan tatl In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 When the number of AJ71QC24 contro instruction devices is illegal Error code 4301 When a non designatable device is designated Error code 4302 10 20 PRR MELSEC QnA Program Example 1 A program which when X30 turns ON sends send schedule points 10 15 from channel 2 is shown here At this time the program adds CR LF Control data is stored in DO to D4 Ladder mode List mode EEEE BSSIST ARSSS 10 21 vse MELSEC QnA 10 6 Data Receive in No Protocol Protocol internal Device MELSECNET 10 Special System User Direct JN Function Module wz oo Register Zn S ee Instruction Symbol Execution condition Command INPUT afie H emeur n sy
98. he RS 422 interface of the AJ71C021 S1 designated by Un in the no protocol mode Loran Jun n S 0 On completion of the processing the bit device designated in D is turned ON Sending designated number of bytes of data Outputs data up to the 00H om _ ue s 0H sore stored from the word orme Tus TH Govice whose number is AJ71021 S1 designated by Un in the no protocol mode erma Hia completion of the output err ___uw s oH jtho bit device designated in D is tumed ON Outputs data up to the 00H code stored from the word device whose number is designated by S from the RS 422 interface of the AJ71C21 S1 designated by Un in the no protocol mode On completion of the output the bit device designated in D is turned ON 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS MELSEC QnA Instruction Execution Basic omenen sass ermos reo tn haass Stores data corresponding to the number of points ompun un n or designated by n sent to the Coa no RS 232C interface of the AJ71021 S1 designated by Un in the no protocol mode in INPUT2 word devices starting from the one whose number is designated by D1 On completion of the L cr weutz Un n 101 021 processing the bit device designated in D2 is turned Receiving ON data GP INPUT4 eons nen oars to e number of points cinputs jun n 01 02 designated by n sent to
99. he address designated at n1 or the number of data designated at n2 exceeds the permissible range for the ID data carrier 11 8 IDARD1 IDARD2 Operation Errors 1 Program Example 1 Ladder mode Operation Sequence program Execute command X0 0 END 0 END In the following cases an operation error occurs the error flag SM0 turns ON and the error code is stored in SDO e When the number of points n2 from the device number designated at D1 exceeds the applicable device Error code 4100 e When the value designated at n2 is outside the range 0 to 3900 Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of ID interface module instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 X Y860 X Y7F ID data carrier Channel 1 A program which when XO turns ON waits for the ID data carrier to enter the communication range reads 5 words of data from ID data carrier address 100 and stores the data from DO onwards is shown here List mode ve K000 DO Mo 0 D x0 1 GP IDARD U6 K100 DO K5 M 13 DD Completion of reading by IDARD 1 instruction 0 END 0 END
100. he communications start signal is OFF the instructions enter the waiting for processing status and processing of the instructions is not completed When communications start signal Y n 28 turns ON in the waiting for processing status the instruction processing is executed However when automatic refresh setting is set the communications start signal Y n 28 is automatically turned ON when the CPU is switched from STOP to RUN 5 Up to 8 AJ71PT32 S3s can be automatically refreshed by the QnACPU To use 9 or more AJ71PT32 S3s use the FROM and TO instruc tions to exercise control from the user program se MELSEC QnA 7 1 Key Input from Operation Box Usable Devices internal Device MELSECNET 10 Special System User Direct JAG Function Module Index Register Zn Instruction Symbol Execution condition Command INPUT JTL emer wn m o oa m Command INPUT f ermet on m oa e m AJ71PT32 S3 head I O number Permissible number of received data and number of 16 bit binary received data imo units Dt First number of device storing First number of device storing key operation status operation status Device name name D2 Number of the bit device turning ON on completion of processing ona Remote terminal number of applicable operation box 16 bit binary Function 1 Out of the operation boxes connected to AJ71PT32 S3 fetches the key operation status from
101. ignated at n1 only the permissible number of received data is stored and the remaining received data is discarded The n1 and ni 1 setting value and storage value units differ depend ing on the AJ71PT32 S3 data unit designation word byte The data stored in D1 also differs depending whether the word or byte unit is designated Word unit designation Byte unit designation n Cem ___ n nist nist 1 i 1 I 4 4 In byte unit designation depending on whether the received data is odd or even numbered the 00H code added to the end of the received data is stored as below Received data is an odd number Stored in the higher bytes of the last device number storing received data Received data is an even number Stored in the device number subsequent to the last device number storing received data ni t ss B fbytes bytes 1s e we o w D1 D1 D1 1 D1 1 D1 2 sem ore more D1 2 D1 3 Dips D1 4 cont emis D1 4 xX A Automatically stores 00H Automatically stores 0000n T aiis MELSEC QnA 8 When the number of received data is higher than the permissible num ber of received data the 00H code which is added to the end of the received data is stored in the next device number to the device num ber of the permissible number of received data Word unit designation Byte unit designation n ata n ni 1 7 t t i 1 d we ene ewe
102. in DO to D3 Ladder mode List mode instruction Device LD x30 MOVP K1 Do MOVP K10 D2 GP BIDOUT Uo DO D10 MO END 10 30 SPBUSY MELSEC QnA 10 9 Read Communications Status Internal Device File MELSECNET 10 Special a User Index Direct e Function ee i Module Register UNG Zn instruction Symbol Execution condition Command sessy JL 4 a To Command sreusy F m Set data AJ71QC24 head I O number 16 bit 16 bit binary First device number of devices storing the read Function 1 Reads the execution status of AJ71QC24 control instructions for AJ71QC24 designated at head O number and stores execution status to the device designated at D and onwards 2 The execution statuses are stored in D as follows each bit is set to 1 when the processing for the corresponding instruction starts and 0 on completion of processing for the corresponding instruction The completion of processing of instructions is defined as when the instruction completion flag turns OFF b15 to b4 b3 b2 bt b0 D 0 Stores execution status of ONDEMAND OUTPUT PRR and BIDOUT instructions for channel 1 Stores execution status of INPUT and BIDIN instructions for channel 1 Stores execution status of ONDEMAND OUTPUT PRR and BIDOUT instructions for channel 2 Stores execution status of INPUT and BIDIN instruction for channel 2 Stores execution status of GETE and PUTE instructions D
103. in the AJ71PT32 S3 buffer memory and ON OFF processing of re quest to read I O signal and read completed are conducted automat ically by internal processing and so do not need to be conducted by the user The number of data that can be received in one receive processing is shown below Word unit Max FROM area setting capacity 1 words Byte unit Min FROM area setting capacity 1 x 2 bytes When using the AJ71PT32 S3 the data unit word or byte and the FROM area must be set in advance in the AJ71PT32 S3 e Data unit designation Set in the AJ71PT32 S3 buffer memory remote terminal parameter by TO instruction Set in the initial data ROM by remote terminal data setting in initial data setting using SWOSGP MINIP e FROM area setting The permissible number of received data designated at n1 is the set ting made to secure the range of devices for storing received data and the data storage destination is the device numbers starting from the device number designated at D1 and equivalent to the number of points designated at n1 The number of data actually received is automatically stored in n 1 al Permissible number of received data Number of received nisi data D1 D1 1 D1 2 D1 3 D1 4 D1 5 D1 6 D1 7 INPUT ASD mmm Ae SECA 5 When the number of data actually received is larger than the permissi 6 7 ble number of received data des
104. ing data Ladder mode Extracts bit 0 only PCLR z MELSEC QnA 7 8 Forced Stop of Communication Processing Usable Devices Internal Device MELSECNET 10 Special index AEA User Direct JINI Function Register Module Instruction Symbol Execution condition Command ron TL LO Command SPCLR r es Set Data AJ71PT32 S3 head 1 O number 16 bit 16 bit binary First number of the devices in which the stop Ea designation data is stored Function 1 Forcibly cancels communications processing by the following instruc tions with the remote terminal module connected to AJ71PT32 S3 Key input from operation box ee INPUT instructions Data communications with AJ35PTF R2 PRN PR INPUT instructions Communication of data with remote terminal modules conforming to MINI Standard protocol cccccsesseceessceeneeees MINI instructions 2 The setting for cancel processing is made at S The cancel setting is conducted by setting 1 in the applicable device for cancel processing BTS t bI1b1IO t 6867 t bt a3 w bo ee eee Bee RERE Stores the status of data transmission to the first remote terminal module Stores the status of data reception from the first remote terminal module Stores the status of data transmission to the second remote terminal module Stores the status of data reception from the second remote terminal module Stores the status of data tr
105. ing is cancelled the completion flag designated bit de vice for the instruction corresponding to the cancellation does not turn ON Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When computer link module control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of computer link module control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 SPCLR MELSEC QnA Program Example 1 A program which cancels the PR or PRN instruction being executed at the AJ71024 S3 installed at I O numbers X Y020 X YO3F is shown here Ladder mode 0 ae eee u o 6 SPCLR w o Sets 1 in bit no 0 List mode 0 1D 4400 1 AND X27 2 ANI xD 3 MW Ki D10 5 G SPCLR 02 D10 12 END 10 AJ71QC24 CONTROL INSTRUCTIONS MELSEC QnA 10 AJ71QC24 CONTROL INSTRUCTIONS AJ7QC24 instructions are instructions for conducting data communications between an AJ71QC24 and external devices connected to the AJ71QC24 The following table shows AJ71QC24 instructions Category Bare Description i Registers the user registration frame in pili Pad lala EPROM or deletes registered user registratio
106. instruction the executed while ON and exe cuted at leading edge types are designated as follows G PWRI u0 DO Executed while ON s i GP PVWRI U0 D0 ON Executed at leading edge 3 CONFIGURATION OF INSTRUCTIONS DE ms Ai Se Can Al 3 3 Number of Steps The number of steps taken up by special function module instructions for QnACPU depends on the devices used and whether or not indirect designa tion is used The basic numbers of steps for special function module instructions are indicated in the instruction lists in Section 2 3 1 Conditions under which the number of steps is increased The number of steps exceeds the basic number of steps if indirect device designation is used or if devices which increase the number of steps are used a Indirect designation of devices ae the number of steps is increased by 1 with respect to the basic number of steps b Device that increases the number of steps Device that Increases the Number of ae Buffer Butter register Link register Consecutive number access file register 32 bit constant Real number constant number constant When even characters numbers 2 Character string constant When odd characters numbers 1 2 1 c If both conditions a and b above exist both steps increase 4 HOW TO READ EXPLANATIONS FOR INSTRUCTIONS MELSEC QnA 4 HOW TO READ EXPLANATIONS FOR INSTRUCTIONS Device Classi fication Usable
107. ion Doveo m AMI X40 2 AND X41 3 G HINTERR v2 10 BO SPBUSY MELSEC QnA 7 7 Reading Communication Status Internal Device MELSECNET 10 Special Index System User Direct Ji2 i3 Function Regist Module geier Instruction Symbol Execution condition Command seuvo M Heen Ty Command SPBUSY r CC zeae Ery D Device number storing read communication status Function 1 Reads the execution statuses of the following instructions with re spect to the remote terminal module connected to AJ71PT32 S3 and stores them in the device designated at D Key input from operation box INPUT instructions Data communications with AJU35PTF R2 PRN PR INPUT instructions Communication of data with remote terminal modules conforming to MINI Standard protocol cc cecceseeeeeeeeeeeeeeees MINI instructions 2 The execution status stored in D is 1 at the start of data communi cation processing in remote terminal modules by instructions and is 0 when the processing is completed The point when processing of the instruction is completed is when the instruction completion flag designated bit device turns from ON to OFF b1S t b11DIO i bBb7 b4b3 w bo CERREN Ree Stores the status of data transmission to the first remote terminai module Stores the status of data reception from the first remote terminal module Stores the status of data transmission to the second remote terminal module Stores
108. ion mode For other station access via AJ71QC24 set the AJ71QC24 on the access route as follows 1 Set operation mode to dedicated protocol format 1 to format 5 2 Set to no interlock b General description of data communication by link dedicated instructions The following gives a general description of data communication with QnACPUs in other stations by using link dedicated instructions 1 READ SWRITE instructions Instructions for reading and writing data to the device memory of the QnACPU of a designated station e READ Reads data from device memory of the QnACPU at the designated station e SWRITE Writes data to the device memory of the QnACPU at the designated station RS 2320 RS 422 pee Cone 2 SEND RECV instructions l Instructions for data communications between QnACPUs using the OS memory of the AJ71QC24 e SEND Writes designated data to designated station AJ71QC24 OS memory e RECV Reads data from host station AJ71QC24 OS memory QaAcPU ATO OncPu ANG H zmo Hiem Heren E m 3 REQ instructions instructions for status control remote RUN remote STOP and clock data read write of the QnACPU at the designated station DACP 10 3 10 AJ71QC24 CONTROL INSTRUCTIONS i MELSEC QnA 1 2 Meaning of symbol on right hand side of AJ71QC24 installation station lt gt AJ71QC24 setting station number AJ71QC24 head 1 O signal See the AJ71QC24 Serial Communic
109. is completed Normal error completion of BIDOUT instructions can be confirmed by means of the completion device D or completion status indication device D 1 a Completion device Turns ON at END processing of scan completing the BIDOUT instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on status at completion of BIDOUT instruction e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing BIDOUT instruction and turns OFF at next END processing Operation at execution of BIDOUT instruction END END END END processing processing processing processing Sequence program BIDOUT Completion of sending i instruction Tan due to BIDOUT instruction execution t BIDOUT o einem Instruction 1 ie OFF i ee Mallee JON completion _ Completion OFF H l 3 status indication S a Looma device i completion i i i 1 scan H 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC
110. it device designated at D will also not turn ON In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the number of characters no of bytes designated at n is outside the range 1 to 1024 Error code 4100 e When from the device number designated at S onwards the range of the number of characters designated at n exceeds the last device number of the applicable device Error code 4101 e When the character data stored from the device number designated at S onwards is less than n characters Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AD59 S1 control instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AD59 S1 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 PRN Program Example D21 Totai number COOCOO 5 Jaam 022 354 5 34H 4 MELSEC QnA 1 The following is an example program which when XO turns ON outputs decimal values stored in D10 as characters to a printer connected to AD59 installed at I O numbers X Y080 to X YO9F M1 turns ON on completion of execution of the instructions Ladder mode x0 Designation of total number of digits in character string conversion De
111. l module No 1 8 AJ71C21 S1 CONTROL INSTRUTIONS MELSEC QnA 8 AJ71C21 S1 CONTROL INSTRUCTIONS AJ71C21 S1 control instructions conduct data communications in the no protocol mode with external devices connected to AJ71C21 S1 They are also instructions for reading writing data to AJ71C21 S1 internal RAM memory The table below shows the AJ71C21 S1 control instructions Sends designated number of data to external device connected to RS 232C om a external device connected to RS 442 Sending data a ee device connected to RS 232C Section 8 2 Sends data up to 00H code to external device connected to RS 442 Reads data received from external device INPUT2 connected to RS 232C Receiving data Section 8 3 Reads data received from external device INPUT4 connected to RS 442 Read RAM Reads data stored in AJ71C21 S1 RAM Write to RAM memory Reading Reads communications processing status communication SPBUSY as well as execution status of RAM memory Section 8 6 status read write processing by instructions Forced stop of Forcibly stops communication processing communication SPCLR with external devices as well as RAM Section 8 7 processing memory read write processing 1 Note that when the module model name is not registered in the parameter setting no error will occur even if AJ71C21 S1 control instructions are executed with respect to an AD61 S1 However when these instruction
112. le areas is not possible The bit device designated at D2 automatically turns ON on execution of the END instruction of the scan completing the read processing and turns OFF at the END instruction of the next scan Used as a GET instructions execution completion flag In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the designated module is AJ71C21 Error code 2112 e When the address number designated at S exceeds the range 0 to 7FFH Error code 4100 e When the area number designated at S 1 exceeds the range 0 to 79 l Error code 4100 For the AJ71C21 S2 when the area number exceeds the range 0 to 191 e When the number of words designated at n exceeds the range 1 to 2048 Error code 4100 e When the range of the number of words designated at n starting from the first device number designated at D1 exceeds 7FFH Error code 4100 e When the range of the number of words designated at n starting from the first device number designated at D1 exceeds the last device number of the applicable device Error code 4101 e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices
113. mber 1000 is shown below Control data is set in DO to D3 Ladder mode List mode 0 wb wo 1 Wow 3 D0 4 MOVP K1000 D2 7 MoV Ki D3 10 GP PUTE w DO D4 Mo 18 ED 1 1 Store dummy data in D3 in the range of 1 to 80 2 2 D4 is the dummy device 10 9 GETE MELSEC QnA 10 2 Reading User Registration Frame from EEPROM Internal Device MELSECNET 10 Special System User Direct JUG Function Module Bit Bt Word H S1 a 0 oe Instruction Symbol Execution condition Command get m a c o e O Command aere r a COME ii COO aoe AJ71QC24 head I O number 16 bit 16 bit binary st First device number of devices storing control data S2 First device number of devices storing the read Device name registration data D Number of the bit device turning ON at execution completion Control data Setting Range Piso bunny tented e Stores GETE instruction read result S1 1 Read result 0 Normal System other than 0 Error Code ts S1 2 rth goede t e Sets user registration frame number ati S1 3 reclstered bytes e Sets number of bytes of user registration frame 1 to 80 E 1 See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 The meanings of the entries in the set by column in the table above are as follows e User Data set by the user before executing GET instruction e System Result of G
114. mmon Instructions Contains information on instructions not included in the manuals noted to the right 2 QnACPU Programming Manual Pundamentais e QnACPU Programming Manual Common Instructions e QnACPU Programming Manual PID Control Instructions e QnACPU Programming Manual AD57 Instructions e QnACPU Programming Manual SFC Before reading this manual it is advisable to review the QnACPU Program ming Manual Fundamentals to confirm what programs can be used with QnACPU input output processing and basic information on devices aa QnACPU Programming Manual SI Fundamentals Contains information on the programs that can be used with QnACPU uO Processing and device names This manual QnACPU Programming Manual SFC QnACPU Programming Manual PID Control Instructions QnACPU Programming Manual AD57 Instructions Contains Contains Contains lt Contains information on information on information on information on instructions for AD57 instruc instructions SFC Special func tions used for used for PID tion modules controlling controls suchas the AD57 AD58 AJ71QC24 and ee AJ71PT32 S3 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS This chapter lists the instructions for special function modules
115. n MINI instructions are executed for modules apart from AJ71PT32 S3 Error code 4104 e When the communicating node destination module is not a remote terminal module conforming to MINI standard protocol Error code 4104 e When in the FROM TO instructions the range of numbers of points designated at n3 from the device number designated at D1 and S onwards exceeds the last device number of the applicable device Error code 4101 e When for FROM instructions the number of points designated at n3 is greater than each remote terminal module receive area set value in the AJ71PT32 S3 initial data settings minus 1 Error code 4100 e When any of the remote terminal module receive area set values in the AJ71PT32 S3 initial data settings is less than 3 words Error code 4100 e When for a TO instruction the number of points designated at n3 is greater than each of the remote terminal module send area set values in the AJ71PT32 S3 initial data settings minus 3 Error code 4100 e When the communication request registration area is full and cannot conduct registration when FROM TO instructions are executed Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction device
116. n Regist Register Module eayrer Instruction symbol Execution condition C represents 1 or 2 Command IDARD1 IDARD2 m footy ls o Command IDARD1 IDARD2 f Ea Hem ea Dae Te C n m oa e Head I O number of ID interface module 16 bit binary fmt First address of ID data carrier First number of device storing data to be read reba trea aia 0200 Number of the bit device turning ON after D2 execution completed at error completion D2 1 also turns ON Function 1 Reads the number of data designated at n2 from the ID data carrier addresses starting at the one designated by n1 through the ID interface designated by the head O number and stores this data at devices starting from that designated at D1 2 When the ID data carrier is not within the range of communication with the ID reader writer the system waits for the ID data carrier to enter the communication range and then reads data from it 3 When continuous reading is completed at the END instruction execution of the scan completing instruction the bit device designated at D2 turns ON and automatically turns OFF after one scan At error completion the completion status indication device D2 1 also turns ON for one scan 4 IDRD1 instructions execute by ID interface module channel 1 and IDRD2 instructions by channel 2 5 There is no operation when the value designated at n2 is 0 6 Error completion occurs when t
117. n frame Read user registration GETE Reads the user registration frame frame from EPROM registered in EPROM Data send by dedicated Sends data in dedicated protocol by protocol on demand function ONDEMAND on demand functions Designated number of data OUTPUT Sends designated number of data in send in no protoco protocol no protocol protocol Data send in no protocol protocol Sends data in no protocol according to Data send in accordance send schedule with schedule table Data receive in no protocol INPUT Receives data in no pretocol protocol Data send in bidirectional idi BIDOUT Sends data in bidirectional protocol Data receive in bidirectional eee eee Teo Receives data in bidirectional protocol Read communications SPBUSY Reads communication processing status status by instructions Reads device data from other station Read other station device CPUs connected to AJ71QC24 and MELSECNET 10 Writes data to device of other station Write other station device SWRITE CPU connected to AJ71QC24 and MELSECNET 10 Sends data to other station CPU Data send to other station connected to AJ71QC24 and MELSECNET 10 Receives data from other station CPU connected to AJ71QC24 and MELSECNET 10 Data receive from other station Sends transit request to other station CPU connected to AJ71QC24 and MELSECNET 10 Transient transmission request from other station 10 1 10 AJ71QC24 CONTROL INSTRUCTIONS MELSEC Qn
118. nd result 0 Normal System other than 0 Error code S1 2 peal of send e Sets number of data to send pote 1 1 See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 2 When bytes designated sets number of bytes when words designated sets number of words in AJ71QC24 3 The meanings of the entries in the set by column in the table above are as follows e User Data set by the user before executing OUTPUT instruction e System Result of OUTPUT instruction execution stored by QnACPU 10 16 OUTPUT MELSEC QnA Function 1 Sends data stored from the device designated at S2 onwards according to control data from the device designated in S1 onwards to AJ71QC24 designated at Un in no protocol mode QnACPU AJ71QC24 T Channels in use set 1 by control data Channel 2 2 The following instruction cannot be executed simultaneously in channels executing OUTPUT instruction e Other OUTPUT instructions e ONDEMAND instructions e PRR instructions e BIDOUT instructions If an attempt is made to execute the above instructions while an OUTPUT instruction is being executed the system waits until the OUTPUT instruction being executed is completed 3 Normal error completion of OUTPUT instructions can be confirmed by means of the completion device D or completion status indication device D 1 a Completion device Turns ON a
119. nd user System Design Precautions e Safety circuits should be installed external to the programmable controller to ensure that the system as a whole will continue to operate safely in the event of an external power supply malfunction or a programmable controller failure Erroneous outputs and operation could result in an accident 1 The following circuitry should be installed outside the programmable controller Interlock circuitry for the emergency stop circuit protective circuit and for reciprocal operations such as forward reverse etc and interlock circuitry for upper lower positioning limits etc to prevent machine damage 2 When the programmable controller detects an abnormal condition processing is stopped and all outputs are switched OFF This happens in the following cases e When the power supply module s over current or over voltage protection device is activated e When an error watchdog timer error etc is detected at the PC CPU by the self diagnosis function Some errors such as input output control errors cannot be detected by the PC CPU and there may be cases when all outputs are turned ON when such errors occur in order to ensure that the machine operates safely in such cases a failsafe circuit or mechanism should be provided outside the programmable controller Refer to the CPU module user s manual for an example of such a failsafe circuit 3 Outputs may become stuck at ON or OFF due to an outpu
120. nds data in word units from the data stored in DO to data up to 00H to the external device connected to RS 232C interface of the AJ71C21 S1 installed at I O numbers X Y020 to X YO3F is shown here MO turns ON on completion of instruction execution Ladder mode QZ Ml P 0 Tm R RR D Ki Sets once atter CPU RUN according to the communication data word unit designation SET mc m 2 3 HE G PR 2 DO w LD x21 ANI X20 ANI M10 TOP 4 tnwraoton Devic s 2 3 External device 53H S 1 4Cx L 434 C 45H E 41u A 1 5FH 4DH M 41H A MELSEC A INPUT2 INPUT4 MELSEC QnA 8 3 Receiving Data Instruction symbol INPUT2 INPUT4 INPUT2 INPUT4 Set Data Function External device Usable Devices MELSECNET 10 Special Direct J I Function Module Register VUOAGG Execution condition represents INPUT2 or INPUT4 Command n Ae Te eH Command es fun Head I O number of AJ71C021 S1 16 bit binary Permissible number st poelved data and aT of received d EA OoOo o Head number of device Head number of device storing received data received data Character Character string E2 Number of the bit device turning ON on completion of processing 1 Receives data from the external device connected to AJ71C21 S1 within the permissible range of data designated at n and stores it from the device number designated at D1 onwards When receive processing is completed au
121. nected to AJ71024 S3 S6 S8 and AJ71UC24 In this section AJ71C24 S3 S6 S8 and AJ71UC24 are collectively referred to as computer link module However this excludes descriptions requiring the model name The following table shows computer link module control instructions Sends designated number of data to PRN connected external device Seonon9 1 Data send Sends data up to 00H code to connected external device Reads data received from external Read communi Reads communication processing cations status SPBUSY status by instructions Section 9 9 4 Forced stop of Forcibly stops communication communication SPCLR Section 9 5 processing e processing with external device sco If instructions are executed with respect to a computer link module without the model name being registered in parameter setting the word byte designation and communication buffer memory area set ting are processed as if set with the following contents e No protoco word byte designation Only words allowable e No protoco send buffer memory area Only OH 7FH allowable e No protocol receive buffer memory area Only 80H FFH allowable e Received data length Up to CR LF code or 127 words Accordingly when the following settings are made for the computer link module the QnACPU writes and reads data ignoring the settings for the computer link module and so malfunctioning may occur e No protocol receive END code designation address 100
122. ng ge 00024 Clears Designates 0000H in remote STOP including latch Clear mode S2 3 1 Mode S2 2 contains data for the forced execution of remote RUN If it is not possible to forcibly execute remote RUN at the QnACPU whose status is being controlled because of trouble at the station requesting QnACPU remote STOP PAUSE or at external devices etc use other devices to forcibly conduct remote RUN 2 Clear mode S2 3 contains data for designating clear processing initialization of the QnACPU device memory at the start of QnACPU operations by remote RUN The QnACPU RUNS according to the parameter setting PC file setting device initial value after the designated clearance 10 52 REQ MELSEC QnA 2 Reading writing clock data Setting Detalis Setting Range Dataset By 0001H Read S2 System reading writing 0011H Write ee S2 1 Request content 0002H Read clock S2 Designates contents of request for system reading writing 0001H Write clock Change pattern Writing clock data Bits are turned ON in correspondence with the clock data written by S2 3 to S2 6 2 3 to S2 6 data that corresponds to ON bits is valid Reading clock data 2 2 to S2 6 does not require designation S2 2 b15 b b5 b4 b3 b2 bi bO 0001H to 007FH o A 1 bed i i changes o Bomolwho Rewok Does not change Changing month year last 2 digits S2 3 Upper 8 bits month 01H to 12H 0100
123. ng operation Failure to do so could result in electrical shocks Be sure to ground the FG and LG terminals carrying out at least class 3 grounding work with a ground exclusive to the PC Otherwise there will be a danger of electric shock and malfunctions Carry out wiring to the PC correctly checking the rated voltage and terminal arrangement of the product Using a power supply that does not conform to the rated voltage or carrying out wiring incorrectly will cause fire or failure Outputs from multiple power supply modules should not be connected in parallel Failure to do so could cause the power supply module to overheat resulting in a fire or module failure Tighten the terminal screws to the stipulated torque Loose screws will cause short circuits fire or malfunctions Make sure that no foreign matter such as chips or wiring offcuts gets inside the module It will cause fire failure or malfunction Connectors for external connections should be crimped pressure welded or soldered in the correct manner using the correct tools For details regarding crimping and pressure welding tools refer to the input output module user s manual A poor connection could cause shorts fire and erroneous operation Cautions on Startup and Maintenance e Do not touch terminals while the power is ON This will cause malfunctions Make sure that the battery is connected properly Do not attempt to charge or disassemble the bat
124. ni t 15 ns 01 D1 4 D1 2 D1 3 D1 4 D1 5 wae wee we 1 i 4 4 a 9 The remote terminal number designated in n2 is the number pre viously set in the initial data ROM for the corresponding AJU35PTF R2 The remote terminal number setting is conducted by the remote terminal data setting in the SWOSGP MINIP initial data setting 10 The bit device designated at D2 automatically turns ON on execu tion of the END instruction of the scan completing receive processing and turns OFF at the END instruction of the next scan Used as an execution completion flag for INPUT instructions 11 In AJ35PTF R2 data reception received data is kept until receive processing is conducted due to an INPUT instruction Accordingly external devices cannot transmit the next data to the same AJ35PTF R2 Communication with a remote terminal module connected to AJ71PT32 S3 can only be conducted when the AJ71PT32 S3 communications start signal Y n 28 is ON If the instructions are executed when the communications start signal Y n 28 is OFF no error occurs but the bit device set for use as a completion flag does not turn ON INPUT Operation Errors Program Example 1 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO When the range of number designated at n1 from the device number designated from D1 onwards exceeds the last device n
125. nstruction When cannot read within the WDT time repeats the read request S1 7 times Retransmission 10 secs Length of read data unit word S1 8 1 to 32767 1 to 32767 Designates number of words of data read from the device S1 9 1 to 480 designated at S2 S1 10 Not used ee oe Clock set flag 0 Invalid S1 11 When S1 is 0081H completion type for error is 1 the l Valid validity or invalidity of data from S1 12 to S1 15 is stored Yoar last 2 digits month when error occurred 1 12 Upper 8 bits year 00H to 99H 0001H to 9912H Lower 8 bits month 01H to 12h S1 13 Upper 8 bits day 01H to 31H 0100H to 3123H Lower 8 bits hour OOH to 23H Minute second when error occurred S1 14 Upper 8 bits minute OOH to 59 0000H to 5959H Lower 8 bits second 00H to 59H S1 15 Day of the week when error occurred Day of the week 0000H Sunday to 0006H Saturday soem 2 1 16 Error detected network number a o ee o 81 17 Error detected station number ae es eee ee e See the AJ71QC24 Serial Communication Module User s Manual Day hour when error occurred 10 34 READ Function Operation Errors 1 2 3 Stores data of word devices starting from that designated at S2 of the AJ71QC24 designated by the special function module station number in the control data to devices starting from that designated at D
126. nstruction so that there is arrival confirmation 2 Prepare contiguous areas with the following numbers of words for the word devices used with SEND instruction e S1 Control data storage device 18 words e S1 Send data storage first device S1 9 send data length designation 1 See the following manual for details about error codes at error end AJ71QC24 Serial Communication Module User s Manual O default 10 secs 1 to 32767 1 to 32767 seconds S1 8 10 43 SEND Function Operation Errors 1 Sends the data of word devices starting from that designated at S2 to 2 3 the designated channel in the AJ71QC24 designated by the special function module station number in the control data AJ71QC24 control instructions cannot be executed simultaneously in two or more places for the same channel of the same AJ71QC24 If the execution conditions come into effect simultaneously in 2 or more places subsequently executed AJ71QC24 control instructions must wait until a channel becomes available To use AJ71QC24 control instructions using the same channel in 2 or more places use the completion device in communication start commands and conduct sequential execution An interlock signal for use at execution of the SEND instruction can be established with the completion device D2 or the completion status indication device D2 1 a Host station completion device Turns ON at END proce
127. nstructions must wait until a channel becomes available To use AJ71QC24 control instructions using the same channel in 2 or more places use the completion device in communication start commands and conduct sequential execution An interlock signal for use at execution of the REQ instruction can be established with the completion device D2 or the completion status indication device D2 1 a Host station completion device Turns ON at END processing of scan completing reading due to the REQ instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on the status on completing REQ instructior e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing REQ instruction and turns OFF at next END processing Operation at execution of REQ instruction 1 END END END END processing processing processing processing Sequence _ OHO rene program REQ instruction execution End of receiving due to i Ji REQ instruction 1 t 1 REQ instruction 1 ON I Normal i completion H 1 scan i In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 con
128. nstructions using the same channel in 2 or more places use the completion device in communication start commands and conduct sequential execution An interlock signal for use at execution of the RECV instruction can be established with the completion device D2 or the completion status indication device D2 1 a Host station completion device Turns ON at END processing of scan completing the RECV instruction and turns Off at next END processing b Completion status indication device Turns ON OFF depending on status on ending RECV instruction e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan ending RECV instruction and turns OFF at next END processing Operation at execution of RECV instruction 1 END END END END processing processing processing processing Sequence SSS AS program RECV instruction execution End of receiving due to i a RECV instruction Ai Rey age i L RECV instruction Cc letion ees Se device Completion OFF Sovico In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the desi
129. number of retransmissions when data cannot be sent when S1 is 0001H 0081H execution type is 1 Send completion Stores number of retransmissions for normal completion and error completion S1 7 Arrival WDT time unit second Designates the WDT time until completion of execution of SEND instruction when S1 is 0001H 0081H execution type is 1 Retransmits S1 7 number of times when cannot send within the WDT time Length of send data unit word oe a e the number of send data designated at S2 Le 480 S1410 Notused sisi used Clock set flag 1 411 When S1 is 0080H 0081H error completion type is 1 Invalid S1 the validity or invalidity of data from 1 12 to 1 15 is Valid stored Year last 2 digits month when error occurred 1 12 Upper 8 bits year 00H to 99H 0001H to 9912H Lower 8 bits month 01H to 12H Day hour when error occurred S1 13 Upper 8 bits day 01H to 31H 0100H to 3123H Lower 8 bits hour OOH to 23H Minute second when error occurred S1 14 Uppers bits minute OOH to 59H 0000H to 5959H Lower 8 bits second 00H to 59H Day of the week when error occurred S1 415 Day of the week 0000H Sunday to 0006H Saturday 0000H to 0006H WER S1 16 Error detected network number E aa a S1 17 Error detected station number M Note 1 AJ71QC24 can only store the data sent by SEND instruction once Wherever possible execute the send i
130. o TO area setting capacity 1 x 2 bytes When PR instructions are executed for other than the AJ35PTF R2 Error code 4104 When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 When the designated instruction name is illegal Error code 4300 When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 When a non designatable device is designated Error code 4302 e PR HP ELS EC ONA Program Example 1 A program which when X0 turns ON sends the data between DO and OOH in word units to the external device connected to the AJ3SPTF R2 whose remote terminal No is 1 of the AJ71PT32 S3 which is installed at I O number X Y020 X Y04F is shown here MO turns ON at instruction execution completion Ladder mode Sets once after CPU RUN In the communication data word unit designation Turns ON the AJ71PT32 S3 communications start 55 8688 87 te 485 E 4DH M Remote terminal No 1 MELSECNETMINI eon tS ae oe sate us 43n C 45a E 32 52 AISSPTF R2 a e Sea badass Extemal device T sie MELSEC QnA 7 4 WNo Protocol Mode Data Receive MELSECNET 10 Direct JII Register Z Instruction Symbol Execution condition Command INPUT f Lcwpur wn m o 0 m Command INPUT F I a uw m o o n i eee
131. of Bytes PRN 9 2 9 2 No Protocol Mode Data Send Up until OOH Code PR ecixcavknca wes 9 6 9 3 No Protocol Mode Data Receive eee eee INPUT 05 3 5 504 9 10 9 4 Reading Communication Status 0 0c eee ee SPBUSY 9 15 9 5 Forced Cancellation of Communications Processing SPCLR 9 17 10 AJ71QC24 CONTROL INSTRUCTIONS 0c cece cree cecssencvecs 10 1 10 55 10 1 Writing User Registration Frame to EEPROM PUTE ibys 10 6 10 2 Reading User Registration Frame from EEPROM GETE 10 10 10 3 Data Send by Dedicated Protocol On Demand Function ONDEMAND 10 13 10 4 Sending Designated Number of Data in No Protocol Mode OUTPUT 10 16 10 5 Data Send Using Send Schedule Table in No Protocol Mode PRR 10 19 10 6 Data Receive in No Protocol Protocol 6 INPUT 10 22 10 7 Data Send of Designated Number of Data in Bidirectional Protocol 0 cece cee cee eee ees BIDOUT 10 25 10 8 Data Receive in Bidirectional Protocol BIDIN 10 28 10 9 Read Communications Status 0 ce ee eee SPBUSY 10 31 10 10 Reading Devices at Other Stations 8 READ 10 33 10 11 Writing to Other Station Devices 08 SWRITE 10 37 10 12 Sending Data to Other Stations 005 S
132. of ID interface module instruction devices is illegal error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which when XO is ON copies 5 words of data from channel 1 ID data carrier address 100 to channel 2 ID data carrier addresses 200 to 204 through an ID interface module installed at I O numbers X Y60 to X Y7F is shown here X V80 X Y7F ID controller ID data carrier A ID reader writer Ladder mode List mode w ea a See Ceen save P ees i IDCOPY1 Eo B 15 Eo Operation Completion of copying by IOCOPY 1 instruction Sequence program O D oe es Ara cia one 1 I Ly ON l t i i Execute command X0 m Mos Completion device MO Fe ea e i t Error 1 i JON _oompletion_ Completion status OFF i indication device M1 l 1 11 17 APPENDIX a eens NE SEC OnA APPENDIX APPENDIX 1 LIST OF PROCESSING TIMES 1 AD61 S1 control instructions ppvwes feet PVWR2 Sae a a ee SVWRI Saas a ae ee a ee a PVRD1 pe ae a a ee a ee PVRD2 ee ee 2 a 2 2 AD59 S1 control instructions 3 4 5 rBcharecters 196 102 s 96 characters 136 12 s mo emen a 98 characters 128 9 48 27 208 104 96 words 79 59 297 iwod 27 2 10 me ae a PS eae ieee ee oe AJ71PT32 S8 control instructions wetreuse T conden Tania am T a
133. of receive processing the bit device designated at D1 is automatically turned ON for one scan only nti b e Dd gt M 01 D1 1 External device C gt Cc 012 i D1 n on Stores 00H to D1 n 1 oniy when the pe number of received data 2 number of received data INPUT External device ABCDEFGHI 2 3 4 1 The G P INPUT command cannot be made into a pulse 2 Execute G P INPUT when I O signal read request is ON MELSEC QnA n n 1 15 permissible num ber of received data 9 number of received data b3 to w 7 t bo INPUT instructions automatically conduct ON OFF control of the com puter link module X n 1 request to read received data and Y n 11 read completion of received data in internal processing and so this control does not need to be conducted by the user 01 D1 1 D1 2 D1 3 D1 4 Byte designation 4 1H A to 49H 1 The number of data which can be received in one receive processing is as follows AJZ ICZ tanenin nnan Maximum 127 words Word units Maximum no protocol receive buffer memory lengthset value 1 words Byte units Maximum no protocol receive buffer memory length set value 1 x 2 bytes Set the following items when the computer link module data unit designation and buffer memory length are not used in power on set ting e No protocol word byte designation Power
134. omatically turns ON when the END instructions are run for the scan completing the send processing and turns OFF at the END instruction of the next scan Used as PRN instructions execution completion flag PRN Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the number of data designated at n exceeds the following range Error code 4100 ASTI 24 EREE pickin ieee 1 to 127 words Word units 1 to no protocol send buffer memory length set AJ71024 S3 S6 S8 value 1 words AJ71UC24 Byte units 1 to no protocol send buffer memory length set value 1 x 2 bytes e When the range of the number of data designated at n starting from the device number designated at S exceeds the last device number of the applicable device Error code 4101 e When the number of characters in the character string designated at S is smaller than the number of characters number of bytes designated at n Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When computer link module control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of computer link module contro instruction devices is illegal Error code 4301 e When a non designatable device is designated
135. onnected emeur _ un a o1 joz nH lto aJ71P32 S3 designated in Un and stores to word devices starting from the one INPUT whose number is designated 7 3 by D1 On Comp aron ne 7 processing the bit device semeur oniar lonioa ii designated in D2 is turned ON orn Junta s To eH al i 7 7 oper unjm s o jra f arr TH adhe es 7 7 11 err Jun seH Outputs the number of points designated in n1 of the data stored in word devices starting from the one whose number is designated in S to the AJSSPTF R2 designated by n2 and connected to the AJ71P32 S3 designated by Un On completion of the processing the bit device designated in D is turned ON Outputs the data up to the fore Teel TS1 H ger code stored from word device number after the one designated in S onward to the AJ35PTF R2 designated by n1 and connected to the AJ71P32 S3 designated by Un On completion of the corn Tula s H processing the bit device designated in D is turned ON 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS LD aa ka a a a AN a eS TE Se an Reads from storage in the J35PT32 R2 designated by Un data within the number of points designated by n1 and MELSEC QnA from a J35PT32 R2 and Instruction Execution Basie sup stores it in word devices from NPUT__ un nt os o2 n2 INPUT designated by D1 ce wputT Un nt
136. ons exceeds 32 an error occurs and no registering takes place 15 The status of registering to the communication request registration area can be confirmed by means of SM713 and SD713 SM7 isiin Turns ON when there is no registrable area in the communication request registration area and automatically turns OFF when there is a vacancy in the area SD 718 vice ccin devs seexdsas Stores the remaining number of registrations which can be made in the communication request registration area SM713 and D713 can be used in handshake signals when executing instructions 16 When instructions are executed with respect to remote terminal modules during communication processing is conducted for the same remote terminal module following completion of online processing 17 See the User s Manual for each remote terminal module conforming to MINI standard protocol for details about the method of use of MINI instructions and about the programming method Communication with a remote terminal module connected to AJ71PT32 S3 can only be conducted when the AJ71PT32 S3 commu nications start signal Y n 28 is ON If the instructions are executed when the communications start signal is OFF no error occurs however the bit device set for use as a com pletion flag will not turn ON MINI Operation Errors 1 In the following cases an operation errors occurs the error flag SMO turns ON and the error code is stored in SDO e Whe
137. ontrol instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AD59 S1 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 PR Program Example 1 The following is an example program which when XO turns ON outputs decimal values stored in D10 as characters to a printer connected to AD59 installed at O numbers X Y080 to X YO9F M1 turns ON on completion of execution of the instructions Ladder mode x Designation of total number of digits in character string conversion Designation of total number of digits in the fraction part in character string conversion Converts the D10 BIN data to character string and stores it from D20 onwards List mode 0 LD x0 1 MOV 16 DO 3 Mov KO Di 5 STR DO DIO D20 9 G PR U8 D20 Mi 15 END 31n 1 1 20H Space 33 3 32 2 35 5 1 34 4 GET MELSEC QnA 6 3 Reading Data from Memory Card Usable Devices Internal Device MELSECNET 10 Special System User File Direct JINI Function Register Module instruction symbol Execution condition Command ane e ee d n ojm Command f eer j n o om fT aah a egaa Elena Lo re anon eves sorna tt ees ooreo ane Function 1 Reads n words of data from the address number designated at S of the memory ca
138. or completion the completion status indication device D 1 also turns ON for one scan 4 IDAWD1 instructions are executed with respect to ID interface module channel 1 and IDAWD2 instructions with respect to channel 2 5 There is no operation when the value designated at n2 is 0 6 Error completion occurs when the address designated at n1 or the number of data designated at n2 exceeds the permissible range for the ID data carrier 11 10 IDAWD1 IDAWD2 Operation Errore 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the number of points n2 from the device number designated at S exceeds the applicable device Error code 4101 e When the value designated at n2 is outside the range 0 to 3900 Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of ID interface module instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which when XO turns ON waits for the ID data carrier to enter the communication range reads 5 words of data from ID data carrier address 100 and stores the data from DO onwards i
139. r D1 First number of device storing data to be read oe Number of read data 0 to 3900 16 bit binary Number of the bit device turning ON after D2 execution completed at error completion D2 1 also turns ON Function 1 Reads the number of data designated at n2 from the address designated at ID data carrier n1 through the ID interface designated by the head I O number and stores data from the device designated at D1 onwards 2 After reading is completed when the END instruction is executed for the scan completing the instruction the bit device designated at D2 is turned ON and automatically turns OFF after one scan At error completion the completion status indication device D2 1 also turns ON for one scan 3 IDRD1 instructions are executed in ID interface module channel 1 and IDRD2 instructions in ID interface module channel 2 4 There is no operation when the value designated at n2 is 0 5 Error completion occurs when the address designated at n1 or the number of data designated at n2 exceeds the permissible range for the ID data carrier 11 4 IDRD1 IDRD2 Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the number of points n2 from the device number designated at D1 exceeds the applicable device Error code 4101 e When the value designated at n2 is outside the range 0 to 3900 Error code 4100
140. r code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instruction cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 A program which when X30 turns ON sends data byte designation stored in D10 D14 from channel 2 is shown here Control data is set in DO to D2 Ladder mode List mode 0 WD no 1 MOVP r DO 4 MOP pae 7 GP ONDEMAND vo DO D10 Mo 17 BD 10 15 PUT See i MELSEC QnA 10 4 Sending Designated Number of Data in No Protocol Mode Usable Devices Internal Device MELSECNET 10 Special System User Direct J I Function Module USNG IS Index Register Zn Instruction Symbol Execution condition Command OUTPUT f i eour un sy j a o Command OUTPUT A opoureut uw j st a o Set data Un AJ71Q024 head 1 0 number 16 bit binary st First device number of devices storing control data Device name First device number of devices storing send data D Number of the bit device turning ON at execution completion Control data Setting Range e Sets the send channel S1 0 Send channel 1 Channel 1 2 Channel 2 e Stores result of sending i OUTPUT instruction S1 1 Se
141. ration Errors 2 AD59 S1 initial setting takes place automatically during CPU RUN 3 Character data stored from the device number designated at S and onwards is set using ASCII codes 00H to FFH 4 The maximum number of characters that can be output at one time is 1024 characters 5 The bit device designated at D automatically turns ON on execution of the END instruction of the scan completing the character output processing and turns OFF at the END instruction of the next scan It is processed as a PR instruction execution completion flag 6 Processing of output to the printer by PR instructions is conducted in byte units Character data stored from the device number designated at S onwards is automatically rearranged so that it can be processed in byte units 7 PR instructions can only be executed when AD59 S1 X n 4 FIFO memory empty is ON If PR instructions are executed when X n 4 is OFF there is no operation The bit device designated at D will also not turn ON 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the output number of characters exceeds 1024 or when there are 0 characters Error code 4100 e When 00H is not stored between the first and last number of the device designated at S Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AD59 S1 c
142. ration Errors E 7 S 1 in the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO io When the module attempting access is not a special function module Error code 2110 When dedicated instructioris cannot be used for the designated module Error code 2112 When the designated instruction name is illegal i 3 Error code 4300 When the number of AD61 S1 control instruction devices is illegal Error code 4301 When a non designatable device is designated Error code 4302 Program Example __ _ 8 1 The following is an example program which when XO is ON writes the preset data of DO and D1 to the buffer memory for channel 1 of the ADG1 installed at VO numbers X Y020 to X Y03F Ladder mode f List model tte we mH sae memen twin I ena oes le ee Cite ak 5 ni N Bo ae a r w a 8 W AD61 buffer memory ees 4 Indicates the expressions and instruction execution conditions in the ladder mode Executed Once at OFF to ON 3 Execution Condition Executed while ON Symbol used on the l i 4 HOW TO READ EXPLANATIONS FOR INSTRUCTIONS MELSEC QnA 5 Explains the set data for each instruction and indicates the data type Bit indicates that bit data or the first number of bit data can be used 16 bit binary eae binary 16 bit data or the first number of word devices 2 Indicates that binary
143. rd installed in AD59 S1 and stores it from the device number designated at D onwards AD59 memory card address 9 First address i s 1 Designated Designated address Designated ares fret address 0 D 1 n words ce OM 8 28 s s 1 Memory card address n o aR area number ZY L 07 O oe 14H 3 1271 B3214 When n 5 words C gt 0 2 8321n 1264 Foo s Foo O 12 oss yee __1035H GET arm NRL SEC On A Operation Errors 2 3 4 5 1 In reading the memory card data by GET instructions area switching by the AD59 S1 I O signal Y n 10 Y n 11 ON OFF control is conducted automatically by internal processing and so the user does not need to conduct area switching The first address number designated at S is within the range 0 to FFFH The area number designated at S 1 is within the range 0 to 3 The number of words designated at n is within the range 1 to 4096 However reading from multiple areas is not possible In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the first address number designated at S exceeds the range 0 to FFFH Error code 4100 e When the area number used at S 1 exceeds the range 0 to 3 Error code 4100 e When the number of words designated at S exceeds the range 1 to 4096 Error code 4100 e When the range of number of words designa
144. ring send data Number of the bit device turning ON at execution completion Control data e Sets the send channel 1 Channel 1 2 Channel 2 e Stores result of send by BIDOUT instruction Send channel S 1 o Normal other than O Error code S 2 Number of send data e Sets number of data to send ate pe 1 1 See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 2 When bytes designated sets number of bytes when words designated sets number of words in AJ71QC24 3 The meanings of the entries in the set by column in the table above are as follows e User Data set by the user before executing BIDOUT instruction e System Result of BIDOUT instruction execution stored by QnACPU ti 10 25 BIDOUT Function Operation Errors 1 2 3 Sends data stored from the device designated at S2 onwards in bidirectional protocol of AJ71QC24 designated at Un in accordance with control data of the devices starting from the one designated at S1 The following instructions cannot be simultaneously executed in channels executing BIDOUT instructions e OUTPUT instructions e ONDEMAND instructions e PRR instructions e Other BIDOUT instructions If an attempt is made to execute any of the instructions above while a BIDOUT instruction is being executed the system waits until the BIDOUT instruction being executed
145. rom the device number designated at D1 onwards 7 The data or device number designated at S designates the data writ ten to the remote terminal module as well as the first number of the device storing data written to the remote terminal module If a constant is designated the designated value is written to the des ignated address number of the remote terminal module onwards in the number of points designated in n3 When a device number is designated the data stored from the desig nated device number onwards within the range of points designated at n3 is written to the designated address number and onwards of the remote terminal module 8 The number of points designated at n3 dedignates the number of points for which reading writing is to be performed QnACPU 9 The bit device designated at D2 is used as a communications processing completion flag Automatically turns ON on execution of the END instruction for the scan completing the communication processing with the applicable remote terminal module and automatically turns OFF at the END instruction of the next scan Flow of the OSTEP END OSTEP END OSTEP END OSTEP END OSTEP sequence bee program i Communica Communica i Device number 4 Lene sat tions end f designated in D2 OFF 10 Items designated at D3 are meaningless no operation dummy information so set any output device number Communication processing by MINI instructions
146. ror code Designation 1000 to 1 2 Sets user registration frame number 1 3 ponies bytes Sets number of bytes of user registration frame 1 See the following manual for details of error codes for faults AJ71QC24 Serial Communication Module User s Manual 2 The meanings of the entries in the set by column in the table above are as follows User Data set by the user before executing PUTE instruction System Result of PUTE instruction execution stored by QnACPU S1 1 10 6 PUTE ao SRE rare E ETE Mie Si CoCr A Function 1 2 3 4 Registration and deletion of user registration frame are conducted in the AJ71QC24 designated at Un Registering user registration frame a When registering the user registration frame makes the device designated at S1 1 1 When the device designated at S1 1 is 1 data from the device designated at S2 onwards is registered in accordance with the control data designated at S2 b The registration data is stored in 2 byte sections from the device designated at S2 onwards Therefore devices storing registration data must comprise number of registered data 2 points from the device designated at S2 For example when registering 6 bytes of data 3 points from the device designated at S2 are required QnACPU AJ71QC24 User registration frame Registration Registration byte length yt Deleting user registration frame
147. ror code 4302 10 44 SEND Program Example A program which transmits data to the AJ71QC24 whose special function module station number is 2 is shown here Request Send to send command MO Sets S1 execution type error completion type eee Sets channel CH2 used by S1 2 host station mov k2 Jos Sets S1 3 target station storage channel CH2 Fmovj Ko D4 k2 H Sets S1 4 to S1 5 Mov kz 06 H Sets S1 6 special function module station number target station AJ71QC24 Sets S1 7 number of retransmissions 5 times mov k2 08 H Sets S1 8 arrival WOT time 2 seconds Sets S1 9 send data length 4 words Ser Mo Send AJ71Q com Global C24 WDT mand signal ready error MO XIB XIE XIF HHH SEND instruction execute X1B is a signal used with respect to external devices to enable use of the line Set control data Sets send command flag eee wwe wn wm wwe ew wm eww wwe me eee www wee we ww meme ew em ee ee wee Takes corrective action according to error code of D1 OE i tg a yj ee eo A storing S1 1 completed status M2 turns ON OFF depending on normal operation end error end of SEND instruction M1 turns ON for only 1 scan at completion of execution of SEND instructions 10 45 RECV MELSEC QnA 10 13 Receiving Data from Other Stations MELSECNET 10 Direct Jii Index Register Z Instruction Symbol Execution condition Command
148. s Not necessary to set clock data when error occurs in 1 11 to S1 15 1 Necessary to set the clock when error occurs Necessary to set clock data when error occurs in S1 11 to S1 15 Clock data controlled by error detection station Completion status 0 Normal end Other than O Error end Channel used by host station S1 1 S1 2 Designates host station AJ71QC24 interface sending the request 1 3 Target station I O signal S1 4 Target station network number S1 5 Target station number Special function module station number Designates target station AJ71QC24 station number 0 to 31 when sending request to target station 1 Number of retransmissions Read write request Designates the number of times to retransmit the request when cannot read write Read write completed Stores number of retransmissions for normal completion and error completion Arrival WDT time unit second Designates WDT time untii completion of execution of REQ instruction Repeats transmission of request S1 7 number of times when cannot receive response within the WDT time Retransmission 0 default 10 secs 1 to 32787 1 to 32767 seconds Length of received data unit word When reading clock data stores the number of words of data written in the device designated at D1 When writing clock data designates S1
149. s gnores 0 1 P status of Receiving by INPUT2 instructions Sending by PRN4 and PR4 instructions each bit Receiving by INPUT4 instructions RAM memory accessing by GET and PUT instructions b15 b0 yes torn rt satus ot eaen bh 3 When processing is cancelled the completion flag designated bit device for the instruction corresponding to the cancellation does not turn ON SPCLR Operetion Errore 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which when XO turns ON stops PR2 instructions or PRN2 instructions which are being executed at the AJ71C21 S1 installed at I O numbers X Y020 to X YO3F is shown here Ladder mode Designates 1 in the 0 bit MEMO 9 COMPUTER LINK MODULE CONTROL INSTRUCTIONS eR E FH SeC Gn A 9 COMPUTER LINK MODULE CONTROL INSTRUCTIONS Computer link module control instructions are instructions for conducting data communications in no protocol mode with external devices con
150. s are executed the AD61 S1 may not operate normally pur wits data to AJ71C021 S1 RAM Writes aata to A171021 51 RAM memory Seaton s s 8 5 2 GET instructions and PUT instructions cannot be used for AJ71C21 Due to lack of RAM memory When the module model name is registered an error occurs and there is no operation When the module model name is not registered instructions are executed but have no effect on control PRN4 Bait MELSEC QnA 8 1 Sending Designated Number of Bytes of Data Interna Device MELSECNET 10 System User Direct JINS S Instruction symbol Execution condition _ represents PRN2 or PRN4 PRN2 PRN4 m na 5S cen ETC o Command PRN2 PRN4 A S ere Tete eH o Set Data SetData Desoription Data Type un Head 1 0 number of AJ71C21 S1 16 bit binary Se Number of send data words or bytes First device number of devices Number of the bit device turning ON on completion of processing Function 1 Sends to the external device connected to AJ71C21 S1 n number of bytes words of data stored from the device number designated at S onwards When send processing is completed automatically turns ON the bit device designated at D after only 1 scan In the send processing the target interfaces differs according to the instructions used PRN2 RS 232C interface PRN4 RS 422 interface b15 bBb7 bO s S 1 ma Ce n bytes n words gt
151. s is illegal Error code 4301 e When a non designatable device is designated Error code 4302 alia MELSEC QnA 7 6 Remote Terminal Module Error Reset Internal Device MELSECNET 10 Special System User Direct JEUNG Function Module Index Register Instruction Symbol Execution condition Command NINIERA M Com n Command Function 1 Resets the error detected status for AJ71PT32 S3 remote terminal module 2 By the error detected status reset automatically turns ON the AJ71PT32 S3 1 0 number remote terminal module error detected reset signal Y24 When error detected status reset is completed automatically turns OFF the error detected reset signal Y24 Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A program which resets the remote terminal error detection of the AJ71PT32 S3 installed in 1 O number X Y020 X Y04F is shown here Ladder mode List mode Aeon struct
152. s shown here X Y60 X Y7F 1D data carrier a ernn i B IDAWD2 i hg is mo 13 BD Operation Completion of reading by IDAWD2 instruction 0 END 0 END 0 END 0 END Sequence program pemean Execute command X0 or ee ee es an Completion device M0 _ Completion status OFF i Normal compietion 4 1 scan indication device M1 11 11 IDCMP1 IDCMP2 MELSEC QnA 116 Data Comparison with ID Data Carrier Internal Device MELSECNET 10 Spec System User Direct JN Function Module Instruction symbol Execution condition C represents 1 or 2 Command IDCMP1 IDCMP2 nN Ls Poort gt o Command IDCMP1 IDCMP2 in Pocu Jj w m m oj o Head I O number of ID controller 16 bit binary a ee First address of ID data carrier First device number of devices storing D1 comparison data a o Number of comparison data 0 to 3900 16 bit binary Number of bit device turning ON at execution D2 completion at error completion D 1 also turns ON Function 1 Writes n2 points of data from the device designated at S to the ID data carrier address designated at n1 through the ID interface module designated by the head I O number 2 Error completion occurs if the result of the comparison shows inconsistent data 3 When data comparison is completed at the END instruction execution of the scan completing the instruction the bit device designated at
153. ses es Tete yH AJ71PTS2 S3 head I O number 16 bit binary pont Number of send data words or bytes Head number of device storing send data Character string D Number of the bit device turning ON on completion of processing one Remote terminal number of AUSSPTF R2 sending data 16 bit binary Set Data Function 1 Transmits data in no protocol mode from AJ71PT32 S3 remote termi nal No n2 AJ35PTF R2 to external device The transmitted data is set in n1 number of points from the device number designated at S onwards When send processing is completed automatically turns ON the bit device designated at D after only 1 scan biS to b b7 to bo S S 1 S 2 nt poins C gt huyt C AJ35PTF R2 C gt External device 32 83 i MELSEC 1 NET MINI S3 data S n link system Remote terminal No n2 PRN MELSEC QnA When n1 9bytes bib to bb fe bo S ee em LT S 1 to aadi A1HW A t0 49H N S 2 niw bytes CO WP mee AJ3SPTF R2 S 3 48H H i amm 6 3283 NETMINI S3 S 4 l data link system External device ABCDEFGHI 2 In send processing by the PRN instruction writing of transmission data to AJ71PT32 S3 buffer memory and ON OFF processing of I O signal request to send send completion are conducted automatically by internal processing so do not need to be conducted by the user 3 The number of data designated at ni can be set within the following ran
154. signation of total number of digits in the fraction part in character string conversion Converts the D10 BIN data to character string and stores it from D20 onwards List mode 0 X0 ID 1 wv K6 DO 3 Mov KO D1 5 STR DO D10 D20 9 G PRN u8 K5 D20 M 18 END biS b8b7 bO D10 12345 D20 314 1 2DW 334 3 32 2 Not output because only n rm 5 characters 1234 PR MELSEC QnA 6 2 Sending to the Printer Characters up to 00H Code Internal Device MELSECNET 10 Special System User Direct JINI Function Module UKG Instruction symbol Execution condition Command Fi er om ts Command T r o j AD59 S1 head I O number 16 bit binary De Sag of device storing characters to Character string Number of the bit device turning ON at execution completion 1 Sends to the printer connected to AD59 S1 characters from the device number designated in S to the number of the device storing 00H When output processing is completed the bit device designated at D automatically turns ON after only 1 scan b15 b8b7 bO Set Data Function Shows the end of the character string The situation when the characters ABCDE stored in D200 to D202 are sent to the printer is shown below b15 bBb7 bO S 42H B 41H A ABCDE S 1 44H D 1 43H C 2 Shows the end of the character PR a Mm SECCnA Ope
155. sing Details xecuton Number erpe Outputs the data aT ETH ot pains deat to the number of points designated by n emn Tues TsO H stored in word devices starting from the one whose number is designated by S from the RS 2382C RS 422 interface of the AJ71024 S3 S6 S8 AJ71UC24 designated by Un open Jonn sH the no protocol mode ern Turf s To On completion of the output the bit device designated in oe D is turned ON Outputs up to the OOW code data stored in word devices from the one designated by S from the RS 232C RS 422 intertace of the AJ71C24 S3 S6 S8 AJ71UC24 designated by Un in the no protocol mode On completion of the output the bit device designated in D is turned ON Receives the data sent to the RS 232C RS 422 interface of the AJ71024 S3 S6 8 AJ71UC24 designated by Un in the no protocol mode and stores it in the number of points designated by D2 of word devices starting from the one whose number is designated by D1 On completion of the processing the bit device designated in D is turned ON arr unjn s 0 amput _ un n o1 02 Receiving data INPUT _cp weut fun a jos 02 aspusy un 0 SPBUSY tion status Stores the send receive processing status of the AJ71024 S3 S6 S8 AJ71UC24 designated by Un to the word device number designated in D Forcibly stops send receive
156. ssing of scan completing reading due to the SEND instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on the status on completing SEND instruction e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing SEND instruction and turns OFF at next END processing Operation at execution of SEND instruction 1 END END ENO END processing _ processing processing processing processing Sequence meee program SEND Instruction execution vag Completion of sending by i I instru DE nea a t Li Li RECV instruction ines s Aes H i ompietion eee device i l rror i i JON completion _ Completion OFF i L eT i status indicatio cate a a oT device 1 1 i 0 i I 1 completion i L 1 scan h a 4 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the controi data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 When the designated instruction name is illegal Error code 4300 When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Er
157. t END processing of scan completing OUTPUT and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on status at time of completion of OUTPUT instruction e Normal completion Stays OFF no change e Error completion Turn ON at END processing of scan completing OUTPUT instruction and turns OFF at next END processing Operation at execution of OUTPUT instruction END END END END processing processing processing processing Sequence A program OUTPUT End of sending due to i instruction i OUTPUT instruction execution OUTPUT instruction Completion OFF i device E eee me ween we Completion f status indication vice i l ormal t i i completion l 1 scan 1 b_i V i 10 17 OUTPUT EEE enema hii SECA Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 Program Example 1 A progr
158. t by the user before executing PRR instruction e System Result of PRR instruction execution stored by QnACPU 10 19 PRR oS SR EE eames Wi SEC OnA Function Operation Errors 1 2 3 Sets the control data stored from the device designated at S onwards and sends it in accordance with the AJ71QC24 schedule table to the AJ71QC24 designated at Un in the no protocol mode The following instructions cannot be simultaneously executed in channels executing PRR instructions e OUTPUT instructions e ONDEMAND instructions e Other PRR instructions e BIDOUT instructions If an attempt is made to execute any of the above instructions while a PRR instruction is being executed the system waits until the PRR instruction being executed is completed Normal error completion of PRR instructions can be confirmed by means of the completion device D or completion status indication device D 1 a Completion device Tums ON at END processing of scan completing PRR instruction and turns OFF at next END processing b Completion status indication device Turns ON OFF depending on status at completion of PRR instruction e Normal completion Stays OFF no change e Error completion Turns ON at END processing of scan completing PRR instruction and turns OFF at next END processing Operation at execution of PRR instruction 1 END END END EN processing processing processing processing Sequence pro
159. t module relay or transistor failure An external circuit should therefore be provided to monitor output signals whose incorrect operation could cause serious accidents A circuit should be installed which permits the external power supply to be switched ON only after the programmable controller power has been switched ON Accidents caused by erroneous outputs and motion could result if the external power supply is switched ON first When a data link communication error occurs the status shown below will be established at the faulty station In order to ensure that the system operates safely at such times an interlock circuit should be provided in the sequence program using the communication status information Erroneous outputs and operation could result in an accident 1 The data link data which existed prior to the error will be held 2 All outputs will be switched OFF at MELSECNET il B 10 remote I O stations 3 At the MELSECNET MINI S3 remote I O stations all outputs will be switched OFF or output statuses will be held depending on the E C mode setting For details on procedures for checking faulty stations and for operation statuses when such errors occur refer to the appropriate data link manual System Design Precautions e Do not bundle control lines or communication wires together with main circuit or power lines or lay them close to these lines As a guide separate the lines by a distance of at least
160. talled memory card Section 6 3 writing to memory card Writes data to installed memory card Section 6 4 1 When sending character data to the printer for the AD59 S1 the initial setting does not need to be made in the user program because the initial setting for the AD59 S1 is automatically conducted when the PC CPU is set to RUN 2 In the initial setting for the AD59 S1 set output to the printer in byte units Do not change this setting to word units in the user program If the user changes the printer output unit from byte to word units it may not be possible to output normal data to the printer when executing PRN and PR instructions Send character data to printer PRN MELSEC QnA 6 1 Sending to the Printer any Number of Character Data Usable Devices MELSECNET 10 Special Direct JUNI Function Instruction symbol Execution condition Command ae o ern w j ajojo Command 2 PRN j n f n dojo AD59 S1 head I O number Number of characters to be output no of 19 bit binary bytes a S of device storing characters to Character string D Number of the bit device turning ON at D execution completion Function 1 Sends to the printer connected to AD59 S1 n number of characters no of bytes stored from the device number designated at S onwards When output processing is completed the bit device designated at D automatically turns ON after only 1 scan
161. ted at n from first address number designated at S exceeds the FFFH address Error code 4100 e When the range of number of words designated at n from the device number designated at D exceeds the last device number of the applicable device Error code 4101 e When the module attempting access is not a special function module Error code 2110 e When AD59 S1 control instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AD59 S1 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 PR MELSEC QnA Program Example 1 The following is an example program which when XO turns ON stores data from addresses OH to D4H of memory card area number 1 of the AD59 installed at 1 O numbers X Y020 to X YOSF to DO to D4 Ladder mode x0 0 mov FO D10 Designates first address MV Of Dil Designates area number G T v2 D10 DI DO 0 LO xo 1 MOV K6 DO 3 MOV KO D1 5 STR DO D10 D20 9 G PR U8 D20 M1 15 END D10 first adress on td area number Memory card area 1 itl MELSEC QnA 6 4 Writing Data to a Memory Card Internal Device MELSECNET 10 Special System User Direct JENG Function Module Index Register Instruction symbol Execution condition Command PUT M E a a Command i F emn a
162. ted at n2 through the ID interface module designated by the head I O number Function 2 When copying between ID data carriers is completed at the END instruction execution of the scan completing the instruction the bit device designated at D turns ON and automatically turns OFF after one scan At error completion the completion status indication device D 1 also turns ON for 1 scan 3 The IDCOPY1 instruction copies from ID interface module channel 1 to channel 2 and the IDCOPY2 instruction copies from channel 2 to channel 1 4 There is no operation when the value designated at n2 is 0 5 Error completion occurs when the addresses designated at n1 and n2 or the number of data designated at n3 exceeds the permissible designation range for the ID data carrier 6 Because these instructions use both channels 1 and 2 error completion occurs when there is only 1 channel 11 16 IDCOPY1 IDCOPY2 Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e Waan the value designated at n2 is outside the range 0 to 3900 Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When the ID interface module control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number
163. tery do not heat the battery or place it in a flame and do not short or solder the battery Incorrect handling of the battery can cause battery heat generation and ruptures which could result in fire or injury Switch the power off before cleaning or re tightening terminal screws Carrying out this work while the power is ON will cause failure or malfunction of the module In order to ensure safe operation read the manual carefully to acquaint yourself with procedures for program changes forced outputs RUN STOP and PAUSE operations etc while operation is in progress Incorrect operation could result in machine failure and injury Do not disassembie or modify any module This will cause failure malfunction injuries or fire Switch the power OFF before mounting or removing the module Mounting or removing it with the power ON can cause failure or malfunction of the module When replacing fuses be sure to use the prescribed fuse A fuse of the wrong capacity could cause a fire Cautions on Disposal N CAUTION e Dispose of this product as industrial waste INTRODUCTION Thank you for choosing the Mitsubishi MELSEC QnA Series of General Purpose Programmable Controllers Please read this manual carefully so that the equipment is used to its optimum A copy of this manual should be forwarded to the end User GENERAL DESCRIPTION ccsccceccccunccuccececvcssseces 1 1 Related Programming Manuals 0
164. the RS 422 interface of the AJ71021 S1 designated by INPUT4 Un in the no protocol mode in word devices starting from the one designated in D1 On completion of the cp NPUT4 un n D1 02 4 processing the bit device f teal in D2 is turned Reads data corresponding to the number of points designated by n stored from the address designated by S of the RAM memory of the AJ71021 S1 designated by Un and stores this data in word devices from the one whose number is designated by D1 On completion of the processing the bit device ies in D2 is turned ON Reads data corresponding to the number of points designated in n stored in word devices starting from the one whose number is designated by S2 and writes this data to the RAM memory of the AJ71C21 S1 designated in Un at the addresses from the one designated in S1 On completion of the processing the bit device aad in D2 is turned esr efe SPBUSY SPCLR esre Tur 5 Stores the processing status of the AJ71C021 S1 designated by Un to the word device number designated in Reading communica tion status Forced stop of communi cation processing Forcibly Stops the processing of the AJ71021 S1 designated by Un 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTION ee MELSEC QnA d Computer link module control instructions category geet Symbol Proces
165. the next scan Used as an execution completion flag for PRN instructions Communication with a remote terminal module connected to AJ71PT32 S3 can only be conducted when the AJ71PT32 S3 communications start signal Y n 28 is ON lf the instruction is executed when the communications start signal Y28 is OFF no error occurs but the bit device set for use as a completion flag will not turn ON In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the number of data designated at n1 exceeds the following range Error code 4100 Word unit 1 to TO area setting capacity 1 words Byte unit 1 to TO area setting capacity 1 x 2 bytes When the range of number of data designated at n1 from the device number designated at S onwards exceeds the last device number of the applicable device Error code 4101 When PRN instructions are executed for other than the AJ35PTF R2 Error code 4104 When the character string designated at S is smaller than the character string designated at n Error code 4100 When the module attempting access is not a special function module Error code 2110 When AJ71PT32 S3 control instructions cannot be used for the designated module Error code 2112 PRN Program Example e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction
166. the operation box corresponding to the remote terminal number designated at n2 and stores it from the device number designated at D1 onwards When the fetching and processing of the key operation status is completed the bit device designated at D2 is automatically turned ON after only 1 scan nt Permissible number of received data Set Data Remote terminal No n2 N MELSECNET biS to b8 b7 to bO MINI S3 det Operation box Mren as a D1 james wrrr CO D1 1 AJ35PT OPB M1 32 53 D1 2 The key input data sa of the operation box e Sets permissible number of received data to stored in 3 words 3 and above See 3 e 3 stored for number of received data 1 G P INPUT cannot be made into a pulse signal 2 Execute G P INPUT when I O signal read request is ON INPUT 2 3 4 In receive processing by INPUT instructions the reading of data re ceived in the AJ71PT32 S3 buffer memory and 1 O signal read re quest and read completed ON OFF processing is conducted automatically by internal processing so the user does not need to con duct ON OFF control of the I O signals As shown below in the key input data from the operation box the status of each key in the operation box corresponds to a bit of the word data and all the information is stored in 3 words Operation panel Me Vite Bitte Sie ile Stim Silt Tite 8 er ee Na UD Coble 11 ii
167. ther it is greater smaller or equal to it The set value writes data directly to the AD61 S1 buffer memory The channel and buffer memory address for writing the set value differ according to the instructions used instruction Write Channel Write Buffer Memory Address swat ot r O swe 2 eS AD61 buffer memo Execution condition Set Data Function Address SVWR1 instructions 6 S 1 a aa higher bits lower bits Tacit data SVWR2 instructions 2 In the writing of set values by SVWR1 and SVWR2 instructions the ON OFF control of the AD61 S1 match signal reset commands Y n 10 Y n 17 and match signal output enable Y n 12 Y n 19 are conducted automatically by internal processing The user does not need to conduct the ON OFF controi of the match signal reset command and enable signal output enable 3 The preset value designated at S and S 1 is within the range 0 to 16777215 SVWR1 SVWR2 Operation Errors 1 In the following cases an operation error occurs the error flag SM0 turns ON and the error code is stored in SDO e When the module attempting access is not a special function module Error code 2110 e When AD61 S1 control instructions cannot be used for the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AD61 S1 control instruction devices is illegal Error code 430
168. to AJ71P32 S3 designated in Un and stores to word devices starting from the one INPUT whose number is designated by 01 t copeer uate sala pee completion of the cp weut un at o1 02 n2 processing the bit device Sapa in D2 is turned 1 2 3 4 5 6 7 8 Outputs the number of points designated in n1 of the data stored in word devices starting trom the one whose number is designated in S to the AJ35PTF R2 designated by n2 and connected to the AJ71P32 S3 designated by Un On completion of the processing the bit device designated in D is turned ON 1 Classifies the instructions according to their purpose 2 aire Indicates the code used to enter the instruction in a program Iolss Shows symbol displayed in the ladder Co eee Indicates the type of processing that is performed by individual instructions 2 LIST OF SPECIAL FUNCTION MODULE INSTRUCTIONS MELSEC QnA BS ceases The detailed conditions for the execution of individual instructions are as follows Executed during ON instruction is executed only while the precondition is ON If the precondition is OFF the instruction is not executed and no processing is conducted Executed once at ON instruction executed only at leading edge when precondition goes from OFF to ON Following execution instruction will not be executed and no processing conducted even if condition remains ON
169. to write destination station Error completion type bit 7 0 Not necessary to set the clock when error occurs Not necessary to set clock data when error occurs in S1 11 to S1 18 1 Necessary to set the clock when error occurs Necessary to set clock data when error occurs in S1 11 to S1 15 Clock data controtled by error detection station 10 37 SWRITE MELSEC QnA Setting Range Data Set By ae Target Station 1 Usor System S1 1 Completion status o Normal end Other than O Error completion Channel used by host station Designates interface of host station AJ71QC24 sending request to write Not used S1 4 Target station network number S1 5 S1 2 Target station number Special function module station number S1 6 Designates the target station AJ71QC24 station number 0 to 31 when writing to target station 1 Number of retransmissions Write request Designates the number of retransmissions when data cannot be written when S1 is 0001H 0081H execution type is 1 Write completed Stores number of retransmissions for normal completion and error completion Arrival WDT time unit second Designates WDT time until end of execution of SWRITE instruction when S1 is 0001H 0081H execution type is 1 When data cannot be written within the WDT time the write request is repeated S1 7 times Retransmission 1 7
170. tomatically turns ON bit device designated at D2 after only 1 scan n Permissible number of received data n 1 Number of received data b15 b8b7 D1 D1 1 INPUT 2 instructions 01 A INPUT 4 instructions a D1 n 1 Only if permissible number of receive data number of receive data OOH is stored in D1 n 1 INPUT2 INPUT4 MELSEC QnA External device ABCDEFGH 2 3 4 fe 1 The G P INPUT command cannot be made Into a pulse 2 Execute G P INPUT when I O signal read request is ON b15 b8 amp b7 bO D1 D1 1 D1 2 71021 s1 Byte INPUT 2 and INPUT 4 instructions automatically conduct ON OFF control of AJ71C21 S1 X n 3 X n 8 request to read received data Y n 3 Y n 8 received data read completed by internal processing and so the control does not need to be conducted by the user The number of data that can be received by one receive processing is as shown below Word unit eee 1 to no protocol receive buffer memory length set value 1 words 1 to no protocol receive buffer memory length set value 1 x 2 bytes Set the following items when the AJ71C21 S1 data unit designation and buffer memory length are not used in the settings at power on e No protocol word byte designation Power on words e No protocol receive buffer memory first address designation Power on RS 232C 0H RS 422 100H e No protoco receive b
171. trol instructions cannot be used with the designated module Error code 2112 When the designated instruction name is illegal Error code 4300 When the number of AJ71QC24 control instruction devices is illegal Error code 4301 When a non designatable device is designated Error code 4302 10 54 REQ Program Example A program which remote STOPS the AJ71QC24 whose special function module station number is 2 in a multidrop system is shown here Control Control request command MO Set control data Sets channel CH2 used by S1 2 host station Sets S1 3 target station I O signal Sets S1 4 to S1 5 Sets S1 6 special function module station number target station AJ71QC24 Sets S1 7 number of retransmissions 5 times MOV K2 D8 H Sets S1 8 arrival WDT time 2 seconds MOV K4 D9 Sets S1 9 read data length 4 words Sets S1 10 mov KO 10 Sets S2 remote control Sets S2 1 remote STOP ee MO Sets control command flag Sets S2 3 D1 Control AJ71Q com Global C24 WOT mand signal ready error MO XIB XIE XIF HH cPRea uo oo D20 024 M1 j REQ instruction execution MO M1 X1B is a signal used with respect to external ee en naaa aa devices to enable use of the line eee ees Processing program at normal operation completion r t A a A E See ala ae a aS S Takes corrective action accor
172. tructions for conducting data communications with remote terminal modules connected to a MELSEC NET MINI S3 data link system The following table shows the AJ71PT32 S3 control instructions Key input from Reads keyed in data from AJSSPT OPB operation box INPUT M1 AJ35T OPB P1 operation boxes Section 7 1 Transmits designated number of data to external device connected to AJ35PTF Section 7 2 R2 RS 232C interface module Transmits all data up to 00H code to external device connected to AU35PTF Section 7 3 R2 RS 232C interface module Reads data received from external device connected to AUSS5PTF R2 Section 7 4 RS 232C interface module Conducts data communications with remote terminal module conforming to Section 7 5 MINI standard protocol Resets error detected status for remote terminal modules of the AJ71PT32 S3 Section 7 6 master module Reading commu Reads status of communication nication process SPBUSY processing with the remote terminal Section 7 7 ing status module by instructions Forced stop of Forcibly stops communication communication SPCLR Section 7 8 processing Data send to AJ35PTF R2 Data receive from AJ35PTF R2 Communication with devices con forming to MINI standard protocol Error reset processing with remote terminal modules 7 AJ71PT32 S3 CONTROL INSTRUCTIONS MELSEC QnA 1 AJ71PT32 S3 control instructions can only be executed with respe
173. uffer memory length designation Power on 80h The permissible number of received data designated at n1 is a setting to secure the device range for storing received data and the data storage destination is the number of points designated at n1 starting from the device number designated at D1 The actual number of received data is automatically stored in n 1 n Penniseidle number of received dete 01 D1 1 Byte unit Number of 01 2 ain cared a prepo D 1 4 data stored D1 5 D1 6 D1 7 8 10 INPUT2 INPUT4 5 When the number of data actually received is larger than the permissible number of received data designated at n only the permissible number of received data is stored and the remaining received data is discarded 6 The n and n 1 set value and stored value unit differ according to the AJ71021 S1 data unit designation word or byte The data stored in D1 also differs according to whether word or byte units are designated Word unit designation Byte unk designation n n n D1 D1 1 4 1 i t 1 i 1 i 4 7 In byte unit designation depending on whether the received data is odd or even numbered the 00H code added to the end of the received data is stored as below Received data is an odd number Stored in the higher bytes of the last device number storing received data Received data is an even number Stored in the device number immediately
174. umber of devices storing contro data say First device number of devices of other station storing read data Device name D1 First device number of devices of host station storing read data D2 Host station bit device turning ON at reading completion C 10 33 READ MELSEC QnA Control data Trarget Station 1 User system Error completion type bit 7 0 Not necessary to set the clock when error occurs Not necessary to set clock data when error occurs in S1 11 to S1 15 1 Necessary to set the clock when error occurs Necessary to set clock data when error occurs in 1 11 to S1 15 Clock data controlled by error detection station Completion status 0 Normal end Other than 0 Error completion Channel used by host station Designates interface of host station AJ71QC24 sending S1 2 request to read S1 3 Not used S1 4 Target station network number l S1 5 Target station number Special Function Module station number S1 6 When reading from target station 1 designates target station AJ71QC24 station number 0 to 31 Number of retransmissions Request to request Designates number request is retransmitted when data cannot be read Reading completed Stores number of retransmissions for normal comptetion and error completion Arrival WDT time unit second Designates WDT time until completion of execution of read i
175. umber of the applicable device Error code 4101 When INPUT instructions are executed for other than AJ35PTF R2 and operations box Error code 4104 When the module attempting access is not a special function module Error code 2110 When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 When the designated instruction name is illegal Error code 4300 When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 When a non designatabie device is designated Error code 4302 A program which when XO turns ON receives 5 word data from the external device connected to remote terminal no 1 AJU35PTF R2 of AJ71PT32 S3 installed in I O number X Y020 X Y04F and stores the data to DO D4 Ladder mode wee wun Sets once after CPU RUN in the communication data word unit designation ar w Turns ON the AJ71PT32 S3 communications start a ear u oH Designates the number of receiving points ane n nm RPEeNn _ m List mode 54400 0 LD 1 ANI X40 2 TOP H2 K860 u ql T SET Y48 8 LD x0 9 ANT 14 10 AND X41 11 MOV 5 D10 13 G INPUT y2 D10 DO M Kt 24 END INPUT MELSEC QnA Permissible number of received data data ois v 010 D11 ew gt External device Remote terminal No 1 n DO 49u 1 404 W ap o D1 ATPT 02 424 8 55m U MITSUBISH a E MeLSEG S ag 53n S i 40u NET MINI
176. umber of words designated at n exceeds the range 1 to 2048 Error code 4100 e When the number of words designated at n starting from the first device number designated at S1 exceeds 7FFH Error code 4100 e When the range of the number of words designated at n starting from the first device number designated at S2 exceeds the last device number of the applicable device Error code 4000 e When AJ71P7T32 S3 control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 8 18 PUT MELSEC QnA Program Example 1 A program which when XO turns ON writes the data of DO to D4 to addresses 0H to 4H of RAM number 1 of the AJ71021 S1 installed at I O numbers X Y020 to X Y03F is shown here MO turns ON on completion of instruction execution Ladder mode ee a WW W Dio Designates first address of RAM memory wv Ki Dll Designates the RAM number of the RAM memory G POT 02 DIO K5 bo Mo List mode 0 x0 X20 3 z as X21 D10 Ki D1 tt D10 DO Mo tamt yJ AJ71021 S1 RAM number 1 On 15344 SPBUSY MELSEC QnA 8 6 Reading Communication Status MELSECNET 10 Direct JN Instruction symbol Execution condition Command SPBUSY m Cs
177. unit designation word or byte Word unit designation Byte unit designation b15 bi5 bBb7 bO sy sye2 S43 s e4 S 5 6 The bit device designated at D automatically turns ON on execution of the END instruction of the scan completing the transmission processing and turns OFF at the END instruction of the next scan Used as PR2 PR4 instruction execution completion flag PR2 PR4 Operation Errors Program Example DO D1 D2 D3 D4 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When 00H is not stored from between the device number designated at S onwards and the last device number of the applicable device Error code 4100 e When the number of send data is outside the following range Error code 4100 Word unit 1 to no protocol send buffer memory length set value 1 words Byte unit 1 to no protocol send buffer memory length set value 1 x 2 bytes e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 1 A program which when XO turns ON se
178. urns ON on execution of the END instruction of the scan completing the send processing and turns OFF at the END instruction of the next scan Used as PR2 PR4 instruction execution completion flag PRN2 PRN4 Operation Errors 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the number of data designated at n exceeds the following range Error code 4100 Word unit eee 1 to no protocol send buffer memory length set value 1 words Byte unit eee 1 to no protoco send buffer memory length set value 1 x 2 bytes e When the range of number of data designated at n from the device number designated at S onwards exceeds the last device number of the applicable device Error code 4101 e When the number of characters in the character string designated at S is less than the number of characters number of bytes designated at n Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71PT32 S3 control instructions cannot be used in the designated module Error code 2112 e When the designated Instruction name is illegal Error code 4300 e When the number of AJ71PT32 S3 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 PRN2 PRN4 SEE amon Ef SS C77 A Program Example DO D1 02 D3 D4
179. us indication i Ea di completion i 1 10 11 GETE Operation Errors Program Example 1 1 In the following cases an operation error occurs the error flag SMO turns ON and the error code is stored in SDO e When the control data contents are outside the setting range Error code 4100 e When the module attempting access is not a special function module Error code 2110 e When AJ71QC24 control instructions cannot be used with the designated module Error code 2112 e When the designated instruction name is illegal Error code 4300 e When the number of AJ71QC24 control instruction devices is illegal Error code 4301 e When a non designatable device is designated Error code 4302 A program which when X30 turns ON reads 10 bytes of data from user registration frame number 1000 and stores it from D10 onwards is shown here Control data is set in DO to D3 Ladder mode List mode x30 0 D 1 NOVP K1000 D2 4 MOVP Kio D3 7 GP GBTE 00 DO D10 Mo 15 ED 10 12 ONDEMAND MELSEC QnA 10 3 Data Send by Dedicated Protocol On Demand Function internal Device MELSECNET 10 Special System User Direct JUNG Function Regist Module ePerer ce en eee fey oe C eee Instruction Symbol Execution condition Command ONDEMAND E conoewwo un n o Command ONDEMAND f a oP onomano un en wa o Set data Set Data Data Type un AJ71QC24 head 1
180. with remote terminal modules can communicate simultaneously for all AJ71PT32 S3s with a maximum of 32 remote terminal modules 11 The method of communication as shown below is to conduct registra tion in the communication request registration area by executing FROM TO instructions and then conduct communication processing in accordance with the registered contents Execution of instructions is completed by conducting registration in the communication request registration area and executing the following instructions Pro M10 o R te terminal Yo reais toners module Not ji request registration AiP Ee EHNE wi ee FF wn Ranna e pee module No 2 Pre w12 vo Remote terminal module No 3 ot A Remote terminal area nos moat no AJ71PT Area No 32 32 53 U4 Remote terminal module No 1 Remote terminal module No 2 ESET TEEN nnn NiE SEC OnA 12 During registration in the communication request registration area the device number of the bit device designated at D2 is checked and the registration will not be processed if the same device number is already being used in processing 13 When processing in accordance with the registered contents is completed the device designated at D2 is turned ON and the data is deleted from the communication request registration area 14 The communication request registration area can register a maximum of 32 communication requests If the number of registrati
181. xample 1 A program which when XO is ON batch writes 5 words of data from ID data carrier address 100 through channel 2 of the ID interface module installed at O numbers X Y60 to X Y7F is shown here X Y6O X Y7F ID data carrier Channel 2 Esmee ay erter Ladder mode List mode x0 0 Ww x0 1 GP IDFILL1 U6 K100 DO K5 Mo 14 END Operation Completion of writing by IDFILL2 instructions 0 END 0 END Sequence program Execute command X0 or a oe Completion device MO SOR pee oe Cee ee ee oe Completion status OFF indication device M1 Normal completion l I 1 scan 11 15 IDCOPY1 IDCOPY2 MELSEC QnA 11 8 Copying between ID Data Carriers MELSECNET 10 Special Direct Ji Function Module nege UCAG CS Instruction symbof Execution condition C represents 1 or 2 Command IDCOPY1 IDCOPY2 ie cocor w m e s o Command IDCOPY IDCOPY2 a 5 eeocorr J u f om e dsw Set Data Head I O number of ID interface module Oo om e First address of copy source ID data carrier eee 16 bit binary aa ee First address of copy destination data carrier o mm O Number of data copied 0 to 3900 Number of bit device turning ON at execute D completion at error completion D 1 also turns ON 1 Copies the number of data designated at n2 from the copy source ID data carrier address designated at n1 to the copy destination ID data carrier address designa
Download Pdf Manuals
Related Search
Related Contents
Fujitsu Siemens Computers B6230 Laptop User Manual User Manual - APPEducation OM, Automower, 230 ACX, 220 AC, 2015-01 Benutzerhandbuch Digitus Serial cable, 3m Tiller Mode d`emploi Samsung MW610WA User Manual Manual de instruções Copyright © All rights reserved.
Failed to retrieve file