Home
a2a(s1)/a3acpu(ad57 instructions manual)
Contents
1. EID D T D LIII C mv o D ee err ee etme et mane eect eee ta wenn teen wenn meme een tata e teem ee eee ene ete ee ene eee eater ewan eens enna cee eee een enaneeeee Pet Pree rere er errr rere reer terre err rer ce rrr ere rere rer rsr steht m I el enn hn Sn nnn nnn nee ene nen enn IB NA 66257 A 6 AD57 81 AD58 CONTROL INSTRUCTIONS obs MELSEC 6 4 5 Change of character color being displayed CCDSP Usable devices P ass ICI NN CH bd y x vMjtjsje r r e p w n woAarz vi x w e iiw woota mon ERR Sees demos LM tt TTT elejei tol TT Ott TTT eee eE Tt tele liti 1 The number of steps varies with type of device used See Section 5 2 Change command LEDA Execution at ON LS LEDA LEDB CCDSP ij LEDB Execution at leading edge Setting data TEETH uoc tee rune Hows vO mumbar or Ae i i d Eres iis mabe usta LEDC SUB amp 3 designated D Se color is to be LL pem i FUNCTION 1 The CCDSP instruction is used to change color of the number of characters designated by SD which are being displayed on a display unit connected to the AD57 S1 AD58 designated by 9 to the color which corresponds to the color code designated by 2 starting with the character at the cursor posi
2. 1B NA 06257 A 7 APPLICATION PROGRAM EXAMPLES MELSEC 4 3 After the completion of keying in of the data press the XOFF key Upon receiving the key signal the following processing is executed 1 Fetching the display data with the INPUT instruction The data displayed in the data entry area is stored to D120 to D122 in the ASCII code Display unit b15 b8b7 b0 2 Converting the data with the DABIN instruction The data stored in the ASCII code are converted into binary data and stored to D116 b15 b8 b7 b0 b15 bO In the binary data conversion processing using the DABIN instruction an error occurs if the data to be converted is outside the range of 327678 to 32767 and processing is not executed Therefore the example program is written to detect an error with M9011 and M9091 if the entered data is outside the allowable range 32768 to 32767 If an error is detected the data is cleared and the data entry using the operation panel keys is prompted 7 10 IB NA 66257 7 APPLICATION PROGRAM EXAMPLES MELSEC AA lt 7 4 Displaying Characters and Word Device Present Values Programming Conditions Program Example 4593 e This section gives an example of the program used to display the ASCII characters and the present value of the word devices 1 AD57 is used 2 AD57 is loaded to use addresses X YOCO to X YOFF 3 Display positions are as in
3. Displaying characters Use the following instructions to display characters PRN PR EPRN EPR CR1 CR2 CC1 CC2 CIN Displaying present value of word devices Display the present value of PC CPU word devices using the AD57 control instruction ASC and the following dedicated instructions BINDA DBINDA BINHA DBINHA BCDDA DBCDDA STR DSTR 3 2 After turning on the power or when the canvas screen is to be transmitted the cursor is set at column 0 on line 0 cursor is not displayed When the power is turned on black is set When to transmit the canvas screen white is set The normal display mode is set when the power is turned on or when to transmit the canvas Screen Displaying device comments Display the device comments entered to the PC CPU using the AD57 control instruction ASC and the dedicated in struction COMRD IB NA 66257 A _ 3 PROGRAMMING PROCEDURE MELSEC _A When module name entry is executed in parameter setting it is not necessary to set the display mode with the CMODE instruction The following mode is automatically set when the PC CPU state is changed from STOP to RUN AD57 entered vse 0 isset AD57 S1 entered 0n 5 is set AD58 entered Mesh sss rrr rn mor is set For details of module name entry procedure refer to the SW4GP GPPA Operating Manual 3 3 IB NA 66257 A 3 PROGRAMMING PROCEDURE
4. Column 50 6 113 IB NA 66257 n ee eee ee eee ee eee ee eee eee eee ee reer eee reer eer ee eerie eee ree ere ee ee ere ree eee ee eee Tee eee eee Tere ee eee eee nA Oe eee rrr rrr rere rrr rere re teeter r rere ee rere eee eee eee eee eee eee rere ee ee IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 6 6 3 Display of a period or a decimal point CINPT Usabie devices Bit device Word 16 bit device KOSRENE S NN che celu e a E 1 The number of steps varies with type of device used See Section 5 2 Display command Execution at ON Execution at leading edge SUB Device number Setting data a cn EET E Constant is L DR designated Number of display col umns FUNCTION 1 The CINPT instruction is used to display a period or a decimal point at the cursor position and shift the characters in the range designated by beginning with the cursor position one column to the left on the display unit of the AD57 S1 AD58 designated by n Number of display columns A By C D E EE 4 B 1C Dj Ej LE 1j A period or a decimal point is displayed Cursor position 2 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at n 3 The number of display columns designated by can be set within the range of 1 to 16 Charact
5. omo ow CHTenerged mode j 3 0 9 os comede e s o IB NA 662574 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 If the LOCATE instruction is used when display of the cursor is turned off only the cursor position is moved b After execution of the LOCATE instruction conditions of the display become as follows Display mode no change Designated line Designated column Head VRAM address Raine MEME Normal reverse serma teveree designator n no change Color Pooler designation o Cursor Cursor display EXECUTION CONDITION The LOCATE instruction is executed every scan while the position setting command is ON when the LEDA instruction is used It is executed only once at the leading edge of the position setting command signal when the LEDB instruction is used END Instruction Instruction Instruction instruction execution Processing execution execution execution execution Step 0 Sequence program flow i Position setting command See Luc a ere e i i i L V LOCATE with LEDA NI m D 2 Sg LOCATE with LEDB EMEN CEU MERE mE ES OPERATION ERROR In the cases described below the operation error occurs and an error flag M9011 is set The line position designated by D is out of the ranges ILI below In the CRT standard mode In the CRT enlarged mode In the LCD mode The column position designated by 2
6. 6 After execution of the CMOV instruction conditions of the display become as follows Display mode no change Head VRAM address displayed Normal reverse designation Color designation The cursor is not displayed only s when transmission is done to the Cursor display area being displayed on the display unit EXECUTION CONDITION The CMOV instruction is executed every scan while the transmis sion command is ON when the LEDA instruction is used It is executed only once at the leading edge of the transmission command signal when the LEDB instruction is used CMOV with LEDA CMOV with LEDB l 6 16 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC 4 OPERATION ERROR In the cases described below the operation error occurs and an error flag M9011 is set The canvas screen number designated by 1 is out of the range from 1 to 255 or there is no canvas screen data which corresponds with the canvas screen number designated by ST in the canvas ROM The VRAM area address designated by 2 is out of the range from 0 to 7679 PROGRAM EXAMPLE The following is an example of the program used to display canvas screens and to transmit canvas screen data to the VRAM areas of the AD57 loaded at X YOCO to OFF Display of canvas screens and transmission of canvas screen data are performed when the PC CP
7. wr re oraraa 208 sn awn se erorar a07 40 wer 16 secus a07 40 mM CINA CINSP 16 characters Designated column clear instruction ASCI code conversion of display characters CINCLR 1 character HET Lt word omm r E 96 96 words Display VRAM data read write instructions IB NA 86257 IMPORTANT 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 with any non grounded tools etc Under no circumstances will Mitsubishi Electric be liable or responsible for any consequential damage that may arise as a result of the installation or use of this equipment All examples and diagrams shown in this manual are intended only as an aid to understanding the text not to guarantee operation Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples Owing to the very great variety in possible applications of this equipment you must satisfy yourself as to its suitability for your specific application amp PE IB NA 66257 A F C ae MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 1
8. Current cursor position plus desig nated number of characters Cursor line position Cursor column position Head VRAM address displayed Normal reverse designation Color designation X Cursor display EXECUTION CONDITION The CR1 instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used no change Sequence program flow Mode setting command CR1 with LEDA CR1 with LEDB ee 6 95 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS be OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Error Code d D9008 D9097 The character code designated by 7 is out of the range of 0 to 3FF B 503 The number of characters designated by 2 is out of the range of 1 to PROGRAM EXAMPLE The following is an example of the program used to display the character which corresponds to character code OFBH twenty times horizontally on a display unit connected to the AD57 loaded at X YOCO to OFF A designated character is displayed repeatedly beginning with column 20 on line 5 by turning on X000 X66 N9065 6 LEDB LOCATE Cursor movement by the LO CATE instruction Section 6 3 3 Designation of the character which corresponds to code FBu Designation for 20 characters Display uni
9. The same instruction is executed in every scan until the partial proces sing is completed Holding coi Provide an interlock with M9065 so that other instruc tions cannot be executed while partial processing is executed Instruction M9065 L erm LEDR The partial processing function is added to the instructions which require longer than 4 msec processing time if processed in batch When partial processing is executed for such instructions the instruction is processed in several scans Therefore processing time per scan can be shortened 3 4 IB NA 66257 4 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 AD57 S1 AD58 CONTROL INSTRUCTIONS This chapter describes the dedicated instructions used by the A2ACPU S1 A3ACPU to control AD57 S1 ADSS 4 1 Classification of Instructions The dedicated instructions used to control AD57 S1 AD58 are largely classified into the following instruction groups Display mode setting Sets the display mode according to the display unit instruction connected to AD57 S1 AD58 Execute the following Display screen Ctearing screen and VRAM area display and transmis control instructions sion of canvas screen changing display address and controlling the display such as scrolling Cursor control Control cursor cursor movement cursor display Instructions visible invisible Display condition Set the conditions to display characters designation setting instructions ch
10. 5 DENI aC 4 11 LEDA LEDB pr LEDA LEDB M P IB NA 66257 A 4 AD57 S1 AD58 CONTROL INSTRUCTIONS 9 VRAM data read write instructions Reads the screen data in the designated range of the VRAM area to the designated devices 9 Head VO number ss TOU f mene i LEDA LEDB Writes the character data stored in the desig nated devices by the designated words to the designated VRAM area addresses Head VO number i d EE PUT s LEDC d Write VRAM data nyn LEDA LEDB 10 Reading display state Reads the screen display state set in the AD57 S1 AD58 b15 bo Display mode 1 Cursor line posi tion mcc STAT T 2 Cursor column posi E SUR LOH moo ed VRAM soare 3 Head VRAM address poe LEDA LEDB 4 Normal reverse de signation B 5 Color designation aia ee al tees 6 Cursor display a 1 word data 4 12 IB NA 66257 m ee tttm m ern TI eee hrrrt rtm dese ruemHuuec he ee emaceatcoasasseoo e massaedeusesaaamcospeeuomhosececcsce tmo et EESTI Marr mmm PPP ee eee eee eer nnn tutt ee eaeceeo thereon nnn DO ee eer errr reer err rrr reer eee eee ree eee eee ee rrr tt ee mte ee sese ee nr
11. CSCRU CSCRD with LEDA E Ll sl mul Ln L CSCRU CSCRD with LEDB OPERATION ERROR In the cases described below the operation error occurs and an error flag M9011 is set The head of the VRAM area addresses being displayed exceeds ey values mentioned below in the scroll up CSCRU operation In the CRT standard mode Address 6080 In the CRT enlarged mode Address 7280 In the LCD mode Address 6880 The head of the VRAM area addresses being displayed exceeds 0 in the scroll down CSCRD operation 6 29 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A PROGRAM EXAMPLE The following is an example of the program used to scroll up down the screen one line at a time on a display unit connected to the AD57 loaded at X YOCO to OFF Scrolling up is performed by turning on XO Scrolling down is performed by turning on X1 65 8 EC LEDB CPSt H eec Display of a canvas screen K Section 6 2 1 by the CPS1 1 instruction LEDR H 888c K Transmission of a canvas 2 screen by the CMOV instruc K tion Section 6 2 3 1 Read of the screen by the STAT instruction Section 6 10 1 D188 LEDR X888 9965 K 66 34 D 6008 0183 LEDA CSCRU H r SUB Beet Scroll up F LEDR X881 M9865 K se LESS ue 6 Di83 LEDA CSCRD H SUB Hanc Scroll down LEDR The STAT instruction Section 6 10 1 is used to read the display condition of the screen In this example the STAT instruction is
12. Cursor line position Cursor column position Number of charac ters to be displayed Head device of de vices storing the characters to be displayed Cursor line position Cursor column position Number of charac ters to be high lighted Cursor line position Cursor column position Number of charac ters to be high lighted Moving the cursor with the LOCATE instruction 12th line column 20th Displaying present data of C1 with the PRN instruction Moving the cursor with the LOCATE instruction 10th line column 23rd Highlighting the CO present data with the CRDSP instruc tion Moving the cursor with the LOCATE instruction 12th line column 23rd Highlighting the C1 present data with the CRDSP instruc tion CO and C1 counting program 7 APPLICATION PROGRAM EXAMPLES a es TE Explanation 1 Set the character code which corresponds to the ASCII characters to be displayed at D200 to D206 b15 b8b7 b0 ASCII characters CO ABCD MOV instruction b15 b8b7 b0 D200 ASCII characters D201 D202 Ci ABCD D203 D204 D205 D206 MOV instruction 2 Set the character display color to yellow with the COLOR instruction 3 Move the cursor to the position where characters are display ed with the LOCATE instruction 4 Display the characters corresponding to the ASCII code stored in D200 to D206 with the PR instruction
13. Device number of D1 in the instruction is diffe rent from that of the contact point before the instruction Index qualification is used in the check pattern circuit 1 Read the error st p using a peripheral device check con tents and correct program of the step 2 Reduce the number of nesting levels of the and instruc tions to 5 or less Read the error step using a peripheral device and delete the instruction circuit block 1 Read the error step using a peripheral device check con tents and correct program of the step 2 Reduce the number of sets of LEDA B and LEDA IXEND instructions to 32 or less Check the program of the instruction and correct it re ferring to contents of detailed error codes Table 8 1 Error Code List for the A ACPU Continue 8 3 IB NAJ 66257 A 8 ERROR CODE LISTS CHK FORMAT ERR Checked at STOP PAUSE RUN CAN T EXECUTE 1 Checked at occurrence of interrupt CASSETTE ERROR RAM ERROR Checked at power on OPE CIRCUIT ERROR Checked at power on Error and Cause 1 Multiple check pattern circuits of the LEDA LEDA CHKEND instructions are given There are 7 or more check con dition circuits in the LEDA LEDA CHKEND instructions 3 The check condition circuits in the LEDA instructions are written without using X and Y contact instructions or com p
14. 3 3 Cautions on Writing Programs 1 Always set the display mode using the CMODE instruction when the PC power is turned on the PC CPU is reset or when the PC CPU RUN STOP switch position is changed from STOP to RUN The display unit will fail to give correct display if the display mode is not set or correct display mode is not set However when module name entry is executed in parameter setting it is not necessary to set the display mode with the CMODE instruction The display mode is automatically set when the PC CPU power supply is turned on the PC CPU is reset or when the PC CPU state is changed from STOP to RUN If the PC CPU state is changed from STOP to RUN while the enlarged display mode is set with the AD57 the display will not be incorrect Correct display is possible by setting the enlarged display mode while the PC CPU is running 2 3 To execute the canvas display instruction CPS1 the canvas transmission instruction CMOV the screen clear instruction CLS or the VRAM clear instruction CLV in partial proces sing mode always take interlock as shown below so that other instructions cannot be executed by the same AD57 S1 AD58 While a partial processing instruction is executed CPS1 CMOV CLS and CLV instructions cannot executed by other AD57 S1 AD58 If such instructions are executed correct display is impossible po M9066 LEDA CLS pewrwr eee Instruction M9085
15. De RAM else sel aet qn td ty DUO ate Finge oT oe Code 004 is not provided between the device number designated by 2 and the last device number of corresponding device The range of the number of characters to be stored ERE ente e P ME with the VRAM area address ESETSSEETUUOS Y LO me MED by ERE ente e P ME address 7679 The number of The number of characters to be stored is 0 sid to be stored is 0 7 6 78 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to store characters A3ACPUP21 R21 at address 1000 and after in the VRAM areas of the AD57 loaded at X YOCO to OFF Characters A3ACPEP21 R21 are stored in the VRAM areas by turning on X000 M9836 8 RSC ASACPUP2 08 RSC 1 R21 D4 Setting of characters to be pro cessed PK NOU D q888 M9865 32 K Designation of addresses 1500 and 1388 H after in the VRAM areas pa Head of the devices in which char acters are stored The ASCII instruction is used to convert characters to be displayed ASACPUP21 R21 to the ASCI codes Converted ASCII codes are stored in DQ to D6 0 is stored in D7 to designate the end of the range of characters to be displayed By setting the head of the VRAM addresses to be displayed at address 1000 or before by use of the CPS2 instruction the character store operation can be monitored on the display unit VR
16. I t t 1 t I I t 1 1 I l I STAT with LEDA l 1 1 l l 1 1 l I 1 1 l STAT with LEDB l I PROGRAM EXAMPLE The following is an example of the program used to read current state of display settings of a display unit connected to the AD57 loaded at X YOCO to OFF and to store it in devices D200 to D206 888 N9065 8 LEDC D260 State of display settings are stored in D200 to D206 The STAT instruction stores the state of display settings in seven devices beginning with designated device number b15 x b0 D200 Display mode Cursor line position Cursor column position Head VRAM address dis D203 played D204 Normal reverse designation D205 Color designation 0206 Cursor display an rece 0201 D202 8 147 nt IB NA 662 7 APPLICATION PROGRAM EXAMPLES 7 APPLICATION PROGRAM EXAMPLES This chapter gives application programs using the instructions which control the AD57 S1 AD58 7 1 Initial Processing Program Programming Conditions This section gives an example program used to set the display mode and to clear the screen display VRAM area To display characters to the display unit with the AD57 S1 AD58 it is necessary to set the display mode to the AD57 S1 AD58 meeting the display unit to be used If the display mode does not match the display unit characters cannot be displaye
17. V 2 characters is ignored 8 After execution of the CR2 instruction conditions of the display become as follows Display mode no change i el Plus one line if the designated range Cursor line position exceeds the last column Current cursor position Eoi etd twice Cursor column position the Eoi etd number of characters Head VRAM address bonae Cem C E Normal reverse Homes designation o Color mE Cursor Cursor display no change IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION The CR2 instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used CR2 with LEDA l d ES fies a sl L CR2 with LEDB l OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Error Code Description The character codes designated by GD and 2 are out of the range of 0 to 3FF The number of characters designated by G2 is out of the range of 1 to 40 m c c SS CC c AEn IB NA 6625 6 AD57 MELSEC A PROGRAM EXAMPLE The following is an example of the program used to display horizontally 20 pairs of characters which correspond to character codes OFD and OFE on a display unit connected to the AD57 loaded at X YOCO to OFF A pair of designa
18. p Head VO number Color code LEDA LEDB Changes the color of the designated number of characters beginning with the cursor located character p Head VO number Changes the color of the designated number of characters beginning with designated address in the VRAM area 9 Head VO number LEDA LEDS 4 AD57 S1 AD58 CONTROL INSTRUCTIONS 5 Designated character display instructions Category struction Displays the designated number of ASCII characters stored in the devices following the designated device Head O number Eome FAW ASCII character TEIG 7 LL display Displays t the ASCII charact rs stored in the d vices beginning with the designated i device and up to the device whict stores the 00u code CES 9 vo kumbe bi5 b86 bo EP m Q4 8 idtm Ar e oss Display unit 44 D i 434 CI ES S 464 F i d amp E 1H am GI Mult Vi M ai T CECI AIBCOEEGHIJKLMNO i keier 4A J i 49 00 t EF ACn L i 4B K Cursor position after Cursor position before dEn N aD M instruction execution instruction execution 7 m 09 P4R OD T character 1 character code code End of range code write the designated number of ASCII char acters Stored in the devices following the designated device to the address s in the VRAM ar
19. 37 38 39 Column Line 0 1 2 77 78 79 A 77 A 78 A 79 2 A 160 A 161 A 162 A 237 A 238 A 2389 5 c u 8 A 641 A 642 A 717 A 718 A 719 1 4 IB NA 66257 2 SYSTEM CONFIGURATION FOR CONTROLLING AD57 S1 AD58 MELSEC 4 AEN sr HU i 2 SYSTEM CONFIGURATION FOR CONTROLLING AD57 S1 AD58 This chapter describes the configuration of the system used to control the AD57 S1 AD58 with the A2ACPU S1 ASACPU A2ACPU Main base AD57 AD57 S1 A2ACPU S1 module xm A3ACPU Plasma A35B display unit A38B AD57 il CRUD Monochrome controller CRT Extension cable AD57 S1 AD58 J Extension base module A68B ROM for character generator canvas P 16KHROM AD58 LCD System FD IB NA 66257 A 2 SYSTEM CONFIGURATION FOR CONTROLLING AD57 S1 AD58 MELSEC_ AA 1 The number of AD57 S1 AD58 modules that can be used with one A2ACPU S1 A3ACPU varies depending on the number of the following modules e AD59 S1 AJ71C24 S3 AJ71C21 S1 AJ71PT32 S3 Use the following formula to calculate the number of usable AD57 S1 AD58 1344 5 X Used number of AD59 S1 10 X Loaded number of AJ71C24 S3 29 X Loaded number of AJ71C21 S1 125 X Loaded number of AJ71PT32 S3 Usable AD57 S1 AD58 c units 8 Example Assume that the following number of device
20. Cursor line position no change Head VRAM address displayed Normal reverse designation Color designation CON 1 instruction e one character cursor is display Cursor display CONZ instruction The two character cursor is display ed EXECUTION CONDITION The CON1 and CON instructions are executed every scan while the display ON command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display ON command signal when the LEDB instruction is used END processing CON1 CON2 with LEDA cL ho 6T UL EON aa a a a a Ce tee CON2 with LEDB 6 33 IB NA 68257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS Tiu MELSEC 4 PROGRAM EXAMPLE The following is an example of the program used to turn on off the cursor on the screen of a display unit connected to the AD57 loaded at X YOCO to OFF The one character cursor is displayed by turning on X0 The two character cursor is displayed by turning on X1 Display of the cursor is turned off by turning on X2 4888 M9065 8 LEDB CONI SUB aec Display of the one character cursor LEDR Display of the two character cursor Display of the cursor is turned off By execution of the CONT instruction the one character cursor is displayed at current cursor position By execution of the CON2 instruction the two character cursor is displayed By execution of the COFF instruction display of the cursor on the screen
21. D Programming Conditions 1 AD57 is used 2 AD57 is loaded to use addresses X YOCO to X YOFF 3 The CRT standard mode 0 is set as the display mode 4 Data input column positions on the screen are as indicated below 10th line 12th line Data input area 1 Data input area 2 70th 66th column column 5 The first place 66th column of each data input area is used for the entry of a sign 6 The input data is a decimal consisting of up to 5 digits 7 The keys on the operation panel correspond to the input X device numbers as shown below i key X0C7 F1__ key XOCO start of data entry into data input area 1 L2 koy XOCF S F2 key XOC8 start of data entry 3 kev X0D7 into data input area 2 4 key S X0E6 F7 _ key EL XOFO display of a minus 5 key XOEE sign 6 lkey XoFe CLEAR key XODE clearing the data en 2 key e X0C6 tered to data input area 8 key TM XOCE L GO key Set XOFF end of data entry SET key me XOFE aborting data entry 1 4 uA A 7 6 IB NA 66257 7 APPLICATION PROGRAM EXAMPLES A MELSEC Program Example Display of one character size cursor using the CON1 instruction Cursor line position Cursor column position Cursor line position ON at the com pletion of data entry Cursor colu
22. In the CRT standard mode Address 6080 In the CRT enlarged mode Address 7280 In the LCD mode nnn Address 6880 The CSCRU and CSCRD instructions should be used in the sequence program so that they may be executed when the head address is within the ranges mentioned below In the CRT standard mode eese Addresses 80 to 6000 In the CRT enlarged mode eese Addresses 40 to 7240 In the LCD mode conne Addresses 80 to 6800 6 28 M IB NA 68257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS TE MELSEC X 5 After execution of the CSCRU and CSCRD instructions conditions of the display become as follows Display mode Cursor fine position Cursor column position CSCRU instruction iion of one line Head VRAM address displayed Aadresses tor additio Addresses for subtraction of one line Normal reverse designation Color designation no change Cursor display EXECUTION CONDITION The CSCRU and CSCRD instructions are executed every scan while the scroll command is ON when the LEDA instruction is used It is executed only once at the leading edge of the scroll command signal when the LEDB instruction is used ENO processing Instruction execution END Step 0 Instruction Instruction execution execution Step 0 END Step 0 cea execution END Step 0 Instruction execution END Step 0 i l 1 Scroll command ORE l j i i l
23. PIDCONT instruc tion An interrupt INT instruction is used in the microcomputer program 2 The CPU malfunctioned due to 3 noise Hardware failure Battery voltage has lowered be low specified level Battery lead connector is not connected 1 Read the error step using a 1 2 3 Table 8 1 Error Code List for the A ACPU SS gt a peripheral device and correct the program meeting loaded conditions of remote terminal modules Provide interlock using M9081 communication request reg istration areas BUSY signal or D9081 number of vacant areas in the communication request registration areas when the instruction is executed to a remote terminal Execute the instruc tion after execution of the instruction Execute the instruction after execution of the and instructions Delete the INT instruction from the microcomputer program since it is unusable Take proper countermeasures for noise Hardware failure Replace battery If a RAM memory or power failure compensation function is used connect the lead con nector IB NA 66257 APPENDIX MELSEC A APPENDIX Appendix 1 Processing Time Lists The following lists give the processing time required for the A2ACPU S1 A3ACPU to execute the AD57 S1 AD58 control in structions The processing time given in the following lists has been measured under the conditions mentioned below The processing ti
24. STAT Reads the state of display settings 6 144 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS SERE PE Le 134 r4 i 49le9porer FTH E T T LE 1 The number of steps varies with type of device used See Section 5 2 Reat command l L DA Execution at ON LEDB Execution at leading edge Setting data Head l O number of AD57 Head number of the de vices which store read data FUNCTION 1 The STAT instruction is used to read the state of display settings of a display unit connected to the AD57 S1 AD58 designated by mand to store the data in the devices designated by D b15 bO D Display mode 1 Curser line posi tion D 2 Cursor column posi tion ead VRAM address D3 H displayed 4 Normal reverse de signation D F5 Color designation D 4 6 Cursor display 1 word data 2 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12H at m 6 145 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 3 Data to be stored in devices Oto 6 are as follows 1 Display mode stored in D Current display mode setting is stored Color CRT standard mode for AD57 e eeeeeee 0000 Monochrome CRT standard mode for AD57 00034 Color monochrome CRT enlarged mode 01014 e LCD mode A EAT EEA AIETE TEATSE LENTE EATI TT
25. The number of steps varies with type of device used See Section 5 2 Display ON command LEDA Execution at ON instruction symbol in LEDA LEDB 4 LEDB Execution at DE easing des end vo cursar rn FUNCTION 1 The CON1 and CON2 instructions are used to display the cursor at current cursor position on the screen of a display unit connected to the AD57 S1 AD58 designated by CON instruction eee Displays the one character cursor 8X16 dots CON2 instruction eee Displays the two character cursor 16X16 dots 2 The head I O number of the AD57 S1 AD58 designated by n should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F t 124 at n 3 Any character displayed at the cursor position is reversed when the cursor is displayed 4 When the two character cursor being displayed by execution of the CON2 instruction is moved to 79th column on any line on the screen the cursor changes to the one character size When the cursor is moved to any other column it returns to the two character size b Refer to the description of instruction for moving or turning off the cursor Cursor movement ees LOCATE instruction Cursor display offe COFF instruction 6 32 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 6 After execution of the CON1 and CON2 instructions conditions of the display become as follows Display mode
26. and canvas screen No 4 to addresses 4800 to 6399 in the VRAM areas by execution of the CMOV instruction A3ACPU AD57 Canvas ROM VRAM areas E du em i CMOV instruction CMOV instruction Display unit CPS2 instruction 6 13 18 NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 2 3 Canvas screen transmission to VRAM areas CMOV Bit device Word 16 bit device constant Pointer n xiv Mjt sje r r e p w n aoa zv k w e ir jd por psu Ip seges RRE QD Lj gj lelle j jeje POLL TT fefofofofol lol TT 1 The number of steps varies with type of device used See Section 5 2 Usable devices Transmission command LEDA Execution at ON LEDA LEDB CMOV LEDB Execution at leading edge Setting data s Head I O number of AD57 LEDC SUB Te Device number EJ mnm pem unm Les Constant Is be transmitted LEDC SUB 63 designated Head VRAM address CEDA D where the screen data to be displayed is stored FUNCTION 1 The CMOV instruction is used to transmit the canvas screen designated by GD to the addresses starting with one desig nated by G2in the VRAM areas of the AD57 S1 AD58 designated by n AD57 S1 AD58 anvas screen NO anvas screen Canvas screen No NO Canvas screen IN Q VRAM addresses VRAM address n De
27. by Dup to address 7679 However a value which exceeds the last device number of the devices designated by D cannot be set 5 If the range of the number of data designated by G2 beginning with the address designated by G1 exceeds address 7679 an error occurs and read processing is not executed 6 The figure below describes the data stored in the VRAM areas bi5 bi3 b1 b8 b7 b4 b3 bO Character code 0 to 3FFu i Character type canvas screen data only 0 Half size character 1 Full size character First second half setting of full size character canvas screen data only 0 First half of full size character 1 Second half of full size character valid only with a full size character Character display method 0 Reversed 1 Normal Character display color 0 Black 1 Blue 2 Red 3 Purple 4 Green 5 Light blue 6 Yellow 7 White 7 After execution of the GET instruction conditions of the display become as follows Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display B 135 18 NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION The GET instruction is executed every scan while the read command is ON when the LEDA instruction is used It is executed only once at the leading edge of the r
28. instruction siio A circle in this column shows that subset processing is possible Q Shows the manual page in which detailed description of the instruction is given IB NA 66257 A 4 3 AD57 S1 AD58 Control Instruction Lists 1 Display mode setting instruction Sets the display mode o Head VO number Display mode setting code EE 2 j 0 Cotor CRT standard display SUB mode AD57 Enlarged display mode AD57 ocs LCD mode ADS8 e 5 Monochrome CRT standard LEDA LEDB LEDR display mode AD57 Color CRT standard display mode AD57 S1 2 Display screen control instructions Displays the designated canvas screen Head VO number Ze suB m E zz LEDA LEDB Sets the address of the VRAM area to be displayed Head VO number l VRAM display change LEDC SUB KOH ts P Transmits the designated canvas screen to the designated address in the VRAM area c SUB anvas transmis Eeh sion iosu EDH LEDR Clears the screen displayed in the display unit p Head I O number eoa nee n Clears the designated size of VRAM area begi inning with the designated address Head VO number VRAM clear LEDA LEDB IB NA 66257 Scroll up down 3 Cursor control instructions Hos OH dues Cursor display Cursor position setting sn OH chal reverse disp
29. is smaller than the areas to be cleared designated by Gt only the area starting with the designated address to address 7679 is cleared as mentioned below Range to be cleared Ignored BisionNS d S en penc eer Al A 7679 5 There are 2 ways of clearing of VRAM areas as mentioned below Use special relay M9066 to switch the method of processing 1 Batch clear M9066 is OFF Data of designated VRAM areas is cleared in batch The scan time in which batch clear processing is performed accordingly becomes longer than that in which batch clear processing is not performed 2 Split clear M9066 is ON Data of designated VRAM areas is cleared by 100 words per scan The scan time is not lengthened so much by the clear processing operation However the split clear operation requires more proces sing time than the batch clear operation Number of scans required for transmission processing In the CRT standard mode sse 16 scans In the CRT enlarged mode 555oe 4 scans In the LCD mode 4446e0 52980 600905244449694994824 8 scans Special relay M9065 is turned ON when the split clear operation is started and turned OFF when it is completed Split clear start Split clear complete M65 ON OFF 1 During the split clear operation execution of other instructions cannot be accepted by the AD57 S1 AD58 of which VRAM area data is being cleared Also execution of the following instructions cannot be accepted by other
30. the predetermined format 2 With the A2ACPU S1 A3ACPU device number is not checked when index qualification is written to increase processing speed Note that device number is checked only for file register R Therefore processing might be executed for devices exceed ing the final device number if index qualification is not written correctly Or processing might be executed for other devices if 0 is exceeded or the PC CPU might malfunction This does not cause an error sor IB NA 66257 A 5 USING AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC AA 5 4 How To Read Instruction Explanation This section describes how to read the detailed explanation of instructions given in Chapter 6 6 2 1 Canvas screen display SUGRDDHDGSGHSABUGHBR BRE i EUER E eS E D cim EPEE GE 1 The number of steps varies with type of device used See Section 5 2 Display command LEDA LEDB CPS1 i Execution st ON Execution at leading edge 9 T1 8 pT PE Dovie number LEDC SUB is designated Constant is Setting data LEDR calls Head VO number of ADS 1 The CPS1 instruction is used to transmit the canvas screen designated by to addresses 0 and after in the VRAM areas of the AD57 S1 AD58 designated by m and displays it on a display being connected ADS7 S1 AD58 Canvas screen No n Capacity of sach canvas screen 2 The head VO number of the AD57 S1 AD58 designated by should be u
31. used to read the head of the VRAM addresses being displayed and to check the range of the displayed areas if scrolling up or down is possible by execution of the CSCRU or CSCRD instruction Since the scroll up down operations are executed by changing the addresses of the VRAM areas being displayed for one line at a time execution of scrolling up down exceeding specified VRAM areas will result in an operation error 6 30 IB NA 66257 A ertt eee enero rere eee emcee m eer ereccnen n eec tht T oy eee tee rennae IDEE deen e enema areca en enn oL n nm A A A A W W W TP e II eee eee IIS errem III m n DI mE m m e Mtr return m nnn n rm Merec hatt meret nen Snr nn tere rete Teeter te ee ee IB NA 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 3 Cursor Control Instructions The cursor control instructions are used to turn on and off display of the cursor and to move the cursor on the screen Cursor control is executed using the instructions mentioned below CON1 The one character cursor is displayed at current cursor position CON2 The two character cursor is displayed at current cursor position Cursor display OFF COFF Display of the cursor is turned off LOCATE The cursor on the display is moved Cursor display ON 6 31 IB NA 66257 A Usable devices 5a onan Pot THEE ES Ease Enel M9012 m9011 AE E mm 1
32. AD57 S1 AD58 modules CPS1 instruction CMOV instruction CLS instruction CLV instruction 2 The LEDB instruction cannot be used when the split clear operation is performed The clear command conditional contact and M9066 should be held at ON during the split clear operation 6 24 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 After execution of the CLV instruction conditions of the display become as follows Display mote Cursor tine position Cursor column position Head VRAM address displayed Normal reverse designation Color designation no change Not displayed only when the areas Cursor display displayed on a display unit are cleared EXECUTION CONDITION The CLV instruction is executed every scan while the clear CLV with LEDA CLV with LEDB OPERATION ERROR command is ON when the LEDA instruction is used It is executed only once at the leading edge of the clear command signal when the LEDB instruction is used Instruction Instruction execution execution 1 I In the cases described below the operation error occurs and an error flag M9011 is set The display mode setting data designated by G1 is out of the range from 0 to 3 and 5 The VRAM area address designated by 2 is out of the range from 0 to 7679 6 25 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of th
33. Color Code Bak 0 Purple 3 Light blue 7 After execution of the CCDSP instruction conditions of the display become as follows Display mode no change Cursor line position Pius one line if the designated range exceeds the last column Cursor column position Current cursor position plus desig nated number of characters Head VRAM address Head VRAM address displayed Normal reverse a m Color Color designation ssid Cursor display no change te 6 55 IB NA 66267 4 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A EXECUTION CONDITION The CCDSP instruction is executed every scan while the change command is ON when the LEDA instruction is used It is executed only once at the leading edge of the change command signal when the LEDB instruction is used in cenoe execution ra execution END Step 0 zzz i i i 1 1 f Change command ae l H l 1 t i I 1 1 t t CCDSP with LEDA i l CCDSP with LEDB l l OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set mM ErrorCode ee The number of characters designated by 2 is 0 or a negative value The color code designated by G2 is out of the range from 0 to 7 instruction execution END Step 0 j we 1 l IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A PR
34. Designating the VRAM dis play head address Changing the VRAM display head address using the CPS2 in struction 1 Flow of processing of the example program is shown below Canvas ROM Canvas No 4 Canvas When X000 is ON 1600 Canvas When X001 is ON When X001 is on No 3 split pioneer VRAM area mE When X002 is ON When X003 is ON When X004 is ON Display unit 1 Canvas screen No 1 in the canvas ROM is transferred to address 0 to address 1599 of the VRAM area when the CPS1 instruction is executed 2 Canvas screen No 2 in the canvas ROM is transferred to address 1600 to address 3199 of the VRAM area when the CMOV instruction is executed 3 Canvas screen No 3 in the canvas ROM is transferred to address 3200 to address 4700 of the VRAM area when the CMOV instruction is executed 4 Canvas screen No 1 stored at address 0 to address 1599 of the VRAM area is displayed using the CPS2 instruction 5 Canvas screen No 2 stored at address 1600 to address 3199 of the VRAM area is displayed using the CPS2 instruction 6 Canvas screen No 3 stored at address 3200 to address 4799 of the VRAM area is displayed using the CPS2 instruction 7 4 IB NA 6625 7 APPLICATION PROGRAM EXAMPLES SS IS 2 Take an interlock with M9065 so that other instructions will not be executed while split transferring of canvas screen No 2 and No 3 It is also nece
35. EH HOE 3 2 Cautions on Writing Programs eetssstosescsssccsossscssstospbosesces edetcoebubtsseecte tceessesttsedeonsesosecotosen 3 4 AD57 S1 AD58 CONTROL INSTRUCTIONS nnne 4 1 4 12 Classification of Instructions 2 383 8T VS 0 0 EIS P T EY WIE E VALUES m ERIS E PE VE TEATELE W s PU we S a 4 1 How to Read Instruction Lists sesossvovoettvoneovutoneveiervt oseeeovovevieetessoeecsovoseeoovetvonevetesetcotse 4 2 AD57 S1 VAD58 Control Instruction Lists v00950500sebbttose0s0s0000000009090299009009920859590050099050090599 4 4 USING AD57 S1 AD58 CONTROL INSTRUCTIONS e 5 1 5 6 Stating Instructions POR meee eee ee RHE e ERED EEE EH ERE CREE S EERE OSE EE HEHEHE EEE HEE HSH EPH E ORE OEE EEE EEF EH EERO E OEE 5 1 Number of Instruction Steps CMM mmm e mere e rere rere rere res eee HOE EEE EEE HO HOPED ED ESTEE HOE HO EO LEH E EEE HOHE OER EOD 5 3 Cautions on Using Dedicated Instructions COCO Cee H reed He HTD AE HE EO EH EEE H OED ENS OLEH ESE EE DEORE HEHE Ee 5 4 How To Read Instruction Explanation SO eee meter mens e ease Dees Eee HEHE eR HES ES HHH SHOE HHO CEH ORH EMER ERE EOE OOS 5 5 AD57 S1 AD58 CONTROL INSTRUCTIONS wesoesoosoovoevoeseeveov cevevevecoosoetevrsceeceevose 6 1 6 1 47 Display Mode Setting Instruction peevevevevvoesveseveeeeeteeeeeceevecsessevcecoceovesooseevoveeetoessoevievoov 6 1 6 1 1 Display mode setting CMODE whebeoevveesoseosovesenssoeees soeveocecvesoovoevecoooceoveeeeoseeteoce 6 2 Display Screen Control Instructions b
36. H agac D206 LEDR nua 7 zd o ce e LEDR H gaac 16 x 23 LEDR ne OE e e D158 LEDR Changing the data in 0200 to D203 to C12 cca Cursor line posi tion Cursor position column Head device of devices storing display data Designating white Moving the cur Sor with the LO CATE instruction 12th line 20th column Displaying char acters with the PR instruction Displaying C1 Ft ABCD Designating dis play color with the COLOR in struction Converting present data of CO into ASCII character string with the BIN DA instruction the result of conver sion are stored in D150 to D152 Converting present data of C1 into ASCII character string with the BIN DA instruction the result of conver sion are stored in D160 to D162 Cursor line posi tion Cursor position column Number of char acters to be dis played Head device of devices storing the characters to be displayed Moving the cur sor with the LO CATE instruction 10th line 20th column Displaying pre sent data of CO with the PRN in struction 7 APPLICATION PROGRAM EXAMPLES 265 Ee ig N51 oe Ci M3865 EDA LOCATE M5 sue Meet SUB h K SUB 23 LEDR LEDA PRN H SUB 888C SUB k LEDC 0168 x09 Ki FH Ti 414 41 11 K35 Ci X868 428 rest 8 e X8e1 424p RST 1 IB NA 66257 A
37. IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to display characters which correspond to character codes 100 to 105 beginning with column 20 on line 5 on a display unit connected to the AD57 loaded at X YOCO to OFF Characters are displayed by turning on X000 M9036 PH 8 ROU 6166 08 PH MOU 6161 Di PH MOU 8182 D2 PH Setting of data to be displayed MOU 8183 D3 P H MOU 8184 D4 PH MOV a8t85 05 x888 31 LOCATE Cursor movement by the LO CATE instruction Section 6 3 3 6 characters are designated Head of the devices in which char acters are stored The character codes which correspond to the characters to be displayed are stored in DO to D5 Display unit Characters Column 20 l a 06 83 IB NA 68257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS Ld ee TINH ae a oe ae 1 The number of steps varies with type of device used See Section 5 2 Store command LEDA Execution at ON LEDA LEDB EPR LEDB Execution at leading edge Setting data Er Head 1 0 number of AD57 Head number of the de vices in which character codes for the characters to be displayed are stored FUNCTION 1 The EPR instruction is used to display designated characters beginning with current cursor position on the display unit of the AD57 S1 AD58 designated by n The characters to be displayed correspond to the character codes which
38. Instruction eS Canvas screen ecution by split No 2 i LEDR 3 2 Holding coil M9865 Cancel of de LU NN 156663 signation of split processing Designation of batch split processing is done by setting M9066 as follows When M9066 is OFF Batch processing When M9066 is ON Split processing M9065 is the split processing flag and used to provide interlock so that other instructions may not be executed during split processing MO is used to hold so that the CPS1 instruction may be executed till split processing is completed Canvas ROM o FAM areas Display unit Shows the function of an instruction and instruction symbol A circle indicates the device that can be used with the instruction A circle indicates that the instruction requires designation of digits when a bit device is used This column indicates the number of steps occupied by the instruction For details of the number of steps refer to Section 5 2 A circle indicates that the subset processing is possible A circle indicates that index qualification Z V is possible D A circle indicates that the ON OFF state of the carry flag M9012 changes according to the result of execution of the instruction A circle indicates that the error flag M9011 is set if an operation error occurs This indicates precautions concerning 2 to 8 above If an asterisk is given always read the precaution 9 This indicates the format of the
39. LOCATE instruction Displaying the same characters vertically with the CC1 instruction Moving the cursor with the LOCATE instruction Displaying the same characters vertically with the CC1 instruction Moving the cursor with the LOCATE instruction Displaying the same characters vertically with the CC1 instruction IB NA 66257 A 7 APPLICATION PROGRAM EXAMPLES CA 1 In response to an external input in the range of 0 to 100 the input value is displayed in a bar graph Explanation 2 Bar graph is displayed in the following manner D20 Input value 10 021 Quotient D22 Remainder The character corresponding to code OH is displayed the number of characters to be display ed is 10 1 quotient 15 quotient 1 th line The remainder is assumed as a character code 15 quotient th line eee ee and corresponding display is given The character corresponding to code AH is displayed the number of characters to be display ed is quotient 15th line Example Input value of 68 Ou characters are dis L played 84 character is dis i 3 9 6 played z TE E 10 6 6 Ax characters are dis played 3 The following are the interlock so that processing will not occur if the input value is the same as the value input previously D20 D31 lt gt D20 D32 4 The following is the interlock so that proce
40. MP n uo cq cds ern Ee qrgqeessr o EE E PO LTT TTT fofefofofo TT TTT TTT 1 The number of steps varies with type of device used See Section 5 2 Conversion command LEDA Execution at ON LEDA LEDB INPUT LEDB Execution at Setting data leading edge se T8 LG ees a nero AGH Number of characters to be converted Head number of the de D vices which store con verted ASCII codes FUNCTION 1 The INPUT instruction is used to convert the ASCII characters which are being displayed on a display unit connected to the AD57 S1 AD58 designated by mto corresponding ASCII codes and store them in the devices beginning with the device designated by D The number of characters to be stored as the ASCII codes beginning with the cursor position and moving to the left is designated by Number of characters ABCDEFGH Cursor position b15 b8 b7 b0 O 1 Q2 O s O 4 00000 Automatically added to the end of stored data 2 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at 6 129 IB NA 6626 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 3 The number of characters to be designated by can be set at any number of characters beginning with the cursor position up to column 0 on line 0 However if a value designated by S exceeds the la
41. Split processing M9065 is the split processing flag and used to provide interlock so that other instructions may not be executed during split processing MO is used to hold so that the CMOV instruction may be executed till split processing is completed A3ACPU AD57 Canvas ROM VRAM areas Canvas No 1 1600 Canvas No 2 X0 is ON CPS1 instruction CMOV instruction X1 is ON Display unit CPS2 instruction 6 18 iB NA 6625 MEMO Peeeere rrr rr rrr ert ee eee rere reer eer rree retire ttt errr retire reer reer rere er errr irr iter errr rerterrrrt itt rrr rrr rrr iri titi ir ee eee eee eee eee ere eee eee ee eee eee ree ee eee eee eee Tey DRIED IL PPP m DIDI PEERS TP Meer sa er Terre rere rrr rrr rrr rT ree errr ere i Terre ere rier ree eee eee reer reer reer reer er rer rer rere rere reer rer re rrr rrr reer ere errr rT Terri errr rt i irri rrr eer rr ee eee ee ee ee ee Se eee reer rer reer rer errr ree Tree rer eT Tree te Te Tere ere rer eT eer Tei titer ere rer err errr rit r errr iti ir errr irre rs nS s esenesncesevesnnecuuanuseeoevessossssevesnenenoresseeeeeeeesesovesenessasososeennassososeesesuuosesevssosoueuosesosecssseeoseeesessensesseosesunesesssesresesenseso Pere TTT eee eee eT eee eee eee Teer Tere Te
42. X YOCO to OFF Characters P21 R21 of A3ACPUP21 R21 are switched between the normal and reverse display modes by turning on X000 8 s ASC AZACPUP2 Da ASC 1 R21 D4 Setti of data to be dis play PK HOU 8 D M9836 M9865 32 Cursor movement by the LO pu instruction Section 6 3 3 Display of characters by the PR instruction Section 6 5 2 Cursor movement by the LO CATE instruction Section 7 characters Since characters ASACPUP21 R21 are displayed starting at column 5 on line 2 the range of characters for display switching is designated starting at cotumn 11 on line 2 for 7 characters Display unit Display mode is switched i every time XO is turned on Column 5 Column 11 41 B NA 66257 A AD57 S1 AD58 CONTROL INSTRUCTIONS E Usable devices Bit device Bie ti r Word 16 bit device ie Encinas cS wsota Moon HE HHHHEE eset Eee HHHT 1 The number of steps varies s with type of device used See Section 52 Noroalrevera switch comman AU S CESRTLEDSTERSSETH LBS Pom OU suning data leading edge m Head I O number of ADS7 D The number of characters i ave een ree ee I E to be switched TES SUB Device number S ani ON E e na The head number of the Constant is VRAM areas in which TED SUB 7 designated characters to be switched i een T a tiksoes ict e normal reverse display are stored FUNCTI
43. an extended program ofthe steps application instruction is not cor An extended application instruction has incorrect program structure 1 An extended application instruction has incorrect command name 05 106 Index qualification using Z or V is included in the program between LEDA B IX and LEDA B IXEND 1 Index qualification is specified for the device numbers and set values in the OUT instruction of timers and counters 2 Index qualification is specified at the label number of the poin ter P provided to the head of destination of the E SCJ A B and LEDA B instructions or at the label number of the interrupt pointer 1 provided to the head of an interrupt program Errors other than 101 to 107 men tioned above Table 8 1 Error Code List for the A ACPU Continue 8 1 IB NA 66257 A Checked at power on and at l STOP PAUSE s TRUNA o MISSING END INS Checked at STOP RUN CAN T EXECUTE P Checked at execution of instruction 8 ERROR CODE LISTS Error and Cause Capacity settings of the main and sub programs microcomputer 4 program file register comments status latch sampling trace and extension file registers are not within the usable range of the CPU Total of the set capacity of the main and sub programs file register comments status latch sampling trace and extension f le registers exceeds capacity of th
44. at m Head l O number of AD57 PT leading edge Head address of the D VRAM areas where char a a Device number acters are to be stored LEOC SUB 6 is designated i Constant is GD Number of characters to LEDC SUB eel be stored designated LEDC 69 Head number of the de vices in which character codes for the characters LEDR to be stored are stored FUNCTION 1 The EPRNV instruction is used to store designated characters in the VRAM areas of the AD57 S1 AD58 designated by beginning with the address designated by D The characters to be stored correspond to the character codes which are stored in the devices which correspond to the number of characters designated by 2 beginning with the device number designated by G3 AD57 S1 AD58 VRAM areas VRAM address 2 0081 a 00B2 b b15 bo 00B1 a 00B2 b 2 Number of characters 00834 c pos Copsa SS 00B4 d 1 character diis code O0B5 e IB NA 66257 _ 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12H at n 3 The VRAM address to be designated by GD can be set within the range of O to 7679 See Section 1 1 1 for detail of the VRAM areas 4 The number of characters to be desi
45. defective module s Consult Mitsubishi representative for defec tive modules Table 8 1 Error Code List for the A ACPU Continue M M gt IB NA 66257 A 8 ERROR CODE LISTS SP UNIT VO INT ERROR SP UNIT LAY ERR 8 6 If parameter I O assignment is being executed no response is re ceived from a special function mod ule at initial communication At error occurrence the head VO number upper 2 digits of 3 digits of the special function module that caused error is stored at D9011 A special function module is assigned as an I O module or vice versa in the I O assignment using parameters from the peripheral de vice There are 9 or more special func tion modules except AI61 S1 which can execute interruption to the CPU module loaded There are 2 or more AJ71P22 or AJ71R22 modules loaded There are 7 or more modules such as a computer link module loaded to one CPU module There are 2 or more Al61 S1 mod ules loaded Modules assigned by parameters for MNTMINI automatic refresh from the peripheral device do not conform with the types of station modules actually linked The number of modules of I O assignment registration number of loaded modules per one CPU mod ule for the special function modules which can use dedicated instruc tions is larger than the sp
46. is turned off 6 34 1B NA 66257 A Itn eee eee eee eee eee ee eter ee eee eee ee errr rrr rere rere ere rrr Ty Perrier iret ee rre errr errr errr reer rrr rere r error tt ete tere rr tir L eit tii Peer eeeTT Tee ere rere ree reer errr rer tre rere reer rr eres errr reTerrrrrerrirrrrerrrrrrerrererereer rere r er rre reer ree rere ere t eee errr rier rrr rr terrier terres D PPP PEDI m ertt tmm OA m ID Met eter ert rere er rrr errr rrr rr rrr ert errr rr reer rrr Tire r rrr rrr irr rrr ier rer eee eer D pete meece mere sot ttt mn ee ee mu rrr t err tht hr html a PPP Pan ce we scence ances cacecce ees serena eI m DAI DEP Perr eTr Teer rier eee r eee eee eee eee errr ee ee eee eee rere eee ee ree ete Sete eer eee ee IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC Al 6 3 2 Cursor display OFF COFF Usable devices i h T E A 3 811 usos x v wjcjsje r rie ro wn soja z v k w e tw ENSE ENEEIEERENEEEEEECNRNERUSSSEEE 1 The number of steps varies with type of device used See Section 5 2 Display OFF command LEDA Execution at ON P LEDA LEDB COFF 8 LEDB Execution at leading edge SUB Q j eee gees ur vede LEUR D Hews vo ner of AST FUNCTION 1 The COFF instruction is used to turn off display of the cursor on the screen of a display unit connected to the AD57 S1 AD58 designated by n 2 The head I O number of t
47. line minus the designated number of characters Cursor column position Current column plus two columns Cursor line position Head VRAM address displayed Normal reverse designation Cursor display EXECUTION CONDITION The CC2 instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used no change CC2 with LEDA CC2 with LEDB 6 105 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set The character codes designated by SD and 2 are out of the range of 0 to 3FF The number of characters designated by 2 is out of the range of 1 to 20 PROGRAM EXAMPLE The following is an example of the program used to display vertically 10 pairs of characters which correspond to character codes OFBH and OFCH on a display unit connected to the AD57 loaded at X YOCO to OFF A pair of designated characters is displayed repeatedly beginning with column 20 on line 15 by turning on X000 8 M9865 8 T LEDB LOCATE H Baat K Cursor movement by the LO 15 CATE instruction K Section 6 3 3 28 LEDR H agat H BgrB Designation of the characters H which correspond to codes FBx aaFc and FCH fe Designation for 10
48. not a corresponding special function module 1 Data written to the parameter areas of the tink of which range was set by parameters using a peripheral device does not con form with the data of link para meters read by the CPU Or link parameters are not written 2 Total number of local stations is set at 0 1 When file registers R are used operation is executed outside of specified ranges of device numbers and block numbers of file registers R File registers are used in the program without setting capac ity of file registers 2 Combination of the devices speci fied by instruction is incorrect Stored data or constant of specified device is not in the usable range Set number of data to be handled is out of the usable range 1 Station number specified by the LEDA B LRDP LCDA B LRDP LWTP instructions is not a local station 2 Head l O number specified by the LEDA B RTOP instructions is not of a remote station Head I O number specified by the LEDA B RFRP LEDA B RTOP RTOP instructions is not of a special function module 1 When the AD57 S1 or AD58 was executing instructions in divided processing mode other instructions were ex ecuted to either of them 2 When an AD57 S1 or AD58 was executing instructions in divided processing mode other instructions were ex ecuted in divided mode to another AD57 S1 or AD58 Read the error step using
49. of 6 digits xece 7 key 317 Display of 7 Number of display digits Disp f 8 Number of display perd digits x8b6 L9 key f Number of display Display of 9 digits eL IB NA 66257 A 7 APPLICATION PROGRAM EXAMPLES MELSEC 4 xefe LE7 1 key 38 lnc Display of f Number of display minus digits LEDR 193 2006 CLEAR key LEDE CINCLR c10 Heec Clearing data entry including a K Number of digits to aS e rn SUB 6 be cleared gn n S LEDR k P ed ttf EGO key ray D128 LEO INPUT H pee i Designating num Data input incom LEDC D120 ber of characters piete signal 2 Head device num LEDC 011 ber of devices where display data are fetched Fetching display data using the IN PUT instruction Turned ON if set ting is incorrect Explanation 1 By pressing the F1 or F2 key one character size cursor is displayed in the designated data entry area thereby permit ting the entry of data 2 Keyed in data is displayed in the data entry area in the order as shown below corresponding to the keys pressed Pressing XQFO key 5n Fou Pressing ae key vecene unuu 8 Pressing Lt E key cree 8 1 Pressing 2 XoCF key ceecee w18 1 2 Pressing 6 _ XOF6 key e 8 126 Pressing 5 _ X0EE key 8 1265 Pressing 9 _ XOD6 key 12659 E A key ceo Clearing the data 79
50. on a display being connected ADS7 S1 AD58 Canvas ROM 0 VRAM areas Contents of canvas P screen Pipay No 2 unit n Capacity of each canvas screen Canvas screen No 1 Canvas screen No 2 Canvas screen No Canvas screen No 3 a _ 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 3 The canvas screen number to be designated by should correspond with the canvas screen number written to the canvas ROM of designated AD57 S1 AD58 IB NA 682574 C S7 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 There are 2 ways of transmission of canvas screens to the VRAM areas as mentioned below Use special relay M9066 to switch the method of transmission 1 Batch transmission M9066 is OFF Data of designated canvas screen is transmitted in batch to the VRAM areas The scan time in which batch transmission is performed accordingly becomes longer than that in which transmis sion is not performed 2 Split transmission M9066 is ON Data of designated canvas screen is transmitted by 100 words per scan Scan time is not lengthened so much by the transmission operation However the split transmission operation requires more processing time than the batch transmission operation Numbe
51. pairs of charac ters Display unit 10 pairs r lt Line 15 p Characters which correspond Column 20 6 106 1B NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 6 Fixed Character Display Instructions The fixed character display instructions are used to display characters each of which corresponds to respective display instruction at the cursor position Entry of setting data can be easily done with the fixed character display instructions The fixed character display instructions are classified as follows cone Displays a minus symbol one column to the left bol AU SYM CINMP of the designated number of columns beginning with p ay the cursor position om hyphen dis CINHP Displays a hyphen at the cursor position period or de CINPT Displays a period or a decimal point at the cursor position cimal point display 0 display CINO 1 display CNI 2 display CIN2 3 display CIN3 4 display CINA Displays 4 at the cursor position E 5 display CIN5 Displays 5 at the cursor position Displays 6 at the cursor position Displays 7 at the cursor position Displays 8 at the cursor position 9 display Displays 9 at the cursor position Displays A at the cursor position Displays B at the cursor position C display D display CIND Displays D at the cursor position E display CINE Displays E at the cursor position F display CINF Dis
52. r An a Cursor position rI ll Column 50 6 120 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 6 5 Display of a space _ CINSP ME em EE sone milis re LT LET T LE sieleletel CET Helet FT 1 The number of steps varies with type of device used See Section 5 2 Display command Execution at ON LEDA LEDB CINSP Execution at MUS I uiuos leading edge Setting data Device number LEDC SUB e is designated Head VO number of ADS7 Constant is SINE m i umber of display col LEDR designated ie hE FUNCTION 1 The CINSP instruction is used to display a space at the cursor position and shift the characters in the range desig nated by S beginning with the cursor position one column to the left on the display unit of the AD57 S1 AD58 designated by m Number of display columns Ay By Cy Dy Ei F Cursor position BCD EEL A space is displayed 2 The head I O number of the AD57 S1 AD58 designated by n should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at 3 The number of display columns designated by can be set within the range of 1 to 16 Characters can be displayed at the designated display col umns using the CINI instructions When a character is displayed by use of the CIN _ instruction within the designated display c
53. 00 TELEX J24532 CABLE MELCO TOKYO NAGOYA WORKS 1 14 YADA MINAMI 5 HIGASHI KU NAGOYA JAPAN These products or technologies are subject to Japanese and or COCOM strategic restrictions and diversion contrary thereto is prohibited IB NA 66257 A 9010 MEE Printed in Japan B Specifications subject to change without notice
54. 20 to 13F set 124 at n 3 Tables shown below indicate available character colors and corresponding color codes to be designated by color coiorcoas cour Color Code mk 9 S fight bie 5 Rd J 2 J vw 6 mms 3 4 If color of a character is already set by use of the canvas screen data color designation by the COLOR instruction is ignored 5 Character color designation automatically switches to white when the following instructions are executed CPS1 CPS2 CLS 6 51 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 After execution of the CMODE instruction conditions of the display become as follows Display mode Cursor line position Cursor column position no change Head VRAM address displayed Normal reverse designation Color designation Cursor display EXECUTION CONDITION The COLOR instruction is executed every scan while the character color setting command is ON when the LEDA instruction is used It is executed only once at the leading edge of the character color setting command signal when the LEDB instruction is used ___ Instruction instruction execution processing execution execution execution Instruction execution Sequence program flow i i Character color setting command oN l i I 1 COLOR with LEDA l COLOR with LEDB OPERATION ERROR In the following case
55. 5 Set the character display color to white with the COLOR instruction 6 Convert the present data to be displayed into the ASCII code with the BINDA instruction The conversion results are stored to D150 to D152 and D160 to D162 b15 b8b7 b0 b15 bo D150 co J fore D152 b15 b8 b7 bO b15 bo D160 D162 IB NA 66257 7 APPLICATION PROGRAM EXAMPLES 7 Move the cursor to the present data display position and present data character strings stored in D150 to D152 and D160 to D162 are displayed 8 Upon counting up of the counter the contact of the corres ponding device is turned ON This highlights the present data currently displayed when the CRDSP instruction is executed PROGRAM EXAMPLES This seetion gives an example of the program used to display a bar graph with bars arranged vertically E 1 AD57 is used 2 AD57 is loaded to use addresses X YOCO to X YOFF 3 Bar graph display position is as indicated below Bar graph display 6th line s position 15th line f 10th 14th column column 4 Bar graph display is given for values O to 100 1 division corresponding to 2 dots 5 The following characters are used to display a bar graph SIG EOSTGeOo 0e0comw o GSSSOgGEOGRH TG eO00cm o 0 1 2 3 4 5 6 7 8 3 6 l 2 3 4 5 6 7 8 19 1 1 i i 1 t f I i 543210 DESI UG GSdGexEG 28sGo 902 woo BSSH
56. 8 CONTROL INSTRUCTIONS 4 If the range of clear columns designated by beginning with the cursor position exceeds column 0 on a line the excess range laps around to the last column of the previous line And characters in the excess range are cleared to the left If the designated range exceeds column 0 of line 0 on the screen only the characters up to column O0 on line O are cleared Characters which exceed column 0 on line O are ignored pe HU Poa ye r i L 3 gee uus D gt Cursor position 5 After execution of the CINCLR instruction conditions of the display become as follows Display mode Cursor line position Cursor column position ino change EXECUTION CONDITION The CINCLR instruction is executed every scan while the clear command is ON when the LEDA instruction is used It is executed only once at the leading edge of the clear command signal when the LEDB instruction is used Instruction execution processing executio i i i i 1 I I ON 1 i I t I I 1 i 1 I 1 comun with eo O LUO Anoo CO A cINcLR with eps PE 6 126 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS OPERATION ERROR In the follawing case an operation error occurs and an error flag M9011 is set PROGRAM EXAMPLE The following is an example of the program used to clear designated number of columns on a display unit connected to the AD57 loaded at X YOCO to OFF C
57. A LEDB PR LEDB Execution at leading edge Setting data O Head I O number of AD57 LEDC Head number of the de vices in which the ASCII codes for the characters LEDR to be displayed are stored FUNCTION 1 The PR instruction is used to display designated ASCII characters beginning with current cursor position on the display unit of the AD57 S1 AD58 designated by The ASCII characters to be displayed correspond to the ASCII codes which are stored in the devices beginning with the device number designated by up to the device in which code 00 4 is stored bib b8b7 bd Display unit 1 44 D i 43 C 942 3 x AiBCDEFGHIJKLMNOL _ 4 5 Cursor position after Cursor position before 6 instruction execution instruction execution 947 1 character 1 character code code End of range code 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 6 68 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 3 The ASCII codes to be stored in the devices designated by S can be set in the range of 01 to FFy Since code O04 designates the end of the range of characters to be displayed it cannot be set as an ASCII code 4 The number of characters which can be displayed by one time of processing equals to the number of ch
58. A3ACPUP21 R21 A3ACPUP2 DO PR instruction D3 M D4 Characters up to code 00 are dis ASC 1m1 D4 ps slaved D6 MOVP Ko DO D7 End designation Column 20 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 5 3 Store of the ASCH characters of designated number of characters in the VRAM reas PRNV l Usable devices Bit device device Word 16 bit device Constant 16 bit device ea fal be ae sel a ele sel wie sap aee e eid wsoa woo pep beo l li jlijeeje leoo Ott tt tt fofotofejo fofot PS LETTE tt felojofofo iilillll 1 The number of steps varies with type of device used See Section 5 2 Store command Execution at ON LEDA LEDB Execution at leading edge Q Head I O number of AD57 E Devi Head address of the LEDC SUB 69 as a VRAM areas where the Se E ASCII characters are to be Constant is stored LEDC SUB 3 designated 2 Number of characters to andis Head number of the de 3 vices in which the ASCII codes for the characters to be stored are stored FUNCTION 1 The PRNV instruction is used to store designated ASCII characters in the VRAM areas of the AD57 S1 AD58 desig nated by beginning with the address designated by GD The ASCII characters to be stored correspond to the ASCII codes which are stored in the devices which correspond to the number of characters de
59. AM areas b15 b8 b bd 20 SP i 314 1 DO D1 asc AsACPUP2 00 gt s 03 D4 D6 move xo oo Write of characters up to code 004 5 End designation 6 79 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 5 5 Display of designated number of designated characters EPRN et Ha ns eere x M device xjvimitjsjejr rjejo iw m Aearz vjk e N jweotz ator PS Nee te Pile tele sient dad ile OVOP pede LG fofofofofot fojot tt amp illliirgeejeelllililill 1 The number of steps varies with type of device used See Section 5 2 Display command Execution at ON LEDA LEDB EPRN Execution at Lua o eMe pene dete su Q Head I O number of AD57 rrr ety e emm i i umber of characters to Constant is designated Head number of the de LEDC vices in which the ASCII codes for the characters to be displayed are stored FUNCTION 1 The EPRN instruction is used to display designated ASCII characters beginning with current cursor position on the display unit of the AD57 S1 AD58 designated by n The characters to be displayed correspond to the ASCII codes which are stored in the devices which correspond to the number of characters designated by SD beginning with the device number designated by 2 Display unit b15 bo 2 241 242 243 G2 4 GD n Cursor position Curso
60. C A PROGRAM EXAMPLE The following is an example of the program used to store characters A3ACPUP21 R21 at address 1000 and after in the VRAM areas of the AD57 loaded at X YOCO to OFF Characters A3ACPUP21 R21 are stored in the VRAM areas by turning on X000 N9836 8 E RM AIJACPUP2 Da ASC 1 R21 04 X888 M9065 27 LEDB PRNU H Baat k 1808 Setting of characters to be pro cessed Designation of addresses 1000 to 1012 for 13 characters in the VRAM areas Head of the devices in which char _ 6 75 acters are stored The ASCII instruction is used to convert characters to be displayed A3ACPUP21 R21 to the ASCII codes Converted ASCII codes are stored in DO to D6 By setting the head of the VRAM addresses to be displayed at address 1000 or before by use of the CPS2 instruction the character store operation can be monitored on the display unit VRAM areas IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 5 4 Stere of the ASCH characters of designated number of characters up to code 00 in the IN ES k NS Z E So oem es emi H Sfm sje n eTo w mn z v ala eli 3 moo Lo il TT LLL LLLEL Lu secl SD PEPER TTT fe fol o LS tt Tt ttt felefofefo Tt i i TTT 1 The number of steps varies with type of d vice used See Section 5 2 Store command Execution at ON LEDA LEDB Execution at Setting data leading edge Head I O numb
61. D instructions are used to scroll up and down the screen one line at a time on the display unit connected to the AD57 S1 AD58 designated by n CSCRU instruction Scroll up CSCRD instruction Scroll down Screen Screen Scroll down Screen Screen 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 4 at n 6 27 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 3 The scroll up down operations are performed by adding or subtracting the address data mentioned below to or from the address of the VRAM areas being displayed In the CRT standard mode 80 addresses In the CRT enlarged mode eses 40 addresses In the LCD mode oonnnn6 80 addresses VRAM areas VRAM areas a A ener nnm B Areas being C displayed i Areas being S disptayed T a T U 4 Addresses which correspond to one line on the screen VRAM areas VRAM areas A 8 Areas being Z c displayed A B Areas being displayed R A oa cdm a Addresses which correspond to one line on the screen 4 The operation error occurs when the head of the VRAM area addresses being displayed exceeds the address mentioned below in the scroll up operation The operation error occurs also when the head address exceeds address 0 in the scroll down operation
62. DA LEDB IB NA 66257 A 4 AD57 S1 AD58 CONTROL INSTRUCTIONS ae TOT fem REED ece Xue Continuous display of the same character s hee 7 pEXEDEZA sue symbol ueoc sue display minus LEDA LEDB CINHP n oss LG hyphen display eoc sue Displays the designated number of desig nated characters to the right beginning from the cursor position Head VO number LEDA LEDB Displays the designated number of the desig nated two different characters in pairs to the right beginning from the cursor position Head VO number LEDA LEDB Displays the designated number of desig nated characters downward beginning from the cursor position y Head VO number Displays the designated number of the desig nated two different characters in pairs down ward beginning from the cursor position Head VO number LEDA LEDS Displays the minus symbol at the position left to the cursor position by the designated number of columns 9 Head VO number LEDA LEDB Displays the tion O Head VO number Corner penton A wnan a dpud hyphen at the cursor posi IB NA 66257 A 4 AD57 S1 AD58 CONTROL INSTRUCTIONS Displays the period at the cursor posi tion period display LEDA LEDB Displays the number corresponding to an instruction at the cursor position m Head VO number d b
63. DP m eet III DE n n m ee ede ewe nen new tween ana er eer ener enemas ee eenannernnannawnas M P m PP vetet ert n A T mnn IB NA 66257 A 5 USING AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 5 USING AD57 S1 AD58 CONTROL INSTRUCTIONS 5 1 Stating Instructions This chapter describes how to use the instructions which control the AD57 S1 AD58 with the A2A S1 A3ACPU This section describes the procedure to state AD57 S1 AD58 control instructions The AD57 S1 AD58 control instructions are stated in combination with an LEDA LEDB LEDC LEDR or SUB instruction Statement in Ladder Form Statement in Instruction List Form Conditional contact X10 COLOR H0004 Designates the data used for Bes operation and the devices where the operation result is l LEDC D10 LEDR Stating an instruction stored Indicates the end of the AD57 S1 AD58 control in struction With the format in the instruction list in Section 4 3 and in the detailed description of instructions given in Chapter 6 the instructions are stated in the following format Conditional contact Instruction name LEDA LEDB PRN LEDC SUB 63 LEDC 8 IB NA 66257 5 USING AD57 S1 AD58 CONTROL INSTRUCTIONS 1 The LEDA LEDB LEDC LEDR and SUB instructions are used in the following manner LEDA LEDB Instruction name This indicate
64. Display data zn Display data 7 Display data Display data 4 Display data Display data 8 Display data j Display data i 6800 Display data 9 j Display data 7200 Vacant j Display data 7600 Vacant j Vacant 7679 a In the vacant areas shown above it is not possible to store the data to be displayed However users can use these areas b To store the display data in the VRAM area use the AD57 control instructions such as the CPS1 and CMOV instruc tions c Use the CPS2 instruction AD57 control instruction to select the area to be displayed The display areas can be changed in units of addresses The head address of the area to be displayed is called the VRAM display head address d When the AD57 is used standard mode display data and enlarged mode display data can be stored at random in the VRAM area as illustrated below VRAM area IB NA 66257 A 1 INTRODUCTION MELSEC A 2 Correspondence between the VRAM area addresses and the display position in the display unit is shown below At VRAM area addresses character codes of the characters to be displayed are stored The head address of the VRAM area displayed in the display unit Standard mode Column Line 0 1 2 77 78 79 A 77 A 78 A 79 i 19 A820 A 1821 a 1522 a 1597 A 1598 A 1509 Enlarged mode Column Line 0 1 2
65. ET TA T LEE 02024 Color CRT standard mode for AD57 S1 eese 0005 2 Cursor line position stored in 4 1 The line position where the cursor is set is stored e Line O to 19 3 Cursor column position stored in 2 The column position where the cursor is set is stored Column 0 to 79 4 Head VRAM address displayed stored in 3 The head VRAM address of the range being displayed is stored Address 0 to 7679 5 Normal reverse designation stored in 4 Current setting of the normal reverse display mode is stored e Normal display setting Vie Sides e Sr o RO Y V rV 6 V P RR 0 Reverse display setting Quee Niele nsa AES Vusufugs ege ee am ess 1 6 Color designation stored in 4 5 Current setting of character color designation is stored ma e 9 me ee s as e votow 6 roe 3 we 7 7 Cursor display stored in 6 Current setting of cursor display is stored Cursor is not displayed nnn 0 1 character cursor is displayed 6n 1 2 character cursor is displayed enn 2 MM M 6 146 IB NA 68257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXEGUTION CONDITION The STAT instruction is executed every scan while the read command is ON when the LEDA instruction is used It is executed only once at the leading edge of the read command signal when the LEDB instruction is used Sequence program flow I I i I 1 nd qos i Read comma OFF i
66. I mt T R DIES PP P mE OP eee asa uacac cerra we erereceenccee m n errat ences TTT DOD PDRPPPEPEPPPEPE REESE et Da m mE ee rrr PPP IB NA 68257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC cA E p 2n E RES 6 5 12 Vertical repeated display of a pair of designated characters 2 52 Bit device Word 16 bit device PO T feel loi SOT Trt TTT lefejfejolo 1 tetel ll 6 mi c Pee ae DEB TEN i 1 felofofofot folol 1 The number of steps varies with type of device used See Section 5 2 Mode setting command FUNCTION LEDA Execution at ON LEDB Execution at leading edge E gi Setting data Device number TEETH feue conan i Head VO number of ADS LEDC SUB 63 designated ters to be displayed LEDR e 6 3 Display mode setting data Codes of a pair of charac 1 The CC2 instruction is used to display repeatedly a pair of designated characters each of which corresponds to respec tive character code designated by GD and 2 on a display unit connected to the AD57 S1 AD58 which is designated by n Characters are paired side by side and displayed vertically beginning with the c
67. L INSTRUCTIONS MELSEC 4 PENY a Sr iiid inan Miel mma Zn 5 2 Number of instruction Steps The number of instruction steps increases one when each of the following device numbers devices extended by the AnACPU is used with the control instructions 2 Annunciator F 256 to 2047 Index register When extended devices are not used LEDA COLOR p SUB H04 3 LEDC LEDR Number of steps 20 When extended devices are used COLOR Number of steps 20 1 21 Increase due to Ex SUB H04 a extended device LEDC D5000 E Extended device LEDR Number of steps 20 1 1 22 Increase due to Extended device extended device D5800 1 Increase due to Extended device extended device 21 LEDA COLOR Number of steps 20 1 1 22 ie SUB HOO Z Increase due to je extended device Extended device D3000 Z2 LEDC D3000 Z2 z2 LED N Increase due to Extended device extended device LEDR 21 5 3 IB NA 6625 5 USING AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC 5 3 Cautions on Using Dedicated Instructions 1 An AD57 S1 AD58 control instruction consists of a group of instructions beginning from LEDA LEDB and ending with LEDR Therefore if an instruction not conforming to the predeter mined format is stated within this range it causes an error An error also occurs if the instruction statement differs from
68. MITSUBISHI PROGRAMMABLE CONTROLLER Programming Manual type A2A S1 A3ACPU AD57 Instructions MITSUBISHI ELECTRIC REVISIONS The manual number is given on the bottom left of the back cover Pint Date Manual Numer Oct 1990 IB INA B8257 INTRODUCTION Thank you for choosing the Mitsubishi MELSEC A Series of General Purpose Programmable Controllers Please read this manual carefully so that the equipment is used to its optimum A copy of this manual should be forwarded to the end User IB NA 662 1 1 1 2 3 3 1 3 2 3 3 4 4 1 4 2 4 3 5 1 5 2 5 3 5 4 6 1 6 2 6 3 6 4 CONTENTS INTRODUCTION Dee ee meee eee EOE OEE Ree ROE EEE OHO ORE REED ECE E ODES EE OESEEESHHSE TOO E ET OD EERE HEED ODES EE EET EOD 1 1 1 4 Displaying Characters Cem emer eee mee O HOO REEDED ERED EE HEHE EEE EOE HEE SEER O REESE HEHE ESE HEHE DRO EERE DESEO ESE LES 1 2 1 1 1 VRAM area configuration Ure e PR V IN RUM wert eT TTT Ree Le TERA IO ERE 97 6 99 9 8 9 V9 Ce 90 1 2 SYSTEM CONFIGURATION FOR CONTROLLING AD57 S1 AD58 2 1 2 2 PROGRAMMING PROCEDURE wetsesseoseseosetoss teproseosesoseopoveseveoosesevesseoseoseeeeoeeevesoseves 3 1 3 4 Displaying Procedure PROP HOH HERE HHT HEHEHE HSH HEHEHE HEHEHE HEHEHE HEHEHE HH HH HOH ET HEHEHE HH EHH HSE HEHEHE SHE HEHE OHHH EHO RHEE 3 1 Programming Procedure MORTEM EHH HEHEHE THESE HHH EH TEHE RHEE EHH HET EHEH EH EH EH EH HEHE EHHHETHEHE HERE SHEE HERES
69. N PO tT TTT tT tT tT ty Tt tt foto LL i tt TT elfoj jeje o PS ttt it felefofolo Ti TT TT TT 1 The number of steps varies with type of device used See Section 5 2 Store command Execution at ON Setting data LEDA LEDB EPRV Execution at ER Cc EE METTE AT SUB Head address of the PE EE ttc Device number TLEDC SUB is designated VRAM areas where char Constant is acters are to be stored LEDC designated e Head number of the de vices in which character LEDR codes for the characters to be stored are stored FUNCTION 1 The EPRV instruction is used to store designated characters in the VRAM areas of the AD57 S1 AD58 designated by m beginning with the address designated by GD The characters to be stored correspond to the character codes which are stored in the devices beginning with the device number designated by G2 up to the device in which code 004 is stored GD VRAM address VRAM areas bi5 bO GD 00414 A 00414 A Or 0044 5 E M or SS ee D owe 0 wee E Le E Drs 1 character code Ta End of range code 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at n 3 The VRAM address to be designated by SD can be set within the range of 0 to 7679 See
70. OGRAM EXAMPLE The following is an example of the program used to change color of the characters being displayed on a display unit connected to the AD57 loaded at X YOCO to OFF Color of characters P21 R21 of ASACPUP21 R21 being displayed is changed from black to blue red purple green light blue yellow white and black by turning on X000 M9836 8 ASC R3RCPUP2 Da Setting of data to be dis ASC 17R21 D4 played PK Mou 8 p M9836 M9865 32 Cursor movement by the LO vis instruction Section 6 3 Display of characters by the PR instruction Section 6 5 2 cm m oo r Qo e D A m ho a l Used for display color switching Cursor movement by the LO CATE instruction Section 7 characters Designation of display color IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS Since characters A3ACPUP2T1 R21 are displayed starting vat columm 5 on line 2 the range of characters for display switching is designated starting at column 11 on line 2 for 7 characters In this ex mple the number of inputs of X000 is counted by CO and the result of counting is used as the color code Display unit Column 5 Column 11 6 58 IB NA 6625 IB NA 68257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MESECAT 6 4 6 Change of character color in the VRAM areas CCDSPV g g r aN devices Word Wor 16 bit device device 1 The number of steps varies with type of device us
71. ON oe 1 The CRDSPV instruction is us d to switch display mode c as normal reverse of characters which are stored in the VRAM areas and to be displayed on a display unit connected to the AD57 S1 AD58 designated by n o sa The range of characters for display suchas starts at the _ address designated by G2 in the VRAM areas and covers the 5 1i 5 number of characters x by GD display A3 Fhe hedd VO number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set Tin at n 6 48 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 The VRAM addresses designated by S2 can be set within the range of 0 to 7679 See Section 1 1 1 for detail of the VRAM addresses 5 The number of characters designated by D can be set at any number of characters stored at addresses starting with the address designated by 2 to address 7679 6 If designated VRAM areas include the areas being displayed on the display unit the display mode of the characters being displayed on the screen also switches 7 After execution of the CRDSPV instruction conditions of the display become as follows Condition Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display EXECUTION C
72. ONDITION The CRDSPV instruction is executed every scan while the normal reverse switch command is ON when the LEDA instruction is used It is executed only once at the leading edge of the normal reverse switch command signal when the LEDB instruc tion is used l Step 0 END f Step 0 END Stap 0 END Step 0 END Step 0 Sequence program flow eS SS ES 00 E ON Bi Normal reverse switch command OFF CRDSPV with LEDA l l CRDSPV with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Error Code SEO The number of characters designated by D is 0 or a negative value The VRAM area address designated by 2 is out of the range from 0 to 7679 3 The range of the number of characters designated by SD starting with the address designated by GD exceeds address 7679 of the VRAM areas 6 49 IB NA 66257 A 6 ADS7 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE MELSECA The following is an example of the program used to execute switching of normal reverse display of characters stored in the VRAM areas of the AD57 loaded at X YOCO to OFF Characters stored at addresses 1007 to 1013 are switched between the normal and reverse display modes by turning on X000 9836 8 ASC ASACPUP2 DB Setting of data to be dis ASC 1 R21 D4 Slayed f nov p N9036 M9865 32 Storage of characters in the VRAM areas by the PRV in struction Sectio
73. R n En LS itt tt fefojofojol j elo 1 The number of steps varies with type of devica used See Section 5 2 Clear command Execution at ON Execution at leading edge SUB LEDC SUB amp Device number is Heed VO number of ADS DC SUB designated Constant is Range of the VRAM areas H LEDA Head address of the VRAM areas to be cleared FUNCTION 1 The CLV instruction is used to clear the VRAM areas designated by Gi starting with the address designated by 2 with respect to the AD57 S1 AD58 designated by n VRAM areas VRAM address 20W space code is written Q Range to be cleared 2 The head O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at m 3 The range to be cleared designated by 1 should be set within the range of 0 to 3 as mentioned below 0 3 or Bere From designated address to designated address 1599 tse seeeetersonn es From designated address to designated address 399 doses osa dee pags From designated address to designated address 799 6 23 1B NA 66 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 The VRAM address designated by 2 should be the head address of the areas to be cleared The available range of setting is from 1 to 7679 If the area ranging from a designated address to address 7679
74. REDNISOosoMmswn co BOO SORIA EL GARS caeco 3n ts oon cs Program Example P K3 m 8 ae TM p28 Cursor line position K i8 038 K H9065 P lt gt D26 Dii O faa D280 CALL P5 Executed only when external input values i P differ from the previous input values and if MOU 028 D31 they are within the range of 0 to 100 p28 D36 Cursor line position K M9965 P lt gt D20 032 J lee D28 CALL PS Executed only when external input values P differ from the previous input values and if HOU D28 D32 they are within the range of 0 to 100 IB NA 66257 A iss aaminin aana anat igis ney d 7 APPLICATION PROGRAM EXAMPLES PS Processing is ex ecuted only when the externally input value is 10 or larger a Processing is not executed if the ex ternally input value is 100 Processing is ex ecuted only when the externally input value is 0 to 80 037 SUB v I r Seen 80 021 ype LOCATE LEDC 023 SUB LEDC D22 tc er apac See 2 in Explanation Cursor line position Cursor column position Number of An character codes to be displayed Cursor line position Cursor column position Number of charac ter codes to be dis played Cursor line position Cursor column position Number of Ow character codes to be displayed Moving the cursor with the
75. Read Instruction w eoososevecescosovosecetoesotossoeeseuveceosececopseseeoovoseseooesaesevevoroee 6 144 6 10 1 Display state read STAT eee eee eee eee eee eee eee ee eee ee ee eee ee ee ee ee ee eee eee ee ee ee ee ee ey 6 145 7 APPLICATION PROGRAM EXAMPLES PereereTrereerererrerererere verre reer errr ee reer errr eee eee ree 7 1 7 1 8 7 1 Initial Processing Program eee eee eee eee ee eee creer eee eee re eee eee See eee eee eee eee ee eee eee eee eee ee eee ee ee 7 1 7 2 Displaying Canvas Screen wesbseosoecvososveveseeseceeeceseesceseceeseseocecoeseceoposcecenoceceneveseseoconeoseteo 7 3 7 3 Setting Data Using Keys eesevossses osvesesesveeseoeseceonvesseoeeeevesievoseceeceeesoevosecesuveecocosetveveseeveces 7 6 7 4 Displaying Character and Word Device Present Values m 7 11 7 5 Displaying a Bar Graph deosoonsoveoc osvoesvoseesoeveeceeccecsosscestoscosesecooseceecspsocvassocecoosveseecveseevecee 7 16 8 ERROR CODE LISTS eoesootootesvevsieceiosoovscosoveseusecossesoesoseoseocecotoqosvoevecseosoevosbseveoveeecceeer 8 1 8 8 8 1 How to Read Error Codes eeoseoposocsseseeecveveeeceusazcsseessesevoeessoenstebocoveeceeoocseooosoccosecceoovecvive 8 1 8 2 Error Code Lists UTIMUR RIETI TERRI UDINE OO ET EIE 8 1 APPENDIX sesettoosotosoneceaooteesecoso eeeeoshosepeoseoecesoseovesesosesseecesooececeososrsesceoeseseeecooocsooveeo APP 1 APP 2 Appendix 1 Processing Time Lists eH HH eene APP 1 IB NA 6625 1 INTRODUCTION 1 INTRODUCTION This manual
76. Section 1 1 1 for detail of the VRAM areas 6 91 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 The character codes to be stored in the devices designated by S can be set in the range of 0001 to O3FF Since code 0000 designates the end of the range of characters to be displayed it cannot be set as a character code If code 04004 or a higher code is set it is processed as code 00204 space code 5 The number of characters which can be stored by one time of processing equals to the number of characters from the address designated by GD up to address 7679 6 If the range of the number of characters beginning with the address designated by SD exceeds address 7679 an error occurs and processing is not performed 7 If characters are stored in the areas currently being displayed such characters are displayed on the screen 8 After execution of the EPRV instruction conditions of the display become as follows Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display EXECUTION CONDITION The EPRV instruction is executed every scan while the store command is ON when the LEDA instruction is used It is executed only once at the leading edge of the store command signal when the LEDB instruction is used END StspQ END END processing pneroen execution S
77. Step 0 END Step 0 Sequence program flow eee Eee et i i t I t I LI Display command ore t i i i i t Li 1 I f L PR with LEDA l l l l i 1 I 1 1 I t I t l t l l PR with LEDB I OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Error Code D Bep or D9091 Code 00 is not provided between the device number designated by S and the last device number of corresponding device The number of characters to be displayed is O 6 70 M M M M IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to display characters A3ACPUP21 R21 at column 20 and after on line 5 on a display unit connected to the AD57 loaded at X YOCO to OFF Characters ASACPUP21 R21 are displayed by turning on X000 M9836 8 RSC AZACPUP2 DB ASC 1 R21 D4 Setting of data to be displayed PK MOU amp D X888 M9065 32 Cursor movement by the LOCATE instruction Section 6 3 3 Head of the devices in which characters are stored The ASCII instruction is used to convert characters to be displayed ASACPUP21 R21 to the ASCII codes Converted ASCII codes are stored in DO to D6 0 is stored in D7 to designate the end of the range of characters to be displayed DO Display unit D1 Line 5
78. The head I O number of the AD57 S1 ADBS designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at m 4 The number of display columns designated by can be set within the range of 1 to 16 Characters can be displayed at the designated display col umns using the CIN _ instructions When a character is displayed by use of the CIN instruction within the designated display columns characters are shifted one column to the left 5 If the range of display columns designated by beginning with the cursor position exceeds column 0 on a line the excess range laps around to the last column of the previous line And characters in the excess renge are shifted one columm to the left If the designated range axcaeda column 0 of line 0 on the screen only the characters up to column 0 on line O are shifted Characters which exceed column 0 on line O are erased amp Ls Cursor position A G is displayed 6 After execution of the CIN instruction conditions of the display become as follows item Condition Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display 6 118 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS A EXECUTION CONDITION The CIN instruction is executed every scan while the display command is ON when
79. U is turned on or reset Display of canvas screen No 1 is executed by batch processing and transmission of canvas screen No 2 to addresses 1600 to 3199 is executed by split processing M9936 M9865 LEDB CPS1 Display of canvas screen No 1 by the CPS1 instruction Sec tion 6 2 1 Designation of split processing Designation of canvas screen No 2 Transmission to address 1600 and after in the VRAM areas Holding coil Cancel of split processing designa tion Used for changing VRAM display address Switch of screens by the CPS2 instruction Section 6 2 2 v X SS OO IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC The CPS1 instruction is used to transmit canvas screen dat to addresses to 1599 in the VRAM areas and to display it on a display unit If the CMOV instruction is used canvas screen data is transmitted to the VRAM areas and it is not displayed on a display unit In the example the canvas screen displayed by the CPS1 instruction can be switched to the canvas screen transmitted by the CMOV instruction by execution of the CPS2 instruction X0 ON The canvas screen displayed by the CPS1 instruc HS tion is displayed again X10N The canvas screen transmitted by the CMOV instruction is displayed Designatiori of batch split processing at execution of the CPS1 and CMOV instructions is done by setting M9066 as follows When M9066 is OFF Batch processing When M9066 is ON
80. a peripheral device and check and correct contents of the FROM TO instruction of the step Read the error step using a peripheral device and check and correct contents of the dedicated instruction for special function modules of the step 1 Write in parameters again and check 2 If the same error indication is given again it is hardware fai lure Consult Mitsubishi repre sentative Read the error step using a peripheral device and check and correct program of the step Read the error step using a peripheral device and provide inter lock with special relay M9066 or modify program structure so that when the AD57 S1 or AD58 is executing instructions in divided processing mode other instruc tions may not be executed to either of them or to another AD57 S1 or AD58 in divided mode Table 8 1 Error Code Lise for the A ACPU Continue IB NA 66257 A OPERATION ERROR Checked at execution of instruction MAIN CPU BATTERY ERROR Checked at power on 8 ERROR CODE LISTS Detailed Error Code 1 An instruction which cannot be 1 executed by remote terminal modules connected to the MNETMINI S3 was executed to the modules When the instruction was executed to a remote terminal the communication request registration areas overflowed The instruction was executed without executing the instruction The PID57 instruction was ex ecuted without executing the PIDINIT or
81. all fd aan S i van Display of jes A Runber t CINO 8 CINT CIN2 LEDA LEDB CIN3 CINA CIN5 CIN6 CIN7 CIN8 CIN9 Displays the alphabet corresponding to an instruction at the cursor position p Head VO number Displays A Displays B Displays C Displays D Displays E Displays F Displays G Displays H Displays I Displays J Displays K Displays L Displays M Displays N 0 PO Displays P aids Displays O Display of E Displays R alphabet Displays S Displays ns LEDA LEDB Displays V Ww Displays X Displays Y Displays IB NA 662 laysa space at the cursor position Head VO number E H ws TOP Display of space 7 Designated column clear instruction index Subset instruction Number Category name Format Processing Condition Em Clears the designated number of characters from the cursor position in the left 9 Head VO number Designated col rmn CINCLR 8 ASCII code conversion instruction Instruction name Converts the designated number of charac ters from the cursor position in the left into the ASCII code and stores the designated device 9 Head VO number Humber of cherscters ABCDEFGH prem Autom mcsily added to tha end of nored date ASCII code conversion pig b b D 42 48 1 ead Gt ae ane Gos B 4
82. an operation error occurs and an error flag M9011 is set opio D3008 D9091 The color code designated by S is out of the range from 0 to 7 50 503 M 6 52 J IB NA 66257 A PROGRAM EXAMPLE 6 AD57 S1 AD58 CONTROL INSTRUCTIONS The foitawirg is an example of the program used to designate color of the characters to be displayed on the display unit connected to the AD57 loaded at X YOCO to OFF 1 N9836 8 9 X888 9865 Characters A3ACPU are displayed in blue and then in yellow at current cursor position on the screen by turning on XO ASC ASACPY pa i R PK Soning of data to be dis nov 8 D3 d LEDB COLOR H SUB 888C SUB f Designation of blue LE R LEDB PR i sus UB pac Display of characters by the PR instruction Section 6 5 2 LEDC Dp8 LEDR LEDB COLOR H SUB amp 8ac K 6 SUB Designation of yellow LEDR LEDB PR SUB eac Display of characters by the PR instruction Section 6 5 2 LEDC D6 LEDR Display unit A3ACPU A3ACPU Displayed in yellow 6 53 IB NA 6625 PPP n P A w v v v A A L A A eee eee eee eee ee eee eee ee eee rere eee ee eee eee eee ee ree eee eee n
83. aracter color normal reverse display etc Designated character n display instructions Display the designated characters Fixed character Display the predetermined characters alphanumerics display instructions minus hyphen period decimal point etc Designated column clear instruction Clears the designated column on the screen Converts the ASCII characters displayed on the screen into the ASCII codes and stores them in the designated devices ASCH code conver sion instruction Reads the designated data in VRAM area to store it into MEA ia 2 devices or writes the data stored in devices to the VRAM area Display state read Reads the screen display state VRAM display address instruction cursor state etc 4 1 IB NA 66257 A 4 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC 4 2 How to Read Instruction Lists an ae Displays the designated canvas screen Head VO number Canvas screen display rumes Sets the address of the VRAM area to be ros Head VO number ADEBTYADGM Qe Category of the instructions ORE Symbols to be used in writing a sequence program OR Format of an instruction to be used in writing a ladder of a sequence program Instruction to be used Conditional contact Indicates the beginning of AD57 S1 AD58 control instruction LEDA LEDB COLOR LEDC SUB oo LEDR d Designates the data used for operatio
84. aracters from the cursor position to the last column on the last line on the screen B If the range of the number of characters beginning with the cursor position exceeds the last column on a line the excess range laps around to column 0 on the next line If the designated range exceeds the last column of the last line on the screen characters up to the last column on the last line are displayed The excess characters are ignored DEF E b15 b8 b7 b0 424 B 414 A 444 D 1 434 C 464 F i 454 E Cursor position G2 1 G2 2 G2 3 Cursor position Es ABC DEF are ignored 6 After execution of the PR instruction conditions of the display become as follows Display mode no change in Plus one line if the designated range Cursor line position exceeds the last column Cursor column position i is Current cursor position plus CU TM eer position plus designated number designated number of characters Head VRAM address displayed Normal reverse designation Color designation Cursor display no change 18 NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS Mem ar on EXECUTION CONDITION The PR instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used Instruction Instruction Step 0 END Step 0 END
85. are instructions 4 The check pattern circuits of the LEDA CHK LEDA CHKEND instructions are written with 257 or more steps The IRET instruction was given outside of the interrupt program and was executed There is no IRET instruction in the interrupt program Though an interrupt module is used no interrupt pointer I which corresponds to the module is given in the program Upon occurrence of error the problem pointer i num ber is stored at D9011 Memory cassette is not loaded The sequence program storage RAM in the CPU module caused an error The work area RAM in the CPU module caused an error The device memory in the CPU module caused an error The address RAM in the CPU mod ule caused an error The operation circuit for index qual ification in the CPU does not work correctly Hardware logic in the CPU does not operate correctly The operation circuit for sequential processing in the CPU does not operate correctly 8 4 Read the error step using a peripheral device and delete the IRET instruction Check the interrupt program if the IRET instruction is given in it Write the IRET instruction if it is not given Monitor special register D9011 us ing a peripheral device and check if the interrupt program that corres ponds to the stored data is pro vided or if two or more interrupt pointers I of the same number are given Make necessary co
86. are stored in the devices beginning with the device number designated by up to the device in which code 00004 is stored b15 00B1 Cursor position Cursor position 1 00B24 B before instruction after instruction S42 0083 execution execution 3 00B4 44 0085 E E gt Sn 00CO4 P in 1 End of range code 1 character code 2 The head VO number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at m 6 84 IB NA 66257 A G2 1 G2 2 G2 3 GD 4 G2 5 oor 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 3 The character codes to be stored in the devices designated by can be set in the range of 00014 to O3FFy Since code 00004 designates the end of the range of characters to be displayed it cannot be set as a character code If code 04004 or a higher code is set it is processed as code 00204 4 The number of characters which can be displayed by one time of processing equals to the number of characters from the cursor position to the last column on the last line on the screen 5 If the range of the number of characters beginning with the cursor position exceeds the last column on a line the excess range laps around to column 0 on the next line If the designated range exceeds the last column of the last line on the screen characters up
87. cevececoveveveosvoceceeoevceeesosveecerveeeesooececeosevoseseeccesooesesoveveseceeon LE 6 48 6 4 4 Character color designation COLOR eeoossesotasossseesepecevevesosossecessesoovoevevevenceceue 6 51 6 4 5 Change of character color being displayed CCDSP s ssennnmmHmmM MM 6 54 IB NA 66257 A 6 4 6 Change of character color in the VRAM areas CCDSPV e e 6 59 6 5 Designated Character Display Instructions 6 63 6 5 1 Display of designated number of the ASCII characters PRN 6 64 6 5 2 Display of the ASCII characters up to code 00 PR e m MAR 6 68 6 5 3 Store of the ASCII characters of designated number of characters in the VRAM areas PRNV beteotoshsessooveeceessesosesecbsoseseveocsoecocesecesosseoseereecetoooe 6 72 6 5 4 Store of the ASCII characters of designated number of characters up to code 00 in the VRAM areas PRV Ves sVvexkesevevesevesesevescee esesos esse arro TV EVE TER ETE 6 76 6 5 5 Display of designated number of designated characters EPRN ee 6 80 6 5 6 Display of designated characters up to code 00 EPR seen eter recess 6 84 6 5 7 Store of designated number of designated characters in the VRAM areas EPRNV mem Henn emen EET 6 88 6 5 8 Store of designated characters up to code 00 in the VRAM areas EPRV eee 6 91 6 5 9 Horizontal repeated display of a designated character CR1 nne 6 94 6 5 10 Horizontal repeated display of a pair of designated characters CR2 c7 6 97 6 5 11 Vertical repeated display of a desig
88. cimal digits Example If the AD57 S1 ADB8 is assigned to X Y120 to 13F set 124 at n IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 4 The range of addresses to be displayed varies with preset display mode CRT standard mode From designated address to desig nated address 1599 CRT enlarged mode From designated address to desig nated address 399 LCD modes From designated address to desig nated address 799 5 The VRAM address designated by S should be the head address of the range to be displayed The available range of addresses is from O to 7679 If the area ranging from a designated address to address 7679 is smaller than the capacity of one screen area the address designated by Sis automatically changed as mentioned below so that one screen area is filled with display of data CRT standard mode lf addresses starting Designation is changed to with 6081 are designated address 6080 CRT enlarged mode If addresses starting Designation is changed to with 7281 are designated address 7280 LCD mode If addresses starting Designation is changed to with 6881 are designated address 6880 6 After execution of the CPS2 instruction conditions of the display become as follows Rem emen EXECUTION CONDITION The CPS2 instruction is executed every scan while the change command is ON when the LEDA instruction is used It is executed only once at the leading e
89. come as follows Cursor ffne position Cursor column position Mead VRAM address displayed no change Normatrevorss designation EXECUTION CONDITION The INPUT instruction is executed every scan while the conversion command is ON when the LEDA instruction is used It is executed only once at the leading dge of the conversion command signal when the LEDB instruction is used INPUT with LEDA l INPUT with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set The number of characters designated m 9i is 0 or a negative value The number of characters to be converted exceeds the last device number of the devices designated by D M 6 131 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC fA PROGRAM EXAMPLE The following is an example of the program used to store the ASCII character codes of the characters displayed on a display unit connected to the AD57 loaded at X YOCO to OFF in designated devices Character codes which correspond to the characters displayed at columns 45 to 50 on line 5 are stored in devices D20 to D25 Ng88 49865 8 LEDB LOCRTE H 88ac K Cursor movement by the LO 5 CATE instruction Section K 6 3 3 38 LEDR 25 KOFF M9865 PK The number of characters is designated The codes of the characters are stored in devices D20 and after The INPUT instruction is used for data entry to
90. ction 1 1 1 for detail of the VRAM addresses 5 The number of characters designated by GD can be set at any number of characters stored at addresses starting with the address designated by 3 to address 7679 6 If designated VRAM areas include the areas being displayed on the display unit the display mode of the characters being displayed on the screen also switches 7 Tables shown below indicate available character colors and corresponding color codes to be designated by 2 usus 5 Yeow mme 3 wie 7 8 After execution of the CCDSPV instruction conditions of the display become as follows Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display 6 60 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION The CCDSPV instruction is executed every scan while the change command is ON when the LEDA instruction is used It is executed l only once at the leading edge of the change command signal pi Soma i when the LEDB Instruction is used r 7 Sequence program flow N W4 Change command OFF CCDSPV with LEDA CCDSPV with LEDB OPERATION ERROR Inthefoliowing cases an operation error occurs and an error flag E M9011 is set NEUTER The color code designated by G2 is out of the range from 0 to 7 The number
91. d correctly Just after the PC CPU is started up abnormal data might be stored in the AD57 S1 AD58 VRAM area causing incorrect display on the display unit Therefore it is recommended to set the display mode and clear the VRAM area after turning on the power supply to the PC CPU 1 AD57 is used 2 AD57 is loaded to use addresses X YOCO to X YOFF 3 The CRT standard mode 0 is set as the display mode 4 Display mode is set only once when the PC CPU starts running 5 VRAM area is cleared when the PC CPU starts running or when X005 is turned ON the area cleared is from address O to address 7679 IB NA 66257 A 7 APPLICATION PROGRAM EXAMPLES Program Example Setting disp ay moos Setting CRT standard using the e in mode Steps 26 to 68 are executed only when the PC CPU mode is changed from STOP to RUN or when the clear instruction is executed Setting the VRAM head address H BBeC Designating the size of Clearing VRAM area the area to be cleared i Setting CRT standard using the CLV in mode struction D188 Designating the head address of the VRAM LEDR area to be cleared D180 Setting the initial value of VRAM area head address 62HtO e D188 Iet Pi Executing steps 32 to 61 are repeated until entire js ba VRAM area is cleared 8 EUR Explanation 1 Display mode is automatically set when the PC CPU starts running if unit name has been entered at the time A2ACPU S1 ASACPU parameter
92. describes sequence program instructions used to control the AD57 S1 ADS8 CRT LCD controllers with an A2ACPU S1 or A3ACPU Because the A2ACPU S1 and A3ACPU support the instructions to be used for the AD57 S1 AD58 as standard instructions these CPUs can use the AD57 S1 AD58 without merging microcompu ter program packages for the AD57 POINT 1 An AD57S2 monitor display controller cannot be used with an A2ACPU S1 ASACPU 2 To control an AD57 S1 AD58 create the canvas ROM and character generator ROM using the SW1GP AD57P system floppy disk and install them in the AD57 S1 AD58 For the procedure to create a canvas ROM and character generator ROM refer to the SW1GP AD57P Operating Manual When controlling the AD57 S1 AD58 use character string processing instructions described in the A2A S1 A3ACPU Prog ramming Manual Dedicated Instructions This allows displaying of data on the screen reading storing the displayed data and other similar operations to be performed easily For the instructions not described in this manual refer to the following manuals ACPU Programming Manual Fundamentals IB NA 66249 ACPU Programming Manual Common Instructions IB NA 66250 A2A ST ASACPU Programming Manual PID Control Instruc tions IB NA 66258 Refer to the following manuals when using the A2ACPU S1 A3ACPU A2ACPU S1 A3ACPU User s Manual Hardware IB NA 66255 A2ACPU S1 A3ACPU User s Manual Control Funct
93. dge of the change command signal when the LEDB instruction is used processing Step 0 END Step 0 END Step 0 END Step 0 END Step 0 Sequence program flow OOH L EE Eee i I L Change command OH l i i I 1 CPS2 with LEDA CPS2 with LEDB 6 11 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC _A OPERATION ERROR In the case described below the operation error occurs and an error flag M9011 is set Code Description e008 D9008 The VRAM area address designated by S is out of the range from 0 to 7679 503 PROGRAM EXAMPLE The following is an example of the program used to change display addresses of the VRAM areas of the AD57 loaded at X YOCO to OFF When X000 is turned ON display data stored at addresses 3200 to 4799 in the VRAM areas is displayed When X001 is turned ON display data stored at addresses 4800 to 6399 in the VRAM areas is displayed Ta M9065 LEDE CMOU Transmission of canvas screens by the CMOV instruction Sec tion 6 2 3 5 Dar er DIE E m r3 gt E c 7 a L E LS i LEDR H i K TEE TH i288 08 H yaad PK Switching of display addresses 34 NOU 48ga DA xoga 9065 DA J Setting of display addresses of VRAM areas LEDR 3 6 12 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS In the example above canvas screen No 3 is transmitted to addresses 3200 to 4799
94. dicated below 10th line 55m oa 12th line veh n rn nnnm 20th column Present data display area wees eee ey Present data display area 29th column 23rd column 4 The present data is displayed in up to 6 digits with a sign displayed in the highest digit place 23rd column 5 Display is given in yellow for the ASCII characters and in white for present data 6 At the count up of a counter the present data displayed is 49965 DE DIL C E D CE i d highlighted ASC caz D208 nou B628 0204 nou boas D205 nour Baca D206 LEDB COLOR sub Besc sUB LEDR LEDB LOCATE sue beac sue fe sue e LEDR LEDB PR sue Haec LEDC D288 LEDR Setting D203 Setting A at D204 C0 L at D200 to Setting BC at D205 Setting D at D206 Designating display color with the COL aa OR instruction Moving the cursor Cursor line with the LOCATE position instruction 10th Cursor column line 20th column position Displaying charac ters with the PR in Head device of struction devices storing Di ng s splaying CO display data uuu ABCD IB NA 66257 A aSc CIs LEDB LOCATE SUB SUB SUB LEDB PR SUB LEDC LEDB COLOR SUB SUB 171 LEDR BINDR 212 216 s ul a LEDR LOCRTE 5UB SUB SUB LEDA PRN SUB SUB LEDC ge RR Rt I NS 7 12 eee IB NA 6625 288 H BoBC TX 12 K 28 LEDR
95. e mA eret hesort ten eee rrr rr rrr m errr rrr rr rrrrr ery E A Mec rrr sese eo oret r DI IB NA 06257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC Daa Th SS 6 6 4 Display of the alphanumeric characters 0 to 9 and A to Z CINC 77 3 do s r A to Z Usable devices E a 4i nm E pecie pma ro L1 LIE LLIsleiele LT Helet TT 1 The n mber of steps varies with type of device used See Section 5 2 Instruction number in Display command Execution at ON CINO CIN9 LEDA LEDB Execution at CINA CINZ OOo rN leading edge ue Device number tEnc suB is designated Setting data Constant is amed E reste number of O57 Number of display col umns FUNCTION 1 The CIN _ instruction is used to display the alphanumeric characters 0 to 9 or A to Z at the cursor position and shift the characters in the range designated by S beginning with the cursor position one column to the left on the display unit of the AD57 S1 AD58 designated by p Number of display columns B C Dj EF Cursor position A G is displayed 2 Use the following instructions according to the alphanumeric characters to be displayed 6 117 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 3
96. e as follows Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display O88 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS Pregl EXECUTION CONDITION The PRNV instruction is executed every scan while the store prr pede command is ON when the LEDA instruction is used It is executed only onc at the leading edge of the store command signal when the LEDB instruction is used Instruction END Instruction Instruction Instruction processing Letecution Step 0 END Step 0 END Step 0 Sequence program flow C H AL E QN Stote commana OFF f l i I PRNV with LEDA PRNV with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag E T M9011 is set The VRAM area address designated by 7 is out of the range of 0 to 7679 The number of characters designated by 25 is 0 or a negative value The range of the number of characters designated by 2 beginning 50 with the device number designated by 3 exceeds the last device number of corresponding device The range of the number of characters designated by 2 beginning with tha VRAM area address designated by GT exceeds address 7679 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSE
97. e eee ere Tee TT errr eee Teeter errr reer re CO rr oe ere errr rer reer errerrr rere rrrirerrrr rrr ir ii ert rere rire errr err tir errr rT HILL auesecceasesppcsosaesaeepecsososesecoscercooccesosesco en TAIPEI eee ee eee er errr eerie eer eet tere re rere rr rrr iri err Trier i rr teri ti itt errr rr DII DL rere rrr rer errr errr errr ry DD PPPPreerrrerr rere errr reer rr eee eee PERDERE 1B NA 06257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC 4 6 2 4 Screen clear CLS Usable devices P ud ee 2 Eee reefer pe peer 1 The number of steps varies with type of device used See Section 5 2 Clear command LEDA Execution at ON LEDB Execution at leading edge SUB Q LEDR LG Head I O number of AD57 FUNCTION 1 The CLS instruction is used to clear the VRAM areas of the AD57 S1 AD58 designated by mto clear the screen AD57 S1 AD58 VRAM areas Area being 204 space code displayed is written 2 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at m 6 19 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 3 There are 2 ways of clear of VRAM areas being displayed as mentioned below Use special relay M 6 6
98. e memory cassette Latch range set by parameters or setting of M L or S is incorrect bi Either of settings of the remote RUN PAUSE contact point by para meters operation mode at occurr ence of error annunciator indica tion mode or STOP RUN indica tion mode is incorrect The MNET MIN automatic refresh setting by parameters is incorrect Timer setting by parameters is in correct 117 18 1 Counter setting by parameters is incorrect The END FEND instruction is not Write the END instruction at the given in the main program end of the main program The END FEND instruction is not given in the sub program if the sub program is set by parameters The same device number is used at two or more steps for the pointers P and interrupt pointers I used as labels to be specified at the head of jump destination Label of the pointer P specified in the CALL CALLP LEDA B FCALL or LEDA B BREAK instruction is not provid d before the END instruc tion Corrective Action Read parameters in the CPU mem ory check the contents make necessary corrections and write them again to the memory Read parameters in the CPU mem ory check the contents make necessary corrections and write them again to the memory Write the END instruction at the end of the sub program Eliminate the same pointer num bers provided at the head of jump destination Read the error step usin
99. e program used to clear data of the VRAM areas of the AD57 loaded at X YOCO to OFF Data of addresses 0 to 6399 of the VRAM areas is cleared by batch processing Clearing of the VRAM area data is performed only once when the PC CPU is turned on or reset Size of the screen display for the clear operation is set at the standard mode The VRAM address to be cleared Switching of the VRAM address to be cleared PB 8088 89865 43 Display of a canvas screen by the CPS1 instruction Section 6 2 1 The VRAM area clear operation by the CLV instruction is performed according to the size of the screen display in the display mode currently set In the program example the display mode is considered to be set at the CRT standard mode Data in the VRAM areas from address 0 to 6399 is cleared 4 times in units of 1600 addresses per one time A3ACPU AD57 VRAM areas 6 26 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 2 6 Screen scroll CSCRU CSCRD P P 1 be mx e mn fg BF Be ley Ts ole re In Tn fn 2 vfe m les 3 MACAC Po FLEET eee efor ETT refer 1 The number of steps varies with type of device used See Section 5 2 Scroll command i Instruction symbol LEDA Execution at ON p LEDA LEDB eai LEDB Execution at CSCRU CSCRD leading edge L sues Q LEDR IG Head 1 0 number of AD57 FUNCTION 1 The CSCRU and CSCR
100. e upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at 3 The number of display columns designated by can be set within the range of 1 to 16 Characters can be displayed at the designated display col umns using the CIN instructions When a character is displayed by use of the CIN instruction within the designated display columns characters are shifted one column to the left 65 i IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 If the range of display columns designated by beginning with the cursor position exceeds column 0 on a line the excess range laps around to the last column of the previous line And characters in the excess range are shifted one column to the left If the designated range exceeds column 0 of line 0 on the screen only the characters up to column O on line O are shifted Characters which exceed column 0 on line O are erased res L 1 1 Cursor position a 4 1 Cursor position A hyphen is displayed DE 5 After execution of the CINHP instruction conditions of the display become as follows Item Condition Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display EXECUTION CONDITION The CINHP instruction is executed every scan while the displa
101. eL L Fe 1 T LT THeleielelet ELT LETT s The number of steps varies with type of device used See Section 5 2 Read command Execution at ON Execution at leading edge Device number is designated LEDC SUB Ss Constant is aa a designated LEDR D Number of data to be read o data du we wsota sort Head I O number of AD57 Head address of the VRAM areas where dis play gata to be read is Head number of the de vices which store read FUNCTION 1 The GET instruction is used to read the number of data designated by G2 beginning with the address designated by GD of the VRAM areas of the AD57 S1 AD58 designated by m and to store it in the devices designated by VRAM address 1 word data 6 134 AD57 S1 AD58 Read areas 1 word data VRAM areas IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS x MELSEC A 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at n 3 The VRAM address to be designated by ST can be set within the range of 1 to 7679 Setting of 1 corresponds to the cursor position of the areas being displayed See Section 1 1 1 for detail of the VRAM areas 4 The number of read data to be designated by G2 can be set at any number within the range of the VRAM address designated
102. ea beginning with whe designated address m Head Vo number DE Writing ASCII E Ex x n redis a 4 characters as Writes the AS 2 characters tardi in the gt devic s beginning withthe designated device Fand up to the device which stores the 00H code to the addresses in the VRAM area beginning with the designated address Head l O n mber se TOH Do i peau ope ADSZSTVADSS Qs Vt character Tesherecter _ End of range code 5999 Format NM Processing Condition EC E pes lj EE LEDA LEDB LEDR jA j 7 e m a SN E E IB NA 66257 A 4 AD57 S1 AD58 CONTROL INSTRUCTIONS Processing Condition Displays the designated number of the desig _ nated character to the ight beginning from P the cursor position Head VO number sue eocsus GD H Lee TED ne Exi wepA tury Continuous display of the same character cursor position Cursor panir before instruction after instruction execution execution End of range code vee nete ted device Vo with the Nach oes address Head I O number a Een sue Fs Tas ra EE SEI T Veharacter code Writing characters E VRAM areas 004tn MAD p 0042 8 rd 05 E oo 00004 2 LE
103. ead command signal when the LEDB instruction is used GET with LEDA GET with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Description The VRAM area address designated by 1 is out of the range of 1 to 7679 The number of characters designated by 2 is 0 or a negative value The range of the number of data designated by G2 beginning with the VRAM area address designated by exceeds address 7679 The range of the number of data designated by 2 beginning with the device number designated by exceeds the last device number of corresponding device 6 136 IB NA 662 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A PROGRAM EXAMPLE The following is an example of the program used to read display data from the VRAM areas of the AD57 loaded at X YOCO to OFF and to store it in other VRAM areas Display data is read from addresses 1800 to 1809 of the VRAM areas and written to addresses 600 to 609 The read data is written to devices D100 to D109 e M9036 M9865 H CELIN Display of canvas screen data K by the CPS1 instruction Sec 1 tion 6 2 1 LEDR Basc K Transmission of canvas screen 2 data by the CMOV instruction Section 6 2 3 1688 LEDR 45 X888 M9065 P Kaaa Designation of address 1800 of the VRAM areas Designation of data read from addresses 1800 to 1809 Read data is stored in D100 and after Designation of add
104. ecified limit Total of the number of com puters shown below is larger than 1344 AD59 X 5 AD57 S1 AD58 X 8 AJ71C24 S3 X 10 AJ71C21 S1 X 29 AJ71PT32 S3 X 125 Total gt 1344 bishi representative module replace and check a defec tive module For defective mod ules consult Mitsubishi representa tive Execute I O assignment again using parameters from the peripheral de vice according to the loading status of special function modules Reduce the special function mod ules except Al61 1 which can execute interrupt start to 8 or less Reduce the AJ71P22 or AJ71R22 modules to 1 or less Reduce the computer link modules to 6 or less Reduce the AI61 module to 1 Perform again module assignment for MNTMINI automatic refresh with parameters according to actually linked station modules Reduce the number of loaded spe cial function modules Table 8 1 Error Code List for the A ACPU Continue IB NA 6625 8 ERROR CODE LISTS SP UNIT ERROR Checked at execution of the FROM TO instruction orthe dedicated instructions for special function modules LINK PARA ERROR Detailed Error Code D9091 47 OPERATION ERROR Checked at execution of instruction Module specified by the FROM TO instruction is not a special function module Module specified by the dedicated instruction for special function module is not a special function module or
105. ed See Section 5 2 Change command 9 LEDA Execution at ON LEDA LEDB LEDB Execution at leading edge Setting data Em G Head VO number ot a057 LEDC SUB EE Device number The number of characters PG GD of which color is to be LEDC SUB is designated changed Constant is es s Speer LEDC SUB 63 The head number of the 3 VRAM areas in which LEDR characters to be changed in color are stored FUNCTION 1 The CCDSPV instruction is used to change color of the number of characters designated by D which are stored in the VRAM areas of the AD57 S1 AD58 designated by n to the color which corresponds to the color code designated by 2 starting with the address designated by 3 2 VRAM VRAM 3 VRAM addresses 3 A Red A Green B Red B Green GD Number of characters C Green D Blue D Green E Blue E Green 6 59 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC 4 2 The CCDSPV instruction changes only the display color of designated characters The color of characters after execution of the CCDSPV instruction is the color designated by the COLOR instruction 3 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at 4 The VRAM addresses designated by 3 can be set within the range of 0 to 7679 See Se
106. eginning with the device number designated by 2 exceeds the last device number of corresponding device The number of characters designated by G1 is 0 or a negative value 6 66 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS _ MELSEC JL PROGRAM EXAMPLE The following is an example of the program used to display characters A3ACPUP21 R21 at column 20 and after on line 5 on a display unit connected to the AD57 loaded at X YOCO to OFF Characters ASACPUP21 R21 are displayed by turning on X000 8 me ASC ASZACPUPZ pa Setting of data to be displayed ASC 1 R21 D4 27 nopo es LEDB LOCATE H GELIY K Cursor movement by the LO 5 CATE instruction Section K 6 3 3 28 LEDR H BBeC K 13 13 characters are designated 0 Head of the devices in which p Characters are stored LEDR The ASCII instruction is used to convert characters to be displayed A3ACPUP21 R21 to the ASCII codes Converted ASCII codes are stored in DO to D6 b15 b8b7 bO P Display unit DO D1 ase asaro 05 gt D3 D4 D6 3H 414 Mm PRA menuan 324 524 31h 13 characters are displayed 2 R 20 SP 1 Column 20 6 67 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS Usable devices Bit Word 16 bit device 1 The number of steps varies with type of device used See Section 5 2 Display command LEDA Execution at ON LED
107. en of the display unit pa i i Ek Setting of data to be displayed p3 i us 24 EM 4 s LEDE CNOR SUB 88C Normal display designation LEDR LEDB PR 7 rsue Heec H Display of characters by the PR instruction Section 6 5 2 LEDC D8 r LEDR A LEDB CREY ica J SUB BBeC Reverse display designation LEDR LEDB PR l H SUB geet Display of characters by the PR LEDC D instruction Section 6 5 2 LLEDR Display unit A3ACPU PSIO Display of characters after execution of the CNOR instruction Dre Display of characters after 1 execution of the CREV instruction 648 IB NA 66257 A MEMO IB NA 66267 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC fA 6 4 2 Normal reverse display switching of characters being displayed CRDSP E E emm T xIreTeTe eiTe Tow o 2 v v v e n FERME FR GER ERE RE EE CR REDE ERREUR RSS IL T Helelelele 4 1 Tele 1 The number of steps varies with type of device used See Section 5 2 Normal reverse gt switch command Execution at ON i LEDA LEDB CRDSP Execution at leading edge mU Device number 0 GE s LEDC SUB is designated Setting data Constant is designated Head VO number of ADS The number of characters to be switched FUNCTION 1 The CRDSP instruction is used to switch display mode 00 7 M normal reverse of characters which are being displayed on the
108. equence program flow 9 N v o lt o o 3 3 w 3 a oo Az CPS1 with LEDA l l CPS1 with LEDB l OPERATION ERROR In the case described below the operation error occurs and an error flag M9011 is set Daos 255 or there is no canvas screen data which corresponds with the canvas The canvas screen number designated by is out of the range from 1 to 503 screen number designated by S in the canvas ROM 6 8 i M IB NA 662 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE MELSEC A The following is an example of the program used to display canvas screens on the AD57 loaded at X YOCO to OFF When X000 is turned ON canvas screen No 1 is displayed by batch processing When X001 is turned ON canvas screen No 2 is displayed by split processing Instruction ex Designation of ecution by batch canvas screen processing No 1 Designation of split processing Designation of Instruction ex canvas screen t ecution by split No 2 processing Holding coil Cancel of de signation of split processing Designation of batch split processing is done by setting M9066 as follows When M9066 is OFF Batch processing When M9066is ON Split processing M9065 is the split processing flag and used to provide interlock so that other instructions may not be executed during split processing MO is used to hold so that the CPS1 instruction may be executed till split pr
109. equence program flow ON Store command OFF EPRV with LEDA l EPRV with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Error Code abii paces D9091 The VRAM area address designated by G1 is out of the range of 0 to 7679 Code 004 is not provided between the device number designated by CSD and the last device number of corresponding device The range of the number of characters to be stored beginning with the VRAM area address designated by 1 exceeds address 7679 The number of characters to be stored is 0 6 92 5 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to store characters which correspond to character codes 100H to 105H at addresses 1000 and after in the VRAM areas of the AD57 loaded at X YOCO to OFF Characters are stored in the VRAM areas by turning on X000 PH LL LL MOY 8188 08 PH MOY 8181 D P H MOU 8182 D2 nove Hiag 03 iile of characters to be pro PH NOV 8184 D4 P H MOU 8185 DS PK KOU amp D6 Xeaa M9865 36 du EPRU Designation of addresses 1400 and after in the VRAM areas Head of the devices in which char acters are stored The character codes which correspond to the characters to be stored are stored in DO to D5 0 is stored in D6 to designate the end of the range of charact
110. er of AD57 ee conor Device number Head address of the 2 is designated VRAM areas where the LEDC SUB 69 f AE is ASCII characters are to be j stored designated 32 LEDG amp y LEDR FUNCTION A 1 The PRV instruction is used to store designated ASCII charac ters in the VRAM areas of the AD57 S1 AD58 designated by m beginning with the address designated by 7 The ASCII characters to be stored correspond to the ASCII codes which are stored in the devices beginning with the device number designated by G2 up to the device in which code OO is stored Head number of the de vices in which the ASCII codes for the characters to be stored are stored AD57 S1 AD58 VRAM areas Gt VRAM address 2 424 B i414 A CDti 44s 1D a Ic pin GD 2 46y F i 454 E GD 3 00 i474 G M tert 1 character Y character End of range code didis di 6 76 IB NA 66257 4 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 2 The head I O number of the AD57 S1 ABBB designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at 3 The VRAM address to be designated by G1 can be set within the range of 0 to 7679 See Section 1 1 1 for detail of the VRAM areas 4 The ASCII codes to be stored in the devices designated by 2 can be set in the range of 014 to FFy Since code O04 desi
111. erie rrr rrrrr errr rrr satin tht DI emt AS m m LA A A A A ORA PPS HII PPM mL n eer TP m DP IB NA 66257 4 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 5 Designated Character Display Instructions lt d The designated character display instructions are used to display designated characters on a display unit or to write designated characters to the VRAM areas Designated character display and write are executed using the instructions mentioned below wee EET mmm PRN PR ASCII character Displays designated number of ASCII characters display Displays the ASCII characters till code 001 Writes designated number of ASCII characters to the VRAM areas beginning with designated address Writes the ASCH characters till code 00 to the VRAM areas beginning with designated address Displays designated number of characters which correspond to character codes 0 to 3FFy Writes characters till code 004 characters which correspond to 1 to 3FFy to the VRAM areas beginning with designated address Writes designated number of characters which correspond to character codes 0 to 3FF to the VRAM areas beginning with designated address Writes designated number of characters till code 00x characters which correspond to 1 to 3FFy to the VR M areas beginning with designated address C Displays a des
112. ers to be displayed By setting the head of the VRAM addresses to be displayed at address 1000 or before by use of the CPS2 instruction the character store operation can be monitored on the display unit VRAM areas e 2 bis bo oo n o 39 oe o s e os 108 D6 O0 4 End designation 00x 1100 1101 EPRV instruction 1102 Store of characters up to code 1493 1104 6 93 IB NA 66257 S es 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC 6 5 9 Horizontal repeated display of a designated character CR1 Usable devices LOU LIE ME TE Ei al eas ef Ore dac 5e Cer psisie eL CERD ie it tT tT fofojofofot tT fofof TT 1 The number of steps varies with type of device used See Section 5 2 Mode setting command LEDA Execution at ON O LEDA LEDB as LEDB Execution at i leading edge Setting data O O Hed v0 vow o AB LEDC Device number ea number o LEDC sUB es LEDC SUB zz PRPs LEDR B is designated SD Code of a character to be SUB Constant is displayed designated D Number of characters to be displayed FUNCTION 1 The CR1 instruction is used to display a designated character which correspond to the character code designated by G for the number of characters designated by 2 beginning with current cursor position to the right on the display unit of the AD57 S1 AD58 designated by n G2 Numbe
113. ers can be displayed at the designated display col umns using the CIN instructions When a character is displayed by use of the CIN instruction within the designated display columns characters are shifted one column to the left 6 114 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 If the range of display columns designated by beginning with the cursor position exceeds column 0 ona line the excess range laps around to the last column of the previous line And characters in the excess range are shifted one column to the left If the designated range exceeds column 0 of line 0 on the screen only the characters up to column O on line Q are shifted Characters which exceed column 0 on line O are erased By Cy pr UC Dy LE FE 1D En Fidi Cursor position A period decimal point is displayed Cursor position A hyphen decimal point is displayed b After execution of the CINPT instruction conditions of the display become as follows Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display EXECUTION CONDITION The CINPT instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction i
114. eseescestovuescsecesonoeuouoeotvoovseoctoseceveeteveeececeesovosoeveseceve 6 5 6 2 1 Canvas screen display CPS1 eeotsosshesoevepecosvesosevesenssececeeoqeeoteeveoceeseevoqooovensecensosscon 6 6 6 2 2 VRAM display address change CPS2 weessosostosobuesoopoeveseveseteocevuesoctvescopeeveeceveo 6 1 0 6 2 3 Canvas screen transmission to VRAM areas CMOV e ee eees 6 14 6 2 4 Screen clear CLS PUECELECETCELELTS TSS eS eee eee Te Tee eS eee eee eee rere ree ee eee err er eee eee eee ee es 6 19 6 2 5 VRAM area clear CLV eeohosevosssqeecesveececcesovovvsevesvevesusebeopooeecoeovescenosooecepctoosvseeveevo 6 23 6 2 6 Screen scroll CSCRU CSCRD 4eestocssosesoutse nevototosseeseovesecooroeenesseeseseteseososceece P 6 27 Cursor Control Instructions eesoostos sotestsuaueteceroepevetoevetoveveveseteovsoseosontetosoeseoveconoooevoveceeevovoen 6 31 6 3 1 Cursor display ON CON1 CON2 4095040508999 0085 0050080009909000000995099099090040940 0000959999999 6 32 6 3 2 Cursor display OFF COFF deesosvoovosevecsevoseceseceeseseeonececqeesososeoveecovtosesessesoneoeonon 6 35 6 3 3 Cursor position setting LOCATE sesbhesesooveoosecceneseeesoseoveeveoeccereseeeveeveoven TP 6 37 Display Condition Setting Instructions enn 6 40 6 4 1 Normal reverse display of characters CNOR CREV m 6 41 6 4 2 Normal reverse display switching of characters being displayed CRDSP 6 44 6 4 3 Normal reverse display switching of characters in the VRAM areas CRDSPV keneeeeoocbore
115. esignates characters to be displayed in the reverse display mode Normal reverse switchin Switches the display mode of characters being 9 CRDSP displayed from normal to reverse or vice versa Switches the display mode of the characters stored CRDSPV at designated addresses in the VRAM areas from normal to reverse or vice versa COLOR Designates color of characters to be displayed CCDSP Changes color of characters being displayed Color designation Changes color of the characters stored at designated CCDSPV addresses in the VRAM areas 6 40 IB NA 68257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 4 1 Normal reverse display of characters CNOR CREV m Bit device ee Word 16 bit device Hn Hen nes ed 1 The mbi of deps varies with type of device used a Section 5 23 Usable devices Normaleverse witch command n LEDA Execution at ON LEDA 7E E LEDB Execution at Instruction symbols in AE pdng edge i CNOR CREV i Setting data 9 Head V0 number of AD57 FUNCTION i n mb p 1 The CNOR and CREV instructions are used to designate the l n or reverse B DP of characters to be displayed on the e designated by CNOR 7 Normal detayi ABC CREV eteree Reverse display Ee 2 The head VO number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If
116. f steps varies with type of device used See Section 5 2 Display command Execution at ON LEDA LEDB CINMP Execution at WE cq leading edge i 4 SUB 0 Device number rH C SUB 76 is designated m Head VO number of AD57 Constant is Number of display col LEDR designated umns FUNCTION 1 The CINMP instruction is used to display a minus symbol one column to the left of the columns designated by beginning with the cursor position on the display unit of the ADS57 S1 AD58 designated by Q The characters between the minus symbol and the cursor are cleared Number of display columns LI is displayed Cursor position 2 The head I O number of the AD57 S1 AD58 designated by n should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at 6 108 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 3 The number of display columns designated by S can be set within the range of 1 to 16 Characters can be displayed at the designated display col umns using the CIN instructions 4 If the range of the number of columns designated by S plus one column beginning with the cursor position exceeds column 0 on a line the excess range laps around to the last column of the previous line and a minus symbol is displayed one column to the left of the excess columns If the designated range exceeds column 0 of line 0
117. for AD57 1 Color monochrome CRT enlarged mode for AD57 2 LCD mode ALEE LEA NAE PER EUIS UE ADR RUE SOR MAR for AD58 E 3 Monochrome CRT standard mode for AD57 5 Color CRT standard mode for AD57 S1 3 W W A IB NA 6625 S63 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 If module type of A2ZACPU S1 A3ACPU is already set by parameters the following data is automatically set when the A2ACPU S1 A3ACPU is in the RUN state It is not necessary to use the CMODE instruction if it is not necessary to change display mode When AD57 isset Set OQ When AD57 S1 isset Set 5 When ADB58 is set Set 2 b After execution of the CMODE instruction conditions of the display become as follows Display mode Designated data Cursor line position Line O Cursor column position Head VRAM address displayed Address 0 Normal reverse designation no change Color designation Cursor display Not displayed If the CMODE instruction is executed every scan using the LEDA instruction the screen sometimes becomes dis torted momentarily To avoid this problem it is recom mended that the CMODE instruction be executed only once at the leading edge using the LEDB instruction EXECUTION CONDITION The CMODE instruction is executed every scan while the mode setting command is ON when the LEDA instruction is used It is executed
118. g a peripheral device check contents and insert a jump destination poin ter P Table 8 1 Error Code List for the A CACPU Continue 8 2 IB NA 6625 8 ERROR CODE LISTS CAN T EXECUTE P Checked at execution of instruction CHK FORMAT ERR Checked at STOP PAUSE RUN RET instruction was in me BET A the program and ex ecuted though the CALL instruction was not given 2 The and instructions were included in the program and executed though the instruction was not given 3 Nesting level of the CALL CALLP j and instructions is 6 levels or deeper and the 6th level was executed 4 There is no RET or instruction at execution of the CALL or instruc tion The instruction was included in the program and executed though no sub program was pro vided 1 LEDA B and LEDA IXEND instructions are not paired 2 There are 33 or more sets of LEDA B and LEDA IXEND instructions Instructions including NOP other than LDX LDIX ANDX and ANIX are included in the instruc tion circuit block Multiple instructions are given The number of contact points in the instruction circuit block ex ceeds 150 The LEDA instructions are not paired with the LEDA CHKEND instructions or 2 or more pairs of them are given Format of the block shown below which is provided before the instruction circuit block is not as specified
119. gether with other instructions such as CINMP CINHP CINPT CIN alphanumerics CINSP and CINCLR Refer to Section 7 3 for details By execution of the INPUT instruction character codes which correspond to the characters within the designated range to the left of the cursor position are stored Display unit we4 instruction ku d Line 5 4 eim mun i em ue em Cursor position Automatically stored Column 50 6 132 IB NA 66257 A arepan 1B NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 9 VRAM Data Read and Write Instructions The VRAM data read and write instructions are used to read the display data stored in the VRAM areas or to write the display data stored in the VRAM areas By use of the VRAM data read and write instructions display data can be moved in the VRAM areas and display screen data can be stored Execute VRAM data read and write by use of the following instructions Reads designated number of display data from VRAM data read GET designated addresses of the VRAM areas and stores it in devices A Writes display data stored in devices to designated MEAN date wate addresses of the VRAM areas 6 133 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 9 1 VRAM data read GET Usable devices N See sn e Wr an dee EET RO Lech et EE SE Eo ot E F amp L1 TL Helslsieler LL ISI
120. gnated by 2 can be set at any number of characters stored at addresses beginning with the address designated by SD up to address 7679 However a value which exceeds the last device number of the devices designated by S3 cannot be set b The character codes to be stored in the devices designated by 2 can be set in the range of 0000 to O3FFy If code 04004 or a higher code is set it is processed as code 00204 space code 6 If the range of the number of characters designated by 2 beginning with the address designated by GD exceeds address 7679 an error occurs and processing is not per formed 7 If characters are stored in the areas currently being displayed such characters are displayed on the screen 8 After execution of the EPRNV instruction conditions of the display become as follows Display mode Cursor line position Cursor column position ino change EXECUTION CONDITION The EPRNV instruction is executed every scan while the store command is ON when the LEDA instruction is used It is executed only once at the leading edge of the store command signal when the LEDB instruction is used 6 AD57 S1 AD58 CONTROL INSTRUCTIONS OPERATION ERROR Intheffollowing cases an operation error occurs and an error flag bos BAS M9011 is set Te VRAM area address designated by HURURAM Aras eats VANS SD INDIR onthe renee ata is out of the range of 0 to e RS of charac
121. gnates the end of the range of characters to be displayed it cannot be set as an ASCII code 5 The number of characters which can be stored by one time of processing equals to the number of characters from the address designated by Dup to address 7679 6 If the range of the number of characters beginning with the address designated by D exceeds address 7679 an error occurs and processing is not performed 7 If characters are stored in the areas currently being displayed such characters are displayed on the screen 8 After execution of the PRV instruction conditions of the display become as follows ooo Ne O Cursor line position Cursor column position Head VRAM address displayed Normal reverse designation Color designation Cursor display Not displayed no change EXECUTION CONDITION The PRV instruction is executed every scan while the store command is ON when the LEDA instruction is used Itis executed only once at the leading edge of the store command signal when the LEDB instruction is used Instruction execution processing executio PRV with LEDA l PRV with LEDB l 1 l IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Description The VRAM area address designated by De RAM else sel deslaneted ty DUO ate Finge oT oe is out of the range of 0 to
122. he AD57 S1 AD58 designated by n should be upper 2 digits of 3 hexadecimal digits Example if the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at 3 Refer to the description of instruction for moving or turning on the cursor Cursor display on CON and CON2 instructions Cursor movement LOCATE instruction 4 After execution of the COFF instruction conditions of the display become as follows Display mode Cursor line position Cursor column position acer 6 35 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION The COFF instruction is executed every scan while the display off command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display off command signal when the LEDB instruction is used COFF with LEDA COFF with LEDB 1 l PROGRAM EXAMPLE The following is an example of the program used to turn on off the cursor on the screen of a display unit connected to the AD57 loaded at X YOCO to OFF The one character cursor is displayed by turning on XO The two character cursor is displayed by turning on X1 Display of the cursor is turned off by turning on X2 8 X808 M9065 LEDB CONI R Display of the one character SUE Boac cursor LEDR X801 N9065 9 LEDB CON2 SUB deat Display of the two character cursor i LEDR Haec oieplay of the cursor is turned LEDR By execution of the CON1 instruction
123. he head I O number of the AD57 S1 AD58 designated by 0 should be upper 2 digits of 3 hexadecimal digits Example tf the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at n 3 The VRAM address to be designated by can be set within the range of 1 to 7679 Setting of 1 corresponds to the cursor position of the areas being displayed See Section 1 1 1 for detail of the VRAM areas 4 The number of write data to be designated by 2 can be set at any number within the range of the VRAM address designated by GDup to address 7679 However a value which exceeds the last device number of the devices designated by 3 cannot be set 5 If the range of the number of write data designated by 2 beginning with the address designated by 1 exceeds address 7679 an error occurs and write processing is not executed 6 The figure below describes the data to be stored at the devices designated by 3 in the VRAM areas bl8 b13b12 b8 bZ b4 b3 bO ee ee ee ES a Character code On to 3FFu Character type 0 Half size character 1 Full size character First second half setting of full size character canvas screen data only 0 First half of full size character 1 Second half of full size character valid only with a full size character Character display method 0 Reversed 1 Normal Character display color 0 Black 1 Blue 2 Red 3 Purple 4 Green 5 Light blue 6 Yello
124. ignated character horizontally for designated number of times of repetition R1 CR2 Displays a pair of designated characters horizontally for designated number of times of repetition CC1 Displays a designated character vertically for desig nated number of times of repetition Displays a pair of designated characters vertically for designated number of times of repetition ASCII character write to the VRAM Designated character display EPR Designated character write to the VRAM EPRV Horizontal repeated display of characters Vertical repeated display of characters IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS E Tm x et NE rr na 1 xIvIwIe sTeTeizTe o Iw Injoje 2v eur x 183 MACAI pes axi det Pet Tt tT TT rejet tolo j amp TT fofofofofoy loji 1 The number of steps varies with type of device used See Section 5 2 Display command Execution at ON LEDA LEOB Execution at Setting data Lu easing edge Head I O number of AD57 Device numpar Number of characters to is designated be displayed Constant is designated Head number of the de vices in which the ASCII codes for the characters to be displayed are stored FUNCTION 1 The PRN instruction is used to display designated ASCII characters beginning with current cursor position on the display unit of the AD57 S1 AD58 designa
125. ing edge of the display command signal when the LEDB instruction is used execution processing CC1 with LEDA l CC1 with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Error Code Roos D9008 D9091 The character code designated by D is out of the range of 0 to 3FF The number of characters designated by G2 is out of the range of 1 to 20 6 102 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS a PROGRAM EXAMPLE The following is an example of the program used to display l vertically 10 characters which corresponds to character code OFB on a display unit connected to the AD57 loaded at X YOCO to OFF A designated character is displayed repeatedly beginning with column 20 on line 15 by turning on X000 yaad NOB6S 8 Cursor movement by the LO 15 CATE instruction Section 6 3 3 x 2 Designation of the character which corresponds to code FB 18 Designation for 10 characters Dispiay unit 10 characters Line 15 P l Characters which cor l respond to code OFBH Column 20 6 103 IB NA 66257 LP Ce eee eee ere rere tree rr rer rrr errr retire rrr err rere rer ire reer rer ere ree eee D T PEPPER eet eee rrr rere rrr rrr ua cesse rere Mama trem IRI AARPPPPPE
126. instruction stated using ladder diagram P This explains the details of the instruction 2 This indicates the instruction execution timing Q This indicates conditions causing an operation error and the error code of the operation error 5 A program example in which the instruction is used is shown using ladder diagram IB NA 66257 A PO er reer ee eee eer rrr Il HILL IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC AA 6 AD57 S1 AD58 CONTROL INSTRUCTIONS This section describes details of instructions used to control the AD57 S1 AD58 6 1 Display Mode Setting Instruction The display mode setting instruction is used to execute display mode setting of the AD57 S1 AD58 according to the type of the display being connected By execution of display mode setting the AD57 S1 AD58 can display characters Correct display of characters is not available without proper display mode setting If module type setting has been done by parameter setting display mode setting is not necessary When the PC CPU is switched from STOP to RUN the following display modes are automatically set E When AD57 is set eeve 0 AD57 CRT standard mode When AD57 S1 isset 5 AD57 S1 CRT standard mode When AD58 is set 2 LCD mode For detail of module type registration refer to the SW4GP GPPA Operating Manual Display mode setting is used also to switch display mode between s
127. ions IB NA 66256 SWAGP GPPA Operating Manual IB NA 66259 1 1 IB NA 66257 A 1 1 Displaying Characters How characters are CASDIOKOH on nahe 5 display unit t connected to the Display unit 2d inre T l in the canvas ROM designated Athe number of the screen to be displayed The designated canvas screen data is automatically read from the canvas ROM and written to the RAM area in the above illustration On the screen the following amount of data among 7680 words is A displayed i in one display page 1600 words 400 words 800 words address VRAM area Display unit IB NA 66257 A 1 INTRODUCTION 1 The screen display data stored in the VRAM area is as indicated below By changing the area to be displayed the stored data is displayed according to the designated display range AD57 AD58 ADb57 S1 Standard Enlarged display mode display mode 0 f Display data 1 400 SS Display data 1 f Display data 2 800 Dispiay data 1 j Display data 3 1200 B z y Display data 2 j Display data 4 dos Display data 5 is 2000 por Display data 3 j Display data 6 2400 Display data 2 i f Display data 7 2800 Display data 4 j Display data 8 3200 Display data 9 3600 Display data 5 R Display data 10 4000 Display data 3 j Display data 11 r 4400 Display data 6 j Display data 12 4800
128. is out of the ranges mentioned below In the CRT standard mode In the CRT enlarged mode In the LCD mode 8 38 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to move the cursor on the screen of a display unit connected to the AD57 loaded at X YOCO to OFF By turning on X000 the cursor on the screen is moved to column 20 on tine 5 9836 8 cA ASC AIACPU pa PK Setting of data to be displayed MOU D3 19 E CLEDB LOCATE H 8 K 5 Golumn 5 K 2 8 Column 20 Display of characters by the PR instruction Section 6 5 2 In this example characters A3ACPU are displayed by execution of the ASCII character display instruction PR after cursor movement Display unit Cursor position designated Iby the LOCATE instruction Line 20 6 39 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 4 Display Condition Setting Instructions The display condition setting instructions are used to change color or perform normai reverse switching of characters to be or being displayed Using the display condition setting instructions color designation and normal reverse switching of character display can be easily performed Display condition setting is executed using the instructions mentioned below CNOR Designates characters to be displayed in the normal display mode CREV D
129. ith LEDA CINSP with LEDB instruction execution Step 0 6 122 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS OPERATION ERROR PROGRAM EXAMPLE SEC A In the following case an operation error occurs and an error flag M9011 is set ae a ET uet of display columns designated by 9i is out of the range EE 1to 1 The following is an example of the program used to display a space at a designated position on a display unit connected to the AD57 loaded at X YOCO to OFF A space is displayed by turning on XOEC or XOF4 The position of display is designated at columns 45 to 50 on line 5 4808 M9865 Cursor movement by the LO CATE instruction Section 6 3 3 XBEC N9865 The number of display columns is designated at 5 The CINSP instruction is used for data entry together with other instructions such as CINMP CINHP CINPT CIN alphanumerics CINCLR and INPUT Refer to Section 7 3 for details By execution of the CINSP instruction a space is displayed at the cursor position and the characters within the designated range are shifted one column to the left Display unit Designated display columns 5 Display of a space iby the CINSP in i struction Column 50 6 123 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 6 7 Designated Column Clear Instruction The designated column clear instruction is used t
130. lay of characters Increases VRAM area display address by one line and scrolls the display up by one line Head VO number Screen Decreases VRAM area display address by one line and scrolls the display down by one line p Head VO number Displays the cursor having one character size 9 Head l O number LEDA Displays the cursor having two character size 9 Head VO number LEDA Deletes the cursor on the screen p Head VO number LEDA Moves the cursor to the designated position on the screen p Head VO number Display unit LEDA Sets the normal display of characters Head VO number LEDA Sets the reverse display of characters p Head VO number LEDA 4 5 LEDB LEDB LEDB LEDB LEDB LEDB IB NA 66257 A 4 AD57 S1 AD58 CONTROL INSTRUCTIONS Changing normal reverse display of characters Character color designation Changing character color LEDA LEDB fescue css esa A LE Em Changes normal reverse display mode for the designated number of characters begin ning with the cursor located character Head VO number LEDA LEDB Changes normal reverse display mode for the designated number of characters begin ning with the designated address in the VRAM area p Head VO number LEDA LEDB Sets the color of characters to be displayed
131. layed is 0 6 86 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE MELSEC A The following is an example of the program used to display characters which correspond to character codes 100 to 105 beginning with column 20 and after on line 5 on a display unit connected to the AD57 loaded at X YOCO to OFF Characters are displayed by turning on X000 P H 8 es NOV 8188 DA PH MOY 01801 DI PH MOU 8182 D2 PH MOV 6183 D3 PH MOV 8184 04 PH NOY 8185 DS PK MOU 6 D6 6 4888 M9065 3 LEDB LOCRTE H CELIN De Setting of data to be displayed Cursor movement by the LO CATE instruction Section 6 3 3 Head of the devices in which char acters are stored The character codes which correspond to the characters to be displayed are stored in DO to D5 0 is stored in D6 to designate the end of the range of characters to be displayed b15 bd DO 100 D1 101 I 3 ERA CIAR Line 5 D2 1024 EPRiinstruction D3 1034 F Display of characters up D4 10 du to code 00 D5 105 D6 00 4 End designation 6 87 Display unit Cha racters Column 20 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 1 The number of steps varies with type of device used See Section 5 2 Setting data Store command LEDA Execution at ON Head VO number of ADS7 LEDA LEDB EPRNV LEDB Execution
132. lear is executed by turning on XODE The position of display is designated at columns 45 to 50 on line 5 X808 N9065 Cursor movement by the LO CATE instruction Section 6 3 3 The number of clear columns is designated at 6 The CINCLR instruction is used for data entry together with other instructions such as CINMP CINHP CINPT CIN alphanumerics CINSP and INPUT Refer to Section 7 3 for details By execution of the CINCLR instruction characters within the designated range to the left of the cursor position are cleared Display unit Designated clear columns 5 4 1 J Column 50 6 127 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 6 8 ASCil Code Conversion Instruction The ASCII code conversion instruction is used to convert the ASCII characters being displayed on the screen to the ASCII codes and store them in designated devices By use of the ASCII code conversion instruction the store processing of designated data in the PC CPU can be easily performed Execute the ASCII code conversion of displayed characters by use of the following instruction o O ASCII code conver Inputs the ASCII codes which correspond to the HR i INPUT ASCH characters displayed on the screen 6 128 18 NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 8 1 ASCII code conversion of displayed characters INPUT Usable devices to x vimjt ser r ep w m aoa z v K
133. lowing is an example of the program used to read display data from the VRAM areas of the AD57 loaded at X YOCO to OFF and to write it to other VRAM areas Display data is read from addresses 1800 to 1809 of the VRAM areas and written to addresses 600 to 609 The read data is written to devices D100 to D109 N9036 M9865 H 888c Display of canvas screen data K by the CPS1 instruction Sec i tion 6 2 1 LEDR H 868C K Transmission of canvas screen 2 data by the CMOV instruction K Section 6 2 3 1688 5 X888 M9865 Designation of address 1800 of 4 the VRAM areas Designation of data read from addresses 1800 to 1809 Read data is stored in D100 and after Designation of address 600 of the VRAM areas Designation of data write to addresses 600 to 609 Designation of data stored in D100 and after 81 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 143 1B NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MEL SECA 6 10 Display State Read Instruction The display state read instruction is used to read the state of display settings mentioned below Display mode Cursor position Head VRAM address displayed Normal reverse display Color designation Cursor display By use of the display state read instruction current state of display settings can be checked Execute display state read by use of the following instruction e Display state read
134. me may vary with type of module and operation mode to be used The AD57 module is used The CRT standard mode is set The cursor is not displayed Processing Time y sec Condition Display mode setting instruction 96 characters 2027 Display Bement 1 character 152 condition 96 characters 2076 2213 setting Batch processing instructions COLOR 47 61 CCDSP Batch processing 15510 16184 96 characters 2102 2247 Split processing 1074 1 character 160 197 CCDSPV Batch processing 96 characters 2051 2247 Split processing PRN 1 character 176 216 1234 1 character 169 208 96 characters 1240 1371 Display screen contro instructions 1100 96 characters Designated character display instructions CSCRD 129 CON1 i CON2 na 188 Cursor control COFF 113 188 instructions Cursor ON 180 LOCATE 1 character 96 characters Cursor OFF APP 1 IB NA 66257 A Processing Time EIE sec APPENDIX a eal Bee sm harcore 05 1226 onorar ver ss a harass 1028 vao NNEITTTONETEJ Designated instructions iam ie laa ao terse oro er e eee a hares se 10 Ee acean se m gt orsmemee 168 200 Fierce se 00 character EPRV _1 character 158 197 display 98 characters 1328 1488
135. mn position Head device num ber of devices stor ing ASCII charac ters Input data is con verted into BIN data Device number A storing converted with ne DN iri BIN data S93 M38 LEDR If decimal ASCII data to be converted is outside the range of 32767 to 32767 RST M98 when the DABIN instruction is ex ecuted an error occurs such an error RST 09891 state is cleared RST MI2 LL 4Zowt D116 D11 Data entered to data entry area 1 are stored to D117 Data entered to data entry area 2 are stored to D118 M11 P 0Y 0116 D118 RST Mie At the completion of processing initial RST Mu state is restored RST NI2 xare LSET key 119 At the data entry abort initial state is RST Mi8 restored RST Mit 122 K8FE N9865 At the completion of setting or abort of data entry the cursor disappears from the screen 142 P2 143 Cursor line position Cursor movement with the LOCATE Cursor column instruction position 1B NA 66257 4 7 APPLICATION PROGRAM EXAMPLES as o MELSEC A xee CO key zeer CO key L9 key Display of 0 Number of display digits xac 1 key Number of display Display of 1 digits 21 Display of 2 Number of display digits 23 f wan Number of display Display of 3 digits 2 Number of display Display of 4 digits xere 5 key 2 digits 29 Number of display Display
136. n and the devices where the operation result is stored Indicates the end of AD57 S1 ADS8 con trol instruction For details refer to Chapter 5 Qe Details of instruction processing contents Indicates Indicates 16 bit data 16 bit data Indicates the four consecu Indicates the four consecu tive device numbers begin tive device numbers begin ning with the device num ning with the device num ber designated by ber designated by D 4 2 IB NA 662 4 3 4 AD57 S1 AD58 CONTROL INSTRUCTIONS Oe Instruction execution timing LEDA LEDB Indicates the four consecutive device numbers begin ning with the device number designated by D o execute LEDB instruction Indicates the four consecutive device numbers begin ning with the device number designated by D o execute LEDA Symboli Execution timing An instruction is executed every scan while the condi tion to execute the instruction is satisfied ON An instruction is executed only once at the leading f edge OFF to ON of the instruction execution condi tion Oe The number of steps Depending on the devices to be used the number of steps actually required might become larger than the step number indicated here For details refer to Section 5 2 Qe A circle in this column shows that an index register Z V can be used for the devices or constants used by an
137. n 6 5 4 7 characters Designation of addresses 1006 and after In this example characters A3ACPUP21 R21 are written to the VRAM areas at addresses 1000 and after and the display mode of P21 R21 is switched By setting the head of the VRAM addresses to be displayed at address 1000 or before by use of the CPS2 instruction condition of display mode switching can be monitored on the display unit VRAM areas Normal reverse switching is executed every time XO is turned on IB NA 66257 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC Al 6 4 4 Character color designation COLOR Usable devices ni lc s weonz woo ECENEHMENENESEENEEIENE CENE HU I PO LTT TT TT fofojofofo tt fofof TT 1 The number of steps varies with type of device used See Section 5 2 Character color setting command LEDA LEDB COLOR Execution at ON Execution at leading edge Device number is designated LEDC SUB Constant is Setting data CEDA designated Head I O number of AD57 DECT FUNCTION 1 The COLOR instruction is used to designate color of charac ters which are to be displayed on a display unit connected to the AD57 S1 AD58 designated by m to the color which corresponds to the color code designated by 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y1
138. nated by n Gd Number of characters Cursor position before A E 7 instruction execution A A TA Cursor position after A instruction execution 2 The CC1 instruction is used to display vertical lines of a table and bar graphs 3 The head I O number of the AD57 S1 AD58 designated by n should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F t 12 at 4 The character code designated by Gd can be set within the range of 00 to SFF If code 400 or higher is designated an error occurs 6 101 IB NA 66257 6 ADS7 S1 AD58 CONTROL INSTRUCTIONS ME J ECA 5 The number of characters designated by G2 can be set within the range of 1 to 20 6 If the range of the number of characters designated by 2 beginning with the cursor position exceeds line 0 only the characters from the cursor position to line 0 are displayed The excess characters are ignored Ignored PPPJ ED 4 Ls Line 2 Cursor position 7 After execution of the CC1 instruction conditions of the display become as follows Display mode no change SEES MR Current column position plus one Head VRAM address displayed Normal reverse designation no change EXECUTION CONDITION The CC1 instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the lead
139. nated character CC1 nn 6 101 6 5 12 Vertical repeated display of a pair of designated characters CC2 eesse 6 104 6 6 Fixed Character Display Instructions eee eee eee eee ere eee ee eee ee eee ee ee eee eee Teer ee ee ee eee Tee eee ee ee 6 1 07 6 6 1 Display of a minus symbol CINMP m HHHMMMMMMHMHHHHHHe 6 108 6 6 2 Display of a hyphen CINHP Hee HH 6 111 6 6 3 Display of a period or a decimal point CINPT m 8 6 114 6 6 4 Display of the alphanumeric characters 0 to 9 and A to Z CIN 11 0to9orAtoZ VVCVRPA Vd E rre E PRA QUARE RUF E CUENTE UT ea VUE CS 6 117 6 6 5 Display of a Space Li CINSP setesososoovseoveteseovoccecopesesvotestesesooseoeeeeceeeceeos 6 121 6 7 Designated Column Clear Instruction dbrensessoonsseuseconsoesoepesusoesenevecceonecdetoouoveveevoseeeoovee 6 124 6 7 1 Designated column clear CINCLR evssossonoosqeseoecesevoqoooooeoeoeecooooeveenoceeestoscteceeees 6 125 6 8 ASCII Code Conversion Instruction eee eee eee errr Tree eee eee ee ee eee eee eee ee ee eee ee ee ee Tee eee ee ee ee 6 1 28 6 8 1 ASCII code conversion of displayed characters INPUT e n 6 129 6 9 VRAM Data Read and Write instructions PULECEERE ELE ER CORTE E RTE EERE EE eC 6 133 6 9 1 VRAM data read GET weetesevoesooveecooovvovececorseeonoveesteevececeoseoveveseeseeceesooosesececueo 6 134 6 9 2 VRAM data write PUT Petsososoposessesecesesceceeucenesesoceovonsesepsesed2oeseveceueseeceocecoso 6 139 6 10 Display State
140. ne if the designated range exceeds the last column of the last line on the screen characters up to the last column on the last line are displayed The excess characters are ignored Ciuu ABC Cursor position DE EN DE are ignored b15 b8 b7 b0 424 B 1 414 A 444 D 434 C Gp s G 2 6 After execution of the PRN instruction conditions of the display become as follows Display mode no change T Plus one line if the designated range Cursor line position exceeds the last column ae Current cursor position plus desig Cursor column position nated number of characters Head VRAM address displayed Normal reverse designation Color designation Cursor display no change IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION The PRN instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used Instruction Instruction execution execution execution T 1 i i 1 1 f 1 Display command SN 1 t t t 1 1 i f d I l l PRN with LEDA 4 i l l I PRN with LEDB l In the following cases an operation error occurs and an error flag OPERATION ERROR M9011 is set Description Error Cod D9091 The range of the number of characters designated by GD b
141. nstruction conditions of the display become as follows m mde 6 20 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC X EXECUTION CONDITION The CLS instruction is executed every scan while the clear command is ON when the LEDA instruction is used It is executed only once 8t the leading edge of the clear command signal when the LEDB instruction is used CLS with LEDA l l l l CLS with LEDB 1 18 NA 662 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to clear data displayed on a display unit which is connected to the AD57 loaded at X YOCO to OFF Data on the screen is cleared by turning on X002 M9836 M9865 8 LEDB CPS1 H aeac Display of a canvas screen by the CPS1 instruction Section K 6 2 1 LEDR X882 M90865 22 LEDB CLS H SUB 888C Screen clear LEDR In the program example above the CPS1 instruction is used to display canvas screen No 4 when the PC CPU is turned on or reset A3ACPU AD57 Canvas ROM VRAM areas 0 CPS1 Canvas instruction No 4 Display unit CLs 204 space code is written instruction E 22 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 2 5 VRAM area clear CLV Usable devices BUCRHGDBEBOHSSBHSOHEBE pou psc ues ono a KB BER SIS EUN B RR EU
142. o 7 After execution of the EPRN instruction conditions of the display become as follows Display mode no change Plus one line if the designated range Cursor line position exceeds the last column ns Current cursor position plus desig Cursor column position nated number of characters Head VRAM address displayed Normal reverse designation no change Color designation ge Cursor display 6 81 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION The EPRN instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used ex execution Step 0 END Step 0 END Step 0 END Step 0 Sequence program flow ol TT l i l 1 l t i I I I L Display command ON p OFF i 1 LI I I I 1 t l 1 1 1 1 I l Li EPRN with LEDA l l EPRN with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set act Description The range of the number of characters designated by GP EE with the device number designated by exceeds the last device number of corresponding device The number of characters designated by G1 is 0 or a negative value
143. o clear charac ters at designated positions on the screen Execute designated column clear by use of the following instruc tion catesory ama meron Designated column CINCLR Clears characters at designated columns to the left of clear the cursor position 6 124 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 7 1 Designated column clear CINCLR Usable devices Bit device Word 16 bit device BCE CG CT COERCIEI US HERE lejij ilirgieiiejee il11lielelll 1 The number of steps varies with type of device used See Section 5 2 Clear command Execution at ON Execution at leading edge e Device number Setting data as LEDC SUBT di is designated Head I O number of AD57 Constant is Milius un MELIUTUTS FUNCTION 1 The CINCLR instruction is used to clear characters of the number of columns designated by Sto the left of and beginning with the cursor position on a display unit connected to the AD57 S1 AD58 designated by n Number of clear columns TO set value 1 TO set value 1 Si CL LIT Cleared Cursor position 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at 3 The number of clear columns designated by can be set within the range of 1 to 80 6 125 IB NA 66257 6 AD57 S1 AD5
144. ocessing is completed A3ACPU AD57 Canvas ROM Liles areas Display unit 1599 Display unit 880855800 69 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 2 2 VRAM display address change CPS2 Usable devices i E E 3 NECI a T T m 573724 4 414 Ba EA es x vim t e e r rc pw m eja z vi kw e riw mson L EHH e el del TTT TTT I fofefofofo fofet tT 1 The number of steps varies with type of device used See Section 5 2 Change command LEDA LEDB CPS2 Execution at ON Execution at leading edge Devi b Wr er is designated Setting data LEDC SUB Constant is O Head I O number of AD57 designated LEDR e Head VRAM address where the screen data to be displayed is stored FUNCTION 1 The CPS2 instruction is used to change the range of VRAM areas addresses 0 to 7679 of the AD57 S1 AD58 designated by m which is to be displayed to the addresses starting with one designated by AD57 S1 AD58 0 VRAM areas p VRAM address Display ee un 2 Screen switching time as well as scan time of the sequence program can be shortened by switching display addresses using the CPS2 instruction instead of the CPS1 instruction Before execution of the CPS2 instruction canvas screens should have been transmitted to VRAM areas using the CMOV instruction 3 The head I O number of the AD57 S1 AD58 designated by mshould be upper 2 digits of 3 hexade
145. of characters designated by GD is 0 or a negative value The VRAN area address designated by 2 is out of the range from 0 to 7679 Mes A The range of the number of characters designated by 1 starting with the address designated by exceeds address 7679 of the VRAM areas 6 61 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A PROGRAM EXAMPLE The following is an example of the program used to chaage color of the characters stored in the VRAM areas of the AD57 loaded at X YOCO to OFF Color of the characters stored at addresses 1007 to 1013 in the VRAM areas is changed from black to blue red purple green light blue yellow white and black by turning on X000 M9836 8 Setting of characters to be written to the VRAM areas Write to the VRAM areas by the PRV instruction Section 6 5 3 Used for display color switching 7 characters Designation of display color Designation of address 1600 and after In this program characters A3ACPUP21 R21 are written to address 1000 and after in the VRAM areas and display color of P21 R21 is changed By setting the head of the VRAM addresses to be displayed at address 1000 or before by use of the CPS2 instruction color changing can be monitored on the display unit VRAM areas Display color change is executed by turning on XO IB NA 66257 A 4 rere ere rere rrr rr er errr errr rst rr rrr err rrr rere rere ry Peete ath reete mr
146. olumns characters are shifted one column to the left 6 121 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 If the range of display columns designated by S beginning with the cursor position exceeds column 0 on a line the excess range laps around to the last column of the previous line And characters in the excess range are shifted one column to the left If the designated range exceeds column 0 of line 0 on the screen only the characters up to column 0 on line O are shifted Characters which exceed column 0 on line 0 are erased Ai LC Dy Ey tF Cursor position Cursor position A space is displayed 5 After execution of the CINSP instruction conditions of the display become as follows a NENNEN Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normalreverse designation Color designation Gweordepay EXECUTION CONDITION The CINSP instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used END processing Goce E E executio execution execution ENO Step 0 END Sequence program flow P I I9 AMLL i i 1 LI 4 Display command Ore i i 1 i l CINSP w
147. on K 6 3 3 Se LEDR X8F8 M9065 25 H BBBC f The number of display columns is designated at 5 LEDR The CINMP instruction is used for data entry together with other instructions such as CINHP CINPT CIN alphanumerics CINSP CINCLR and INPUT Refer to Section 7 3 for details By execution of the CINMP instruction a minus symbol is displayed one column to the left of the designated columns Display unit Designated display columns 5 Display of a sia d symbol by the CINMP l Column 50 6 110 IB NA 66257 A Tn 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 6 6 2 Display of a hyphen CINHP Usable devices Pe HE uu LES du 012 m9011 peor quise qp oor ze ieiililiilsjeiee 111 41elei L1 1 The number of steps varies with type of device used See Section 5 2 Display command a Execution at ON sre Execution at leading edge E SEIS H oye nest O eano rumoer orane Constant is LEDR designated Number of display col umns FUNCTION 1 The CINHP instruction is used to display a hyphen at the cursor position and shift the characters in the range desig nated by S beginning with the cursor position one column to the left on the display unit of the AD57 S1 AD58 designated by n Number of display columns F BCD E Fit ABCDEF Cursor position A hyphen is displayed 2 The head I O number of the AD57 S1 AD58 designated by m should b
148. on the screen a minus symbol is displayed at column 0 on line 0 pasa r1 1 LIL LL IL Minus symbol Cursor position display amp s NE Cursor position Minus symbol display 5 After execution of the CINMP instruction conditions of the display become as follows Display mode Cursor line position Cursor column position Head VRAM address displayed no change Normal reverse designation Color designation Cursor display EXECUTION CONDITION The CINMP instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used Instruction execution execution END CINMP with LEDA CINMP with LEDB l l SSS SS 0S a Ta IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS A OPERATION ERROR In the following case an operation error occurs and an error flag M9011 is set eee e me number of display columns designated by Si is out of the range of 1 cs to 1 PROGRAM EXAMPLE The following is an example of the program used to display a minus symbol on a display unit connected to the AD57 loaded at X YOCO to OFF A minus symbol is displayed by turning on XOFO The position of display is designated at columns 45 to 50 on line 5 X808 M9865 H Boat K Cursor movement by the LO 3 CATE instruction Secti
149. only once at the leading edge of the mode setting command signal when the LEDB instruction is used Instruction EN D execution Processing CMODE with LEDA eee es es a RR F EA CMODE with LEDB D e UC ae A nr ae OPERATION ERROR In the case described below the operation error occurs and an error flag M9011 is set BEEN 3 D9008 The display mode setting data designated by S is out of the range from 0 to 3 and 5 18 NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC X RROGRAM EXAMPLE The following is an example of the program used to set the CRT he l standard mode to the AD57 assigned to X YOCO to OFF Setting is executed when the PC CPU is powered on or reset N9836 Standard mode is designated By use of the LEDB instruction and M9036 as a conditional contact the CMODE instruction is executed only once when the PC CPU is powered on or reset To set the CRT standard mode to the AD57 0 should be designated 6 4 1B NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 2 Display Screen Control Instructions The display screen control instructions are used to clear display screen and VRAM areas display and transmit canvas screens and scroll up and down the screen Using the display screen control instructions display of the canvas screen in the canvas ROM switching of screens and scrolling of screen can be easily controlled Display screen control i
150. plays F at the cursor position G display CING Displays G at the cursor position H display CINH Displays H at the cursor position I display CINI Displays I at the cursor position J display CINJ Displays J at the cursor position K display CINK Displays K at the cursor position L display CINL Displays L at the cursor position M display CINM Displays M at the cursor position N display CINN Displays N at the cursor position O display CINO Displays O at the cursor position P display CINP Displays P at the cursor position Q display ciNQ Displays Q at the cursor position R display CINR Displays R at the cursor position S display CINS Displays S at the cursor position T display CINT Displays T at the cursor position U display CINU Displays U at the cursor position V display CINV Displays V at the cursor position W display CINW Displays W at the cursor position X display CINX Displays X at the cursor position Y display CINY Displays Y at the cursor position Z display CINZ Displays Z at the cursor position space display CINSP Displays a space symbol at the cursor position 6 107 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 6 1 Display of a minus symbol CINMP Usable devices mae word ie ame RI M a deu MESTRE E SES TET Ce LII LLILIislsisit TL LIeIec tro 1 The numbero
151. pper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 3 The canvas screen number to be designated by should correspond with the canvas screen number written to the canvas ROM of designated AD57 S1 AD58 EXECUTION CONDITION The CPS1 instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signa when the LEDB instruction is used Sequence program flow CPS1 with LEDA CPS with LED8 OPERATION ERROR In the case described below the operation error occurs and an error flag M9011 is set The canvas screen number designated by by S is out of the range from to 255 or there is no canvas screen data which corresponds with the canvas screen number designated by S in the canvas ROM 5 5 IB NA 6625 5 USING AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC 4 PROGRAM EXAMPLE The following is an example of the program used to display canvas screens on the AD57 loaded at X YOCO to OFF When X000 is turned ON canvas screen No 1 is displayed by batch processing When X001 is turned ON canvas screen No 2 is displayed by split processing i LAL LE LEDB CPS X Designation of M Hsu me Y f H canvas screen No 1 mene 1 of LL EDR Designation split processing SET 3866 LEDA CPSI 3 K m ewe i K H Designation of
152. r of characters G I e4 AAAAAAAL Character code Cursor position after instruction execution Cursor position before instruction execution 2 The CR1 instruction is used to display horizontal lines of a table and bar graphs 3 The head 1 O number of the AD57 S1 AD58 designated by n should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at n 4 The character code designated by GD can be set within the range of 00 to 3FF If code 400 or higher is designated an error occurs 6 94 IB NA 66257 6 ADS7 S1 ADS8 CONTROL INSTRUCTIONS MELSEC AA 5 The number of characters designated by G2 can be set within the range of 1 to 80 6 If the range of the number of characters designated by 2 beginning with the cursor position exceeds the last column on aline the excess range of characters laps around to column 0 on the next line If the designated range exceeds the last column of the last line on the screen characters up to the last column on the last line are displayed The excess characters are ignored AA AAA Cursor position SD Ls Cursor position ieiti AAA AA 2 characters are ignored 7 After execution of the CR1 instruction conditions of the display become as follows item Condition Display mode no change Plus one line if the designated range exceeds the last column
153. r of scans required for transmission processing In the CRT standard mode sese 16 scans In the CRT enlarged mode csse 4 scans In the LCD mode ETLI AEE O EE S 8 scans Special relay M9065 is turned ON when split transmission is started and turned OFF when it is completed Split transmission start Split transmission complete n ro M9065 OFF POINT 1 During split transmission execution of other instruc tions cannot be accepted by the AD57 S1 AD58 to which screen data is being transmitted Also execution of the following instructions cannot be accepted by other AD57 S1 AD58 CPS1 instruction CMOV instruction CLS instruction CLV instruction The LEDB instruction cannot be used when split transmission is performed Display command conditional contact and M9066 should be held at ON during split transmission 5 After execution of the CPS1 instruction conditions of the display become as follows po em o Condtion O O Normal reverse designation Noma IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC EXECUTION CONDITION The CPS1 instruction is executed every scan while the display command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used ND instruction Instruction Instruction execution processing execution execution execution execution Step 0 S
154. r position before instruction after instruction execution execution GD Number of characters 00CO P 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 630 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS SET A 3 The number of characters designated by GD can be selected from 1 to the total number of characters beginning with the cursor position to the last column on the last line on the screen However the number of characters to be designated should not exceed the value specified by the last device which is designated by 2 4 The ASCII codes to be stored in the devices designated by 2 can be set in the range of 0000 to OSFF If code 0400H or a higher code number is set it is processed as code 0020 space code b If the range of the number of characters designated by D beginning with the cursor position exceeds the last column on a line the excess range laps around to column 0 on the next line If the designated range exceeds the last column of the last line on the screen characters up to the last column on the last line are displayed The excess characters are ignored ABC b15 b0 oo 1E Cursor position DE are ignored Cursor position ru ii
155. ress 600 of the VRAM areas Designation of data write to addresses 600 to 609 Designation of data stored in D100 and after 6 137 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS VRAM areas xps cc 002 LPUT instruction b15 b0 608 609 1800 1801 1802 LGET instruction 1808 1809 6 138 IB NA 6625 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSE CA 6 9 2 VRAM data write PUT Usable devices aee wora oea ee x vIw e sTs v e o w n oj v ei tex eise ETE SES 1 The number of steps varies with type of device used See Section 5 2 LEDA Execution at ON Setting data LEDB Execution at Head I O number of AD57 leading edge Head address of the D VRAM areas to where Device number display data is to be writ ten is designated Constant is Number of data to be LEDC designated written Head number of the de LEDR vices which store data to be written FUNCTION 1 The PUT instruction is used to write the number of data designated by 2 beginning with the device number desig nated by G3 to the addresses beginning with that designated by GD of the VRAM areas of the AD57 S1 AD58 designated by VRAM address AD57 S1 AD58 VRAM areas pactos G3 cen Write areas 342 G 1 word data 1 word data 6 139 IB NA 6625 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 2 T
156. rrections Turn off the PC power and load the memory cassette Since this is CPU hardware error consult Mitsubishi representative Since this is CPU hardware error consult Mitsubishi representative Table 8 1 Error Code List for the A ACPU Continue IB NA 66257 A 8 ERROR CODE LISTS WDT ERROR Checked at execution of END processing END NOT EXECUTE Checked at execution of the END instruction UNIT VERIFY ERR Checked continuously FUSE BREAK OFF Checked continuously 1 Scan time of the user s prog ram has been extended due to certain conditions 2 Scan time has been extended due to momentary power fai lure occurred during scanning Whole program of specified prog ram capacity was executed without executing the END instructions 1 When the END instruction was to be executed the instruction was read as other instruction code due to noise 2 The END instruction changed to other instruction code due to unknown cause Current I O module information is different from that recognized when the power was turned on 1 The I O module including spe cial function modules connec tion became loose or the mod ule was disconnected during operation or wrong module was connected There is an output module of which fuse is blown Due to the error of the control bus which connects to special function modules the FROM TO instruc
157. s are set In this case there fore it is not necessary to set the display mode in a sequence program using the CMODE instruction If the unit name has not been entered using a peripheral device the AD57 CRT standard mode is automatically set This means that setting of the display mode is not required when the AD57 is used in the CRT standard mode 2 VRAM area of addresses 0 to 7679 is cleared in five area clear operations in 1600 address units When clearing the VRAM area an error does not occur if address to be cleared exceed address 7679 Therefore the VRAM area clear is attempted in the range of address 0 to address 7999 to simplify the program 3 Use the CLS instruction to clear only the display screen The display screen is also cleared using the CLV instruction by clearing the corresponding VRAM area with the CLV instruc tion nc 7 2 Lm ta Q 1B NA 6625 7 APPLICATION PROGRAM EXAMPLES MELSEC A 7 2 Displaying Canvas Screen This section gives an example of the program used to display the canvas screen on the display unit Programming Conditions 1 AD57 is used 2 AD57 is loaded to use addresses X YOCO to X YOFF 3 The CRT standard mode 0 is set as the display mode 4 Canvas screen No 1 displayed on the display unit in batch by turning ON X000 5 Canvas screen No 2 and No 3 are transferred to the VRAM area by turning ON X001 in split processing 6 Canvas screen to be di
158. s executed only for the characters being displayed When 5 Cursor position ABB C ABC DE VRAM areas P VRAM areas ABC i 6 After execution of the CRDSP instruction conditions of the display become as follows Display mode no change g Plus one line if the designated range Cursor line position exceeds the last column i f Current cursor position plus desig Cursor column position nated number of characters no change The CRDSP instruction is executed every scan while the normal reverse switch command is ON when the LEDA instruction is used It is executed only once at the leading edge of the normal reverse switch command signal when the LEDB instruc tion is used Instruction END execution processing execution execution execution execution IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS OPERATION ERROR ithe Peu d tase an operation error occurs and an error flag M9011 is set l Dosch in is Error Code diio D9008 D9091 The number of characters designated by S is 0 or a negative value IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to execute switching of normal reverse display of characters on the screen of a display unit connected to the AD57 loaded at
159. s executed using the instructions men tioned below Reads a designated canvas screen in the canvas sue sergen CPS1 ROM to addresses 0 and after in the VRAM areas and p ay displays it on the screen VRAM display CPS2 Changes addresses of the VRAM areas displayed on address change the screen by one address Canvas screen CMOV Transmits canvas screens in the ROM to a desig transmission nated address and after in the VRAM areas Writes 204 space code to the address of the VRAM areas being displayed and clears the screen Writes 204 space code to a designated address and VRAM area clear after in the VRAM areas N CSCRU Scrolls up a screen by one line Scroll up down CSCRD Scrolls down a screen by one line 6 5 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 2 1 Canvas screen display CPS1 l Usable devices nan Poa ia LIEU m MANET I m aa Oe pepsi ede weal el OVO il sie zea ee PS iT TT TIT jolofofofo 17 lelel LL 1 The number of steps varies with type of device used See Section 5 2 Display command LEDA LEDB CPS1 Execution at ON Execution at leading edge sue Q p Device number is designated LEDC suB O Constant is Setting data ignated UEDA peaga Head 1 0 number of AD57 OA FUNCTION 1 The CPS1 instruction is used to transmit the canvas screen designated by to addresses 0 and after in the VRAM areas of the AD57 S1 AD58 designated by and displays it
160. s is used AD59 VUA esee siue bible n Slee bie aha 3 units AJ71C24 S3 56 5 units AJ71TPT32 S9 strreesees 2 units The number of usable AD57 S1 AD58 1344 X3 10 X 5 29X 0 125 X 2 8 56 625 ee 56 units ll Although the above indicated number is obtained as the result of calculation actual number of loadable AD57 S1 ADBS is limited to the following number due to the I O number of the PC Pus A2ACPU eer er eee eee ee ee TETT 8 units A2ACPU S1 TP 16 units A3ACPU Tm 32 units 2 To control AD57 S1 AD58 create the canvas ROM and character generator ROM using the SW1GP AD57P system FD and install these Ross in AD57 S1 AD58 For the procedure to create the canvas ROM and character generator ROM refer to the SW1GP AD57P Operating Manual 3 An extension base module cannot be connected to an A32B main base module 2 2 IB NA 66257 3 PROGRAMMING PROCEDURE 3 PROGRAMMING PROCEDURE 3 1 Displaying Procedure This chapter describes the setting and programming procedure to display characters in the display unit connected to the AD57 S1 AD58 This section describes the procedure to display characters on the display unit Create the canvas ROM and character generator ROM Refer to the AD57 S1 AD58 User s Manual Load the AD57 S1 AD58 to a base mod ule Connect the CRT plasma display unit or LCD Connect wiring
161. s the beginning of an AD57 S1 AD58 control instruction LEDA An instruction is executed every scan while the conditional contact is ON LEDB An instruction is executed only once at the leading edge of the conditional contact LEDC SUB GD jarret These designate the device for setting the data used for an Cee operation called by an instruction and the device for storing LEDC G the operation result LEDC SUB This indicates that either LEDO or SUB can be designated LEDC 9 This indicates that only LEDC can be desig nated This indicates that only SUB can be desig nated The LEDC instruction is used to set a device number LEDC DO LEDC The SUB instruction s used to set a 16 bit constant Setting range is either 32768 to 32767 or 0000 to FFFF K32767 HFFFF LEDR i05 ue R ngeon naes This indicates the end of the AD57 S1 AD58 control instruc tion In some cases this statement is not necessary 2 S and D written with the LEDC or SUB instruction are used to designate the following rem Designates the head I O number of the AD57 S1 AD58 designates the upper 2 digits in the expressed 3 digits Q9 Designates the data to be written or designation value or the de vice where either of them is stored e Designates the device number where the read data is stored LEDA LEDB INPUT i a a are a 1B NA 66257 A 5 USING AD57 S1 AD58 CONTRO
162. s used processing Lexecuto CINPT with LEDA CINPT with LEDB l 1 6 115 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS OPERATION ERROR PROGRAM EXAMPLE In the follawing case an ee error occurs and an error flag M9041 js set De of enemy columns je designated by Si is out of the range of 1 to Ae Os The foll Wi g is an example of the program used to display a period or a decimal point on a display unit connected to the AD57 loatfed at X YOCO to OFF A period or a decimal point is displayed by turning on XODF The position of display is designated at columns 45 to 50 on line 5 X808 M90865 Cursor movement by the LO CATE instruction Section 6 3 3 The number of display columns is designated at 5 The CINPT instruction is used for data entry together with other instructions such as CINMP CINHP CIN alphanumerics CINSP CINCLR and INPUT Refer to Section 7 3 for details By execution of the CINPT instruction a period or a decimal point is displayed at the cursor position ahd the characters within the design ted range are shifted one column to the left Display unit Designated display columns 5 Display of a period decimal ir Gursor position Ipoint by the CINPT instruction Column 50 6 116 IB NA 6625 MEMO PPP n m eessveesseueces
163. screen of a display unit connected to the AD57 S1 AD58 designated by 8 of the number designated by starting with the cursor position mE Display unit Display unit Number of characters CRDSP execution ma E JAD B c BN Number of Cursor position characters before execution Ile Cursor position after ex cution 2 Execution of the CRDSP instruction switches normal character display to reverse display or reverse display to normal display 3 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 7124 at n x 5 whens es 4 The number of characters designated by S can be selected from 1 to the total number of characters starting with the cursor position to the last column on the last line on the ane dates E NS 6 44 IB NA 66257 A i Displayed areas Cursor position p EXECUTION CONDITION Sequence program flow i 1 Normal reverse switch command ON m A 1 OFF wu Li i i CRDSP with LEDA CRDSP with LEDB AD57 S1 AD58 CONTROL INSTRUCTIONS A 5 If the range of the number of characters designated by S exceeds the last column on line the excess range laps 7 around to the next line If the designated range exceeds the last column of the last line en the screen display switching i
164. signated address capacity of canvas screen 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 6 14 IB NA 662 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MEL SECA 3 The canvas screen number to be designated by 1 should correspond with the canvas screen number written to the canvas ROM of designated AD57 S1Y AD58 4 The VRAM address designated by 2 should be the head address of the areas to be transmitted The available range is from 0 to 7679 The range of addresses where transmitted data is to be stored varies with preset display mode of the canvas screen to be transmitted CRT standard mode From designated address to desig nated address 1599 CRT enlarged mode From designated address to desig nated address 399 LCD mode From designated address to desig nated address 799 If the area ranging from a designated address to address 7679 is smaller than the capacity of one canvas screen area to be transmitted only the area starting with the designated address to address 7679 is transmitted as mentioned below VRAM areas een Designated address pee Canvas No 3 X Transmission REPRE 7679 Not transmitted 5 There are 2 ways of transmission of canvas screens to the VRAM areas as mentioned below Use special relay M9066 to switch the method of
165. signated by 2 beginning with the device number designated by G3 AD57 S1 AD58 VRAM areas 3 424 B i414 A 341 444 D 434 C 2 Number of characters 242 464 F i454 E EDH 484 H i474 G M 1 character 1 character code code IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 2 The head I O number of the AD57 S1 AD58 designated by m should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 3 The VRAM address to be designated by D can be set within the range of 0 to 7679 See Section 1 1 1 for detail of the VRAM areas 4 The number of characters to be designated by 2 can be set at any number of characters stored at addresses beginning with the address designated by GD up to address 7679 However a value which exceeds the last device number of the devices designated by 3 cannot be set b The ASCII codes to be stored in the devices designated by 3 can be set in the range of 004 to FFy 6 If the range of the number of characters designated by 2 beginning with the address designated by GD exceeds address 7679 an error occurs and processing is not per formed Such range setting is ignored 7 If characters are stored in the areas currently being displayed such characters are displayed on the screen 8 After execution of the PRNV instruction conditions of the display becom
166. splayed is changed according to the input number X002 X003 X004 that is turned ON X002 ON Canvas No 1 screen is displayed X003 ON Canvas No 2 screen is displayed X004 ON veven Canvas No 3 screen is displayed Example Program Displaying canvas 1 screen using CPS1 sl canvas screen Wistr ction Split processing instruction k Transferring canvas Designating canvas screen screen using CMOV No 2 instruction Designating transfer destination VRAM area head address 1600 Designating transfer destination VRAM area head address 1600 Self retaining signal for split processing Canceling split processing mode CMOV instruction start signal steps 64 to steps 98 Split processing instruction Designating canvas screen Transferring canvas No 3 Screen using the in Designating transfer destina struction tion VRAM area head address 3200 Self retaining signal for split processing RST 698663 Canceling split processing mode 73 IB NA 66257 A 7 APPLICATION PROGRAM EXAMPLES Explanation T X883 Canvas screen No 2 display instruction Pis tt MS M 19865 PK 12 HOU 1688 Canvas screen No 3 di instruction 123 3884 Canvas display i J PLS M5 M6 13865 P 133 MOY Pase nS D161 M6 0181 N 0161 Haec D161 LEDR Designating the VRAM display head address 0 Designating the VRAM display head address 1600 Designating the VRAM display head address 3200
167. ssary to take an interlock so that canvas screen No 2 and No 3 will not be transferred at the same time 3 To change the screen display modes CRT standard mode enlarged display mode while the AD57 is used change the display mode by using the display mode setting instruction CMODE instruction If the display mode preset for the canvas screen data and the mode set by a display mode setting instruction differ from each other correct display cannot be obtained Example Display mode for each canvas screen CRT standard mode 0 Enlarged display mode 1 CRT standard mode 0 Canvas screen No 1 Canvas screen No 2 Canvas screen No 3 xap Canvas screen No 1 display instruction PLS NS M6 N N9865 P 3884 Canvas screen No 3 display instruction 138p PL MS M6 n9065 PK 139 Mou 3288 P NOU 6 153 bb p181 D182 K6 D161 3 D182 M D161 0162 H gaac 0182 Designating CRT standard mode Designating eniarged display mode Designating CRT standard mode Setting display Designati mode using esignating CMODE instruction display mode IB NA 66257 A 7 APPLICATION PROGRAM EXAMPLES MELSEC A 7 3 Setting Data Using Keys This section gives an example of the program used to input numerical data with the keys on the operation pane connected to the AD57 and to store the data into the PC CPU data register
168. ssing will not occur if the input value is 100 or larger gt K100 D20 7 18 IB NA 66257 8 ERROR CODE LISTS 8 ERROR CODE LISTS If an error occurs when the PC CPU is switched to the RUN state or in the RUN state error indication is given or corresponding error code is stored in register D9008 detail error code is stored in register D9091 and error step is stored in register D9011 Refer to Table 8 1 for description causes and corrective action 8 1 How to Read Error Codes 8 2 Error Code Lists Error Message INSTRCT CODE ERR Checked when STOP RUN or at execution of instruction When an error has occurred corresponding error code can be read by use of a peripheral device Refer to the Operating Manual of respective peripheral device for the procedure of read of error codes The following lists give error messages error code numbers detail error code numbers description causes and corrective action Error and Cause Corrective Action Instruction codes which the CPU 1 Read the error step using a cannot decode are included in the peripheral device and correct program the program of the step 2 Check the ROM if it contains instruction codes which cannot be decoded If it does replace it with a correct ROM Index qualification is specified for a Read the error step using a 32 bit constant peripheral device and correct the f 7 Device specified by
169. st device number of the devices designated by D an error will occur 4 If the range of characters designated by beginning with the cursor position exceeds column 0 on a line the excess range laps around to the last column of the previous line And characters in the excess range are converted and stored If the designated range exceeds column 0 of line 0 on the screen only the characters up to column 0 on line O are converted and stored b15 b8 b7 bo Ot p Or O Qu 9 b15 b8 b7 b0 ABCDE F OH META Cursor position D i o oe ABCD Cursor position E F GH Le 5 The ASCII codes to be stored in correspond to designated characters and are within the range of 00 to FF If a designated character corresponds to code 100 or above it is automatically converted to code 20 space code and stored 6 Code 00 is automatically stored in the end of the ASCII codes stored in The method of storage of code 00 when the number of designated characters is an even number differs from that when the number of designated characters is an odd number as shown below When S 5 When S 4 b15 b8 b7 bib b8 b7 424B 4u A 424B 41y A 444D 434 C 444 D 434 C 00 454 E 00 004 Code 004 is stored Code 00004 is stored 6 130 IB NA 66257 A V After execution of the INPUT instruction conditions of the display be
170. t 20 characters Characters which cor respond to code OFBH Column 20 eee e 96 IB NA 6625 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC AA 6 5 10 Horizontal repeated display of a pair of designated characters CR2 E eee T F ee ji inir BOS OO CE GOO ONE CcIoOCIe o ttt TTT ttt ttt tt yy foto tt SD TTT fellfe J o 6 T fejjel jeje j feljello lelo lil 1 The number of steps varies with type of device used See Section 5 2 Mode setting command LEDA Execution at ON LEDA LEDB LEDB Execution at F8 T 14 leading ed Setting data g edge ae Head I O number of AD57 LEDC SUB Devi b BEER duse SP Codes of a pair of charac ee A ters to be displayed LEDC SUB Nt at D ers to be displaye LEDC SUB 63 designated 3 Number of characters to be displayed FUNCTION 1 The CR2 instruction is used to display repeatedly a pair of designated characters each of which corresponds to respec tive character code designated by GD and 2 on a display unit connected to the AD57 S1 AD58 which is designated by Repeated display begins with the cursor position and con tinues horizontally to the right for the number of pairs of characters designated by 3 3 Number of characters Cursor position before SD 2 Cursor posi
171. tandard and enlarged for the AD57 Display mode setting is executed using the instruction mentioned below Sets display mode of the AD57 S1 AD58 Display mode CMODE Switches display mode of the AD57 between g standard and enlarged F ra IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 1 1 Display mode setting CMODE Usable devices st devo Word ih device onam Pon i lt a M Ott tt fojolefelo 11 jelel I 1 The number of steps varies with type of device used See Section 5 2 Mode setting command Execution at ON LEDA LEDB CHOBE Execution at leading edge EE 5 NET ceo Device number LEDC SUB O is designated Constant is Setting data LEDR designated Head I O number of AD57 Display mode setting data FUNCTION 1 The CMODE instruction is used to set the display mode designated by to the AD57 S1 AD58 designated by By execution of display mode setting display of characters on the display unit connected to the AD57 S1 AD58 becomes possible Correct display of characters is not possible without proper display mode setting 2 The head 1 0 number of the AD57 S1 AD58 designated by P should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 3 The display mode setting data to be designated by should be as follows according to type of module 0 Color CRT standard mode ns
172. ted by n The ASCII characters to be displayed correspond to the ASCII codes which are stored in the devices which correspond to the number of characters designated by GD beginning with the device number designated by 2 b15 b8b7 bO 42 B i 414 A 444 D i 43 C 46 F i 45 E 1 Number of characters 48 H 474 G Display unit A BCDEFGHIJKLMNOP Cursor position before instruction execution Cursor position after instruction execution 4A J i 494 1 eee 1 character 1 character code code 2 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 6 64 e re a e T E T PB Ri a RF IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 3 The number of characters designated by GD can be selected from 1 to the total number of characters beginning with the cursor position to the last column on the last line on the screen However the number of characters to be designated should not exceed the value specified by the last device which is designated by G2 4 The ASCII codes to be stored in the devices designated by 2 can be set in the range of 004 to FFy b If the range of the number of characters designated by D beginning with the cursor position exceeds the last column on a line the excess range laps around to column 0 on the next li
173. ted characters is displayed repeatedly beginning with column 20 on line 5 by turning on X000 S1 AD58 CONTROL INSTRUCTIONS 8 48880 M9865 H GLIIN K Cursor movement by the LO 9 CATE instruction K Section 6 3 3 28 LEDR H SUB Baat SUB TS Designation of the characters H which correspond to codes FDu SUB BGFE and FEx K Designation for 20 pairs of charac SUB 28 as LEDR Display unit 20 pairs pr CPI et Ot Ot de PS OS Pe 4 corresponds to code i corresponds to code t L J Column 20 6 100 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 5 11 Vertical repeated display of a designated character CC1 u Usable devices T rt Soa i mem weotz m9011 H BENHNSNENES 1 The number of steps varies with type of device used See Section 5 2 Mode setting command LEDA Execution at ON LEDA LEDB LEDB Execution at Setting data o onding 628 Head vo number of ADS LEDC Device number Code of a character to be za is designated displayed SUB Constant is designated Number of characters to LEDR Gd be displayedDisplay mode setting data FUNCTION 1 The CC1 instruction is used to display repeatedly a designated character which correspond to the character code designated by D for the number of characters designated by 2 in a vertical direction beginning with current cursor position on the display unit of the AD57 S1 AD58 desig
174. the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at n 3 The normal or reverse display mode of characters automatical ly sets to the normal display mode when the following instructions are executed CPS1 CPS2 CLS 4 After execution of the CNOR or CREV instruction conditions of the display become as follows em T m a Normal reverse designation RENI oe Son Color designation no change Cursor display no change 641 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A EXECUTION CONDITION The CNOR and CREV instructions are executed every scan while the normal reverse switch command is ON when the LEDA instruction is used It is executed only once at the leading edge of the normal reverse switch command signal when the LEDB instruction is used END processing CNOR CREV with LEDA l l l CNOR CREV with LEDB 1 8 42 IB NA 66257 A __ 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC PROGRAM EXAMPLE ___ The following is an example of the program used to execute switching of normal reverse display of characters on the screen of a display unit connected to the AD57 loaded at X YOCO to OFF Characters ASACPU are displayed in the normal and reverse T display modes at current cursor position on me scre
175. the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used i i i L i 1 Display command Gee l i i I t I CIN with LEDA l l l CIN with LEDS 1 OPERATION ERROR In the following case an operation error occurs and an error flag M9011 is set Te number of display columns designated by S is out of the range of 1 marear 6 119 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The following is an example of the program used to display a number 5 at a designated position on a display unit connected to the AD57 loaded at X YOCO to OFF The aiphanumeric characters are displayed by turning on XOEE The position of display is designated at columns 45 to 50 on line 5 X888 M9065 LEDB LOCRTE H SUB 88ac K Cursor movement by the LO SUB 3 K 3 CATE instruction Section 6 3 3 SUB The number of display columns is designated at 5 The CINS5 instruction is used for data entry together with other instructions such as CINMP CINHP CIN alphanumerics CINSP CINCLR and INPUT Refer to Section 7 3 for details By execution of the CIN5 instruction a number 5 is displayed at the cursor position and the characters within the designated range are shifted one column to the left Display unit Designated display columns 5 Line 5 estrossoseveeoccecoice 1234
176. the one character cursor is displayed at current cursor position By execution of the CON2 instruction the two character cursor is displayed By execution of the COFF instruction display of the cursor on the screen is turned off aS E LS 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 6 3 3 Cursor position setting LOCATE EE j Usable devices li wea ae T HIT Cram jie CIBC E PCIE ER i deee GE EGER e B D RI EET CE a ex b EE TSIselsio Eco SS ETS Fe I ESSI BISEDEE DSISEDPES 1 The number of steps varies with type of device used See Section 5 2 Position setting command Execution at ON LEDA LEDB LOCAT Execution at leading edge ue Setting data LEDC SUB 69 Device number is Head I O number of AD57 nonea Constant is Destination line of cursor NER zs Destination column of E FUNCTION 1 The LOCATE instruction is used to move the cursor to the line designated by 1 and to the column designated by G2 on the screen of a display unit connected to the AD57 S1 AD58 designated by n Display unit 2 Column GD Line 2 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at m 3 The range available for setting destination lines and columns at GD and 2 varies with the display mode being used as mentioned below ORT standard mode 0 ora
177. tion Cursor position after execution Number of characters ABCDE Red Blue Cursor position before execution ABCDE Changed to green Color code 2 The CCDSP instruction changes only the display color of designated characters The color of characters after execution of the CCDSP instruction is the color designated by the COLOR instruction 3 The head I O number of the AD57 S1 AD58 designated by should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 124 at 6 54 IB NA 662 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MELSEC A 4 The number of characters designated by GD can be selected from 1 to the total number of characters starting with the cursor position to the last column on the last line on the screen 5 If the range of the number of characters designated by GD starting at the cursor position exceeds the last column on a line the excess range laps around to the next line If the designated range exceeds the last column of the last line on the screen color changing is executed only for the characters being displayed When D 5 and GD 6 ABC Cursor SL D gt DEFGH DEFGH Changed to yellow VRAM areas Curso iti Displayed areas ursor position AB C 6 Tables shown below indicate available character colors and corresponding color codes to be designated by 2 Color
178. tion cannot be executed If parameter I O assignment is being executed special function modules are not accessible at initial communication At error occurrence the head l O number upper 2 digits of 3 digits of the special function module that caused error is stored at D9011 user s program and shorten it using the instructions 2 Monitor contents of special reg ister D9005 using a peripheral device If the contents are other than 0 power supply voltage may not be stable Check power supply and reduce variation in voltage 1 Reset and run the CPU again If the same error recurs Since this is CPU hardware error consult Mitsubishi repre sentative Read detailed error code using a peripheral device and check or re place the module which corres ponds to the data l O head number Or monitor special registers D9116 to D9123 using a peripheral device and check or replace the modules if corresponding data bit is 1 1 Check the FUSE BLOWN indica tor LED on the output module and replace the fuse 2 Read detailed error code using a peripheral device and replace the fuse of the output module which corresponds to the data VO head number Or monitor special registers D9100 to D9107 using a peripheral device and replace the fuse of the output module of which corresponding data bit is 1 Since it is a hardware error of special function module CPU mod ule or base module replace and check
179. tion after instruction execution 2 The CR2 instruction is used to display repeatedly on a horizontal line a pair of characters which make one complete figure 3 The head I O number of the AD57 S1 AD58 designated by Q should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at m 6 97 1B NA 6625 MELSEC AE 4 The character codes designated by GD and GD can be set within the range of 00 to 3FF If code 400 or higher is designated an error occurs amp AD57 S1 AD58 CONTROL INSTRUCTIONS 5 The character code designated by GD corresponds to the left half of each pair and the character code designated by 2 corresponds to the right half of each pair 6 The number of characters designated by G3 corresponds to the number of pairs of characters which are designated by D and 2 and can be set within the range of 1 to 40 Example p Character designated by GD ects designated by GD 7 If the range of the number of characters designated by GD beginning with the cursor position exceeds the last column on a line the excess range of characters laps around to column 0 on the next line If the designated range exceeds the last column of the last line on the screen characters up to the last column on the last line are displayed The excess characters are ignored Ci ua VV V Cursor position G2 O 3 Cursor position WW
180. to switch the method of processing 1 Batch clear M9066 is OFF Data of the VRAM areas being displayed is cleared in batch The scan time in which batch clear processing is performed accordingly becomes longer than that in which batch clear processing is not performed 2 Split clear M9066 is ON Data of the VRAM areas being displayed is cleared by 100 words per scan The scan time is not lengthened so much by the clear processing operation However the split clear operation requires more proces sing time than the batch clear operation Number of scans required for transmission processing In the CRT standard mode oes 16 scans In the CRT enlarged mode ns 4 scans In the LCD mode ev ase BV Re DEVI a 8 Lac 87 4787 97 1 8 scans Special relay M9065 is turned ON when the split clear operation is started and turned OFF when it is completed Split clear start Split clear complete POINT 1 During the split clear operation execution of other instructions cannot be accepted by the AD57 S1 AD58 of which VRAM area data is being cleared Also execution of the following instructions cannot be accepted by other AD57 S1 AD58 modules CPS1 instruction CMOV instruction CLS instruction CLV instruction 2 The LEDB instruction cannot be used when the split clear operation is performed The clear command conditional contact and M9066 should be held at ON during the split clear operation 4 After execution of the CLS i
181. to the operation panel and 24 VDC line Check the operation panel Create the character display program in the AZACPU S1 A3ACPU Confirm that canvas screen and charac ters designated are correctly displayed by running the display program Refer to the SW1GP AD57P Operating Manual Install the character generator ROM and canvas ROM to the AD57 S1 AD58 Refer to the SW1GP AD57P Operating Manual Refer to Section 3 2 IB NA 66257 A 3 PROGRAMMING PROCEDURE 3 2 Programming Procedure This section describes the procedure to create the program to display the canvas screen and the characters on the display unit connected to the AD57 S1 AD58 using the AD57 control instruc tions Creation procedure Setting display mode Set the display mode using the CMODE instruction Clearing the screen and VRAM Clear the screen and the VRAM area using the CLS and CLV instructions Displaying canvas screen Transmit the canvas screen data in the canvas ROM to the VRAM area using the CPS1 and CMOV instructions Cursor control Control the cursor on the screen using the following in structions LOCATE COFF CON1 CON2 Setting display character color Use the COLOR instruction to designate the color of the char acters to be displayed Normal reverse characters display of Designated normal reverse display mode of characters us ing the CREV and CNOR in structions
182. to the last column on the last line are displayed The excess characters are ignored Cursor position rt oo oon T M b15 bo A ABC DE Cursor position E gt NEM DE are ignored 6 After execution of the EPR instruction conditions of the display become as follows Cursor line position Cursor column position Head VRAM address displayed Normal reverse designation Color designation Display mode no change Plus one line if the designated range Current cursor position plus desig Cursor display exceeds the last column nated number of characters no change 18 NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION The EPR instruction is executed every scan while the store command is ON when the LEDA instruction is used It is executed only once at the leading edge of the store command signal when the LEDB instruction is used END processing Step 0 execution execution END Step 0 Sequence program flow CO on EDL ON Store command SFF ee oe ee cT EPR with LEDA l l EPR with LEDB OPERATION ERROR In the following cases an operation error occurs and an error flag M9011 is set Besoieuiak Error Code Code 00 is not provided between the device number designated by and the last device number of corresponding device The number of characters to be disp
183. tors designated by fetes eee ee is 0 or a negative value The range of the number of characters designated by GD beginning with ttre S Hovice number designated by 39 exceeds the last device number of corresponding device The range of the number of characters designated by 2 beginning with the VRAM area address desig nated by GD exceeds address 7679 PROGRAM EXAMPLE The following is an example of the program used to store characters which correspond to character codes 100H to 105H beginning with address 1000 in the VRAM areas of the AD57 loaded at X YOCO to OFF Characters are stored in the VRAM areas by turning on X000 M9836 Da Di b2 Setting of characters to be pro 03 cessed D4 D5 X888 N9065 H 888C K H 1188 Designation of addresses 1100 to K 1105 for 6 characters in the VRAM areas Da Head of the devices in which char acters are stored The character codes which correspond to the characters to be stored are stored in DO to D5 By setting the head of the VRAM addresses to be displayed at address 1000 or before by use of the CPS2 instruction the character store operation can be monitored on the display unit VRAM areas IB NA 66257 IE IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS MEL SECA 6 5 8 Store of designated characters up to code 00 in the VRAM areas EPRV Usabie devices s oe ees x15 e XIYIMIL S B FT IC DJWIR A AZ ivi M P I
184. transmission 1 Batch transmission M9066 is OFF Data of designated canvas screen is transmitted in batch to the VRAM areas The scan time in which batch transmission is performed accordingly becomes longer than that in which transmis sion is not performed 2 Split transmission M9066 is ON Data of designated canvas screen is transmitted by 100 words per scan Scan time is not lengthened so much by the transmission operation However the split transmission operation requires more processing time than the batch transmission operation Number of scans required for transmission processing In the CRT standard mode o 16 scans In the CRT enlarged mode 4 scans In the LCD mode Vae ew TREATS NI eere Te E T 8 scans 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS Special relay M9065 is turned ON when split transmission is started and turned OFF when it is completed Split transmission start Split transmission complete 1 During split transmission execution of other instruc tions cannot be accepted by the AD57 S1 AD58 to which screen data is being transmitted Also execution of the following instructions cannot be accepted by other AD57 S1 AD58 CPS1 instruction CMOV instruction CLS instruction CLV instruction 2 The LEDB instruction cannot be used when split transmission is performed Display command conditional contact and M9066 should be held at ON during split transmission
185. ursor position for the number of pairs of characters designated by 3 Number of characters G9 SD Cursor position after instruction execution 2 Character coda Cursor position before instruction execution 2 The CC2 instruction is used to display vertically pairs of characters Each pair makes one complete figure 3 The head I O number of the AD57 S1 AD58 designated by n should be upper 2 digits of 3 hexadecimal digits Example If the AD57 S1 AD58 is assigned to X Y120 to 13F set 12 at 6 104 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS 4 The character codes designated by GD andi GD aan be sat within the range of 00 to 3FF If code 400 or higher is designated an error occurs 5 The character code designated by 7 corresponds to the left half of each pair and the character code designated by 2 corresponds to the right half of each pair 6 The number of characters designated by 3 can be s cwitHin the range of 1 to 20 jen 7 If the range of the number of characters designated by 2 beginning with the cursor position exceeds line 0 only the characters from the cursor position to line 0 are displayed The excess characters are ignored ignored CHEE ire 2 a G s Cursor position 8 After execution of the CC2 instruction conditions of the display become as follows Item Condition Display mode no change Current
186. w 7 White 7 After execution of the PUT instruction conditions of the display become as follows no change 6 140 IB NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS EXECUTION CONDITION PUT with LEDA PUT with LEDB OPERATION ERROR The PUT instruction is executed every scan while the write command is ON when the LEDA instruction is used It is executed only once at the leading edge of the write command signal when the LEDB instruction is used execution execution Instruction execution Instruction execution execution processing END END MELSEC AA In the following cases an operation error occurs and an error flag n 1 is set MEE The VRAM area address designated by EA ee acr cos nine y oD cue re TE is out of the range of 1 to EA ee acr cos nine y oD cue re TE The number of characters designated by The number of characters designated by S2 is 0 or a negative value is 0 or a negative value The range of the number of data designated by 2 beginning with the VRAM area address designated by exceeds address 7679 The range of the number of data designated by ics utar qaad sy eran een da Pe beginning with the device number designated by ics utar qaad sy eran een da Pe exceeds the last device number of corresponding device 6 141 IB NA 66257 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE The fol
187. y command is ON when the LEDA instruction is used It is executed only once at the leading edge of the display command signal when the LEDB instruction is used Instruction execution 9 o uu lt Q o 3 3 D 3 a oo pz CINHP with LEDA l CINHP with LEDB 6 112 1B NA 66257 A 6 AD57 S1 AD58 CONTROL INSTRUCTIONS PROGRAM EXAMPLE In the following case an operation error occurs and an error flag M9011 is set The number of display columns designated by S is out of the range of 1 to 16 The following is an example of the program used to display a hyphen on a display unit connected to the AD57 loaded at X YOCO to OFF A hyphen is displayed by turning on XOES8 The position of display is designated at columns 45 to 50 on line 5 a X888 49865 H GELIN k Cursor movement by the LO CATE instruction Section K 6 3 3 38 LEDR KOES M9865 25 H geac f The number of display columns is designated at 5 LEDR The CINHP instruction is used for data entry together with other instructions such as CINMP CINPT CIN alphanumerics CINSP CINCLR and INPUT Refer to Section 7 3 for details By execution of the CINHP instruction a hyphen is displayed at the cursor position and the characters within the designated range are shifted one column to the left Display unit Designated display columns 5 Display of a hyphen I Cursor position te
Download Pdf Manuals
Related Search
Related Contents
Magnadyne M10 Automobile Alarm User Manual PUENTE LCR MODELO: MX-1010 Copyright © All rights reserved.
Failed to retrieve file