background image

Summary of Contents for Melsec A

Page 1: ...PROGRAMMABLE CONTROLLER flsE A B User s Manual Intelligent communication module type ADSIE AMlTSUBlSHl ELECTRIC ...

Page 2: ...REVISIONS Print Nov May Date 1986 1987 Manual number The manual number is given on the bottom left of the back cover Revision First edition I Correction 1 CONTENTS APP 7 I Addition 1 APP 6 ...

Page 3: ...for choosing the Mitsubishi MELSEC A Series of General Purpose Programmable Con trollers Please read this manual carefully so that the equipment is used to its optimum A copy of this manual should be forwarded to the end User ...

Page 4: ... 3 11 Interface Specifications 3 13 3 5 1 RS 422connector specifications CHI 3 13 3 5 2 RS 422terminal block specifications CH2 3 14 3 5 3 RS 232Cconnector performance specifications CH3 and 4 3 15 I O Interfacewith ProgrammableController CPU 3 16 BufferMemory 318 Communication between AD51 and PC CPU 3 19 4 PRE STARTUP PROCEDURES 4 1 4 10 4 1 General Procedure 4 1 4 2 Nomenclature 4 2 4 3 Hardwar...

Page 5: ...E CONTROLLER CPU 7 1 7 31 7 1 General Purpose 1 1 0 ReadIWrite 7 1 7 1 1 General purpose1 1 0address 7 2 7 1 2 Write to general purposeinput 7 3 7 1 3 Read from general purpose output 7 5 7 2 ReadIWrite of Buffer Memory 7 6 7 2 1 Readlwrite with BASIC program 7 6 7 2 2 Readlwrite with sequence program 7 7 7 3 Device Memory ReadIWrite 7 9 7 3 1 System subroutines and device ranges 7 9 7 3 2 BASIC p...

Page 6: ... Multi task troubleshooting 8 10 8 3 6 CRT troubleshooting 8 11 8 3 7 Print out troubleshooting 8 12 9 MAINTENANCE 9 1 9 3 9 1 Battery Life 9 1 9 2 Battery Changing Procedure 9 2 APPENDICES APP 1 APP 7 APPENDIX 1 GPPIHGP Display Control Codes APP l APPENDIX 2 VT220 Control Codes APP 2 APPENDIX 3 GPPIHGP Key Codes and Character Codes APP 3 APPENDIX 4 Storing the AD51E Memory Data into ROM Using the...

Page 7: ...ta and fault information t o be down loaded to a printer from the PC The AD51E also includes an on board real time clock for time event data recording 4 PC CPU remote runlstop Allows the PC CPU t o be remote controlled by the AD51E user program 5 UPIDOWN load of PC sequence programs Allows PC data includingsequence programs and parameters t o be transferred between the AD51E and the PC CPU in mach...

Page 8: ......

Page 9: ...YSTEM CONFIGURATION 2 1 Overall Configuration 1 Al A2 A3 type PC Battery Intelligent communication unit 1 AliElCPU A3iEICPU CPU unit A386 Main base unit I I Extension cable L Extension bare unit Fig 2 1 Building Block CPU Configuration ...

Page 10: ...2 SYSTEM CoNFlGuRATloN MELSEC 2 AOJ2 type PC Battery Intelligent communlca unit E CPU unit Extension cable i L Extension bare unit Fig 2 2 Compact CPU Configuration ...

Page 11: ...30R4 terminal Type AC300R4 RS 232C cable RS 422 cable K6PR KGPRK General purpose 110 canrole Type A6HGP KD51PR Printer Intelligent GPP Handy graphic programmer I eneral purpose C R l qzq Keyboard Fig 2 3 Peripheral Device Configuration The consul select switch must be set to determine which programming terminal is to be used ...

Page 12: ...tion or a local sta tion but not into a remote I O station in a MELSEC NETsystem The following CPU units are required for the MELSEC NETdata link system Applicable models A1 EKPU P21 R21 master or local stations A2 E CPU P21lR21 A3 E CPU P21IR21 AOJ2CPU P231R23 local only 3 One AD51E or AOJ2C214 computer multidrop link unit may be used with the AOJ2 PC The A l A2 A3 CPUs can accomo date two AD51Es...

Page 13: ...e following models I Tvoe I Remarks I 1 AGGPP I Programmin unit with CRT Eau ooed with ROM wrmr FDD and minter interface functions I SWII GPPK K rerier system disk o Consists of the following I Tvoe I Remarks I 1s HGPA A series watem disk I AGHGP Programming unit with LCD Equipped with FDD and printer interface functions SWi HGPK System software package far the AGGPP or AGHGP back uo coo orovided ...

Page 14: ...2 CON I Connector for RS422 and RS232C interfaces I I Printer paper Table 2 1 System Equipment List K6PR R K7PR R A7PR R KD5lPR R Ink ribbon for KGPR and K6PR K Ink ribbon for K7PR Ink ribbon for A7PR Ink rbbon for KDSIPR KGPR Y Printer paper for KGPR and K6PR K KD51PR Y I Printer paper for KD51PR ...

Page 15: ...d J For details refer to Section 3 5 page 3 13 General purpose input 13 paints General purpose output 10 points For details refer to Section 3 6 page 3 16 3K words 6K bytes For details refer to Section 3 7 page 3 18 4F00 to 4FFF system data areal 8000 to DFFF channel 1 to 41 Conforms to EIA RS 422 Channel 1 D shell connector Channel 2 Terminal block Transmission distance 500m Conforms to EIA RS 23...

Page 16: ...OMPILE DELETE EDIT EXECUTE Displays program on screen Resumer program run after BREAK Compiles multitask executable program Deletes program from rpecified line number to rpecified line number Corrects statement in one line Run of program after RUN or COMPILE BYE Renumbersline numbers Returns to BASIC program address data ween LLlST Prints out program I Deletes line I NEW I Erases lrogram RUN Execu...

Page 17: ... Displays data on screen D PEEK POKE Reads 1 byte data from specified memory address Writer 1 byte data to specified memory address A SIZE Displays text program capacity B 1 1 STOP I Stoos oraaram run REM Underline ZCOFF Type A when the conaole is GPPIHGP T v e B when theconsale is VT 220 Used t o write comment RC BX ndcr ne l r c o after ZCOFF ZCOh Tvnr A hncn the conso c F GPPlrlGP TV JC B wncn ...

Page 18: ... tan Iof mathematical ex rersion I COS I Cosine cod of mathematical expression Intrinsic I EXp I Value of Exponential to base e Function e 2 718281 LN Value of natural logarithm loge1 LOG 1 Value of common logarithm log l Generates 1 when value of mathematical expression is 0 I I and generates 0 when the value is not 0 RND Assigns random number to variable SIN I Sine sin1of mathematical expression...

Page 19: ...e 3 2 BASIC Command List Comparw son operator Logical operator j t O G l L L f I 6 equal to IS no1 equal to Is less than 1s grealer than Is nor greater than Is not leis rhan Negaton NOT Logical product AND1 Log cai rum IORI Exclurve logtcal rum IEXOR ...

Page 20: ...subroutine in channel 0 See table 8 2 Variable 3 Variable for system subroutine stored in D E registers Variable 4 Variable for system subroutine stored in B C registers 3 For information on variable 3 and variable 4 refer to the GPC BASIC Handbooks 4 Before executing the CALL command transfer variables to the work area Function IChannel IAddress I 1 I SAI I ASCII lhexadecimall BIN I 0 I 8060H I 2...

Page 21: ...of vacant bytes in receive buffer of rpec fied channel Iz7i SHX Controls sendiiece8ve data of rpecrfled channel by XoniXoff coder Contialr sendireceive data of specified channel by DR terminal to EBCDIC code SEA No code conversion of sendlreceive data of specified channel 131 STC Readr the number of remaining byter in rend buffer of rpeched channel 1321 SRP 1 Reads status of mecified channel 33 SR...

Page 22: ...44 Table 3 3 System Subroutine List Reads sequence program 46 Where system subroutines have several options indicated as a m only those shaded m may be used on the AD51 451 SIT I Interruption to programmablecontroller CPU I 0 1 802AH SAPS System subroutines indicatedas are covered in the GPC BASIC Handbooks t 3 0 471 scz I Sets SRZISWZ retry time I 0 I 8006H SIR 808AH Analysis request of programma...

Page 23: ...er program TASK 1 to 8 Operation is enabled only in offline BASIC program mode when multitark or BASIC program is not being executed Fig 3 1 Software Configuration 1 As shown in Fig 3 1 a maximum of 8 user programs may be processed in parallel under the control of the real time monitor 2 Power on interrupt from ACPU and real time interrupt are available as starting conditions for the user program ...

Page 24: ... d 2 Bytes with the following head addresses in the User Woik area are used far direct accessing of the General Purpose 110 assignedt o the AD51 using the PEEK and POKE commands see section 7 1 1 1 2 Channels 3 and 4 become available When ROM is loaded I I u User memory area Max 112K bytes 3 Buffer memory I16 bit Fig 3 2 Memory Map OINT I 1 The RAM user work area addresses6000H to 67FFH is in the ...

Page 25: ...d by loading ROM into chan nels 1 andlor 2 The memory map will vary as shown below depend ing on the location and size of the ROMs 8K and 16KROMs may be used ECOOH FFFH Channei 1 Without ROM l d n n t 2 r 7 RAM RAM L 1 RAM EOOOH 1 RAM 8KROM RAM 1 16KROM Table 3 4 Memory Map When R O M is used ...

Page 26: ...nels 1 and 2 The RAM area is moved as follows depending on the pin setting in each channel With ROM Without ROM I I RAM position I RAM and ROM areas coincide I Correct I I The RAM area changer ROM position Correct channels as though ROM war installed 3 Only 24K bytes are valid addresses 8000H to DFFFH when 16K ROM is used The 8K bytes from EOOOH to FFFH are used in the RAM area and this address ra...

Page 27: ...ity bit setting Parity present Even parity Stop b i t 1 Stop bit setting CStop bit 2 Signal Send data Receive data Dara terminal readv Data set ready D C current rame giaunc Connect I SGA SGB Signal Iirection Remarks outside l Do not perform wiring connected eqwpment I the external equipment POINT 1 The maximum transmission speed from the AD51 is 9600 BPS the maximum receiving speed is 4800 BPS 2 ...

Page 28: ...rity absent Parity bit setting Even parity Parity present Stop bit 1 Stop bit setting Stop bit 2 L C h a r a c t e r data bit C Data 7 bitr setting Data 8 bitr Terminal block pin outs Block Terminal Signal I Diagram I Number IDirection 1 7 l qT B l 1 outride Send data ISDBl T82 Receive IRDAl Receive outride data IRDB Signal ground TB5 ISG Frame ground TB6 IFGI Remarks i POINT The maximumtransmissi...

Page 29: ...etting Stop bit 2 Character data bit Data setting I D a t a 8 bits Cammunicat8on XONIXOFF control control rettlng Control with DTR terminal Set CH3 with the front DIP rwitcher SWl to 8 Pin Number 1 2 3 Signal Direction lnride outride Signal Abbreviation 4 5 6 POINT I Description FG SD RD 7 1 The maximum transmission speed from the AD51 is 9600 BPS the maximum receiving speed is 4800 BPS RTS CTS DS...

Page 30: ...vary depending on the AD51 slot location in the table the AD51 is assumed to be in slots 011 of the main base unit 1 There are 48 input signals to the PC CPU XOOto X2F from the Input Description Number Unused XOF Switched onloff by the BASIC program and the contacts used in the sequence program Known as Unused X2F X17 X18 X I 9 X1A X1B X1C X I D X1E X l F AD51 Address eneral purpose input Switched...

Page 31: ... the AD51 designated as an interrupt program by its task start condition Unused Y2F 1 Input X1D is switched on when an error is detected by the AD51 hardware This signal may be used as an inter lock in the PC sequence program to control PC accessing of the AD51 buffer memory i e FROMITO instructions 2 Switching output Y29 on will start the task which has its start condition specified as interrupt ...

Page 32: ...r memory d 3 The buffer memory is accessed by the AD51 using system sub routines SR2 SW2 For details refer to Section 7 2 1 page 7 61 4 The buffer memory is accessed by the PC CPU usingthe FROM and TO application instructions For read and write procedures refer to Section 7 2 2 page 7 7 For details of the FROMITO instructions refer to the Al A2 A3CPU Programming Manual Address Buffer memory area F...

Page 33: ... n g t a b l e s h o w s t h e n u m b e r of scans t a k e n by t h e AD51 to process P C t r a n s a c t i o n subroutines Device memorv Sequence program Paramete CPU PC1 Buffer memory Item 1 System I N er of Scans Subroutme Requared for Processing Batch read E lSADR 1 Batch write 1 SAOW 1 2 scans for 1 scan device R Test 1 SADT I irandom write1 I Bit 1 Independent of scan Monitor data entry 1 s...

Page 34: ...ans 3 When a system subroutine is called which accesses the PC CPU there is a delay while the PC CPU preparesthe appropriate data During this delay time the AD51 switches tasks to optimize scan time In the example shown below three tasks are executing subroutine which access the PC CPU Task one provides the first processing request to the PC CPU which prepares the requested data During this delay ...

Page 35: ...multidrop terminal rerirtance Before writing or correcting a Turn M PROTECT switch off program set the M PROTECT w i t c h to OFF Start up 1 1 0 console GPP or HGP General pur ore 1 1 0 console Programming Write program I Write software onto disk Always keep a back up copy I Multitask setting Write programs onto ROM Specify memory protect ranges and set M PROTECT switch to ON ...

Page 36: ... I I Error indicator I 1 Displays a 2 diglt error cat L I RUNISTOP key switch I INDICATOR RESET switch Resetserror display nel selection memory pro tect area and multidrop terminal resistance rig i iij L v For details refer to Sec tion 4 3 syrtem data area and user memory area IC RAM CHI IRS4221 connector AGGPPIAGHGP drop system general pur pose RS422 It is necessary to set or load 0 before starti...

Page 37: ...d to reset an error or to initialize multi tasking Error indicator Displays a 2 digit error code as appropriate INDICATOR RESET switch Resets the error code display after the error has been removed The error code will remain if the error has not been cleared 3When several errors have occurred pressing the reset switch will display consecutive error numbers in the order that they occured Memory pro...

Page 38: ...rminal block The terminal block is provided for use in the AD51 multidrop system A maximum of 32 AD51 stations may be included in the multidrop link This connector may also be used as a general purpose RS 422 port CH3 RS 232C connector Set DIP switch SW16 OFF to use this port for programming with the VT 220 or GPPIHGP set DIP switch SW16 ON to use this connector as a general purposeport CH4 RS 232...

Page 39: ...he front of the unit as described below 1 Memory protect area Areas marked in the memory maps below can be memory protected Common area 4FOOH to 4FFFH isyrtem data areal R 6000H to 67FFH user work areal 7FFFH User memory area BOOOH Channel 0 FFFFH 1 Channel 1 Channel 2 Channel 3 Channel 4 I8K bytes RAM area when ROM is innalled REMARKS I 11 The memory protect DIP switch number is shown as to in th...

Page 40: ...H SW5 2 4 8000H to 9FFFH SW6 2 4 AOOOH to BFFFH SW7 2 4 COOOH to DFFFH SW8 SW9 SWlO Unused S W l l SW12 SW13 1 BASIC program address data and multi task setting data is stored in address ranges 4FOOH to 4FFFH 256bytes Set memory protect with SW1 after starting multi task ing 2 Switching the memory protect key to ON protects all areas defined by the DIP switch settings 3 Keep the memory protect swi...

Page 41: ...C H I IRS 4221 I I General purpose port The console setting switch is valid after the AD51E is powered up or reset When the console setting has been changed reset the AD51E 4 3 3 Terminal resistor A terminal resistor is fitted to prevent distortion of the transmis sion signal waveform When a number of AD5ls are connected together via an RS 422 link the two end stations should be set with terminal ...

Page 42: ...e ROM sockets should be empty if ROM is not being used ROM memory loading I Open ROM socket I IPiace ROM in socket nothing the direction of the blip I I Push the ROM into the socket and lock I Check that ROM is flush with socket I I Set the shorting pin as indicated below Fig 4 1 How to Hold ROM Complete CI Shortingpin sttin RAM ROM 1281 ROM 2561 L Fig 4 2 Pin Settings Dependingon Memories ...

Page 43: ...e mixed providing the address ranges are noted 4 When ROM is installed some RAM address ranges change For details refer to Section 3 5 page 3 13 5 Cover the EPROM window after it has been programmed 6 Ensure that ROMs are correctly stored and protected 7 Keep the ROM away from static electricity use anti static foam where possible 8 The shorting pin is factory set to RAM RAM A and RAM B connectors...

Page 44: ...ttery is disconnected before leaving the factory to prevent unneccessary battery consumption The battery plug should be connected to pins CON7 on the circuit board before the AD51 is used The red wire is positive and the connector is keyed to prevent wrong connection ...

Page 45: ...at least 100mm away from main circuit wiring high voltage cables and PC input and output wiring 2 Ground shield wires or cable shields at one point only 3 Use M4 solderless terminals for connection t o the RS 422 ter minal block 5 2 RS 232C Connection RS 232Cconnection External equipment AD51 RTS b CTS Fig 5 1 RS 232C Connection Diagram ...

Page 46: ...5 WIRING MELSEC 5 3 RS 422Connection 1 RS 422 connector AD51 External equipment SDA SDA SDB SDB RDA RDA RDB o RDB 5 DTRA DTRA DTRB DTRB DRSA DRSA 0DRSB SGA 1 SGA I 5 2 1 8 INN 6W59A ...

Page 47: ...tidrop system with an overall link distance of 500m I RS 422 multidrop cabling should conform to the following specifications Item Specifications Cable type Shielded cabie Conductor resistance 2O0CI 88 0Rikm or less l n u l a t o n reristance 10 000MR km or less Dielectric strength 500V D C f o i 1 minute Electrostati capacity 1KHz 6OnFikrn or less on average Characteristic impedance 100KHzl 1 1 0...

Page 48: ...t I Proaram last address I The last address of the BASIC text area I Program number BASIC text number I 1 t o 8 Program head address I The first address of the BASlC text area 8WOH onwardrl Add tnon 4 program head address 1 Direct variables A to Z are allotted in the BASlC interpreter work area Head aodrers of vacant area in BASIC text area Aulomatcallu set bv the 0 S I 1 2 Use the address range D...

Page 49: ...head address Program last address Additional program head address Work area head address Channel Task Program head address Program last address Additional program head address Work area head address Channel Task Program head address Program last address Additional program head address Work area head address Channel TASK 1 1 8000H AFFFH A74CH FOOOH 1 1 8 0 0 0 H AFFFH A74CH FOOOH 1 1 8 0 0 0 H AFFF...

Page 50: ... on Write the BASlC program so that END is executed as the final instruction and set the task start condition to POWER ON Set rnulti task start condition to Task runs once after power on POWER BASlC program 6 2 2 Program runs continuously after power on Write the BASlC program using the GOTO instruction to continue program execution and set the task start condition to POWER ON Task runs continuous...

Page 51: ...1 interrupt signal is received from the PC CPU Set rnulti task start condition to PC CPU interrupt BASIC program v END PC CPU interrupt reset 2 Only one task may be defined as PC interrupt start More than one will generally lead t o ORST error 6 2 4 Program runs a t preset intervals in real time Select starting condition REAL TIME INT real time interrupt The real time interrupt interval i e the ti...

Page 52: ...ng run Task 1 Task 2 100 REM TASK 1 100 REM TASK 2 200 ZlDV 1 500 ZlDV 1 210 A INKEY 510 B INKEY 1 1 Example When both task 1 and task 2 are waiting for key input from channel 1 pressing a key will only write data to one of variables A or 6 6 3 2 Printing commands The printing commands are PRINT and LPRINT 1 Difference between PRINT and LPRINT commands PRINT Used when the printer is connected to t...

Page 53: ...1 RS 232C ports When using the KD51PR note the following The KD51PR will print if data is sent from the AD51 while it is printing or during paper feed This may be avoided by using the program shown in Example 2 0 Example 1 shows a program which repeatedly prints the letters ABCDE and the resultant KD51PR print out Print data and contrai codes CR cade LF codel are sent from AD51 Print control cade ...

Page 54: ...d 2 seconds o When the 2K buffer is set to OFF in the KD51PR any string of characters sent which is more than one line long will lead to an overrun error when the LF code is given The receive buffer is 32 characters long See below 100 LRPlNT ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF 1 3 2 characters To overcome this write a comma after the PRINT state ment to stop the LF code from being given as below 100 ...

Page 55: ...fore re defines the communication mode for the specified port and clears both AD51 buffers at that port 3 The CLOSE command initializes the AD51 communication control and buffers in the same way as the OPEN command however in this case the port is left in a readlwrite disable state POINT I Before using the CLOSE command ensure that the transmit buffer is empty be using subroutine STC Data will be ...

Page 56: ...he AD51 general purpose inputs are switched off 3 During reset there is no accessing of the PC CPU 4 There is no signal by which the PC CPU can know that the AD51 has been reset 5 Any FROM or TO instructions executed by the PC CPU when the AD51 is reset will be invalidated 2 PC CPU reset operation 1 All the AD51 general purpose outputsare switched off 2 Resetting the PC CPU disables access by the ...

Page 57: ...OMPILE command set the M PROTECT switch to OFF 2 Before executing multi task remove all STOP and BREAK commands 3 Always RUN or COMPILE the BASIC program after it has been completed The RUN or COMPILE commands change the program into a format suitable for multitasking I f the program is not formatted the CPU may misoperate Remember to RUN or COMPILE programs before writing them to ROM ...

Page 58: ...n in channel 1 POINT The AD51 can only communicate with the PC CPU at its own station When using the system subroutines therefore always specify the station number as FFH i e host 7 1 General Purpose1 1 0ReadIWrite The AD51 can access the general purpose I10 immediately and continuously using the PEEK and POKE commands This eliminates the need to use the data memory readlwrite system sub routines ...

Page 59: ...esses The aeneral uraoseI10 assianed to the AD51 are accessed via the following addresses in the user work area Bit configuration Command Address 6940H Address 6920H Address 6820H qqiqqqq Reserved for the OS Address 6800H Table 7 1 General purpose I10 Data Configuration ommand POKE PEEK ...

Page 60: ...ta using the PEEK and POKE commands The system subroutine SADR may also be used to access this data but system subroutines are only processed after the END or COM instruction has been executed in the PC CPU Write to general purposeinputr IRead ONIOFF data of general purpose inputr from user memory addresser given in Section 7 1 1 I Switch input on 7 priate bit of dummy byte set to 1 priate bit of ...

Page 61: ...d for accessing the general purpose 110 130 POKE 6000 B The result is also written to address 6000H 140 END 2 Program to switch off X I B 100 A PEEK 6001 Reads address 6001H from the common area This byte is all 0 s 110 B A F Executes a logical AND operation with address 6000H and a dummy byte containing the binary representation of F7 as follows Bit pattern Address 6000H 0 0 0 0 0 0 0 0 F72 1 1 1...

Page 62: ... bits 2 to 7 of address 6820H are resewed for the operating system and should be masked Program example Program for ONIOFF monitor of Y20 to 27 100 A PEEK 6800 Reads address 6800H to variable A 110 B 1 Variable B set to 1 120 FOR I 0 TO 7 130 IF A B 1 PRINT 0N GOTO 150 Performs AND operation of variable A and variable B and if relevant bit is on displays ON 140 PRlNG OFF 150 B B 2 Shifts the conte...

Page 63: ...ystem subroutine Program example 1 Program to read 256 words from buffer memory head address 200H to AD51 memory head address FOOOH 100 A E000 Indirect variable head address 110 A O 5200 Data source buffer memory head address 120 A 1 SF000 Data destination head address 130 A 2 100 Number of words 140 B CALLIO 8000 1 A System subroutine SR2 reads buffer memory 150 IF BWPRlNT ERROR B GOT0 140 Checks...

Page 64: ...ation for the AD51 is different from other I10 modules To specify the slot location use the number representing the 16th 1 1 0 point omitting the units So for example I10 point 120H is represented as 12H Hence if the AD51 is located at I10 addresses X60 to X8F and Y60 to Y8F n is defined as H7 0 I Head device number of data dertmatlon IT C D W R Buffer memory heao address of data roarce Program ex...

Page 65: ...err of the AD51 omitting the leaat significant digit S Fig 7 4 shows a program to write data from PC data registers D200 to D263 to buffer addresses lOOH to 13FH when X1F turns on with the system configuration shown in Fig 7 2 Usable Devices K H m Fig 7 4 Buffer Memory Write Head device number of data source T C D W R K H n Number of words of data to be written I K H ...

Page 66: ...ntl Write data to bit device lruch as Y and MI for 1 160points I 1 oointL Writes data to bit devices such as Y and MI far 10 words 16 points 1160pointrl O Writes data to word device such as D and R l for 64 1 point Seulreretr any specified bit device such as Y and 20 MI and dwice number far 1 point Setdresets any specified number of blacks of six wards teen bit devices h e h as Y and M and dwice 1...

Page 67: ...mal Decimal Hexadecimal Decimal Data reoirter D I DO000 t o 01023 I Decimai P O I N T I L n k register W 1 Bit d e v i c e s a n d word d e v i c e s are differentiated as f o l l o w s Bit device X Y M L B F T c o n t a c t T coil C c o n t a c t C c o i l Word device T p r e s e n t value C p r e s e n t value D W R WOO00 to W03FF 2 When reading 16 c o n s e c u t i v e bit d e v i c e s a s wor...

Page 68: ... 3 8 2 B l BO All turn to 0 1 O N Data to be written b When a system subroutine has been called with word specified and bit devices are to be processed i e in batches of 16 devices then one word of AD51 memory is used per 16 bits This is illustrated below The head device number is X10 and state of this device is indicated by the least sig nificant bit The states of the next 15 bits are stored in c...

Page 69: ...vice to beread usingcharacter string variable 150 C F007 Sets indirect variable head address 160 C O 16 Sets the number of points to be read as 16 170 C lI E000 S e t s destination head address for data 180 C 2 60 S e t s time check period to 60 600msecl 190 Z CALL O 8078 1 A Calls system subroutine SADR 200 IF Z O PRINT ERROR Z GOT0 190 Checks for errors in SADR execution 210 END 1 When specifyin...

Page 70: ... 150 C F007 Sets indirect variable head address 160 C O l Sets the number of points to be read as 1 170 C ll E000 Sets destination head address for data 180 C 2 60 Sets time check period to 60 600msec 190 Z CALL O 8078 1 A Callssystern subroutine SADR 200 IF Z 0 PRINT ERROR 2 GOT0 190 Checks for errors in SADR execution 210 END When bit read is specified one byte of AD51 memory is required per bit...

Page 71: ...0 B E802 Sets indirect variable head address 140 BS Y0080 S e t s destination head device using charac ter string variable 150 C SE807 Sets indirect variable head address 160 C O 32 Sets the number of points to be written to 32 170 Cl1 SE000 Sets source data head address 180 C12 30 Sets time check period to 30 1300msec 190 D SEOOO 200 FOR I OTO 15 210 D l l 220 D 1 16 0 230 NEXT I Generates data t...

Page 72: ...e number of words to be written to 2 170 C l E000 Sets source data head address 180 C 2 30 Sets time check period to 30 300msecl 190 EOOO SFFFF Generates data to be written to addresses 200 E002 0 EOOOH to E003H 210 Z CALL O 807E 1 A Calls system subroutine SADW 220 IF Z 0 PRINT ERROR Z GOT0 210 Checks for errors in SADW execution 230 END 1REMARKS 1 8 7 8 6 8 5 8 4 8 3 8 2 8 1 80 EWOH Y80 EWlH Y81...

Page 73: ...50 A O Y0115 Sets device name YO1 15 160 C 5 1 Source data for Y115 170 A M034OW Sets device name M0340 180 C ll O Source data for M340 190 A 2 B024C S e t s device name 8024C 200 C 17 0 Source data for B24C 210 A 3 L0875 Sets device name L0875 220 C 23 1 Source data for L875 230 B E200 Sets indirect variable head address 240 B O FF Defines PC station number as host 250 B l B Specifies bit write 2...

Page 74: ...70 A 1 R0882 Sets device name R0882 180 C 12 1234 Sets source data for R882 190 A 2 W0187 Sets device name W0187 200 C 19 751 Sets source data for W187 210 A 3 CN049 Sets device name CN049 220 C 26 0 Sets source data for CN49 230 B E200 Sets indirect variable head address 240 B O FF Defines PC station number as host 250 B l W Specifies word write 260 8 1 4 Specifies 4 pieces of data t o be written...

Page 75: ...The data is stored in the AD51 in the following formats depending on whether bit or word has been s ecified Bit Example I I 0 Device name i 1 1 5 H Sets data to be written to 1 ON 0 OFF Word Example 2 ...

Page 76: ...address 180 C 2 50 Sets time check period to 50 500msec 190 Z CALL O 8084 1 8 Calls system subroutine SADMO 200 IF Z 0 PRINT ERROR Z GOTO 190 Checks for errors in SADMO execution 210 END Program example 21 Program to specify the following word devices for monitoring or bit devices entered as 16 consecutive device numbers X60 to X6F T80 to T95 contacts CIS3 present value 0 W175 R700 100 A F000 Sets...

Page 77: ...le head address 130 B O FF Defines PC station number as host 140 8 1 8 Specifies bit entry 150 C E802 Sets indirect variable head address 160 C O 6 S e t s the number of points to be entered t o 6 170 C l A Sets entry data head address 180 C 2 50 Sets time check period to 50 500msec 190 Z CALL O 8084 1 8 Calls system subroutine SADMO 200 IF ZXO PRINT ERROR Z GOT0 190 Checks for errors in SADMO exe...

Page 78: ...try data head address 180 C 2 50 Sets time check period to 50 500msec 190 Z CALL O 8084 1 B Calls system subroutine SADMO 200 IF Z 0 PRINT ERROR Z GOTO 190 Checks for errors in SADMO execution 210 D E900 Sets indirect variable head address 220 D O FF Defines PCstation number a s host 230 D l W Specifies word monitor 240 D l EA00 Data destination head address 250 D 2 50 S e t s time check period to...

Page 79: ... it has been started the interrupt task will operate until the END instruction is executed The interrupt is re enabled after the END instruction is executed Program example The following P C program will call the designated interrupt task when X01 turns on Fig 7 5 Unit Configuration and Sequence Program AD51 OS interrupt flag Ured by 0 s only1 Interrupt task vrocerring Fig 7 6 Timing Chart 1 Any i...

Page 80: ...nction units in order of I10 allocation For details refer to the CPU Unit User s Manual and Programming Manual In the system configuration shown in Fig 7 7 when AD51 No 1 interrupts the PC CPU the interrupt program designated by pointer 116 is executed When AD51 No 2 interru ts the PC CPU interrupt program 117 is executed 116 has higher pribrity Slot number 0 1 2 3 4 5 6 7 I M XIO n o n o XQI xw n...

Page 81: ...in Writer main sequence program Write SAAW 0 X Sub Writes subsequence program Read SAPR Reads parameters of PC CPU 0 0 Parameter Write SAPW Writer parameters of PC CPU 128 byter Analysis request SAPS Causer PC CPU t o recognize and check rewritten parameterr Key 0 Available X Unavailable For TIConly Table 7 2 System Subroutines and Functions A subprogram may be written while a main program is runn...

Page 82: ... to FFFFH Step 0 Step 1 to Step 30719 30Kl Timer Tm FEOOH n Counter Cm FFOOH n OOOOH 0001 H to 77FFH where m device number n hexadecimalvalue of device number 3 TIC set value Readlwrite data of TIC set values is expressed in hexadecimalas shown in the following table Calculation of set value Spsification with Constant KO K1 K2 to K32766 K32767 where m device number n hexadecimalvalue of device num...

Page 83: ... C P U 64 steps I Read corresponding parameters Refer ro 2 Write of sequence programs Set PC CPU to stop I Write parameters for required pro _ gram to PC CPU Refer to Write a parameter analysis request to PC CPU to confirm new parameters Write PC C P The Program must be written in blacks of 64 rteps When reading or writing sequence programs always ensure that the parameters match the program Misma...

Page 84: ...00 Sets data destination head address to variable A 150 FOR I 0 TO 2047 STEP 64 160 Z ZWR2 2 F802 I Sets head step number of sequence pro gram to be read 170 Z ZWR2 2 F806 A Sets data destination head address 180 Z CALL O 808A 2 Fa001 Reads sequenceprogram 185 IF Z 0 PRlNT ERR0R Z GOT0 180 Checks for errors in SAAR execution 190 A A 128 Adds 128 64 steps to head address of area to be read 200 NEXT...

Page 85: ...ite head address 180 Z ZWR1 2 F003 0 190 Z ZWR2 2 SF006 DOOO l S e t s source data head address 200 Z CALL O 8093 2 F0001 Writes parameters 210 IF ZffO PRINT ERROR Z GOT0 200 Checks for errors in SAPWexecution 220 NEXT I 230 Z CALL O 8096 FF 70 Parameter analysis request 240 IF Z M PRINT ERROR Z GOT0 225 Checks for errors in SAPS execution 250 Z ZWR1 2 F010 FF Defines PC station number as host 260...

Page 86: ...WR2 2 E704 32 Sets the number of points to be read to 32 140 Z ZWR2 2 E706 8000 Sets data destination head address 150 Z ZWR2 2 E708 50 Sets time check period to 50 500msec 160 Z CALL O 808A 2 E700 Reads T O to T31 set values 170 Z ZWR2 2 E702 FF40 Sets read head step to C64 180 Z ZWR2 2 E704 16 Sets the number of points to be read to 16 190 Z ZWR2 2 E706 8040 Bets data destination head address 20...

Page 87: ...ion RUN I STOP I PAUSE 1 STEP RUN PC CPU Command Remote RUN RUN STOP PAUSE STEP RUN from Remote STOP I r I STOP I STOP 1 STOP STOP Remote RUN Remote STOP 3 The clearing of data memories on receiving a remote run instruction depends on the states of special relays M9016 and M9017 I Special Relay Data Memory State I OFF I OFF I CPU is run without clearing data memory I I OFF I ON I Data memory is cl...

Page 88: ... AWY GOT0 120 Checks key input characters 140 Z CALL O 8036 FF 60 Executes remote STOP 145 IF Z 0 PRINT ERROR Z GOT0 140 Checks for errors in SKP exe cution 150 LOCATE 20 10 Specifies cursor position 160 PRINV REMOTE RUN PC CPU Y N Displays message 170 A INKEY Waits for key input 180 IF A Y GOT0 170 Checks key input characters 190 Z CALL O 8033 FF 60 Executes remote RUN 200 IF Z 0 PRINT ERROR Z GO...

Page 89: ...ERROR ir wrong data on thk screen For o t h u coiumns correct the data on the BASIC program address settins screen A051 BUS ERROR Usually caused by the PC CPL accessing the AD51 buffer mem ory too frequently or with toc much data STOP the PC CPU Check cable connection and start UD aqain GPP inaccessible to A051 buffer AD51 COMMUNICATION ERROR Communication error between AD51 E and GPP AD51 WRITE E...

Page 90: ... 1 1 Multitask execution STOP command executed RemoveSTOPcommandorchange to END GOTO GOSUB RE TURN ONGOTO or ONGOSUB STOP COMMAND AD51 STOP TASK NO command Remove BREAK command BREAK COMMAND I AD51 STOP TASK NO I BREAK command executed TEXT END AD51 STOP1 TASK NO BASlC program does not finish with END GOTO GOSUB ONGOTO ONGOSUB or RE TURN command Correct WHAT HOW Correct BASlC programming mode erro...

Page 91: ... multi task setting is wrons multi task has beenexecuted I I Re set Dercription Battery is not loaded Battery voltage law Task 1 Task 2 Task 3 Task 4 Grammatical error in BASIC prog gram Task 6 Location Task 7 Tark 8 Corrective Action Load battery Change battery Correct program Tark 6 Task 7 Tark 8 Task 1 Task 2 Task 3 Task 4 BREAK command has been ene Remove BREAK command cuted during multi task ...

Page 92: ...1 1 tionr of GOSUB are allowed or FORINEXT instruc RAM contents for system s task Check whether the system memory schedule have been rewritten has been accessed by the user pro 511 bytesof received data in receive Do not rend mare than 512 bytes buffer IRS 422 CHI I 127 bytes of send data in send Empty the external equipment buffer displayed after an inswn wneouspower failure 1 PC CPU has been res...

Page 93: ... the original task is allowed to continue and if it is still full the AD51 will switch to a third task where used This checking and switching procedure will continue for 1 minute if the buffer remains full after which 1 byte of the excess data will be deleted The one minute cycle is repeated until there is no excess data left The Iminute cycle time may be charged using the SWBi system subroutine 4...

Page 94: ...Refer t o error list Section 8 1 Indicator displays Refer to code list Section 8 2 See Start up troubleshooting Section 8 3 2 See FOD tmublerhooting Section 8 3 3 during AGGPP ROM See ROM troubleshooting Section 8 3 4 Can multitask be executed See rnulti task troubleshooting Section 8 3 51 CRT display corrupted See CRT display troubleshooting Section 8 3 61 See print out troublerhooting Section 8 ...

Page 95: ...8 TROUBLESHOOTING MELSEC 8 3 2 Start up troubleshooting error message column t BOOTERROR GPPIHGP ...

Page 96: ...ect direction for insertingthe disk and never force it FLOPPY ERROR Displayed v Checkand correct fault as for start up troubleshooting in Section 8 3 2 Has F D been inserted 1 Insert FD into FDD to be accessed Not displayed Diwiayed NO YES 2 Formatting a disk clears all the data on it 1 Set FD to write enable v Specify correct FDD I ...

Page 97: ...shooting Error during ROM opera I tion ROM I Faulty ROM I Is write possibie with a new Faulty ROM A Consult the nearesr raier reprenenlatrve I Do an erase y check ERASING ERROR Erase o r change ROM b I Consult the nearest sales re resenrative I ...

Page 98: ......

Page 99: ... YES Open console channel I Specify console connection channel with ZODV Open AD51 s connection channel or re set conrole communication made Open or top closing channel I t The console should be started before the AD51 coder meet specifications from one task only t Use console with suitable display control coder ...

Page 100: ...1 correctly Correct wiring YES Open printer connection channel 1 Specify printer connection channel with ZODV Print with PRINT command Open printer channel or reset printer communication mode off by the printer when its buffer has Printer failure 1 Consult the nearest sales repreren Itative I ...

Page 101: ...1 minutes 1 25 minutes I Preventitive maintenance guide 1 Change the battery after four years if the total battery back up time during that period has been a maximum of 130 days 2 For back up periods exceeding a total of 130 days in four years calculate the battery life as follows j Assume that the power is off for 14 hours 5 days a week and j all day for the remaining 2 days per week Under these ...

Page 102: ...ry r Switch off PC Power a Unload AD51 Removebattery from holder holder and connect battery connector Load A051 I Switch on PC power I Battery IA BATI Negative lead wire blue TO prevent the lor of program and latched data a capacitor isprovided to give 11 minutes RAM back up during battery changes Fig 9 1 Battery Changing Procedure ...

Page 103: ...ry back up guarantee period is 130 days Battery used is as follows Description Lithium battery Type and rating Type AGBAT 3 GV with plug and leads Handling instructions 1 Do not short 21 Do not disassenlble 3 Do not burn 41 Do not heat 51 Do not solder electrodes 6 Do not measure voltage with an analog voltmeter ...

Page 104: ... and line feed All screen clear Enable transfer from external device Disable transfer from external device Initiate escape sequence Cursor back one space I I I I I I 1 Cursor OFF ESC T 54H ZCOFF Character highlight stop Character highlight Code ASCII1 CR LF codes ODH OAHI FF code IOCHI DCl code 111H DC3 code 113H ESCcode 1BHI BS code 08H Display Control Code List BASIC Command CLS ESC 0 14FHI ESC ...

Page 105: ...nfirmation specified at SET UP Move the cursor one column to the left In column 1 the curror doer not move Move the cursor to the next line in the same column not when set in new line mode Move the cursor to the first place in the same line in other than new line mode BELcode 07Hl BS code l08HI LF code 10AHl CR code IODH Enabletransmission Disable tranrmirrion Initiate escape sequence DCl code 11H...

Page 106: ...APPENDICES MELSEC APPENDIX 3 GPPIHGP Key Codes and Character Codes 1 GPPIHGP key codes HEX For m I press and simultaneously I Key Key Code MELSAP GPP ESC 28HI M 4DH ESC 28HI G 137H ...

Page 107: ...APPENDICES MELSEC 2 GPPIHGP display character code PEX 3 Selected character list ...

Page 108: ...ome I position Character Characterqualificition OFF Line specification 1 to 24 Column specification 1 to 80 E S C l O m Example To specify line 5 and column 10 ESC 5135H l 31H 0 30H H Line specification Column specification qualification Character highlight Note The LOCATE command counts the line and column starting at 0 If LOCATE 0 O is executed code ESC I 1 1 H is trans mitted to the VT220 E S C...

Page 109: ... be set as follows when the AD51E data is written to the ROM usingthe A6WU I Buffer memory I OOOHIoBFFH 0 to 3071 1 0 to3071 I AD51E Addresses Common area CH4 Data may only be stored to the ROM if the AD51E is connected with the A l A2 A3 or A3HCPU Addresses Set by AGWU Programmingdata 6000H to 67FFH 8000H to FFFFH 8000H to FFFFH 8000H to DFFFH Channel area 6000H to 67FFH 8000H to FFFFH IOOOOHto 1...

Page 110: ...APPENDICES MELSEC APPENDIX 5 External View Unit rnm inch APP 7 IB INN 66059 8 ...

Page 111: ...ircumstances will Mitsubishi Electric be liable or responsible for any consequential damage that may arise as a result of the installation or use of this equipment All examples and diagrams shown in thls manual are intended only a s an aid to understand ng the text not to guarantee operation Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative...

Page 112: ...ORATION HE DOWICE MITSUBISHIDENKlBLOGMARUNOUCHITOXIO 1WTELEX J24532CABLEMELCOTOIlO NPltOYA WORKS 1 14 YkDA MINAMI 5 HIGASHI XU NIIGOYk JAPAN IB NA 66059 B 8705 REC Printed in Japan Specifications subject to change without notice ...

Reviews: