Home
melsec - Suport
Contents
1. gt gt mo ew mmm omm ow w B RUSO Heo dodo omo UU ooo Pow UU mo momo lt 2 amm mache c 2 2 lt Um mmm gt EOE Oe eee gt eee ee ee ee eee ewww eee ewe ee ee errr oe o9 ho Um wo TATUR A 2 amp A A
2. PRAE lt gt lt gt lt lt gt 8 0 8 CATE lt lt lt lt lt lt gt lt lt gt lt lt lt lt 2 lt lt gt lt lt lt lt lt 4 lt lt MUSS A eee lt gt marce c mmo mmm
3. 5 21 5 19 A7BDE A3N B C Battery Installation eee creme nea eee 5 23 5 20 Option Card Installation e nm eee 5 24 5 21 System Software Driver Entry Method eeeeeeeeeeeeeeeee 333 II 5 25 PROGRAMMING Pee area EH OS eee a 6 1 6 83 6 1 Library Processes 6 1 6 2 Software Driver Functions 44 6 2 6 3 Assembler Interface Specification OPEN Function 6 3 6 4 Open Processing eeosetoessssussossssosttsostoossossoscsosssssoosstevosesscsosvesoscecesesossoocvesceseeseoocceococvose 6 4 6 5 Assembler Interface Specification CLOSE Function m 6 5 6 6 Close Processing eee ee 6 6 8 66253 6 7 Assembler Interface Specification RECEIVE Function t m 6 7 6 8 Receive Processing 44 44 4
4. 6 8 6 9 Assembler Interface Specification SEND Function n 6 9 6 10 Send Processing 6 10 6 11 Assembler Interface Specification SYNC t0 t n 6 11 6 12 Sync Processing eee 6 12 6 13 Function Library 4 ee ere eee eee eee 6 13 6 14 Include File lt nyuserc h gt rrr rrr rrr rrr rere ee Tere eee ee eee eee eee eee eee eee Cee Cee ee 6 13 6 15 Programming e e e Hh 6 23 6 16 Access Function Specification and Example Sheets 6 24 6 17 Explanation of Access Function Specification Sheets nt t nn 6 25 7 TROUBLE SHOOTING eeotsstsssseDevesetesssosesosssssosceecssecstosctosstoosesvosossovesosesrecovoocecosooo 7 1 7 10 7 Troubleshooting Flow Charts MH 7 1 7 2 Flow Chart POWER LED Off sesesosssssosossssoestosetosesecsesosocssssvosscesocscevecesnosoccovocsvecesosecose 7 2 7 3 Flow Chart RUN LED Off
5. 3 8 3 7 System Equipment Specifications rece seen 3 9 4 GENERAL OPERATION 4 1 4 57 4 1 Ove rview 4 1 4 2 Software Configuration PTT rrr rrr rr rrr rrr rr rrr rr ere rere ee ere reer rere Cree 4 2 4 3 Hardware Configuration and Operation cece cent ween ween PPP 4 3 44 The IFMEM 4 4 4 5 IFMEM 4 4 4 6 1 Sequence Program 4 5 4 7 1 the PC Application Program 4 6 4 8 High Speed Access Device Memory RR QN ES 4 7 4 9 Data Transfer rennen nnne nennen nnne nnne 4 7 4 10 High Speed Device Memory Operation 4 8 4 11 The A7BDE A3N PT32S3A MELSECNET MINI S3 Master Station Interface 4 9 4 1 2 The SCPU 44 4 8 4 44 4 1 1 4 13 SCPU Operation Processing
6. bp O BP bp 2 RETURN ADDRESS OFFSET bpt4 PATH ADDRESS OFFSET bp 6 PATH ADDRESS SEGMENT SE bp 8 SINK MODE t 10 ARG1 ADDRESS OFFSET I bpti2 ARG2 ADDRESS OFFSET P 14 ARG3 ADDRESS OFFSET S KAKA AK KKK KKK KAKA KA EF nllsend proc near push bp mov bp sp push ds push es push di APP 74 NA 66253 A APPENDICES MELSEC 166 push si 187 push bx 168 push CX 188 mov ax FUNC_SEND 170 mov cs word ptr func ax 171 mov CX SEND ARG WORD 172 call prm set 173 jmp nliclose05 174 _nlisend endp 175 176 t 177 3 BP 178 bp 2 RETURN ADDRESS OFFSET 178 bpi4 PATH ADDRESS OFFSET 180 bp 6 PATH ADDRESS SEGMENT 181 bp 8 SINK MODE 182 bp 10 ARG1 ADDRESS OFFSET 183 bp 12 ARG2 ADDRESS OFFSET 184 bp 14 ARG3 ADDRESS OFFSET 185 186 EAE EAEKA KEK EEE 187 _nllreceive proc near 188 push bp 189 mov 190 push ds 191 push es 192 push di 193 push si 194 push bx 195 5 196 mov RECEIVE 197 cs word ptr funcl ax 198 mov cx REC_ARG_WORD 199 call prm_set 200 jmp niiclose05 201 nllreceive endp 202
7. i ir dae Fume us ur us uz us RIF 130 129 128 27 126 125 Fu us c ts ce iae tu D9233 L32 L31 In the above table F indicates a forward loop line and R a reverse loop line The bit corresponding to the station number at which the forward or reverse loop error has occurred becomes 1 Example When the forward loop line of station 5 has an error bit 8 of D9232 become 1 and when D9232 is monitored its value is 256 100H Stores the number of times the following transmission errors have been detected CRC OVER AB IF Count is made to a maximum of FFFFH RESET to return the count to O IB NA 66253 A APPENDICES 2 Link special registers only valid when the host station is a local station Jevice Description lumber Own station Stores a station Allows a local station to confirm its own station number number check number 0 to 64 Tota number of Stores the number of Indicates the number of slave stations in one loop slave stations slave stations D9244 Stores the number of times the following transmission errors have been detected CRC OVER AB IF Count
8. lt umm Lu wwe ew lt eT eae eee eT weet eww ew ew eee ew MILII ZZ lt lt LLLA lt sm mmm m lt gt gt mm ewww nnn ewe amp lt lt lt lt lt lt lt lt lt lt lt 5 lt lt lt ae gt
9. 1 2 1 2 General System PrecautionS mmn 1 4 1 3 Hardware Restrictions 1 4 1 4 1 4 2 SYSTEM CONFIGURATION seesssesosesososvoseveebesoecescossesesevsvescosssoscssssssoosstcsosssocssosocoe 2 1 2 7 2 1 Overall System Configuration 4 44 4 44 2 1 2 2 MELSECNET Configuration 2 3 2 3 Installation Configuration T OPEP 2 5 2 4 Communication Channel Configuration 2 6 2 5 Input Output System Configuration eesesssssssssssssosssosecssvevesoesntovevcosesscessosecosososssoososcccoe 2 7 3 SPECIFICATIONS Perr rer rrr rrr errr rr rere re rere errr rere reer errr er rere rrr ere eer ere eee eee 3 1 3 1 8 3 1 General Specifications Qesossoosostosesessssosessssosoooovosescccovessescsocscsoosesocssessossocssossosseoccevvecer 3 1 3 2 Performance Specifications 3 2 3 3 MELSECNET A7LU1EP21 R21 Communication Specifications 7nn0nnn 668 3 4 3 4 MELSECNET MINI S3 A7BDE A3N PT32S3A Communication Specifications 3 5 3 5 System Software Driver Specifications TTR TT eC eT Lee 3 7 3 6 Access Fu nction Table
10. 7 3 7 4 Flow Chart RUN LED Flickers 7 4 7 5 Flow Chart Load of Output Module does not Turn ON 444 4 7 5 7 6 Malfunction in Program Down Load to PLC eee 7 6 7 7 Error Code LiSt e n HII 7 7 APPENDICES Pre rrr rr errr rr rrr reer rere ee ee eee ee eee Cer rere rere rer err eee APP 1 APP 86 APPENDIX 1 External Dimensions 444 ee ese sees seas 1 APPENDIX 2 Differences in the A7BDE A3N PT32S3 and the APP 3 APPENDIX 3 Driver Sta rt Up Error Messages 6 APPENDIX 4 Function Return Values and Error Codes sesosssovctosveseeeevssecssstosctevosscsecoostsooos APP 7 APPENDIX5 Assembly of MELSECNET MINI S3 Twisted Pair Connector nnn APP 10 APPENDIX 6 Special Relays and Registers 6601 11 APPENDIX 7 Special Link Relays and Registers TT APP 20 APPENDIX 8 A CPU Device Memory Map 27 APPENDIX 9 A CPU Memory Map User Areas 38 APPENDIX 10 Timer Counter Set Value Step Address
11. aaa wee ee lt lt lt gt gt gt omo VU Oo EAE gt lt gt m mop 22 gt lt lt lt lt gt amm lt lt lt gt lt a amp gt IB 66253 6 1 6 PROGRAMMING 6 PROGRAMMING This chapter describes the programming procedure of the A7BDE A3N PT32S3 There are two main sections The first provides details on the software driver interface formats should an assembler code custom access library be written e g to be used with a PASCAL compiler The second section gives specifications and program examples on the supplied access function library This library is compatible with the Microsoft C compiler and linker 6 1 Main Library Processes No Processing Timing Library Processing Syst
12. 4 11 4 14 Initial Processing 144644 4 4 4 4 12 4 15 END Processing PTT Terre rr rrr rrr errr rrr err ere reer rere errr reer errr errr 4 13 4 16 Timer Processing 466448444040 ee teen eee 080640 DERE seen 4 14 4 17 Counter Processing 4 1 4 18 Watch Dog Timer WDT Processing 44 4 4 4 8 44 4 17 4 19 Operation Processing Instantaneous Power Failure Occurrence 0000686 4 19 4 20 RUN STOP PAUSE and STEP RUN Operation Processing 0n terete 4 20 IB 66253 A 4 21 SCPU Self Diagnosis 4 90 0000 600600 00 000600060000000000000 600 000000660 60 0 6 4 25 4 22 Self Diagnosis Function Table 4 4 26 4 23 SCPU Devices e e e n MI I III 4 28 4 24 SCPU Parameters n Hh hh hh nh hehehe 4 29 4 25 SCPU Memory Operation T 4 31 4 26 SCPU Ass
13. 53 APPENDIX 11 System Data Table rr ee re reer reer eee ee ee eee eee eee eee eee eee ee eee eee APP 54 APPENDIX 12 Special Function Module Buffer Memory Access 80000 n 668 APP 55 APPENDIX 13 High Speed Memory Transfer Parameter Table APP 60 APPENDIX 14 Link Parameter and I O Assignment Argument Table 76n86 APP 61 APPENDIX 15 Assembler Access Functions Library Source APP 67 IB NA 66253 A 1 INTRODUCTION MELSEC 1 INTRODUCTION This manual explains the functions handling and installation procedure of the A7BDE A3N PT32S3 A3 CPU Programmable controller option cards the accompanying driver software and Access Function Library The A7BDE A3N PT32S3 system consists of three option cards Together they enable an A3N PLC CPU and interfaces with the networks MELSECNET AND MELSECNET MINI S3 to be installed in an or compatible personal computer Access to the A7BDE A3N PT32S3 by the user s application program is made via a system software driver To aid the programmer a sample Access Function Library compatible with the Microsoft C Compiler and Linker is provided We recommend that the Type ACPU Programming Manual the Type Data Link System User s Manual and the MELSECNET MINI 53 Master Module User s Manual are thoroughly read and understood before attempting to operate the A7BDE A3N PT32S3 1 1 IB 66253 A
14. ds es di Si bx CX ax FUNC OPEN cs word ptr func ax ARG WORD prm set ax sS word ptr OPEN CHAN ADR bp cmp ja mov push add mov add ax CHANEL_MAX nllopen_err bx offset nllopen_ret bx ax ax bx offset common adr tbi bx ax APP 73 iB NA 66253 A APPENDICES MELSEC 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 128 128 129 130 Tol 132 133 134 135 138 137 138 139 140 141 142 143 144 145 146 141 148 149 150 151 152 153 154 155 155 157 158 159 160 161 162 163 164 165 jmp cs word ptr bx nllopen err mov ax ERR CHANEL NO nllopen ret pop CX pop bx pop 51 di pop es pop ds pop bp ret _ ERE EKER ER ERE ES ERE AEE EEE ERE RE BP bp 2 RETURN ADDRESS OFFSET bp 4 PATH ADDRESS OFFSET SE bp 6 PATH ADDRESS SEGMENT bp 8 SINK MODE SY _nllsyne proc near push bp mov bp Sp push ds push es push di push si push bx push mov ax FUNC SYNC mov es word ptr func ax mov cx SYNC_ARG WORD call prm_set jmp nliclose05 nllsync endp
15. Specification Function A7BDE A3N PT32S3 Access Application High Speed memory Random Write Function Name nl1send Processing Code 0x209 Driver Function Number 4H Processing Processing code 0x209 enables random write to the A7BDE A3N PT32S3 high speed device memory i e SCPU device status Please see the appendix for head addresses and write data format Argument two specifies the number of points maximum of 24 Argument three specifies the sent data Each point 15 specified as follows Designation 0 Bit Set ORs contents and bit pattern data 1 Bit Reset ANDs contents and bit pattern data 2 Byte Write Writes bit pattern data to address Address Memory address of specified device Bit Pattern Data to be written to the device 1 ON 0 OFF Argument Formats ARGUMENT 2 ARGUMENT 3 Number of Points L Address M First Point H L Bit Pattern Designation Address Second Point H Bit Pattern 6 70 IB NA 66253 A _6 PROGRAMMING MELSEC A itinclude lt stdio h gt include lt nyuserc h gt PATH path NLARG1 1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 2 arg3 buffs OPEN OF I F BOARD A7BDE A3N PT32S3 HIGH SPEED MEMORY RANDOM WRITE This program writes to the value OxfOfO to data register DO of the host A7BDE A3N PT3
16. When switched STOP PAUSE to RUN STEP RUN is switched on or reset per ERROR ERROR CAN T EXECUTE I When END instruction is executed END NOT EXECUTE unexecution Endless loop WDT ERROR executed When END instruction is executed VO unit verify Not checked when M9084 or M9094 is on UNIT VERIFY ERR error When END instruction is execute checked when M9084 or M9094 is on FUSE BREAK OFF Control bus Control bus check When FROM TO instruction is executed FROM TO instruction is executed CONTROL BUS ERR BUS ERR Special function When FROM TO instruction is executed SP UNIT DOWN 4 unit error When power is switched on or reset per Always When power is switched on or reset per RAM check formed RAM ERROR When M9084 is switched on during STOP Operation check POWE I witorlest on reset Oe CIRCUIT ERR CIRCUIT ERR CPU Watch dog error check When END instruction is executed Stop Flicker WDT ERROR Special formed function module error When switched from STOP PAUSE to s module STEP RUN P error VO interruption error When interrupt occurs When power is switched on or reset per formed When switched from STOP PAUSE to RUN STEP RUN INT ERROR INT ERROR Special function unit assignmen
17. KEE 222222222222 S MELSEC LIBRARY FOR MS DOS FOR LARGE MODEL MITSUBISBI ELECTRIC CORPORATION melsec net lib gt melsec_lib segment word public code 5 assume cs melsec lib org 0 PUBLIC DECLARE DE FOR LIBRARY KEK AK HEE KKK EERE public nllclose public _nilopen public nlireceive public nllsend public nllsync KKAKKAK KKK EEK EQU DEFINITION FOR LIBRARY KKK AKE KEK ERE KE RK INT OP CODE equ INT 5795 END equ 01h INTA STS EMP equ 00h ERR CHANEL NO 0041h ERR NOT FOUND equ 0001h DOS equ 21ih s OPEN equ 3dh DRV OPN RD ONLY equ 00h IOCTL equ 44h IOCTL READ equ 02h READ SIZE equ Olh DRV_CLOSE equ 3eh FUNC OPEN equ 0001h FUNC CLOSE equ 0002h FUNC RECEIVE equ 0003h FUNC_SEND equ 0004h FUNC_SYNC equ 00058 5 ERR PATH equ 0044h WORD equ OPEN CHAN ADR equ SYNC ARG WORD equ SEND ARG WORD equ WORD equ CLOSE ARG WORD equ ARG PATH ADR equ 52235533355252 215222221721 KEKE
18. When M9040 is off the operation processing per formed is the same as when the RUN STOP switch is in RUN position The PAUSE status is not RUN PAUSE with M9040 on Status immediately prior to the PAUSE status is retained Operation Output status is retained stopped al Basi e Status immediately prior from the rer to operation stop from the peripheral peripheral Operation resumed from the peripheral Operation resumes in the status immediately prior to operation stop Operation resumed following the opera tion stopped step Operation resumes in the status immediately prior to the PAUSE status Operation resumes in the PAUSE output status PAUSE RUN Started RUN STOP Switch and SCPU Operation Processing 6 Processing during stop of the sequence program operation Timer Processing Counter Constant Present Scan Processing Communt ds Sampang Diagnosis and with cation reer e Contact constant with Processing Processing Position Status scan set IFMEM Update RUN sing Allowed Allowed Executed Allowed Processing during Program Operation Stop STEP H END processing is performed when the END FEND in struction is executed during STEP RUN in this
19. Om Switch off memory protect M PRO off do Can program be written Change to RAM memory Can program be written Is RAM correctly loaded Load RAM correctly ntn Can program be written Is RAM ROM switch jumper Correct RAM ROM switch jumper set correctly set m ting Completed Is memory type RAM or ROM Can program be written NO Consult Mitsubishi representative 7 6 1B 66253 A 7 TROUBLE SHOOTING 7 7 Error Code List Error code list Content of Special Error Message Register D9008 BIN value INSTRCT CODE ERR Checked during instruction execution PARAMETER ERROR Checked at power on reset STOP to RUN PAUSE to STEP RUN MISSING END INS Checked at M9056 or M9057 ON STOP to RUN PAUSE to STEP RUN CAN T EX ECUTE P Checked at CALLP execu tion STOP to RUN PAUSE to STEP RUN MELSEC 4 If an error occurs is RUN mode an error display or error code including a step number is stored in the special register by the self diagnostic function The error code reading procedure and the causes and corrective actions for errors are shown in the table below Instruction code which cannot be de coded by CPU is included in the program 1 ROM including invalid instruc tion code has been loaded 2 Memory contents have been corrected Capacity larger than the memory
20. Simulation 65 16 16 points simulation switch Used with an in switch put module For AY11E A6SW32 32 points simulation switch IC RAM 1 MF51NM8 8 HP 70K Plug 7 type 7 A For AY23 HP 32 Plug type 3 2 A AY5O ASO Plug type 2 A For AY60 32 Plug type 3 2 For 60 Plug type 5 A For power GTH 4 Cartridge type 250 V 4 For A63P SM6 3A Cartridge type 6 3 Others Fuse B NA 66253 A 3 SPECIFICATIONS No of Occupied MELSECNET MINI S3 Equipment Stations Type Description Occupied Stations Stores initial data when the master module is used in the extension mode Installed in master module 16KROM Stores message data when the operating box is used installed in the master module Stores character generation data when the operating box is used Installed in the operating box LACE we AJ35PJ 8A AC input unit 100 120V AC 8 points AJ35PJ 8D DC input unit sink type 12 24V DC 8 points AJ35PJ 8R Contact output unit 24V DC 2A 240V AC 2A 8 points 851 Triac output unit 100 240V AC 0 6A point 8 points AJ35P I 8T1 output unit sink type 12 24V DC 0 1A point atalen O points AJ35PJ 8T2 Transistor output unit sink type 12 24V DC 0 5A point 8 points AJ35PJ 8T3 output unit sink type 12 24V DC 2A point points AJ35PJ 8S2 Triac output unit 100 240V AC 2A po
21. The head addresses XXXXXH and YYYYYH are dependent upon the in stalled memory cassette see Head Address Table YYYYYH Access by A2N A3N A3H A3M CPUs only F0000H NN SN APP 39 IB 66253 A APPENDICES Installed Memory 2 2 2 CPU ROM OPERATION N 7 2 10000H Parameter set value 11000H Sequence program Microcomputer program ROM memory area uH A2 2 A2N CPU s allow in stallation of 32K bytes ROM 18000H 2 No installed memory 7 20000H Extra fil Unless specified all memory area head address variable They however be calculated from the para Sampling trace meter settings XXXXXH Reserved 2 The head addresses XXXXXH and YYYYYH YYYYYH are dependent upon the in stalled memory cassette see Head Address Table Access by A2N A3N A3H A3M CPUs only Extra file registers 0000 7 7 40 18 66253 APPENDICES Installed Memory Map A3N A3H RAM OPERATION 7 2 20000 20 00 21000 Extension file registers Sampling trace Status Data area XXXXXH Access by A2N A3N A3M CPUs only APP 41 Unless specified all memory area head address are variable They may however be calculated from the para meter settings
22. s mw 7 Roos Note 0 On 1 Off Argument Formats ARGUMENT ARGUMENT 3 Error Message 16 ASCII Characters 2 716 5143121 0 71615141312 110 6 72 IB NA 66253 6 PROGRAMMING include lt stdio h gt tinclude lt nyuserc h gt PATH path 1 1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD A7BDE A3N PT32S3 LED ERROR STATUS READ This program reads and displays self diagnosis error messages and the status of the networks MELSECNET and MELSECNET MINI error LEDs mod 0 1 demand 0x700 arg1 loop 0x00 arg1 station Oxff nlireceive path mod amp arg1 arg2 arg3 printf Return value LED read 96x Xn ret for i 0x00 i lt 0x12 i if i lt 0x10 printf buff3 2 2c n i buff3 else printf buff3 2x 2 i buff3 i CLOSE 6 73 IB NA 66253 A 6 PROGRAMMING MELSEC 4 Specification Function A7BDE A3N PT32S3 Board Control Application Switch Status Read Function Name 1 Processing Code 0x701 Driver Function Number 3H Processing Processing code 0x701 enables reading of the host A7BDE A3N PT32S3 control switch pos
23. Mor OO SK PROCESS ADDRESS TABLE FOR CHANNEL SAK ERK AKER EKA RAKE RE RAKE EK KEK EE EKER OK CK K common_adr_tbl dw common a3n A3N APP 80 IB 66253 A APPENDICES MELSE CA 56 dw common_rs4 gt RS422 MELSEC 57 dw common_net 58 common rs RS422 OTHER 59 dw common 54 R8232c OTHER 60 CHANEL MAX equ common adr tbl1 2 1 62 63 0 BP 64 bp 2 RETURN ADDRESS OFFSET 65 bp 4 RETURN ADDRESS SEGMENT 66 bp 6 CHANNEL NUMBER 67 bp 8 PATH ADDRESS OFFSET 68 bp 10 PATH ADDRESS SEGMENT 69 70 EK k 71 nllopen 12 push bp Tos mov bp sp 74 push ds 75 push es 16 push di TI push 51 18 push bx 79 push CX 80 81 mov ax FUNC_OPEN 82 cs word ptr funcl ax 83 mov WORD 84 call prm set 85 mov 55 ptr CHAN ADR bp 86 ax CHANEL MAX 87 ja nllopen err 88 mov bx offset nllopen ret 89 push bx 90 add 91 mov bx offset common adr tb 92 add bx ax 93 jmp cs word ptr bx 94 nllopen_err 95 mov ax ERR CHANEL NO 96 nllopen_ret 97 pop CX 98 pop bx 99 1 100 di 101 pop es 102 pop d
24. 203 2 204 bp O BP 205 bp 2 RETURN ADDRESS OFFSET 206 bp 4 PATH ADDRESS OFFSET 207 PATH ADDRESS SEGMENT 208 209 KE KAR EAE KEKE 210 _nliclose 211 push bp 212 mov bp sp 213 push ds 214 push es 215 push di 216 push si 217 push bx 218 push CX 219 mov ax FUNC CLOSE 220 mov cs word ptr func ax APP 75 A 66253 A APPENDICES lt 221 nliclose05 nllclose err nliclose ret _nliclose mov cx CLOSE WORD call prm set push es les di ss dword ptr ARG PATH ADR bp mov al es byte ptr di pop es xor ax CHANEL MAX ja nliclose_err mov bx offset nllclose ret push bx add bx offset common adr tbl add bx ax jmp cs word ptr bx mov ax ERR PATH pop CX pop bx pop 51 di pop es pop ds ret endp KKK ERE KKK SE 3 3 3 common prc common a3n MOV common_rs4 mov proc near EKKKKKAKKEEKEEEE SX A3N Dbblelekeeleebelebeeeeer mov si offset int a set a3n dx offset drv nm a3n mov di offset int a no a3n jmp common10 SK RS422 si offset int a set rs4 dx offset nm
25. 6 37 IB NA 66253 A 6 PROGRAMMING MELSEC A Specification Function SCPU Sequence Program Access Application Interrupt Program Start Function Name nl1send Processing Code 0x100 Driver Function Number 4H Processing Code 0 100 enables the application program to initiate the processing of a host A7BDE A3N PT32S3 SCPU interrupt program The SCPU interrupt sequence program is indicated by pointer 116 The access station number must be set to Oxff Please note if an interrupt program does not exist at 116 and this function is processed the CAN T EXECUTE 1 error occurs and A7BDE A3N PT32S3 operation stops Arguments two and three require no set data Argument Formats ARGUMENT 2 ARGUMENT 3 No Data No Data 6 38 8 66253 6 PROGRAMMING MELSEC 4 EXAMPLE SCPU INTERRUPT PROGRAM START iinclude lt stdio h gt include lt nyuserc h gt PATH NLARG1 arg1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A7BDE A3N PT32S3 SCPU INTERRUPT PROGRAM START This program initiates the processing of an interrupt sequence program indicated by the pointer 116 in the host A7BDE A3N PT32S3 SCPU mod 0 arg1 demand 0x100 arg1 loop 0x00 arg1 station Oxff path mod am
26. B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B4 B3 82 B1 BO e se vo e x p s ss v e oe s s n pe e wer aeo ac a xn rn a pa pe ps ree ea pa es ana a a pa pas p n pn e pr Stores ON OFF data from an in put unit read only 0 indicates ON and 1 OFF Input X reading procedure A3 ASECPU only Write FF from the peripheral to the CPU mod X read request transmission ule address Read the value at the CPU module address 1 to CPU module READY flag read the peripheral Ready Read the X values stored at the CPU module addresses X read 0B600 0B6FF4 to the 98 Write 0 to the CPU module address Read request clear 28 IB NA 66253 A APPENDICES MELSEC CPU ovie GRY Mem 1 A1 E Output Y A3 Odd address Even address B8 B7 B6 B5 B4 B3 B2 B1 BO IS LL ve ve vo vc ve va vo vs 8200 8202 8204 YO to 1FF Used for storing operation result of PC and allows read write e Stored data are as follows 0 OFF 1 ON Read write from to output memory are performed as shown below Write ____ T Output memory Read Direct mode Refresh mode Output refresh after END instruction is executed
27. n m Stores device ON OFF data in one bit locations imer 0 indicates OFF and 1 ON contact TO to 255 Example MO to 47 are as follows Odd address Even address B15 B14 B13 812 B11 B10 B9 B8 B7 B6 B5 B4 B2 1 BO Mis wa va Mrz n vro me Me ma M2 m1 CO to 255 Counter C contact ojo we e s nsn one rjj noe e e un en weno jos coil Stores PC operation results and Timer T TO to 255 allows read write to 28 33 IB NA 66253 APPENDICES MELSEC CPU ee GU OOOO Data register D Link register W Timer T present TO to 255 devices are in 2 byte 16 bit locations Example DO configuration is as follows Counter B7 CO to 255 present L value H Special register D Accumu lator 0 1 APP 34 IB NA 66253 A APPENDICES MELSEC PO Read address Read address Write address 6000 B7 B6 B5 B4 B3 B2 B1 BO B7 B6 B5 B4 B2 81 Input X Write address 60801 Stores ON OFF data from input unit Allows ON OFF data to be written to to X0 to 1DF read only remote station 0 indicates ON and 1 OFF 0 indicates OFF and 1 ON 603 Odd address Even address B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B4 B2 BI we no re es enfe vel vr pe es ara ve vr ro yar jas yao jac von va
28. 6 PROGRAMMING 1 6 4 Open Processing Specified Channel No gt 4 channel No Channel No 4 Interrupt No already input N gt gt Driver open Open result NG OK Interrupt No input Set error to return value AX 1 ES BS argument head address INT ret IB NA 66253 6 PROGRAMMING MELSEC 4 6 5 Assembler Interface Specification CLOSE Function Code 2H Call Procedure AX 2 CLOSE function number ES BP Head address of argument INT As set in CONFIG SYS file 60 FF Memory Status ES SEGMENT PATH POINTER OFFSET Returned Value AX Return Value For details see the error code list in the appendix 6 5 IB NA 66253 A 6 PROGRAMMING MELSEC 6 6 Close Processing Close Path channel No Path Channel No gt Max Path Channe Max interrupt No already input Interrupt No input Set error to return value ES BS argument head address 1B 66253 A _ 6 PROGRAMMING MELSEC 6 7 Assembler Interface Specification RECEIVE Function Code Call Procedure Memory Status Returned Value 3H 3 RECEIVE function number ES BP Head address of argument INT As set in CONFIG SYS file 60 FF AX Return Value For details see the error code list in the append
29. CLOSE 6 27 IB NA 66253 6 PROGRAMMING MELSEC 4 ACCESS FUNCTION LIBRARY A CPU MEMORY BATCH WRITE Specification Function A CPU Memory Access Application Batch Write Function Name nlisend Processing Code 0x04 Driver Function Number 4H Processing Processing code 0x04 enables batch write of the A7BDE A3N PT32S3 SCPU and A Series PLC memory locations i e status of devices parameter settings micro program area file registers etc Please see the appendix for head addresses and read data formats Argument two specifies the head address and number of bytes to be written maximum of 128 bytes Argument three contains the write data Argument Formats ARGUMENT 2 ARGUMENT 3 L Head Address H Number of Bytes Write Data 6 28 IB NA 66253 A 6 PROGRAMMING 1 include lt stdio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD A CPU MEMORY BATCH WRITE This program writes the bit code Oxff to outputs Y40 Y7f of the host A7BDE A3N PT32S3 i e switches them all on mod 0 arg1 demand 0 04 arg1 loop 0 00 arg1 station Oxff buff2 0 0 1 buff2 1 0x82 buff2 2 0x00 buff2 3 0x10
30. Executes the sequence program per instruction Step run may be executed in either of two ways a By specifying the loop count b Per instruction Allows the device Y M L S F B used with the OUT instruction to be Section 4 35 disconnected from the sequence program operation processing Section 4 36 Section 4 34 Real Time Clock Executes clock operation in the CPU module Clock data includes the year month day hour minute second and day of the week Clock data can be read to special registers D9025 to D9028 436 IB NA 66253 A 4 GENERAL OPERATION MELSEC A 4 28 CONSTANT SCAN APPLICATION Variations in positioning may occur due to the execution and non execution times of instructions in the sequence program Variations in positioning can be minimized through use of the constant scan function FUNCTION 1 Definition The constant scan function uniformly sets the processing time for each scan of the sequence program Operation processing Initial processing Sequence program operation processing Step 0 to END One scan FEND processing time instruction Waits until the constant scan setting END processing is reached if the program processing period is shorter than the constant scan setting 2 Setting range a The constant scan settings can be wirtten to D9020 in 10 ms increments between the value of 1 to 200 Whe
31. Local station parameter mismatched or remote station assignment error Stores the status of stations 17 to 32 Local station parameter mismatched or remote station I O assignment error Stores the status of stations 33 to 48 Local station parameter mismatched or remote station assignment error Stores the status of stations 49 to 64 Initial communication between local or remote stations Stores the local or remote station numbers while they are communicating the initial data with their relevant master station Stores the status of stations 1 to 16 Device Number b15 b14 b13 b12 b11 b10 b9 bs b7 be b5 b4 b3 b2 bs bo LR jJURj UR URIL RIJURIURJURILRJLURILRILURI UR LUR UR UR 16 15 14 13 12111 10 9 8 7 6151 41312 1 09225 UR UR R TUR L R UR L R UR UR UR UR UR 32 31 30 29 28 27 25 24 23 22 1 21 19 18 17 UR UR RI UR ER LR IUR UR 1 UR i UR UR UR UR UR 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 09227 UR UR L R UR UR UR UR i UR UR L R UR UR LIR ILR UR 64 63 52 61 60 58 57 56 55 54 53 52 51 50 49 The bit corresponding to the station number which is currently communicating the initial settings becomes 1 Example W
32. Page AN 1253 mem input Y ed O O Page 19 ite Transfer setting for O O 803 device memory High speed device memory access Page 6 62 0 raoe sea Page 605 Random read O O 206 Page Random wre O O Page Reading ted sews Ool 7 Pags 672 sone Readingswich stows O 7 Page 674 A3N PT32S3 A3N PT32S3 board version monitor monitor monitor mentor Reseting boars O so Pase 676 Resetting A3N General General Data free _ T iB NA 66253 3 SPECIFICATIONS MELSEC 3 7 System Equipment Specifications The following tables list the available A Series system equipment for use with the A7BDE A3N PT32S3 and Remote Stations of MELSECNET System Equipment Description e 32KB 15 Seo 16 16 points 100 120 100 120 32 points 100 120 8KB max 3K steps Memory 8KROM 16KB max 7K steps 20 16 points 200 240 EN 06 al AX21 AX40 AX41 AX42 AX60 AX70 Input module AX71 AX80 AX80E 16 points 12 24 VDC source loading 32 points 12 24 VDC source loading 32 points 12 24 VDC source loading 64 points 12 24 VDC source loading 81 81 52 AX82 3 9 Occupied Point
33. 2 SYSTEM CONFIGURATION 2 2 installation Configuration The A7BDE A3N PT32S3 Programmable Controller option card is one of a series of three Mitsubishi option cards for use with the IBM PC AT or compatible computer The other two option cards are the A7BDE RS4 Serial Interface Card and the A7BDE J71P21 R21 MELSECNET Interface Card Their general configura tion when installed in PC AT is given below PC AT 80286 A7BDE A3N 253 P21 R21 dt gt ACPU 854 422 tM AJ71 A7BDE RS4 232 P22 R22 p Printer computers etc 1 Covered by this document 2 b IB NA 66253 A 2 SYSTEM CONFIGURATION MELSEC 2 4 Communication Channel Configuration The diagram below shows the general communication paths between the three option cards A7BDE A3N PT32S3A B C A7LU1EP21 R21 and the application program when installed in the personal computer For further information please see section 4 Personal Computer PC AT A7BDE A3N B C A7BDE A3N PT32S3A High Speed i Access Inputs Outputs MELSECNET MINI S3 Device Memor TO FROM Interface card 3K Bytes Buffer Memory SCPU X0 X0C A7LU1P21 R21 Y10 Y17 Application Program Gay access MELSECNET nlisend nllreceive interface Device IB NA 66253 2 SYSTEM CONFIGURATION 2 5 Input Output System Configuration An extension base
34. 0 while i lt 16 buff3 i Oxff 2 nl1send path mod amp arg1 arg2 arg3 printf Return value ACPU batch wr ret CLOSE 6 29 66253 6 PROGRAMMING MELSE CA Specification Function A CPU Memory Access Application Random Read Function Name nl1receive Processing Code 0x05 Driver Function Number 3H Processing E Processing code 0x05 enables random read of the A7BDE A3N PT32S3 SCPU and A CPU device memory locations i e X Y inputs outputs relays registers timers counters etc Please see the appendix for head addresses and read data format Argument two specifies the number of points and their corresponding memory addresses The maximum number of points that may be set in one argument is 40 Each point is one byte Argument three receives the returned data Argument Formats ARGUMENT 2 ARGUMENT 3 Number of Point Second Point Data Address First Point Address Second Point 6 30 teriteer 1B NA 66253 A _6 PROGRAMMING MELSE CA EXAMPLE A CPU MEMORY RANDOM READ include lt stdio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A CPU MEMORY ACCESS RANDOM READ This program reads r
35. 4 ES BS argument head address INT ret 6 10 iB 66253 A 6 PROGRAMMING 5 6 11 Assembler interface Specification SYNC Function Code 5H Call Procedure 5 Complete synchronisation function number ES BP Head address of argument INT As set in CONFIG SYS file 60 FF ES BP SEGMENT PATH POINTER OFFSET Returned Value AX Return Value For details see the error code list in the appendix NA 66253 6 PROGRAMMING MELSEC 6 12 Sync Processing Path channel No Pointer error Interrupt No already input Driver open Interrupt No input Set error to return value ES BS argument head address ret IB 66253 6 PROGRAMMING MELSEC 4 6 13 The Access Function Library The access function library consists of an include file and five functions Hinclude lt nyuserc h gt nl1open nliclose nl1receive nl1send nl1sync These functions enable access to the host A7BDE A3N PT32S3 and stations of MELSECNET or MELSECNET MINI S3 The functions nl1open and 1 start and finish communica tions nl1open specifies the communications channel i e access to the A7BDE A3N PT32S3 and receives a path line path to be used by the other functions This path line remains open until terminated by nl1close 1 and nlireceive transfer da
36. 4 mov di offset int a no rs4 jnp common10 76 66253 APPENDICES MELSEC A 276 211 218 219 280 281 282 283 284 285 286 281 288 289 290 291 292 293 294 295 296 297 298 298 300 301 302 303 304 305 305 307 308 309 common net mov si offset int set net mov dx offset drv nm net mov di offset int a no net jmp common 10 KKKKKKKAKKAKKKKKEKKEKKAKKAKE KKK KK EEK ERE KEKE EAE KK EAE KEEFE ES SI INT A SETTED FLAG ADDRESS OFFSET DX DRIVER NAME ADDRESS OFFSET DI INT A NUMBER SAVE AREA ADDRESS OFFSET i EETTTETTTETTEEETTTTETELETETTTEETETTETEETEEEEETEETEEEEEEEEEEEE EELEE EE EEEE 10 5 cs pop ds mov al cs byte ptr si int a set al al jnz int_start YES DS Driver name segment DX Driver name offset OPEN Function code mov al DRV OPN RD ONLY AL Access code int DOS INT Driver open common_err 5 cs word ptr handle nol ax DS Receive buffer segm mov dx di Receive buffer offs mov bx ax BX Handle number mov ah AH Function code mov al IOCTL READ AL Receive specfy mov 10 READ SIZE CX Receive data size int DOS INT JC common_err mov es byte ptr sil INT STS END mov mov
37. 5 PRE OPERATION SETTINGS AND PROCEDURES 5 5 A7LUT1EP21 R21 Nomenclature MODE X10 X1 2 Oo ON M n il 0991 A7LUTP21 A7LUTR21 Mounting fixture Fixture for fixing the A7LU1EP21 R21 printed board onto the PC AT module Connector for connecting the Connector for connecting the A7LU1EP21 R21 printed board and the A7BDE A3N B and C A7BDE A3N B and C printed boards via the ACP2LUT cable printed boards Mode switching The mode switch provides the following functions switch sewing Won mme Online _ Automatic return to line during normal operation Automatic return to line during normal operation Lil eee tion 2 Online Said station is disconnected from the line Said station is disconnected Said station is disconnected from the line the line e Temm oop wet a revese eoo ooo Sunontosalon tet mode masor saton e res mode Stoniestaion test mode slave sain _ ee o Nee IB NA 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES MELSEC 2122 7 Station number setting switch This switch is used to set station numbers for the MELSECNET data link Sets station numbers 00 to 64 X10 X1 4 X10 sets the tens column of numbers 26 amp 96 X1 sets the ones column of numbers e o Setting for th
38. Counter C B7 BO resent CO to 255 value 8800 1 8801 15 B8 Special register D APP 31 IB 66253 A APPENDICES CPU mee Gm Odd address Even address B15 B14 B13 B12 B11 B10 B9 B7 6 BS B4 B2 Bi BO be x0 xe re Dn Drs o er e ro p a rna pasa rs paz rae ae an pan xa ss pan as e to 7FF X Stores ON OFF data from input module read only 0 indicates OFF and 1 ON Odd address Even address 815 B14 B13 B12 B11 B10 BS B8 B7 B6 BS B4 B2 Bi BO bep Pepe s De or vs ve ve Dn uo YO to 7FF Stores PC operation results and allows read write indicates OFF and 1 ON An The output memory is accessed as shown below 2 Output refresh after END instruction is Direct mode executed Output moduie Refresh mode Internal relay M Latch Stores device ON OFF data in one bit locations M L S 0 indicates OFF and 1 ON relay 1 D to 2047 Step Example MO to 47 are as follows relay S Odd address Even address B15 B14 B13 B12 B11 B10 B9 B7 B6 BS B4 B3 82 B1 son nae a o Te e ue n Tuo Un soe ez zzz zw uz a orm e e relay e e es ee ja jv od cee Annuci Stores PC operation results and pete 258 allows read write ator F APP 32 IB NA 66253 APPENDICES Special relay M
39. Message ERROR 0004 IN MELSEC DRIVER M A3N SYS BD NUMBER ERROR Failure Contents The number for argument 2 is not between 0 and 7 Message ERROR 0005 IN MELSEC DRIVER M A3N SYS INT B PARAMETER ERROR Contents Characters in argument 3 are not INT B Message ERROR 0006 IN MELSEC DRIVER M A3N SYS INT NUMBER ERROR Contents The number for argument 3 is not between 0 and 7 Failure Failure Message ERROR 0007 IN MELSEC DRIVER 5 5 BOARD NOT FOUND No board is found at the location indicated by argument 2 Causes 1 The board is not loaded 2 The number set for argument 2 overlaps the number of the other board 3 The other board and the 2 port memory overlap each other Message ERROR 0008 IN MELSEC DRIVER M A3N SYS BOARD NOT RESPONSE Contents Communication with the board is not possible when starting the driver Causes Contents Failure Failure 1 The board is not loaded correctly 2 The number set for argument 2 overlaps the number of the other board Message ERROR 0010 IN MELSEC DRIVER N A3N SYS 100H 300H PARAMETER ERROR The number set with the port setting pin on the board and the number set for argument 4 do not agree The number set for argument 4 is not between 100H and 300H Message ERROR 0011 IN MELSEC DRIVER M A3N SYS SET UP PIN NOT AT ERROR Contents The AT setting pin on the board is not at the AT position Content
40. Remarks short ret Returned value of function path Pointer of the opened path Returned Value A returned value of 0 indicates a normal termination Other values indicate an abnormal termination For details see the error code list in the appendix Explanation Closes the opened channel EXAMPLE 1 lt stdio h gt tinclude lt nyuserc h gt PATH path main short ret char ch printf Close Path Y N Nt ch getche if ch ch y nliclose path printf nReturn value close ex xn ret printf NnPath not closed Nn The function nl1close should only be used after the channel has been opened by If 1 is processed before nl1open an error value will be returned 6 16 IB NA 68253 A 6 PROGRAMMING MELSE CA Function Reads data from the 7 253 and stations of MELSECNET Syntax include lt nyuserc h gt ret nlireceive path mod amp arg1 arg2 arg3 Remarks short ret Returned value of function PATH path Pointer of the opened path short mod Calling Mode NLARG1 arg1 Argument 1 pointer char arg2 Argument 2 pointer char arg3 Argument 3 pointer Returned Value A returned value of 0 indicates a normal termination Other values indicate an abnormal termination For details see the error code list in
41. The SCPU retains all output states after operation of one scan after M9041 is switched ON Any output that should be switched off in PAUSE state must be interlocked using M9041 OPERATION a The SCPU may be set to PAUSE using one of the following 1 The RUN STOP switch 2 The peripherals 3 The IFMEM 4 43 IB 66253 4 Operation is stopped when the RUN key switch has been set to PAUSE and the next scan has been executed to the END FEND instruction Operation is resumed by setting the RUN key switch to RUN or by switching M9040 to OFF using a peripheral 0 END PAUSE 9 END RUN STOP switch PAUSE enable M9040 coil PAUSE state Switched ON when the PAUSE condition is RUN PAUSE switched state PAUSE Timing Using the RUN STOP Switch Remote PAUSE contacts 1 Operation is stopped when the remote PAUSE contacts and M9040 are set simultaneously to ON and the next scan has been executed to the END FEND instruction 2 Operation is resumed by setting either the remote PAUSE contacts to OFF or by switching M9040 to OFF by a peripheral IFMEM etc Remote PAUSE contacts PAUSE enable M9040 coil PAUSE status M9041 contct condition is RUN STOP switched state PAUSE status PAUSE Timing by Remote PAUSE Contacts 4 44 IB NA 66253 A 4 GENERAL OPERATION
42. bp 0 BP 196 bp 2 RETURN ADDRESS OFFSET 197 4 RETURN ADDRESS SEGMENT 198 bp 6 PATH ADDRESS OFFSET 199 bp 8 PATH ADDRESS SEGMENT 200 201 202 _ 11 203 push bp 204 mov bp Sp 205 push ds 206 push es 207 push di 208 push si 209 push bx 210 push CX 211 mov CLOSE 212 mov cs word ptr func ax 218 mov cx CLOSE WORD 214 cali prm set 215 nllclose05 216 push es 217 les di ss dword ptr PATH ADR bp 218 mov al es byte ptr di 218 pop es 220 xor ah ah APP 83 IB NA 66253 A APPENDICES MELSE CA 221 222 225 224 225 226 221 228 229 230 231 232 289 234 235 236 231 238 239 240 241 242 243 244 245 246 1 err nllclose ret _hliclose KE KKK KKK KKK KKK KEKE KKK AK KEKE EK KEKE KEKE KEK EERE EKA KKK KKK KE KEKE KEK KEREEEEE common common a3n _ 54 MOV common_net mov cmp ja mov push add mov add jmp mov pop poP pop POP pop pop ret endp proc near A3N kkkkkkkkkk kkt mov si offset int a set a3n dx offset drv nm a3n mov di offset int a no a3n jmp common10 KEKE DX RS422 ok
43. e OOS x 4 gt E Aa x K 0 tata A 2 t QUA are 4 b 3 et 354 i d ata tt ttt tta i 1 5 5 REUS M E PE 5 d s 2 gt UR SUR SOS R o0 0090909050509 5050 24 SONS 5 5 Bid areas pete UM cence ny as 3 amp x IA 1 d 4 are Ie ete MITSUBISHI ELECTRIC REVISIONS X The manual number is given on the bottom left of the back cover Jun 1990 IB NA 66253 A First edition Thank you for selecting the A7BDE A3N PT32S3 A3 CPU Programmable Controller option card Please read this manual carefully so that the equipment may be used to its optimum A copy of this manual should be forwarded to the end user Users are asked to read the Software Grant Agreement before operating the A7BDE A3N PT32S3 option card MICROSOFT MS DOS are the registered trademark of the Microsoft corporation PC DOS are the registered trademarks of International Business Machines Corporation IB NA 66253 A 1 INTRODUCTION 1 1 1 5 1 1 777777521232
44. station joao al Optical data AJ72P25 For remote station 23 A0J2CPUP25 For remote VO station al 5222011 IB NA 66253 A 3 SPECIFICATIONS System Equipment Number Dummy 16 32 48 or 64 points may be With 16 simula points Dustproof cover for use in 110 220 5 VDC 110 220 5 VDE 5 D 24 VC 03 A power 24 VDC 5 110 220 5 5VDC2A Must be used em Applicable System Coaxial Optical data mE data link Current Consumption Occupied Points L station 5 VDC 24 VDC Independent R station Power supply module 110 220 24 VDC A68P 110220 hsvoc A616DAI A38B ad accommodate 8 mod Main base A35B mu accommodate 5 mod unit ules A32B a accommodate 2 mod Without exten ules sion connector Base Can accommodate 8 mod unit ules Requires power A65B Can accommodate 5 I O mod supply module Extension ules base unit Can accommodate 8 mod Must not used ules with the A61P A62P A63P A55B a accommodate 5 mod ACOBB 600 mm 23 6 600 mm 236 inch AC12B 1200 mm 47 2 inch Extension For use be cable 3000 mm 118 1 inch tween units LCOGAB 600 mm 23 6 inch LC12AB 1200 mm 47 2 inch
45. 66253 APPENDICES 2 Link special relays only valid when the host is local station me M9211 Link card error OFF Normal Depends on presence or absence of the link card error local station ON Error Judged by the CPU OFF Online ON Offline mM M9240 Link status interstation test beatae 2 22 or loopback self p C i check M9241 Forward loop error on X Depends on the error condition of the forward loop line OFF Normal i M9242 Reverse loop error ON Error Depends on the error condition of the reverse loop line OFF Non executed Depends on whether or not loopback is occurring at the M9246 Deta Received Depends on whether or not data has been received from ON Unreceived the master station OFF Received Depends on on whether or not a tier three station has M9247 Data unreceived received data from its master station in a three tier ON Unreceived M9250 Parameter OFF Received Depends on whether or not link parameters have been unreceived ON Unreceived received from the master station Link break OFF Normal Depends on the data link condition at the local station ON Break OFF Unexecuted ON Forward or re Loop test status verse loop test is being ex ecuted OFF RUN or STEP Master station RUN mode Depends on whether or not the master station is in STOP operating status ON STOP or PAUSE or PAUSE mode m
46. 7887 8 7892 Y axis parameter to to 7907 3FDO 7912 X axis zero return data to to 3FDDu 7917 3FE4 7922 Y axis zero return data to to 3FF1 7928 APP 58 IB NA 66253 A APPENDICES MELSEC A 6 Type AD72 positioning module Buffer Memory Contents Address Hexadecimal Address for FROM FROM Instruction pid 5 392 393 pu E pn Monitor area to 607 2s 3872 to Tn 5871 eu 5872 to SEE 7871 pia 7872 to UE 7891 p 7892 Y axis parameters to 7911 7912 X axis zero return data to Eos 7917 cw 7922 to 5 7928 7 AJ71C24 S3 X axis positioning start data Y axis positioning start data X axis positioning data Y axis positioning data X axis parameters Y axis zero return data Address Specified by Computer Address when Connected to Computer pud 0 to an FFu pus EE Special application to area APP 59 IB NA 66253 A APPENDICES APPENDIX 13 High Speed Memory Transfer Parameter Table PC AT 0 10 20 302 34 X head Number No of transfer bytes Y head Number No of transfer bytes M head Number No of transfer bytes 40 L head Number No of transfer bytes S head Number No of transfer bytes B head Number No of transfer bytes F head Number No of transfer bytes PC AT 50 Special M head Number T head Number No
47. Connects the portable type operating box to the MINI S3 link when necessary F 16NP for optical data link MELSEC F series PC connection interface unit Interface unit for connecting the MELSEC F series PC to the MINI S3 link F 16NT for twisted pair data link FR Z200 series transistorized inverter Interface board for connecting the Mitsubishi FR Z200 series transistorized inverter to the MINI S3 link 315 1B NA 66253 A 3 SPECIFICATIONS MELSECNET MINI S3 Equipment No of Occupied Stations Description dedicated 1 core connector for use with the optical fiber cable Consists of the following Equipment Guantiey Fm 1 ptus p For assembling optical fiber cable connectors Consists of the fol lowing Equipment Type Fiber cutter 4600 1 Replacement blade for cutter ac PON HT 101P For measuring the luminous energy of the MINI S3 link Optical fiber cable connector CA9104AP The optical fiber cable connector and assembling tool kit are only used with the plas tic fiber Assembling tool kit CT9004P 316 66253 3 SPECIFICATIONS Peripheral Equipment Corrent D
48. Counter C present value CO to 127 Special register D APP 36 IB 66253 APPENDICES MELSEC fA index Z V 0 2 37 IB 66253 APPENDICES APPENDIX 9 A CPU Memory Map User Areas User Installed Memory A1 A1N CPU RAM ROM OPERATION 2 2 C800H Internal RAM Comments 7 10000 Parameters 10 00 T C Set Values 11000H Sequence Program User Installed ROM RAM 16K bytes Variable Microcomputer Program Variable Unused 14000H 2 Fixed at 2K bytes Fixed at 3K bytes Fixed at 1K bytes Variable 2K bytes to 12K bytes Variable OK bytes to 10K bytes Variable OK bytes to 10K bytes The installed memory head address remains at 10 000H for both ROM and RAM operation The head address of the sequence program area is fixed at 11 000H The head address of the Microcomputer Program and Unused areas are variable but may be calculated from the memory parameter settings APP 38 66253 A APPENDICES Installed Memory Map A2 A2E A2N CPU RAM OPERATION NN 20000H Reserved 7 Extension file registers 20C00H 21000H Unless specified all memory area head address are variable They may however be calculated from the para meter settings XXXXXH
49. The LED displays operation status and information concerning abnormal conditions Lights if code check error occurs OVER Lights if data latch delay error occurs LED2 for display of operation status Lights when all data is 1 Lights when specified time is exceeded ala On Lights if receive data error exists UNDER Lights if receive data error exists 5 9 NA 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES 5 6 Pre Operation Settings and Procedures The following sections provide the various procedures names and settings required prior to operation of the A7BDE A3N PT32S3 5 7 Pre Operation Settings Procedure Flow Chart Master Station No MELSECNET MINI S3 Set Mode of PT32S3A Section 5 9 the A7BDE A3N Station of MELSECNET Set the Mode and Station Number of the A7LU1EP21 R21 Section 5 12 A7BDE AS3N B C Set Board Number Port Number Offset Board IRO Number ROM RAM Spec Install Memory Protect Range Battery Installation Sections 5 15 to 5 19 Install cards A7BDE A3N PT32S3A B C and the A7LU1EP21 R21 into the PC AT option slot Section 5 20 5 10 IB NA 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES Load Driver S W package and make entries to the CONFIG SYS File Re set the PC to validate the new set tings Section 5 21 Check Hardware Dia
50. gt CH4 temperature set range offset 5 CH4 temperature set range 56 66253 A APPENDICES MELSEC 4 AD61 S1 high speed counter module Address Hexadecimal Address for FROM Instruction Buffer Memory Content Channeli cm Unused area reserved 3 2 2u 1 33 Preset value write middle bits 839 Presb value LB d Lee Mode register 3 35 C 83 85 86 87 resi higher bis pe re uec i APP 57 IB 66253 APPENDICES 5 071 51 positioning module Buffer Memory Contents Address Hexadecimal Address for FROM Instruction 2004 0 X axis positioning start data to to 3911 200 392 458 300 Y axis positioning start data to to 500 2040 3872 Positioning to to 235 4271 2360 4272 to to Positioning 8 a c 6 267 4671 2680 4672 Dwell time A to to E 299 5071 x 29 0 5072 Positioning address to to 5871 2 5872 Positioning to to 32FFu 6271 v 3300 6272 Positioning 2 to to S 361 6671 3620 6672 Dwell time to to 393 7071 i 39401 7072 Positioning address to to 7 7871 80 7872 X axis parameter to to
51. 1 INTRODUCTION MELSE CA 1 1 Features The A7BDE A3N PT32S3 Access Function Library enables a Sequence program device monitoring and control b Sequence program read and write c A7BDE A3N PT32S3 SCPU Interrupt sequence program initia tion d Remote local station Special Function Module access A7BDE A3N PT32S3 operating status monitor and control f Master Slave Free data transmission to A7BDE J71P21 R21 stations There are three option cards one of each may be installed in an PC AT compatible personal computer a The A7BDE A3N PT32S3A MELSECNET MINI S3 Interface Card This card allows the installed CPU Programmable Con troller to be configured as the master station of a MELSECNET MINI network Its features and operation are the same as the A PLC rack mounted MELSECNET MINI master unit the AJ71PT32 Though installed in a PC it is regarded by the CPU as occupying the second slot of a rack system and communication is made via the sequence program TO FROM instructions and dedicated control This card can only operate in conjunction with the A7BDE A3N B C and may not be installed in a PC alone For further details please see section 4 11 and the AJ71PT32 Master Module User s Manual The A7BDE A3N B C Programmable Controller Option Card This card has three main features The A3N CPU referred to as the SCPU the MCPU and a High Speed Device Access Memory The SCPU h
52. 4 buff2 2 0 printf Select Run Stop Pause 0 1 2 Nt scanf amp buff2 0 1 path mod amp arg1 arg2 printf Return value run stop 96X wn ret CLOSE 6 41 IB NA 66253 A 6 PROGRAMMING Specification Function A CPU Control Application A CPU Check Request Function Name 1 Processing Code 0x08 Driver Function Number 3H Processing Code 0x08 enables reading of the CPU code of the accessed A PLC and the address of the system data table Argument two requires no set data Argument three receives the CPU code and system data table address The system data table contains the device specifications of the accessed A PLC CPU Codes After reading the address the system data table may be read using the function A CPU Memory Access Batch Read nlTreceive processing code 0x02 For details on the system data table configuration see the appendix Argument Formats ARGUMENT 2 ARGUMENT 3 CPU Code System Data Table Head Address H No Data 6 42 IB 66253 6 PROGRAMMING A CPU CHECK REQUEST include lt stdio h gt include lt nyuserc h gt PATH path arg1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 bu
53. 5 10 A7BDE A3N PT32S3A MELSECNET MINI S3 Line Check Mode Line check mode is used to check the transmitting receiving hardware and check for fiber optic twisted pair cable breakage The general procedure is given in the flow chart below Set the mode setting switch to 3 Set the monitor station num ber setting switch to 00 Reset the SCPU The mode setting switch is Wait 2 to 3 seconds made when the SCPU is powered up or reset ___ ERR LED NO LOOP ERR LED lit flickering at intervals of 0 5 seconds Line error has occurred See Normal complete Para 2 In an optical system line check should only be performed after measuring the luminous energy of the loop 5 13 NA 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES 5 11 A7BDE A3N PT32S3A MELSECNET MINI S3 Luminous Energy Check Mode This mode is used to test the received luminous energy at the RD terminals and to determine if the fiber optic cable connectors have been correctly fabricated The general procedure is given in the flow chart below Set the mode setting switch to 4 Reset the SCPU The mode setting switch is made valid when the SCPU is Wait 2 to 3 seconds powered up or reset Measure luminous energy at RD terminals of remote stations Use the optical power tester The luminous energy check is performed using an optical power tester available from Mlitsubishi Electric
54. 5 14 IB 66263 A 5 PRE OPERATION SETTINGS AND PROCEDURES 5 12 A7LU1EP21 R21 Mode and Station Number Setting The A7LU1EP21 R21 MELSECNET interface option card has eight operating modes three on line modes and five test modes They are selected with a dial switch located near the top of the card The function of each mode is described in the table below For further details please consult the Type Datalink User s Manual Dial Mode Name Description Mode name 000000002 On Line Enables network communication and will automatically return a normally Auto Return operating station back Online after any faults have occurred On Line Enables network communication but will only return a normally operating No Auto Return station back Online if the CPU is reset after any faults have occurred Disables communication with the network If the station is the network Off Line master the entire network will also be disabled Forward loop Used to check all fiber optic cables and coaxial cables of the data link system test mode this mode checks the forward loop which is used for normal operation Used to check all fiber optic cables and coaxial cables of the data link system this mode checks the reverse loop which is used for loop back if an error occurs Reverse loop test mode Station to station test mode master station Used to check the lines between two stati
55. 9039 is switched off only during 1 scan M9037 Normally OFF On only for 1 scan after run RUN flag M9038 zcjz OFF off only for 1 scan after run APP 11 IB NA 66253 A APPENDICES M9040 PAUSE enable coil DNE 4 22 When RUN key switch is at PAUSE position or remote pause contact has turned PAUSE status OFF Not during pause on and if M9040 is on PAUSE mode is set and M9041 is turned on M9041 contact ON During pause Stop status OFF Not during stop Stop status ON During stop Switched on when the RUN STOP switch is set to STOP OFF During sampling Sampling trace trace completion ON Sampling trace completion Turned on upon completion of sampling trace performed the number of times preset by parameter after STRA instruction is executed Reset when STRAR instruction is executed Has the same functions as the STRA and STRAR instructions M9044 is forced 0 1 Same as STRA to switch on off by the peripheral device When switched on M9044 provides execution the same function as the STRA instruction When switched off M9044 provides 0 Same as STRAR the same function as the STRAR instruction At this time the sampling trace execution condition is based on the value 09044 0 for scan time for time 10ms increments Sampling trace OFF Except during trace 9046 Sampling trace ON During trace On during sampling trace M9047 Sampling
56. APPENDICES MELSEC A Slot Assignment Remote I O Before attempting to set slot assignment we recommend that section 4 5 Example slot assignment of the Type Data Link User s Manual is thoroughly read and understood arg 3 1035 1036 Card type Number of points 0 No setting 0 0 points 2 X module 2 32 points 3 Y module 3 48 points 4 Special module 4 64 points Slot 125 Slot 126 1162 Slot 127 1163 1164 5 Sum check duque arg 3 1035 to 1162 1 When Assignment is not to be specified set all bytes 1035 to 1166 to zero i e no setting including sum check code 2 Mapped I O A7BDE to Local A CPU or A7BDE to A7BDE are specified as empty slots with the corres ponding number of mapped l O points APP 66 66253 A APPENDICES APPENDIX 15 Assembler Access Functions Library Source Code Open Processing Specified Channel No gt 4 channel No Channel No lt 4 Interrupt No already input 300 302 Driver open Open result OK 334 335 Set error to return value 324 325 Interrupt No input ES BS argument head address 326 333 ret Numbers indicate line position in the Small Model Func tion Source Code APP 67 IB NA 66253 A APPENDICES Close Processing Path channel N
57. Address M Bit Pattern 6 32 IB 66253 A 6 PROGRAMMING lt EXAMPLE A CPU MEMORY RANDOM WRITE include lt stdio h gt finclude nyuserc h PATH path NLARG1 arg1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A CPU MEMORY ACCESS RANDOM WRITE This program writes OxFO to outputs 40 48 and OxBBAA to data register DO of station one of MELSECNET mod 0 arg1 demand 0x06 arg1 loop 0x00 arg1 station 0x01 buff2 0 0x01 buff3 0 0x02 buff3 1 0x08 buff3 2 0x82 buff3 3 0x00 buff3 4 Oxf0 buff3 5 0x02 buff3 6 0x00 buff3 7 0x88 buff3 8 0x00 buff3 9 buff3 10 0x02 buff3 11 0x01 buff3 12 0x88 buff3 13 0x00 buff3 14 Oxbb nl1send path mod amp arg1 arg2 arg3 printf Return value random write 96X wn CLOSE 6 33 SS SSS 1B NA 66253 A 6 PROGRAMMING MELSEC AA Specification Function A CPU Sequence Program Access Application Batch Read Function Name nl1receive Processing Code 0x01 Driver Function Number 3H Processing Code 0x01 specifies batch read of the A7BDE A3N PT32S3 SCPU and A CPU sequence program and timer counter memory area see appendix for T C step a
58. The head addresses XXXXXH and YYYYYH are dependent upon the in stalled memory cassette see Head Address Table IB 66253 APPENDICES MELSEC Installed Memory A3N ROM OPERATION 2 2 10000H 10 00 T C set value 11000H Sequence program ROM memory area 64K Bytes Microcomputer program 20000H T C set value Subsequence program Microcomputer program For storing P addresses Unless specified all memory area head addresses are variable They may however be calculated from the para For storing operation result B meter settings Extra file registers Sampling trace Status Data area The head addresses XXXXXH and latch YYYYYH are dependent upon the in stalled memory cassette see Head Address Table File register Comment XXXXXH 7 YYYYYH Access by A2N A3H A3M CPUs only F0000H APP 42 IB 66253 APPENDICES MELSEC Head Address Table Memory Cassette Cassette YYYYYH _ co m o9 em xe etn ew 9 NT NN BS ME A 1 se pommes ec 1 The remaining 32K bytes of memory 38000 to 40000H may be used as extra file registers blocks 10 and 11 A2N A3N only A3H M only APP 43 B NA 66253 APPENDICES MELSEC How to Calculat
59. Turn the socket lock screw to CLOSE while pressing the IC with your finger Check that the IC does not extend above the socket Attach the provided masking tape to the top of the ROM If creating a sub sequence program it may be written to the SCPU using the peripheral device Completed 1 This is necessary since writing the main sequence program in the ROM results in the addresses for storing a sub sequence program to be changed 5 21 IB 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES MELSEC AA installation of ROM The following explains how the ROM should be mounted in the ROM sockets a How to hold the IC Touching the leads of the memory chip can result in destruction of the memory due to static electricity The pins could also be bent preventing their proper insertion It is recommended that an IC be held in the manner shown below b Correct mounting direction of the IC The memory chips will be destroyed if the memory chips are installed in the wrong direction and power is turned ON The memory sockets EP ROM and IC RAM are provided with notch marks which should be aligned correctly when installing the memory chips Notch type Broken line type 5 22 IB NA 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES 1 lt 5 19 A7BDE AS3N B C Battery Installation The correct battery installation method is shown in the diagram below Red l
60. 0000 N 4000 N 0xa8000 0 000 Oxb0000 0xb4000 NJ OO Oxb8000 0 6 000 0 0000 NO T M 0 4000 0 8000 000 Oxd4000 WM 4000 dl 0 8000 0 38000 000 0 3 000 12 A c p APP 45 IB NA 66253 A APPENDICES Installed Memory Map 0 2 CPU RAM ROM OPERATION 7 8000H Comment area 85F0H Parameters 8600H T C set values 8800H 1 Sequence micro program 2 area Sequence micro program area 1 8K bytes RAM ROM EROM 2 16K bytes RAM ROM 1 step 2 bytes of memory NN MELSEC 4 Set at 1 5K bytes Set at 16 bytes Set at 0 5 bytes Sequence program max 3K steps Increases sequence program to max 7 bK steps APP 46 IB NA 66253 A APPENDICES Parameter Settings Memory Area A1 A2 A3 Defaut Values 10 000H ROM 0 20 000H RAM 1 2 Parameter fixed 43 data 4 5 Do Not Access 2 Min Max Setting range 41 Main program capacity Total number steps 0 400 0 7800 1 43 Sub program capacity gt Total number of steps 0x00 0 7800 2 445 File register capacity number words 0x00 0 2000 46 47 Comment capacity
61. 100ms retentive timer 0 1 to 3276 7sec Number of points 256 Normal counter setting range 1 to 32767 unter Specifications CO to 295 Set by parameters Interrupt counter setting range 1 to 32767 Counters used in interrupt programs APP 3 iB NA 66253 APPENDICES MELSEC A ltem o Data register D points 1024 DO to 1023 1024 WO to 256 FO to 255 Max 8192 RO to 8191 2 0 1 2 V Z 256 to 255 Link register W points Annunciator F points File register R points Accumulator A points Index register V Z points Pointer Pointer for interrupt 1 256 M9000 to 9255 256 09000 to 9255 Special relay M Special register D Comment points Status latch function Sampling trace function Offline switch function Available Available Available Y M L B F Annunciator display function F number display Remote RUN PAUSE contact setting Operation mode switching when error occurs Available STOP RUN output mode switching Keyword entry Print title entry Available Available Available Available Assignment change of number occupied points Possible with peripherals with the exception of the PU The following latch ranges are permitted BO to 3FF TO to 255 CO to 255 DO to 1023 WO to Break point stop and 1 instruction operation are possible Setting of latch range for power failure data reten
62. 255 256 of the branch instruction CJ Pointer Tor Indicates the destination of an interrupt program lO to 31 32 corresponding to the interrupt factor which has LM Jm i r ion Interruptio occurred K 32768 to 32767 16 bit instruction Used to specify the timer counter set value pointer coms number interrupt pointer number the number of bit K 2147483648 to 2147483647 device digits and basic and application instruction 32 bit instruction values H Hexadecimal FEFFE 16 bit instruction Used to specify the basic and application instruction constant HO to FFFFFFFF 32 bit instruction values 4 28 IB 66253 4 GENERAL OPERATION 4 24 SCPU Parameters 1 Parameter setting involves specifying the usable ranges of various functions and the assignment of user memory area within the SCPU unit The parameters are stored in the first 3K bytes of the user memory area 2 The default values for the parameters are shown in the table below The defaults may be used without alteration 3 the parameter settings may be changed for applications within the given limits The parameters are set by peripheral equipment Refer to the operating manuals of the peripheral equipment for information concerning parameter settings Parameter Setting Ranges Main sequence 1 to 30K steps program capacity in units of 1K step Sub sequence 1 to 30K steps p
63. ARG3 ADDRESS SEGMENT Xe eee KEKE EE XE EEE KEKE _nllsend proc far push bp mov bp sp push ds push es push di push si push bx push mov ax FUNC SEND mov cs word ptr func ax mov CX SEND ARG WORD call prm set jmp nliclose05 _nllsend endp SKK KKK e KAKA KA KKK EEE KEKE REE EE St bprO BP gt 2 RETURN ADDRESS OFFSET APP 82 IB 66253 A APPENDICES MELSE CA 166 bp 4 RETURN ADDRESS SEGMENT 167 bp 6 PATH ADDRESS OFFSET 168 bp48 PATH ADDRESS SEGMENT 169 10 CALLING MODE 170 bp 12 ARG1 ADDRESS OFFSET 171 3 14 ADDRESS SEGMENT 172 bp 16 ARG2 ADDRESS OFFSET 173 bp 18 ARG2 ADDRESS SEGMENT 174 bp 20 ARG3 ADDRESS OFFSET 175 bp 22 ARG3 ADDRESS SEGMENT 176 177 kkk kkk EEE EE EKER 178 _ 1 179 push bp 180 mov bp Sp 181 push ds 182 push es 183 push di 184 push si 185 push bx 186 push CX 187 mov ax FUNC RECEIVE 188 mov es word ptr func 189 mov cx REC_ARG_WORD 190 call prm_set 191 jmp nliclose05 192 _nlireceive endp 193 9 RRKKAAKKKAAKK KAKA KEE K EK ERE KEKE EES EEE AEE 194 3 195
64. NA 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES 5 4 A7BDE A3N B C Nomenclature 4 5006 UX amp 9 CES QOO NSAI Description Fixture for fixing the A7BDE A3N B and C printed boards onto the PC module Connector for the Connector for connecting the A7BDE A3N B and C printed boards and the A7LU1P21 R1 A7LU1P21 R21 MELSECNET data link module printed board via the ACP2LU1 cable Connector for the Connector for connecting the A7BDE A3N B and C printed boards and the A7BDE A3N A7BDE A3N PT32S3A PT32S3A printed board via the ACP2PC cable Battery for backup power for the IC RAM memory and latching function during power failures Battery K6BAT or when power is not ON Set to AT when shipped Do not change Set to 100H when shipped May also be set to 300H See Section 5 15 pren hen This dial sets the A7BDE A3N interrupt IRQ number For details see Section 5 16 ROM RAM memory The area protected in the RAM memory varies depending on the setting of the ROM RAM switching switch setting This switch should be set to ROM if the sequence program is stored in the ROM protection switch and to RAM if stored in the RAM See Section 5 17 The LATCH CLEAR switch sets to either OFF or 0 the device memories of devices with latch ranges set by parameters Note that the special relays M9000 to 9255 special registers D9000 LATCH CLEAR switch to 9255 and file registers are not affected Effective only when
65. Output load does not turn on Is indicator LED of output module on NO Check output state in monitor mode with programmer YES For module without fuse Is indicator LED of input module on 15 fuse blow indicator of output module on YES NO Measure voltage across mod ule input and COM terminal OV YES Supply voltage Monitor Is voltage o power supply for load applied satisfactor ES Check input signal in monitor S gnal off Y mode with programmer Check wiring of power supply for load and restore the ov power heck voltage across each output COM terminal Ch irin eck external wiring and ex 5 of output module ternal input equipment Supply voltage is satisfactory Failure of output module Change output unit Check load wiring and load and then restore the power Change output common fuse Fuse of output common blow pesistently Change output relay number Check rush current de to set maximum simul veloped conditions under taneous ON current of loads Consult Mitsubishi repre worse to within the specifications sentative OK 7 5 IB 66253 A 7 TROUBLE SHOOTING MEL SECA 7 6 Malfunction in Program Down Load to PLC Program cannot be written to PLC Switch to STOP RUN key switch on or off YES Can program be written RESET SCPU Can program be written
66. Setting the OFFLINE switch Set the OFFLINE switch using the peripheral b Canceling the OFFLINE switch 1 Use the peripheral 2 Reset the SCPU CAUTION After the test operation is over the OFFLINE switch must be canceled to enter online mode 4 54 IB 66253 A 4 GENERAL OPERATION MELSEC 4 36 Real Time CLOCK FUNCTION APPLICATION a Allows real time clock management by using the clock of one SCPU b Allows time management using a single SCPU when data link operations are being executed FUNCTION 1 Definition Allows the clock to be operated in accordance with the data set in the SCPU When power to the programmable controller is turned off the clock is operated by the memory cassette battery 2 Clock data a The clock data includes the year month day hour minute second and day of the week and is set to the clock devices 1 Year Expressed by the 2 least significant digits 2 Leap year Automatically updated 3 Time 24 hours basis 0 to 23 o clock b Clock data may be set and read by using special relays and registers c Clock data accuracy depends on the ambient temperature Ambient Temperature C Accuracy Weekly difference Section 2 75 6 5 When M9027 is set to ON the following clock data is displayed on the option board month day hour minute and second Since error messages are given higher priority clock data will not be displayed
67. WE A68AD A68ADS2 A616AD 4 to 20 0 to 10 V Analog input 8 channels 4 to 20 mA O to 10 V Analog input 16 channels Extensible up to 121 chan nels means of the A60MX R E C esa _ a fosa Use with the A61AD the A616TD 16 3 First 16 vacant Last 16 vacant A D converter Multiplex unit 4 to 20 mA 0 to 10 V Multiplex devices IC relay Analog input 16 channels Multiplex unit 4 to 20 mA O to 10 V Multiplex devices Mercury relay Analog input 16 channels A60MXR For temperature detection with a thermocouple with the AGOMXT connected 0 to 10 V O to 20 mA with the A70MX R connected Temper ature digital conversion unit Multiplex unit Temperature detection by a thermocouple in conjunction with the A616TD Temperature input 15 chan nels A62DA Analog input 2 channels A62DAS1 Analog input 2 channels A84AD Special function module Use with A60MXT A616TD D A converter 48 First 16 Analog 2 channels vacant Last 32 A D D A converter 05951 standards AJ72R25 For remote station 26a interface special Memory AD59 32K bytes memory may be card connected to any printer 32 03A Centronics conforming to Centronics Coaxial data EV 5 S link unt A0J2CPUR25 For remote
68. and a request code The request code labels the sent data as free data and must be specified within the range 0x80 and OxFE Argument three contains the send data Argument Formats ARGUMENT 2 ARGUMENT 3 Number of Bytes Request Code Write Data 66253 6 82 6 PROGRAMMING EXAMPLE A7BDE A3N PT32S3 FREE DATA SEND itinclude lt stdio h gt iinclude lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD A7BDE A3N PT32S3 FREE DATA SEND This program sends free data to local A7BDE J71P21 R21 station one mod 0 arg1 demand 0x40 arg1 loop 0x00 arg1 station 0x01 buff2 0 0x09 buff2 1 0x80 buff3 0 A buff3 1 7 buff3 2 buff3 3 D buff3 4 E buff3 5 buff3 6 A buff3 7 3 buff3 8 N ret path mod amp arg1 arg2 arg3 printf Return value free data send x n ret CLOSE 6 83 IB 66253 A 7 TROUBLE SHOOTING 7 TROUBLESHOOTING This section explains the procedure determining the cause of problems and the errors and corrective actions for error codes 7 1 Troubleshooting Flow Charts Details for fault finding m
69. as a master or local station of MELSECNET Two Tier System A7BDE A3N PT32S3 AS the MASTER STATION Master station Remote station Local station 1 When the PC A7BDE A3N PT32S3 is used as a master station it supervises the network and con ducts link parameter settings 2 A maximum of 64 stations may be connected 3 Access to remote stations is conducted using the interface driver and Library functions Two Tier 1 A maximum of 64 stations may be connected Remote Remote station station 2 3 IB NA 66253 2 SYSTEM CONFIGURATION MELSEC 4 The following diagram shows the A7BDE A3N PT32S3 configu rated as a local station of MELSECNET Three Tier System A7BDE A3N PT32S3 AS LOCAL STATION OF the THIRD TIER Master station Local station Local station 1 The A7BDE A3N PT32S3 may be configurated as a Remote Local station Remote local station of a third tier MELSECNET network but station station not as the master station 2 Sixty Four stations may be connected to a two tier loop but only sixty three to a third tier loop Master station Local station Local station Three Tier Remote 1 0 Local station Local station station 2 4 IB NA 66253 A
70. of transfer bytes C head Number No of transfer bytes D head Number No of transfer bytes 60 W head Number No of transfer bytes Special D head Number 68 MELSEC X head Number No of transfer bytes Y head Number No of transfer bytes M head Number No of transfer bytes L head Number No of transfer bytes S head Number No of transfer bytes B head Number No of transfer bytes F head Number No of transfer bytes Special M head Number No of transfer bytes T head Number No of transfer bytes C head Number No of transfer bytes D head Number No of transfer bytes W head Number No of transfer bytes Special D head Number No of transfer bytes Device ranges to be transferred are specified by setting the head device number and the number of bytes e g D40 to D59 D head number Number of bytes 0x28 0x28 A APP 60 IB 66253 A APPENDICES APPENDIX 14 Link Parameters and I O Assignment Argument Table Before attempting to set the link parameters we recommend that section four of the Type Data Link Users manual is thoroughly read and understood Link Parameters Slave station attributes each bit 0 1 L R station Set all bits to 0 except for the total number of slave stations 10ms to 2sec 10ms increments LINK W D T Setting Time ms ee Setting Total number and range of W Registers L used in
71. points 32 48 and 64 points can be reserved for empty slots in anticipation of future system extension Reserving points makes it easy to extend and modify sequence programs since it is not necessary to change the addresses for each of the modules 1 be reduced 48 points by A35B base unit setting 0 to 3 slots 2 32 point module be loaded by setting 32 points to the empty slot 3 AJ72 P25 R25 4 1 module Link module 32 inputs 32 inputs 32 inputs 16 outputs gt c o a 2 16 outputs m ee 00 20 1 A65B base unit Power supply module 32 outputs 16 outputs 4 34 1B NA 66253 A 4 GENERAL OPERATION MELSEC 4 2 Precautions related to assignments a With the SCPU slots 0 and 1 are used by the system When setting assignments assign the special 32 points for slot 0 and the special 32 points and special 48 points for slot 1 which set by the I O points setting jumpers See Section 4 11 Slot 0 is used for the transfer of data between SCPU and IFMEM Assign to the special function module 32 points Slot 1 is used for the MELSECNET MINI S3 master mod ule Assign to the special function mode 32 48 points b When configuring remote I O system with the SCPU as the master station all remote 1 0 station
72. 10ms increments 2 29020 Constant scan Specified by user 10ms 0 Constant scan function unused cem 1 to 200 Constant scan function used program executed at value of scan time is stored into D9019 in BIN code Stores the year least significant two digits and month in BCD Example sess 22412 E11 D of Pere eee a 1987 Clock data Clock data Year month July Example 219 4 1 1 2 3151 10 2 29026 Clock data Clock data Day hour o clock Example B15 sssovs 12 271 1 7 he 35 minutes Minute Second Stores the day of the week in BCD Example B15 sss 217 58 7 mma Friday T Clock data Day of the week D9028 Clock data day of the week 0 must be set o Sunday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday _ 6 Saturday The value that 09044 contains is used as sampling trace condition when the sampling trace instruction STRA STRAR is executed by switching on off M9044 Step or for sampling i from the peripheral equipment 0 for scan Time in 10ms increments for time The value is stored in BIN D9044 For sampling trace APP 16 IB NA 66253 A APPENDICES Number Name __ Stored Data Description Output module numbers in units of 16 points of which fuses have blown are D9100 entered in
73. 62 1B 66253 APPENDICES A MELSEC L R Station Transmission Range L station transmission range arg3 n Relative L n 1 01 head address Range of W sent by L station to M n 2 L and other L stations n F3 Number of words H n 4 Relative L n 5 10 1 head address n station to M n 6 Number of words n 7 Relative L Ran Y at L station ge of Y sent n 8 head address bv etalon 9 Number of words n 10 Head number Head of X received by M station X at M station n 11 Relative L X at L station 1412 head address 52 E n 13 Number of words n 14 Head number Head of Y sent by M station Y at M station R station transmission range arg3 tn Relative L n 1 Range of W sent by R station to n 2 M station n 4 Range of X sent by R station to n 5 M station X n 6 n 7 n 8 n 9 n 10 n 11 nd 12 n 13 n 14 Number of words Relative L head address H Number of words Relative L 0 1 head address H Number of words 0 1 head address L H Range of W received by R station from M station Range of Y received by R station from station Y Value between 0 and 7FH Whether the corresponding data has been set or not is judged by the most significant bit at the relative head address Most significant bit 0 Set Relative L Most significant bit 1 Not set 0 h
74. A3N device memory High Speed Batch read 206 6 64 Device 1 Memory Batch write 2 6 66 Random read 5 207 awe oes re 670 ase 67 Random write Reading LED status e 7 3252 A7BDE A3N Reading switch status 701 Page 6 74 CARD 253 board version read 7 STATUS Card Status MONITOR Monitor and and contro CONTROL Resetting A3N indicator General General Data free transmission data data Resetting board em rae es NO N J tw OO amp 9 eo _ 0 a 6 24 IB 66253 6 PROGRAMMING 6 17 Explanation of Access Function Specification Sheets Specification of Function Function Operation ACCESS FUNCTION LIBRARY A CPU DEVICE TEST Specification Explanation of Function Processing Argument Arguments Formats Format Argument Two Format Argument Three Please note that the arguments are set in multiples of bytes 6 25 66253 6 PROGRAMMING MELSEC Specification Function A CPU Memory Access Application Batch Read Function Name nlir
75. AJ35T JB data link AJ35T JBR No of Occupied Stations No of Occupied Stations Usable Master Module Modes Description Allows the building block type modules to be used as remote units e Max number of modules 8 VO points 128 points Number of occupied stations 4 8 12 16 selected by switch Data Link Module for optical data link twisted pair data link See left BB uM BH u 4 stations connection interface board Twisted pair Twisted pair cable for MINI S3 link O shield cable User prepared in accordance with Section 4 4 Optical fiber Optical fiber cable for MINI S3 link User prepared in accordance with Section 4 3 unit Input side sink type 12 24V DC 64 points Output side transistor output 12 24V DC 100mA point 64 points Interface for external equipment conforming to RS 232C interface specifications 1 RS 232C channel General each 4 points Mount type operating box for optical data link twisted pair data link Character display key input unit Character display gt 3 lines by 30 columns LCD Sheet keys So See s 8 keys Touch keys 24 LED display IPTE 8 Portable type operating box for twisted pair data link Joint box for twisted pair data link
76. DS Receive buffer segm mov dx di DX Receive buffer offs mov bx ax Handle number mov ah AH Function code mov al IOCTL READ Receive specify mov IOCTL READ SIZE CX Receive data size DOS INT common err mov cs byte ptr si INT A 575 END MOV bx cs word ptr handle no mov ah DRV CLOSE int DOS INT jc common err mov al cs byte ptr di mov cs byte ptr int code al push cs pop es mov bp offset prm area MOV bx bp mov ax cs word ptr func db INT_OP_CODE db 00h jmp common_end mov ax ERR FOUND ret endp 85 IB 66253 APPENDICES MELSE CA 331 332 333 4 Subtract number trnsfer 334 3 CX Trnsfer word number 335 jkkebckcepbopooecpedreleeleeleololeberereerckoroeleioereeoolorceeeloerolerceredelerekeeroleroeoereeoeolokorokereleook 336 prm set proc near 337 push di 338 push bx 339 mov bx bp 340 mov di offset prm area 341 prm set loop 342 mov ax ss word ptr 6 6 343 mov cs word ptr di ax 344 add bx 2 345 add di 2 346 loop prm_set_loop 347 pop bx 348 pop di 349 ret 350 prm set endp 351 RRKRAKAKAK RAK A EAA EAE REE REKAE RARE KE EERE EE ERE AEE EAE EEE EEE EERE ERE EERE 352 Work area for library 353 354 set db 00h 355 int_a_set_rs4 db 00h 356 int a set net db
77. F is stored the value of D9124 is maximum 8 APP 17 IB 66253 APPENDICES CNembe Name Stored Data Description When one of to 255 is turned on by OUT F or SET F F number which has turned on is entered into D9125 to D9132 in due order F number which has been turned off by RST is erased from D9125 to 09132 and the contents of data registers succeeding the data register where the erased F number was stored are shifted to the preceding data registers By executing LED R instruction the contents of D9125 to D9132 are shifted upward by one This can also be performed by the indicator reset operation in the board information of the option board setting When there are 8 annunciator detections the 9th one is not stored into D9125 to 9132 even if detected SET SET SET RET SET SET SET SET SET SET SET F50 F25 F19 F25 F15 F70 F65 8 F110F151F210 LEDR lt lt lt 0077074 777477 707 wo aa Annunciator Annunciator detection detection number number 0900000000005 nog BOE sea 46 jno 09132 18 IB 66253 A _ APPENDICES POINT 1 All special register data is cleared by any of the power off latch clear and reset operations The data is retained when the RUN STOP switch is set to STOP For the above special registers marked 1 the con tents or register are not cleared if normal statu
78. Number of words 0x00 0 8000 48 49 4 Main program capacity Total number bytes 0 00 0 800 Sub program capacity 0x00 0 800 Total number bytes 4C Bit 2 Data memory set n 40 O Not set c o E a gt 5 2 Bit 2 File register set 4E Status latch 4F 50 2 assignment gt 400 See link parameters appendix Link parameters Z 1 Not including T C setting area 1K 2 Not including T C setting signal flow escape setting areas APP 47 IB NA 66253 A APPENDICES MELSEC Parameter Settings Memory Area A0J2 Fixed values Latch setting 1 Microcomputer head address Step relay 2 No settings 2 EM 2 2 1 0 Latch 1 Half Latch 2 All Latch 2 FF Yes No e 48 1 66253 NRA Dm ET sm A add rox mm rm I i Ira uon ee Lai i I Mat M APPENDICES Working Area Memory Map ACPU RUN STOP Status OX7FFF 0xa000 0 000 0 7000 40 Oxad40 0x70d40 Memory Protect Byte Oxd600 Oxad40 Oxad40 40 0x70d40 0xd800 0xd800 0 72000 0x9d20 Oxad40 Oxad40 0x70d40 BE A Information Area Byte 2 Table Explanation 1 A C
79. Output writing procedure A3 A3ECPU only Read the value at the CPU module address 2 to CPU module READY flag read the peripheral YO to 7FF Ready Write the following data to the CPU module addresses Y write 2 The data written is as follows OADA2 SET RESET 1 Y set selection 2 Y reset Bit pattern for 8 Y points QADAH L Y addresses Addresses 8200 8 QADASH APP 29 IB NA 66253 A APPENDICES CPU 2 vove Internal relay M Latch M L S relay L 0 to 2047 Step relay S All devices are in one bit locations and store device ON OFF data using eight bits at Link relay B BO to 3FF seven addresses O indicates OFF and 1 ON FO to 255 Example MO to 23 are as follos Odd area B1 5 Meesosesssestupsequeeceteasrevenupssisevevve B8 B7 B6 B5 B4 B3 B2 B1 BO 9ow 2 Mi MO Spec spero praem rw ve relay M opener anne Timer T contact to TO to 255 Stores PC operation results and 87 allows read write Counter C cond CO to 255 Timer T TO to 255 CO to 255 Even area APP 30 IB NA 66253 A APPENDICES MELSEC Data register D Link register TO to 255 All devices consist are in 2 byte 16 bit locations Example DO configuration is as follows
80. Peripheral and MCPU 1 Operation is stopped when the remote PAUSE instruction is received from the peripheral and the next scan has been executed to the END FEND instruction 2 Operation is resumed when the remote RUN instruction is received from the peripheral Remote PAUSE instruction Remote RUN instruction PAUSE status M9041 contact RUN STOP status Switched ON when the PAUSE condition is switched PAUSE status PAUSE Timing by Peripheral and IFMEM 4 45 IB NA 66253 A _ 4 4 32 STATUS LATCH APPLICATION The status latch can be used to check device data when a given condition is satisfied during debugging FUNCTION 1 Definition The status latch function allows the contents of all devices to be stored in the status latch area when the SLT instruction is executed The date stored in the status latch area can be read and monitored by a peripheral with an exception of the PU 2 Stored data a The content of the devices stored in the status latch area are the following 1 Y M L S E B ON OFF data 2 T C ERER PE S AE E CN E Contact coil ON OFF data and present value of contacts and coils 3 D W A Z V Rovere Stored data 3 Data storing timing a Data is stored into the status latch area when the SLT instruction is executed Any device data that has changed after the execution of the SLT instruction is not
81. addresses are 0 800 to Ox1FFF C notation for hexadecimal i e 800 1 802 804 SCPU Address Access Function Address 1 When specifying addresses with personal computer func tions the least significant first byte of the buffer memory becomes the smaller number For example if address 0 of the buffer memory is to be read or written using the personal computer function specify the least significant byte as 800H and the most significant byte as 801H 4 6 IB NA 66253 A _ 4 GENERAL OPERATION 4 8 The High Speed Access Device Memory The high speed access device memory is used as an interface when transferring data to and from the PC application program and the SCPU device memory area i e monitoring or controlling the status of the devices X Y M L S B F T C contact coil and present value D and W registers of the SCPU Details of the specific access functions are provided in the programming section 4 9 Data Transfer The diagram below shows the general sequence of communica tions between the application program the high speed access device memory and the SCPU device memory A7BDE AS3N B C Q SCPU Device Memory Application Program 1 Data is transferred to and from the PC application program to the high speed access device memory Since access is to the high speed access device memory and not the SCPU device memory there
82. areas must be assigned when setting I O assignments assignments cannot be made for only some of the slots remote stations 2005 IB 66253 A 4 GENERAL OPERATION MELSEC 2 4 27 SCPU Functions The SCPU functions are listed below Executes the sequence program at the predetermined intervals independently of the scan time Section 4 28 Retains device data if the PC is switched off or reset or if power failure instantaneous power failure occurs 20ms or longer Section 4 29 data retention L B T C D and W can be latched Setting allowed between 10 and 2000 ms Remote RUN STOP Allows remote run stop from external device e g peripheral external Section 4 30 input computer with RUN STOP switch in RUN position Stops operation with the output Y status retained Pause function may be switched on by any of the following ways RUN STOP switch on the front of the CPU Section 4 31 Remote pause contact Peripheral Stores all device data to the status latch area of the memory cassette Section 4 32 when the status latch condition is satisfied Section 4 33 The stored data can be monitored by the peripheral Samples the specified device operating status at predetermined intervals and stores the sampling result in the sampling trace area of the memory cassette The stored data can be monitored by the peripheral
83. ax sS word ptr ARG_MODE bx cs word ptr SET_MODE di ax ax cS word ptr func ax FUNC_SYNC prm_set_end ax ss word ptr ARG_ARG1_ADR_O bx cs word ptr SET_ARG1_ADR_O di ax ds cs word ptr SET ARGI ADR S di ax ax ss word 0 ARG2 ADR O bx cs word ptr SET ARG2 ADR O dil ax ds ax es word ptr SET ARG2 ADR S di l ax ax sS word ARC3 ADR O bx APP 78 iB NA 66253 A APPENDICES 386 381 388 389 390 prm set end 391 392 393 394 prm set 395 396 397 398 int set a3n 399 int a set rs4 400 int net 401 nm a3n 402 db 403 drv nm rs4 404 db 405 drv nm net 408 407 int a no a3n 408 int a no rs4 409 no net 410 handle no 411 func 412 prm area 413 text 414 mov push pop mov pop POP ret endp Work area for library 5 3 E S 43 E 3 gt 3 3 3 gt gt gt 3 3 gt 3 db db db db 00h db 00h db db db db db dw dw dw ends end es word ptr SET ARG3 ADR O di ax ds ax cs word ptr SET 63 ADR S di ax bx di 00h 00h 00h M ASN M RS4 M MNET 00h 00h 00h 00h 0000h 2 10 dup APP 79 MELSEC A IB NA 66253 A APPENDICES MELSEC fa C Cn 4 WN 80 132
84. capacity of CPU has been set and then write to CPU has been per formed 1 There is no END FEND instruc tion in the program 2 When subprogram has been set in parameters there is no END instruction in the subprogram 1 There is no jump destination or plural destinations specified b the CJ SCJ CALL CALP or instruction 2 There is instruction and no setting of subprogram 3 Although there is no in struction the instruction exists in the program and has been executed 4 SCJ CALL CALLP instruction has been executed with its jump destina tion located below the END instruction The number of instruc tions does not match that of instruction 6 The instruction specified between FOR NEXT has caused execution to deviate from between FOR and NEXT 7 The instruction has caused execution to deviate from the subroutine before the instruction is executed 8 The instruction has caused execution to jump to a step or subroutine between FOR and NEXT 7 7 Corrective Action 1 Read the error step by use of peripheral equipment and cor rect the program at that step 2 In the case of ROM rewrite the contents of the ROM or change the ROM Check the loading of CPU mem ory and load it correctly Read the parameter contents of CPU memory check and cor rect the contents and write them to the memory again Write END at the en
85. case the 10ms timer present value is incremented by 1 every scan and the 100ms timer present value is incremented by 1 every 10 scans Allowed Executed IB NA 66253 4 GENERAL OPERATION 4 21 SCPU Self Diagnosis The self diagnosis function detects the occurrence of abnormal conditions within the CPU The special function modules self check for error at power on and during run When any error is detected the CPU indicates the error and stops operation to prevent faults and ensure reliable opera tion At error detection The CPU may operate in either of two modes These are the processing stop mode and the processing continue mode In the processing continue mode the CPU may be able to continue step processing for some types of errors according to the parameter settings The occurrence and content of the error are stored in special relay M and special register D These should be used in the program especially when in the continue mode to prevent malfunction of the programmable controller or machinery If the self diagnosis function is in the processing stop mode operation is stopped at the point the error is detected and all outputs Y are set to OFF If the self diagnosis function is in the processing continue mode the program is executed continuously except for the portion in which the error occurred When module ve
86. for twisted pair link ENCII 9 so Connector for the This connector is used for an optical fiber cable when communication with remote units is optical fiber cable conducted via an optical data link RD IN Connected to SD OUT of the previous station SD OUT Connected to RD IN of the succeeding station Indicates the operation status of the MELSECNET MINI RUN Lit when master module is operating normally Out when a hardware error occurs LEDs for operation Flickers during data sending status display Flickers during data receiving RE Lit when receive data error occurs Lit when loop error occurs RME Lit when communication error occurs in a station within the loop Dg e ee IB NA 66253 Installation socket for the initial data ROM Installation socket for the message This socket is used to install the ROM containing the initial data when the master module is used in the extension mode The ROM need not be when the master module is used in the dedicated mode Initial data is written to the ROM using the SW type system floppy disk This socket is used to install the ROM containing message data used for display on the LCD of the operating box when the operating box is used in the MINI S3 link The ROM need not be installed when the operating box is not used Message data is written to the ROM using the SW MINIP type system floppy disk IB
87. front panel flickers c WDT ERROR is displayed when the setting of the option board is set to board information Scan time WDT value Excess of the set value resuits Sequence program END in WDT error operation processing time END instruction executed Step 0 WDT reset after END is executed IB NA 66253 A 4 GENERAL OPERATION 6 Resetting method The WDT present value is reset when the WDT reset WDT instruction is executed in the sequence program The WDT restarts timing at 0 The execution of the WDT instruction will not reset any scan time stored in D9017 to 9010 WDT executed WDT reset END Step 0 executed 7 Step 0 ud dle WDT WDT error occurs when WDT value A or B value reset exceeds the preset value Scan time 7 the WDT error has occurred check the error definition according to Section 10 reset and remove the cause of error IB NA 66253 A 4 MELSEC 4 19 Operation Processing at Instantaneous Power Failure Occurrence The SCPU detects any instantaneous power failure when the input line voltage to the power supply module falls below the defined value If the instantaneous power failure time is within the allowable value 10 ms the SCPU performs instantaneous power failure processing as described below 1 Instantaneous power failure within 10 ms a The operation processing is stopped with the output
88. int jc int start mov mov push mov mov mov bx cs word ptr handle_no ah DRV CLOSE DOS INT common err al cs byte ptr di cS byte ptr int code al CS es bp offset prm area bx bp ax cs word ptr func APP 77 IB 66253 A APPENDICES MELSEC 331 332 333 334 335 336 331 338 339 340 341 342 343 344 345 346 341 348 349 350 3912 352 db int code db jmp common err mov common end ret common prc endp INT CODE 00h common end NOT FOUND EAE AAA AKA eoe eek eoe ke ee KER eee eoe ex Subtract number trnsfer RAE prm set proc push push mov mov mov cmp jne mov mov mov mov push pop mov jmp prm setl0 mov mov mov mov mov cmp je mov mov mov mov mov push pop mov mov mov push pop mov mov near di bx bx bp di offset prm area ax cs word ptr func ax FUNC OPEN prm setl10 ax Ss word ptr OPEN CHAN ADR bx ptr OPEN SET CHAN di ax ax Ss word OPEN PATH ADR bx cs word ptr OPEN SET PATH O di ax ds ax cS word ptr OPEN SET PATH S di ax prm set end ax ss word ptr ARG PATH ADR O bx cs word ptr SET PATH ADR O di l ax ax Ss word ptr ARG PATH ADR S bx cs word ptr SET PATH ADR S di ax ax cs word ptr func ax FUNC CLOSE prm set end
89. is made to a maximum of FFFFH RESET to return the count to 0 Number of receive error detection times Total number stored Stores the local station number which is in STOP or PAUSE mode Local station operating status Stores the status of stations 1 to 16 Device 080221 Number 16 1 1 12 11 b7 be bs ba b2 bt Do2so Las a7 ras Las Lea tas Lez Lan ao cas ae ra tse 35 caa css D9251 1 64 1 63 162 61 60 159 1 58 57 556155 154 553 152 151 150 149 Stores the status of stations 17 to 32 Local station operating status Local station Stores the status of D9250 operating status stations 33 to 48 The bit corresponding to the station number which is in STOP or PAUSE mode becomes 1 Example When local stations 7 and 15 are in STOP mode D9251 Local station Stores the status bits 6 and 14 of D9248 become 1 and when 09248 is operating status stations 49 to 64 monitored its value is 16448 4040H Stores the local station number other than the host which D9252 Local station error Stores the status of is in error stations 1 to 16 Device Number jess esa ors osa on oto vo be 57 5s es ez ot bo us nepos on oro vs 1 o 15 16 13 12 as uer ute Les L
90. n where m device number n hexadecimal value of device number Meaning of T C set values T C set values are stored as hexadecimal values as shown in the table below Ladder Example in Program Setting in Program Setting in T C Set Value Area KO K1 to K9 K10 to K32767 AP 734711771 L aL at 4t J i aa medi Calculation of Control Protocol value Km 0000 Dm 8000 2n where device number hexadecimal value of device number APP 53 IB NA 66253 A APPENDICES MEL SECA APPENDIX 11 System Data Table 10 12 14 16 DEVICE NUMBER 18 20 22 fh Ci 1 HEAD ADDRESS PARAMETER DEFAULT VALUE 2 HEAD ADDRESS OF TYPE NAME 28 31 32 L M H 35 CPU WITHIN 5 CHARS SPECIAL M DEVICE NUMBER 37 SPECIAL D For CPU codes 0xA2 0xA3 and OxAB system data addresses 31 to 38 do not exist 1 Contains head address of paramater default value table 2 Contains head address of CPU Type Name in ASCII Coding Six Byte Table Five Bytes Code One Byte Null APP 54 IB 66253 APPENDICES APPENDIX 12 Special Function Module Buffer Memory Access The following tables give the memory addresses and their corresponding TO FROM Instruction Addresses of the various special function modules Refe
91. number assignment Setting of remote RUN PAUSE contact Operation mode at the time of error Special function F number display Display of only F number or alternate display of F number and comment Only alphanumeric char acters may be displayed for comment Annunciator display mode Operation status Output before stop prior to stop is or after operation re output execution All 128 characters Maximum 6 digits in STOP RUN display mode IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 4 25 SCPU Memory Operation The SCPU has two memory modes RAM operation and ROM operation The memory maps for RAM operation and ROM operation are shown below The types of data stored vary depending on the parameter settings a RAM operation Beginning with the head address the mapped RAM memory is in order the parameter area the main program and sub program Beginning with the last address the mapped RAM memory is in order the comment the file register status switch and sampling trace areas b ROM operation The parameters and main program are stored in the ROM area The sub program is contained from the head address Beginning with the last address the mapped RAM memory is in order the comment the file register status switch and sampling trace areas 4 31 NA 66253 A 4 GENERAL OPERATION MELSEC RAM operation RAM o
92. of the forward loop line M9226 Reverse loop error pid p Depends on the error condition of the reverse loop line OFF Unexecuted ON Forward or re Depends on whether or not the master station is execut verse loop test ing a forward or a reverse loop test being executed M9227 Loop test status OFF RUN or STEP Local station RUN mode Depends on whether or not a local station is in STOP or operating status ON STOP or PAUSE PAUSE mode mode M9233 Loca station OFF No error Depends on whether or not a local station has detected an error detect ON Error detected error in another station Local or remote VO station parameter error ON Error detected detect OFF No error Depends on whether or not a local or a remote station has detected any link parameter error in the master station M9235 Local or remote station initial communicating status M9237 Local or remote OFF Normal Depends on the error condition of a local or remote I O VO station error ON Error station Local or remote M9238 VO station OFF Normal Depends on the error condition of the forward and OFF Noncommuni Depends on whether or not a local or a remote station cating is communicating initial data such as parameters with Communicating the master station M9236 forward reverse ON Error reverse loop lines of a local or a remote station loop error APP 20 IB
93. program is stored in a ROM during normal operations b Latched unlatched device data is stored in the SCPU module The data in the latch range is therefore lost if the battery connector is disconnected while the power is off 4 40 IB 66253 A 4 GENERAL OPERATION MELSEC 4 4 30 REMOTE RUN STOP APPLICATION a RUN STOP may be executed at remote locations without controlling the RUN STOP switch on the SCPU front panel when 1 The SCPU is out of reach 2 The SCPU is contained in a control box FUNCTION 1 Definition The Remote RUN STOP controls run stop of the SCPU from an external device e g peripheral external input IFMEM when the RUN STOP switch is in the RUN position 2 Operation 1 Remote stop The SCPU is set to STOP after the sequence program is executed up to the END FEND instruction 2 Remote run After remote stop remote run sets the SCPU back to RUN to execute the sequence program from step O OPERATION a Remote RUN STOP may be executed using one of the following methods 1 Remote run contacts external input to be set by the peripheral 2 Peripheral 3 IFMEM Remote run contacts RUN STOP of the SCPU is conducted by setting to ON OFF the remote RUN contacts specified by the parameter settings as shown below 4 41 IB NA 66253 A 4 GENERAL OPERATION Remote run contacts pud LN RUN state ON STOP state St
94. stored into the status latch area 6 The following circuit provides an example of data storage when the SLT instruction has been executed Circuit Example Y10 OUT instructions switched ON OFF by the same input X0 exist before and after the X SLT instruction 1 517 yn IB NA 66253 A 4 GENERAL OPERATION Timing chart D OUT Y10 D OUT Y11 2 SLT y Enc OUT Y12 END a UNI ON OFF 1 d The following data is stored into the status latch area when the SLT instruction is ex ecuted Monitoring the status latch data _ ON ON OFF 10 X1 10 and Y11 are on as they were before the vi execution of the instruction SLT XO 12 gt 1 Y12 is off even when is as Y12 was off at the execution of the SLT instruction OPERATION a Setting the status latch area The parameter setting of the peripherals with the exception of the PU set the status latch area and are written to the SCPU b Executing the status latch Data is written to the status latch area when the SLT instruction is executed using the sequence program c Resuming the status latch To Reset the SLT instruction by euecuting the SLTR instruc tion This will cawse the SLT instruction to be executed again after it has been executed in the sequence program CAUTION 1 Execution of the
95. the RUN STOP switch is in STOP RUN Executes operation of sequence program STOP Stops operation of sequence program RUN STOP key switch PAUSE Stops operation of the sequence program while maintaining output status of conditions existing just prior to the pause STEP RUN Executes step operation of the sequence program ERROR LED Lit A watch dog timer error or self diagnosis error occurred due to faulty hardware Flicker Annunciator F was set 5 5 IB 66253 5 PRE OPERATION SETTINGS AND PROCEDURES Indicates SCPU operation status Lit Operation being conducted with RUN STOP key switch in either RUN or STEP RUN RUN LED Extinguished Operation stopped with the RUN STOP key switch in either STOP or PAUSE WDT error code 25 error has occurred Flicker An error stopping operation occurred during self diagnosis Flickering also occurs for about 2 sec when a LATCH CLEAR has been executed Connector for peripherals 4 RS 422 connector Use protective cover when not use Connector for the n battery leads Connects the K6BAT red lead to terminal of CONS blue lead to the terminal of CONG Connects ROM in which the sequence program is loaded Ensure that the installed memory is 17 ROM socket of the same type pe Even and odd address memories should be installed in the EVEN and ODD locations respectively 5 6 IB NA 86253 A
96. the appendix Explanation This function is used to read data from the host A7BDE A3N 253 and stations of MELSECNET The operation of the function is defined by four arguments which have the following specification Mod specifies the calling mode of nl1receive 0 1 0 Wait for completion of communications processing 1 To immediately receive a return value and continue with additional programs If ret is less than zero communications processing is incomplete 6 17 IB NA 66253 A 6 PROGRAMMING MELSEC 4 SPECIFICATION nltreceive Argument one is a structure as defined in the include file lt nyuserc h gt which specifies the request details i e processing code loop number and station number e g struct NL1LARGE short demand short loop short station Where demand Processing code loop Loop number set at 0 station Station number 00 to 64 Arguments two and three specify the request and receive data location The format of the memory tables depend upon the operation processing code Examples are given in the following section 6 18 IB NA 66253 A 6 PROGRAMMING SPECIFICATION nl1send Function Writes data to the host A7BDE A3N PT32S3 and stations of MELSECNET Syntax include lt nyuserc h gt ret nl1send path mod amp arg1 arg2 arg3 Remarks short ret Returned value of function path Pointer of the opened path short mod C
97. to be accessed by the Device Driver Each board number setting has a corresponding Port Number Address that is allocated to the A7BDE A3N B C In addition an offset to this address may be specified by means of a jumper connector set to either 100H or 300H 1 The following table provides information regarding the board number settings the corresponding memory area head address and Port Numbers Memory Port Number Dial Area Head Address Number Head 0000 D4000H D8000H 5100H 5300H 1 Jumper Setting 100H or 300H 2 When setting the dial numbers ensure that the new settings do not conflict with those on previously installed option cards The board number must be set within the range O to 7 3 The dial number is set to zero when shipped 4 The jumper is set to 100H when shipped The above table shows the actual port memory locations corresponding to the dial and jumper settings Please note that the CONFIG SYS file requires the dial number 0 7 and jumper 100H or 300H settings not the actual port head address 5 18 IB 66253 5 PRE OPERATION SETTINGS AND PROCEDURES 5 16 A7BDE A3N B C Board IRQ Number Setting The board IRQ number indicates which option board is accessing the operating system 1 The following table gives the allowable A7BDE A3N B C IRQ identification numbers Dial IRO Number N
98. 00h 357 drv_nm_a3n db M ASN 358 db 00h 359 nm rs4 db M RS4 360 db 00h 361 drv_nm_net db M MNET 362 db 00h 363 int a a3n db 00h 364 int _ _ 54 db 00h 365 int a net db 00h 366 handle no dw 0000h 367 func dw 368 prm area dw 10 dup 369 melsec lib ends 370 end APP 86 IB 66253 The components on the printed circuit boards will be damaged by static electricity so avoid handling them directly If it is necessary to handle them take the following precautions 1 Ground human body and work bench 2 Do not touch the conductive areas of the printed circuit board and its electrical parts 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 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 j s jer lt lt 5 SEER ERIS 526060 MM SS 5 NRI im 556560666066 5 SS och x d MITSUBISHI
99. 13 Local station Stores the status of 99212 116115 114 113112111 10 19 L8 t7 t6 15 La L3 12 11 operating status stations 17 to 32 09213 1 2 131 130 128 128 127 126 125 124 L23 t22 t21 1 20 19 18117 09215 164 163 562 561 60 159 158 157 556 155 154 153 152 151 150 149 09214 Local station Stores the status Of when a local station is switched to STOP or PAUSE mode operating status stations 33 to 48 the bit corresponding to the station number in the register becomes 1 Sims dawn Example When station 7 switches to STOP mode bit 6 in 09212 becomes 1 and when 09212 is monitored its operating status stations 49 to 64 value is 64 40H APP 23 IB 66253 APPENDICES Device un Name 00000 Desi 00000000002 Stores the local station numbers which are in error D9217 D9218 D9219 Local station error detection Stores the status of stations 1 to 16 Device Number pss evo wo s 67 56 bs ba vs 62 Cone nens una urs oz en ee t 18117116115 14118 iz 164 Les Lee te use se e use use tse ss ree us 80 uas If a local station detects an error the bit corresponding to the station number becomes 1 Example When station 6 and 12 detect an error bits 5 and 11 in 09216 become 1 and when 09216 is monitored i
100. 2 arg1 loop 0x00 arg1 station OxFF buff2 0 0x02 buff2 1 0x00 buff2 2 0x08 buff2 3 0x00 buff2 4 Ox10 buff2 5 0x08 buff2 6 0x00 nllreceive path mod amp arg1 arg2 arg3 printf Return value mepu rnd 96X xn ret 0 while i lt 2 printf buff3 0 96x xn buff3 0 itr CLOSE 6 55 IB NA 66253 A 6 PROGRAMMING ACCESS FUNCTION LIBRARY IFMEM BUFFER MEMORY RANDOM WRITE Specification Function IFMEM Buffer Memory Access Application Random Write Function Name nlisend Processing Code 0 203 Driver Function Number 4H Processing Processing code 0x203 enables random write to the IFMEM buffer memory i e locations 0x800 to Oxifff Please see section 4 4 IFMEM Operation for further information Access station must be specified as Oxff Argument two specifies the number of points maximum of 24 Argument three specifies the sent data Each point is specified as follows 1 point 1 byte Designation 0 Bit Set ORs contents and bit pattern data 1 Bit Reset ANDs contents and bit pattern data 2 Byte Write Writes bit pattern data to address Address Memory address of specified device Bit Pattern Data to be written to the device 1 ON 0 OFF Argument Formats ARGUMENT 2 ARGUMENT 3 Number of Points Designation Address First Point Bit Pattern Designat
101. 21 AJ71R21 to one or less STOP to RUN or AJ71R21 are loaded 3 Reduce the interrupt module to PAUSE to 3 Two or more interrupt modules one STEP RUN are loaded 4 Re set the I O assignment of 4 In the parameter setting of parameter setting by use of A6GPP while VO module is A6GPP according to the actual actually loaded special func ly loaded special function tion module has been set in the module VO assignment and vice versa SP UNIT Access execution of FROM to TO Read the error step by use of ERROR instruction has been made to a peripheral equipment and check Checked at the location where there is no special and correct the content of FROM or execution of function module TO instruction at that step by use of FROM and TO peripheral equipment instructions 7 9 iB NA 66253 A 7 TROUBLE SHOOTING LINK PARA ERROR Checked at power on reset STOP to RUN PAUSE to STEP RUN OPERATION ERROR Checked at instruction execution BATTERY ERROR Checked continuously Not checked when M9084 is on Error and Cause 1 The contents which have been written to the parameter area of link by setting the link range in the parameter setting of A6PHP or are different from the link para meter contents for some reason The setting of the total number of slave stations is 0 1 The result of BCD convers
102. 2D unit No 7 Y2D X2E Y2E X2F unit No 8 Y2F X30 Y30 X31 unit No 9 Y31 Y32 Y33 Y34 Y35 Y36 Y37 Y38 Y39 3A 3B For remote terminal unit No 9 For remote terminal X32 Transmit complete signal For remote terminal X33 Read request signal unit No 10 Read complete signal unit No 10 X34 Transmit request signa For remote terminal X35 unit No 11 Read complete signal unit No 11 X36 Transmit request signal For remote terminal X37 unit No 12 Read complete signal unit No 12 ransmit request signal ead complete signal unit No 13 Transmit request signal For remote terminal Read complete signal unit No 14 For remote terminal x38 Transmit complete signal For remote terminal X39 Read request signal unit No 13 Transmit complete signal For remote terminal Y X3B Read request signal unit No 14 Y X3C Y3C X3D Y3D X3E Reserved Y3E X3F X40 40 X41 Y41 X42 Y42 X43 43 Receive data clear request AJ35PTF R2 X44 Y44 emote terminal unit error detection clear X45 45 46 46 47 Y47 X48 Y48 X49 X4A X4B XAC Reserved X4D X4E X4F Reserved 2 Reserved MINI S3 link communication start Reserved instruction response designation Faulty station data clear designation Switching buffer memory channel Error reset Y49 YAA Y4B Y4C Y4D Y4E Y4F Reserved 4 10 NA 66253 A 4 GENERAL OPERATION MELSEC 4 4 12 The SCPU 4 13 SCPU Operation P
103. 2S3 high speed memory mod 0 1 demand 0x209 1 loop 0x00 1 station Oxff buff2 01 0x02 buff3 0 0x02 buff3 1 0x00 buff3 2 0x88 buff3 3 0x00 buff3 4 Oxf0 buff3 5 0x02 buff3 6 0x01 buff3 7 0x88 buff3 8 0x00 buff3 9 Oxf0 ret nl1send path mod amp arg1 arg2 arg3 printf Return value HSM rnd wr ret CLOSE 6 71 18 66253 A ve 6 PROGRAMMING MELSEC 44 Specification Function A7BDE AS3N PT32S3 Board Control Application LED Status Read Function Name 1 Processing Code 0x700 Driver Function Number 3H Processing Code 0x700 enables reading of the host A7BDE AS3N PT32 3 network LED status indicators and self diagnosis error messages The access station number must be specified as OxFF Argument two requires no set data Argument three receives the returned data The error message is contained in the first sixteen bytes with the LED statuses transferred as bit values in the proceeding bytes Please see section SCPU Self Diagnosis for the various error messages The LED statuses and their corresponding bits are as follows o ww wwas o uc a ro oe s wwe wo 2 mu Row 3
104. 4 for each point of the timer T and counter C For example when SCPU refreshes TO through 255 for the H S M 512 and 256 are set in n3 and n4 respectively 4 8 IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 4 11 The A7BDE A3N PT32S3A MELSECNET MINI S3 Master Station Interface The A7BDE A3N PT32S3A option card provides an interface to the network MELSECNET MINI S3 by acting as the master station The functions of the A7BDE A3N PT32S3A are almost the same as those of the AJ71PT32 MELSECNET MINI S3 master station module and are regarded by the SCPU to be loaded in the second slot head address XY20 For further details please refer to the MELSECNET MINI S3 Master Station User s Manual The communications between the ACPU and the A7BDE A3N PT32S3A MELSECNET MINI S3 master station option card are given in the table below 1 Dedicated Mode Signal Name Signal Name X21 MINI link communication Not used in progress NNI II MINI link communication start z m used EMIT HM instruction re rr Error station data link spe MINI link communication EN Xac Not used reset Not used Not used 1 The A7BDE A3N PT32S3A uses D sub connector for the twisted pair data link not screw terminals as with the AJ71PT32 Details on the construction are provided in the appendix ue 2 It is not possible to monitor the I O status of the remote station with the monitor
105. 7BDE A3N PT32S3 high speed device memory i e SCPU device status Please see the appendix for head addresses and read data format Argument two specifies the number of points and their corresponding memory addresses The maximum number of points that may be set in one argument is 40 Argument three receives the returned data Argument Formats ARGUMENT 2 ARGUMENT 3 Number of Points Second Point Data Address Address 6 68 1B NA 66253 A 6 PROGRAMMING amp include lt stdio h gt i include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 OPEN OF I F BOARD A7BDE A3N PT32S3 HIGH SPEED MEMORY RANDOM READ This program reads and displays the present value of timer TO from the host A7BDE A3N PT32S3 high speed memory mod 0 arg1 demand 0x207 arg1 loop 0x00 arg1 station Oxff buff2 0 0x02 buff2 1 0x00 buff2 2 0x98 buff2 3 0x00 buff2 4 0x01 buff2 5 0x98 buff2 6 0x00 nl1receive path mod amp arg1 arg2 arg3 printf Return value HSM rnd ret printf buff3 0 96x Nn buff3 0 printf buff3 1 96x Nn buff3 1 CLOSE 6 69 IB NA 66253 A 6 PROGRAMMING
106. 8 points 2 Word devices T C present value D W R A Z V Maximum 3 points 4 48 IB 66253 A 4 GENERAL OPERATION MELSEC 4 a Setting the sampling trace area Specify the sampling trace area using a peripheral with the exception of the PU and write to the SCPU 5 Setting the sampling trace data Set the following data using a peripheral with the exception of the PU and write to the SCPU 1 Number of sampling trace times 2 Devices to be traced 3 Sampling period c Starting the sampling trace Sampling trace may be initiated using one of the two following methods 1 Peripheral with the exception of the PU 2 Switching on M9047 d Terminating and stopping the sampling trace To terminate By executing the STRA instruction in a sequence program sampling is executed the specified number of times data is latched and the sampling trace is terminated To stop Sampling trace may be stopped by either of the following methods Using a peripheral with the exception of the PU Switching OFF M9047 e Checking the sampling trace area data using the peripheral with the exception of the PU f Resuming the sampling trace Execute the STRAR instruction using the sequence program to resume the sampling trace 4 49 IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 34 STEP RUN APPLICATION The high speed of normal SCPU operation sometimes makes timing diff
107. 9009 When one of FO to 255 is turned on by OUT F or SET F the F number which has been detected earliest among the F numbers which have turned on is stored in BIN code D9009 can be cleared by RST F or LEDR instruction or moving INDICATOR RESET switch on CPU front to ON position If another F number has been detected the clearing of D9009 causes the next number to be stored in D9009 When operation error has occurred during execution of an application instruction the step number at which the error has occurred is stored in BIN code Thereafter each time operation error occurs the contents of D9010 are renewed Annunciator detection F number at which external failure has occurred Annunciator detection udi D9014 VO control mode Step number at which operation error has occurred When operation error has occurred during execution of an application instruction the step number at which the error has occurred is stored in BIN code Since storage into D9011 is made when M9011 changes from off to on the contents of D9011 cannot be renewed unless M9011 is cleared by user program Step number at which operation error has occurred set mode is represented as follows VO indirect mode Input in refresh mode output in direct mode in refresh mode control mode number Wm d APP 14 IB NA 66253 A APP
108. AMMING EXAMPLE A7BDE A3N PT32S3 GENERAL RESET Hinclude lt stdio h gt lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 128 char buff3 2048 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A7BDE A3N PT32S3 GENERAL RESET This program performs general reset of the host A7BDE AS3N PT32S3 mod 0 1 demand 0x800 arg1 loop 0x00 arg1 station Oxff ret nlisend path mod amp arg1 arg2 arg3 printf Return value general reset 96x wn ret CLOSE 6 79 IB NA 66253 A 6 PROGRAMMING ACCESS FUNCTION LIBRARY A7BDE A3N PT32S3 INDICATOR RESET Specification Function A7BDE AS3N PT32S3 Board Control Application Indicator Reset Function Name 1 Processing Code 0x80A Driver Function Number 4H Processing Processing code 0x80A specifies indicator reset of the A7BDE A3N PT32S3 option cards i e all self diagnosed errors and error messages will be cleared If the original cause of the error has not been rectified the same error will be indicated on the next program scan of the SCPU Arguments two and three require no set data Argument Formats ARGUMENT 2 ARGUMENT 3 No Data No Data 6 80 IB 66253 A _ 6 PROGRAMMING MELSEC A7BDE A3N PT32S3 ERROR INDICATOR
109. Access station must be specified as Oxff Argument two specifies the buffer memory head address and number of bytes to be read maximum of 128 bytes Argument three receives the returned data Format is dependent on the requested data Argument Formats ARGUMENT 2 ARGUMENT 3 L Head Address H Number of Bytes Read Data 6 50 IB 66253 A 6 PROGRAMMING itinclude lt stdio h gt lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod 1 short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A7BDE A3N PT32S3 IFMEM BUFFER MEMORY BATCH READ This program reads and displays the contents of the first 16 bytes of the host A7BDE A3N PT32S3 IFMEM buffer memory mod 0 arg1 demand 0x200 arg1 loop 0x00 arg1 station Oxff buff2 0 0x00 buff2 1 0x08 buff2 2 0x00 buff2 3 0x10 ret nl1receive path mod amp arg1 arg2 arg3 0 while i lt 16 printf buff3 3 4X n i buff3 i r r printf Return value mcpu read ret CLOSE 6 51 66253 6 PROGRAMMING ACCESS FUNCTION LIBRARY IFMEM BUFFER MEMORY BATCH WRITE Specification Function IFMEM Buffer Memory Access Application Batch Write Function Name nl1sen
110. D equ 2 CHAN ADR equ 4 OPEN PATH ADR equ 6 SYNC ARG WORD equ 3 SEND ARG WORD equ 6 REC ARG WORD equ 6 CLOSE ARG WORD equ 2 ARG PATH ADR equ 4 SET equ 0 OPEN SET 0 equ 2 APP 72 iB 66253 A APPENDICES MELSEC OPEN SET PATH S equ ARG PATH ADR O ARG_PATH_ADR_S ARG_MODE ARG_ARG1_ADR_O ARG_ARG2_ADR_O ARG_ARG3_ADR_O PATH ADR 0 SET PATH ADR S SET MODE SET ARG1 ADR 0 SET 1 ADR 5 SET ARG2 ADR 0 SET ARG2 ADR S SET ARG3 ADR 0 SET ARG3 ADR 5 PROCESS ADDRESS TABLE FOR CHANNEL ERE common adr tbl CHANEL MAX equ equ equ equ equ equ equ equ equ equ equ equ equ equ equ dw dw dw dw dw equ 16 common a3n common 54 common net common rs4 common rs4 common adr tb1 2 1 RSA22 MELSEC RS422 OTHER RS232c OTHER dee doce eec ree 4 3 Hi x 3 5 _nilopen mov bp 0 bp 2 bp 4 bp 6 proc push mov push push push push push push mov mov mov call BP RETURN ADDRESS OFFSET CHANNEL NUMBER PATH ADDRESS OFFSET Pee ebbe eee ec ceo
111. EC 4 1 All special relays are switched off by any of the power off latch clear and reset operations The special relays remain unchanged when the RUN STOP switch is set to STOP The above relays marked 1 remain on if normal status is restored Therefore to turn them off use the following method 1 Method by user program Insert the circuit shown at right into the program and turn on the reset execution command contact to clear the special relay M Reset execution UT cem Enter a number desired to be reset Method by peripheral equipment Forcibly reset the special relay by the test function of peripheral equipment For the operation procedure refer to the manual of each peripheral equipment By moving the RESET key switch at the CPU front to the RESET position the special relay is turned off 3 Special relays marked 2 are switched on off in the sequence program 4 Special relays marked 3 are switched on off in test mode of the peripheral APP 13 66253 A APPENDICES b Special register D The special registers are data registers used for specific purposes Therefore do not write data to the special registers in the program except the ones with numbers marked in the table When fuse flow modules are detected the smallest number of the detected D9000 Fuse blown units is stored in hexadecimal Example When fuse of Y50 to 6F output modules have b
112. ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENK BLDG MARUNOUCHI TOKYO 100 TELEX 324532 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 Ministry of International Trade and Industry for service transacti rmission IB NA 66253 A 9006 MEE Printed in Japan Specifications subject to change without notice
113. ENDICES MELSEC The operating states of CPU as shown below are stored in D9015 15 12 11 8 7 4 23 CPU RUN STOP switch Remains unchanged in remote RUN STOP PAUSE STEP RUN CPU operating CPUOperating states Remote RUN STOP by parameter setting STOP PAUSE Status in program Except below STOP instruction execution D9015 When M9040 is turned off when the CPU is in the RUN mode the CPU remains in the RUN mode if changed to the PAUSE mode ROM RAM setting 1 chicas the setting for memory chop selection Any of 0 to 2 is stored in BIN 09016 program ROM Program number Main program RAM indicates which sequence program is run presently Any of 0 to 2 is stored in Subprogram RAM BIN code 2 only for A3NCPU HAS If scan time is smailer than the content of 09017 the value is newly stored at D9017 Scan time each END Namely the minimum value of scan time is stored into D9017 in BIN 10ms increments D9018 Scan i Scam time Scan time is stored in BIN code at each END and always rewritten intervals of 10ms increments set value X 10ms APP 15 8 NA 66253 A APPENDICES D9019 scan time If scan time is larger than the content of 09019 the value is newly stored at Sem time increments each END Namely the maximum Constant scan time Sets user program execution intervals in
114. Flow Chart RUN LED Off RUN LED has turned off YES Take corrective action according to the error code list RUN LED NO RESET SCPU turns on 1 Due to failure of PLC parts of bad contact 2 Due to excessive noise RUN LED remains off Is an error indicated on the peripheral In case of 1 In case of 2 Consult Mitsubishi representative Move the RUN STOP switch on SCPU module to STOP and write END to address 0 with the peripheral RUN LED does not turn on Move the RUN STOP switch to RUN RUN LED turns on Software error Check program with programmer and correct Connect noise suppression clrcuit such as CR the program to noise source 7 3 IB 68253 7 TROUBLE SHOOTING 7 4 Flow Chart RUN LED Flickers The ASNCPU is fitted with an ASCII character display which will indicate any error which has caused the RUN LED to flicker RUN LED flickers Hard j i i VANES a RITET Check the error with peripheral equipment Refer to Section 12 3 Consult Mitsubishi representative Move the RUN key switch to STOP position RESET the SCPU Correct the error refer to Section 12 3 Move the RUN key switch to RUN position Does RUN LED turn on YES Completed 7 4 8 NA 66253 7 TROUBLE SHOOTING 7 5 Flow Chart Load of Output Module does not Turn On
115. G MELSEC 4 ACCESS FUNCTION LIBRARY IFMEM BUFFER MEMORY RANDOM READ Specification Function IFMEM Buffer Memory Access Application Random Read Function Name Processing Code 0x202 Driver Function Number 3H Processing Processing code 0x202 enables random read of the IFMEM buffer memory i e locations 0x800 to Ox1fff Please see section 4 4 IFMEM Operation for further information Access station must be specified as Oxff Argument two specifies the number of points bytes and their corresponding memory addresses The maximum number of points that may be set in one argument is 40 Each Point is one byte Argument three receives the returned data Argument Formats ARGUMENT 2 Number of Points Address First Point ARGUMENT 3 Second Point Data 4 IB 66253 Address Second Point T r r t r 6 54 6 PROGRAMMING MELSEC E EXAMPLE IFMEM BUFFER MEMORY RANDOM READ Hinclude lt stdio h gt lt nyuserc h gt PATH NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 2 arg3 buff3 OPEN OF I F BOARD A7BDE A3N PT32S3 IFMEM BUFFER MEMORY RANDOM READ This program reads locations 0x800 and 0x810 of the A7BDE A3N PT32S3 IFMEM buffer memory mod 0 arg1 demand 0x20
116. Kg cm 5 1 IB 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES 5 2 A7BDE A3N PT32S3 Nomenclature The following section describes the components their names and locations on the A7BDE A3N PT32S3 interface board 5 3 A7BDE A3N PT32S3A Nomenclature 9 EE RO 5 2 1 66253 5 PRE OPERATION SETTINGS AND PROCEDURES b eseription T Fixture for fixing the A7BDE A3N PT32S3A printed fos onto the Connector for Connector for connecting the A7BDE A3N PT32S3A printed board and the A7BDE A3N B 2 the A7BDE A3N B printed board printed board via the ACP2PC cable Jumper for the This jumper determines whether the master module operates in the extension mode or the use mode switch dedicated mode Extension mode 0n Jumper is placed in the 48 position VO dedicated mode lt r Jumper is placed in the 32 position CC 32 1 The jumper is set the 32 position when shipped from the factory 2 32 and 48 are the number of I O points in the master module when set in the corresponding mode Mode setting switch Sets the operation mode to MELSECNET MINI For more details see Section 5 9 Connector for twisted pair link of MELSECNET MINI S3 2 Connector type 17 JE 23090 02 D8A DDK 3 The A7BDE A3N PT32S3A does not have an FG terminal Connect the shield of the shielded cable to the connector cover Connector
117. LSECNET Optical coaxial ATLUIEP21 R21 KROM Power supply Fuse GTH 4 Main base B module 6 P Battery 6 14 Fuse Extension base A6 it Special function module Extension cable gt Link module Extension base Input module Output module 2 Fuse 1 Configuring a MELSECNET data link requires the A7LU1EP21 R21 2 The A7BDE A3N PT32S3 and A7LU1EP21 R21 are connected using the ACP2LU1 cable The ACP2LU1 is provided with the A7LU1EP21 R1 2 1 IB 66253 A 2 SYSTEM CONFIGURATION MELSEC A7PU program ren Cable for audio pes Audio recorder ming unit cassete J 1 cassette A6HGP handy graphic prog rammer AC30R4 cable A6WU P ROM AC30WU cable gt A6WU P ROM writer unit for AGWU writer unit SWI HGPA system floppy REA cable C keyboard disk Printers K6PR AGPHP plasma AC30R2 cable 6 K7PR handy prog for the RS232C A7PR GT 10 rammer general purpose priter E SWO FDC user floppy disk disk intelli SWO FDC clean gent GPP ing disk com cable ACO3RL cable for gt A6KB keyboard A3NMCA 1 memory cassette IB 66253 2 SYSTEM CONFIGURATION 2 2 MELSECNET Configuration The following diagram shows the A7BDE A3N PT32 3 configured
118. No input ES BS argument head address 326 333 ret 334 335 Set error to return value Numbers indicate line position in the Small Model Func tion Source Code APP 71 IB NA 66253 A APPENDICES SEC A 60 CO NS Wd PAGE 80 132 REE EAE AEE EERE MELSEC LIBRARY SE FOR MS DOS FOR SMALL MODEL MITSUBISHI ELECTRIC CORPORATION melsec net lib _text Segment word public code assume cs text 5 org 0 PUBLIC DECLARE St FOR LIBRARY public nliclose public _nilopen public nllireceive 2 public _nllsend public nlisync KEK EE EQU DEFINITION St FOR LIBRARY gt gt gt gt lt gt INT CODE equ Qcdh INT STS END equ 01h INT A STS EMP equ 00h ERR CHANEL NO equ 0041h ERR NOT FOUND equ 0001h DoS INT equ 21h DRV OPEN equ 3dh DRV OPN RD ONLY equ 00h 0 equ 44h 10 READ 02h READ SIZE equ 01h DRV CLOSE equ FUNC OPEN equ 0001h FUNC CLOSE equ 0002h RECEIVE equ 0003h 4 SEND equ 0004h FUNC SYNC equ 0005h ERR PATH equ 0044h OPEN ARG WOR
119. OM TO instructions The SCPU may also be accessed by a peripheral programming device e g A6GPP via the RS422 serial port 4 3 IB NA 66253 4 GENERAL OPERATION MELSEC 4 4 The IFMEM 4 5 IFMEM 1 0 X YOO to are assigned for data transmission between the SCPU and IFMEM 1 Input signals from the IFMEM to the SCPU are X00 to 32 points General purpose input Turned ON OFF by the PC Application program and read by the SCPU PC Ready PC AT System Ready PC AT System Not Ready Used by operating system Not to be included in sequence programs 2 Output signals from the SCPU to the IFMEM are YOO to 32 points May be used in place of internal relay M General purpose output Turned ON OFF by the SCPU and read by the PC Application Program High speed access memory refresh enable signal ON Start high speed access memory refresh OFF Stop high speed access memory refresh Used by operating system Not to be included in sequence programs 4 4 IB NA 66253 A 4 MELSEC A 4 6 IFMEM Access by the Sequence Program The IFMEM may be regarded as a 32 point special function unit that has been loaded into the first slot of a rack system The IFMEM has a buffer memory of 3K words HO to H3FF accessable by FROM TO instructions and also general purpose or dedicated XYOO When accessing the buffe
120. PU RUN STOP Status b No Cassette 1 Also A3NMCA 24 40 and 56 2 Also A3NMCA 16 APP 49 IB NA 66253 APPENDICES MELSEC 3 Memory Protect Information Area Area Contents 0 Protected 1 Unprotected WRP Write Protected Range Bit Map A1CPU WRP1 0 10000 Ox13FFF Bit Map A2 A3 A3H CPU Byte D WRP7 0x38000 Ox3bfff WRPS 0x3c000 Ox43fff villi WRP 1 0x20000 Ox23fff WRP2 0x24000 0x27fff WRP3 0 28000 Ox2bfff WRPA 0x2c000 Ox2ffff WRP5 0x30000 Ox33fff WRP6 0x34000 0x37fff APP 50 IB 66253 A 7 E PMC GER EE WE AE APPENDICES MELSEC y 4 Sequence Program ROM RAM Information Area Bit Map A1 CPU 0 ROM 1 RAM 2 E2 PROM Bit Map A2 A3 A3H CPU 0 ROM 1 RAM Bit Map A0J2 CPU 0 RAM 1 2 ROM or memory protect 1 66253 APPENDICES MELSEC Write Conditions No of Points Processed in a Single Processing Contents nee Communication Processing Sequence Reads a main sequence program rogram PARS Reads a sub sequence program 64 steps Writes main sequence program Writes a sub sequence program Parameters Read Reads the contents of the parameters set for the PC CPU 128 bytes Writes the contents of th
121. RESET EXAMPLE tinclude lt stdio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 1512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF VF BOARD A7BDE A3N PT32S3 INDICATOR RESET This program resets the self diagnose error messages and network status LEDs mod 0 arg1 demand 0 80 1 loop 0x00 arg1 station Oxff ret nl1send path mod amp arg1 arg2 arg3 printf Return value ind reset xXn ret CLOSE n dm 6 81 pE IB 66253 A 6 PROGRAMMING SECA Specification Function General Data Application Data Free Send Function Name nlisend Processing Code 0x40 Driver Function Number 4H Processing Code 0x40 enables Data Free Send between master local A CPU A7BDE A3N PT32S3 station and a local master A7BDE J71P21 R21 PC station i e master to local or local to master not local to local The free data is sent to a buffer memory location on the receiving A7BDE J71P21 R21 PC station The buffer memory can hold ten 130 byte messages which may be accessed in a first in first out basis Once the buffer memory is full no new messages may be sent until the received data has been read Argument two specifies the number of bytes to be sent 128 max
122. ROGRAMMING SPECIFICATION Function Syntax Remarks Returned Value Explanation mod REGUM m POT TRE PER BP nl1sync Used in conjunction with nl1send and nl1receive to determine if communications processing is complete include lt nyuserc h gt 1 path mod short ret Returned value of function short mod Calling Mode path Pointer of opened path A returned value of 0 indicates a normal termination A returned value of 1 indicates that communications proces sing is incomplete other return values indicate abnormal termination This function is used to sense if communication via MELSECNET is complete and that all data has been transferred Mod specifies the calling mode of nl1sync 0 1 0 Wait for completion of communications processing 1 To immediately receive a return value and continue with additional programs If ret is less than zero communications processing is incomplete 6 21 IB NA 66253 A lm ee a T Se a a i DESEE VQ ecu met 6 PROGRAMMING MELSEC 4 EXAMPLE nl1sync mod 1 mode 1 1 path mode amp arg1 arg2 arg3 if ret 0 nl1sync path mode
123. SLT instruction increases scan time as indicated below The watch dog timer of the SCPU should be set in consideration of the increase in scan time Device Memory and File Register Processing time ms __ 85ms 246ms 4 47 Device Memory Only IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 33 SAMPLING TRACE APPLICATION The sampling trace shortens the time required for debugging by allowing the periodic monitoring of the contents of devices being used in programs FUNCTIONS 1 Definition The sampling trace stores data sampled at specified intervals sampling periods of the specified device in the sampling trace area Execution of the STRA instruction results in sampling occurring a specified number of times and the data results being stored in the sampling trace area The data stored in the status latch area can be read and monitored by a peripheral with exception of the PU STRA instruction STRAR instruction Program flow executed executed CY _ Te OD Number of sampling 4 times after STRA in struction execution Sampling resumed 2 Total number of sampling times Sampling is not executed The number of times marked 1 2 must be set by the peripheral with the exception of the PU 2 Devices used a The devices which may be used for the sampling trace are the following 1 Bit devices X Y M L S F B T C coil T C contact Maximum
124. ad maximum 128 must also be specified Argument three contains the send data Argument Formats ARGUMENT 2 ARGUMENT 3 L Write Data Head Address Number of Bytes H 6 48 NA 66253 6 PROGRAMMING 1 lt stdio h gt include nyuserc h PATH path NLARG1 arg main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD SPECIAL MODULE ACCESS BATCH WRITE This program writes to the buffer memory channel one of an A62DA located at station one mod 0 arg1 demand 0x12 arg1 loop 0x00 arg1 station 0x01 buff2 0 OxOb buff2 1 0x10 buff2 2 0x00 buff2 3 0x00 buff2 4 0x02 buff3 0 0xa0 buff3 1 0x00 ret path mod amp arg1 arg2 arg3 printf Return value S Mod write x n ret CLOSE 6 40 66253 6 PROGRAMMING Specification Function IFMEM Buffer Memory Access Application Batch Read Function Name nl1receive Processing Code 0x200 Driver Function Number 3H Processing Processing code 0x200 enables batch read of the IFMEM buffer memory i e locations 0x800 to 0x1fff Please see section 4 4 IFMEM Operation for further information
125. alling Mode NLARG1 arg1 Argument 1 pointer char arg2 Argument 2 pointer char arg3 Argument 3 pointer Returned Value A returned value of 0 indicates a normal termination Other values indicate an abnormal termination For details see the error code list in the appendix Explanation This function is used to write data to the host A7BDE A3N PT32S3 and stations of MELSECNET The operation of the function is defined by four arguments which have the following specifications Mod specifies the calling mode of nl1send 0 1 0 Wait for completion of communications processing 1 To immediately receive a return value and continue with additional programs If ret is less than zero communications processing is incomplete 6 19 66253 6 PROGRAMMING MELSE CA SPECIFICATION 1 Argument is structure as defined in the include file lt nyuserc h gt which specifies the request details i e processing code loop number and station number e g struct NLTLARGE short demand short loop short station Where demand Processing code loop Loop number set at 0 station Station number 00 to 64 Arguments two and three specify the request and send data The format of the memory tables depend upon the operation processing code Examples are given in the following section 6 20 iB 66253 A 6 P
126. amming units with CRT User disk SWO GPPU User disk 3 5 inch formatted for storing programs Cleaning disk SWO FDC p Cleaning disk for disk drive 3 17 IB NA 66253 A 3 SPECIFICATIONS Peripheral Equipment Corrent Description Type Consumption Remarks em Printer For print out of program ladder diagrams and lists eme Printer RS 232C AC30R2 Cable for connection of AGGPP AGPHP AGHGP and printer 3 m 9 84 ft cable length K6PR Y Paper for K6PRE 9 inch Available in units of 2000 Connected to the CPU directly or via cable to read and write programs Programming AJPU 0 3 A Equipped with MT function Programming unit The A7PU is supplied with cable for connection of the A7PU and audio i et a unit cassette recorder Cable for connection of CPU and A7PU 3 m 9 84 30 m 98 4 ft length P ROM Used to store programs onto ROM and read programs from ROM to the P ROM writer Writer unit Connected to the CPU directly or the AC30R4 cable unit RS 422 AC30R4 AC300R4 Cable for connection of CPU and A6WU 3 m 9 84 30 m 98 4 ft length d IM M M o IB 66253 4 GENERAL OPERATION MELSEC 4 4 GENERAL OPERATION 4 1 Overview The A7BDE A3N PT32S3A B C A7LU1EP21 R21 option cards enable a Mitsubishi A3N Programmable Controller and MELSEC NET MELSECNET MINI S3 interfaces t
127. andom data from station one specifically the status of XO to X7 mod 0 arg1 demand 0x05 arg1 loop 0x00 arg station 0x01 buff2 0 0x01 buff2 1 0x00 buff2 2 0x80 buff2 3 0x00 path mod amp arg1 arg2 arg3 printf Return value ACPU rnd ret printf buff3 0 96X Xn buff3 0 CLOSE 6 31 66253 6 PROGRAMMING MELSEC y ACCESS FUNCTION LIBRARY A CPU MEMORY RANDOM WRITE Specification Function A CPU Memory Access Application Random Write Function Name nl1send Processing Code 0x06 Driver Function Number 4H Processing Processing code 0x06 enables random write to the A7BDE A3N PT32S3 SCPU and A CPU device memory locations i e X Y inputs outputs relays registers timers counters etc Please see the appendix for head addresses and write data format Argument two specifies the number of points maximum of 24 Argument three specifies the sent data Each point is specified as follows Each Point is one byte Designation 0 Bit Set ORs contents and bit pattern data 1 Bit Reset ANDs contents and bit pattern data 2 Byte Write Writes bit pattern data to address Address Memory address of specified device Bit Pattern Data to be written to the device 1 ON 0 OFF Argument Formats ARGUMENT 2 ARGUMENT 3 Number of Points Address Bit pace
128. are no communication delays due to the scan of the SCPU The SCPU device memory can only be accessed after the END or COM instructions have been processed The high speed memory allows data transfer at any time during the SCPU scan Access is only restricted during device refresh 2 Data is transferred to and from the high speed memory and the SCPU The devices are refreshed after the SCPU executes the END or COM instruction of the sequence program 3 The PC application program may also directly access the SCPU device memory but only after the END or COM instruction has been executed This produces a delay and subsequently longer processing times than when accessing the high speed memory For device refresh of the high speed access device mem ory to occur the PC application program must have set the transfer parameters and the sequence program must have switched the output Y16 ON 1B NA 66253 4 MELSEC 4 10 High Speed Device Memory Operation To minimize the device refresh time of the high speed memory the ranges of devices to be updated may be specified by the PC application program The range parameters are set using one of the access functions Further details are provided in the program ming section There are two types of device ranges to be specified Data ranges to be transferred from the SCPU to the high speed memory Data ranges to be transfer
129. ared when the PC is switched on or reset The following program is required to initiate constant scan after power on or reset M9036 Constant scan time setting b The constant scan is not executed normally if an instan taneous power failure occurs less than 10ms because constant scan period is prolonged by instantaneous power failure period 4 39 IB NA 66253 4 GENERAL OPERATION 4 29 LATCH Retains data if an instantaneous power failure occurs for more than 10 ms during continuous control FUNCTION 1 Definition The latch function retains device data stored in the SCPU if the SCPU is turned OFF or reset or if an instantaneous power failure has occurred for more than 10 ms 2 Devices latched 1 Latch relay L 2 Link relay B 3 Timer T 4 Counter C 5 Data register D 6 Link register W 3 Clearing latched data a Latched data may be cleared in either of two ways 1 Set the RUN STOP switch to STOP and press the L CLR Switch 2 Clear all devices from the GPP HGP PHP b Clearing latched data clears unlatched data at the same time OPERATION Retains data if an instantaneous power failure occurs for more than 10 ms during continuous control CAUTION Device content stored in the latch range is backed by the battery KGBAT located on the A7BD A3N B circuit board The battery is therefore required since the sequence
130. as the same features as the A3N Programmable Controller CPU with a few exceptions A general comparison is given in the appendix e 1968 Remote Points An additional 80 I O points XY00 XY4F are reserved by the operating system for communica tions between the PC and the A7BDE A3N PT32S3 e Main and Sub Programs both a maximum of 30K steps 60K Total 261 Programming instructions sequence basic and ap plication Processing speed averaging 1 0 to 2 3 micro seconds per step Pre installed RAM fixed at 64K Bytes equivalent to A3NMCA 8 Memory Cassette May be optionally extended by another 64K Bytes of ROM 1 2 IB NA 66253 A 1 INTRODUCTION MELSEC fA RS422 Serial Port for programming and monitoring by peripheral devices General operation features include constant scan latch remote run stop pause status latch sampling trace step run off line switch and real time clock For further details please see section 4 12 The IFMEM enables general purpose communication between the PC application program and the SCPU To the SCPU it is regarded as a special function unit occupying the first slot of a rack system with a buffer memory 3K words and general purpose 11 inputs 7 outputs Access is by means of the sequence program TO FROM instructions input contacts and output coils The PC application program may access the same buffer memory read and write data and control or monitor th
131. ation receiving port via local stations For both the fiber optic cables and coaxial cables the overall loop distance is a max imum of 10 km 2 Refer to the MELSECNET Data Link Sys tem Reference Manual for information related to specifications concerning fiber optic and coaxial cables 3 4 IB NA 66253 3 SPECIFICATIONS 3 4 MELSECNET MINI S3 A7BDE A3N PT32S3A Communication Specifications A7BDE A3N PT32S3A Optical Data Link Twisted Pair Data Link Max number of No TET Mud to the number of master link stations modules TET Mud st wo per remote station Total number O omamen 0 VO dedicated mode 32 Will be changed by the end of DC internal current consumption A DC internal current consumption DC internal current consumption A 1 number of link stations per master module For one A7BDE A3N PT32S3A Number of input output points 8 Indicates that the total number of occupied stations assigned to the remote units is up to 64 stations For example up to 8 compact remote I O units AJ35PTF 56DT which occupies 8 stations can be connected The allowable maximum number of remote terminal units occupying 4 stations is 14 For the number of stations occupied by each type of the remote terminal un
132. ay be found as follows Occurrence of error 1 POWER To Section 7 2 Flow chart used when POWER LED LED off has turned off Is RUN To Section 7 3 Flow chart used when RUN LED has LED off turned off Is RUN LED To Section 7 4 Flow chart used when RUN LED flickering flickers O module does not operate properly To Section 7 5 Flow chart used when output load of output module does not turn on Program cannot To Section 7 6 Flow chart used when program cannot be written be written n9 IB 66253 A 7 TROUBLE SHOOTING MELSEC 7 2 Flow Chart POWER LED Off POWER LED has turned off NO Correct power supply ls power supply operating Does POWER LED turn on Is line voltage 85 to 132V AC or 170 to 264V AC Set supply voltage to within rated voltage range Does POWER LED turn on Change fuse Has fuse blown Does POWER LED turn on the power supply module fixed to the base Fix the power supply module correctly Does POWER LED turn on 1 Eliminate the excess current 2 Switch the input power off then on Overcurrent or Overvoltage protection device activated Does POWER LED turn on Consult Mitsubishi representa tive Completed 7 2 A IB NA 66253 A 7 TROUBLE SHOOTING MELSEC 7 3
133. b All general purpose I O Units may be installed in MELSECNET remote stations with the exception of the dynamic combined unit the 42 c The following special function modules may not be used in MELSECNET remote stations x AD51 S3 AD57 S1 AD58 161 AJ71P21 R21 71 21 51 AJ71C22 71 24 53 71 2 ph The RAM memory capacity is fixed at 64k Bytes equivalent to the A3NMCA 8 Memory Cassette RAM memory capacity cannot be increased or decreased However another 64K Bytes of ROM containing for example the SCPU sequence program may be added by the user 1 4 Software Restrictions a The following utility packages in conjunction with a peripheral programming device may be used with the A7BDE A3N PT32S3 SWOC UTLP FNO SWOGHP UTLPC FNO S WOGHP UTLP FD1 SWO SAPA b i sd The following utility packages may not be used with the A7BDE A3N PT32S3 SWOC UTLP PID SWGHP UTLPC PID SWOGHP UTLPC FN1 SWO AC57P SW1GP AD57P SWOGHP MBASC 1 4 NA 66253 1 INTRODUCTION MELSE CA 1 The A7BDE A3N PT32S3 option card and system Soft ware Driver are compatible with the following systems Computer IBM or compatible Operating system MS DOS Ver 3 1 or PC DOS Ver 3 2 Interface Port 16 Bit PC AT Standard 8 MHz Bus Clock Support for 4 Wait States Operation i
134. bit pattern Preset output number when parameter setting has been performed 14 13 1i 15 12 10 9 8 7 6 5 1 1 osoo o yg o o o 1 ia o Indicates fuse blown normal status is restored the bit pattern is not cleared Therefore it is necessary to clear the bit pattern by user program Bit pattern in units of 16 Fuse blown module of fuse blow mod 1 D9104 When module data different from those entered at power on has been 1 9116 detected the module numbers in units of 16 points are entered bit pattern Preset VO module numbers when parameter setting has been performed 09117 14 13 12 1 10 1 09118 Indicated units verify error VO module Bit pattern in units of 16 D9119 verify error polis ot Very error mod If normal status is restored the bit pattern is not cleared Therefore it is necessary to clear the bit pattern by user program 1 D9121 When one of FO to 255 is turned on by OUT F or SET F value 1 is added to the contents of D9124 When RST F or LED R nstruction is executed value 1 is D9124 subtracted from the contents of 09124 This can also be performed by the indicator reset operation in the board information of the option board setting 4 4 Quantity which has been turned on by OUT or SET
135. bus with special hardware error Therefore change execution of function module the unit and check the defective FROM and TO module For the defective module instructions consult Mitsubishi representative SP UNIT When the FROM or TO instruction Since this is the accessed special DOWN is executed access has been made function unit error consult Mitsu Checked at the to the special function module but bishi representative execution of the answer is not given FROM and TO 1 The accessed special function module is defective LINK UNIT AJ71R22 or AJ71P22 is loaded in Remove the AJ71R22 or PJ71P22 ERROR the master station from the master station After cor Checked at rection perform reset and start at power on reset the initial operation STOP to RUN PAUSE to STEP RUN VO INT ERROR Checked at the occurrence of interruption instructions Since this is certain unit hardware error Therefore change the unit and check the defective unit For the defective unit consult Mitsu bishi representative Although the interrupt module is not loaded interruption has occurred SP UNIT 1 Three or more computer link 1 Reduce the computer link mod LAY ERR modules are loaded with re ules to two or less Checked at spect to one CPU module 2 Reduce the 71 21 or power on reset 2 Two or more units of AJ71P
136. ce point of the sampling trace 15 every scan after the execution of the END instruction 7 RUN STOP switch position check Changes the SCPU operating status in accordance with the RUN STOP switch position For information concerning the transition processing of the RUN STOP PAUSE and STEP RUN operations refer to section 4 20 4 13 IB NA 66253 A 4 GENERAL OPERATION 4 16 Timer Processing The SCPU timers are up counting timers that increment the present time value based on three timing periods i e a 100 ms timer a 10 ms timer and 100 ms retentive timer The 100 ms timer can be set between 0 1 and 3276 7 sec in 100 ms increments The 10 ms timer can be set between 0 01 and 327 67 sec in 10ms increments The 100 ms retentive timer retains its present value even if its coil is switched OFF The timing can be set between 0 1 and 3276 7 sec in 100 ms increments 1 Timer present value and contact status update When the timer coil is set ON by the OUT instruction the present value of the timer is updated after the END FEND instruction has been executed The timer contacts close after the timer has timed out a 100ms timer 10ms timer When the input status is OFF the timer coil is set to OFF and after the END FEND instruction has been executed the the present value of the timer is set to 0 and the contacts open b 100ms retentive timer When the input stat
137. char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD PARAMETER ANALYSIS This program requests parameter analysis of the host A7BDE A3N PT32S3 SCPU Parameter analysis must be performed after any changes have been made to the existing parameters mod 0 1 0 27 1 loop 0x00 arg1 station Oxff nlisend path mod amp arg1 arg2 arg3 printf Return value parameters analysis 96X xn ret CLOSE 6 45 IB 66253 A 6 PROGRAMMING MEL SEC Specification Function Special Function Module Access Application 2 Port Memory Batch Read Function Name nl1receive Processing Code 0x10 Driver Function Number 3H Processing Code 0x10 specifies batch read of special function module 2 Port memory area See the appendix for the various memory maps Argument two has three parameters The two most significant digits of the special function module final Y number e g set the Y number to 07 if the module exists at location Y number 60 7F The two port memory head address and the number of bytes to be read maximum 128 must also be specified Argument three receives the read data E Argument Formats ARGUMENT 2 ARGUMENT 3 L Head Address M H Read Data 6 46 iB 66253 A 6 PROGRAMMING lt st
138. d Processing Code 0x201 Driver Function Number 4H Processing Processing code 0x201 enables batch write of the IFMEM buffer memory i e locations 0x800 to Oxifff Please see section 4 4 IFMEM Operation for further information Access station must be specified as Oxff Argument two specifies the buffer memory head address and number of bytes to be written maximum of 128 bytes Argument three contains the write data Argument Formats ARGUMENT 2 ARGUMENT 3 n Head Address H Number of Bytes 7 Write Data 6 52 18 NA 66253 4 6 PROGRAMMING MELSEC A iinclude lt stdio h gt lt nyuserc h gt PATH NLARG1 int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD 7 253 IFMEM BUFFER MEMORY BATCH WRITE This program writes the data Oxff to locations 0x810 0x820 of the host A7BDE A3N PT32S3 IFMEM buffer memory mod 0 arg1 demand 0x201 arg1 loop 0x00 arg station Oxff buff2 0 0x10 buff2 1 0x08 buff2 2 0x00 buff2 3 0 10 0 while i 16 buff3 i Oxff nl1send path mod amp arg1 arg2 arg3 printf Return value mcpu write 96X wn ret CLOSE 6 53 IB 66253 6 PROGRAMMIN
139. d of the program subprogram 1 Read the error step by use of peripheral equipment and cor rect the program at that step Make correction such as the insertion of jump destination or the changing of jump destina tions to one IB 66253 7 TROUBLE SHOOTING Error and Cause Corrective Action CAN T EXECUTE Checked at the occurrence of interruption 1 Although the interrupt unit is used there is no number of interrupt pointer which cor responds to that unit in the program or there are plural STOP to RUN numbers PAUSE to 2 No instruction has been STEP RUN entered the program 3 There is instruction in other than the interrupt program interrupt CASSETTE ERROR Checked at power on reset RAM ERROR The memory cassette is not loaded Stop The CPU has checked if write and Checked at read operations can be performed power on reset properly to the data memory area M9084 ON of CPU and as a result either or during STOP both has not been performed OPE CIRCUIT 21 Stop The operation circuit which per ERR forms the sequence processing in Checked at the CPU does not operate properly power on reset WDT ERROR 22 Stop Scan time exceeds watch dog error Checked at the execution of END instruction END NOT Stop EXECUTE Checked at the execution of END instruction monitor time 1 Scan time of u
140. d to sequence control Programing language Combined use of relay symbol type logic symbolic language and MELSAP Sequence gU Basic instruction instruction Application instruction Processing speed sequence instruction 1 0 2 3 sec step points Max 1968 The system occupies 80 points X Y00 to 4F Watch dog timer WDT ms 10 2000 AEN Memory capacity bytes 64K bytes internal and fixed Main sequence program main microcomputer program maximum of 30 steps Internal main microcomputer program can be set to a maximum of 58K bytes 29K steps Number of functions Program capacity Sub sequence program sub microcomputer program maximum of 30 steps Internal sub microcomputer program can be set to a maximum of 58K bytes 29 steps Internal relay 1000 999 points Latch relay L 1048 L 1000 2047 points Step relay 5 0 points Defaults to no value Link relay B points 1024 100 ms timer setting time 0 1 to 3276 7 sec TO to T199 number of L and 2048 set parameters o Timer T 10 ms timer setting time 0 01 to 327 67 sec Set in Specifications T200 to T199 para 8 100 ms meters retentive timer setting time 0 1 to 3276 7 sec Normal counter setting range 1 to 32767 For details refer to the Programming Manual CO to 255 Set in Co
141. ddresses Argument two specifies the head step number main or sub program areas A3 type CPU only and the number of bytes to be read maximum of 128 Note Main Sub A0J2 A1 A2 fixed Setting A3 A3H A3M main 1 sub Argument three receives the returned data 1 step 2 bytes Argument Formats ARGUMENT 2 ARGUMENT 3 Head Step Min Sub Number of Bytes Read Data 6 34 IB NA 66253 A _ 6 PROGRAMMING MELSE CA include lt stdio h gt lt nyuserc h gt PATH path NLARG1 1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A CPU SEQUENCE PROGRAM READ This program reads from the A7BDE A3N PT32S3 SCPU the sequence program step zero to step thirty two Note One step requires two bytes of memory mod 0 arg1 demand 0x01 arg1 loop 0x00 1 station Oxff buff2 10 0x00 buff2 1 0x00 buff2 2 0x00 buff2 3 0x40 path mod amp arg1 arg2 arg3 printf Return value prog read 96X wn ret for 1 0 i lt 0 40 i printf buff3 2 9e64x xn i buff3 i CLOSE 6 35 IB NA 66253 A ACCESS FUNCTION LIBRARY SEQUENCE PROGRAM BATCH WRITE Specification 6 PROGRAMMING MELSEC Function A CPU Seque
142. dio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD SPECIAL MODULE ACCESS BATCH READ This program reads the buffer memory channel one of an A68AD located at slot head address 0x80 of station one mod 0 arg1 demand 0x10 arg1 loop 0x00 arg1 station 0x01 buff2 0 0x09 buff2 1 0x94 buff2 2 0x00 buff2 3 0x00 buff2 4 2 ret 11 path mod amp arg1 arg2 arg3 printf Return value S Mod read 96x Xn ret printf buff3 0 96d wn buff3 0 printf buff3 1 d n buff3 1 CLOSE 6 47 IB NA 66253 A 6 PROGRAMMING SECA Specification Function Special Function Module Access Application 2 Port Memory Batch Write Function Name nl1send Processing Code 0x12 Driver Function Number 4H Processing Code 0x12 specifies batch write of special function module 2 Port memory areas See the appendix for the various memory maps Argument two has three parameters The two most significant digits of the special function module final Y number e g set the Y number to 07 if the module exists at location Y number 60 7F The two port memory head address and the number of bytes to be re
143. e Extension File Register R Addresses The method used to calculate the actual address of extension file registers R differs depending on the block numbers to be accessed i e block number 0 block numbers 1 to 9 or block numbers 10 to 28 The block numbers which can or cannot be used are determined according to the CPU type memory cassette parameter setting contents and or RAM ROM operation mode For this information refer to the SW1 GHPUTLP FN1 manual The method used to calculate the head address of each extension file register is indicated below The structure of file R of a block Head address R1 Head address 4 1 Block number 0 Head address of block number 0 2000H memory cassette RAM capacity 1 comment capacity file R capacity 2 Block numbers 1 to 9 Head address of block number n 2000H memory cassette RAM capacity 1 comment capacity file R capacity status latch capacity 16K bytes X n 3 Block numbers 10 to 28 The addresses are fixed according to the memory cassette capacity The address for each block number 10 to 28 one given 1 for memory cassette types A3NMCA24 40 and 56 the RAM capacity is regarded as 144K bytes in the above calculation APP 44 IB NA 66253 A APPENDICES Addresses for block numbers 10 to 28 Memory Cassette Type Block No A3MCA 24 A3MCA 40 A3MCA 56 0
144. e ee ee ee ee eee ere 5 1 5 2 A7BDE AS3N PT32S3 Nomenclatu Q 0 5 2 5 3 A7BDE A3N PT32S3A Nomenclatu croc cere 5 2 5 4 A7BDE A3N B C Nomenclature M 5 5 A7LU1EP21 R21 Nomenclature 44 4 ee eee eee 5 7 5 6 Pre Operation Settings and e m n n 5 10 5 7 Pre Operation Setting Procedure Flow ee 5 10 5 8 A BDE A3N PT32S3A B C A7LU1EP21 R21 Hardware Settings 5 12 5 9 A BDE A3N PT32S3A MELSECNET MINI S3 Mode Setting nnnm 5 12 5 10 A7BDE ASN PT3283A MELSECNET MINI S3 Line Check Mode s 5 13 5 11 7 25 MELSECNET MINI S3 Luminous Energy Check 5 14 5 12 A 7LU1EP21 R21 Mode and Station Number Setting 5 15 5 13 MELSECNET Self Loop Back Test e n M MM 5 16 5 14 A7LUT1EP21 R21 Station Number Setting 5 17 5 15 7 Board Number and I O Port Number Setting 8 5 18 5 16 A7BDE A3N B C Board IRO Number Setting MES ME 5 19 5 17 7 Specification Seem merece 5 20 5 18 A7BDE A3N B C ROM installation Pome
145. e general purpose For further details please see section 4 4 The High Speed Device Access Memory enables device data to be quickly transferred to and from the PC application program even during the sequence program scan of the SCPU Device data to and from the high speed memory and the SCPU is refreshed during the END processing of the SCPU sequence program Direct access to the SCPU device memory would involve long function processing times due to the delay in waiting for the end of the SCPU sequence program scan For further details please see section 4 8 c The A7LU1EP21 R21 MELSECNET Interface Card This card allows the installed A7BDE A3N PT32S3 CPU Prog rammable Controller to be configured as the master station or as a slave station of the network MELSECNET If configured as the master station the SCPU may directly control the opera tion of remote I O stations General features and operation the same as those of a standard MELSECNET A PLC station This card only operates in conjunction with the A7BDE A3N B C and may not be installed in a PC alone IB NA 66253 A 1 INTRODUCTION MELSEC 1 2 General System Precautions The following points and precautions must be noted when designing A7BDE A3N PT32S3 systems 1 3 Hardware Restrictions a An extension base unit cannot be connected to an A7BDE A3N PT32S3 option card All control is performed via stations of MELSECNET or MELSECNET MINI S3
146. e master station is 00 Settings for the local stations are 01 to 64 Z 0 0 1 The cabie terminals are configured in the following manner EN iid e Forward loop receive Reverse loop sen Forward loop receive Connector for fiber optic cable IN Connected to OUT of the previous sta tion OUT Connected to IN of Master station Station 1 Station 2 the next station 1 The cable terminals are configured in the following manner ey mp y THEN T p ER Connector for coaxial cable IN R SD Connected to the OUT R RD of the pre OUT IN vious station Seen a IN F RD Connected to R RDF SD F RD R SD the OUT F SD of the pre vious station OUT F SD Connected to the IN F RD of the next station OUT R RD Connected to the IN R SD of the next station Master station Station 1 Station 2 5 8 IB NA 66253 A LED1 for display of The LED displays operation status and information concerning abnormal conditions operation status m RUN Lights during normal board operation Extinguishes if abnormal condition occurs Lights if forward loop receive data error occurs or if forward loop uS cable should open Lights if reverse loop receive data error occurs or if reverse loop cable should open Lights during data send Lights during data receive
147. e para meters set for the PC CPU To have the PC CPU recognize and check the changed parameter con X Comment EN 128 bytes Lolo Microcomputer Reads a main microcomputer program program Reads sub microcomputer program 128 Writes a main microcomputer program x Writes a sub microcomputer program Reads the sampling trace data 128 Writes the sampling trace data Status latch Reads the latches status 128 bytes Symbols in the PC CPU status column Sampling trace Executable Not executable It is possible to write program while the CPU is running another program for example writing a subprogram when a main program is being run To do this with the A3CPU special relay M9050 signal flow change contact must be OFF and special relay M9051 CHG instruction execution inhibited must be ON To do this with the A3N or the A3HCPU special relay M9051 must be ON special relay M9050 is not used APP 52 IB NA 66253 A APPENDICES MELSE CA APPENDIX 10 Timer Counter Set Value Step Addresses The processing code 0x01 allows the timer and counter set values to be read To read the set values define the head steps as indicated below seve teen T255 OxFEFF C255 OxFFFF Example To read the set values TO to T63 Head address 00 Calculation of specified step Timer Tm FE00 n Counter FF00
148. ea Les Lao uno cao ae ca cae cas cse css The bit corresponding to the station number which is in error becomes 1 Example When local station 12 is in error bit 11 of D9252 becomes 1 and when D9252 is monitored its value is 2048 800H Local station error Stores the status of J stations 17 to 32 Stores the status of Local station error stations 33 to 48 Local station error Stores the status of stations 49 to 64 APP 26 18 NA 66253 A APPENDICES MELSE CAA APPENDIX 8 A CPU Device Memory Map The data memory area 8000 to 9FFF stores device data The memory area of each device and its configuration are as indicated below 4 4 1 e Odd address Even address XO to FF B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 BS B4 B2 B1 BO 80004 XIM7 6 5 XIM4 XIM3 XIM2 XIM1 XIMO 8002u XIMC XIMB XIMA XIM9 XIM8 to 8004 mre s ona ua pomo xc re as xa oa xaz ro Used for storing ON OFF data Used for storing ON OFF data from remote station and allows from input unit and allows only read write read e Stored data area as follows Stored data area as foilows 0 OFF 0 ON 1 ON 1 OFF XO to 7FF Obtain actual input by the following expression Input X XIM V X APP 27 IB NA 66253 A APPENDICES MELSEC OnE Input A3 Odd address Even address
149. ead Function Name Processing Code 0x205 Driver Function Number 3H Processing Processing code 0x205 enables reading of the IFMEM Y Outputs Y10 to Y17 Please see section 4 4 IFMEM Operation for further information regarding the designation of each Output Argument two specifies the head Y Output number and the number of points to be read These values are fixed at 0x10 and 0x08 respectively Argument three receives the returned data The status of the outputs is returned as group of eight bits A value of one indicates that the output is on and a value of zero off The least significant bit bit 0 corresponds to the head Y Output Y10 Argument Formats ARGUMENT 2 ARGUMENT 3 L H Number of Points Head 6 60 IB 66253 6 PROGRAMMING MEL SECA itinclude lt stdio h gt iinclude lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A7BDE A3N PT32S3 IFMEM Y OUTPUT READ This program reads the status of outputs Y10 to Y17 of the A7BDE A3N PT32S3 IFMEM mod 0 1 demand 0 205 arg1 loop 0x00 arg station 0 buff2 0 0x10 buff2 1 0x00 buff2 2 0x08 buff2 3 0x00 nl1receive path mod amp ar
150. ead address For all bytes not requiring set data a 1 must be written to the most significant bit of all Relative Head Address Locations One method is to simply write OxFF to all unused bytes APP 63 1B NA 66253 APPENDICES Argument Table Link Parameter Data Settings All values Hex 1 Relative Head Address Specification The relative head addresses of the various devices are specified as follows W Registers X Y B Bit Devices Relative Head Relative Head ee x9 o3 Note Relative Head Address Head W Register W Registers Number oe Relative Head Address _ Head Device 4 Number Head W Register W30 Relative Head Address 30 X 4 CO Head Device X80 Head Address 80 4 20 2 Number of Words Specification The number of words setting to specify device ranges is performed as follows W Registers X Y B Bit Devices Number of W Registers Note Number of Words W Registers Number of Words X Y B Devices Number of Devices 10 APP 64 IB 66253 A APPENDICES MELSEC A 3 Head I O Number Specification Head Numbers are specified as follows eee mem 03 7F0 to 7FF Note Head Number Device Head Number 10 e g Device Head Number X60 Head Number 60 10 6 65 IB 66253
151. ead i Blue lead positive Na negative The leads of the KGBAT should be removed to prevent the battery losing its charge during shipment or storage The battery leads need only be connected when the RAM memory back up or real time clock functions are required Replacement of Battery The special auxiliary relays M9006 and M9007 are switched on to indicate that the battery life has reduced to a minimum value as indicated below and it must be replaced if continued power failure RAM and or data back up is required Even if these special relays turn on the contents of the program and power failure compensation are not lost immediately However if the ON state is overlooked the PC RAM memory contents may be lost Battery Life Total power failure time Hr Remaining time after M9006 M9007 are switched ON 12000 Hours 43200 Hours 240 Hours Guaranteed Actually applied value Min value Typ 5 23 IB NA 66253 5 PRE OPERATION SETTINGS AND PROCEDURES MELSEC A 5 20 Option Card Installation The three option cards are connected together using the cables ACP2LU1 ACP2PC Due to the positioning of the cable sockets installation of the cards into the PC must be performed in a particular order For example The A7BDE A3N PT32S3A is installed into option slot eight The A7BDE A3N B C is installed into option slot seven The A7LUTEP21 R12 is installed into option slot six The diagram below giv
152. eceive Processing Code 0x02 Driver Function Number 3H Processing Processing code 0x02 enables batch read of the A7BDE A3N PT32S3 SCPU and A Series PLC memory locations i e status of devices system data table parameter settings micro program area file registers etc Please see the appendix for head addresses and read data formats Argument two specifies the head address and number of bytes to be read maximum of 128 bytes Argument three receives the returned data Format is dependent on the requested data Argument Formats ARGUMENT 2 ARGUMENT 3 Head Address M H Number of Bytes Read Data 6 26 IB NA 66253 6 PROGRAMMING MELSEC AA Hinclude lt stdio h gt ttinclude lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A CPU MEMORY BATCH READ This program reads and displays the status of inputs to of station one of MELSECNET mod 0 arg1 demand 0 02 1 loop 0x00 arg1 station 0x01 buff2 0 0x00 buff2 1 0x08 buff2 2 0x00 buff2 3 0x10 nllreceive path mod amp arg1 arg2 arg3 printf Return value ACPU batch rd 96X Xn ret i 0 while i lt 16 printf buff3 3d 964X wn i buff3 i 1 2
153. ect display cannot be obtained if to the period of the link scan time is shorter than the strobe signal duration of 10ms SEG instruction The SEG instruction should be used as a 7 segment decode instruction with M9052 turned OFF If the SEG instruction is executed with M9052 ON partial refresh processing is con ducted However because the A7BDE A3N PT32S3 has direct processing only the above partial refresh processing will not be realised 2 c Differences Special Relay and Special Register Specifications All the special relays M9000 to M9255 and the special registers D9000 to D9255 of the A7BDE A3N PT32S3 SCPU and the A3NCPU are the same However the following special relays and special registers are not used M9049 changing the number of output characters M9052 SEG instruction switch M9094 exchange flag D9094 Exchange first number APP 5 66253 APPENDICES APPENDIX 3 Driver Start Up Error Messages MELSEC DRIVER M A3N SYS Ver 00A Message ERROR 0001 IN MELSEC DRIVER M A3N SYS INT A PARAMETER ERROR ere Contents Characters in argument 1 are not INT A Message ERROR 0002 IN MELSEC DRIVER M A3N SYS INT A NUMBER ERROR Contents The number for argument 1 is not between 0x60 and Oxff Message ERROR 0003 IN MELSEC DRIVER M A3N SYS BD PARAMETER ERROR Failure Contents Characters in argument 2 are not BD
154. ection 4 21 4 12 IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 15 END Processing Returns the SCPU to step 0 in the repeated operation processing The following processing is performed after the END instruction is executed 1 Self diagnosis Checks for blown fuse module verify error low battery power etc For further details see Section 4 21 2 Timer counter processing Updates timer counter present values and contract status For further details see sections 4 16 and 4 17 3 Constant scan processing Allows the repeated operation processing to be initiated after the specified constant scan time set to special data register D9020 is reached if the constant scan function is used 4 Data communication processing with IFMEM Transmits data between the SCPU and the IFMEM when a read write request is given from the IFMEM 5 Refresh processing a Link refresh processing Executed when a link refresh request is received from the data link module of the MELSECNET For details concerning the link refresh timing refer to the MELSECNET Data Link System Reference Manual b High speed access memory refresh processing Executed between the SCPU device memory and the high speed access memory For details refer to Section 4 8 6 Sampling trace processing Stores the specified device status to the sampling trace area when the tra
155. ed 2 O refresh time 0 44 0 046XR 0 2 VO refresh time 0 66 0 044XR 0 25XB 0 95 refresh time 0 54 0 058 8 0 25XB 0 95XT Communication stop VO refresh time when error is detected 0 54 0 051XR 0 25XB 2 0 95XT Online automatic return 0 Online no automatic return 1 Extension mode 2 The maximum inter station transmission distance depends on the twisted pair cable diameter as fol lows 0 2mm 0 00031in to less than 0 5mm 0 00077in 50m 1648 0 5mm 0 000771 or more o6 100m 328ft 3 The inter station transmission distance of the optical fiber cable is between 1m 3 28ft and 50m 164ft Normal communication cannot be guaranteed for distances less than 1m 3 28ft Assembling method of optical fiber cable differs depending on cable length 1m 3 28ft to less than 5m 16 4ft or 5m 16 4ft or more 3 6 IB NA 66253 A TABLE KEY NO ITEM FUNCTION PROCESSING A3N MASTER STATION A3N LOCAL STATION SLAVE MASTER HOST ACPU A7BDE PROCESSING CODE REMARKS 3 SPECIFICATIONS MELSEC 4 3 5 System software Driver Specifications The following table gives the available functions of the System Software Driver A3N MASTER STATION A3N LOCAL STATION PROCESSING CODE MASTER HEX H H SLAVE Number of the function Fu
156. ed on off every 5 scans b M9031 0 25 clock Switched ON OFF every 10 scans c M9032 15 Switched on off every 50 scans d M9033 2s clock Switched on off every 100 scans M9034 1m clock Switched on off every 3000 scans OPERATION a Set the RUN STOP switch to STEP RUN b Use the peripherals with the exception of the PU to execute step operation Refer to the operating manuals of the peripheral equipment with the exception of the PU for information concerning step operation CAUTION a When the step run is performed with the loop count specified the number of loops is counted when the step specified to stop the operation is executed Therefore if the step specified to stop the operation is not executed by an instruction such as CJ the number of loops is not counted When the RUN key switch is switched from STEP RUN STOP or RUN STOP the status of the output existing immediately prior to the STOP is stored in the internal memory of the SCPU at the time STOP was set When the RUN key switch is switched from STOP STEP RUN or STOP RUN the status of the output existing immediately prior to the STOP is stored in the internal memory of the SCPU at the time STOP was set When the RUN key switch is switched from STOP STEP RUN or STOP RUN the outputs stored in the internal memory of the SCPU is output again prior to operation being restarted If the outputs stored in the internal
157. edetermined scan intervals When power is turned on or reset is performed the ciock starts with off Set the on off intervals by executing the DUTY instruction User timing clock 4 Clock data set request M9024 OFF No processing Writes clock data from 09025 to 09028 to the clock devices after the END ON Data set request instruction is executed at the can when M9025 is switched on OFF No error ON Error Switched on when a clock data D9025 to D9028 error occurs SEL NO processing Displays clock data D9025 to D9028 on the LED on the CPU front panel ON Display p i OFF No processing ON Read request Reads clock data in BCD to D9025 to D9028 when M9028 is switched on 0 1 second 0 2 second 1 second 2 second and 1 minute clocks are generated Not turned on and off per scan but turned on and off even during scan if the corresponding time has elapsed Starts when power is turned on or reset is performed Clock data error M9027 Clock data display Clock data read re 2 M9028 quest 1 sec clock Normally ON OFF Used as dummy contacts of initialization and application instruction in sequence program M9036 and M9037 are switched on off independently of the CPU RUN STOP switch position M9038 and M9039 are switched on off in accordance with the RUN STOP switch position i e switched off when the switch is set to STOP When the switch is set to other than STOP M9038 is switched on only during 1 can and
158. em Call Checks that the driver is being started up Opens the driver Reads the INT number entered into CON Reads from the driver using control First call FIG SYS file Performs the same processing as second and subsequent calls Pushes arguments onto stack Second and Generates interruption in accordance with subsequent calls INT number Restores stack IB NA 66253 6 PROGRAMMING MELSEC AA 6 2 The Software Driver Functions The A7BDE A3N PT32S3 driver software has five functions to link the access function library with the option board and thereby allow access to the SCPU MCPU high speed device memory and stations of MELSECNET 1 1H Opens the communication line to start operation of the A7BDE A3N PT32S3 Closes the communication tine when terminating opera Enables reading of data from the host A7BDE A3N Enables writing of data to the host A7BDE A3N PT32S3 Enables synchronization of data read and write for D a PU IB NA 66253 6 PROGRAMMING MELSEC 6 3 Assembler Interface Specification OPEN Function Code 1H Call Procedure AX 1 OPEN function number ES BP Head address of argument INT As set in CONFIG SYS file 60 FF Memory Status ES BP SEGMENT PATH POINTER OFFSET Returned Value AX Return Value For details see the error code list in the appendix 6 3 NA 66253 A
159. ep 0 Step 0 END 0 Remote run contacts OFF STOP RUN STOP state STOP state state RUN STOP Timing Using Remote Run Contacts Peripheral IFMEM The SCPU is set to RUN STOP by remote RUN STOP com mand from the peripheral or IFMEM Step 0 gt END Step 0 Remote STOP command OFF ne Remote RUN command T o EE RUN STOP state 7 STOP status status Fig 4 11 RUN STOP Timing Using Peripheral or IFMEM CAUTION a Note the following as the SCPU gives priority to STOP 1 The SCPU module is set to stopP when the remote stop command is given from any of the remote RUN contacts peripheral or IFMEM 2 To set the SCPU module from STOP state back to RUN the remote run command must be provided by the external factor remote RUN contacts peripheral IFMEM which has set the CPU to STOP 4 42 IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 4 31 PAUSE APPLICATION The PAUSE function allows process control etc to be continued after the SCPU module is set to STOP FUNCTION 1 Definition The PAUSE function stops the operation processing of the SCPU while holding the state of all outputs Y 2 Operation a M9041 is switched ON at the END of a scan during which the PAUSE state has been set The operation processing stops when the next scan has been executed to the END FEND instruction after M9041 is switched on b
160. es the general configuration of the three option cards when installed together A7BD A3N PT32S3A printed board ACP2LU1 7 printed board A7LUTEP21 R21 printed board 5 24 IB NA 66253 5 PRE OPERATION SETTINGS AND PROCEDURES MELSE CA 5 21 System Software Driver Entry Method This section describes the procedure for installing the Driver software into the PC After loading the Driver system file onto the hard disk add the following using a text editor to the CONFIG SYS file on the operating system data disk DEVICE Drive Path driver name INT A BD INT B 00H 1 INT A_ eee Software Interupt number for use when the application requests the driver to perform pro cessing oet between 60H and FFH 2 Option Board Number switch setting oet between 0 and 7 3 INT B veee Option Board Interrupt IRQ setting Set between 0 and 7 4 00 Port Number Offset Set to 100H or 300H Example 5 5 INT A90 BD1 4 100H i e a Driver MA3N SYS is loaded in the root directory of drive CIN b The option board has been assigned interrupt vector 90H c The option board number is set to 1 d The option board interrupt number is set to 4 IRQ 10 The port number offset is set to 100H The following message is displayed at normal installation MELSEC DRIVER M A3N SYS Ver 00A For further driver messages at sta
161. escription Type Remarks 5 VDC 24 VDC Consists of the following models Q Programming unit with CRT Q Equipped with ROM writer FDD and printer interface functions AGGPP SET 3 SW GP GPPA A series system disk SW GP GPPK K series system disk Intelligent GPP Programming unit with CRT SWO GPPU User disk 3 5 inch formatted Cable for connection of CPU and A6GPP Composite AC10MD Cable for connection of GPP and expanded monitor display 1m 3 28 ft video cable length Consists of the following models Q Programming unit with LCD Equipped with FDD printer interface and memory card interface functions f graphic AGHGP SET SW HGPA A series system disk programmer SW HGPK K series system disk SWO GPPU User disk 3 5 inch formatted Cable for connection of CPU and A6HGP AC30R4 3 m 9 84 ft length Consists of the following models Programming unit with plasma display Equipped with printer interface and memory Programming card interface functions unit with Plasma handy AGPHPE SET 3 SW GP GPPA A series system disk plasma programmer T display SW GP GPPK K series system disk SWO GPPU User disk 3 5 inch formatted Cable for connection of CPU and A6PHP AC30R4 3 m 9 84 ft length C RS 422 cable Cable for connection of CPU and A6GPP A6HGP A6PHP AC300R4 30 98 4 ft length progr
162. ff3 OPEN OF BOARD A CPU CHECK This program reads the type of CPU and system data table address of station one mod 0 arg1 demand 0x08 arg1 loop 0x00 arg1 station 0x01 1 path mod amp arg1 arg2 arg3 printf Return value cpu check ret 0 while i lt 4 printf buff3 2d 964X xn i buff3 CLOSE 6 43 IB NA 66253 6 PROGRAMMING Specification Function A CPU Control Application Parameter Analysis Request Function Name nlisend Processing Code 0x27 Driver Function Number 4H Processing Code 0x27 specifies a parameter analysis request This operation must be performed after any A CPU parameter has been changed to validate the new data New parameter settings may be written to the ACPU user memory area however in normal operation the parameter settings must be transferred to the ACPU work area parameter analysis is not performed operation will continue with the previous parameter settings still stored in the ACPU work area Argument two and three require no set data Argument Formats ARGUMENT 2 ARGUMENT 3 No Data No Data ee cee ee IB 66253 A 6 PROGRAMMING MELSEC AK include lt stdio h gt ftinclude lt nyuserc h gt PATH path arg1 main int chan mod i short ret unsigned
163. g1 arg2 arg3 printf Return value mepu Y rd 96X wn ret printf buff3 0 96x wn buff3 01 CLOSE 6 6 1 p ________ _ _ ________ IB NA 66253 6 PROGRAMMING Specification Function A7BDE A3N PT32S3 Access Application H S Memory Transfer Parameters Function Name ni1send Processing Code 0 803 Driver Function Number 4H Processing Processing code 0x803 specifies the high speed device memory transfer parameters i e the ranges of device statuses to be transferred from the SCPU to the high speed memory and conversely from the high speed memory to the SCPU Argument two specifies the transfer parameters The complete argument table is given in the appendix Please note The ranges for timers and counters are set per point but the coil status contact status and present value for each device will be transferred The transfer parameters may only be set when the 7 2 3 is STOP mode Operation status may be checked by the application program using processing code 0x701 Switch Status Read Argument three requires no set Argument Formats ARGUMENT 2 ARGUMENT 3 _ Transfer Parameters No Data 6 62 IB 66253 6 PROGRAMMING MELSE cCA include lt stdio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod
164. gnosis LEDs for faults and system errors Perform hardware tests on MELSEC NET and MELSECNET MINI Sections 5 10 5 11 5 13 Completed IB NA 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES MELSEC A 5 8 A7BDE A3N PT32S3A B C and A7LU1EP21 R21 Hardware Settings The following sections describe how to select and set the various hardware switches required before operation of the cards may begin Ensure that the PC is off when new settings are being made 5 9 A7BDE A3N PT32S3A MELSECNET MINI S3 Mode Setting The 7 25 MELSECNET MINI S3 option card has five operating modes three online modes and two test modes They are selected by means of a dial switch located near the top of the card The function of each mode is described in the table below For further details please consult the MELSECNET MINI User s Manual wc ae o System automatically returns to online When ONLINE A R Online mode station status returns to normal System does not automatically return to oniine When a communication error occurs in a Online mode When online status is not automatically remote station only that station is discon nected refreshing continues with other properly operating stations Even if the station with which the communication error occurred returns to normal it does not return to the system unless a sta
165. he request destination station is not ready for receiving Correct the station number Check the request destination ACPU and the processing code Correct the Y No Correct the request data Check the request destination sta tion and the processing code Find the source station where the corresponding remote STOP PAUSE request is given to the re quest destination ACPU Link time over Reestablish the link The request source stopped the link during processing Check the special module hardware Give the receive request when the request destination is in a condition to receive data Link error Establish the link A request is given to an off the link station Special module busy error The designated special module is not ready to begin processing Check the special module hardware Special module time over Check the special module hardware F2 No response is returned from the designated special module APP 9 iB NA 66253 A MELSEC E APPENDIX 5 Assembly of MELSECNET MINI Twisted Pair Connector The twisted pair link connector is constructed of the following components Protective tube A Protective seal B screw E C screw A screw D The following section provides the procedure for assembling a connector for twisted pair link application a Remove the outer cover of the shielded wire The exposed shielding should be l
166. hen stations 23 and 45 are communicating bit 6 of D9225 and bit 12 of D9226 become 1 and when 09225 is monitored its value is 64 40H and when D9226 is monitored its value is 4096 1000H Initial communication between local or remote i O stations Stores the status of stations 17 to 32 Initial communication between local or remote stations Stores the status of stations 33 to 48 Initial communication between local or remote l O stations Stores the status of stations 49 to 64 APP 24 IB NA 66253 A APPENDICES MELSEC Device m station error D9228 D9230 D9240 Local or remote station error Local or remote station error Local or remote station error Local or remote station loop error Local or remote station loop error Local or remote l O station loop error Local or remote station loop error Local or remote station loop error Local or remote station loop error station loop error station loop error Number of receive error detection times Local or remote I O Local or remote I O stations 1 to 16 Stores the status of stations 17 to 32 Stores the status of stations 33 to 48 Stores the status of stations 49 to 64 Stores the status of stations 1 to 8 Stores the status of stations 9 to 16 Stores the
167. i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD HIGH SPEED MEMORY DEVICE TRANSFER PARAMETERS This program specifies that data registers DO to 019 are to be refreshed to and from the high speed device memory and the SCPU device memory mod 0 arg1 demand 0x803 arg1 0x00 arg1 station Oxff 0x00 while i lt 0x68 buff2 i 0x00 pr buff2 0x28 0x00 buff2 0x29 0x00 buff2 0 2 0x28 buff2 0x2b 0x00 buff2 Oxbc 0x00 buff2 0x5d 0x00 buff2 0 0x28 buff2 Oxbf 0x00 nl1send path mod amp arg1 arg2 arg3 printf Return value HSM trsf prm ret CLOSE 6 63 IB NA 66253 A p LU OM TTE REPRE 6 PROGRAMMING MELSEC 4 Specification Function A7BDE A3N PT32S3 Access Application High Speed Memory Batch Read Function Name nlireceive Processing Code 0x206 Driver Function Number 3H Processing Processing code 0x206 enables batch read of the A7BDE A3N PT32S3 high speed device memory i e status of SCPU devices Please see the appendix for head addresses and read data formats Argument two specifies the head address and number of bytes to be read maximum of 128 bytes Argument three receives the returned data Forma
168. icult to turn input signals ON OFF during debugging STEP RUN operation executes the sequence program in a manner that allows monitoring of the actual status of the sequence program and content of each device when the input signals are turned ON OFF FUNCTION 1 Definition STEP RUN operation executes the sequence program operation one instruction at a time X1 Xo 9 o STEP RUN allows operation to be performed in order of steps 2 41 D to with a stop at each step Dew 96 Shiner 54 2 1 Specified loop count gt gt Operation is stopped at the speci fied step after the SCPU sequence program is executed the specified number of scans 2 Step by step ccce Operation is executed instruction by instruction of the SCPU sequ ence program oseration starting at step 0 or the current step Specified loop count Step by Step Start step Operation stopped at the specified step Specified step 1 n E i scans Specified END FEND 1 END FEND Return to step 0 turn to 0 4 50 66253 4 GENERAL OPERATION MELSEC 4 3 Output Y state with RUN STOP switch in STEP RUN a The RUN STOP switch may be set to STEP RUN in either of the two ways 1 RUN PAUSE STEP RUN When the switch is set to STEP RUN operation is stopped with all outputs maintaining at the state set immediately pr
169. if gt 0 6 22 66253 6 PROGRAMMING MELSEC 6 15 Programming Procedure START Open Communications with A7BDE A3N PT32S3 master station set link parameters Set Link Parameters nlisend 0x04 Check Network is operating correctly Application Application Completed nliclose IB 66253 6 PROGRAMMING 6 16 Access Function Specification And Example Sheets MASTER SLAVE STATION STATION Processing Processing SLAVE B MASTER Code 5 wama op op ees wm Jo o foe oa memory S027 mensus olo lofo 5 aeea e fra saz m pese access sequence x aaen win fresa access SCPU Interrupt program starting 1 Page 6 38 55 ow fen ea C Remote RUN STOP PAUSE ACPU Requested ACPU check control Parameter analysis request Special Special Shared memory batch read module module access access Shared memory batch write x ole Page 6 48 E lem Batch read gt Batch write foe osa IFMEM Random read ACCESS Random write C IFMEM input X write A7BDE A3N 3253 55 output Y read 205 Page 6 60 803 6 62 Transfer setting for
170. ignment Come eee 4 34 4 27 SCPU Functions 44 4 4 36 4 28 5 SCAN 4 37 4 29 III Ihm Hh hh 4 40 4 30 RUN STOP Pee ee merce ere 4 41 4 31 PAUSE eee eee eee eee eee eee ee eee eee ee eee eee eee eee ee ee eee eee eee ee ee eee ee ee 4 43 4 32 STATUS LATCH ee eee eee eee eee eee eee eee ee eee eee eee eee eee eee cere ee ee eee 4 46 4 33 SAMPLING TRACE em MMMMRIPMMIMIMIIIIMIIle 4 48 4 34 STEP RUN cesssosssososssssosssssessesesovocscscscsssossooseovestesvecsctssetoevoesocsceceverssoscveecceccossoscovecccooo 4 50 4 35 OFFLINE SWITCH eee eer errr reer re eee ee ee eee ee eee eee ee eee eee ee eee eee ee ee ee ee ee ee 4 53 4 36 Real Time CLOCK FUNCTION ct 4 55 5 PRE OPERATION SETTINGS AND PROCEDURES TT 5 1 5 25 5 1 Handling See ee eee eee ee eee eee eee rere ee eee eee eee eee eee eee ee ee ee ee ee ee ee e
171. ing ROM RAM switching RAM RAM operation a Protect 0 to 16 KB of memory Protect 16 to 32 KB of memory Protect 32 to 48 KB of memory ROM RAM Switch Memory Protect Switch Does not protect memory Protects memory Protect 48 to 64 KB of memory 1 Set memory protect settings taking into consideration the addresses step numbers of each memory area sequence program microcomputer program sub sequence program comment sampling trace status switch and file register 2 Do not use the memory protect function when executing sampling tracing and status latching Use of the memory protect function will prevent the data from being stored in the memory 5 20 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES 5 18 A7BDE A3N B C ROM Installation MELSEC The flow chart below gives the correct procedure when installing When operating using ROM When operating using RAM Turn the socket lock screw to OPEN Turn the socket lock screw to OPEN an IC is already installed please remove it from the socket If an IC is already installed please remove it from the socket ROM Switch the RAM ROM switch No 1 Switch the RAM ROM switch No 1 switch of SW1 to the ROM position switch of SWI to the RAM position OFF ON Insert the IC so that the notched end is oriented in the same direction as that printed on the socket
172. ing LEDs of the remote I O station and the monitor station number setting switches Create a sequence program to con firm the status 4 9 IB NA 66253 A 4 2 VO list the extension mode A list of signals used when the A7BDE A3N PT32S3A is being used in the extension mode is given below Device No Device No X20 x unit No 1 x22 x23 unit No 2 X24 x25 unit No 3 x26 X27 unit No 4 Transmit request signal Read compiete signal Transmit request signal ead complete signal Transmit request signal ead complete signal Transmit request signal Read complete signal ransmit request signal ead complete signal ransmit request signal ead complete signa ransmit request signal ead complete signal ransmit request signal ead complete signal ransmit request signal ead complete signal Transmit request signal For remote terminal unit No 1 For remote terminal unit No 2 2 For remote terminal unit No 3 2 remote terminal unit No 4 For remote termina unit No 5 X28 Transmit complete signal For remote terminal X29 Read request signal unit 5 X2A Transmit complete signal For remote terminal Y X2B Read request signal unit No 6 Y For remote terminal unit No 6 For remote terminal unit No 7 For remote terminal unit No 8 Y20 Y21 i Y22 Y23 i Y24 Y25 Y26 Y27 Y28 Y29 2A 2B X2C Y2C X
173. insufficient There fore check the power and eli minate the voltage fluctuation Perform reset and run If the same error is displayed again it is the CPU hardware error There fore consult Mitsubishi representa tive Check for an endless loop and correct the program 1 Among special registers D9116 to D9123 the bit corresponding to the module verify error is 1 Therefore monitor the registers by use of peripheral equipment and check for the module with 1 2 When the fault has been cor rected reset CPU IB 68253 A 7 TROUBLE SHOOTING Content of Special Error Message Register 09008 Error and Cause Corrective Action BIN value FUSE BREAK 32 RUN There is an output module of which OFF Stop fuse has blown Checked at the execution of END instruction Not checked when M9084 or M9094 is on 1 Check the fuse blow indicator LED of output module and change the fuse of module of which LED is on 2 The check of fuse blow module can also be made by the peripheral equipment Among special registers 09116 to D9123 the bit corresponding to the module of verify error is 1 Therefore make checks by monitoring the registers CONTROL Stop The FROM and TO instructions can Since this is the special function BUS ERR not be executed module CPU module or base unit Checked at the 1 Error of control
174. int 8 points AJ35TJ 8A AC input unit 100 120V AC 8 points Usable Master Module Modes No of dedicated mode Data storage memory Stand alone Remote Unit For optical data link AJ35TJ 8D DC input unit sink type 12 24V DC 8 points AJ35TJ 8R Contact output unit 24V DC 2A 240V AC 2A 8 points AJ35TJ 88S1 Triac output unit 100 240V AC 0 6A point 8 points Stand alone Remote Unit For twisted pair data link Transistor output unit sink type 12 24V DC 0 1A point 8 points AJ35TJ 8T1 1 station AJ35TJ 8T2 output unit sink type 12 24V DC 0 5A point points AJ35TJ 8T3 output unit sink type 12 24V DC 2A point 8 852 Triac output unit 100 240V AC 2A point 8 points For sealing cables into a stand alone remote I O station User prepared Cable through fitting 3 13 IB NA 66253 A 3 SPECIFICATIONS MELSEC MELSECNET MINI S3 Equipment No of Usable Master Occupied Module Modes Type Description eee Occupied Stations unit Input side AJSSPTF 28AR Output side contact output 24V DC 2A 240V AC 2A 12 points unit input side 100 120V AC 16 points 5 28 5 output side triac output 100 240V AC 0 6A point 12 4 Stations points 16 0 unit b input side sink type 12 24V DC 16 points AJ3SPTF 28DR Ou
175. ion Address M Second Point Pattern 6 56 IB NA 66253 6 PROGRAMMING MELSEC A EXAMPLE BUFFER MEMORY RANDOM WRITE Hinclude lt stdio h gt tinclude lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A7BDE A3N PT32S3 IFMEM BUFFER MEMORY RANDOM WRITE This program writes the data to location 0x810 of the host A7BDE A3N PT32S3 IFMEM buffer memory mod 0 arg1 demand 0x203 arg1 loop 0x00 1 station OxFF buff2 0 0x01 buff3 0 0x02 buff3 1 0x10 buff3 2 0x08 buff3 3 0x00 buff3 4 OxAA ret nlisend path mod amp arg1 arg2 arg3 printf Return mcpu rnd wrt 96X wn ret CLOSE 6 57 IB 66253 A 6 PROGRAMMING Specification Function IFMEM Access Application X Input Write Function Name nl1send Processing Code 0x204 Driver Function Number 4H Processing Processing code 0x204 enables the status of the IFMEM X Inputs to be controlled by the application program Please see section 4 4 IFMEM Operation for further information regarding the designation of each input Argument two specifies the head X Input number and the number of points to be written Since devices are w
176. ion has exceeded the specified range 9999 or 99999999 2 Setting has been performed ex ceeding the specified device range and operation cannot be performed 3 File registers are used in the program without performing the capacity setting of file regis ters 1 The battery voltage has re duced to less than the specified value 2 The battery lead nected is discon 7 10 Corrective Action 1 Write parameters again and make check 2 When the error is displayed again it is the hardware error Therefore consult Mitsubishi representative Read the error step by use of peripheral equipment and check and correct the program at that step Check device setting range BCD conversion value etc 1 Change the battery 2 When RAM or power failure compensation is used connect the battery IB NA 66253 A _ APPENDICES APPENDICES APPENDIX 1 External Dimensions A7BDE A3N PT32S3A 2 4 5 holes A7BDE AS3N B C 2 0 4 5 holes APP 1 IB 66253 APPENDICES A7LU1EP21 2 4 5 holes A7LU1ER21 2 45 holes APP 2 IB NA 66253 APPENDICES m V n APPENDIX 2 Differences the A7BDE A3N PT32S3 A3NCPU a Differences in Specifications A7BDE A3N PT32 3 Repeated operation using stored program VO control method Direct method Refresh and direct methods Language dedicated
177. ior to the switch being set to STEP RUN Step run alowed RUN STOP status Output Output status Sequence program operation at the time result is output of PAUSE is retained Timing for RUN PAUSE STEP RUN 2 RUN STOP STEP RUN Depending on the setting of the parameter STOP RUN display mode the following conditions are set Re output operation conditions of that prior to STOP When set to OFF and operation is stopped When set to STEP RUN the output status at the time STOP was set is output while operation is stopped Output after operation executed When set to STOP all output are set to OFF and operation is stopped When set to STEP RUN the output status at the time SIOP was set is not re output while operation is stopped RUN STOP switch RUN Step run allowed RUN STOP status ON Output Y OFF Boa Output status m at the time operation outputs off of STOP is result 15 restored output Timing for RUN STOP STEP RUN 4 51 IB NA 66253 A 4 GENERAL OPERATION 4 Timer special timing clock processings during step run a The processing used for the timers during execution of the sequence program and the special timing clocks M9030 to M9034 is as follows 1 Timers 10 ms timer eer 10 ms incremented every scan b 100 ms timer 100 ms incremented every 10 scans 2 Special timing clocks a M9030 0 15 clock Switch
178. ition switch No 0 memory size ROM RAM and protected RAM memory ranges switch No 1 Please note the access station number must be set at Oxff Argument two specifies the switch number Argument three receives the returned data switch 0 1 statuses Switch 0 Byte 1 ee STATUS Note When the switch number is 0 RUN ____ 0 the read status is the Switch Status STOP setting of the STOP RUN NEED PAUSE switch not the CPU s oper MEN E STEP RUN ating status B 0 20000 to 23FFF 0 Not Protected 2 28000 to 2CFFF 1 Protected ___ 26000 to 2FFFF Ee 0 ROM setting 1 Memory Size 0x05 MCA 8 Argument Formats ARGUMENT 2 ARGUMENT 3 6 74 66253 A 6 PROGRAMMING f include lt stdio h gt f include lt nyuserc h gt PATH path arg1 main int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD A7BDE A3N PT32S3 SWITCH STATUS READ This program reads and displays the status of the selected switch switch 0 or 1 mod 0 arg1 demand 0x701 arg1 loop 0x00 arg1 station OxFF printf Select Switch Number 0 1 t scanf 9ex amp buff2 0 buff2 1 0 00 nl1receive path mod amp arg1 arg2 arg3 printf Return
179. its see the appropriate remote unit user s manual 2 Max number of link points per master module Depends on the type of remote I O unit connected Example 1 8 compact remote units AJ35PTF 56DT which occupies 8 stations are used 256 input and 192 output points can be controlled Example 2 If 16 partial refresh type remote units AJ35PTF 128DT which occupies 4 stations are used 1024 input and 1024 output points can be controlled REMARK Use of the partial refresh type remote I O unit increases the maximum number of link points per master module but makes the response time longer than the batch refresh type remote unit e g the response time of the AJ35PTF 128DT is 107ms max for input and 21 5ms for output 3 5 IB NA 66253 _ 3 SPECIFICATIONS 1 The refresh time is determined by the number of remote units connected in the system their types and the setting of the operation mode switch of the master module as indicated below Total number of remote stations B Number of AJ35PTF 128DT units connected 1 T Number of remote terminal units connected J Mode Setting Operation Mode Switch Refresh Time msec Online automatic return refresh time 0 0 48 0 042XR 0 2XB Online no automatic return refresh time dedicated 1 0 46 0 053XR 0 2XB mode Communication stop when error is detect
180. ix 6 7 SEGMENT PATH POINTER OFFSET SEGMENT ARG1 POINTER OFFSET SEGMENT ARG2 POINTER OFFSET SEGMENT ARG3 POINTER OFFSET ES BP 1B 66253 A 6 PROGRAMMING MELSEC 4 6 8 Receive Processing Receive Path channel No Path Channel No gt Max Path Channel No amp Max Interrupt No already input N t Driver open Open result NG OK Interrupt No input Set error to return value AX 3 ES BS argument head address INT ret 6 8 IB NA 66253 A 6 PROGRAMMING MELSEC A 6 9 Assembler Interface Specification SEND Function Code Call Procedure Memory Status Returned Value 4H AX 4 SEND function number ES BP Head address of argument INT As set in CONFIG SYS file 60 FF AX Return Value For details see the error code list in the appendix 6 9 SEGMENT PATH POINTER OFFSET SEGMENT ARG1 POINTER OFFSET SEGMENT ARG2 POINTER OFFSET SEGMENT ARG3 POINTER OFFSET ES BP IB NA 66253 A 6 PROGRAMMING MELSEC AK 6 10 Send Processing Path channel No Path Channel No gt Max Path Channel No lt Max Y Interrupt No already Input Driver open Open result NG OK Interrupt No input Set error to return value
181. k relay BO to 3FF 1024 May be used as an internal relay if not set for link initial data Used to detect a fault When switched on during RUN Annunciator FO to 255 256 by a fault detection program stores a corresponding number in special register D T200 to 255 56 Up timers available in 100ms 10ms and 100ms retentive types T 100ms retentive Can be used by setting the parameter timer C 4 23 SCPU Devices Auxiliary relay in the PC which cannot be output directly Number of Ms Ls Ss 2048 Auxiliary relay in the PC which cannot be output directly Backed up during power failure Can be used by setting the Used in the same manner as an internal relay M e g parameter 0 Special register D9000 to 9255 256 Predefined data memory for special purpose 1024 Data register for use with data link DO to 1023 1024 Memory for storing PC data Can be used by the parameter Extends data register using user memory area 1 0 Up counters available in normal and interrupt types interrupt counter Can be used by the parameter Data register for storing the operation results of basic A Accumulator A1 2 and application instructions 2 Used to modify devices X Y L F T C D W R Z sox V 1 H P V N Nesting NO to 7 8 levels Indicates the nesting of master controls Pointer
182. l Constant scan 15 not excuted normally kii the next scan either Scan Time Longer Than Constant Scan Setting 4 38 66253 A 4 GENERAL OPERATION MELSEC A Accuracy a Any of the following interrupt processings is allowed when there is wait time during END processing The constant scan accuracy may therefore be deteriorated by the corresponding interrupt processing time interrupt Processing Time General processing of data from IFMEM and MELSECNET 0 2 to 0 5 ms Interrupt from IFMEM 0 2 ms 116 interrupt interrupt program execution period 10 ms interrupt 1 0 ms 129 to 131 interrupt program execution period Interrupt from peripheral 0 2 ms When one or more of the above interrupts have occurred total processing time is the sum of the individual interrupt processing time OPERATION a To execute constant scan 1 Write the set value to D9020 in the sequence program or 2 Write the set value to D9020 in test mode of the peripheral b To terminate constant scan 1 Write O to D9020 in the sequence program or 2 Write O to D9020 in test mode of the peripheral c To change the set value during SCPU RUN 1 Modify the program which writes the constant scan set value to D9020 using the peripheral rewrite it during RON and switch on the constant setting instruction or 2 Write a new value to D9020 in the test mode of the peripheral CAUTION a D920 is cle
183. l addresses occupy 6 KB Microcomputer 2 KB Main microcomputer KB program program capacity Sampling trace Absent Present 0 8 KB Data None The capacity for the mem memory Absent Present 0 8 KB of the file register Status status latch is set by the Latch Fi Fi e number of file registers set register by the parameters register AbsenUFresent Bis d KB d File register File Registers 1K points X 2 Comment points 1 KB is occupied by the Comments 64 points Comment points 1 KB system when the com ment capacity is set The amount of usable memory varies depending upon the parameter settings 4 33 IB NA 66253 A 4 GENERAL OPERATION 4 4 26 SCPU I O Assignment The initial processing of the SCPU automatically assigns the addresses of the modules and special function modules loaded on Remote Stations of MELSECNET It is not necessary to set the I O assignments using the peripheral equipment 1 Advantages of setting l O assignments in relation to the remote stations a Conserving the number of points of empty slots Setting 0 as the number of I O points for the empty slots will conserve the number of points occupied by empty slots For example empty slots occupy 48 points when the A35B base unit is used 48 points can be conserved by using the peripheral equipment to set the number of assignment points to O b Reserving
184. lown 50 is stored in hexadecimal To monitor D9000 data module verify error Fuse blown module number using a peripheral equipment perform monitoring in hexadecimal display Cleared when all contents of D9100 to D9107 are reset to 0 If O module data is different from data entered are detected when the power is turned on the first O number of the smallest number module among the detected modules is stored in hexadecimal Storing method is the same as that of D9000 To monitor D9002 data using a peripheral equipment perform monitoring in hexadecimal dispiay Cieared when all contents of D9116 to 09123 are reset to 0 E O module verify error module number s Number 1 is added each time input voltage becomes 80 or less of rating while the CPU module is performing operation and the value is stored in BIN code AC DOWN counter AC DOWN time count Self diagnostic Self diagnostic error 1 F number at which external failure has occurred When an error is found as a result of self diagnosis the error number is stored in BIN code When one of FO to 255 is turned by OUT F or SET F the F number which has been detected earliest among the F numbers which have turned on is stored in BIN coed 09009 can be cleared by RST F or LEDR instruction another number has been detected the clearing of D9009 causes the next number to be stored in D
185. memory of the SCPU at the time STOP status was set are not to be output again switch STOP STEP RUN or STOP RUN after resetting b 4 52 IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 35 OFFLINE SWITCH APPLICATION The OFFLINE switch allows the following checks to be conducted in the test mode of the peripherals by disconnecting the output of the OUT instructions from the sequence program 1 Output module operation check 2 Output module and external device wiring check FUNCTION 1 Definition a The OFFLINE function disconnects devices Y M L S B F used with the OUT instruction from the sequence program b Online Offline status is set when the imaginary OFFLINE switches as those shown below are closed opened 1 Opening the OFFLINE switch Offline status is set The OUT instruction device is disconnected from the sequence program 2 Closing the OFFLINE switch Online status is set The OUT instruction device is controlled by the sequence program m lt gt Online status gt Offline status a OFFLINE switch Online Offline Status 2 Device status in offline mode a OUT instruction devices remain in the state that they were immediately prior to entering offline mode b If set reset is forced by the peripheral in offline mode devices remain in the state that they were forced 4 53 IB 66253 A _4 GENERAL OPERATION MELSEC E OPERATION a
186. munication line line Processing code error Correct the ARG1 processing code An unsupported processing code has been set The processing code requested to the A3N board host station cannot be processed by itself APP 7 IB NA 66253 A _ APPENDICES 7 88 3 Data error Error Contents Byte point number read error The number of bytes batch read or the number of points random read is outside the allowable range X number or Y number error The head X number designation for writing input X is not 0 or 8 The head Y number designation for reading output Y is not X point or Y point number error In the input X writing operation the set number is not 8 or 16 when the head number X designation is 07 or the set number is not 8 when the head number X designation is 8 In the output Y reading operation the set number is Byte point number write error The number of bytes batch write or the number of points random write is outside the allowable range Canceling processing The next processing request was given before the current processing was completed Switch number designation error The set switch number is not O or 1 for the switch reading operation APP 8 MELSEC A Countermeasures Set the number within the allowable range Correct the X number or Y number Correct the X number or Y point Set the number within the allowable range 8 Remote designati
187. n va ve va s ae vaa s va v Stores PC operation results and Output YO to 1DF allows read write Y 0 indicates OFF and 1 ON 0 2 The output memory is accessed as shown below Output memory Output module Internal relay M Latch Stores device ON OFF data in one bit locations M L S 0 indicates OFF and 1 ON relay L 0 to 2047 Step Example to 47 are as follows relay S Odd address Even address B15 B14 B13 B12 B11 B10 B8 B7 B6 B5 B4 82 B1 BO cao foe wo we o we e e we wr a e ues aso c nn relay B BO to 3FF rece na errare eje usa ee Stores PC operation results and Annuci 0 255 allows read write ator F APP 35 1 66253 APPENDICES Special relay M Stores ON OFF data in one bit locations 0 indicates OFF and 1 ON Example M9000 to M9047 are as follows Timer T TO to 127 Odd address Even address contact B15 14 B13 B12 B11 B10 BS B8 B7 B6 B5 B4 B2 Bl BO 7 cano fs ii weir ree oo so 127 enn n sana a ejes n rn c je Timer T TO to 127 tr coil Stores PC operation results and allows read write Counter C coil CO to 127 Data register D A0J2 Link register W All devices are in 2 byte 16 bit locations Example DO configuration is as follows B7 Timer L present value TO to 127 H
188. n values other than 1 to 200 are written to D9020 the following becomes true e 32768 100 No constant scan setting 110200 lt lt Constant scan setting 10 to 2000 ms 201to 32767 gt gt Constant scan setting 2000 ms b The following shows the relationship between D9020 and WDT watch dog timer D9020 value WDT value 1 A WDT error may occur if the value set in D9020 is greater than that given in the above formula 4 37 IB NA 66253 4 GENERAL OPERATION 3 Program example The following is a program example of a constant scan setting and termination a To set constant scan to 200 ms Instruction as 200 ms setting b To terminate constant scan Instruction Constant scan end 4 Operation a Constant scan is executed for scan beginning with the scan in which the set value is written to D9020 8 80 ms written to D9020 0 written 10 09020 END Sequence program Constant scan Constant Scan Execution b The constant scan setting must be greater than the maximum scan time in the sequence program The constant scan is not executed normally if its setting 1 shorter than the program scan time Constant scan setting Constant 9 10 20 30 40 10 20 40 scan 5 ms 6 ms END j Sequence FE 35 ms 34 ms excess of 37 ms con stant scan is not norma
189. nce Program Access Application Batch Write Function Name nl1send Processing Code 0x03 Driver Function Number 4H Processing Code 0x03 specifies batch write to the A7BDE A3N PT32S3 SCPU and A CPU sequence program and timer counter memory area see appendix for T C stop addresses Argument two specifies the head step number main or sub program areas A3 type CPU only and the number of bytes to be written maximum of 128 Note Main Sub A0J2 A1 2 mM fixed Setting A3 A3H A3M sub Argument three contains the sent data Argument Formats ARGUMENT 2 ARGUMENT 3 L Head Step H Main Sub Number of Bytes Send Data E 6 36 IB 66253 6 PROGRAMMING MEL SECA EXAMPLE SEQUENCE PROGRAM BATCH WRITE H include lt stdio h gt Hinclude lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A CPU SEQUENCE PROGRAM WRITE This program writes the instruction LD X020 to step zero of the host A7BDE A3N PT32S3 SCPU sequence program mod 0 arg1 demand 0x03 arg1 loop 0 arg1 station Oxff buff3 0 0x20 buff3 1 0x40 ret nl1send path mod amp arg1 arg2 arg3 printf Return value prog write 96X wn ret CLOSE
190. nction Type Function Name Function Operation PC A7BDE A3N PT32S3 as the master station PC A7BDE A3N PT32S3 as a local station Indicates access to a slave station via the master station Indicates access to the master station via the slave station PC to the host A7BDE A3N PT32S3 Programmable Controller option card PLC or A7BDE A3N PT32S3 station of MELSECNET PC A7BDE J71P21 R21 station of MELSECNET Processing code for a particular function operation hexadecimal Page reference of Access Function example NOTE O Available Unavailable 3 7 IB NA 66253 A 3 SPECIFICATIONS 3 6 Access Function Table A3N MASTER A3N SLAVE STATION STATION Processing Processing H SLAVE H MASTER Code Remark O SLAVE MASTER HEX gt 5 ATBDE patch write Page recess Random reed O o o o s Paes mmemwm o o o o 6 Pose 632 s ou o o o O 1 Pase sa e uu sauene Bmw o o o o qM epe d m o g saree wen Jo o o o o o mere Im em lm e fofo ote ume Page eso mw __ O O 2 Page esa access Random wie __ 29 Page ese input O O
191. nded Master station Usable system Local station However when master Link relay B 1024 128 bytes Link register W 1024 2048 bytes devices and programs of the programmable controller CPU of the master station can be accessed duplex bii serial method Synchronous method Frame synchronous method station is AINCPU21 R21 256 points 32 bytes Input X 1968 When master station is 9 Maximum Output Y 246 bytes A2NCPU21 R21 512 points 64 bytes E link points When master station is c per system A2NCPU21 R21 S1 1024 points 128 bytes 5 Transient transmission nd Transmission path Duplex loop Overall loop distance km mile Maximum 10 km 6 21 miles Maximum 10 km 6 21 miles 1 km 0 621 miles between stations 0 5 km 0 31 miles between stations Maximum 65 stations per loop 1 master station 64 local remote stations Modulation method CMI method Transmission format Conforms to HLDC frame format CRC check and retry after time out Loopback function on error detection cable breakage diagnostic functions such as link check Number of stations connected CA9003 BNC P 3 Ni DDK or equivalent Receive level 30 to 10 dBm peak value REMARKS overall cable distance 1 The overall loop distance refers to the distance from the master station sending port to the master st
192. ng the clock function b clock data must be stored in D9025 to D9028 even when part of the data is modified Normal clock operation cannot be performed if invalid data is written Month 13 Day 32 d Clock operation is backed up by the battery located on the A7BD A3N B circuit board Clock operation will be discon tinued if the battery connector is disconnected IB NA 66253 5 PRE OPERATION SETTINGS AND PROCEDURES 5 PRE OPERATION SETTINGS AND PROCEDURES 5 1 Handling This section gives handling instructions for the A7BDE A3N PT32S3 A3 CPU Programmable Controller option card 1 The A7BDE A3N PT32S3 is packaged in a wrapping that protects against damage by static electricity Be sure to enclose the A7BDE AS3N PT32S3 in this special wrapping whenever it is being moved or stored 2 Do not touch the components or conductive areas on the printed board because damage may be caused by static electricity 3 When mounting the A7BDE A3N PT32S3 hold the printed circuit board by the edges or the mounting fixtures Insert the connector into the circuit firmly 4 Do not drop the A7BDE A3N PT32S3 or subject it to shocks 5 Do not remove the printed circuit board from the mounting fixtures as damage may result 6 When mounting the A7BDE A3N PT32S3 ensure that no wire cutoffs enter from the upper sections 7 Tighten the A7BDE A3N PT32S3 fixing screws 4 to a torque of 12 to 19
193. nverter module Buffer Memory Contents Address for FROM instructio i a np ame Co digits 10 value G 3 GHA digital vus 1 GH internet set mode fag aD M memes mode internal set mode fag 3 CHA internal sot mode fog 1 3s m a NINE GHZ temperature detector tempereture detector value 3 amp set value check CH2 set value check code GJ set value check code set value check code Write data error code Analog output permitted signal enable disable flag 47 gt CH1 loaded module code 8 CH2 loaded module code 4 CH3 loaded module code 4Cu I w loaded module code F CH1 temperature set range offset N W OO CH1 temperature set range gain CH2 temperature set range offset gt CH2 temperature set range temperature set range offset CH3 temperature set range gain c i Ir Q2
194. o Pointer error 296 Interrupt No already input 300 302 Driver open Open result NG OK 324 325 334 335 Interrupt No input Set error to return value ES BS argument head address 326 333 Numbers indicate line position in the Small Model Func tion Source Code APP 68 IB 66253 APPENDICES MELSEC A Receive Processing Path channel No Pointer error Interrupt No already input 300 302 Driver open Open result OK 334 335 Set error to return value 326 333 324 325 Interrupt No input ES BS argument head address INT Numbers indicate line position in the Small Model Func tion Source Code APP 69 1B NA 66253 APPENDICES MELSEC X Send Processing Path channel No Pointer error 296 Interrupt No already input 300 302 Driver open NG Open result OK 324 325 334 335 Interrupt No input Set error to return value ES BS argument head address 326 333 INT ret Numbers indicate line position in the Small Model Func tion Source Code APP 70 IB 66253 A APPENDICES Sync Processing Path channel No Pointer error Interrupt No already input 300 302 Driver open Open result OK 324 325 interrupt
195. o be installed directly into an IBM compatible computer The addition of the A7BDE A3N PT32S3 option cards enables fast access to the installed CPU and to the stations of MELSECNET or MELSECNET MINI The PC may then be configured as the master station of both networks To link the A7BDE A3N PT32S3 option cards with the PC s operating system and application programs a device driver program is installed This supervises interrupts and the transfer of data to and from the application program The device driver provides various functions for communication and control of the option cards The following sections give information on the software con figuration PC A7BDE A3N PT32S3 configuration and the A3N CPU SCPU operation 4 1 IB NA 66253 A 4 GENERAL OPERATION 4 2 Software Configuration The following diagram shows the software configuration the various components and their relationship to each other APPLICATION PROGRAM DEVELOPED BY THE USER ACCESS FUNCTION A sample access function library LIBRARY compatible with the Microsoft C compiler and linker is provided MEMORY A3N MAIN DRIVER A3N INTERRUPT DRIVER DATA TRANSFER A7BDE A3N B C Diagram Key Application User created application program requiring access to the A7BDE A3N PT32S3 Prog rammable Controller Access Function User created function library providing Library specific access subroutines A3N Main Driver Accesses re
196. ode Depends on whether or not the local station is executing a forward or a reverse loop test other local stations ON STOP or PAUSE host is in STOP or PAUSE mode mode Error status of other OFF Normal Depends on whether or not a local station other than the local stations ON Error host is in error OFF RUN or STEP Operating status of RUN mode Depends on whether or not a local station other than the APP 21 IB NA 66253 A APPENDICES 1 Link special registers only valid when the host station is the master station Device Descripti Number escription Loopback Loopback Data link in forward loop link in reverse loop in for ward reverse direc tion in for ward direction Loopback in re verse direction link im possible APP 22 Stores the present path status of the data link Data link in forward loop Forward loop Reverse loop Data link in reverse loop Forward ioop Reverse loop Loopback in forward reverse loop Master station r Led LC DL e LI Forward loopback Reverse loopback Loopback in forward loop only J 22 Forward loopback Loopback in reverse loop only 1 ti du uem t VENUE t l l Reverse loopback iB NA 66253 A APPENDICES MEL SECA Device 7 Stores the local or remote station number at
197. olokolorokeelokolckekereker mov si offset int a set rs4 dx offset drv nm rs4 mov di offset int a no rs4 jnp commonl0 xokoleeeckolekeioleeeick KEKKAKEEKEKEKEKS si offset int a set net dx offset drv nm net mov di offset int a no net jmp common10 CHANEL nllclose_err bx offset nliclose_ret bx ax bx offset common_adr_tb bX ax cs word ptr bx aX ERR PATH CX bx si di es ds bp APP 84 IB 66253 A APPENDICES 216 211 218 219 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 327 328 329 330 dcc oec ek commoniO int jc int_start int_code common_err common_end common prc SI INT A SETTED FLAG ADDRESS OFFSET DX DRIVER NAME ADDRESS OFFSET DI INT A NUMBER SAVE AREA ADDRESS OFFSET X X dco ek KE RAE o E EGRE e oce 333 push CS pop ds mov al cs byte ptr si int a set al al jnz int_start YES DS Driver name segment DX Driver name offset mov ah DRV OPEN Function code mov al DRV RD ONLY Access code int DOS INT Driver open jc common err mov cs word ptr handle
198. on error Set RUN STOP PAUSE for remote A setting other than RUN STOP PAUSE is set setting Random write designation error Set set reset write for random write A code other than set 0 reset 1 and write 2 is set Give the next processing request only after the current processing has been completed Correct the designated switch number NA 66253 A a TRIPS URP Rp Ty PETERET SUPPE APPENDICES 4 Board detection error Error Contents MELSEC A Countermeasures PC No error The request destination station does not exist Processing mode error The request destination ACPU cannot process the processing code This was checked by the request destination ACPU Special module designation error The designated special module cannot do the require proces Other data error An error is contained in the part of the data such as the request data address head step or the number of shift bytes Link designation error The set request destination station cannot process the processing code This was checked by the request destina tion station Remote error The keyword in the remote RUN STOP PAUSE request does not match Special module busy The designated special module is carrying out other proces sing Request destination busy When sending general data either the request destination receive buffer is full or t
199. ong enough for it to be clamped b Solder the wires to the connector c Fit connector onto the cover and clamp the shielded wire firmly with the clamp and connect to the IBM PC AT FG d Mount the screws to the A cover i e Place the B cover on the A cover place the nuts on the B screws and tighten firmly APP 10 iB NA 66253 A APPENDICES MELSEC fA APPENDIX 6 Special Relays and Registers a Special relay list Special relay list The special relays are internal relays used for specific purposes Therefore do not turn on or off the special relays in the program Name Desorption Bem CS 1 M9000 OR E oi fuse Turned on when there is one or more output modules of which fuse has been d uix blown Remains on if normal status is restored blow module VO module OFF Normal Turned on if the status of module is different from entered status when verify error ON Presence of error power is turned on Remains on if normal status is restored 1 M9005 AC DOWN OFF AC is good Turned on if power failure of within 20ms occurs Reset when POWER switch is detection ON AC is down moved from OFF to ON position 9006 Turned when battery voltage drops below the specified value Turned off ON Battery low when battery voltage becomes normal Battery low Battery low latch 1 M9007 OFF Normal Turned on when battery voltage drops below the s
200. ons sets the lower numbered station to main station and the higher numbered station to subordinate Station to station test mode slave station Self loop n 7 Enables self checking of the sending receiving hardware test mode If the A7LU1EP21 R21 is installed but communication via MELSECNET is not required 1 Set the A7LU1EP21 R21 mode to Off Line If not a link parameter error will be indicated This does not affect the sequence program operation 2 MELSECNET is not connected the status indicated by the LEDs must be regarded as indeterminate Correct operation of the link module may be checked using the loop back test 5 15 IB 66253 A 5 PRE OPERATION SETTINGS AND PROCEDURES 5 13 MELSECNET Self Loop Back Test The self loop back test is used to check the transmitting and receiving circuits of the A7LU1EP21 R21 Data is sent from the transmitting terminal of the forward loop to the receiving terminal of the forward loop and must be received within a pre set period of time This test may also be performed for the reverse loop e g 1 Test status Connect cable from the host station forward loop sending side to its forward loop receiving side and connect a cable from the reverse loop sending side to the reverse loop receiving side Set the station to STOP For a remote station set master station to STOP Set the mode select switch to 7 and
201. other state Output status at the time of STOP is provided in accordance with the STOP RUN output mode setting Sequence program operation pro cessing Step 0 to END FEND END processing RUN Operation Processing 4 20 66253 A 4 GENERAL OPERATION MELSEC y 2 STOP operation processing STOP indicates a stop of the sequence program operation by using the RUN STOP switch or remote STOP Section When the SCPU is set to stop the output status is saved and all outputs are switched off Data other than the outputs Y is retained The processing shown in the flow chart below is repeated until STOP is switched to another state Output status is saved and all outputs switched off Data communication with the IFMEM Link refresh processing Self diagnosis RUN STOP switch position check For individual processings refer to Section 4 15 STOP Operation Processing 4 21 IB NA 66253 4 _4 GENERAL OPERATION 3 PAUSE operation processing PAUSE indicates a stop of the sequence program operation with the output and data memory status retained The processing shown in the flow chart below is repeated until PAUSE is switched to another state For the procedure to set the SCPU in the PAUSE state refer to Section PAUSE Data communication with the IFMEM Link refresh processing Self diagnosis RUN STOP switch position check For individual proce
202. ous linear interpolation Special function module Detects absolute positions Resolution 4096 divisions per resolver revolution Response speed within 6 6115 Position ms special detection Detects absolute positions 48 Multi turn type First 32 6215 Resolution 4096 divisions soa af max per resolver revolution pen 1 6 Response speed within 2 ks vacant Binary 24 bits 1 2 phase in AD61 AD61S1 put reversible counter 32 50KPPS 2 channels jen ate Binary 24 bits 1 2 phase in put reversible counter 1 phase 10KPPS 2phase 32 2 channels 3 40 Occupied Points First 16 vacant Last 32 special Stepping motor driver AD76 Use with AD71 or 07182 O Ea 32 vacant Last 16 MELSEC Applicable System System Coaxial Optical data data link Consumption L station R station L station 24 gt 0 3 e gt gt 0 9 gt EI O i TERE pr IB NA 66253 A 3 SPECIFICATIONS 7 m d System Equipment Applicable System Current Coaxial Optical lt onu Consumption Description Ponts B 5 Remarks amp e a 8 5VDC 24 0 2 9
203. p arg1 arg2 arg3 printf Return value interrupt 96x n ret CLOSE 6 39 IB 66253 6 PROGRAMMING lt Specification Function A CPU Control Application Remote Run Stop Pause Function Name nl1send Processing Code 0x18 Driver Function Number 4H Processing Code 0x18 enables software setting of the host A7BDE A3N PT32S3 and A CPU operating status i e Run Stop Pause Argument two specifies the status designation and entry code Note Designation 0 Run 1 Stop 2 Pause Entry 4 fixed Argument three requires no data Further details of remote Run Stop Pause control may be found in section 4 20 SCPU Operation Please note that the operating status can not be software set to RUN if the Key Switch is set to STOP Argument Formats ARGUMENT 2 ARGUMENT 3 Entry Code iB 66253 6 PROGRAMMING MELSE CA tinclude lt stdio h gt lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A CPU REMOTE RUN STOP PAUSE This program sets the running conditions Run Stop Pause of the host A7BDE A3N PT32S3 SCPU mod 0 argi demand 0x18 arg1 loop 0x00 arg1 station Oxff buff2 1
204. pecified value Remains on if ON Battery low battery voltage becomes normal Self diagnostic OFF Absence of error M9008 erdt ON Presence ob emer Turned on when an error is found as a result of self diagnosis M9009 Annunciator OFF Absence of detection Turned on when OUT F or SET F instruction is executed Switched off when ON Presence of detection D9124 value is set to 0 detection OFF Absence of error Turned on when operation error occurs during execution of an application ON presence of error instruction Turned off when the error is eliminated Operation error flag OF Absence of error ON Presence of error OFF Carry off ON Carry on Operation error flag Turned on when operation error occurs during execution of an application instruction Remains on if normal status is restored Carry flag used in an application instruction Clears all data memory except special relays and special registers in the remote run mode from a computer etc when 9016 is 1 Carry flag Data memory clear flag OFF No processing ON Output clear OFF No processing Clears all unlatched data memory except special relays and special registers ON Output clear in the remote run mode from a computer etc when M9017 is 1 Data memory NOTI clear flag User timing clock No 0 User timing clock No 1 User timing clock No 2 User timing clock 12 2 Relay which repeats on off at pr
205. peration Parameter area T C set values area Main Main sequence program program area Microcomputer program area T C set values area Sub sequence program area Sub Microcomputer programs program area Area for atoring address Parameter area T C set values area ROM memory area max 64 KB RAM memory area max 64 KB Main Main sequence program program area Microcomputer program area T C set values area Sub sequence program area Sub Microcomputer programs program area Area for atoring P address Area for atoring resulte of execu tion non execution 1 Unused May be used as exten sion file register Area for atoring results of execu tion non execution 1 Unused May be used as exten sion file register Sampling trace area Status latch File register area File register area Comment area Sampling trace area Data area Status latch File register area File register area Comment area 4 32 IB NA 66253 A 4 GENERAL OPERATION Parameter Settings and Memory Capacity Parameter Main Sequence n sequence Parameters and Program program capacity X 2 Yes settings occupy 4 KB Microcomputer 2 KB Main DP KB program program capacity Values of the T C settings Sub Sequence sequence 2 and the storage area of Program program program capacity P
206. quests A7BDE A3N memory areas A3N INTERRUPT Receives INTERRUPT IRQ reply from the Driver A7BDE A3N B C A7BDE A3N B C A3N CPU Programmable Controller Option card 4 2 IB 66253 4 GENERAL OPERATION MEL SEC 4 3 Hardware Configuration and Operation Application Program Device Access nl1 send nl1 receive IFMEM Access nit send ni1 receive A3CPU General Access The diagram below shows the general configuration and com munication paths of the three option cards A7BDE A3N PT32S3A B C A7LU1EP21 R21 when installed inside a PC A7BDE A3N B C A7BDE A3N PT3253A High Speed Device Access t Memory XY nM MELSECNET MINI S3 Device Area interface Card Y10 Y17 Station Access r gt Memory A3NCPU SCPU Buffer XN NO A7LU1P21 R21 Memory X0 X0C MELSECNET 11 d nl1 receive IC EN B W Interface Card RFRP RTOP RS422 serial port From the diagram it can be seen that the A7BDE AS3N B C has three main components the high speed access device memory the IFMEM and the SCPU Their general operation is covered in the proceding sections The application program may directly access the high speed device memory the IFMEM and the general memory areas e g sequence program of the SCPU and stations of MELSECNET Communication with stations of MELSECNET MINI is by means of the SCPU sequence program i e using FR
207. r memory with the sequence program always use the FROM TO enable signal input as an interlock This prevents simultaneous access by the sequence and applica tion programs Should the sequence program try to transfer data to or from the IFMEM buffer memory when the interlock input is OFF an error code and message 41 SPECIAL UNIT DOWN will be indicated by the SCPU self diagnostics Example 1 The following is an example of D100 to 109 data being written to buffer memory addresses 0 to 9 Write command ier De Ts Tes Example 2 The following is an example of 256 words from the buffer memory address 200H to 2FFH being read to 0500 to 755 Read command Tess os o 45 66253 4 GENERAL OPERATION MELSE CA 4 7 IFMEM Access by the PC Application Program The IFMEM may be directly accessed by the PC application program Data may be transferred to and from the buffer memory and the status of the IFMEM general purpose I O six outputs Y10 to Y15 and ten inputs X00 to may be controlled as required Details of the specific access functions are provided in programming section Access to the buffer memory by the sequence program is in units of words and the memory addresses are HO to H3FF However the PC application program may only access the IFMEM buffer in units of bytes so the corresponding
208. r to the unit manuals for details of the buffer memory contents 1 Type A68AD analog digital converter module Address Hexadecimal Buffer Memory Contents Address for FROM Instructio Lower 8 bits Higher 8 bits Averaging processing specification 1 4 1 averaging time count x CH2 averaging time count 86 7 averaging time count 4 averaging time count 8 8 CH5 averaging time count 8C 8D E 90 CH8 averaging time count 92 CH6 averaging time count F to r 7 averaging time count Q t CH1 digital output value 1 CH2 digital output value CH3 digital output value 9 CH4 digital output value x J m gt CH5 digital output value CH6 digital output value gt gt 0 A2u CH7 digital output value 8 digital output value h D m s Write data error code 2 A62DA digital analog converter module Address Hexadecimal Buffer Memory Contents Address for FROM Instructio 3 a 17 1 3 I m qe 3 55 1B NA 66253 APPENDICES MELSEC 4 3 Type A84AD analog digital co
209. red from the high speed memory to the SCPU Please note that all data will be transferred for the devices SpD and SpM special registers and relays whatever the range setting To start the refresh processing set the refresh enable signal Y16 of the high speed access memory to ON To stop the refresh processing set the enable signal for the high speed access memory to OFF The data contained in the high speed access memory immediately prior to stopping will be retained The time taken to refresh the high speed memory Tm may be calculated from using the formula below Please note that Tm is dependent on the device range settings Tm 5610 Tu s 5 2 6 X Cu n2 4 9 X 2 6 X us Tu s Refresh time from the H S M to the Refresh time from the SCPU to the H S M nm Total number of bit devices transmitted from the H S M to the SCPU ne Total number of word devices transmitted from the H S M to the SCPU ns Total number of bit devices transmitted from the SCPU to the H S M Total number of word devices transmitted from the SCPU to the H S M When timer T and counter C device ranges have been specified to be refreshed please note that contact points coils and present values of the timer T and counter C are also refreshed Hence the point numbers of n1 n2 n3 and n4 should be set as 2 points for n1 or n3 and 1 point for n2 or n
210. reset 2 Test result Determine the test result by the LEDs on the front of the link unit For normal status the six LEDs CRC OVER AB IF TIME DATA and UNDER flicker in order if an error occurs one of the LEDs is lit and the test is stopped For error indication refer to A7LU1P21 R21 Nomenclature Example When the forward loop is broken the F LOOP or TIME LEDs are lit 5 1 6 p PC C IB 66253 _5 PRE OPERATION SETTINGS AND PROCEDURES MELSEC 5 14 A7LU1EP21 R21 Station Number Setting 1 The following table provides information concerning the setting of station numbers 1 X10 switch To set 10 s of the station number 2 X1 switch To set 1 s of the station numbers 3 Setting for the master station is 00 4 Settings for local stations are between 01 and 64 2 The station number dial is set to 00 when shipped 3 Please refer to the Type Data Link Users Manual for instructions related to station number setting when the PC is configured within MELSECNET 5 17 IB 66253 A Sum ECC ee C DOM nn MEER EE 5 PRE OPERATION SETTINGS AND PROCEDURES 5 15 A7BDE A3N B C Board Number and Port Number Setting The board number setting specifies the Port Number address and a 16K Byte memory area of the
211. retained b The operation processing is resumed when normal status is restored c The watch dog timer WDT keeps timing while the operation is at a stop For instance if the WDT and scan time settings are 200 ms and 195 ms respectively and instantaneous power failure of 10 ms will result in a WDT error 2 Instantaneous power failure over 10 ms The SCPU is initialized and the sam operational process occurs that happen when the power is turned on or reset processing is undertaken instantaneous power failure occurence Power recovery END 0 pa dde The SCPU stops operation Operation Processing at Occurrence oflnstantaneous Power Failure IB NA 66253 4 GENERAL OPERATION 4 20 RUN STOP PAUSE STEP RUN Operation Processing The SCPU is operated in either of the RUN STOP PAUSE and STEP RUN states as described below 1 RUN operation processing RUN indicates repeated operation of the sequence program in order of step 0 to END FEND instruction then back to step 0 When the SCPU is set to RUN the output status at the time of STOP is provided in accordance with the STOP RUN output mode setting in the parameter After the switching from STOP to RUN the processing period is usually 1 to 3 seconds until the sequence program operation restarts depending on system configuration The processing shown in the flow chart below is repeated until RUN is switched to an
212. rify error is detected processing continues with the I O addresses used prior to the error For self diagnosed errors see the table over page 1 The two conditions listed in columns CPU Status and RUN LED Status of the RUN STOP Switch and SCPU Processing Table can be changed by settings of peripheral equipment The LED displays the message shown below only when an error has been detected using the CHK instruction in the Processing Check Error The message is displayed using board information set by the option board F lt CHK gt ERROR 5 1 LL 3 digit failure number 4 25 IB 66253 A 4 GENERAL OPERATION 4 22 Self Diagnosis Function Table RUN Ss LED Status Instruction code check When corresponding instruction is executed INSTRCT CODE ERR When power is switched on or reset per formed When switched from STOP PAUSE to RUN STEP RUN When M9056 or M9057 is switched on No END instruction When switched from STOP PAUSE to RUN CPU Status Error Message Diagnosis Diagnosis Timing Peripheral Device Parameter setting check PARAMETER ERROR MISSING END INS STEP RUN TRO When CJ SCJ JMP CALL P FOR to NEXT Instruction execution instruction is executed Stop Flicker error disable When switched from STOP PAUSE to RUN CAN T EXECUTE P STEP RUN Format When switched from STOP PAUSE to RUN CHK instruction check STEP RUN CHK FORMAT ERR When interrupt occurs
213. ritten in multiples of eight the head X input number may be set to either 0x00 or 0x08 and the number of points to either 0x08 or 0x10 Argument three contains the sent data The required status of the inputs is converted into a multiple of eight bit pattern This is written to argument three with the least significant bit of the data corresponding to the head device A set value of one will switch the device on and a value of zero off Argument Formats ARGUMENT 2 ARGUMENT 3 Head X Number Write Data Number of Points L H 6 58 IB NA 66253 A 6 PROGRAMMING MELSEC E include lt stdio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main OPEN OF I F BOARD A7BDE A3N PT32S3 IFMEM X INPUT WRITE This program switches and X4 of the 7 253 IFMEM int chan mod short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 on mod 0 arg1 demand 0x204 arg1 loop 0x00 arg1 station Oxff buff2 0 0x00 buff2 1 0x00 buff2 2 0x08 buff2 3 0x00 buff3 0 Ox11 nl1send path mod amp arg1 arg2 printf Return value mepu X wr ret CLOSE 6 59 IB NA 66253 6 PROGRAMMING SECA Specification Function IFMEM Access Application Y Output R
214. rocessing The general operation processing of the SCPU is given in the flow chart below Operation processing Initial processing Sequence program operation processing Step O to END FEND instruction END processing Repeated operation processing 4 11 IB NA 66253 A 4 GENERAL OPERATION MELSEC 4 4 14 Initial processing Initiates the sequence program operation processing i e the following processing is executed when the power is turned on at the PC or the SCPU is reset The amount of time required for initial processing varies depend ing on system configuration but is normally 2 to 4 seconds 1 module initialization Resets and initializes the Remote modules 2 Data memory clear a unlatched clears the data memory The latch setting is made with a parameter using the peripheral equipment b Clears Y data content where Y is the memory area of non loaded modules being used as internal relay M 3 Link parameter setting Data link is started when link parameter data is set in the data link module and MELSECNET is the master station 4 I O address assignment Automatically assigns addresses to the modules 5 i nd module data entry Enters the types of modules loaded in the Remote units module data is used to verify modules 6 Self diagnosis The SCPU conducts self checks when it is powered up or reset For further details see S
215. rogram capacity in units of 1K step ES Status latch Absent Absent present 0 8 KB Absent present 2 to 16 KB Microcomputer program capacity in 25 ns BO to 3FF Link relay B in units of 1 point 255 in units of 1 point of Only for L1000 to 2047 CO to 255 aa data Counter C Absent for others in units of 1 point range 00 1 1023 Data register D in units of 1 point WO to 3FF in units of 1 point Link register W 4 29 IB NA 66253 4 MELSEC Parameter Setting Ranges stations Setting of internal MO to 999 relay M latch relay L L1000 to 2047 ac step relay S setting Absent for S ess Setting of link range 256 points of 100ms 10ms and retentive timers in units of 8 points Timers have serial numbers 100ms 0 to 99 Setting of timer 10ms T200 to 255 156 points of counters and interrupt counters in units of 8 points Timers have seria numbers Input X module Output Y module to points Special function in units of 16 points module Empty slot XO to 7FF 1 point for each of RUN Absent and PAUSE contacts Setting of only PAUSE contact cannot be performed Setting of counter No interrupt counter
216. rt ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD A7BDE A3N PT32S3 VERSION READ This program reads the current version of the host A7BDE A3N PT32S3 mod 0 arg1 demand 0x702 arg1 loop 0x00 arg1 station Oxff ret 1 path mod amp arg1 arg2 arg3 printf Return value version read 96x Xn ret for i 0x00 i lt 0x35 i if i gt 0x01 amp amp i lt 0x06 i gt 0x2f printf buff3 2 2 i buff3 i else printf buff3 2x 2c n i buff3 CLOSE 6 77 66253 6 PROGRAMMING SECA Specification Function A7BDE A3N PT32S3 Board Control Application Board Reset Function Name nl1send Processing Code 0x800 Driver Function Number 4H Processing Processing code 0x800 specifies general reset of the host A7BDE A3N PT32S3 option card At reset All SCPU data is cleared and devices reset SCPU operation is re initiated All self diagnosed errors are cleared All IFMEM data is cleared All high speed memory data is cleared including the transfer parameters MELSECNET if master and MELSECNET MINI are reset Arguments two and three require no set data Argument Formats ARGUMENT 2 ARGUMENT 3 No Data No Data 6 78 IB 66253 A _ 6 PROGR
217. rt up please see the appendix 5 25 IB NA 65253 A ee ee ew ew eee eee we tw 5 lt lt mm qp aps mom mmm mmm eee eww ee ew ee we ee gt gt lt lt Ao lt A 4 lt UR gt mmm lt lt lt lt mnanaa Pom oor mm m oom o9 lt lt 5 2 gt rom mom UP RUE om lt lt od a
218. rtup is performed a communication error occurs in a remote I O 1 ONLINE U R station only that station is disconnected ONLINE 5 refreshing continues with other properly operating stations The disconnected station TEST 1 TEST 2 automatically returns to the system when the System stops when an online error is de tected When a communication error occurs in a remote I O station even only one all remote stations disconnect from the system I O refresh is stopped Even if the station with which the communication error occurred returns to normal it does not return to the system unless a startup is performed Line check mode This mode checks for hardware errors in the MINI link and breaks in the cables Luminous energy check mode measures the level of luminous energy on the receiving side of the remote I O stations participating in the optical data link Not used returned to the system the outputs of the remote station in which the communica tion error occurred are all set to OFF regard less of the E C MODE switch settings ON OFF of the remote station Online mode When the switch number is set to 5 the TEST LED will light although there is no cause for an error When the switch numbers are set to 6 through 9 the RUN LED and TEST LED all extinguish 18 66253 5 PRE OPERATION SETTINGS AND PROCEDURES
219. s 1 Counter present value and contact status update The OUT instruction sets the counter coil to either ON OFF When the leading edge of the coil signal is detected the present value is updated and the contacts close after the counter has counted out a Normal counter The present value and contact status are updated after the END FEND instruction is executed b Interrupt counter The present value and contact status are updated after the IRET instruction is executed 2 Opening counter contacts The counter contacts are opened using the RST instruction The present value is reset to 0 and the contacts are opened at the point the RST instruction is executed Main routine 0 Counter present value updated Counter contact status updated Interrupt Interrupt Interrupt occurrence occurrence occurrence Main routine 0 END 0 program REV finet Interrupt program WN HWN Interrupt counter present value updated Interrupt counter contact status updated Counter Processing Interrupt counter 4 15 IB 66253 A 4 GENERAL OPERATION The maximum counting speed of the counter depends on the scan time Counting is only possible if the input condition is ON OFF for a period longer than that of one scan time For further details refer to the ACPU Program ming Manual where n duty Duty is the ratio of the input signal s ON time to OFF time as a percen
220. s 16 points 12 24 VDC source loading Applicable System System Coaxial Optical 5 data link data link 5 vc d IB 66253 Current Consumption L station 5 VDC 124 Computer L station eTwo memor ies of the same type are used es 32 o gt N gt e e C A o gt gt gt olo olco gt gt 0 0 gt 2 gt gt 0 12 3 SPECIFICATIONS System Equipment ee Description For single axis positioning control speed control speed and positioning control Ana Single log voltage output 0 to 10 V axis positioning AD70 AD71 7151 AD7182 AD72 Analog input type Permits normal servo operation For positioning controi Pulse chain output 2 axes independent simultaneous linear interpolation Use with AD76 for stepping motor control For positioning control MEL DAS S1 servo driver Pulse chain output 2 axes independent simultaneous linear interpolation For positioning control Pulse chain output 2 axes independent simultaneous linear interpolation Use with AD76 for stepping motor control Positioning For positioning control Analog voltage output 0 to 10 V 2 axes independent simul tane
221. s 103 pop bp 104 ret 105 _nllopen endp 108 107 108 0 BP 109 bp 2 RETURN ADDRESS OFFSET 110 bpt4 RETURN ADDRESS SEGMENT 81 IB 66253 APPENDICES MELSEC 111 112 113 114 115 116 117 118 118 120 121 122 123 124 125 126 127 128 129 139 131 132 193 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 1517 152 153 154 155 156 157 158 159 160 161 162 153 164 165 SD bp 6 PATH ADDRESS OFFSET bp 8 PATH ADDRESS SEGMENT bp 10 SINK MODE EERE ERE leleloloelelokelek _nlisyne proc far push bp mov bp sp push ds push es push di push si push bx push CX mov ax FUNC_SYNC mov cs word ptr func ax mov CX SYNC ARG WORD call prm set jmp nliclose05 _nilsyne endp KAKK KKK EKA EK KAKA EK kkk kkk kkk kkk kk kkkkkkkkkkkkkkk k F bp 0 BP bp 2 RETURN ADDRESS OFFSET DK bp 4 RETURN ADDRESS SEGMENT 24 bp 6 PATH ADDRESS OFFSET bp 8 PATH ADDRESS SEGMENT ST bp 10 CALLING MODE SE bp 12 ARGi ADDRESS OFFSET bp 14 ARG1 ADDRESS SEGMENT 16 ARG2 ADDRESS OFFSET bp 18 ARG2 ADDRESS SEGMENT 20 ARG3 ADDRESS OFFSET bp 22
222. s Failure 6 IB NA 66253 APPENDICES MELSE CA APPENDIX 4 Function Return Values and Error Codes The following table shows the return value for the driver functions 1 termination or board error Return Value Error Contents Countermeasures The driver has not started Correct the error that occurred when starting the driver Board response error Check that the board is mounted Time out while waiting for a response to the processing correctly A function other than the nlisync is requested during Synchronize with SYNC SEND RECEIVE processing The nl1sync function is requested during processing other Correct so that SYNC is not ex than SEND RECEIVE processing ecuted Status decimal 1 Synchronize with SYNC During SEND RECEIVE processing 2 Processing request error Error Contents Countermeasures Command error Correct the command code Correct A command other than NL1CLOSE NL1RECEIVE the library or NLT1SEND is set Channel error Correct the channel number A unregistered channel number is set Open error Specify the OPEN command only The designated channel is already opened once Close error Specify the CLOSE command only The designated channel is already closed once Path error Change the path number to the one The designated path number has not been opened through opened through the communication the com
223. s is restored Therefore to clear the contents use the following method 1 Method by user program Insert the circuit shown at right into the program and turn on the clear execution command contact to clear the contents of register Clear execution command ER RST 09005 H Method by peripheral equipmentSet the register to 0 changing the present value by the test function of peripheral equipment or set to 0 by forced reset For the operation procedure refer to the manual of each peripheral equipment By moving the RESET key switch at the CPU front to the RESET position the special register is set to 0 Data is written to the special registers marked 2 by the sequence program APP 19 IB NA 66253 A APPENDICES MELSE CA APPENDIX 7 Special Link Relays and Registers 1 Link special relays only valid when the host is the master station Device Description Number Link parameter error OFF Normal Depends on whether or not the link parameter setting of in the host ON Error the host is valid Link card error OFF Normal Depends on presence or absence of the link card hard master station ON Error ware error Judged by the CPU OFF Offline ON Online TE EM Depends on whether the master station is online or offline Link status is in interstation test or loopback self check mode or loopback self check vens Forward loop error p E Depends on the error condition
224. s not guaranteed when the A7BDE A3N PT32S3 is installed in a computer other than that specified above 2 In this manual PC Personal Computer PLC Programmable Logic Controller COMPONENT A7BDE A3N PT32S3A MELSECNET MINI Option Card A7BDE A3N B C A3 CPU and Memory Option Card ACP2PC to Cable Connector MELSECNET MINI Twisted Pair Connector DDK 17 D 2390 02 D8A A7LU1EP21 R21 MELSECNET Fiber Optic or Co Axial inter face card ACP2LU1 A7LU P21 R21 to A3N B C Cable Connector Software driver SW01M A3N 3 5 3 5 INCH Access Function Library 4 Disk contents The same files are included in the 3 5 and 5 inch disks MA3N SYS A3N MAIN MNET interrupt drivers NYUSERC H Driver C Interface Include File MMSCL LIB Driver Interface Library Large MMSCS LIB Driver C Interface Library Small MMSCL ASM Assembler Interface Library Large 1 T MMSCS ASM Assembler Interface Library Small 1 Source Code of MMSCL LIB and MMSCS LIB IB NA 66253 A 2 SYSTEM CONFIGURATION The following sections give the general configurations of A7BDE 3253 systems 2 1 Overall System Configuration The following diagram gives the overall system Configuration with the A7BDE A3N PT32S3 installed in an IBM PC AT or compatible computer A7BDE A3N PT3253 MELSECNET MINI Optical twisted pair SWO1M A3N 3 5 MELSECNET MINI Remote module ME
225. ser program has become excessive 2 Scan time has lengthened due to instantaneous power failure which occurred during scan 1 When the END instruction is executed another instruction code has been read due to noise etc 2 The END instruction has changed to another instruction code for some reason WDT ERROR Checked continuously The END instruction cannot be ex ecuted with the program looped UNIT VERIFY ERR Checked at the execution of END Instruction Not checked when M9084 or M9094 is on VO module data is different from that at power on 1 The module including the special function module is in correctly disengaged or has been removed or a different module has been loaded 1 Check for the presence of inter rupt program which corres ponds to the interrupt unit and create and interrupt program or reduce the same numbers of 2 Check if there is instruc tion in the interrupt program and enter the instruction 3 Check if there is instruc tion in other than the interrupt program and delete the instruction Load the memory cassette and reset Since this is CPU hardware error consult Mitsubishi representative 1 Calculate and check the scan time of user program and re duce the scan time by use of instruction etc 2 Monitor the content of special register D9005 by use of peripheral equipment When the content is other than O line voltage is
226. ssings refer to Section 4 15 PAUSE Operation Processing 4 22 iB 66253 A _ 4 GENERAL OPERATION MELSEC 4 STEP RUN operation processing STEP RUN indicates a run mode which allows the sequence program operation processing to be stopped or continued per instruction using the peripheral equipment The execution state can be checked as the operation proces sing is stopped with the output and data memory status retained The processing shown in the flow chart below is repeated until STEP RUN is switched to another state STEP RUN Operation processing stopped Operation executed up to the step specified by the peripheral equip ment Data communication with the IFMEM Link refresh processing Self diagnosis RUN STOP switch position check For individual processing refer to Section 4 15 STEP RUN Operation Processing 4 23 IB NA 66253 A 4 GENERAL OPERATION MELSEC 5 Relation between RUN STOP switch contro and SCPU operation processing SCPU Operation Sequence Program Data Memory Operation Processing External Output Y M L S T C D Output status is saved by RUN STOP STEP RUN STOP Stopped the OS and all outputs switched off Stopped Status at the time of STOP is retained Depends on the STOP RUN output mode set in the parameter Operation resumes in the status immediately prior to the STOP state
227. status of Stations 17 to 24 Stores the status of stations 25 to 32 Stores the status of stations 33 to 40 Stores the status of stations 41 to 48 Stores the status of stations 49 to 56 Stores the status of stations 57 to 64 Total number stored APP 25 Stores the loca or remote station numbers which are in Local or remote Stores the status error Device Number 15 614 b13 b12 bT1 b10 b b8 b7 b6 b5 b4 b3 bz b1 bo D9228 L R UR LR UR i L R EUR LVR URI L R L R L R 16 15 12 11 i 10 8 71i16 514 312 L R I UR IUR TUR UR i LR UR LR UR E L R UR i L R L R i L R LR 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 09230 UR L R LR L R L R URI OR i L R AR LR UR L R L R L R 48 47146 45 44 43 42 41 40 39 38 37 36 34 33 9231 UR UR UR UR UR UR UR UR UR UR UR UR 64 63 62 60 58 57 56 54 53 52 51150 49 The bit corresponding to the station number with the error becomes 1 Example When local station 3 and remote station 14 have an error bits 2 and 13 of D9228 become 1 and when 09228 is monitored its value is 8196 2004H Stores the local or remote station number at which a forward or reverse loop error has occurred Device WU Number oss exaors bsz o1 68 07 vs ba oa oz 01
228. t be added to the other include file declarations in any user C application programs 6 14 IB NA 66252 A 6 PROGRAMMING MELSEC SPECIFICATION nl1open Function Opens communication line when starting operation of the A7BDE AS3N PT32 S3 Syntax itinclude amp nyuserc h ret nl1open chan amp path Remarks short ret Returned value of function short chan Channel number setting 0 0 A7BDE A3N PT32S3 PATH path Pointer of the opened path Returned Value A returned value of 0 indicates a normal termination Other values indicate an abnormal termination For details see the error code list in the appendix Explanation After the line has been opened correctly path path is set communication driver functions use this path This path remains effective unti the line is closed with the nliclose function EXAMPLE 1 include lt stdio h gt lt nyuserc h gt PATH path main int chan short ret char ch printf Open Path Y N Nt ch getche if chz Y i ch chan 0 ret nl1open chan amp path printf nReturn value open ret printf nPath not closed Nn 6 15 IB NA 66253 A 6 PROGRAMMING MELSE CA SPECIFICATION nliclose Function Closes the communication line when terminating operation of an A7BDE A3N PT32S3 Syntax include lt nyuserc h gt ret nliclose path
229. t error SP UNIT LAY ERR 426 IB NA 66253 4 GENERAL OPERATION Diagnosis Special function module error Special function module Link parameter error error Battery low Operation check error Diagnosis Timing When FROM TO instruction is executed When power is switched on or reset per formed When switched from STOP PAUSE to RUN STEP RUN Always Not checked when M9084 is on When corresponding instruction is executed 4 27 Status Error Message Peripheral Device SP UNIT ERROR LINK PARA ERROR BATTERY ERROR OPERATION ERROR IB NA 66253 A 4 MELSEC A The table below lists the program devices for use with the SCPU Devices marked with a set as required in the system parameters Provides PC command and data from external device X input e g pushbutton select switch limit switch digital X YO to 7FF ee Number of Xs Ys 2048 Provides program control result to external device Y Output e g solenoid magnetic switch signal light digital display Predefined auxiliary relay for special purpose and for E Special relay M9000 to 9255 256 useim the PC Internal relay MO to 999 1000 Latch relay L1000 to 1024 1024 as a relay indicating the stage number of a step by 5 Step relay step process operation program internal relay for data link which cannot be output Lin
230. t is dependent on the requested data Argument Formats ARGUMENT 2 ARGUMENT 3 L Head Address H Number of Bytes Read Data 6 64 IB NA 66253 6 PROGRAMMING 1 itinclude lt stdio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF BOARD A7BDE A3N PT32S3 HIGH SPEED MEMORY BATCH READ This program reads and displays the status of devices X00 to X07 from the host A7BDE A3N PT32S3 high speed memory mod 0 arg1 demand 0x206 arg1 loop 0x00 arg1 station Oxff buff2 0 0x00 buff2 1 0x80 buff2 2 0x00 buff2 3 0x10 nlireceive path mod amp arg1 arg2 arg3 printf Return value HSM batch rd X n ret 0 while 1 16 printf buff3 3d 964X wn i buff3 1 2 CLOSE 6 65 66253 eq e O06 6 PROGRAMMING ACCESS FUNCTION LIBRARY HIGH SPEED MEMORY BATCH WRITE Specification Function A7BDE A3N PT32S3 Access Application High Speed Memory Batch Write Function Name nl1send Processing Code 0x208 Driver Function Number 4H Processing Processing code 0x208 enables batch write of the A7BDE A3N PT32S3 high speed device memory i e SCPU device stat
231. ta to and from the application program and the host A7BDE A3N PT32S3 Both functions have five arguments path mod arg1 arg2 and arg3 arg1 is a structure that specifies the processing code of the called function and if on a network the PLC to be accessed Each processing code has a set of arguments arg2 and arg3 whose formats define a specific operation e g batch read write remote run stop pause The arguments take the form of a memory table to which the relevant data needed to specify an operation is written The various argument formats are given in the proceeding section When sending or receiving data to and from MELSECNET stations data transmission over the network may cause long processing times and a delay before the function return value is received However once the operation data has been sent to the A7BDE A3N PT32S3 transmission is performed independently of the PC The mod argument allows a return value to be immediately received so that other program processing may continue The application program may later enquire if the transmission of data has been completed using the nl1sync function IB NA 66253 A 6 PROGRAMMING MELSE CA Include File lt nyuserc h gt The include file lt nyuserc h gt defines the structure NLARG1 and the constant PATH i e typedef struct short demand short loop short station define PATH long The line include lt nyuserc h gt mus
232. tage ON Count input signal OFF T 72 T1 T2 n X 100 Me 114 2 If T1 gt 72 X 100 1 2 ts Program scan time sec IB NA 66253 A 4 GENERAL OPERATION MELSE CA 4 18 Watch Dog Timer WDT Processing 1 Watch dog timer The watch dog timer is an internal timer used to detect errors of the SCPU s repeated operation function Default value is 200 ms Timing can be set with parameters in 10ms increments in the range of 20 to 2000 ms 2 Operation During each scan of program execution the WDT checks for SCPU hardware errors and processing not completed within predefined periods When either is detected a WDT error is set penetrating an alarm and stopping operation 3 Reset timing The WDT is reset by the END instruction when SCPU operations have been completed within predefined periods 4 Error Two types of WDT error codes 22 and 25 are provided Error code 22 indicates that the END instruction was executed outside of the predefined periods Error code 23 indicates that the END instruction was not executed due to operations entering an endless loop such as from a CJ instruction For further details refer to Section 7 7 Error Codes b Operation at an occurrence of WDT error When a WDT error occurs the operational status of the SCPU becomes as follows a SCPU operation ceases and all outputs are set to OFF b The RUN LED on the SCPU
233. the link for communication with H local stations i e M L s L s gt M Relative L head address H Relative L H Range of W assigned to the master L station H Number of words Total number and range of B Relays used in the link Number of words Range of B assigned to the master ation Number of words Relative L head address H Number of words Relative L head address H Relative L head address Range of W sent by M station to all R L stations H Relative L head address Range of W received by M station from L all stations H Relative L head address Number of words Relative L 0 1 head address ueber of merde ur Range of Y sent by M station to L stations Range of X received by M station from all L stations Number of words Number of words Range of Y sent by M station to all R stations Range of X received by M station from Number of Number of words assignment presence absence APP 61 all R stations 00 No assignment made 01 Assignment made IB NA 66253 APPENDICES 48 59 60 No 1 15 bytes 75 No 2 15 bytes station transmission range Data differs between L and R Details are given on the next page 990 15 bytes 1005 No 64 15 bytes 1020 Fixed pattern 1032 3 0 arg3 1 EE arg3 1031 Sum check on arg3 0 to 1031 1034 APP
234. tion Step operation Year month date hour minute second and day of the Clock week can be written to and read from the special register Information can be displayed in a 16 character display on the front panel for the CPU module The kinds of data displayed include error comments resulting from errors occurring during self diagnosis and comments resulting from OUTF and SETF LEDs are reset using board data derived LED display is reset using the LED display Method for LED display reset from the option board settings reset witch Hardware is reset using board data derived Hardware is reset using the reset switch Method for hardware reset from the option board settings None The content displayed on the A3NCPU LEDs can be confirmed using the board information of the option board setting LED display 4 66253 APPENDICES MELSEC y b Differences in Instruction Specifications the instructions of the A7BDE A3N PT32S3 SCPU and A3NCPU are the same However the instructions listed below have varying conditions 1 PR PRC instruction The PR and PRC instructions cannot be used to display the data on the A6FD external display unit which is connected to an output module This is because the extension base unit cannot be connected to the A7BDE A3N PT32S3 SCPU Even if the PR PRC instruc tion is executed to output module of a remote station a corr
235. to sequence control Programming language Combined use of relay symbol type and logic symbolic language Combined use of MELSAP language Allowed 22 types Basic instruction 132 types Application instruction 107 types Processing speed sequence instruction 1 0 to 2 3 sec step points 2048 points Constant scan function starting a program Settings are possible in 10ms intervals over a range of 10 to 1990ms in fixed intervals Watch dog timer WDT Settings are possible in 10ms intervals over a range of 10 to 2000ms Allowable power failure period 10ms or less Memory capacity 64 KB Maximum 320 KB Main sequence program main microcomputer program maximum of 30K steps main microcomputer program can be set to a maximum of 58 KB 29K steps Sub sequence program sub microcomputer program maximum of 30K steps sub microcomputer program can be set to a maximum of 58 KB 29K steps 1000 MO to 999 Total number of M L and S 1024 L1000 to 2047 2048 set by parameters 109 types Direct method 1 0 to 2 3 Refresh method 1 0 Program capacity Internal relay M points Latch relay L points Step relay S points 0 points None in initial status Link relay B point 1024 BO to 3FF Number of points 100ms timer setting time 0 1 to 3276 7sec Timer T TO to 999 Specifications 10ms timer setting time 0 01 to 327 67sec Set by parameters T200 to 255
236. tput side contact output 24V DC 2 240V AC 2A 12 points unit Compact Type input side sink type 12 24V DC 16 points Remote unit 2805 Output side triac output 100 240V AC 0 6A point 12 for optical points data link twisted pair VO unit data link Input side sink type 12 24V DC 16 points AJ3SPTF 28DT Output side transistor output sink type 12 24V DC 0 5A point 12 points VO unit AJ35PTF 56AR Input side 100 120V AC 32 points Output side contact output 24V DC 2A 24 points unit Input side 100 120V AC 32 points AJ3SPTF 56AS Output side output 100 240V AC 0 6A point 24 points unit Input side sink type 12 24V DC 32 points 5608 Output side contact output 24V DC 2A 240V AC 2A 8 stations 24 points VO unit 3 Input side sink type 12 24V DC 32 points 5605 Output side triac output 100 240V AC 0 6A point 24 points unit Input side sink type 12 24V DC 32 points AJ3SPTF S6DT Output side transistor output sink type 12 24V DC 0 5A point 24 points 100 120V AC 16 points 3 14 IB NA 66253 A 3 SPECIFICATIONS MELSEC MELSECNET MINI S3 Equipment AJ72PT35 Partial refresh type remote unit for optical data AJ35PTF 128DT link twisted pair data link RS 232C AJ35PTF R2 interface unit for optical data AJ35PT OPB M1 1 link twisted pair
237. trace OFF Sampling trace stop Sampling trace is not executed until M9047 is turned on By turning off M9047 preparation ON Sampling trace start sampling trace is stopped CHG instruction OFF Disable Switch on to disable CHG instruction Switch on to request program transfer execution disable ON Enable Automatically switched off on completion of the transfer OFF Sequence interrupt EVDI instruction control Switch on to execute the link refresh enable disable El DI instructions switching ON Link interrupt control M9054 STEP RUN flag Ov step Switched on when the RUN STOP switch is in STEP RUN Status latch OFF Uncompleted 2 completion flag ON Completed Turned on when status latch is completed Turned off by reset instruction Main program ON During set request OFF set request Switch on upon completion of the transfer of another program during RUN quest 4 e g during RUN of the program Automatically switched ON During set request off when P setting is complete M9057 25 OFF Except during P set q request Used to set whether or not the following error checks are made at the execution 2 M9084 Error check setting D Mq d of the END instruction To shorten END instruction processing time Fuse blown unit verify error battery error APP 12 IB NA 66253 A APPENDICES MELS
238. ts value is 2080 820H Stores the status of stations 17 to 32 Local station error detection Stores the status of stations 33 to 48 Local station error detection Stores the status of stations 49 to 64 Local station error detection Stores the local station numbers which contain mis matched parameters or of remote station numbers for which incorrect assignment has been made Device _ incen b13 b12 b11 b10 b9 b8 b7 be bs o3 2 bt eo 18 14 12 111101918 176 4 3 1 09221 UR URTUR C R L R UR L R UR L R UR L R L R FLR UR 32 31130 29 28 27 26 24 22 21 20 19 18 17 nm ale 48 47 46 44 43 42 40 38 138 37 36 35 134 UR L R UR L R I L R LR UR L R UR L R L R 64 63 62 60 59 58 57 56 55 54 52 51 50 49 If a local station acting as the master station of tier three detects a parameter error or a remote station contains an invalid assignment the bit corresponding to the station number becomes 1 Example When local station 5 and remote I O station 14 detect an error bits 4 and 13 in D9220 become 1 and when D9220 is monitored its value is 8208 2010H Local station parameter mismatched or remote station I O assignment error Stores the status of stations 1 to 16
239. umber o9 e 8 sf e 2 When setting the dial numbers ensure that the A7BDE A3N B C IRQ numbers do not conflict with the settings of other option boards Check that only the numbers 0 to 7 have been used 3 The dial number is set to zero when shipped Ensure that the IRQ number set for the A7BDE A3N B C does not conflict with those previously used or reserved for other applications Please consult the documentation that accompanied the computer for information on reserved numbers 5 19 IB NA 66253 A Ir TRE Ee om MIN MNT CMS CN CU LT S BS e Emu D 34 1 ENSE MMErITKMM P 95 5 PRE OPERATION SETTINGS AND PROCEDURES 5 5 17 A7BDE A3N B C ROM RAM Specification The A7BDE AS3N B C has a bank of DIP switches located near the top of the card These are used to specify the type of memory being used either ROM or RAM and also RAM memory location ranges to be write protected By write protecting RAM memory locations data such as sequence programs and parameters cannot be accidently changed or corrupted by malfunctioning peripheral equipment Details are provided in the table below Switch Switch Setting Status Switch Setting Status ROM RAM switch
240. unit cannot be connected to the SCPU Therefore to use modules and special function modules requires a remote system to be configured using either MELSECNET or MELSECNET MINI S3 As shown below the numbers of slots 0 and 1 are occupied by the system 1 Slot 0 is assigned 32 points for the IFMEM These devices are used for data transfer between the IFMEM the PC Application Program and the SCPU 2 Slot 1 is assigned 32 48 points for the MELSECNET MINI S3 master unit Number of points varies depending on the jumper settings of the number of points occupied A eun 7 D T P T 3 2 S 3 1 Extension bases cannot be connected to SCPU However the base unit is shown in order to explain numbers 2 The numbers available to the user are those after X and Y40 50 SCPU Number Assignments 2 7 IB NA 66253 A 3 SPECIFICATIONS 3 SPECIFICATIONS The following sections describe the specifications of the A7BDE 253 A3 CPU Programmable Controller option card 3 1 General Specifications The above specification is for the user s computer and A7BDE A3N PT32S3 combined 3 1 IB 66253 A 3 SPECIFICATIONS MELSEC 3 2 Performance Specifications Control Control systems Repeated operation using stored program Language dedicate
241. unter C n Counter for para specifications interrupt meters program setting range 1 to 32767 Counters used in interrupt programs Data register D points 1024 DO 1023 Link register W points 1024 WO 3FFF 3 2 IB NA 66253 A 3 SPECIFICATIONS MELSEC Annunciator F 256 FO to 255 points File register R Max 8192 RO to 8191 points Accumulator A 2 A0 A1 points Index register V 2 2 V Z points Pointer P 256 PO to 255 points Pointer for interruption 1 points Special relay M 256 M9000 to 92555 points Special register D 256 D9000 to 92555 points Comment points specify in batches of 64 points Device For details refer to the Programming Manual Watch dog error monitor memory error detection CPU Self diagnostic functions error detection error detection battery error detection etc Operation mode at the time of error STOP CONTINUE STOP RUN Output mode Output data at time of STOP restored data output after ped operation execution SCPU uses the direct method however since the modules are installed in either the MELSECNET of MELSECNET MINI the delay time of the 1 0 5 are determined by each of data link processing times 3 3 IB NA 66253 A 3 SPECIFICATIONS 3 3 MELSECNET A7LU1EP21 R21 Communication Specifications MEE RN ATLUTEPZ ATLUIERZ Optical Data Link Coaxial Data Link 2 3 tier exte
242. us Please see the appendix for head addresses and write data formats Argument two specifies the head address and number of bytes to be written maximum of 128 bytes Argument three contains the write data Argument Formats ARGUMENT 2 ARGUMENT 3 L Head Address H Number of Bytes Write Data IB 66253 4 6 PROGRAMMING MELSE CA tinclude lt stdio h gt include lt nyuserc h gt PATH path NLARG1 arg1 main int chan mod i short ret unsigned char arg2 unsigned char arg3 char buff2 512 char buff3 512 arg2 buff2 arg3 buff3 OPEN OF I F BOARD A7BDE A3N PT32S3 HIGH SPEED MEMORY BATCH WRITE This program writes the value Oxff to data registers 00 07 of the host A7BDE A3N PT32S3 high speed memory mod 0 arg1 demand 0x208 arg1 loop 0x00 argt station Oxff buff2 0 0x00 buff2 1 0x80 buff2 2 0x00 buff2 3 0x10 i 0 while i 16 buff3 i Oxff i i 2 ret nlisend path mod amp arg1 arg2 arg3 printf Return value HSM batch wr 9 6X wn ret CLOSE 6 67 66253 6 PROGRAMMING Specification Function A7BDE A3N PT32S3 Access Application High Speed memory Random Read Function Name nl1receive Processing Code 0x207 Driver Function Number 3H Processing Processing code 0x207 enables random read of the A
243. us condition is OFF and the timer coil is set to OFF the updating of the present value is terminated However the present value is still retained 2 RST instruction execution At the point the timer reset is executed by the RST instruction the present value is set to 0 and the contacts open Even with the coils of the 100ms retentive timer set to OFF the present value and contact status are maintained RST T instruction is used to reset the 100ms retentive timer 3 OUT jumped If the OUT instruction is jumped after the timer begins 4 timing it continues to time the contacts closed when the timer times out Timer present value and contact status updated Timer Processing Timer accuracies are as follows For further details refer to the ACPU Programming Manual ______ Scan Time T Accuracy T lt 10 ms 2 scan time to 10 ms 2 scan time to 1 scan time 100 ms 100 ms retentive T 100 ms 2 scan time to 100 ms 100 ms 100 ms retentive T2100 ms 2 scan time to 1 scan time 4 14 IB 66253 A 4 GENERAL OPERATION 4 17 Counter Processing The SCPU counter detects the leading edge of the input signal OFF ON and adds the present value Two counters normal and interrupt are provided The normal counter is used in main routine programs or subroutine programs The interrupt counter is used in interrupt program
244. value sw stat rd ret printf buff3 0 9ex xn i buff3 0 printf buff3 1 i buff3 11 CLOSE 6 75 IB 66253 A 6 PROGRAMMING lt Specification Function Application Function Name A7BDE A3N PT32S3 Board Access Version Read nlireceive Processing Code 0x702 Driver Function Number 3H Processing Code 0x702 specifies version read of the host A7BDE A3N PT32S3 option card The access station number Argument two must be specified as OxFF requires no set data Argument three receives the board version memory table of sixty four bytes The table contents is as follows 0 1H 2 3H 4 5H 6 BH C FH 10 1FH 20 2FH 30 31H 32 33H 34 35H 36 3FH Pass Word fixed at SG ASCII Code Check Sum of bytes 4 to 1FH Hex Software Version ASCII Code ROM Date Two bytes each Year Month Day ASCII Reserved area set to 0 00 Software Type e g A3NCPU ASCII Code Hardware Type e g A7BD A3N PT32S3 ASCII Code 2 Port Memory Size e g 4000H i e 8K Bytes Hex 2 Port Attribute Fixed at 0001H Hex Usable Offset Hex Reserved Area Argument Formats ARGUMENT 2 ARGUMENT 3 db ES No Data Read Data BH E 6 76 IB 66253 A 6 PROGRAMMING lt tinclude lt stdio h gt lt nyuserc h gt PATH path NLARG1 1 main int chan mod sho
245. when an error occurs 4 55 IB NA 66253 4 GENERAL OPERATION 3 Special relays registers a Special relays M9025 Clock data Writes clock data from D9025 through D9028 to the clock devices after the END set request instruction is executed during the scan when M9025 is switched on M9026 Clock data error Clock data When M9027 stays ON clock data is displayed to the LED on the front panel of the M9027 display CPU module M9028 Clock data When M9028 stays ON clock data is read to D9025 to D9028 after the END read request instruction is executed b Special Registers eme Ren 22 b15 Month Year month L 01 to 12 in BCD Year 00 to 99 in BCD Switched on when any clock data set is not BCD Clock data Houi Day hour gt 00 to 23 in BCD Day 01 to 31 in BCD Clock data Second Minute second L 00 to 59 BCD Minute 00 to 59 in BCD L 00 to 06 in BCD 0 Correspondence between the day of the week and number Day of the week Clock data Day of the week storeddata o v 2 5 55 4 56 IB NA 66253 A 4 OPERATION a Writing the clock data to clock devices 1 Store the clock data to D9025 to D9028 in BCD code 2 Switch on M9025 CAUTION a The clock data must be written to the clock when usi
246. which loopback is being executed Loopback executing Station executing Master D9205 station forward loopback station 2 T Forward loopback Reverse loopback Loopback executing Station executing In the above example 1 is stored into D9205 and 3 into station reverse loopback D9206 If data link returns to normal status data link in forward loop values in D9205 and D9206 remain 1 and 3 Reset using sequence program or the RESET key Count stops at a maximum of FFFFH D9210 Retry count RESET to return the count to O D9211 Loop switching Stores the number of times the loop line has been count switched to reverse loop or loopback Local f Stores the local station numbers which are in STOP or ocal station tores the status o PAUSE mode operating status stations 1 to 16 D9206 Stores the data link processing time with all local and remote stations Input X output Y link relay B and link register W assigned in link parameters communicate with the corresponding stations every link scan Link scan is a period of time during which data link is executed with all connected slave stations independently of the sequence program scan time Stores the number of retry times due to transmission error Total number stored 09212 Device Pt 04 Number 615 614 613 612 6111610 b9 b7 b6 b5 b4 b3 b2 b1 092
Download Pdf Manuals
Related Search
Related Contents
MUL1132 Multímetro digital 3-1/2 - ELECO Samsung Monitor LED de 19" com um tom azul manual de utilizador ACS550 - All Electrical Distributors La conservation des objets mobiliers dans les églises Polk Audio T15 User's Manual iStarUSA WN2210 CAM データベース取扱説明書 Canon imageCLASS MF5880dn Setting Guide Catalogo riscaldatori ad induzione ACM-HUMIC - agritec sa Copyright © All rights reserved.
Failed to retrieve file