Download a2a(s1)/a3acpu(ad57 instructions manual)

Transcript
REVISIONS
Print Date
Oct., 1990
%The manual number is given on the bottom left
Revision
'ManualNumber
I6 (NA) 66257-A
First edition
of the back cover.
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.
c
i
i
i
t
1
6.1
6.2
6.3
.
6.4
IB (NAI 66257-A
.
.
.
.
. . .
.........
,
..
.__.----
.
.
6.5
6.6
6.7
..........................................
6.8
..........................................
6.9
..........................................
..........................................
INPUT) ...............................
..........................................
6.10
I
.
..........................................
7 , APPLlCATlON PROGRAM EXAMPLES .............................................................
APPENDIX
..................................................................................................
6-125
6-128
6-1 29
6-1 33
6- 34
1
6-1 39
6-144
6- 145
7-1-7-1 8
APP-1 -APP-2
IB iNAt 66257-A
;
.
1. INTRODUCTION
1. INTRODUCTION
This manual describes sequence program instructions used to
control
the
AD57(SI)/AD88 CRT/LCD controllers with an
MACPU(S1) or A3ACPU.
Because the AUCPU(S1)and A3ACPU support the instructionsto
be used for the AD57(Sl)/AD58 as standard instructions, these
CPUs can use the AD57(Sl)/AD58 without merging microcomputer program packages for the AD57.
POINT ]
(1) An AD57S2 monitor display controller cannot be used
with an AZACPU(Sl)/A3ACPU.
(2) To control an AD!57(Sl)/AD58, create the canvas ROM
and character generator ROM using theSWlGPAD57P system floppy disk andinstalltheminthe
AD57(Sl)/AD58.
For the procedure to createa
canvas ROM and
character generator ROM, refer to the SWlGP-AD57P
OperatingManual.
When controlling
the
AD57(Sl)/AD58, use character string
processing instructions described in the A2A(Sl)/ASACPU Programming Manual (Dedicated Instructions). This allows displaying
of data on the screen, readingstoring 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 ProgrammingManual(Fundamentals) [IB(NA)-662491
ACPU ProgrammingManual(CommonInstructions)[IB(NA)662501
A2A(Sl)/A3ACPUProgrammingManual
(PID ControlInstructions) [IB(NA)-66258]
Referfollowing
theto
manuals
when
using
the
A2ACPU(S1 )/A3ACPU.
A2ACPU(S1 )/A3ACPU User'sManual (Hardware) [IB(NA)-66255]
MACPU(S1)/A3ACPU User's Manual
(Control
Functions)
[IB(NA)-66256]
SW4GP-GPPA OperatingManual [IB(NA)-66259]
1-1
IB (NAI 882574
1. INTRODUCTION
(1) The screen displaydatastored
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
AD.58
AD5741
n
"
400
800
I
1200
I
1600
I
2000
I
2400
I
2800
I
3200
I
3600
I
4000
!
4400
I
4800
I
5200
I
5600
Standard
display mode
1 '
7
7
1
4 7 r l
Display data 1
Display data 3
I
7600
I
7679
Display data 2
Display data 4
Display data 3
Display data 6
Display data 2
Display data 8
I
Disolav data 9
Display data 4
I
Display data 10
Display data 3
Display data 11
Display data 4
I
Display data 15
3
Disolav data 17
(Vacant)
I
I
Display data 7
Display data16
I
Display data 5
Display data 6
Display data 12
I
6000
I
6400
I
6800
I
7200
Enlarged
display mode
Display data 8
1
Display data 19
(Vacant)
I
Display data 9
(Vacant)
'
'
I
I
In the "vacant" areas shown above, it is not possible to
store the data to be displayed. However, users canuse
these areas.
To store the display data in the VRAM area, use the AD57
control instructions such as the CPSl and CMOV instructions.
Use the CPS2 instruction (AD57 controlinstruction)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 displayhead address.
When the AD57 is used, standard mode display data and
enlarged mode display data
can be storedat random in the
VRAM area as illustratedbelow.
VRAMarea
Enlarged mode display data
1999
2000
I
3599
3600
I
Standard mode display data
I Enlarged modedisplay
1-3
data
I
. IB INN 862574
1. INTRODUCTION
(2) Correspondence between the VRAM area addresses and the
dispby position in the display unit is shown below.
At VRAM area addresses, character codes of the characters to
be displayed are stored.
A: The head address of the VRAM
area displayed in the display unit
IStandard
(
mode
Line
79
0
2
A+O Ai-2Ai-1
Ai-80
1
-
78
-
77
..............................................
Ai-82
Ai-81
,
Ai-160
2 Ai-161
Ai-162
.............................................
.............................................
AS77
Ai-78
Ai-79
Ai-157Ai-158Ai-159
Ai-237Ai-238Ai-239
I
18
19
I
............................................
At1440
At1441
At1442
..............................................
At1520
At1521
At1522
1 Enlarged mode I
\
Column
\\
Line
0
1
2
I
8
At399
At398
At397
9
At361
At362
12Line
I
............................................
............................................
............................................
At360
79
1
5
78
77
............................................
............................................
............................................
I
(
8
At640
At641
At642
9
At720
At721
At722
.............................................
A+717
At718
At719
At797
At798
At799
1-4
IB (NA) 66257-A
I
2. SYSTEM CONFIGURATION FOR CONTROLLING AD57(S1)/AD58
2 SYSTEM CONffiURAllON FOR CONTROLLING AD57(Sl)/AD58
This chapter describes the configuration of the systemused to
control the AD57(S1 )/AD58 with the A2ACPU(S1)/A3ACPU.
ji=
APACPU-SI
Mainbase
module
.....................
A32B
A35B
A38B
TT
"11
Color CRT
Plasma
I
I
u
controller
.........................
cable
n
Extension
basemodule
piG6-l
(AD571
Monochrome
, : ; ;A
(AD581
/I
.........................
generatodcanvas
.........................
.......................
SWlGP-AD57P
L- I
I6 [NA! 66257-A
2. SYSTEM CONFIGURATION FOR CONTROLLING AD57(S1)/AD58
(1) The number of AD57(SI)/AD58 modules that can be used with
one A2ACPU(Sl)/A3ACPU varies depending on the number of
the following modules.
AD59(S1)
AJ71C24(S3)
*AJ71C21(Sl)
AJ71PT32(S3)
Use thefollowingformulato
AD57(Sl)/AD58.
1344
1 Usable AD5761)/AD58 1 =
-
calculate thenumberof
+
+
(5 X (Used number of AD59(S1))
10 X (Loaded numberof AJ71C24(S3))
i29 X (Loaded number of AJ71C21(Sl))
125 X (Loaded number of AJ71PT32(S3)))
8
usable
4
[units]
i
Example: Assume that the following number of devices is used.
AD59 .........................
3 units
~ ~ 7 1 ~ 2 ...............
4 4 3
5 units
AJ71PT3243 ............. 2 units
1 The
number of usable AD57(Sl)/AD58 1
8
= 56.625 .......... 56 units
- - - - - - - - - - -- - - - - - -.l Although
the
above indicated
number
IS
I obtained as theresultof
calculation, actual
I number of loadable AD57(Sl)/AD58 is limited
I to
thefollowing
number due to the I/O
numberofthe
PC Pus.
I
A2ACPU ...................................
8units
I
A2ACPU-Sl ............................
I
16units
, A3ACPU ................................. 32
units
'
L
- - - - - - _ _ _ _ - - - - - - - - -
,
1
I
I
I
II
I
-J
(2) To controlAD57(Sl)/AD58,
create the canvasROM
and
character generator ROM using the SWlGP-AD57P system FD
and install these Ross in AD57(S1)/AD58. Forthe procedure to
create the canvas ROM and character generator ROM, refer to
the SW1GP-AD57P Operating Manual.
zi
(3) An extension base module cannot be connected to an A32B
main base module.
6-6
IB INAI 66257-A
'
#'
i
3. PROGRAMMING PROCEDURE
3. PROGRAMMING PROCEDURE
This chapter describes the setting and programming procedure to
display characters in the display unit connected to the AD57(S1)/
ADS.
3.1 Displaying Procedure
This section describes the procedure to display characters on the
displayunit.
Start
Create the canvasROM
generator ROM.
I
andcharacter
Refer to
the
AD57(Sl)/AD58
Manual.
I
.,.,.., Refer
tothe
SWlGP-AD57P
OperatingManual
User’s
*
Load the AD5761 )/AD58 to a base module.Connectthe
CRT, plasmadisplay
unit,or
LCD. Connect wiring to the
operationpaneland 24 VDC line.
.
Install the character generator
and canvasROM tothe
AD57(Sl)/AD58.
... ROM
I
....... Refer
to the SWlGP-AD57P
OperatingManual.
Check the operation panel
I
Create thecharacterdisplay
the A2ACPU(Sl)/A3ACPU.
i
program in
Confirm that canvas screen and charactersdesignated are correctlydisplayed
by runningthedisplayprogram.
T
End
I
....,.. Refer to Section 3.2.
/ibf&&SEC-A
A
3. PROGRAMMING PROCEDURE
ROCEDURE
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(Sl)/AD58 using the AD57 control instructions.
Creationprocedure
Settingdisplay
4
mode*
..............................................
Set the display mode using the
CMODE instruction.
c
Clearing the screen and VRAM
area
...............................................
Clear the screen and the
VRAM
area usingthe CLS and CLV
instructions.
c
Displaying canvasscreen
.............................................
Transmit
the
canvas
screen
data in the canvas ROM to the
VRAM area using theCPS1 and
CMOV instructions.
Cursor control
+
...............................................
Control
the
cursor
on
the
screen using the following instructions
LOCATE,COFF,CON1,CON2
...... After turningonthepoweror
when the canvas screen is to be
transmitted,thecursor
is setat
column 0 on line 0; cursor is not
displayed.
c
Setting display character color
..............................................
.....a
Use the COLOR instruction to
designate the color of the char-
Normal/reverse
display
of
characters
...............................................
Designated
normalheverse
display mode of characters usingthe CREV and CNOR instructions.
When thepower
is turnedon,
black is set.
When to
transmit
the
canvas
screen, white is set.
...... The normal displaymode is set
when the power is turned
when to transmit
the
screen.
on or
canvas
I
Displayingcharacters
Use the following instructions
to display Characters.
PRN, PR, EPRN, EPR, CR1, CR2.
CC1,CC2,CIN
Displaying
present
value
of
word devices
1
- .
Display the present value ofPC
CPU word devicesusingthe
AD57 control instruction, ASC,
andthe
following dedicated
instructions.
BINDA,
DBINDA,
BINHA,
DBINHA, BCDDA,
DBCDDA,
STR,DSTR
4
Displaying device comments
...............................................
Displaythedevicecomments
entered tothe PC CPU using
the AD57 controlinstruction,
ASC, and
the
dedicated
instruction, COMRD.
1
3-2
IB iNAl 66257-A
i
3. PROGRAMMING PROCEDURE
* When module name entry isexecuted in parameter sstting, it is
not necessary to set thedisplay
modewiththe
CMODE
instruction.
The following mode is automatically set when the PC CPU state
is changed from STOP to RUN.
For detailsof
module nameentry
SW4GP-GPPA OperatingManual.
3-3
procedure, refer to the
IB INAI 66257-A
3. PROGRAMMING PROCEDURE
3.3 Cacrtirmsi on Writing Programs
Always set the display mode using the
CMODE instruction
when the PC power isturned on, the PC CPU is reset, or when
the;PCCPU RUN/STOP switch position ischanged 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 displaymodeisautomatically
set
when the PCCPU power supply is turned on, the PC CPU is
reset, or when thePC CPU state is changed from STOP to RUN.
If the PCCPU state is changed from STOP to RUN while the
enlarged display mode is set with the AD57, the display will
not be incorrect.
the enlargeddisplay
Correct displayispossiblebysetting
mode while the PC CPU is running.
To execute the canvas display instruction (CPSl), the canvas
transmission instruction (CMOV), the screen clear instruction
(CLS), or the VRAM clear instruction (CLV) in partial processing mode, always take interlock as shown belowso that other
instructions cannot be executed by the same AD57(S1)/AD58.
While a partial processing instructionis
executed, CPS1,
CMOV,CLS, and CLV instructions cannot executed by other
AD57(S1 )/AD58.
If such instructions are executed,correct display is impossible.
SET
M9066
--==li
1LEDA I CLS
+
F
J
same
The
instruction
is
executed
in
every scan
until thepartial processingis completed.
M9065
I
..,
!
4
J
I
I
Holding coil
M9065
3
*
+
Provide an interlock with MW65 so thatotherinstructionscannot
be executed while partialprocessing is
executed.
1
I
f
8
i
I
1
I 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
executedforsuchinstructions,theinstructionisprocessedinseveralscans.
Therefore,processingtimeperscancanbeshortened.
3-4
IB (NA) 66257-A
1
;
1
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
4. AD!57(Sl)/AD58 CONTROL INSTRUCTIONS
. .
This chapter describes the dedicated instructions used by the
A2ACPU(S1
)/A3ACPU
to control AD5761 )/AD58.
4.1 ' Classifitation of Instructions
The dedicated instructions used to controlAD57(Sl)/AD58 are
largely classified into the following instruction
groups.
Description
Category
(visible/invisible)
Display mode setting
instruction
Sets thedisplaymodeaccording
connected to AD5761)/AD=.
Display screen
controlinstructions
Execute the following:
Clearing screenand VRAM area, display and transmission of canvas screen, changing display address, and
controlling the displaysuch as scrolling
Cursor control
Instructions
Control
cursor;
cursor
movement,
cursor
display
Display condition
settinginstructions
Set the conditions to display characters; designation
charactercolor,normallreversedisplay,
etc.
Designated
character
display
. . instructions
Fixedcharacter
display instructions
Designated
column
clear
instruction
1
to thedisplay
unit
Display the designated characters
I
I
1
I
I
Display the predetermined characters; alphanumerics,
minudhyphen, periodldecirnalpoint, etc.)
Clears thedesignatedcolumn
onthe
screen.
code conversioninstruction
Converts the ASCII characters displayed on the screen
into theASCII codes and storesthem in thedesignated
devices.
VRAM data read/
writeinstructions
Reads the designated datain VRAM area to store it into
devices, or writes the datastored in devices to the
VRAM area.
Displaystateread
instruction
Reads the screen display state (VRAM display
address,
cursor state,etc.)
I
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
4.2 How to Read Instruction Lists
Displays the designated canvas screen. @ :
Head UO number
Canvas
screen
dioplay
VRAM
display
address
change
CPSl
jc
-
Sets the address of the VRAM area to be
di ayed
Head UO number
8:
-7-
n/s
ILEDA)
0..... Category of the instructions
0...*.Symbols to be used in writing
(LEDB)
2o
a sequence program
@ ..... Format of an instruction to be used in writinga ladder of a
sequence program.
Instruction to be used
1v
Conditionalcontact
LEDA/LEDB~COLOR
,
Indicates the beginning of AD571Sl)/AD58
controlinstruction
Designatesthedatausedforoperation
... and the devices where the operation result
is stored
I
Indicates the end of AD57(Sl)/AD58 controlinstruction
For details, refer to Chapter 5.
@ ..... Details of instruction processing contents
Indicates
16-bit data
Llndicates the four consecutive device numbers, beginning with the device numberdesignated by 0.
Indicates
16-bit data
Llndicates the four consecutive device numbers, beginning with the device numberdesignatedby @.
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
@ ..... Instruction execution timing
(LEDA) (LEDB)
t
t l n d i c a t e s the
four
consecutive
device
numbers,
beginnumber designatedby (Dho execute
I
Indicates the four consecutive device numbers, beginnumber designatedby (D1.o execute
Execution timing
Symbol
rL.
@
e . . . .
An instruction is executed every scan while the condition to execute the instruction is satisfied (ON).
Aninstructionisexecutedonlyonce
at theleading
edge (OFF to ON) of the instruction execution condi-
The number of steps
Depending on the devices to be used, the number of steps
actuallyrequired
might become larger thanthestep
numberindicated here.
For details, refer to Section 5.2.
0
A circle in this column shows that an index register (Z, V)
can be used forthe devices or constants used by an
instruction.
@
A circle in this column shows that subset processing is
possible.
* e . * .
e * . * -
@ *...-Shows the manual page in which detailed description of the
instructionisgiven.
4-3
IB (NAI 66257-A
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
4.3 AD57(Sl)/AD58 Control Inmuction Lists
(1) Display mode setting instruction
Condition
Display
mode
setting
I
d%I
Sets the display mode.
0 : Head VO number
@ : Display mode setting code
0 .... Color CRT, standarddisplay'
mode(AD57)
1 ....Enlarged display mode (AD57)
(LEDA)
2 .... LCD mode (ADS)
3 .... Monochrome CRT, standard
displaymode(AD57)
5 .... Color CRT, standarddisplay
mode1AD57-Sl)
CMODE
(LEDB)
2o
(2) Display screen control instructions
Processing
>isplays the designated canvas screen. @ :
4ead VO number
y.7IsI-
Canvas
screen
display
CPSI
of the VRAMarea
iis layed
Head VO number
8:
CMOV
LEDC/SUB
0
LEDOSUB
@
CIS
rransmitsthedesignatedcanvasscreen
to
he designated address in the VRAMarea
0 : Head VO number
n/s
h a r s the screendisplayed
rnit.
@ : Head 110 number
(LEDB)
2o
n/s
(LEDB)
23
6-10
6-14
in thedisplay
ADsIISlVbLX4
CLS
6-19
LEDR
LEDA)
(LEDB)
8
c LV
66
I
LEDA)
h a r s thedesignatedsize
of VRAMarea
)e inning with thedesignatedaddress
: Head VO number
RAM clear
2o
I
LEDA)
LEDMLEDB
Screen
clear
to be
cPs2
LEDlVLeDB CMOV
Canvas
ansmission
n/./
I
LEDA)' (LEDB)
jets theaddress
VRAM
display
address
change
f
n/!
I r-I
yu Ir".
n/s
LEDA)
(LEDB)
I
4-4
1
23
6-23
1
IB (NAJ€6257-A
q
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
R d n g
Condition
n c r e m VRAM area displsy address by one
ine and scrolls the displsy up by one line.
0:
Head VO number
CSCRU
n/_f
(LEDA)
Scroll
up/down
(LEDB)
3ecreases VRAM areadisplay address by one
ine and scrolls the display down by one line.
0:
Head VO number
n/s
CSCRD
627
(LEDA)
(LEDB)
(3) Cursor controlinstructions
Processing
Displaysthecursorhavingone-character
size.
0:
Head I/O number
CON1
I
632
(LEDA)
(LEDB)
Cursor
display
Displaysthecursorhavingtwo-character
swe.
0:
Head VO number
CON2
632
(LEDA)
(LEDB)
Deleting
cursor
Deletes the cursor on the screen.
8 :Heed VO number
COFF
635
(LEDA)
(LEDB)
l
Cursor
position
setting
Moves the cursor to the designated position
on the screen.
8 :Head VO number
LOCATE
n
/
'
(LEDA)
(LEDB)
637
23
(4) Display conditionsettinginstructions
Processing
Sets the normal display of characters.
0:
Head VO number
CNOR
Normal/
reverse
display of
characters
I n / r l I I -1Condition
17
0
~
(LEDA)
(LEDB)
LEDNLEDB C R N
CREV
I'
-
Sets the reverse display of characters.
0:
Heed VO number
(LEDA)
(LEDB)
4-5
IB lNAl 66257-A
1
' ,
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
-v
. .
hr.rotbn
p
Roguing
~
~twngeenormrVreversedisplaymode
for
he designated number of charactem beginiin with the cursor-located character.
Head VO number
6:
CRDSP
n/s
(LEDA)
(LEDB)
2o
I
Changing
normaV
reverse
display of
Characters
:hanges normaVreversedisplaymode
for
he designated number of characters beginling with thedesignatedaddress
in the
/RAM area.
8 : Head VO number
CRDSPV
I
nlflI
(LEDA)
(LEDB)
23
jets the color of characters to be displayed.
0:
Head VO number
@ : Color code
Character
color
lerignatior
COLOR
:hanges the color of the designated number
If charactersbeginning
with thecursorocatedcharacter.
0:
Head VO number
SUB
I R
CCDSP
Changing
character
color
zhanges the color of the designated number
characters
)f
beginning
with designated
d d m in the VRAMarea.
0:
Head VO number
CCDSW
I
n./.
26
(LEDA)
(LEDB)
,
_..
4-6
.I
IB lNAl €6257-A
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
Condition
Format
Dispbyr the designatednumber of designated charactersto the right beginning from
thecursorpo8ition.
8:Head VO number
(LEDA)
(LEDB)
Displays the designated number
of the designated two different characters in pairs to the
right beginning from the cursor position.
@ : Head VO number
0
CR2
,
V
I
LEDWSUBI
:ontinuous
jisplay of
thesame
haracteds)
of desigDisplaysthedesignatednumber
nated characters downward beginning from
the cursor position.
@ : Head VO number
0
CCl
Displays the designated number
of the desig.
nated two different characters in pairs down.
ward beginning from the cursor position.
@ : Head VO number
cc2
0
(LEDA) (LEDB)
-(6) Fixed character display instructions
*
WII
ro0,s.e
Format
I
"_"
(minus
symbol)
display
1
I
Displaysthe "-" (minus symbol) at the
position left to thecursor position bythe
designated number of columns.
@ : Head VO number
CINMP
8 Nummoid
6-1 08
mum
(LEDA)
(LEDB)
I
n
C
u
m eQCk.7
I
1
Displays the "-" (hyphen) at the cursor posi-
display
n/s
(LEDA)
(LEDB)
4-9
20
6-111
IB (NAI 662574
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
Condition
".
(PeiOd)
display
Display of
number
ClNPT
LEDA)
(LEDBI
ClNO
to
CIN9
*1: ClNO
ClNl
CIN2
CIN3
CIN4
CIN5
CIN6
CIN7
CINE
CIN9
LEDA)
(LEDBI
Xsplsysthealphabetcorresponding
nstruction at the cursor position.
0 : Head VO number
'1: CINA
Display of
alphabet
UNA
to
CtNZ
CIN B
CtN C
CIND
CIN E
CIN F
CIN G
CIN H
CIN I
CIN J
CIN K
CIN L
CIN M
CIN N
CIN 0
CIN P
CIN 0
CIN R
CIN S
CIN T
CIN U
CIN W
CIN X
CtN Y
CIN 2
CIN A.............Displays"A",
CIN B .............Displays "6"
CIN C .............Displays "C"
CIN D.............Displays "D"
CIN E .............Displays "E",
CIN F .............Displays "F"
CIN G ............Displays " G " ,
CIN H.............Displays "H"
CIN I..............Displays "I",
CINJ .............Displays "J"
CIN K .............Displays "K",
CIN L .............Displays "L"
CIN M ............Displays "M",
N
I('N
............Displays "N"
CIN 0 ............Displays "0"
CtN p .............Displays "P"
CIN 0 ............Displays "a",
CIN R .............Displays "R"
CIN S .............Displays "S",
CIN T .............Displays "T"
CIN U ............Displays "U",
CIN V .............Displays "V"
CIN W ............Displays "W".
CIN X .............Displays "X"
CIN y .............Displays "Y",
CIN .............Displays "2"
4-10
to an
LEDA)
(LEDB:
I6 lNAl 662574
,
I
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
I
I
I
Condttion
I
lays a " " (space) at the
8:
Head VO number
D
cursor position.
Display of
space
Instruction
name
Processing
Format
Clears the designated number of characters
from thecursor position in the left.
0:
Head I/O number
ClNCLR
( 8 ) ASCII code conversioninstruction
Instruction
name
Format
Condition
Processing
2onverts the designated number of charac:em from the cursor position in the left into
:he ASCII codeandstoresthedesignated
jevice.
0:
Head I/O number
I
ASCII code
conversion
w
6-121
(LEDA)
(LEDB)
(7) Designated column clear instruction
Designated
column
-
- S ~ r4S w
d
INPUT
LEDC
1 (LEDA)(LEDB)
4. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(9) , VRAM ..data. ,readwrite instruct_iqns
Format
Processing
Condition
bads the screen datain the designated
m g e of theVRAM area tothedesignated
jevices.
8 : Head VO number
Read
'RAMdata
GET
LEDA)
(LEDB)
Nrkes the character data stored in thedesig
rated devicesby the designated words to the
AesignatedVRAMareaaddresses.
0:
Head VO number
Write
RAM data
PUT
LEDA)
(LEDB)
(10) Readingdisplaystate
Format
Promssing
Condition
bads thescreendisplaystateset
AD57(Sl)/AD58.
b15
-
inthe
bo
tion
Read
display
state
STAT
20
[LEDA)
(LEDB
1-word data
4-1 2
IB INN € 6 2 5 7 4
;
'I
P
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.
IB lW 862514
/MELSEC=A
5. USING AD57(SI)/AD58 CONTROL INSTRUCTIONS
5. USING AD57(Sl)/AD58 CONTROL INSTRUCTIONS
This chapter describes how to use the instructions which control
the AD57(S1 )/AD58 with the A2A(S1 )/A3ACPU.
5.1 StatingInstructions
Thissection describes the procedure to state AD57(Sl)/AD58
controlinstructions.
The AD57(Sl)/AD58 control instructionsare stated in combination
with an LEDA,LEDB,LEDC,LEDR,
or SUB instruction.
Statement
in
!
Ladder
Form
:Conditionalcontact)
Statement
Instruction
in
Statinganinstruction
LEDR
l-
LEDA
SUB
Designates the data used
for
operationandthedevices
where the operation result is
stored
LEDC
LEDR
'
i
~
List Form
COLOR
H0004
Dl0
~
Indicates
the
end
of the
AD57(Sl)/AD58
control
instruction
With the format in the instruction
list in Section 4.3 and in the
detaileddescription
ofinstructionsgiven
in Chapter 6, the
instructions are stated in the following format.
Conditional
Instruction
contact
name
LEDC/SUB
I
{ LEDR
5. USING AD57(S1)/AD58 CONTROL INSTRUCTIONS
(1) The LEDA, LEDB, LEDC, LEDR, and SUB instructions, are used
in the following manner.
ILEDNLEDB I Instructionname I .....This indicates
instruction.
the beginning of
ILEDA 1 instruction name 1
scan while the conditional
I LEDB I instruction name]
once at the leading
1-
w
LEDC/SUB
j
I @ ......................
................... ;
................... :
an AD57(S1 )/AD58 control
: An instruction isexecuted every
contact is ON.
: An instruction is executed only
edge of the conditional contact.
These designate the device for setting the data used for an
operation called by an instruction and the device forstoring
theoperationresult.
I LEDCISUB 1 @ I
: This indicates that either LED0 or SUB
can be designated.
1-
nated.
: Thisindicates that only LEDC can be desig-
[m]
:
nated.
Thisindicatesthatonly
SUB can be desig-
The LEDC instructionis used to set a device number.
The SUB instructionis used to set a 16 bit constant.
Setting range is either "-32768 to 32767" or "OOOOH to
FFFFH".
SUB 1 K32767
...................................
(2)
1, ( S U B ( H F F F F 1
This indicates the end of the AD57(Sl)/AD58 control instruction.
In some cases, thisstatement is not necessary.
0,
0,
and @ written with the
LEDC or SUB instruction are
used to designate the following.
@ ........Designates the
head I/O number
of the AD57(Sl)/AD58
(designates the upper 2 digitsin
the expressed 3 digits)
@ ........Desi~natesthe data to be written
or designation value, or the device where either of them is
stored.
@.,.,,.,.Designates the device number
wherethereaddatais
stored.
5. USING AD57(S1)/AD58 CONTROL INSTRUCTIONS
The number of instruction steps increases one when each of the
followim device numbers (devices extended by the , h k C P U ) is
used with the control instructions.
lnteniul'
I
relay
(M,L, SI
2048 to 8191
Timer. r f ) .
256 to 2047
counter f c )
256 to 1023
I
(Dl
register
Data
Linkregister
1024 to 6143
400 t o FFF
(W)
(F)
I
Indexregister
1
(2)
(V)
256to2047Annunciator
I
I
1 to 6
1 to 6
1Example)
When extended devices are not used:
3LEDA I COLOR
4SUB I H04
LEDC
1 Dl00
{
9
Number of steps = 20
k.
LEDR
When extended devices are used:
Number of steps = 20 i1 = 21
t
Increase due to
extended device
LEDR
Extended device
Number of steps = 20 i- 1 i-
i
SUB lH04 2 1
Number of steps = 20
Extended device
Extended device
5-3
A
Increase due to
extended device
Extended device
Extended device
1 = 22
Increase due to
extended device
(21)
+ 31 i- 1i = 22
I '
L
Increase due to
extended device
(D3000 22)
Increase due to
extended device
(211
IB INN 882574
,4
5. USING AD57(S1)/AD58 CONTROL INSTRUCTIONS
5.3 Cautions on UsingDedicated Instructions
(1) An AD57(Sl)/AD58 control instruction consists of a group of
instructionsbeginning
from LEDNLEDB and ending with
LEDR.
Therefore, if an instruction not conforming to the predetermined format is stated within this range, it causes an error.
An error also occurs if the instruction statement differs from
thepredeterminedformat.
(2) With the AZACPU(Sl)/A3ACPU, device number is not checked
whenindexqualificationiswritten
to increase processing
speed. Notethat device numberis checked onlyforfile
register (R).
Therefore, processing might be executed for devices exceeding the finaldevice 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 causean error.)
*
5-4
IB INN 6 8 2 5 7 4
5. USING AD57(S1)/AD58 CONTROL INSTRUCTIONS
5.4 How To Read Instruction Explanation
.
,
Thissection describes how to read, the detailed explanation of
instructions given in Chapter 6.
( 1 ) The CPSl instruction isused to transmit the canvasscreen
designated by @I to addresses 0 and after in theVRAM areas
and displays it on a
of the AD57(Sl)/AD58 designated by
displaybeing connected.
E,
AD571SlIlAOSB
(21 The head VO number of the AD57iSlVAD58 designated by
@should be upper 2 digits of 3 hexadecimal digits.
Example) If the AD57ElVAD58 is assigned to XN120 to
13F, set "12H" at @.
(3) Thecanvasscreen
number to be designatedby@should
correspond with the canvasscreen number written to the
canvas ROM of designated AD57(Sl)/AD58.
-
EXECUTIONCONDITION
The CPSl instruction isexecuted every scan whilethedisplay
command is ON when the LEDA instruction is used. It is executed
only onceat the leading edge of the display command signal
when the LEDE instruction isused.
Dltpiay command
CPSl lwilh LEOAl
CPSl lwith LEDBl
-C
OPERATIONERROR
5-5
gFF
n
n
n
1 ;
In the case described below, the operation error
error flag (M9011) isset.
n
n
n
occurs and an
IB (NAI 66257-A
/MELSEC
5. USING AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
-PROGRAM
EXAMPLE
The followingis
an example
of
the program used todisplay
canvas screens on the AD57 loaded at W Y O C O to OFF.
When XWO 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.
CPSl
CLEDB
4
I
Designation of batchkplit processing is done by setting M9OMas
follows.
When M9066 is OFF....^^^....'...."^^ Batch processing
When M9066isON..... ' . . . . . . ' . . . . ' Split processing
M9065 is the split processing flag and used to provide interlockso
that other instructions
may
not
tm executed during
split
processing.
MO is used to hold so that the CPSl instruction may be executed
tillsplit processing iscompleted.
0Shows the function of
0A circleindicatesthe
?$
/
an instruction and instruction symbol.
device that can be used withthe
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 circleindicatesthatthe
subset processing is possible.
@ A circleindicatesthatindexqualification
(Z, V) is possible.
0A circle indicates that the
ON/OFF state of the carry flag (M9012)
changes according to the result of execution of the instruction.
@ A circleindicatesthattheerrorflag(M9011)
is set if an
operationerror occurs.
0 to @ above. If an
@This indicatesprecautionsconcerning
asterisk (*) is given, always read theprecaution.
0 This indicates the format of the instruction stated using ladder
diagram.
0This explains the details of the instruction.
@ This indicates the instruction execution
timing.
@This indicates conditions causing an operation error and the
error code of the operation error.
@ A program example in which the instruction is used is shown
usingladderdiagram.
5-6
IB (NA) 662574
.... .........
I6 INAI €8257-A
6. AjD52($1)lAW CONTROL INSTRUCTIONS
/MELSEC
6. AD57(Sl)/AD58 CONTROL INSTRUCTIONS
This section describes details of instructions used to control the
AD5761 )/AD58.
6.1 Display Mode SettingInstruction
The display mode setting instruction is
used to execute display
mode setting of the AD57(Sl)/AD58 according to the type of the
displaybeing connected.
By executionofdisplaymode
setting, theAD57(Sl)/AD58 can
display characters. Correct display of characters is not available
without properdisplaymodesetting.
Ifmoduletypesetting
has been doneby parameter setting,
displaymodesetting
is not necessary.
When the PC CPU is switched from STOP to RUN, the following
displaymodes are automatically set.
When AD57 is set .-......“0” (AD57 CRT standard mode)
When AD5741 is set ..*.‘‘5’‘ (AD57-S1 CRT standard mode)
When AD58 is set .......*“2” (LCD mode)
For detail of module type registration, refer to the SW4GP-GPPA
OperatingManual.
Display mode setting isused also to switch display mode between
standard and enlarged for the AD57.
Display mode setting is executed using the instruction mentioned
below.
catwow
Display mode
setting
Instruction
Name
CMODE
6- 1
Description
Sets display mode of the AD57(Sl)/AD58.
between
Switches display mode of the AD57
standard and enlaraed.
IB (NAJ - 5 7 4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.1.1 Display mode setting...-..CMODE
Usawo. devices
- '
b
0
0
,
X
Y
M
-
L
S
Cownt Pdntrr
Word (W-bit) device
Bit device
B
F
T
C
D
W
R
A
O
A
l
Z
V
K
H
P
level
I
N
f
%
p
a -
bp
fa
M9012 M9011
0 0
oc
O O Q O O
'1: The numbe
of steps vanes with type
of.deuik.b used. See Section 5.2.
dode setting command
-i 1:
LEDA : Execution at ON
LEDB : Execution st leading edge
-0
-
I LEOC/SUB .
I
1 LEOR l-
FUNCTION
k
LEDC : Device number
is designated
SUB : Constant is
designated
Setting data
0 I Head I/O number of AD57
1@ I Display mode setting data I
( 1 ) The CMODE instruction is used to set thedisplaymode
designated by @ t o the AD57(Sl)/AD58 designated by 0.
By execution of display mode setting, displayof characters on
thedisplay unit connected to the AD57(Sl)/AD58 becomes
possible.
Corrqct display of characters is not possible without proper
displaymodesetting.
(2) The head VO number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X N 1 2 0 to
13F, set " 1 2 ~ "at 0.
(3) The display mode setting data to be designated by @should
be as follows according to type of module.
0 : Color CRT standard mode ....................... for AD57
1 : Color/monochrome CRT enlarged mode
for AD57
2 : LCD mode ............................................. for AD58
3 : Monochrome CRTstandard mode..........., for AD57
5 : Color CRT standard mode ....................... for AD5741
..
...........
-
.
.' -..-..I(,
. . ,
6-2
IB (NAl 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) If moduletype of A2ACPU(Sl)/A3ACPU is already set by
parameters, the following data is automatically set when the
A2ACPU(Sl)/ASACPU 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 is set
Set "0".
When AD57(S1) is set .... Set "5".
When AD58 is set ......-... Set "2".
.......+..
(5) After execution of the CMODE instruction, conditions of the
display become as follows.
Condition
kern
Display mode
Designated data
Line "0"
Cursor lineposition
Column "0"
Cursor column position
Head VRAM addressdisplayed
Address "0"
Normal/revene designation
(no change)
Color designation
Cursor display
Not displayed
I POINT 1
If the CMODEinstruction isexecuted every scan using the
LEDA instruction, the screen sometimes becomes distorted momentarily. To avoid this problem,
it is recommendedthattheCMODEinstructionbe
executed only
once at the leading edge using the LEDB instruction.
EXECUTION CONDITION
The CMODE instructionis executed every scan while themode
setting command is ON when the LEDA instruction is used. It is
executed only once at theleading edge of themode setting
LEDB instructionis used.
commandsignalwhenthe
Instruction
Instrunion
Instruction
I
I
Sequence program flow
Mode setting command
G
gFF-A
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
OPERATION ERROR
I
II
CMODE (with LEDA)
CMODE (with LEDB)
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Inthe case described below,theoperationerror
error flag (M9011) is set.
occurs and an
Description
The display mode setting data designated by @ is out of the range from
0 to 3 and 5.
Error cod.
Dm08 Daw1
50
503
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXAMPLE
R
R
O
G
E
A
IW
:
I
The fallowing is anexample of the program used to set the CRT
staroQard mode to the AD57 assigned to WOCO to OFF.
Setting is executed when the PC CPU is powered on or reset.
Standard mode is designated.
LEDR
By use of the LED6 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.
r
*
6-4
I6 lNAl66257-A
,
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.
of the
Usingthe display screen control instructions,display
canvasscreen in the canvas ROM, switching of screens and
easily controlled.
scrolling of screencanbe
Display screen control is executed using the instructions mentioned below.
Category
Descdptkn
Reads adesignatedcanvas
screen in the canvas
ROM to addresses 0 and afterin the VRAM areas and
disdavs it on the screen.
Canvasscreen
display
CPSl
V M M display
address change
CPS2
Canvasscreen
transmission
CMOV
Screenclear
CLS
Writes 20H (space code)to the address of the VRAM
areas beingdisplayedand clears the screen.
VRAM areaclear
CLV
Writes 2% (space code)to a designated address and
after in the VRAM areas.
Scroll uwdown
\
Instruction
Name
CSCRU
CSCRD
65
Changes addresses of the VRAM areas displayed on
the screen by one address.
’
Transmits canvasscreens in the ROM to a designatedaddressandafter
in the VRAMareas.
Scrolls u p a screen byoneline.
Scrollsdown a screen by oneline.
IB IM 8 8 2 5 7 4
1
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.2.1 Canvas screen display....-.CPSl
I
"1: The number of steps varies with type of device used. See Section 5.2.
. DisDlav command
LEDA : Execution at ON
LEDB : Execution at leadingedge
LEDC : Device number
is designated
SUB : Constant
is
designated
FUNCTION
Setting data
Head I/O number of AD57
(1) Ttie CPSl instruction is used to transmit the canvasscreen
designated by @ t o addresses 0 and after in theVRAM areas of
theAD57(Sl)/AD58designatedby
0,
anddisplays it on a
displaybeingconnected.
I
Canvas ROM
Canvas
0
VRAMareas
Contents
of canvas
screen
3
I
Capacity of each
canvasscreen
1
Display
unit
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper2digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to
XN120 to
13F, set "12~'' at 0.
(3) Thecanvasscreen
numberto bedesignated by @should
correspondwiththe canvasscreen numberwrittentothe
canvasROM of designatedAD57(Sl)/AD58.
6-6
IB INAI 6 8 2 5 7 4
'
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 transmittedin batch to
the VRAMareas.
Thescan time in which batch transmission is performed
accordingly becomes longer than that in which transmission is not performed.
2) Split transmission (M9066 is ON)
Data of designated canvas screen istransmittedby 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 transmissionoperation.
Numberofscansrequi,red
for transmissionprocegqipg
In theCRTstandard mode .................-.16 scans
In the CRTenlarged mode *.....-............ 4 scans
In the LCD mode ....... .............. ...... . .. 8 scans
Special relay M9065 is turned ON when split transmission is
started, and turned OFF when it is completed.
r
1
Split
transmission
start
Split
transmission
complete
M9065
POINT
OFF
ON
I
1
m
I
(1) During split transmission, execution of other instructions cannot be accepted by the AD57(Sl)/AD58 to
which screen data is being transmitted.
Also, execution ofthe following instructions cannot be
accepted by other AD57(Sl)/AD58.
CPSl instruction, CMOV instruction, CLS instruction,
CLV instruction
(2) The LEDB instructioncannotbe
used whensplit
transmission is performed.
M9066
Displaycommand(conditionalcontact)and
should be held a t ON during split transmission.
of the CPSl instruction,conditions
(5)Afterexecution
display become as follows.
kern
Display mode
Condition
(no change)
Line "0"
Cursor lineposition
Normalheversedesignation
Column "0"
Address "0"
Normal
Color designation
Cursor display
Not displayed
Cursor columnposition
Head VRAM addressdisplayed
.
of the
White
6-7
IB INN €62574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
c
D(ECUll0N CONDITION
The CPSl instructionis executed every scan whilethe display
command is ON when the LEDA instruction is used. It is executed
only once atthe leading edge of the display command signal
when the LEDB instruction is used.
nmwkm
I
-0
program
Sequence
flow
Display command
ON
o
n
I
I
I
CPSl (with LEDA)
C f f i l (with LEDB)
OPERATION ERROR
I
I
END
prmalnp
EW)
IrntnDiOn
exdon
step0
Instruction
exeattion
END
n
I
I
I
Step 0
H
I
.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Instruction
execution
Step END
I
END Stop 0
0
I
I
lnnruction
exmion
n
I
c
I
4
I
I
I
I
I
I
I
I
I
I
I
I
I
I
8
rl
.
I
I
I
In the casedescribed below, the operation error occurs and an
error flag (M9011)is set.
Description
Error coda
-
The canvas screen number designated by @ is out of the range from 1 to
255, orthere is no canvasscreenatawhichcorresponds
with the canvas
screen numberdesianated bv & i n the canvas ROM.
I
1 I I
Woo8 D m 1
50
503
.
/MELS€C-A
6. 6.
AD57(S1)/AD58
A W ( S l ) / A p 5 8CONTROL
CONTROL INSTRUCTIONS
INSTRUCTIW
PROGRAM EXAMPLE
The followingis
an example of theprogram used t o display
canvasscreens on the AD57 loaded at W O C O to OFF.
When X000 is turned ON, canvasscreen No. 1 isdisplayed by
batch processing. WhenX001 is turned ON, canvas screen No. 2 is
displayed by split processing.
1
1
1 p:::
Fc1
Designation
canvas
screen
No. 1
of
Instruction execution by batch
processing
LEDR
[SET
4 9 6 6 6 4 split
Designation
of
canvasscreen of
Designation
No. 2
be65
processing
Instruction execution by
split
processing
LEDR
-46
Designation of batchhplit 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 provideinterlock so
that
other
instructions
may not be executed during
split
processing.
MO is used to hold so that the CPSl instruction may be executed
tillsplit processingiscompleted.
1 !
ABACPU
AD57
Canvas ROM
X1 OFF
VRAM areas
Display
unit
No. 2
Display unit
/
6-9
IB (NAI €6257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
* l : The number of stepsvaries with type of deviceused.SeeSection
command
Chanae
LEDA/LEDB1CPS2H
I
LEDR
FUNCTION
5.2.
LEDA : Execution at ON
LEDB : Executionat leadingedge
LEDC : Device number
is designated
SUB : Constant
is
designated
~ t t i n gd r t ~
Head 110 number of AD57
S
Head VRAM address
wherethe screendata to
be displayed is stored
(1) The CPS2 instruction is used to change the range of VRAM
areas (addresses 0 to 7679) of the AD57(Sl)/AD58 designated
which is to be displayed, to the addresses starting with
by 0,
one designated by @.
AD57(Sl)/AD58
@
VRAM address }
r
1
Display
unit
7679
I
(2) Screen switching time as well as scan time of the sequence
program can beshortened by switching display addresses
using the CPS2 instruction instead of the CPSl instruction.
Before execution of the CPS2 instruction, canvasscreens
should have been transmitted toVRAM areas using the CMOV
instruction.
(3) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set " 1 2 ~ "at 0.
6-10
IB lNAl 66257-A
L
,
/MELSEC
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. Aon(Sl)/AwS CONTROL INSTRUCTLONS
(4) The range of addresses to be displayed varies with preset
displaymode.
CRT standard mode... From (designated address) to (designated address i- 1599)
CRT enlarged mode... From (designated address) to (designated address -k 399)
LCD mode ................From (designated address) to (desig-
nated address i799)
(5) The VRAM address designated by@should be the head
address of the range to be displayed.
The available range of addresses is from 0 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@is automaticallychanged
as mentioned
below so that one screen area is filled with display of data.
CRT standard mode
If 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
address7280.
LCD mode
If addresses starting
Designation
is changed to
....... *
with 6881
are designated
address
6880.
(6)Afterexecution
ofthe CPS2 instruction,conditions
displaybecome as follows.
kern
Condition
Display mode
(no change)
Line "0"
Column "0"
Cursorlineposition
Cursor column position
Head VRAM addressdisplayed
Designatedaddress
Normal
White
NormaVreversedesignation
Colordesignation
Cursordisplay
,
EXECUTIONCONDITION
ofthe
Not displayed
The CPS2 instructionis executed every scan whilethe change
command is ON when the LEDA instruction is used. It is executed
only once at the leading edge of the change command signal
whenthe LEDB instructionis used.
Instrunion
execution
I
Sequence program flow
Change command
ON
OFF
END
Procesrw
instruction
execution
END Step 0
Step 0
I
I
i-l
I
I
I
I
END Step 0
InstruRion
execution
Step
END
,
I
0
Instruction
execution
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
inatwction
execution
END Step 0
,
H
I
I
I
I
I
I
I
CPSP (with LEDA)
CPSP (with LEDB)
6-1 1
I
I
16 INN 6 6 2 5 7 4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
OPERATION 6RROR
Inthe case describedbelow,theoperationerroroccursand
error flag (M9011) is set.
Enor Code
Description
The VRAM area address designated by @is out of the range from 0 to
7679.
PROGRAM EXAMPLE
an
09008
5o
IDSOW
503
The following is an example of theprogram used to change
display addresses of the VRAM areas of the AD57 loaded at
W O C O td OFF.
When X000 is turnedON, display data stored at addresses 3200 to
4799 in the VRAM areas is displayed. When X001 is turned ON,
display data stored a t addresses 4800 to 6399 in theVRAM areas is
displayed.
Transmission of canvas screens
by the CMOV instruction(Section 6.2.3)
Setting of displayaddressesof
I
6-12
IB INAI 6fi257-A
'
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
--
.
In theexample above, canvasscreen No. 3 is transmitted to
addresses 3200 to 4799, and canvasscreen No. 4 to addresses
4800 to 6399, in the VRAM areas by execution of the CMOV
instruction.
A3ACPU
AD57
Canvas ROM
CMOV
instruction
Canvas
No. 3
CMOV
instruction
CPS2
instruction
Canvas
No. 4
VRAM
areas
3200
c
4800
c
6399
X0 is ON
0
X1 is
A
ON
-
Display
unit
,
6-13
18 INN 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
62.3 Canvas screen transmission to VRAM areas-.....CMOV
*l: The number of stepsvaries
Transmission command
with type of device used.See Section 5.2.
LEDA/LEDB
I
: Device number
is designated
: Constant is
designated
I
FUNCTION
,;/
Execution at ON
Execution at leadingedge
CMOV
S2
data
Head I/O number of AD57
Canvas screen number to
be transmitted
Head VRAM address
wherethe screendata t o
bedisplayed is stored
,
(1) The CMOV instruction is used to transmit the canvas screen
to the
I addresses starting with one desigdesignated by @
nated by @ i n the VRAM
areas
of theAD57(Sl)/AD58
designatedby
0.
I
Canvas
screen
I
@ 1 Canvas screen NO.)
VRAMaddresses
a"';
@ I VRAM address
~....
n : Designated address
capacity of canvasscreen
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper2digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20
to
13F, set " 1 2 H " at 0.
6-14
IS INAI 662574
4
/MEiSEC-A
6. AD57(S1)/AD58
CONTROL
'6. &D57($1.)/mO58
.
CONTROLINSTRUCTIONS
INSTRUCTIONS
.A.
.*j
(3) Thecanvasscreen number to be designated by @should
correspondwiththe
canvasscreen number written to the
canvas ROM of designated AD57(S1 )/AD58.
(4) The VRAM address designatedby @shouldbethe
head
address of the areas to be transmitted.
The availablerangeis from 0 to 7679.
The range of addresses where transmitted data is tobe stored
varies with preset display mode of the canvas screen to be
transmitted.
CRT standard mode... From (designated address) to (desig1599)
nated address
CRT enlarged mode... From (designated address) to (designated address
399)
LCD mode ................ From (designated address) to (desig-
+
+
nated address -k 799)
If thearea ranging from a designated address to address 7679
is smaller than the capacity of one canvas screen area to be
transmitted, only thearea starting with the
designated address
to address7679 is transmitted, as mentioned below.
-
VRAM areas
..................Designated address
Transmission
....................................... 7679
Not transmitted
'
I
(5) Thereare 2 ways of transmission of canvasscreens to the
VRAM areas, as mentioned below.Use special relay M9066 to
switch the method of transmission.
Batch transmission (M9066 is OFF)
Data of designated canvas screen is transmitted in batch to
the VRAMareas.
Thescan time in which batch transmission is performed
accordingly becomes longer than that in which transmissionisnotperformed.
Split transmission (M9066 is ON)
Data of designated canvasscreen is transmittedby 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.
Numberof scans required for transmission processing
the
In
CRT standard mode ...................16 scans
In theCRT enlarged mode ................... 4 scans
In the LCD mode ................................
8 scans
i
b
,
1
6-15
IS (NAJ 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
Special reiay M9065 is turned ON when split transmission is
started, and turned OFF when it is completed.
Split
transmission
start
Split
transmission
complete
POINT
I
(1) During split transmission, execution of other instructions cannot be accepted by the AD57(Sl)/AD58 t o
which screen data is being transmitted.
Also, execution of the following instructions cannot be
accepted by other AD57(Sl)/AD58.
CPSl instruction, CMOV instruction, CLS instruction,
CLV instruction
(2) The LEDB instructioncannotbe
used whensplit
transmission is performed.
Display command(conditionalcontact)and
M9066
should be held at ON during split
transmission.
(6) After execution of
the CMOV instruction, conditions
display become as follows.
~~~
~
kern
~
Condition
of the
~
~~~~
_
_
Display mode
Cursor lineposition
Cursor columnposition
(no change)
Head VRAM address displayed
Normal/reverse designation
Color designation
The cursor is not displayedonly
done to the
whentransmissionis
area being displayed on the display
unit.
Cursor display
EXECUTIONCONDITIONThe
CMOV instruction is executed every scan while the transmissioncommandis ON whenthe LEDA instructionis used. It is
executed only once at theleading edge of thetransmission
commandsignalwhenthe
LEDB instruction is used.
Sequence program flow
Transmission command ON
I
I
I
I
CMOV (with LEDA)
I
I
I
I
I
CMOV (with LEDB)
6-1 6
I
I
I
I
I
1
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
IB INAI €6257-A
.J
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
OPERATlON ERROR
In the cases describedbelow,
errorflag (M9011) is set.
theoperationerror
occurs and an
Description
a
a
The canvas screen number designated
by
is outof the rangefrom 1
to 255, or there is no canvas screen data which corresponds with the
canvas screennumberdesignated by @ i n
thecanvas ROM.
The VRAM area address designatedby
7
PROGRAM
EXAMPLE
~
7
~
is out of the range from0 to
~
50
503
The following is
an
example
of theprogram
used to display
canvas screens and to transmit canvas screen data to the VRAM
areas of the AD57 loaded at W O C O to OFF.
Display of canvas screens and transmissionof canvas screen data
are performed when the PC CPU 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
Display of canvas screen No. 1
by the CPSl instruction (Section 6.2.1 I
Designation of split processing
Designation of canvas screen No. 2
Transmission to address 1600 and
after in the VRAM areas
Holdingcoil
I
Cancel of split processing designation
,
C
.
6-17
Used for
changing
display address
VRAM
Switch of screens by the CPSZ
instruction(Section 6.2.2)
I6 (W 8 6 2 5 7 4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
The CPSI instruction-is.used to transmit canvas scm&n data:to
addresses 0 to 1599 in the VRAM areas and to display it on a
display unit.
If the CMQV instruction is used, canvas screen data is transmitted
to the VRAM areas, and it isnotdisplayed on a displayunit.
Inthe
example, the canvasscreen
displayed bytheCPSl
instruction can be switched to the canvas screen, transmitted by
by
execution
of
the
CPS2 instruction.
the CMOV instruction,
X0 ON
X1 ON
Thecanvasscreen displayedbytheCPSlinstruction
again.
is displayed
The canvas screen transmittedbythe
CMOV
instruction is displayed.
fl
+
-
,,e
d:
1
Designati&ri+ofbatchhplit processing at execution of the CPSl and
CMOV iristructions is done by sefting M9066 as follows.
W&n 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 CMOV instruction may be executed
till split processing is completed.
I
ABACPU
AD57
Canvas ROM
-
*
CPSl
instruction
CMOV
instruction
I
CPS2
...-..
.
I
I
Canvas
No. 1
Canvas
No. 2
0
VRAM areas
X0 is ON
*
1600
c
0
I
X1 is ON
3200
1
I
Display
unit
d
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. AD57(Sl)/AD58 CONTROLINSTRUCTIONS
rc
6.2.4 Screen clear......CLS
I
*?: The number of steps varies with type of device used. See Section 5.2.
I
LEDA : Executionat
L€DB : Executionat
ON
leading edge
#
t
4
5
Sating data
I@ I
LEDR
FUNCTION
-
I
, Clear command
Head I/O number of AD57
I
!
(1) The CLS instruction is used to clear the VRAM areas of the
AD57(Sl)/AD58 designated by @to clear the screen.
AD57(Sl)/AD58
VRAM areas
*
I
"20H" (space code)
is written.
(2)Thehead I/O number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimal digits.
Example) If theAD57($1)/AD58' is assigned to X.Yl20 to
13Ffset " 1 2 ~ "at @.
6-19
W
IB (NAJ 6 8 2 5 7 4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3) There are 2 ways of clear of VRAM areas being disp.la.yed,.as
mentioned below. Use speciai relay M W S -to 'Svbitcfi .jhe'
'
method of 'pra'cessing.
1) Batch clear (M9006 is OFF)
Data of theJRAtin 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 mot, 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 muchby the clear
processing operation.
However, the split clear operation requires more processing time than the batch clear operation.
Number of scans required for transmission processing
In theCRT standard mode *............-.....16 scans
4 scans
In the CRT enlarged mode
In the LCD mode ................................
a scans
Special relay M9065 is turned ON whenthesplit
clear
operation is started, and turned OFF when it is completed.
I
r
*+.......-.........
Split clear Split
start
M9065
POINT
ON
OFF
AI ' - -
clear complete
1
I
1
I
(1) During the split clear operation, execution of other
instructions
cannot
be
accepted theby
AD57(Sl)/AD58 of which VRAM area data is being
cleared.
Also, execution ofthe following instructions cannot be
accepted by other AD57(Sl)/AD58 modules.
CPSl instruction, CMOV instruction, CLS instruction,
CLV instruction
(2) The LED6 instruction cannot be used when the split
clear operation is performed.
The clear command (conditional contact) and M9066
should be held atON during the splitclear operation.
(4) Afterexecution
of the CLS instruction,conditions
display become as follows.
Item
Display mode
Cursorlineposition
Cursorcolumnposition
Head VRAM addressdisplayed
Cursor display
of the
Condition
(no change)
Line "0"
Column "0"
(no change)
NormalNormal/revenedesignation
White Color designation
Not displayed
A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXECuTK)N CbNQI'IWN
The CLS instruction is executed every scan while the clear
command is ON when the LEDA instruction is used. It is executed
only on? a$ the leading edge of the clear command signal when
the LEDB instcuctionis used.
Sequence program
flaw
Clear command
:$
I
I
I
I
1i
I
I
I
I
I
I
I
I
I
I
U S (with LEDA)
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
1
I
CLS (with LEDB)
6-21
I
I
I
I
I
I
I
I
I
I
IE INA) €6257-A
i
'a,
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAMEXAMPLE
The followingis an example oftheprogram used to clear data
displayed on a display unit whichis connected to theA057 loaded
at W O C O to OFF.
Data on the screen is cleared by turning on X002.
-
tX002
€LE-DIB
(:lr
LEDR
,49065
CLS
1
'
Display of a canvas Screen by
(Section
the CPS1 instruction
6.2.1)
In the program example above, the CPSl instruction is used to
display canvas screen No. 4 when the PC CPU is turned on or
reset.
AD57
A3ACPU
Canvas ROM
CPSl
instruction
CLS
instruction
b*
~
Canvas
No. 4
201.1(space code) is written
VRAMareas
0
c
__c
1600
-
-r
Display
unit
6-22
IB (NAJ 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
I
'1: Thenumber
of stepsvaries with type of deviceused. See Section 5.2.
I
LEDA : Executionat
LEDB : Executionat
ON
leadingedge
Setting data
LEDC : Device number is
designated
SUB : Constant is
designated
areas
Head address of the
VRAM areas to be cleared
[ LEDA
FUNCTION
Range of VRAM
the
I
(1) The CLV instruction
is
used to clear the VRAM areas
designatedby @starting with the
address designatedby
@ w i t h . respect to the AD57(Sl)/AD58 designated by @.
rG
' LGLz+-Tp+
VRAM areas
-
Ran e to be cleared
I
I
(2) The head I/O number of the AD57(Sl)/AD58 designatedby
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 isassigned to X.Yl20 to
13F, set "12H" at @.
(3) The range to be cleared designated by @ should be set within
therange of "0" to "3" as mentionedbelow.
0,3 or 5.. ....... From (designated address) to (designated
address
1599)
1 ..................From(designated address) to (designated
address
399)
2 ..................From(designated address) to (designated
address
799)
+
+
6-23
18 (NAJ66257-A
.
v
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) The VRAM address designated by @shouldbethe
head
address of the areas to be cleared.
The available range of settingis from 1 to 7679.
If thearea ranging froma designated address to address 7679
only
is smaller than theareas to be cleared designated by
the area starting with thedesignated address to address 7679
is cleared, as mentionedbelow.
m
1
L
7
Designated
address
Range to be cleared
I
a,
Cleared.
...-......
(Ignored.)
.........................
:j
(5) There are 2 ways of clearing of VRAM areas,, as mentioned
below. Use special relay M9066 to switchthemethodof
processing.
1) Batch clear (M9066 is OFF)
Data of designated VRAMareas is cleared in batch.
The scan time in whichbatch clear processing is performed
accordingly becomes longer than that in which batch clear
processingisnotperformed.
2) Split clear (M9066 is ON)
Data of designated VRAM areas is cleared by 100 words per
scan .
The scan time is notlengthened so muchbythe
clear
processingoperation.
However, the split clear operation requires more processing time thanthe batch clear operation.
Number of scans required for transmission processing
the
In
CRT standard mode ...................scans
16
In the CRT enlarged mode ................... 4 scans
In theLCD mode ................................
8 scans
Special relay M9065 isturned
ON whenthesplit
clear
operation is started, and turned OFF when it is completed.
r
1
clear
Split
Split
start
POINT
clear complete
I
(1)During the split clear operation,execution of other
instructions
cannot
be
accepted
by
the
AD57(Sl)/AD58 of which VRAM area data is being
cleared.
Also, execution of the followinginstructions cannotbe
accepted byother AD57(Sl)/AD58 modules.
CPSl 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 I N N 662574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(6) After execution of the CLV instruction, conditionsofthe
display
become
as.. follows.
.
k8m
Condition
Disptw motk
Cursor 'tinerpositian
,
Cursor c b ( w n position
Head V F " address displayed
'
I
(no change)
Normel/rsvfKse decignation
Color designation
unit display
a
EXECUTION CONDITION
Not displayed only when the
Cursor
ondisplayed
display
areas
are
cleared.
'The CLV; instruction is executed every scan whilethe
clear
cornman&-is ON when the LkDA instruction is used. It is executed
only once at the leading'edge ofthe clear command signal when
the LEO$ instruction is used.
Instruction
execution
InRruaion
execution
-
Sequence program flow
I
I
I
I
I
I
I
I
I
I
CLV (with LEDA)
I
CLV (with LEDB)
OPERATION ERROR
I
I
I
I
I
I
I
I
I
In the casesdescribed below, the operation error occurs and an
error flag '(M9011) is set.
~
Description
The display mode setting data designated by a i s out of the range
from 0 to 3 and 5.
The VRAM area addressdesignated by @is outbf the range from 0 to
Error W
DW08 D m 1
50
503
7674
6-25
\ I
IB lNAl 66257-A
\a
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The following is an example oftheprogram used to clear data of
the VRAM areas of the AD57 loaded at W Y O C O to OFF.
Data of addresses 0 to 6399 of theVRAM areas is cleared by batch
processing.
Clearing of the VRAM area data is performed only once when the
PC CPU isturnedon or reset.
ti9039
e ::
UO i t , 1 - - - 4
ti9036
3
3
€FOR
D0
K
4
CSUB
H
P K
0
10
13
P0
ECJ
!?e36
CLU CLEDFI
1:
-
3
De
3
Sizeof the screen display for the
clear operation is set at thestandard
mode.
TheVRAM address to be cleared
CLEDR 3
E+
K
1600
D0
3
Switching of the VRAM address to
be cleared
CHEXT 3
42
PB 43
3
000C 3
ESUB
[LEDC
3
-x e p
H
688c 3
K
1
~
y
6
LEDB
5 CPSl~
Display of a canvas screen by
the CF'Sl instruction (Section
6.2.1)
3
~ 3
3
LEDR
:
:
The VRAM area clear operation
by
the
CLV instruction
is
performedaccording tothe size ofthe 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.
1
A3ACPU
r
----
7
FOR
;
1
I
I
CLV
instruction
1
NEXT
"K3MO"
6-26
1
VRAM areas
"KO"
" K4800"
L - --i
.
AD57
I
c
3200
4800
6400
IE (NAI 6 6 2 5 7 4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
Usabla'dovka
Bit device
0
X
Y
.
H
L
S
CoWant. Paintar M
Word (16-bit) device
B
*1: The number of stepsvaries
F
T
C
D
W
R
A
~
.
A
~
Z
V
K
H
1
NI Z
P
0 0
17
--
"12
M9011
0
0
with type of device used. See Section 5.2.
r - 3
LEDA : Execution at ON
LEDB : Execution
CSCRU,
CSCRD
at
leading edge
:.,
Instruction symbol
Setting data
0 I Head I/O number of AD57
FUNCTION
(1) The CSCRU and CSCRD instructions are used to scroll up and
downthe screen oneline a t a time onthedisplayunit
connected to the AD57(Sl)/AD58 designated by
CSCRU instruction . . . + . . . Scroll up
CSCRD instruction........ Scroll down
0.
Screen
Screen
A
B
C
D
R
S
T
I Scroll down 1
Screen
Screen
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set "12H" a t 0.
6-27
IB (NAI 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3) Thescroll 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 CRTstandard mode........... 80 addresses
In theCRT enlarged mode ........... 40 addresses
In theLCD mode ........................
80 addresses
l
.
.
;
.
i
...............
m..............................................." t
VRAM areas
1
-
VRAM areas
I
I
..............
(1
VRAM
arms
[ Scroll up I
u
'
= Addresses which correspond
to one line onthe screen
VRAM
W
areas
t
.................................................
Q =
Addresses which corre;pond
to one line on the screen
IT
I
(4) The operation error occurs when the head of the VRAM area
addresses beingdisplayed 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.
In the CRTstandard mode........... Address 6080
In theCRTenlarged mode ........... Address 7280
In theLCD mode ........................
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 mentionedbelow.
........... Addresses 80 to 6000
In the CRTstandard mode
In the CRT enlarged mode ........... Addresses 40 to 7240
In the LCD mode ........................ Addresses 80 to 6800
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(5) After,.,qxgcution of the CSCRU and CSCRD instructions,
condiljms of the display become as follows.
w
,
.
Itom
"
D i s p l d 'n(0de
,
Condition
Cursor iine position
Cursor column wsition
- - -
(no change)
I
~
CSCRU instruction]
fddresses for additioi of one line
CSCRD lnstructlon
Addresses for subtraaion of one line
HeadVRAM addressdisplayed
Normal/reverse desianation
"
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 a t the leading edge of the scroll
commandsignalwhenthe
LEDB instructionis used.
lnnruction
execution
lnnruction
exeation
Scroll command
CSCRU,
CSCRD (with LEDA)
CSCRU,
CSCRD (with LEDB)
OPEMIION ERROR
I
I
I
I
I
I
I
I
I
I
I
1
1
I
I
I
I
I
I
I
I
I
I
I
I
I
I
#
I
#
c
I
I
,
i
Sequence programflow
ON
&
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In the cases described below, the operation error occurs and an
errorflag (M9011) is set.
Description
The head of the VRAM area addressesbeingdisplayed exceeds the
values mentioned below in the scroll
up (CSCRU) operation.
In theCRT standard mode.........................
Address 6080
In theCRT enlarged mode .........................
Address 7280
In theLCD mode ...................................... Address 6880
The head of the VRAM area addresses being displayed exceeds 0 in the
scroll down (CSCRD) operation.
6-29
Error Coda
D9008 D9091
50
503
IB INAI 66257-A
I
i
3
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
PROGRAM EXAMPLE
/MELSEC
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.
Display of a canvas
screen
(Section 6.2.1) by
the
CPSl
instruction
Transmission of a canvas
screen by the CMOV indruction (Section 6.2.3)
Read of the screenby the STAT
instruction(Section 6.10.1)
The STAT instruction (Section 6.10.1) is used to read the display
condition of the screen. In this example, the STAT instruction is
used to read the head of theVRAM addresses being displayedand
to check the range of thedisplayed areas if scrolling up or down
is
possiblebyexecution of the CSCRU or CSCRD instruction.
Since the scroll up/down operationsare 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 operationerror.
6-30
IB INA) 66257-A
MEMO
......................................................................................................................
,
"
, , _ , . , . . . . -
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.3 Cursor ControlInstructions
The cursor control instructionsare used to turn onand off display
of the cursor and to move the cursor on the screen.
Cursor control is executedusingtheinstructionsmentioned
below.
catwow
Cursor display ON
Cursor display OFF
Cursor movement
m
*a
lnrtructkn
CON1
CON2
Description
The one-charactercursorisdisplayed
at current
cursor position.
The two-charactercursor is displayedatcurrent
cursorDosition.
I Display of the cursor is turned off.
I COFF
I LOCATE ] The cursoronthedisplayismoved.
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.3.1 Cursor display ON....*.CONl, CON2
.
:
,
-
:
*1: The number of steps varies with type of device,used. See Section 5.2.
Display
ON
LEDA : Execution at ON
command
- ~ ~ L E o A / L E o K T T LEDB
T ~ : Execution
at
leadingedge
{- I
FUNCTlON
Insiruction symbol in
CON1, CON2
@
LEDR
1
::!
Head I/O number of AD57
(1) The CON1 and CON2 instructions are used to displaythe
cursor at current cursor position on
the screen of a display unit
connected to the AD57(Sl)/AD58 designated by @.
CON1 instruction ....*.*..Displays the one-character cursor
(8X 16 dots).
CON2 instruction
Displays the two-character cursor
(16x16 dots).
3
..+......
(2) The head I/O number of the AD57(Sl)/AD58 designated
by
@should be upper 2 digits of 3 hexadecimal digits.
Example) If the AD57(S1)/AD58 is assigned to X.Yl20 to 13F,
set "12H" a t 0.
(3) Any character displayed a t thecursorposition
when the cursor
two-character
is displayed.
is reversed
rr
i
(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, thecursor changes tothe one-character size.
Whenthecursorismoved
to any othercolumn, it returns to
the
size.
(5) Refer to the description of instructionformovingorturning
the cursor.
Cursor movement
LOCATE instruction
Cursor display off......... COFF instruction
-4
1
i
i
off
I
I
i
t
...+....
r
f
f
6-32
IB INA) 66257-A
(
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(6) After executionof the CONl and CON2 instructions, conditions
of the display become as follows.
ltun
Condition
Display mode
Cursorlineposition
Cursorcolumnposition
(no change)
Head VRAM address disdaved
Normallreversedesignation
Color designation
I
EXECUTIONCONDITION
e onecharacter cursor is disdav. .
Cursor display
The two-character cursor is display-
The CONl and CON2 instructions are executedevery scan while
thedisplay 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.
Sequence program flow
I
I
Display ON command
I
I
i
CON1,
CON2 (with LEDA)
.
.b
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
CONl,
CON2 (with LEDB)
I
I
6-33
I
I
I
I
IB IW €82574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
p
mf t - ,
.'
.
. . .. .
..
.
/ .
1
The fdllaWing:is.anexample of theprogram used toturn on/offthe
cursor-'O~~!lhhal~r~,of.
a,display unit connected to the AD57
loaded -st-,.XP/OGO
-to OfF;
The one&rsc&'r
cursor is displayed by turning
on
XO. The twocharacter cursor is displayed by turning
on
X1.
Display of the
cursor
is turned
off
by turning
on
*
tI
\
1
X2.
/
I
LEDB COHl
cursor
t
S
of the
onecharacter
LEDB COH2
i
m o r
LEDR 3
LEDB COFF
Display of the cursoris turned
By execution of the CON1 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 is turned off.
i
4,
,
-
i
c
I
-i
._,.... . .
. . . . . . .
-....
MEMO
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
/MELSEC
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
6.3.2 Cursor display OFF......COFF
c
UI.#o
Bit kicm
0
X
Y
M
L
S
devices
B
F
T
C
D
W
R
A
O
A
f
conrtrnt Pointer M
Word (16-bit) dovice
l
Z
V
K
H
P
I
N
0 0
"1: The number of steps varies with type
17
M o l 2 MWll
0
0
.
of device used. See Section 5.2.
Display OFF command
ILEDA/LEM
I
LEDR
r
LEDA : Executionat ON
LEDE : Execution at leading
edge
COFF
SUE
FUNCTION
8 -
B
W i n g data
E
@
I
Head 110 number of AD57
(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 0.
(2) The head I/O number oftheAD57(Sl)/AD58designated
by
@should be upper 2 digits of 3 hexadecimal digits.
is assigned to X.Yl20 to
Example)IftheAD57(Sl)/AD58
13F, set "1214" at 0.
(3) Refer to the description of instructionfor moving or turning on
the cursor.
CON1 and CON2 instructions
Cursor display on
Cursor movement ........ LOCATE instruction
*.....-+.
(4) Afterexecution ofthe COFF instruction,conditions
display become as follows.
km
I
c
i
\
ofthe
Condition
Display mode
Cursor line position
Cursor columnposition
Head V F "
addressdisplayed
(no change)
,
Not displayed
,
Normallreversedesignation
Color designation
Cursor display
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
The COFF instruction is executed every scat7 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.
EXECUTION CONDITION
Sequence program flow
Display off command ON
OFF
I
I
I
1i
I
I
I
I
I
I
I
COFF (with LEDA)
I
I
COFF (with LEDB)
I
I
I
I
I
1
1
I
I
I
I
I
1
I
I
1
I
I
I
I
I
I
I
I
I
I
I
1
I
PRO6RAM - fXAMPLE
I
I
I
I
I
I
I
I
I
I
I
I
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 a t WOCO to OFF.
The one-character cursQr is displayed by turning onXO. The twocharacter cursorisdisplayed by turning on X1.
Display of thecursor is turned off by turning on X2.
t
0
r
X0 2
38
T
L
E
D
B
::
~lOOc
’
Display of the
onecharacter
cursor
‘
7
‘T
xeel
l9
e
,
LEDR
~9865
,
L E D 8 CON2
[sU~
,
Display of the two-character
cursor
LEDR 3
n9 6 5
L E D B COFF
a
p;yl:
/8sr
LEDR 3
of the cursor is turned
,
By execution of the CON1 instruction, the one-character cursor is
displayed a t 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.
,
6-36
IB lNA! 68257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
I
\
c
I R
0 1 . 1 1 I I
.
.
I 1 1 0 ~ 0 ~ 0 ~1 01 ~I 0I 0~I 0I
I I I
*1: The number of steps varies withtype of device used. See Section 5.2.
command
Position senina
I
W i n g data
designated
SUB : Constant is
designated
FUNCTION
101
Destination line of cursor
Destination column
cursor movement
of
(1) The LOCATE instruction is used to move thecursor to the line
andI
to thecolumn designated by @ on the
designated by @
screen of a display unit connected to theAD57(Sl)/AD58
designated by 0.
Display unit
@W
:
T i
9.. ..........ffl
(2) The head I/O numberoftheAD57(Sl)/AD58
designated by
@should be upper2digits of 3 hexadecimal digits.
Example) If theAD57(Sl)/AD58is
assigned to X.Yl20 to
13F, set "1214" at 0.
(3) The range available for setting destination lines and columns
at @and @varies with the
display mode being used as
mentionedbelow.
~
~
~~
Dbpby Mo&
CRT standard mode (0 or 3)
CRT enlargedmode (1)
LCD mode (2)
uti
(mj-
0-
9
0-
9
Gluin
0-79 0-19
0-39
0-79
~~
_,
. . . . .
...........
...,-...
.
.
.
.
. . I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) If theLOCATE instruction is used when display
of the cursor is
turned off, only the cursor position is moved.
(5)After execution of the LOCATE instruction, conditions of the
display become as follows.
ttsm
Condition
Display mode
Cursor lineDosition
I Cursor
Dosition
column
,
I HeadVRAM
I
(no change)
Designatedline
Normallreversedesignation
I
(no change)
Color designation
EXECUTION CONMTION
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
commandsignalwhenthe
LEDB instructionis used.
Innrueion
exation
END Stso 0
stw 0
END Step 0
instruction
execution
END
I
Sequence program flow
Position
setting
command
:G
pF- 1
II
I
I
I
I
I
I
I
1
I
I
I
I
I
I
I
I
I
1
LOCATE (with LEDA)
I
I
I
I
I
I
LOCATE (with LEDB)
I
I
I
I
I
Step 0
I
I
I
I
OPERATION ERROR
I
column
Desianated
addressdisplayed
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In the cases described below, the operation error occurs and an
errorflag (M9011) is set.
Error cock
D9008II
Description
a
The line position designated by
is out of the ranges mentioned
below.
In the CRTstandard mode ................................ Oto 19
In the CRTenlarged mode ................................ Oto 9
Inthe LCD mode ............................................. 0 to 9
The column position designated bya i s out of the
below.
In the CRTstandard mode
................................
In the CRT enlarged
...............................
In the LCD mode .............................................
6-38
ranges mentioned
0 to 79
.Oto 39
0 to 79
50
1
503
1
18 INN 6 6 2 5 7 4
f
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
\
The following is an example of theprogram used tomovethe
cursor on the screen af a display unit connected to the AD57
loaded at X/YOCO to OFF.
By twnkrg on XOOO, the ctmor on the screen is moved to column
20 on, tine 6.
07trc
H9036
19
xep ~ q p s
1,
-
RJRCPU
RSC
,
'
HOU P 8K
-
Setting of data to be displayed
D3
CLEDLL LOCRTE
[SUB
CSM
[SUB
-
H
3
eeec
3
5
3
t3ohn. 5
3
Column 20
K
K
20
"
.
CLEOR 3
CLEDB PR
[SUB
, .
CLEDC
H
3 '
eeec 3
DO
3
Display of characters by the PR
instruction (Section 6.5.2)
CLEDR 3
In this example, characters "A3ACPU" are displayed by execution
of the ASCII
character
display
instruction
(PR) after cursor
Display unit
I
:
i
J
yCursor
--_-__-___positiondesignated
I
_ _ _ - - - _ _ _ _ _ _ _I
'by the LOCATE
instruction
L
~
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.4 Display Condition Setting
Instructions
The display condition setting instructions
are used to change color
or perform normaUreverse switching of characters to be or being
displayed.
Using the display condition setting
instructions, color designation
and normalheverse switching of character display can be easily
performed.
Display condition setting isexecutedusingtheinstructions
mentionedbelow.
Designates charactersto be displayed in the normal
displaymode.
Normal/reverse
switching
CREV
CRDSP
CRDSPV
COLOR
Color designation
Designates charactersto be displayed in the reverse
displaymode.
Switchesthedisplaymode
of charactersbeing
displayed from normal to reverse orvice versa.
Switches the display mode of the characters stored
a t designated addresses in the VRAMareas from
normal to reverseorviceversa.
Designates color of characters to be displayed.
CCDSP
Changes color of charactersbeingdisplayed.
ccDspv
Changes color of the characters stored
at designated
addresses in the VRAM areas.
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXECUTIONCONDITION
The CNOR and CREV instructions are executed every scan while
ON whenthe
LEDA
thenormalheverseswitchcommandis
instruction is used. It is executed only once at the leading edge of
thenormalheverseswitchcommand
signalwhen
the LEDB
instruction is used.
Innrunion
execution
END
Sequence program flow
I
I
I
I
I
I
I
I
I
I
I
switch
Normal/reverse
ON
I
I
I
I
I
CNOR,
CREV (with LEDA)
CNOR,
CREV (with LEDB)
1
I
6-42
I
I
I
I
I
I
I
I
Slop 0
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
1
I
I
I
18 (NA) E a 5 7 4
MEMO
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
............................-*.....................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
...................................................................................................................................................................
....................................................................................................................................................................
..
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
IB IW 882674
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The following is an example of theprogramused
to execute
switching of normalheverse displayof characters on the screen of
a display unit connected to the AD57 loaded at XNOCO to OFF.
Characters "P21/R2Iy of "A3ACPUP2l/R2ltt are switched between
XOOO.
the normal and reverse display modes by turning on
-
{SUB
CSUB
-
€SUB
-
!
K
5
3
3
3
Cursor movement by the
CATE instruction
(Section
6.3.3)
LO-
ELEDR 3
-
CLEDB PR
-
-
-
I
hec
a
CSUB
ieec 3
CLEDC
De
-
Display of characters by the
PR instruction (Seaion 6.5.2)
ELEDR 3
l ~ c s u E B )-i 1
CSUB
i'l
Cursor movement by the LO-
C
6.3.3)
A
E instruction
(Seaion
CLEDR
CLEDBCRDSP
CSUB
CSUB
H
eeec
K
7
7 characters
CLEDR
Since characters "A3ACPUPZl/R21" are displayedstarting
at
column 5 on line2, the rangeof characters for display switching is
designatedstarting a t cohmn 11 online 2 for 7 characters.
Display unit
I
i
j
.
L
;
Column 5
r-l
i
1
Display
mode
is switched !
I every time X0 is turned on.!
Column 11
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) The VRAM addresses designated by @can be:set:Mihin the
range of 0 to 7679.
(See Sedtlon 1.1.1 for detail of the VRAM addresses.)
(5) The number of characters designated by @can be set at any
number of characters stored at addresses starting with the
address designatedby @ t o 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
displaybecome as follows.
Item
Condition
Display mode
Cursor lineposition
Cursor columnposition
Head VRAM addressdisplayed
(no change)
NormaVreversedesignation
Color designation
Cursor display
EXECUTlON CONDITION
The CRDSPV instruction
is
executed every scan while
the
normal/reverse switch command isON when the LEDA instruction
is used. It is executed only once at theleading edge of the
normaVreverse switch command signal when the
LEDB instructionis used.
END
Instruction
a n m t i o n proesuing
lutructwn
andon
hetrueon
anmtkon
END S W 0
Sequence program flow
Normal/reverseswitch
command ON
OFF
I
I
1
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
CRDSPV (with LEDA)
I
OPERATION ERROR
I
I
I
CRDSPV (with LEDB)
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In the followingcases, an operation error occurs and an error flag
(M9011) is set.
Deraiptim
ais 0 or a negative value.
ais out of the range from 0
The number of Characters designated by
The VRAM area address designated
by. -
to 7679.
The range of the
number
of
characters
designated
by
starting
withthe addressdesignated by (s3, exceeds address 7679 of the
VRAM areas.
Error Code
D9008 -1
5 0 5 0 4
. *...
>
,
,
I
_
6. AD57(S1)/AD58
CONTROL INSTRUCTIONS
SJQ@@%TONTROL
.I.
INWCJIONS,,'
L
PROGRAM E"f?LE
The following is anexample oftheprogramusedto
execute
switching of normal/reverse display of
characters stored in the
VRAM a r m of the At352 loaded at W O C O to OFF.
Characters stored at addresses 1007 to 1013 are switched between
the normgk.end reverse display modes by turning on
XOOO.
' played Setting
of data
'
llOBp
32
119136 H?p&S
I
D7
3
tleec 3
[SUB
K
iBB@ 3
CLEDC
DB
3
I
Storage of charactersin
the
VRAM areasbythe
PRV instruction (Section 6.5.4)
'
7
;;
CLEDR 3
xe e
57
dis-
3
CLEDB PRU
rsuB
to be
/
n9
6s
LEDBCRDSPU
e~~~~~~
I
up2;;:;;
SUB
H
e m 3
7 characters
Designation of addresses 1006
and after
LEDR
In this example, characters "A3ACPUP21/R21f' are written to the
VRAM areas at addresses 1000 and after, and the display modeof
"P21/R21n is switched.
By setting the head of the VRAM addresses to be displayed a t
address 1000 or before by use of the CPS2 instruction, condition of
display
mode
switching
can be monitoredonthe
display
unit.
I74
VRAM areas
1000
1001
A
1003
C
1004
P
1005
U
1006
P
1007
2
1
008
I
1010
R
101 1
2
1012
1
~
t
i
1
!
I
1
1009
I
i
3
1002
J
,
Normal/reverse switching is executed every time X0 is
turned on.
*I
/
6-50
IB (NAJ662574
,
?
?
?
\
.
I,
.
.;
*
I
.
.
.
.
..-......
. . . . . . . . . .
. . . . . . . . . . . .,
,
MEMO
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
i
...
18 (NAJ 662574
-
......
,-
.......
_
I
_
/MELSEC
i
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. AD57(Sl)/AD58 CONTROLINSTRUCTIONS
6.4.4 Character color designation..-.--COLOR
Chwacter color setting
LEDA : Execution at ON
LEDB : Execution at leading edge.
I
FUNCTION
LEDC : Device number
is designated
SUB : Constant is
designated
I LEDR F
SstHng d,a
Head I/O number of AD57
(1) The COLOR instruction is used to designate color of characters, which are to be displayed on a display unit connected to
the AD57(Sl)/AD58 designated by @, to thecolorwhich
corresponds to the color code designated by 0.
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set " 1 2 ~ "a t @.
(3) Tables shown below indicate available character colors and
corresponding color
codes to be designated by
0.
Color Code
I
2
3
I
I
Liaht blue
IWhite
7
I
(4) If color ofa 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
when the following instructions
are executed.
CPS1
CPS2
CLS
to white
8
4
1
i
1:
t
.
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(6) After execution of the CMODE instruction, conditions of the
display become as follows.
ttun
Condition
Display mode
Cursor line Dosition
(no change)
Cursor column position
Head VRAM addressdisplayed
Normal/reverse designation
Colordesignation
Designatedcolorcode
(no chanae)
Cursor disdav
EXECUTION CONDITION
The COLOR instruction is executed every scan while the character
ON when theLEDA instruction isused. It
color setting command is
is executed only once at the leading edge of the character color
settingcommandsignalwhenthe
LEDB instruction is used.
I
execution
lnnructwn
step 0
t
Sequence program flow
I
1
END
execmon
prm8sing llnnruqion
END Step 0
END
I
1
I
I
command
i
I
Step 0
,
I
I
Charactercolorsetting
I
Instruction
execution
I
I
I
I
I
I
I
COLOR (with LEDA)
I
I
I
I
I
COLOR (with LEDB)
The color code designated by
J
END
I
I
I
I
I
I
I
I
Step 0
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In the followingcase, an operation error occurs and an error flag
(M9011) is set.
Description
C .
I
I
I
OPERATION ERROR
END Step 0
lnstrunwn
execmion
Instruction
exwlion
6-52
0is out of the range from 0 to 7.
Error Code
D9008ID9091
50
I
503
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM W M P L E
.
. .
,
The f o & b v b g is an exarq.de ofitheprogram used to designate
color .of -the characters to be displayed on the display unit
connected to the .AD67 loaded at W O C O to OFF.
Characters ffA3&€!l%J"
are dispiayed in blue and then in yellow at
current cursor position, on the screenby turning on XO.
Setting of data to be
displayed
t
Designation of blue
-
iLEbR 3
PR
CLEDB
COLOR
-
Heeec 3
CLEDC
D8
CLEDB
008C
[SUB
€SUB
-
'
Display of characters by the
PR instruction (Section 6.5.2)
3
3
H
3
K
6
3
Designation of yellow
CLEDR 3
-
PR
CLEDB
3
[SUB
De
-
1I
CSUB
CLEDR 3
-
,
3
He Q 8 c 3
CLEDC
,
CLEDR 3
Display unit
ABACPUABACPU
-
I
1
.-J
__
Display of characters by the
PR instruction (Section 6.5.2)
3
,
MEMO
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
\
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
J
I8 INAI 66257-A
/MELSEC
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. AD57(Sl)/AD58 CONTROL INSTRUCTIONS
6.4.5 Change of character color being displayed-..-..CCDSP
"12
m
o
l
LEDA : Execution atON
LEDB : Execution at leadingedge
I
tI
FUNCTION
SUB
Setting data
1 LEDC/SUB
I
I LEDC/SUB
@
I @
I LEDR
LEDC : Device number
isdesignated
SUB : Constantis
designated
number of AD57
Head
I/O
The number of characters
101
changed.
Color code
a,
(1) The CCDSP instruction is used to change color of the number
of characters designated by
which are being displayed on
a display unit connected to the AD57(S1 )/AD58designated by
0,tothe colorwhich corresponds to thecolor code
character a t the cursor
designated by @starting with the
position.
@ [Number of characters
[A!BC
D E
Y7zrBlue
curs'or position
beforeexecution
0 I Color codeI
I
0
I
Cursor position
after executio?
I
A B C D E ~
Changed to green
4
I
(2) The CCDSP instruction changes onlythedisplaycolor
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 theAD57(Sl)/AD58designatedby
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If theAD57(Sl)/AD58is
assigned to X.Yl20 to
13F, set ''1214'' a t 0.
A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
The number of characters designated by @can be selected
characters starting with the
from 1 to the total number of
cursor position to the last column on the last lineonthe
screen.
Ifthe
rangeof
thenumberof
characters designatedby
@starting at the cursor position exceeds the last column on
a line, the excess range laps around to thenext line.
If the designated range exceeds the last column of thelast line
onthe
screen, colorchanging
is executed onlyforthe
characters beingdisplayed.
When
-
@
5 and @ = 6:
FfiB C
f
DEFGH
Cursor position
0
VRAM areas
Displayedareas
DEFGH
Cursor position
DEFGH
(6) Tables shown below indicate available character colors and
correspondingcolor codes to bedesignated by
Color
Green
I Purple
I
2
3
I
I
@.
Color ode
4
Light blue
Yellow
White
(7) After execution of the
CCDSP instruction, conditions
display become as follows.
of the
Condition
Head VRAM addressdisDlaved
I
L
d
Normallreversedesignation
Colordesionation
Cursordisplay
6-55
(no change)
IB IW 682574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
CONDITION
The GCDW instruction is executed every scan while the change
commqRd is ON when the LEDA instruction is used. It is executed
only once,,at the leadiog edge of the change command signal
whenthe LED6 instruction is used.
8
Sequence programflow
- 1
I
I
I
I
I
I
I
I
1
CCDSP (with LEDA)
I
I
I
CCDSP (with LEDB)
OPERATION ERROR
I
I
I
I
I
I
I
I
I
I
I
I
I
In the following cases, an operation error occurs and an error flag
(M9011) is set.
Description
The number of characters designated by @ is 0 or a negative value.
The color &de designat4 by @ is out of the range from 0 to 7.
Error Code
D9008 wo91
50
I
503
i
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The following is an exampleoftheprogramusedtochangecolor
of the characters being displayed on a display unit connected to
the AD57 toackd at W O C O to OFF.
Color of characters- "P21/R21" of "A3ACPUP21/R21" being
displayed is changed from black to blue, red, purple, green, light
blue, yellow, white and
black by turning on XOOO.
OJle-RSC
R3RCPUP2
CSUB
Cursor movement by the LOCATE instruction
(Section
6.3.3)
K
5
CLEDR
CLEDB PR
H
Displayofcharacterr
by the
PR instruction (Section 6.5.2)
CLEDC
DB
CLEDR
Used for
switching
t
t
-
display
color
K
11
CLEDR 3
CCDSP
CLEDB
[SUB
leec
3
3
{SUB
K
7
3
CLEDC
CB
3
7 characters
CLEDR 3 Designation of display color
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
#
Since cheracters "A3ACPtJPZt/R21" are dispktyeii s&tirig.~tt
colum~'5,on
line 2, the range of characters for display switching is
designaW etarting at column 11 on line 2 for 7 characters.
In this e&biftple, the number of inputs of X000 is counted by CO,
and the result of counting is used as the color code.
(
Display unit
f
I
L,.
...
.,I ,-,.
*
.__._
....-.-............. ......
.._-.-...,
.
.
.
I#
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
/MELSEC
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. AD5761)/AD58 CONTROL
INSTRUCTIONS
V : The number of stepsvaries with type of device used. See Section 5.2.
Change command
4
LEDA/LEDB lCCDSPv
I
LEDA : Execution atON
LEDB : Execution at
leadingedge
0I Head I/O number of AD57
' Device
number
is designated
LEDC/SUB
I
@
SUB : Constantis
designated
The number of characters
changed.
I
1@1code Color
The head number of the
VRAM areas in which
characters to be changed
in color are stored.
LEDR
FUNCTION
Setting data
(1) The CCDSPV instruction is used to change color of the number
of characters designated by@,which are storedin theVRAM
areas of the AD57(Sl)/AD58 designated by 0,
to the color
which
corresponds
to the
color
code designated by
@starting with the
address designatedby @.
VRAM
@)
I Number of characters
\
VRAM
C (Red)
D (Blue)
E (Blue)
6-59
18 INN 662574
t
r
A
/MELSEC-A
6. AF@l)Im
CONTROL INSTFIUCTlONS
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(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(Sl)/AD58 designated by@
should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned
to X.Yl20 to
13F, set "12"" at @.
(4) The VRAM addresses designated by @I can be set within the
range of 0 to 7679.
(See Section 1.1.1 fordetailofthe
VRAMaddresses.)
(5) The number of characters designated by@can be set a t any
number of characters stored at addresses starting with the
address designated by @Ito 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 alsoswitches.
=
(7) Tables shown below indicate available character colors and
corresponding color codes to be designated by @.
I
color
I Black
t
1 Blue
I
colacod.
I
1
0
Purple
I
I
II
r
I
Color
I Green
Light blue
I cdorcod.
I
4
I
I
I
Yellow
White
(8) After execution of the CCDSPV instruction, conditions of the
display become as follows.
km
Condition
Display mode
Cursorlineposition
Cursorcolumnposition
Head VRAM addressdisplayed
Normal/reverse designation
Color designation
I Cursor display
(no change)
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXECUTIOIY(4H3ND1TK)N
.;
,
.
-
..
,
. . ..
..
I
T h e . C C W instruction is executed every scan while the change
command isON when,the LEDA instruction is used. It is executed
mty once at the 1eading:edge'
the
of
change command
signal
when the LEDB instruction is used.
.
Sequenee program flo
I
I
I
Change command
.
I
I
I
I
1
I
CCDSPV (with LEDA)
I
I
CCDSPV (with LEDB)
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
1
I
I
1
OPERATION ERROR
I
I
I
I
I
I
I
I
I
I
I
I
I
In the following cases, an operation error occurs and an error flag
(M9011)is set.
no"
The color code designated 'by @ is out of the range from 0 t o 7.
The number of characters designated by @ is 0 or a negative value.
The VRAM area address designatedby @
is out
I ofthe rangefrom 0 to
7679.
The range af the number of ch actars designated by
starting with
the address W g n U e d by
exceeds address 7679 of the VRAM
areas.
&
a
Error Code
D9008 rnl
503
50
--.
sw
L'
/MELSEC
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
PROGRAM EXAMPLE
The following
is an example of
the
program
used to
doc
of the characters storedin the VRAM areas of the AD57 loaded a t
W O C O to OFF.
Color of the characters stored at addresses 1007 to 1013 in the
VRAMareas is changed from black to blue, red, purple, green,
light blue, yellow, white and black by turning on XOOO.
11
R3RCPUP2
Setting of characters to be
written to the VRAM areas
Write to the VRAM areas by
the PRV instruction
(Section 6.5.3)
LEDC
De
LEDR
Used
for
switching
IN!f65,
E
-
LEDBCCDSPU
-
-
[SUB
b
CSUB
K
7
[LEDC
Ce
4'
display
color
C 3
3
7 characters
3 Designation of display color
iee6
Designationofaddress
and after
1600
CLEDR 3
Inthisprogram,
characters "A3ACPUP21/R21"are
writtento
address 1000 and after in the VRAM areas, and display color of
"P21/R21r' is changed.
By setting the head of the VRAM addresses to be displayed at
address 1000 orbeforeby
use ofthe CPS2 instruction,color
changing can be monitoredonthedisplayunit.
VRAM areas
1000
1001
1002
I
A
I
1007
I
I
2
1
I
I
1008
Displaycolorchange
is executed by turning on
XO.
101 1
1012
a
6-62
18 INN 662574
MEMO
....................................
................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
,.
"
_..___
....
... "_.__
,I
.
..
-
.
..._.._. . .
.
.
,,
4,
,
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.5 Designated Character 'Display hmtnctbns
The designated character display instructions are used to display
designated characters ona display unit or towrite designated
characters tothe VRAM areas.
Designated character display and write are executed using the
instructions mentionedbelow.
CatWOV
~~~
ASCII character
display
ASCII character
write to the VRAM
Designated
character display
Designated
character write t o
the VRAM
Horizontal repeated
display of
characters
Vertical repeated
display of
characters
Instruction
hbmo
PRN
PR
PRNV
PRV
EPRN
EPR
Description
Displays designated number of ASCII characters.
Displays the ASCII characters till code
001.1.
Writes designated numberof ASCII characters t o the
VRAM areas beginning with designated address.
Writes the ASCH characters till code OOH t o the VRAM
areas beoinnino with desionated address.
Displaysdesignatednumber
of characters which
correspond t o charactercodes 0 t o ~ F F H .
Writes characters till code OOH (characters which
the
VRAM areas
correspond to 1 to 3FFd to
beginning with designated address.
EPRNV
Writes
designated
number
of characters which
H the VRAM
correspond t o character codes 0 to ~ F F to
areas beginning with designated address.
EPRV
Writes designated numberof characters till code 0 0 ~
(characters whichcorrespond to 1 t o 3FFd to the
VRAM areas beginningwith designated address.
CR1
Displays a designated character horizontally for
designatednumber of times of repetition.
CR2
Displays a pair of designated characters horizontally
for desionated number of times of remtition.
cc1
Displays a designated character vertically for designated number of times of repetition.
cc2
Displays a pair of designatedcharacters vertically for
designated number of times of repetition.
4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.5.1 Display of designated number of the ASCU chuqcterq;----PRN
I
+I:
The number of steps varies with type of device used.See
Section 5.2.
LEOA : Executionat ON
LEDB : Execution at
leading edge
LEDC : Device number
is designated
S U B : Constant is
designated
I@I
I
Head I/O number of AD571
Number of characters to
be displayed
I
Head number of thedevices in whichthe ASCII
4 LEDA
1
FUNCTION
Setting data
displayed
be
stored.
are
(1) The PRN instruction is useddisplay
to
designated ASCII
charactersbeginning
with currentcursorposition
onthe
display unit of the AD57(Sl)/AD58 designated by 0.
The ASCII characters to be displayed correspond to theASCII
codes which are stored in the
devices which correspond to the
beginningwiththe
number of charactersdesignatedby
device number designated by @.
b15
@ I Number of characters]
-
b8 b7
-
bO
Displayunit
t
Cursor position before
instruction execution
Cursor position after
instructionexecution
(2) Thehead I/O number of the AD57(Sl)/AD58designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set " 1 2 H " a t 0.
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
The number of characters designated by @can be selected
from 1 to the total number of characters beginning with the
cursorposition to the last columnonthe
last lineonthe
screen.
However, the number of characters to be designated should
not exceed the valuespecified by the last device which is
designatedby
a.
The ASCII codes to be stored in the devices designated by
@can beset in the range of OOH to FFH.
If the range ofthenumberof
characters designated by
@beginningwiththe
cursorposition
exceeds the last
column ona line, the excess range laps around to column0 on
thenextline.
If the designated range exceeds the last column of thelast line
on the screen, characters up to thelast column on thelast line
are displayed. The excess characters are ignored.
I"
b15-b8
b7
-
Cursor position
bO
@+l
@+ 1
O I I / "DE" are ignored.
(6) Afterexecution
of the PRN instruction,conditions
display become as follows.
ttm
Display mode
ofthe
Condition
(no change)
Plus one line if the designated range
exceeds the last column.
Cursor line position
Cursor column position
Current cursor position plus designated number of characters
Head VRAM address displayed
Normal/reverse designation
Color designation
(no change)
Cursor disDlav
6-65
IB INN 662574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXECU?IQN XM3NDKtON
The
..instruction is executed every scan while
the
display
commarld .is ON when the LEDA instruction is used. It is executed
onty m e . a t the leading edge of the display command signal
when the LEDB instruction--h used.
Innrunion
Innrunion
lnnrunion
Sequence program flow
Display command
i L- J
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
PRN (with LEDA)
I
I
I
PRN (with LEDB)
OPERATION ERROR
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In the fojtowing cases, an operation error occurs and an error flag
(M9011) is set.
Description
a
The range of the number of characters designated by
beginning
withthe device number designated by a e x c e e d s the last device
number of' corresponding device.
The number of characters designated by
ais 0 or a negative value.
Error Code
D9008 D9091
50
504
i
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
The following is an example oftheprogramused
to display
characters "A3ACPUP2t/R21" at column 20 and after on line 5 on
a display unit connected to the AD57 loaded at W O C O to OFF.
Characters "A3ACPlJP21/R21" are displayed by turning on XOOO.
PROGRAM
EXAMPLE
199
4t
2
tt9,!65
,
I
RSC
R3RCPUP2
De
3
RSC
1/R21
04
3
Setting of data to be displayed
3
LOCRTE CLEDB
H
eeec 3
CSUB
K
3
5
K
28
ESUB
CSUB
:
Cursor movement by the LOCATE instruction
(Section
6.3.3)
CLEDR 3
1
PRN ELEDB
13 characters are designated.
Head of the devices in which
characters are stored.
The ASCII instruction isused to convert characters to be displayed
(A3ACPUP21R21) to the ASCII codes. Converted ASCII codes are
stored in DO to D6.
ASC MACPUPZ
W
-{ :;
Display unit
Line 5
r-------
...
LPI?instructioij
ID3
*
13 characters
are displayed
D4
6-67
IB (NA) 8 6 2 5 7 4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
'1: The number of steps varies with type of device used. See Section 5.2.
Display command
+LEDA/LEDB
I
PR
LEDA : Execution at ON
LEDB : Execution at
leadingedge
Setting data
Head I/O number of AD57
Head numberofthedevices in which the ASCII
LEDR
FUNCTION
beto
stored.
displayed
are
(1) The PR instruction is used to display
designated
ASCII
characters beginningwith
currentcursorpositiononthe
display unit of the AD57(Sl)/AD58 designated by
The ASCII characters to be displayed correspond to the ASCII
codes which are stored inthe devices beginningwiththe
device number designated by @ u p to the device in which
code "00~"is stored.
0.
b15
-
b8 b7
-
bO
c
Display unit
[A~BCDEFGHIJKLMNO~
t
Cursor &sitionafterCursorpositio"before
instructionexecutioninstructionexecution
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set " 1 2 H " at @.
6-68
IB fNAJ 66257-A
-'>
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3) The ASCII codes to be stored in the devices designated by
@can be set in the range of 011-1to FFH.
Since code "00~"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 onetime
of processing equals to the number of characters from the
cursorposition to the last columnonthe
last line onthe
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 nextline.
If the designated range exceeds the last column of thelast line
on the screen, characters up to thelast column on thelast line
are displayed. The excess characters are ignored.
@
b15-b8
b7
-
W
A
@+l
ABC
"DEF" areignorec
(6) After execution of the PR instruction, conditions of the display
become as follows.
(no
I
I Display mode
I
I
Condition
change)
Plus one line if the designated range
exceeds the last column.
I
Cursorlineposition
Cursor columnposition
Current
cursor
position
plus
designated
number
of characters
Head VRAM address
disolaved
Normalheversedesignation
Color designation
Current cursor
position
number
of plus
I
(no change)
I
I Cursor display
e . -
1
ttm
6-69
18 INN 882574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
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.
I
Sequenceprogramflow
Display command
1
gpF-A
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
PR (with LEDA)
I
I
I
I
I
I
I
PR (with LEDB)
OPERATION ERROR
I
I
I
I
I
In the following cases, an operation error occurs and an error flag
(M9011) is set.
Description
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 disolaved is 0.
6-70
@
t
*
Error Coda
D9008 D9091
50
f
+f
504
IB (NAI €6257-A
4
,
f
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM W
E
The following is an example of the program used to display
characters "A3ACPUP21/R21f' at column 20 and after on line 5 on
a display unit connected to the AD57 loaded at W O C O to OFF.
Characters "A3ACPUP21/R21" are displayed by turning on XOOO.
-
[SUB
H
eeec 3
CSUB
!
3
[SUB
213
1
K
Cursor movement by
the LOCATE instruction
(Section 6.3.3)
CLEDR 3
3
CLEDB PR
[SUB
Beec I
De
Head of the devices i n which
characters are stored.
CLEDR 3
The ASCII instruction is used to convert charactersto be displayed
(A3ACPUP21/R21) to the ASCII codes. Converted ASCII codes are
stored in DO to D6.
"0" is stored in D7 to designate the endof the range of characters
to be displayed.
ASC
A3ACPUP2
I I W1
[MOVP KO
rr-
DO
IDo
1 :;
{ D7
6-71
IB INA) 66257-A
f
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
*l:
The number of stepsvaries
with type of
device used. See Section 5.2.
Store command
LEDA/LEDB 1 PRNV
i
H
I
LEDA : Execution at ON
LEDB : Execution at
leading edge
SUB
LEDC : Device number
is designated
SUB : Constant is
designated
I
Satting data
@
@
Head I/O number of AD57
Head
address
of the
V F " areas wherethe
ASCII characters are t o be
stored
Number of characters t o
be stored
@
Head number of the devices in which the ASCII
codes for the characters
t o bestored are stored.
@
FUNCTION
0
(1) The PRNV instruction is used to storedesignated
ASCII
characters in the VRAM areas of the AD57(Sl)/AD58 designated by @beginning with the address designated by
The ASCII characters to be stored correspond to the ASCII
codes which are stored in the devices which correspond to the
number of characters designated by @ beginning with the
device number designated by @I.
a.
I
@ INumber of characters]
1
VRAM areas
I
@+1
@+2
1 @+3
_
c
_
-
1-character 1-character
code
code
6-72
-,
I6 (NA) 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(2) The head I/O number of the AD57(SlYAD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If. the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set "12H" at 0.
(3) The VRAM address to be designated by @can be set within
the range of 0 to 7679.
(See Section 1.1.1 for detail of the VRAM areas.)
(4) The number ofcharacters to be designated by@ can be setat
any number of characters stored a t addresses beginning with
the address designatedby @up to address 7679.
However, a value which exceeds the last device number
of the
devices designated by @
cannot
I be set.
(5) The ASCII codes to be stored in the devices designated by
OOH to FFH.
@can be set in the range of
(6) If the range of thenumberof
charactersdesignated by
@beginning with the
addressdesignated by @exceeds
not peraddress 7679, an error occursandprocessingis
formed.Suchrangesettingisignored.
(7) If characters are storedin the areas currently being displayed,
such characters are displayed on the screen.
(8) Afterexecution ofthe PRNV instruction,conditions
display become as follows.
ltm
of the
Condition
Display mode
CursorlineDosition
Dosition
Cursor column
Head VRAM addressdisplayed
I
(no change)
Normallreverse designation
Color designation
I Cursor display
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
ucEOU'T4QM UONDIT?ON The PRNV instruction is executed every scan while the store
command is op1 when the LEDA instruction is used. It is executed
only ortDci at the ieading,edge of thestore command signal when
the LEDB instructionisused.
Sequence progmm flow
Store command
A
'
I
I
I
I
I
I
I
1
I
I
I
I
I
I
I
i
I
,
I
.
PRNV (with LEDA}
I
I
PRNV (with LEDB)
OPERATION ERROR
I
I
I
I
J
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
1
In the following cases, an operation error occurs and an error flag
(M9011) is set.
Error Code
Dm1
Dereriptlon
The VRAM area address designated by @ i s
7679.
D9008
out of the range of 0 to
504
-
6-74
IB (NAJ€6257-A
/rWfrS€C-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6. AD57&1)/AQS8 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The following is an example of the program used to store
characters “A3ACPUP21lR21“ at address 1000 andafter in the
VRAM areas of the AD57 loaded at X N O C O to OFF.
Characters “A3ACPUP21/R21n are stored in the VRAM areas by
turningon XOOO.
H9036
RSC
13RCPUP2
D8
1/R21
04
LEDB PRHU
[SUB
3
-
H
080C 3
K
[SUB
K
13
3
ELEDC
CLEDR 3
L
I
of characters to be pro-
Designationof addresses 1000 to
1012 (for characters)
13
in the
VRAM areas
Head of the devices in which characters are stored.
The ASCII instruction isused to convert characters to be displayed
(A3ACPUP21lR21)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 orbefore
by use of the CPS2 instruction,the
character store operation can be monitored on the display unit.
VRAM areas
IDo
ASC
[
1R21
ID4
-
b15
-
b8 b7
-
bo
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
the
&5j4i:SLarbddha"43tkchlMI&m-~ddrrrigmatedmmkwof characters up dojEads -.in
~ $ . . ' . . ' ~ ~ .. , ; -
-,
,.
. .
0
@
I *1:
X
.
.
Bit device
M L S B
Y
F
T
C
Wotd (lebit) device. ! .
D W R A O A l Z
Cpnrtnt
V
K
Pointor M
H
P
I
N
I . " 1I
&
€Is
8 de
0
W C
i
P 'M9012 M o l 1
23
0
0 0
. ' '
0 00000 0
0 0 0 0 0
'
The number of steps varies with type of device used. See Section 5.2.
,---I
command
I'
t
FUNCTION
4
SUB
I
..
f 'LEDC/SUB -1
(li
. .
T k
8
.
.
@
I
7
LEDA : Execution at ON
LEDB : Execution at
leadingedge
B data
LEDC : Device
number
is designated
SUB : Constant is
designated
Head address of the
VRAM areas wherethe
ASCII characters are to be
stored
6W
0
Head 110 number of AD57
Head number of thedevices in which the ASCII
codes for thecharacters
to be stored are stored.
I
The
instruction
used'to
is
store
designated
ASCII character# in the VRAM areas of the AD5761 )/AD58 designated by @
beslnriing with the address designated by @.
The ASCfl characteri to be stsred correspond to the ASCII
codes which are stored in the devices beginningwiththe
device number designated by @ up to the device in which
code " 0 0 ~ "is stored.
/
1-character1-character
code code
End of range code
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
The head VO number of the .AO57(Sl)/AD~'ifesil)nifed.,by
@should be upper 2 digits .of 3 hexadecimal digits.
Example) tf the AD57tSl )/AD58 is assigned to X.Yl20 to
13F, set "12H" at 0.
The VRAM address to be designated by @
can I
be set within
the range of 0 t o 7679.
(See Section 1.1.1 for detail of the VRAMareas.)
The ASCII codes to be stored in the devices designated by
@can be set in the range of 0 1 to
~ FFH.
Since code "00~"designates the
end
ofthe
range of
characters to be displayed, it cannot be set as an ASCII code.
The number of characters which can be stored byone time of
processing equals tothe numberof
characters fromthe
address designated by @up to
address 7679.
If the range of the number of characters beginning with the
address designatedby @exceeds address 7679, an error
occurs andprocessing is notperformed.
If characters are stored in the areas currently being displayed,
such characters are displayed on the screen.
After execution ofthe PRV instruction,conditionsofthe
displaybecome as follows.
Item
Condition
Display mode
Cursor line position
Cursor column position
(nochange)
HeadVRAM addressdisplayed
Normal/reverse designation
Color designation
Cursor disdav
EXECUTION CONDITION
The PRV instruction is executed every scan whilethe
store
command is ON when the LEDA instruction is used. It is executed
only once at the leading edge of thestore command signal when
the LEDB instruction is used.
Instrunion
exwtion
Sequence program flow
Store command
Notdisdaved
step 0
c-1
OFF
ON
END
Instruction
procsuing execution
END
I
Step 0
SlapEND
I
1
I7
I
I
I
I
I
I
I
I
PRV (with LEDA)
PRV (with LEDB)
Instrunion
axwtion
I
I
I
0
END
I
Step 0
I
I
I
I
I
END
t
1
I
I
Instruction
exmion
Innrunion
execution
I
I
I
I
I
Step 0
I
I
I
I
I
I
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
In the following cases, an operation error occurs and an error flag
(M90ll)is set.
-Error
Description
The VRAM area address designuted by
7678.
ais
out of the range of 0 to
WH is not provided between the device number designated by
-Code
@ a n d the last device number of corresponding device.
I
The range of the number of characters to be stored beginning with the
VRAM area address designatedby a e x c e e d s address 7679.
The number of charactsrs to be rtored i s 0.
~
~~
G
-
Dam8 09091
50
504
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The following is an example. of the program used to store
characters "A3ACPUP21/R21r' at address 1000 and after in the
VRAMareas of the AD57 ldaded a t XNOCO to OFF.
Charaoters "A3ACPUP2l/R21" are stored in the. VRAM areas by
turningon XOOO.
R3RCPUP2
X080
BDELC- t
H9665
PRU
t
1
.
.
Designation of addresses 1500 and
after in the VRAM areas
LEDC
e
L
E
D
Head of the
devices
acters are stored.
in whic'h char-
P
The A S C I I instruction isused to convert characters to be,disptayeci
(A3ACPUP2l/R21) to the ASCII codes. Converted ASCII codes are
stored in DQ to D6.
"0" is stored in 07 todesignate the end of the range of characters
to bedisplayed.
By setting the head of the VRAM addresses to be displayed a t
address 1000 orbefore
by use of the CPS2 instruction,the
character store operation can be monitored on the display unit.
VRAM areas
1000
1001
1002
1003
1004
1005
L
Write of characters u p
to code OOH
1006
1007
1008
1009
OOH
designation End
1010
1011
1012
6-79
IB (Nn) 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
t
t
I
'1:
The number of steps varies with type of device
LEDA :atExecution
Display command
I
FUNCTION
used. See Section 5.2.
1-
ON
LEDB : Execution at
leading edge
W i n g data
LEDC : number
Device
is designated
Number
SUB : Constant is
designated
101
LEDR
I
Head I/O number of AD57
/@
of characters to
be displayed
Head number of the devices in which the ASCII
;:de;for
@
1
I
;i!hlc;ham3;;;
stored.
(1) The EPRN instruction is used to displaydesignated ASCII
characzters beginningwith currentcursorpositiononthe
0.
display unit of the AD57(Sl)/AD58 designated by
The characters to be displayed correspond to the ASCII codes
which are stored in the devices whichcorrespond tothe
number of characters designated by @ beginning with the
device number designated by @.
1
b15
-
bO
execution
Display unit
Cursor position
before
instruction
after
instruction
execution
@ 1 Number of characters I
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set " 1 2 ~ " a t 0.
f
!
f
6-80
L
I
IB (NAJ66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3) The number of characters designated by @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 valuespecified by the last device which is
designated by @.
(4) The ASCII codes to be stored in the devices designated by
@can be
set in the range of 0000~to 03FF".
If code 0400H or a higher code number isset, it is processed as
code 002014 (space code).
( 5 ) If the range ofthenumberof
characters designated by
@beginning with the cursor position exceeds the last
column ona line, the excess range laps around to column0 on
the nextline.
If the designated rangeexceeds the last column of the last line
on thescreen, characters up to thelast column on thelast line
are displayed. Theexcess characters are ignored,
I
I
I
ABC
1
b15-b0
"DE" areignored.
Cursor position
I
0
(7) After execution of the EPRN instruction,conditions
displaybecome as follows.
I
kern
I
Display mode
I
Cursor line position
Cursor column position
Head VRAM address displayed
-
Normalheverse desianation
Color designation
I
of the
I
Condition
(no change)
Plus one line if thedesignated range
exceeds the last column.
Currentcursor position plus designated
number
of
characters
I
(no change)
Cursor display
6-81
IB INAI 662574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXEGU-
CONDITION
The E W instruction ia.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.
Sequenceprogram flow
I
I
gFF 1i
Display command
I
I
I
I
I
I
I
I
I
I
I
EPRN (with LEDA)
I
EPRN (with LEDB)
OPERAlION ERROR
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In the fatiowing cases, an operation error occurs and an error flag
(M9011) is set.
Description
a
The range of the number of charactersdesinated by
beginning
with the device number designatedby & ? e x c e e d s the lastdevice
number of correspondingdevice.
The number of characters designated by
I
I
I
I
I
6-82
ais 0 or a negative value.
50
504
IB I N 4 6 6 2 5 7 4
/~ELSEC
?)J@353CONTROL INSTRUCTIONS
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
1
The following is anexample
of theprogram
used to display
characters whichcorrespond to charactercodes ~ O O Hto 1 0 5 ~
beginning with column20 on line 5 on a display unitconnected to
the AD57 loaded at WYOCO to OFF.
Charactersare displayed by turning on
XOOO.
:
D6
HOU
31
x ~ e e nsgss
t
6164
P H
IOU 6185
LOCQTE
t
05
Setting of data to
be
displayed
1
CLEDB
Cursor movementbythe
CATE instruction
(Section 6.3.3)
t-
LO-
CLEDR 3
C L E D BE P R N
-
CSUB
CSUB
3
H
666C 3
K
6
3 6 characters are designated.
cLE D C
Head of the devices in which characters are stored.
CLEDR 3
The character codes which correspond to the characters to be
displayedarestored in DO to D5.
b15
-
bO
Disdavunit
D3
w
Column 20
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
63.6 P i d a y & designated oharaatgrs up to code, OOn-...-EPR
*
.uq'
"IJtbbitt
Bit device
0
0
,.
Candmt Pohter Led
chi-
X Y M L S B F T C D W k . A O A l 2 V K H P . I
N
0 0
I pr j 2 1;
g
&
M9012 M9011
20
0 0 0 0 0
j;
0
0
'1: The number of steps varies with type of device used. See Section 5.2.
Store command
LEDA : Execution at ON
LEDE : Execution at leadingedge
Setting data
I
FUNCTION
Head number of thedevices in whichcharacter
codes forthecharacters
to be displayedare stored.
j LEDR
(1) The EPR instruction is used to display designated characters
beginning with current cursor position on the display unit of
the AD57(Sl)/AD58 designated by 0.
The characters to be displayed correspond to the character
codes which are storedinthe
devicesbeginningwiththe
device number designated by @ up to the device in which
code "0000~" is stored.
0
b15
-
bO
Cursor position
before instruction
execution
@+l
0083"
@+2
@+3
0085~
@+4
@+(n+l)
I
OOOO~
1-character code
0
1
Cursor position
after instruction
execution
1
code
End
range
of
(2) The head VO number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 isassigned to X.Yl20 to
13F, set "12"" at 0.
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 00011.1to O ~ F F H .
Since code "0000~"designates the end of the range of
characters to be displayed; it cannot be set as a character code.
If code " 0 4 0 0 ~ "or a higher code is set, it is processed as code
"0020H".
(4) The number'of characters which can be displayed by onetime
of processing equals to the number of characters from the
cursorpositiontothe
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 to thelast column on thelast line
are displayed. The excess characters are ignored.
I
1
Position
Cursor
I
ABC
DE
L - J U U
I
"DE" areignored.
(6) Afterexecutionofthe
EPR instruction,conditions
display become as follows.
item
Display mode
Cursor line position
Cursor columnposition
Head VRAM addressdisplayed
Normallreversedesignation
r
Color designation
6-85
of the
Condition
(no change)
Plus one line if thedesignated range
exceeds the last column.
Current cursor position plus designatednumber of characters
(no change)
1
IB INN 662576,
A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXECUTK)N-CONMTION
The EPR instruction is executed every scan while the store
cornma,ndis ON when the LEDA instruction is used. It is executed
only m.
at the leading edge of the store command signal when
the LEDB instruction is used.
Instruction
Sequenceprogram flow
gFF
command
Store
EPR
I
I
I
I
i
I
I
I
I
I
I
I
I
I
I1
I
I
(with LEDA)
I
I
EPR (with LEDB)
OPERATION ERROR
I
I
I
I
I
I
In the follcrwing cases, an operation error occurs and an error flag
(M9011) is set.
I
Description
Code WH is notprovidedbetweenthe
device numberdesignated by
@and the last device number of corresponding device.
The number of characters to be displayed is 0.
6-86
IwoosIososll
50
504
4
IB INAJ 68257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROORAM EXAMPLE
The followingis
an example of theprogramused
to display
characters which correspond to character codes ~ O O Hto 1 0 5 ~
beginning with column 20 and after on line 5 on a display unit
connected to the AD57 loaded at W O C O to OFF.
Characters are displayed by turning on XOOO.
H9836
EHOU
P H
8188
P H
8101
Dl
CHOU
P H
8182
3
D2
3
D3
3
IHOU
P H
8183
P H
80 14 8 4
P H
CHOU 0185
P K
HOU 8
H9,965
3
CHOU
CHOU
X808
D8
Setting of data to be displayed
Z
D5
3
D6
3
CLEDBLOCllTE
€SUB
€SUB
H
888C
Cursormovement
CATE instruction
(Section 6.3.3)
K
28
by the LO-
ELEOR
CLEDB
EPR
SUB
H
008C
Head of the devices in which characters 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
DO
Dl
-
W
Display unit
I
I
D2
'.Characters
1
D3
D4
D5
D6
.+
/
End designation
Column
20
6-87
IB INN 682574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
*1: The number of stepsvaries
with type of device used.See Section 5.2.
Stcr; ymyand)LEDA/LEDBIEPRM/
Setting
- data
LEDA : Execution at ON
LED8 : Execution at
edge
leading
t
@
LEDC : Device number
is designated
SUB : Constant is
J
designated
)
FUNCTION
I
Head I/O number of AD57
of the
address
Head
VRAMareas where characters
are
t o be
stored
101
I
Number of characters to
be stored
Head number of the devices in which character
(1) The EPRNV instruction is used to store designated characters
in the VRAM areas of the AD57(Sl)/AD58 designated by @
beginning with the address designated by @.
The characters to be stored correspondto thecharacter codes
which are stored in the devices whichcorrespond tothe
number of characters designated by @ beginning with the
device number designated by
a.
AD57(S1 )/AD58
VRAM areas
b15
@ 1 Number of characters I
I
-
bo
@+2
@+3
@+4
1-character code
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set "12H" at 0.
(3) The VRAM address to be designated by @can be set within
the range of 0 to 7679.
(See Section 1.1.1 for detail of the VRAMareas.)
(4) The number ofcharacters to be designated by@ can be setat
any number of characters stored at addresses beginning with
the address designated by @up to
address 7679.
However, a value which exceeds the last device number of the
devices designatedby @cannot be set.
(5) The character codes to be stored in the devices designated by
@can be set in the range of 0000~to O~FFH.
If code "0400~"
or a higher code is set, it is processed as code
"0020H" (space code).
characters designated by
(6) If the range ofthenumberof
@beginning with the
address designatedby@exceeds
address 7679, an error occurs andprocessingisnotperformed.
(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
display become as follows.
I Cursor
oosition
column
HeadVRAM
of the
I
addressdisplayed
(no change)
Normal/reverse designation
Color designation
Cursor display
EXECUTION CONDITION
The EPRNV instructionis executed every scan whilethe store
command is ON when the LEDA instruction is used. It is executed
only once a t the leading edge of the store commandsignal when
the LEDB instruction is used.
Sequence programflow
Store command
gFFA
I
I
i
I
I
I
I
I
I
I
I
I
I
I
I
EPRNV (with LEDA)
EPRNV (with LEDB)
I
1
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
0
I
I
I
I
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
WBRm~W7ERROR
,
.
.
,
In thejfdiowing cases1 812 operationerror occurs and an errorflag
(M9011h , r is set.
I'
\
3
:
Description
a
a
The VRAM area address designated by
7673.
The numbe? of characters designate by
is out of the range of 0 to
is 0 or a negative value.
a
a
number of chhgraste@ desi nated
by
beginning
Theiraqqq of
witH h devicenumberdesignatedby&exceedsthelastdevice
number of corresponding device.
. Ths rqngesf she number of c#prat$ern designated by
beginning
area address des-ignated by
exceeds address 7679.
with
a
V
w
PROGRAM EXAMPLE
50
504
The following is an example of
the
program
used to store
char-s
which correspond to character codes 100H to 105H
beginning with address 1000 in the VRAM areas of the AD57
loaded at W O C O to OFF.
Characters are stored in the VRAM areas by turning on XOOO.
Setting of characters to be processed
-
[sue
H
eeec
3
K
-
[SUB
-
LEDC
Designation of addresses
1100 to
1105 (for 6 characters) in the
VRAM areas
1
DB
--
Head of the devices in which characters
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 ofthe CPS2 instruction, the
character store operation can be monitored on the display unit.
VRAM areas
b15
-
bO
~E~~lW~i~~~u~~o~;
I----------
Store of 6 characters
*
1005
.
.
I
105~
I
MEMO
................................
..................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
IB (NAJ 6 6 2 5 7 4
-. . . . . . . . . . . .
I
/MELSEC
;
6. AD57(S1)/AD58
CONTROL
INSTRUCTIONS
6. AD57(Sl)/AD58
CONTROL
INSTRUCTIONS
I
6.5.8 Store of designatedcharacters up to code OOH in the VRAM areas......EPRV
M o l 2 MWll
I +1: The number of steps varies with typeofdeviceused.
Store command
See Section 5.2.
1
LEDA : Execution at ON
1 LEDB : Execution at
w i n g data
leadingedge
LEDC : Device number
is designated
is
SUB : Constant
designated
Head
address
the
of
to be stored.
acters
are
codes for thecharacters
to bestored are stored.
FUNCTION
(1) The EPRV instruction is used to store designated characters in
@
the VRAMareas
oftheAD57(Sl)/AD58designatedby
beginning with the address designated by @.
The characters to be stored correspondto the character codes
which are stored inthe devices beginningwiththe device
number designated by @ up to the device in which code
"OOH" is stored.
@ I VRAM address]
b15
-
1
I
II
areas
I
VRAM
I
bO
'Ode
End of range
code
!
(2) The head I/O number of the AD57(Sl)/AD58 designated by@
should be upper2digits of 3hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set "12~'' at 0.
(3) The VRAM address to be designated by @can be set within
the range of 0 to 7679.
(See Section 1.1.1 for detail of the VRAMareas.)
6-91
IB (NAI e6257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) The character codes to be storedin the d e v h designated by
@can be set in the range of 0001~to O ~ F F H .
Since code " 0 0 0 0 ~ "designates the endof
the range of
characters to be displayed, it cannot beset as acharacter code.
If code "0400~"
or a higher code is set, it is processed as code
ff0020H" (space code).
(5) The number of characters which can be stored by one time of
processing equals to thenumberof
characters fromthe
address designated by @up to
address 7679.
(6) If the range of the number of characters beginning with the
address designated by @exceeds address 7679, an error
occurs andprocessing is not performed.
(7) If characters are stored in the areas currently being displayed,
such characters are displayed on the screen.
(8) After execution ofthe EPRV instruction,conditions
display become as follows.
kern
ofthe
Condition
Display mode
Cursor lineposition
Cursor columnposition
(no change)
Head VRAM addressdisplayed
Normalheversedesignation
Color designation
Cursor disdav
EXECUTIONCONDITION
The EPRV instruction is executed every scan whilethe store
command isON 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.
Sequence programflow
I
I
I
I
i
Store command
I
I
I
I
I
I
I
I
EPRV (with LEDA)
I
I
I
I
I
I
I
EPRV (with LEDB)
OPERATION ERROR
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In thefollowing cases, anoperationerror
(M9011) is set.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
occurs and an errorflag
Description
The VRAM area address designated by a i s out of the range of 0 to
7679.
Code 0 0 ~is not provided between the device number designated by
dna@
l
thelastdevicenumber
of correspondingdevice.
The range of the number of characters to be stored beginning with the
VRAMarea addressdesignatedby@exceeds
address 7679.
The number of characters to bestored is 0.
6-92
I
I
Error Code
D9008 D9061
50
504
18 (NA) 662574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM GXAMPLE
The following
is
an example
of
the
program
used
to store
characters which correspond to character codes 100H to 105H a t
addresses 1OOO and after in the VRAM areas of the AD57 loaded at
W O C O to OFF.
Charactersare stored in the VRAMareas by turning on XOOO.
Designation of addresses 1400
and after inthe VRAM areas
Head of the devices in which characters are stored.
The character codes which correspond to the characters to
be
stored are stored in DO to D5.
"0" is stored inD6 to designate the endof the range of characters
to be displayed.
By setting the head of the VRAM addresses to be displayed at
address1000 orbefore
by use of the CPS2 instruction, the
character store operation can be monitored on the display unit.
VRAM areas
1
1101
1102
1103
1104
11105
103~
1
I
105~
I
I
I
MEMO
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
...................................................................................................................................................................
18 lNAl 682574
6. AD57(S1)/AD58
CONTROL
INSTRUCTIONS
6. AD57(Sl)/AD58
CONTROL
INSTRUCTIONS
/MELSE
I
J .
6.5.9 Horizontal repeated display of adesignated character.....-CRl
.
i
I
'1: The number of steps varies with type of device used. See Section 5.2.
Mode setting command
LEDA : Execution at ON
LEDB : Execution at
leadingedge
1
LEDC : Device number
designated
is
I
FUNCTION
designated
W i n g data
@
I
I
Head 110 number of AD57
Code ofcharacter
a
displayed
to be
I
(1) The CR1 instruction is used to display a designated character
which correspondto thecharacter code designatedby @for
the number of characters designated by @beginning with
current cursor position to the right on thedisplay unit of the
AD57(Sl)/AD58 designated by 0.
@ I Number ofcharacters 1 '
Cursor position before
instructionexecution
Cursor position after
instructionexecution
(2) The CR1 instruction is used to display horizontal lines of a
table and bar graphs.
(3) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set "1 2H" at 0.
(4) The character code designated by @ can be set within the
range of 00" to 3FFH.
If code 400H or higher is designated, an error occurs.
6-94
1
Y
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(5) The number of characters designated by @can be set within
the range of 1 to 80.
(6) If therange
of thenumberof
characters designated by
@beginningwiththe
cursorposition
exceeds the last
column ona line, the excess range of characters laps around to
column 0 on the next line.
If the designated rangeexceeds the last column of thelast line
on the screen, characters up to thelast column on thelast line
are displayed. The excess characters are ignored.
"AA" (2 characters)
are ignored.
of the
(7) Afterexecution
of the CR1 instruction,conditions
display become as follows.
1 -
I
km
Display mode
I
I
Condition
Cursorlineposition
(no change)
Plus one line if thedesignated range
exceeds thelastcolumn.
Cursor column position
Current cursor position plus designated
number
of characters
Head VRAM addressdisplayed
Norrnal/reverse designation
Color designation
I
(no change)
Cursor display
EXECUTIONCONDITION
The CR1 instructionis executed every scan whilethe display
command is ON when the LEDA instruction is used. It is executed
only once at theleading edge of the displaycommandsignal
whenthe LEDB instruction is used.
END
Mode setting command
gpFAG
-
I
I
I
I
I
I
I
I
I
I
CR1 (with LEDA)
I
I
I
I
I
I
I
I
CR1 (with LEDB)
/'
6-95
Step 0
n
I
Sequence program flow
END
,
,
Step 0
I
I
I
I
END
I
I
I
II
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Step 0
n
,
1
I
I
I
I
I
I
IB INN 662574
..
A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
O P E R A W ERROR
.Inthefollowing cases, an operationerror occurs and an errorflag
(M9011) is set.
-
Error Code
Doscripdon
The Character code designated bv (5i) is out of the range of 0 to 3FF.
.I
I
The number of characters designated b
y
'
m
i
s
out of the range of 1 to
EO.
PROGRAM EXAMPLE
D9008ID9091
I
50
I
503
I
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 a t
W O C O to OFF.
A designated character isdisplayed repeatedly beginningwith
column 20 on line 5 by turning on XOOO.
[SUB
H
eeec 3
€SUB
K
5
€SUB
K
28
Cursor movement by the LOCATE
instruction
(Section 6.3.3)
3
3
CLEDR 3
I
3
CRl CLEDB
[SUB
H
eeec 3
H
eeFB
[SUB
K
28
Designation of the character which
correspondstocode
FBH
3 Designation
for
4
20 characters
LLE
Display unit
20 characters
Line 5
....................b b b b b b b b b b b b b b b b b b b b
; \
...................................
~
~
i
Characters which correspond to code OFBC( . /
I
...................................I
t
6-96
IB (NAI 6 6 2 5 7 4
b
b
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
I6 INA) 66257-A
-
.__ .......... - ...
-.. -..........
-
.....
/MELSEC-A
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
6.5.10 Horizontalrepeated display of a pair of designatedcharacters..**..CR2
I
@
@
0 0 0 0 0
0 0 0 0 0
'1: The number of stepsvaries
LEDA/LEDB( CR2
1
?
0 0
I
0 0
with type of deviceused.See
Mode setting command
,'
Section 5.2.
LEDA : Execution at
LEDB : Execution at
leadingedge
,
ON
i
Setting data
LEDC : Device number
is designated
SUB : Constant is
designated
@
Number of characters to
be displayed
(1) The CR2 instruction is used to display repeatedly a pair of
designated characters each of which corresponds to respective character code designated by @ and @ on a display
unit connected to the AD57(Sl)/AD58 which is designated by
0.
Repeated displaybegins with the cursor position and conof pairs of
tinueshorizontally to the right for the number
characters designated by @.
@ 1 Number of characters 1
-
aI
-
I
Character code 1
@ 1 Character code 1
I
I
1
I
-
C
I
I
I
I1
I
d
I
I
I
I
I
'
Cursor Dosition after
instruction
execution
I
I
I
I
(2) The CR2 instruction is used to displayrepeatedlyon
a
horizontal line a pair of characters which make one complete
figure.
(3) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set "1 2H" at 0.
4
(4) The character codes designated by @ and @
can I
be set
within the range of OOH to 3FFn.
If code 40On or higher is designated, an error occurs.
(5)The character code designated by @corresponds to the left
halfof
each pair, and the character codedesignated
@corresponds to the right half of each pair.
by
(6) The number of characters designated by @corresponds
to
the number of pairs of characters which are designated by
@and B a n d can be set within the range of 1 to 40.
Example)
Characterdesignated
by
(@
Characterdesignated
by
@
(7) If the range ofthenumberof
characters designated by
@beginningwiththe
cursorposition
exceeds the last
column ona line, the excess range of characters laps around to
column 0 on thenextline.
If the designatedrange exceeds the last column of thelast line
on thescreen, characters up to thelast column on thelast line
are displayed. The excess characters are ignored.
"V" (2 characters)
is ignored.
( 8 ) Afterexecution
ofthe
CR2 instruction,conditions
display become as follows.
ltm
chanae)
(no
I
ofthe
Condition
DisDlav mode
Cursor line position
Cursor column position
Head VRAM addressdisplayed
Normal/reversedesignation
Color designation
Cursordisplay
u 'YU
Plus one line if the designated range
exceeds the last column.
Currentcursor position plus twice
the designated number of characters
I
I
(no change)
IB (NAJ 682574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXECUTION CONDITION
The (332 instruction is executed every scan whilethe 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 LED6 instruction is used.
c
Sequenceprogram flow
Mode setting command ON
OFF
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
CR2 (with LEDA)
I
CR2 (with LEDB)
OPERATION ERROR
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
In the following cases, an operation error occurs and an error flag
(M9011)is set.
i
f
I
Error Code
The charactercodesdesignated by @)and
0 to 3FF.
The number of characters designated by
t
.
6-99
are outof therange of
ais out of the range of
1 to
IB (NAI 66257-A
1
,
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
'
The following is an example of theprogram.used
to display
horizontally 20 pairs of characters which correspond to charecter
codes OFDH and OFEH on a display unit connected to the
AD57
loaded at W O C O to OFF.
A pair of designated charactersis displayed repeatedly beginning
with column 20 on line 5 by turning on XOOO.
Cursormovement
CATE instruction
(Section 6.3.3)
by the
LO-
CLEDBCR2
[SUB
888C
Designation of thecharacters
which correspond to codes FDH
and FEH
Designation for 20 pairs of charac-
LEDR
Display unit
I
20 pairs
.
:
i:
.
I
' -OFDH
--________
I
corresponds
code
to
L
u- I V V
IB (NAJ862574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
I '1:
The numberofstepsvaries
with typeofdevice
used. See Section 5.2.
LEDA : Execution atON
LEDB : Execution at
leadingedge
W i n g data
LEDC : Device number
is designated
SUB : Constantis
designated
I
Head I/O number of AD57
@
Code of a character to be
displayed
Number of characters to
0 be
displayedDisplaymode
setting data
'
FUNCTION
@
(1) The CC1 instruction is used to display repeatedly a designated
character which correspond to the character code designated
by @for the number of
characters designated by @ i n a
vertical direction beginning withcurrent cursorposition onthe
display unit of the AD57(Sl)/AD58 designated by
0.
@ I Number of characters 1
I
f AA 0
Cursorpositionbefore
Instruction execution
+
[&
-
Cursor position after
instructionexecution
I
(2) The CC1 instruction is used to display vertical lines of a table
and bargraphs.
(3) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimal digits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to 13F,
set " 1 2 ~ "at 0.
0can be
(4) The character code designated by
range of OOH to 3FFH.
If code 400H or higher is designated,
set within the
an error occurs.
1
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(5) The number of characters designated by @can be $et within
the range of 1 to 20.
(6) Ifthe
of characters designated by
range ofthenumber
@ beginning with the cursor position exceeds line 0, only the
0 are displayed. The
characters from thecursor position to line
excess characters are ignored.
21
(7) Afterexecution
ofthe
CC1 instruction,conditions
display become as follows.
I
I
ttm
Display mode
Ignored.
of the
1
Condition
~
(no change)
Currentline minusthe number of
designated characters
Cursor lineposition
Cursor columnposition
Head VRAM address displayed
Normallreversedesignation
Currentcolumnpositionplusone
(no change)
Color designation
Cursor display
EXECUTIONCONDITION
The CC1 instructionis executed every scan whilethe display
command is ON when the LEDA instruction is used. It is executed
only once a t the leading edge of the display command signal
whenthe LEDB instructionis used.
Inmion
END
Instruction
Sequence program flow
Mode setting command
gFFA
I
I
i
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
CC1 (with LEDA)
I
I
I
CC1 (with LEDB)
OPERATION ERROR
I
I
I
I
I
I
I
I
I
I
I
I
In the followingcases, an operation error occurs and an error flag
(M9011) is set.
Description
a
The character code designated by
is out of the range of 0 to 3FF.
The number of characters designated by
is out of the range of 1 to
20.
a
I
Errorcod.
50
I
1 I
503
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
YWGRA&(EjXPkE
,
.
..
,:
T&
fdLFiqg is. an example of the program used to display
vekically lo-eharacters which corresponds to character code OFBH
on a display unit connected to the AD57 loaded at WYOCO to OFF.
A desippted chacacyt. is djspbysd repeatedly beginning with
,durnq,21Q;
on .line; 15 by- turning on XOOO.
L
. .
€SUR
K
15
3
€SUB
K
29
3
Cursor movement by the LOCATEinstruction
(Section 6.3.3)
rLEDR 3
CLEDB C C l
CSUB
*
€SUB
. .
rSUB
H
3
eeec 3
H
Designation of the character which
8 e F B 3 corresponds to code FBH
K
19
3 Designationfor 10 characters
CLEDR 3
I
Line 15..
1
-Dispfuyunit
10 characters
...... ....I
: Vr-_________
,
Characters which
cor-?
,
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
/MELSEC
1
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
of apair
6.5.12 Verticalrepeateddisplay
'1: The number of stepsvaries with type
of designated characters..+.-.CC2
.'
.
I
"
J
1*'.
i7#
': -*
::A
fi
-?
f.
of device used. See Section 5.2.
LEDA : Execution at ON
LEDB : Execution at leadingedge
Setting data
LEDC : Device number
is designated
SUB : Constantis
designated
@
Head I/O number of AD57
5
Codes of a pair of characters to be displayed
@
FUNCTION
Display mode setting data
(1) The CC2 instruction is used to display repeatedly a pair of
designated characters each of which corresponds to respecand I
@ o n a display
tive character code designated by @
unit connected to the AD57(Sl)/AD58 whichis designated by
0.
Characters are paired side by side and displayed vertically
beginning with the cursor position for the number of pairs of
characters designatedby @.
@
@
Number of characters]
Character code
1
I 1
0-Cursor position after
instructionexecution
S2
Character code
O - - L
\
r
Curso; positionbefore
instructionexecution
(2) The CC2 instructionis used to displayverticallypairs
characters. Each pair makes onecompletefigure.
of
(3) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimal digits.
Example) If theAD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set 'f12Hffat
6-104
0.
IB (NAI 66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) The.character codes de&igmted by @
&I&@; am hi
eJ
:&&t
within the range of 00"
3FFH.
If code 4U& or htghef. is designated, an error occurs.
t
o
,
( 5 ) The character code designated by @
corresponds
I
to the left
half of each pair, andthe' character code designated by
@corresponds to the right half of each pair.
( 6 ) The number of characters desimated by-Q:ean tje'stWbiM
the range of 1 to. 20.
'
(7) If the range of thenumber
of characters designated by
@beginning with the cursor position exceeds line 0, only the
characters from the cursor positionto line 0 are displayed. The
excess characters are ignored.
1
Cursor position
(8) After execution of theCC2 instruction, conditions ofthe display
become as follows.
item
(no
Condition
chanoe)
Currentline minus thedesignated
number of characters
Disolav mode
Cursor line position
Normalhverse designation
Color designation
Cursor display
EXECUTION CONDtTtON
(no change)
The CC2 instructionis executed every scan whilethe display
command is ON when the LEDA instruction is used. It is executed
only once at theleading edge ofthedisplaycommandsignal
whe,n the LED6 :instruction is used.
1
execution
Instruction
step 0
Sequence program flow
I
Mode setting command
I
END
execubon
proceaalng lneru(tion
StepEND
I
I
I
i
I
I
I
1
t.7
0
I
I
I
I
lnnruction
execution
END
I
I
I
Step 0
1
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Ineruction
execcution
StnpEND
I
CC2 (with LEDA)
CC2 (with LEDB)
two columns
Currentcolumnplus
Cursor columnposition
HeadVRAM addressdisplayed
I
0
1
I
Instruction
execution
StepEND
I
1
0
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
o
P
E
R
A
T
K
)
1
Y
f
E
R
R
Q
R
t
r
t the fohwing
as-, an operation error occurs and an error flag
0
(M9011) is set.
a
The c h a r h e r codas designated by @
and
l
are out of the range of
0 to m .
The number of characters designated by a i s out of the range of 1 to
50
%
503
20.
-RAM
EXAMPLE
The following is anexample 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 W O C O to OFF.
A pair of designated characters is displayed repeatedly beginning
withcolumn 20 on line 15 by turning on XOOO.
SUB
29
,
Cursor movement by the LOCATE instruction
(Section 6.3.3)
Designation of the characters
which correspond to codes FBH
and FCn
Designation for 10 pairs of characters
i
Display unit
Line 15
.%
~~~
Column 20
6-1 06
IB (NA) 6 8 2 5 7 4
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.6 Fixed Character Display Instructions
The fixed character displayinstructions
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
displayinstructions.
The fixed character display instructions are classified as follows.
-
Instruction
.
CINMP
Displays aminus symbol( - 1 one column to theleft
of the designated numberof columns beginning with
thecursoroosition.
(hyphen)
dis-
CINHP
Displaysa hyphen ( - ) attheoursorposition.
"." (periodor decimal point) displav
CINPT
Displays a period or a decimal point ( . ) at the cursor
position.
"-" (minus
symboll display
"-"
Play
I
~
"0" disDlav
I
"1" display
"3" display
"4" display
I ':5"
displav
"6" display
"7" display
"8" display
I
4
"9" display
"A" disDlav
"B" disolav
"C" display
"D"display
"E"
CIN5
I CIN6
1 CIN7
I CIN8
I CIN9
1
I
ClNA
ClNB
Displays "3" at thecursorposition.
'
Disdavs "4" atthecursorDosition.
1 Disdavs "5" atcursor
Dosition.
the
I Displays
I Displays "7" atthecursorposition.
I Displays "8" atthecursorposition.
I Displays "9" at thecursorposition.
1
1
ClNC
~
Displays "E" at thecursorposition.
ClNF
DisDlavs "F" atthecursorDosition.
I "I" display
"J" display
"K"display
I "L" disolav
I " M " d'Isolav
'N"
I ClNl
I ClNJ
I ClNK
I
1
ClNL
ClNM
I
I
I
I
Disolavscursor
Dosition.
"G"
the at
DisDlavs "H"
cursor
Dosition.
theat
I Displays "I" atcursor
position.
the
I Displays "J" atthecursorposition.
~
~
I
I
ClNN
Displayi "0"at thecursorposition.
"P" display
ClNP
Displays "P" at thecursorposition.
" V " display
I "w" disDlav
"X" display
"Y" display
"Z" display
" " (space)display
ClNQ
ClNR
I
Displavs "Q" at thecursorDosition.
DisDlavs "R" atcursor
oosition.
the
ClNT
Displays "T" at thecursorposition.
Displays
ClNW
ClNY
ClNZ
ClNSP
0-1 07
I
Displays "S" at thecursorposition.
ClNU
ClNV
I ClNX
I
I
Displays "N" at thecursorposition.
ClNS
1
I
DisDlavs " M " at
cursor
oosition.
the
CINO
I
I
~~~
DisDlavs cursor
"L"
Dosition.
theat
display
"R" disolav
"S" display
"T" display
"U" display
~~
I Displays "K" atthecursorposition.
"0" display
"Q" displav
~~~~~~~~
I
I
CINE
ClNG
ClNH
~
Displays"C"atthecursorposition.
Displays "D" at thecursorposition.
ClND
1
I
~
DisDlavs "A" atcursor
Dosition.
the
Disolavs "B" atcursor
oosition.
the
display
disDlav
I
"6" at the
cursor
position.
"F" displav
"G" d'm l a v
I
I "H"
I
I
I
Displays "1" atthecursorposition.
Displays "2" atthecursorposition.
CIN3
CIN4
~~~~
I Disolavs cursor
"0"
Dosition.
theat
ClNO
CINl
CIN2
"2" display
r
[kruiption
Name
1
"U" at thecursorposition.
Displavs "V" at thecursoroosition.
DisDlavs "W"
cursor
the
Dosition.
at
I
Displays "X" at thecursorposition.
Displays"Y"atthecursorposition.
Displays "Z" at thecursorposition.
Displays a space symbol ( " " ) at the cursor position.
IB
lNAl e62574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.6.1 Display of a minus symbol ("-").---. ClNMP
uI.bk&vkM
I
X
0
0
Y
y
M
.:kvicr
L
S
B
F
T
C
word ilbw)d.vicr
D
W
R
A
O
A
'1: l b number of steps varies with type of- device
I
FUNCTlON
.
l
Z
V
1
K
H
P
I
N
0 0
0 0
0 0 0 0 0
>Ii
CocrtntPokaLml
%
m 1 2 m11
20
used. See Section 5.2.
I
LEDA : Execution at ON
LEDB : Exeartion at
leading edge
LEDC : Device number
is designated
SUB : Constant is
designated
setting data
I
-@
@
Head VO number of AD57
1
Number of display columns
I
I
(1) TheClNMP instruction is usedto display a minus ( - ) symbol
of thecolumnsdesignatedby
@
onecolumntotheleft
beginning with the cursor position on the display unit of the
AD!57(Sl)/AD58 designated by0.
The characters between the
minus symbol and the cursor are cleared.
I
"-" is .displayed Cursor- position
I
(2) The head I/O number of the AD57(Sl)/AD58 designated by 0
should be upper 2 digits of 3 hexadecimal digits.
Example) If the AD5761 )/AD58 is assigned to W 1 2 0 to
13F, set "1 2n" at 0.
6-1 08
IB (NAI 662574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3) The number of display columns designated by @ can be set
withinthe range of 1 to 16.
Characters can be displayed at thedesignateddisplaycolumns using the CINL:: instructions.
(4) If the range of the number of columns designated by @plus
one columnbeginningwiththe
cursorpositioni exceeds
column 0 on a line, the excess range laps around to the last
column of the previousline, 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 on the
screen, a minus symbol is displayed at column 0 on line 0.
t
-uu
r-1
I
l
r-7
ull: ;
t
0
Cursor position
uuL-J
Minussymbo
display
t
M‘inus symboldisplay
(5) After execution of the CINMP instruction, conditions
displaybecome as follows.
Condition
kern
DisDlav mode
I Cursor
of the
I
tine Dosition
(no change)
Color designation
EXECUTIONCONDITION
The CINMP instruction is executedevery scan while thedisplay
command is ON when the LEDA instruction is used. It is executed
only once a t theleading edge ofthedisplay command signal
whenthe LEDB instruction is used.
Sequence program flow
Display command
gFF
c-A
I
I
I
I
I
I
I
I
I
I
I
I
I
CINMP (with LEDA)
I
I
I
CINMP (with LEDB)
I
I
I
I
I
I
I
I
I
I
I
I
I
t i
I
I
1
I
I
I
I
I
I
I
I
I
I
I
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
OPERATION ERROR
Inthefollowing
case, an operationerror
(M9011) is set.
I
~
PROGRAM EXAMPLE
i
c
The numberof display columns designatedby
to 16.
~~
~
occurs and an errorflag
r
L
0is out of the rangeof 1
~~
~~
~~
~~
The following is an example of the program used to display a
minus symbol ( - ,) on a display 'unit connected to the AD57
loaded at W O C O to OFF.
A minus symbol is displayed by turning on
XOFO.
The position of displayi s designated a t columns 45 to 50 on line 5.
'
Cursor movement by the LOCATE instruction (Section
6.3.3)
1
I
F
t
Thenumber of display columns
is designated at 5.
I
)1
L
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.
I
Display unit
~~
~
Designated display columns (5)
1
I
MEMO
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
IB (NAJ 88257-A
/MELSEC
6. AM7(Sl)/AD58 CONTROL
INSTRUCTIONS
6.6.2 Display
hyphen
of a
.:
("-")*-***43NHP
0
X
Y
M
L
S
Constant Pointer Lml
Word (16-bit) device
B
F
T
C
D
W
R
A
O
A
l
V
K
H
P
l
N
0 0
0 0
c o o c 3
0
Z
, 4 ..i :
I
l i8 f 2 JE,Pfp
Usable devices
Btt device
:
~
I
Mol2 m 1 1
* l : The number of steps varies with type of device used. See Section 5.2.
Display command
M- 1
FUNCTION
LEDA : Execution at ON
LEDB : Execution at leadingedge
LEDC/SUB
LEDC : Device
number
is designated
SUB : Constant is
designated
Number
-ing
@
I
data
Head I/O number of AD57
ofcoldisplay
I
(1) The CINHP instruction is used to display a hyphen ( - ) at the
cursor position and shift the characters in the range designated by 0beginning with the cursor position one columnto
the left on the display unit of the AD57(Sl)/AD58 designated
by 0.
0I Number of display columns)
i
Cursor position
0
,B,,C,,D,,E ,, F,[-]
i
A hyphenisdisplayed.
(2) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimaldigits.
Example) If theAD57(Sl)/AD58 is assigned to XN120 to
13F, set "1 2H'' at 0.
(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 displaycolumns usingthe CIN[:I instructions.
When a character is displayed by use of the CIN[:I instruction
within the designated display columns, characters are shifted
left.
one column to the
1
6-111
I6 (NAI €82574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) If the range of display columns designated by @beginning
with the cursor positionexceeds column 0 on a line, the excess
range laps around to the last columnof the previousline. 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, onlythe characters uptocolumn
0 on line 0 are
shifted.
Characters which exceed column 0 on line 0 areerased.
I
A hyphen' is displayed.
I
A hyphen is displayed
(5) Afterexecution of the CINHP instruction,conditions
display become as follows.
I
I
kern
of the
Condition
~
Display mode
Cursor line position
Cursor column position
Head VRAM addressdisplayed
I
(nochange)
Nomallreverse designation
Colordesignation
Cursordisplay
EXECUTIONCONDITION
The CINHP instruction is executed every scan whilethe display
command is ON when the LEDA instruction is used. It is executed
only once at theleading edge of thedisplaycommandsignal
whenthe LEDB instruction is used.
Sequence programflow
Display command
c-1
gFF
I
I
I
I
I
I
I
I
I
I
I
I
CINHP (with LEDA)
I
I
I
I
I
I
I
CINHP (with LEDB)
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
OP€RAllON ERROR
In thefollowing case,. anoperationerror
(M9011) is set.
occurs and an errorflag
D.roripabn
The number of display columns designetbd by
of 1 to 16.
PROGRAM fXAMPLE
I
Error Code
($ is out of
D9008 w
o
g
l
the range
5O
w3
The followingis an exampb of theprogram used to display a
hyphen ( - ) on a display unit connected to the AD57 loaded at
W O C O to OFF.
A hyphen is displayed by turning on XOE8.
The position of display is
designated a t columns 45 to 50 on line5.
i
Cursor movement by the LOCATE instruction (Section
6.3.3)
t
The number of display columns
is designated at 5.
I
CLEDR
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 ofthe CINHP instruction, a hyphen ( - ) is displayed at
thecursorposition,
and the characters within the designated
range are shifted one column to the left.
Line 5
I
..I...
I
Display unit
.....................
ry-I
1
-
Designated display columns (5)
AD5R
------- -/;L
D W a y of a hyphen
bv the CINHP instruc- I
~
:#Cursorposition;
:
.L
L
1
.
-
.
6-1 13
IB (NAJ €62574
MEMO
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
IB (NAI 662574
_--......-..-
-11._1
-
/MELSEC
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
6.6.3 Display of aperiod or adecimalpoint
(".")***-**CINPT
,
Usable devices
Bit device
0
0
X
Y
M
L
S
B
F
T
C
D
W
R
A
O
A
-
Pointer Constant
M
Word (l&bit
device
)
l
Z
V
K
H
P
I
N
0 0
0 0
0 0 0 0 0
g
20
.
.
m o l 2 M9011-
0
0
4
*1: The number of stepsvaries with type of deviceused. See Section 5.2.
command
4
LEDA : Execution at ON
lLEDAiLEDB
lCINPT
LEOB : Execution at leading edge
{
SUB
LEDC/SUB
I
LEDC : Device number
is designated
4
designated
Sating data
0 I Head I/O number of AD57
Number of displaycol-
I
I
I
FUNCTION
(1) The CINPT instruction is used to display a period
or a decimal
point ( . ) a t the cursor position and shift the characters in the
cursor position one
range designated by@ beginning with the
column to the left on the display unit of the AD57(Sl)/AD58
designatedby 0.
@ I Number of displa-1
I
1
,B, IC, ID, IEl IF,:.I
r--7
I
Cursor posiiionl
Aperiodor
a decimal-)
point is disdaved.
(2) The head I/O number of the AD57(Sl)/AD58 designated by@
should be upper 2 digits of 3hexadecimaldigits.
Example) If the AD57(S1)/AD58 is assigned t o W 1 2 0 to
13F, set ''lZH" at @.
(3) The number of display columns designated by 0can be set
withinthe range of 1 to 16.
Characters canbe displayed at thedesignateddisplaycolumns using the GIN[:! instructions.
When a character is displayed by use of the GIN::! instruction
within the designated display columns, characters are shifted
one column to the left.
I
6-114
I6 (NA) 662574
c
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) If the range of display columns designated
@beginning
with the cursorposition exceeds column 0 on a line, the excess
range laps around to thelast column of the previousline. 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, onlythe characters up to column 0 on line 0 are
shifted.
Characters which exceed column 0 on line 0 are erased.
,
,cI 1
~, E ,,
+
b
y
AL!3
A period(becimalpoint)
is displayed.
Cursor position
r-1
IDIIEIIFIiLJ
t
A hyphen(decimalpoint)
is displayed.
(5) After execution of the CINPT instruction,conditions
display become as follows.
kern
Display mode
of the
Condition
I
(no change)
I
Cursor lineposition
Cursorcolumnoosition
1 Head VRAMdisplayed
address
I
Normalhverse designation
Color designation
II
I Cursor
display
EXECUTIONCONDITION
The CINPT instructionis executed every scan whilethe display
command is ON when the LEDA instruction is used. It is executed
only once a t the leading edge of the display command signal
whenthe LEDB instructionis used.
a d o n
Sequence program flow
Display command
gFF
I
I
I
I
I
I
I
6-115
I
1
I
I
I
I
I
I
I
I
I
I
I
I
I
I
CINPT (with LEDB)
II
I
I
I
CINPT (with LEDA)
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
IB (N4J 882574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
,
-
i
I
' .
_r .P
'
*.
I
Daaipion
.
,
The number of display columns designatddby @ is outof the rangeof 1
to ~16:,v~>
: .
. .
,
,
PRoGlWM EXAMPLE
. .
.
.
Error Code
Do008 m 1
5o
503
The foH&irig is an example of theprogram used to display a
period or a decimal point ( . 1 on a display unit connected to the
AD59:ldM6d' at W O C O ' to OFF.
A period or a decimal point is displayed by turning on XODF.
The.psstttbn af display is designated at columns 45 to 50 on line5.
t
Cursormovementbythe
LOCATE instruction (Section 6.3.3)
t
7
---------LLEDR
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
thedesignatedrange are shifted one column to the left.
Display unit
Line
I
5 e . a
-
Designateddisplaycolumns
1 ..............................,
I
Column 50
(5)
I
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
..........................................................................................................................................................................
......................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
/MELSEC
6. AD57(Sl)/AD58 CONTROL INSTRUCTIONS
I
01
7;
coynand
t
FUNCTION
Instruction number in
LEDA/LEDB
s
SUB
L II:
LEDC/SUB
q
O
[::
LEDA : Execution
at
ON
CINO-CIN9
LEDB : Execution at
CINA-CINZ
leadingedge
LEDC : Device number
is designated
Setting data
: Constantis
designated
Number of displaycol-
(1) The CIN[:I instruction is used to display the alphanumeric
characters ("0" to "9" or "A" to''2")at the cursor position and
shift the characters in the range designated by @ beginning
with the cursor position one columnto the left on the display
unit of the AD57(Sl)/AD58
designated by 0.
I
Cursor position
I
0
(2) Use the following instructions according to the alphanumeric
characters to be displayed.
CIN1
'1"
CINE
'E"
ClNL
'L"
CIN2
'2"
ClNC
'C"
ClNK
'M"
CIN3
'3"
ClND
'D"
ClNN
'N"
CIN7
"7"
ClNH
'R"
'8"
ClNl
ClNJ
'H"
"I"
ClNR
CINE
CIN9
ClNS
ClNT
'T"
"9"
6-1 17
'J"
ClNV
.. . .
1
'V"
'S"
IB (NA) 66257-A
1
!
1
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3)The head 110 number of the AD57(StVADWl%bd~sared,bY@
should be upper 2 digits of- 3 hexadecimal digits.
Example) lf the Ap57(Sl)/AD58 is assigned to W 1 2 0 to
13F, set " 1 2 ~ ' 'at
0.
(4) The number of display columns designated by @ can be set
within the range of ,I to 16.
Characters can- be displayed at the designated display columns usingthe ClN[:l instructions.
When a character is displayed .by use of the CIN[:I 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 thecursor positionexceeds column 0 on a line, the excess
range laps around to thelast column of the previous line. And,
characters in the excess range are shifted one c o l u m ~ ~ ~ 4 @
left.
If the designated range exceeds column 0 of line 0 on the
0 online 0 are
screen, onlythe characters uptocolumn
shifted.
Characters which exceed cdumn 0 on line 0 areerased.
y
A "G" is displayed.
(6) Afterexecution of the CIN[:I instruction,conditions
display become as follows.
Item
Condition
Display mode
Cursor lineDosition
I Cursor
Dosition
column
Head VRAM addressdisplayed
Normal/reversedesignation
of the
I
(no change)
Color designation
1 Cursor display
I
6 1 18-
IE INN 86257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
COM"lON
'
ERROR
The C t N 3 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 LEOB instruction is used.
In the following case, an operation error occurs and an error flag
(M9011) isset.
Error Code
The numberof display columns designated by @ is out of the rangeof 1
to 16.
6-1 19
Dggo8
Dm91
503
I6 INN 662574
b
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The followingis an exampleof the program used 40, display .a
number "5" at a designated position on a dispiay unit connected
to the AD57 loaded at W O C O to OFF.
The alphanumeric characters are displayed by turning on XOEE.
The position of display is designated at columns 45 to 50 on line 5.
X000
01-4-CLEDB
It9065
41
LOCFITE
Cursor movement by the LOCATE
instruction
(Section
6.3.3)
Thenumber of display columns
is designatedat 5.
LEDR
The CIN5 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 a t
the cursorposition, and the characters withinthe designated
range are shifted one column to the left.
Dieplay unit
Designated display columns (5)
Column 50
c
6-1 20
IB (NAJ862574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
p
'
0
0
I
:. Dit.d.yig
'X';b!',M. t
S
B
F
T
C
Y
v
Q
W
w
davb
0
.w
U
A0 A1 Z
bnrtmt"
V
K H P'
0 0
0 0
0 0 0 0 0
I
d -
N
20
m 1 2 Ma011
0
0
Number of display col-
I
'1: The number of steps varies with type of device used. See Section 5.2.
Display command
LEDA : Execution at ON
-]LEDA/LEDmk
FUNCTION
LEDB : Execution at
leading edge
LEDC : Device number
is designated
SUB : Constant is
designated
1 i ~i~sl/O
Setting data
number of AD57
(1) The CtNSP instruction is used to display a space
a t the
cursor position and shift the
characters in the range designated by @ beginning with thecursor position one column to
the left on the display unit of the AD57(Sl)/AD58 designated
by 0.
('IU'')
@ [Number of display columns}
.,
I
I
1-1
A space is displayed.
(2) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimal digits.
Example) If the AD57(Sl)/AD58 is assigned to W 1 2 0 to
13F, set "12H" at @.
(3) The number of display columns designated by @ can be set
within the range of 1 to 16.
Characters can be displayed at thedesignateddisplaycolumns using the CIN[:I instructions.
When a character is displayed by use of the CIN[:I instruction
within the designated display columns, characters are shifted
one column to the
left.
6-121
IB INA) € 6 2 5 7 4
I
J
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(4) If the range of display columns designated by @beginning
with the cursorposition 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
0 on line 0 are
screen, onlythe characters uptocolumn
shifted.
Characters which exceed column 0 on line 0 areerased.
0
IDIIEIIFI;-:
r-7
,BIIC,
t
A space is displayed.
Curso; position
r - 1
ICI ID, IEl F: :
r-7
t
0
Cursor position
,DIIEILEJ;-;
t
A space is displayed.
(5) Afterexecution of the CINSP instruction,conditions
displaybecome as follows.
of the
Condition
kern
Display mode
Cursor lineposition
Cursor columnposition
Head VRAM addressdisplayed
(no change)
Normal/reverse designation
Color designation
Cursor disolav
EXECUTIONCONDITION
The CINSP instruction is executed every scan whilethe display
command is ON when the LEDA instruction is used. It is executed
only once a t theleading edge of the displaycommandsignal
whenthe LEDB instructionis used.
Inmaion
END
Innrunion
Instruction
execution
Sequence program flow
Display command
A
I
I
I
I
I
I
I
I
,
I
I
CINSP (with LEDA)
I
I
CINSP (with LEDB)
6-122
I
I
I
I
IB (NAI 66257-A
-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
OPERATWIY. ERROR
In the following case, anoperation error occurs and an errorflag
(M9011) is set.
D
a
s
w
i
p
t
i
o
n
The number of display columns designated by
of 1 to 16.
PROGRAM EXAMPLE
@ is out
of the range
Error Code
D9008 D9091
5o
503
The following isanexample
of theprogram used to display a
space at a designated position on a display unit connected to the
AD57 loaded at W O C O to OFF.
A space (“u‘’) isdisplayed by turning on XOEC or XOF4.
The position of display is
designated a t columns 45 to 50 on line5.
Cursor movementby the LOCATE instruction
(Section
6.3.3)
SUB
LEDR
t
,
The number of display columns
isdesignated at 5.
I
I/
L
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
Designateddisplaycolumns
(5)
4
i
I
6 123
!
IB INAt 66257.A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.7 DesignatedColumn Clear Instruction
The designated column clear instruction is used to clear characters at designated positions
on the screen.
Execute designated column clear by use of the following instruction.
C-WV
Designated column
Instruction
Name
C,NCLA
6-124
Doscription
Clears characters at designated columnsto the left of
the cursor oosition. clear
IB (NAI €62574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.7.1 Designated column clear.--CINCLR
N O 1 2 M9011
I
' 1 : The number of steps varies with type of device used.See
Clear command
jLEDA/LEDBICINLRd
- LEDA : Execution at ON
LEDB : Execution at leadingedge
4 LEDC/SUB
FUNCTION
Section 5.2.
[ @
1 LEDR
E
LEDC : Device number
is designated
SUB : Constant is
stting
data
Head I/O number of AD57
designated
(1) The CINCLR instruction is used to clear characters of the
of, and
number of columns designated by @ t o theleft
beginning
with,
the
cursor position
on
a display unit
connected to the AD57(Sl)/AD58 designated by @.
TO set value=
1
2
:3 I
r0 set value=
Cursor position
-7
u u:-:
Cleared
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper 2 digits of 3 hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X N 1 2 0 to
13F, set''12H'' a t 0.
(3) The number of clear columnsdesignated
within the range of 1 to 80.
6-125
by @can be set
IB (NAI 66257-A
f
1
6. AD57(S1)/AD58 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 taps 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, onlythe characters uptocolumn
0 online 0 are
cleared.
Characters which exceed column 0 on line 0 are ignored.
-
'\
(5)After execution of the CINCLR instruction, conditions of the
displaybecome as follows.
kern
Condition
Display mode
Cursor line position
Cursor column position
Head VRAM addressdisplayed
(no change)
Normal/reverse designation
Colordesignation
Cursor display
EXECUTION CONDITION
The CINCLR instructionis executed every scan whilethe 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 1EDB instruction is used.
Sequence program flow
I
I
Clear command
gFF1
)
I
I
I
I
I
I
I
I
I
CINCLR (with LEDA)
CINCLR (with LEDB)
I
I
I
I
I
I
I
I
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
4
.
>
Error Code
D9008 Dm91
Drcripdkn
The nutnberaf clear columns designated by @ is out of the rangeof 1 to
80.
.
~
PROGRAM EXAMPLE
5O
w3
~~~
The following is an exampleoftheprogram
used to clear
designriiedmumber of columns ona display unit connected to the
AD57 loaded at W O C O to OFF.
Clear 5s 'executed by turning on XODE.
The,position of displayis designated at columns 45 to 50 on line5.
C L EO DC BR T E
3
H
[SUB
eeec
3
CSUB
K
3
ESUB
5
K
58
LEDB CINCLR
,
;
Cursor movement by the LOCATE instruction (Section
6.3.3)
3
I
1
i
CLEDR 3
CSUB
i
I
The number of clear columns is
designated at 6.
6
ELEDR
<
I
I
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 ofthe CINCLR instruction, characters within the
designated range to the left of the cursor position are cleared.
Display unit
Designated clear columns (5)
Line 5
e .
r------
1
t
_ _ _ _ _ _ _ _ _ _J _ i
instruction
6-1 27
I
.
18 INN €62574
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.8 ASCII Code Conversion Instruction
The ASCII code conversion instructionis used to convert theASCII
characters being displayed on the screen to the ASCII codes and
store them in designated devices.
By use of the ASCII code conversioninstruction,thestore
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.
Description
ASCII code conversion of displayed
characters
Inputs the ASCII codes which correspond to the
ASCII characters displayed on the screen.
6-1 28
IB (NAI 862574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
?
6.8.1 ASCII code conversion of displayed characters--ICYPUT
M9012 M9011
I
*1: The number of stepsvaries with type of device'used. See Section 5.2.
Conversion command
LEDA : Executionat ON
LEDB : Execution at
leading edge
Setting data
I@ I
Head 110 number of AD57
Number of characters to
be converted
LEDC
Head number of thedevices
which
store
converted ASCII codes
I
I
~
FUNCTION
(1) The INPUT instruction is used to convert the ASCII characters
which are being displayed on a display unit connected to the
AD57(Sl)/AD58designatedby
@ t o corresponding ASCII
codes and storethem in thedevices beginning with thedevice
designated by 0.
The number of characters to be stored as the ASCII codes,
beginning with the cursor position and moving to the let?, is
designatedby 0.
b15
-
b8 b7
-
I
bO
1
ABCDEFGLH;
I
n
1
I
I
Cursor position
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper2digits of 3hexadecimaldigits.
Example) If the AD57(Sl)/AD58 is assigned to X.Yl20 to
13F, set "12H" at 0.
6-1 29
IB (NAJ€62574
A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3)The number ofcharacters 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 @exceeds the last device
number of the devices designated by @, 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 oftheprevious
line. And,
characters in the excess range are converted and stored.
If the designated range exceeds column 0 of line 0 on the
0 online 0 are
screen, only the characters uptocolumn
convertedandstored.
I
ABCDI0
L
b15
@
Cursor position
@+l
E FG
@+2
@+3
H
[I
-
-
b8 b7
W
@+4
A B C D E[F:
I
Cursor position
I
v
m+3
I
oou
(5) The ASCII codes to be stored in @correspond to designated
characters and are within the range of Ob to FFH.
If a designatedcharacter corresponds to code 1 0 0 ~
or above, it
is automaticaflyconverted
to code 2 0 ~(space code) and
stored.
(6) Code OOH is automatically stored in the end of the ASCII codes
stored in @.
The methodof storage of code OOH whenthenumberof
designated characters is an even number differs from that
when the number ofdesignated characters is an odd number,
as shownbelow.
When
b15
-
@=
b8 b7
When
5
-
bO
b15
-
Code
@=
b8 b7
OOOOH
4
-
bO
is stored.
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(7) After execution sf the .INPUT instruction,conditions
.Qisplay>bswrne as follows.
:
-
.
,
Display m6de"
ltm
Curser:& position
Cursor column position
of the
Condition
'
P @ m d ' W abdrew displayed
Namat&vene desiwetion
Color * s w i m
Curqr sdjt@ay
(no change)
The 194PLBFi'hstr'uctionis executed every scan while theconversion
comhshd is ON when the LEDA instruction is used. It is executed
only once i t the leading ddge of the conversion command signal
when the LEDB instructionisused.
1rffru-n
exation
o
n
END
lnnrmion
praauing
Instrunion
execution
execution
END
Sequence program flow
1i
I
INPUT(with
0
Step
END
I
I
I
I
I
I
I
I
I
I
I
I
LEDB)
OPERATION ERROR
Step 0
I
LEDA)
I
INPUT
I
I
I
I
I
(with
END
I
I
I
I
Conversion. command ON
OFF
Step 0
Instrunion
Innrunion
execution
I
I
I
I
I
I
I
I
In the fotlowing cases, an operation error occurs and an error flag
(M9011) isset.
~
Description
The number of characten designated by @ is 0 or a negative value.
of characters to be converted exceeds the last device
The
number
number of the devices designutet 'by @.
. ..
.-..I. .--.
.
6-131
.
.
~
Error Coda
D9008 -1
50
_
_
504
iB INAI 66257-A
4
/
/MELSEC
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
The following is an example of theprogram used to store the
ASCII character codes of thecharacters displayed on a displayunit
connected to the AD57 loaded a t 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.
PROGRAMEXAMPLE
Cursor movement by the LOCATE
instruction
(Section
6.3.31
P K
UOH€- t
number
The
designated.
6
CLEDB IHPUT
-
-
of Characters
is
3
[SUB
H
eeec
3
CLEDC
Dl0
3
CLEDC
028
3
CLEDR 3
The codes of the characters
are storedindevices D20 and
after.
The INPUT instruction is used for data entry together 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.
I
Display unit
b15
D20
-
b8 b7
-
MI
0 21
Line 5
D20
D23
t
Automatically stored
Column 50
6-132
18 (NN 6825744
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
18 lNAl 66257-A
!
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 storedin the VRAM areas or to write the display
data
stored in the VRAM. areas.
By use of the VRAM data read andwrite instructions, display data
can be moved in theVRAM areas, and display screen data can be
stored.
ExecuteVRAM
instructions.
category
.
,.'.
datareadand
lmtntction
Name
writeby
use of thefollowing
Description
..
.
VRAMdata
read
GET
Reads designatednumber
of display data from
designated addresses of the VRAM areas and stores
it i n devices.
VRAMdata
write
PUT
Writes display data stored in devices to designated
addresses of tiw VRAMareas.
6 133
IB (NAJ 882576
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.9.1 V M M data read.-.-GET
I ‘I:,
The number of stepsvaries with type of device used. See Section 5.2.
Read command
LEDA : Execution at ON
LEDB : Execution at
leadingedge
LEDC : Device number
is designated
SUB : Constant is
designated
Setting data
I@ 1
Head
@;;gaie;t; M;;;dz:;
address
of
I
the
stored
(@
Number of data to be read
Head number of thedevices
which
store
read
data
@
FUNCTION
Head I/O number of AD57
(1) The GET instruction is used to read thenumber of data
designated by @beginning with the address designated by
@of the VRAM areas of the AD57(Sl)/AD58 designated by
@and to store it in the devices designated by @.
@pixKzGGt
AD5761 )/AD58
~
I
b15
-
VRAMareas
bO
,
I
1-word data
I
I
‘1-word data‘
I
I
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(2) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimaldigits.
Example)If the A057(Sl)/AD58 is assigned to wY120 to
13F, set "12H" at 0.
( 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.
VRAMareas.)
(See Section 1.1.1 for detailofthe
(4) The number of read data to be designated by @can be set at
any number within therange of the VRAM address designated
by @ u p to address 7679.
However, a value which exceeds the last device number of the
devices designatedby @cannot be set.
(5) If therange of the numberof data designated by@ beginning
with the address designated by @ exceeds address 7679, an
error occurs and read processing is not exec,uted.
(6) The figure below describes the data stored in the VRAM areas.
b15
7
,
I
I
,
I
,
b13 b12
,
,
,
,
,
T
,
I
b8b7
.
.
7
,
,
,
I
b4 b3
,
,
,
I
I
7
,
,
,
bO
.
.
,
/
I
,
code (OH t o 3FF4
-Character
Character type (canvas screendata
0: Haw sizecharacter
1: Full sizecharacter
only)
Firsthcond half setting of full sizecharacter
(canvas screendata only)
0: First half of full size character
1: Secondhalf of full sizecharacter
(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: Lightblue
6: Yellow
7 : White
(7) Afterexecutionofthe
GET instruction,conditions
displaybecome as follows.
item
Display mode
Cursor line Dosition
I Cursor
column Dosition
Head VRAM address displayed
ofthe
Condition
I
(no change)
Normal/reversedesignation
Color designation
Cursor display
6-135
IB INN €62574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
EXECUTION. CONDKION
The GET instructionis
executed every scan whilethe
read
command is ON when the LEDA,instruction is used. It is executed
only once at the leadingedge of the read command signal when
the LED5 instruction is used.
I
I
GET (with LEDA)
I
I
I
I
I
I
I
I
GET (with LEDB)
OPERATION ERROR
4’
I
I
I
I
I
I
I
I
I
I
I
I
I
In the followingcases, an operation error occurs and an error flag
(M9011) is set.
Description
I
The VRAM area address designated by is out
7679.
D9008 D9091
I
of the range of -1 to
The number of characters designated by @I is 0 or a negative value.
The range of the number of data desi nated by @I beginning with the
VRAM area address designated bv
exceeds address 7679.
h
I
Error code
i
I
I
I
r
5o
1
504
The range of the number of data designated by @I beginning with the
of
device number designated by @ exceeds the last device number
corremondinadevice.
6-1 36
IB (NAJ66257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The followingis an exampleoftheprogramused
to read display
data from the VRAM areas of the AD57 loaded a t W O C O to OFF
and to store it in other VRAMareas.
Display data is read from addresses 1800 to 1809 of the VRAM
areas and written to addresses600 to 609.
The read data is written to devices Dl00 to D109.
-
CSUB
CSUB
H
000C 3
K
1
3
Display of canvas screen data
by the CF51 instruction (Section 6.2.1)
CLEDR 3
I L E D B CHOW
3
CSUB
b0C 3
CSUB
3
CSUB
K
1600 3
~ ~ I - Y ~ H o w
Transmission of canvas screen
data by the CMOV instruction
(Section 6.2.3)
CLEDR 3
P K1800
D
l1
the VRAM
Designation
areas
of address 1800 of
Designation of data read from
addresses 1800 to 1809
Read data is stored in Dl00and
Designation of address 600 of
the VRAMareas
Designationofdatawrite
addresses 600 to 609
t
t
LEDC
Dl00
4
to
I
L
6-137
Designationofdatastored
Dl00 and
after
in
IB (NAt 86257-A
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
~
Dl00
I
Dl08
Dl09
'J
H
I
I
I
I
I
I
1
VRAM areas
602
I
I
609
I
I
I
1802 I
I
I
1800
1801
1808
I
1809
L l
I
M
I
1
6- 138
IB INAl €6257-A
'
MEMO
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
.....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
....................................................................................................................................................................
IB (NAI €6257-A
/MELSEC
6. AD57(Sl)/AD58 CONTROL
INSTRUCTIONS
6.9.2 VRAM data write...*..PUT
"1: The number of stepsvaries
..
with type of deviceused.See
Write command
LEDA : Execution atON
LEDB : Execution at
leading- edge
-
: Device number
display
is designated
SI IR : Constant is
designated
I LEDR
I
FUNCTION
Section 5.2.
Setting data
@
I
I
IL
Head I/O number of AD57
Head
address
of
the
data is t o writbe
Number of data to be
Head number of the devices which store data to
(1) The PUT instructionis used towrite thenumber of data
designated by @beginning with the device number designated by @
to the
I addresses beginning with thatdesignated
by @ of the VRAM areasof the AD57(S1)/AD58 designated by
0.
01
AD57(Sl)/AD58
@
b15
@
-
bo
I
,-I
VRAMareas
Write areas
@+1
@+2
@+n
1-word data
.u
1-word data
4
6-139
IB lNAl 66257-A
I
,
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(2) The head I/O number of the AD57(Sl)/AD58 designated by @
should be upper 2 digits of 3 hexadecimaldigits.
Example) tf the AD57(Sl)/AD58 is assigned to W 1 2 0 to
13F, set "12"" at 0.
(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 beingdisplayed.
(See Section 1.1.1 for detailofthe
VRAM areas.)
(4) The number of writedata to be designated by@ can be set at
any number within therange of the VRAM address designated
by @up to address 7679.
However, a value which exceeds the last device number of the
devices designatedby @cannot be set.
-
(5) If the range of thenumberofwrite
data designated by
@ beginning with the address designated by @ exceeds
address 7679, an error occurs and write processing is not
executed.
(6) The figure below describes the data to be stored a t the devices
designated by @ in the VRAM areas.
'It
I
Character code (OH to ~ F F H )
I
Character type
0: Half sizecharacter
1: Full sizecharacter
Firstlsecondhalfsetting of full sizecharacter
(canvas screendata only)
0: Firsthalf of full sizecharacter
1: Secondhalf of full sizecharacter
(valid only with a full sizecharacter)
I
~
~
Character display method
0: Reversed
h
a
~
~
:
~
:
l
d
0: Black
1: Blue
2: Red
3: Purple
4: Green
5: Lightblue
6: Yellow
7: White
i color
s
p
l
a
y
(7) After execution of the PUT instruction, conditions of the display
become as follows.
kern
Condition
Display mode
Cursor line position
Cursor column position
Head VRAM address displayed
Normalheversedesignation
Color designation
Cursor display
(no change)
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
M E C U R O N CONDtT1ON
.
The PUT instruction is executed every scan whilethewrite
command is ON when the LEDA instruction is used. It is executed
only once at the leading edge of the write commandsignal when
the LEDB instructionis used.
END
wxbcuuon p r c a u i w
st- o
END
I
innMbn
exwion
w m o n
END
Step 0
-0
Step 0
END
StSP 0
I
I
PUT (with LEDA)
1
I
I
I
I
I
I
I
I
I
PUT (with LEDB)
OPERATION ERROR
lnnruction
exmion
Innrustion
execution
END
I
I
I
I
I
I
I
I
I
I
I
In the followingcases, an operation error occurs and an error flag
(M9011)is set.
Error Code
DbKliptlon
a
The VRAM area address designated by
7679.
is out of the range of -1 to
o9008 -1
~
The number of characters designated by @
is 0 I
or a negative value.
The range of the number of data desi nated bv @ beginning with the
VRAM area address
designated
by
exceeds address 7679.
504
The range of the number of data designated by@ beginning with the
device number designated by @
exceeds
I the last device number of
corresponding device.
I
6-141
18 (NAI 8 6 2 5 7 4
f
\
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
PROGRAM EXAMPLE
The followingis an exampleof theprogram used to read display
data from the VRAM areas of the AD57 loaded at W O C O 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 addresses600 to 609.
The read data is written to devices DlOO to D109.
P!!36
-
CPSl
CLEDB
CSUB
-
CSUB
H
eeec
K
1
3
Display of canvas screen data
by theCPSlinstruction
(Section 6.2.1)
3
CLEDR 3
-
CLEDB CHOW
CSUB
-
[SUB
-
[SUB
P K
H
3
eeec 3
K
3
2
K
16ee 3
Transmission of canvas screen
data by the CMOV instruction
(Section 6.2.3)
CLEDR 3
Designation of address 1800 of
the VRAM areas
I
t
Designation of data read from
addresses 1800 to 1 8 0 9
Read data is storedin D l 00 and
after
Designation of address 600 of
the VRAM areas
1
lpcLEDc
4
Designation of data writeto
addresses 600 to 609
Designation of datastored in
after
DlOO and
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
VRAM areas
'
600
601
b15
Dl01
I
D l 09
-
602
I
I
bO
H
t
l
H
c-
1801
1808
1809
I
1800
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.10 Display State ReadInstruction
The display state read instruction is used to
display settings mentioned below.
Display mode
Cursor position
Head VRAM address displayed
Normalheverse display
Color designation
Cursor display
read the state of
By use of the displaystate read instruction, current
state of display
settings can be checked.
Execute display state read by use of the following instruction,
~ w o r y
Display state read
lnrtrvction
Name
STAT
6-144
-ptkn
Reads the state of display settings.
IB I W 882574
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
6.10.1 Displaystateread......STAT
Usable devices
Bit deviX
0
Y
M
L
S
Word (leblt) d
e
v
b
B
F
@
T
C
0
D
6%
W
R
A
O
A
Conrtrnt
l
Z
V
K
Peiater Lml
H
P
I
N
0 0
7
0 0
B
M9012 M9011
20
.
c
I
*1: The number of steps varies with type of device used. See Saction 5.2.
'I-
. .
1
Rea& command
FUNCTION
0
: Execution at ON
: Execution at leadingedge
Setting data
1
1-
LEDC
Head I/O number of AD57
LEDR
D
Head number of thedevices which
store
read
data
(1) The STAT instruction is used to readthe state of display
settings of a display unit connected to the AD57(Sl)/AD58
store thedata
in the devices
designated by @andto
designated by
0.
b15
D +2
0
-
bO
tion
Cursor mlumn podItion
signation
1-word data
(2) The head I/O number of the AD57(Sl)/AD58 designated by
@should be upper2digits of 3hexadecimal digits.
Example) If the AD57(Sl)/AD58 is assigned
to W 1 2 0 to
13F, set "12H" at @.
6-146
IB iNAl 662574
J
t
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
(3) Data to be stored in devices @ t o m
6 are as follows.
1) Display mode (stored in @)
Currentdisplay mode setting is stored.
Color CRT standard mode (forAD57) *....-..*........
OOOOH
Monochrome CRT standard mode (forAD57) .....0003~
Color/monochrome CRTenlargedmode............ 0101H
LCD mode .....................................................
0202H
Color CRT standard mode (forAD57-S1) *...........0 0 0 5 ~
2) Cursor lineposition(stored i n @ + I )
The line position where the cursor is
Line 0 to 19
set is stored.
3) Cursor columnposition(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
stored.
Address 0 to 7679
6) Color designation (stored in @-I-5)
Current settingof character colordesignation
is
is stored.
Set Color DataStord Set Color Datastored
I
Black
Blue
I
0
1
6-146
Green
I Light blue I
4
5
I
IE (W 862676.
6. AD57(S1)/AD58 CONTROL INSTRUCTIONS
E X E W T I W . ~ N D I T t O N The STAT instructiom ismecuted every scan whilethe read
command is ON when the LEDA instruction is used. It is executed
only Snce.et the leading edge of the read command signal when
the E D 6 instruction is used.
L
4
Sequence program flow
gFA i 7
I
Read command
I
l
I
I
I
I
I
I
-
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
STAT (with LEDA)
I
I
I
I
I
I
I
I
I
I
I
1
I
I
I
I
I
I
STAT (with LEDB)
PROGRAM EXAMPLE
I
I
I
I
I
I
I
The following is an example of theprogramused
to readcurrent
state ofdisplaysettings of a display unit connected to the AD57
loaded at W O C O to OFF and to store it in devices D200 to D206.
i
iJ
I
i
A
!
I
I
1I
State of display settings are
in
stored
D200 to D206
?*
The STAT instruction stores the stateof display settings in seven
devices beginning with designateddevicenumber.
b15
D202
D203
D204
D205
I
-
bo
d
l
Cursor column position
1
disHead VRAM address
played
4
Y
Normalhverse designation
Color
0206 display
\Cursor
t
designation
I
1
6-147
I
<
IB (NAI 66257-A
7. APPLICATION PROGRAM EXAMPLES
7. APPLICATION PROGRAMEXAMPLES
This chapter gives application programs using the instructions
which control the AD5761 )/AD58.
7.1 Initial Processing Program
This section gives an example program used to set the display
mode and to clear the screen displayNRAM area.
To display characters to thedisplay unit with the AD5761)/AD58,
it is necessary to set the display mode to the AD57(Sl)/AD58
meeting the display unit to be used. If the display mode does not
match the display unit, characters cannot be displayed correctly.
Just after the PC CPU is started up, abnormal data might be stored
in the AD57(S1)/AD58 VRAM area causing incorrect displayon the
display unit.
Therefore, it is recommended to set the display mode and clear
the VRAM area after turning on the power supply to thePC CPU.
ProgrammingConditions
(1) AD57 is used.
(2) AD57 isloaded to use addresses XNOCO to XNOFF.
(3) The CRT standard mode (0) is set as the display mdd6 (4) Display mode is set only once when thePC CPU starts running.
(5) VRAM area is cleared when thePC CPU starts running or when
X005 is turned ON; the area cleared is from address 0 to
address 7679.
7. APPLICATION PROGRAM EXAMPLES
ProgramExample
I
Setting display mode
using the CMODE instruction
J
3
RD E L '
'CJ
CLEDACLU
csuB
€SUB
Steps 26 to 68 are executed only when the PCCPU
PB 3 modeis changed from STOP to RUN or whenthe
clear instruction is executed.
Dl@@
2 Settingthe VRAM headaddress
H
1
ELEDC
Dl@@
Designatingthe size of
the area to be cleared
3 (Setting CRT standard
mode)
3 Designating
the
head
'learing
Z:ion
' he
area
cLv
in-
address of the VRAM
~ L E D R3 area tobe cleared
+
f6BB
D l 0 0 3 Settingthe initial value of VRAM area headaddress
VRAM area is cleared.
Explanation
(1) Display mode is automatically set when the PC CPU starts
time
running unit
if
name has been entered at the
A2ACPU(Sl)/ABACPU parameters are set. In this case, therefore, it is not necessary to set the display mode in a sequence
programusingthe CMODE instruction.
If theunit 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.
Whenclearingthe
VRAMarea,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 theCLV instruction, by
clearing the corresponding VRAM area with the CLV instruction.
A
7. APPLICATION PROGRAM EXAMPLES
7.2 Displaying Canvas Screen
This section gives an example of the program used to display the
canvas screen onthedisplayunit.
Programming Conditions
(1) AD57 is used.
(2) AD57 is loaded to useaddresses W O C O to W O F F .
(3) The CRT standardmode
(0) is set as thedisplaymode.
(4) Canvas screen No. 1 displayed on the display unit in batch by
turning ON XOOO.
(5) Canvas screen No. 2 and No. 3 are transferred to the VRAM
area byturning ON X001 insplit processing.
(6) Canvasscreen to be displayed 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. 2screen is displayed.
x004 0N .......... Canvas No. 3screen is displayed.
ExampleProgram
LEDB CPSl
LEDR 3
22
CPLS
SET
c
Designating
transfer destination
VRAM area
head
address (1600)
c
me
Displaying
canvas
Screen using cpsl
instruction
Designating canvas
screen
No. 1
I
H90663 Split
processing
instruction
LEDR CROU
I
3
H65
4
Designating
transfer
destination
VRAM
area head address (1600)
Self-retainingsignal
forsplit
Cancelingsplitprocessing
processing
mode
CMOV instruction start signal (steps
pls[uB
5
4
64 to steps 98)
I
Designating canvas
screen
Transferring
No. 3
theusing
screen
Designatingtransfer struction
destination VRAM area head address
Self-retainingsignal for split processing
Cancelingsplitprocessing
mode
canvas
in-
7. APPLICATION PROGRAM EXAMPLES
"E'
18
fl;:
R$
R9,,65
cnOu
YLs
Designating the VRAM display head address (0)
Designating the VRAM display head address (1900)
129
Designating
the
133
I
I5
1 4 2 BDELC-1
t
VRAM display head address (3200)
1
CPSZ
CLEOR
i
1
Designating the VRAM display head address
I
Changing the VRAM
display head address
using the cps2 instruction
Explanation
(1) Flow of processing of the example program is shownbelow.
I
Canvas ROM
a,
Canvas
No. 2
1
Canvas
No. 4
VRAM area
When X002 is ON
1600
When X001 is ON
(splitprocessing)
Display
unit
3200
L
1) Canvas screen No. 1 in the canvas ROM is transferred to
address 0 to address 1599of the VRAM areawhen theCPS1
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 instructionis 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 instructionis executed.
4) Canvas screen No. 1 stored at address 0 to address 1599 of
the VRAMarea is displayed using the CPS2 instruction.
5) Canvas screen No. 2 stored ataddress 1600 to address 3199
of the VRAM area is displayed using the CPS2 instruction.
6 ) Canvas screen No. 3 stored ataddress 3200to address 4799
of the VRAM area is displayed using theCPS2 instruction.
7. APPLICATION
7. APW€A3W#PROGRAM
PROGRAMEXAMPLES
EXAMPLES
(2) Take an interlock withM9065 so that other instructionswil not
be executed while split transferring of
canvas screenNo. 2 and
No. 3.
It is also necessary 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
Canvas screen No. 1 ..... CRT standard mode ( 0 )
Canvasscreen No. 2 .*..*Enlarged display mode (1)
Canvas screen No. 3 ..... CRT standard mode (0)
X9 2 (Canvas screen No. 1 display instruction)
H5CPLS
9 9 L f
UOH C ' $ 1 3@1
P K8
119865
Dl81
l-CHOUp
Dl82
(Canvas screen No. 2 display instruction)
117
HOU
CPLS
H6
4
4
1
P K
1
135
Designating CRT standard mode
Designating
mode
CPLS
enlarged
display
H7
Designating CRT standard mode
I
153b1
l ,
SUB
-
-
leec
Setting display
ILEDR 3
3
CPS2
ILEDB
lsec 3
CLEDC
Dl91 3
CLEDR 3
mode
I
7. APPLICATION PROGRAM EXAMPLES
r
7.3 se#ing Data Using Keys
Thissectiongives
an exampleof theprogram used toinput
numerical datawith the keys on the operation panelconnected to
the AD57 and to store the data into the PC CPU data register (Dl.
Pto(ltrvnming Conditions
(1) AD57 is used.
(2)AD57 is loaded to use addresses W O C O to W O F F .
(3) The CRT standard mode (0) is set as the displaymode.
(4) Data input column positions on the
below.
10th line
12th line
screen are as indicated
...........................................
...........................................
4
Data input area 1
Data input area 2
70th
66th
column column
(5) The first place (66th column) ofeach data input area is used for
the entry of a sign.
(6) The input data is a decimalconsisting
of up to 5 digits.
(7) The keys on the operation panel correspond to the input (X)
device numbers as shownbelow.
[]key
I l k e y
[ T l k e y
r ] k e y
r ] k e y
1 T j k e y
1 6 l k e y
r j k e y
key
..... XOE7,
XOEF,
..... XOC7
..... XOCF
..... XOD7
..... XOE6
..... XOEE
..... XOF6
..... XOC6
..... XOCE
XOR
r l k e y
m l k e y
[key
(CLEAR1
-/key
..... XOD6
..... XOCO
(start of data entry
into data input area 1)
..... XOC8
(start of data entry
into data input area 2)
key ..... XOFO (display of a minus
(-) sign)
key ..... XODE (clearing
the
data entered to data input area)
..... XOFF (end of data entry)
m i k e y
..... XOFE
(aborting data entry)
/MEiSEC-A
7. APPLICATION
7. AlsREA"i PROGRAM
PROGRAMEXAMPLES
EXAMPLES
ProgramExample
L E D BC D H l
H
Display
onecharacter
of
size cursor
usingthe CON1 instruction
LEDR
SET
MOW
K
18
I
O
U
Ye
!le
D11B 3
Cursor
line
position
Dl11 3
Cursor column
position
ber of devices storing ASCII charac-'
Inputters
data is converted into BIN data
Device
number
' with
the DABIN instmaion
storing
converted
BIN data
If decimal ASCII data to be converted is
outside the range of -32767 to 32767
when
the
DABIN
instruction
is
executed, an error occurs; such an error
stateiscleared.
lDu
D116
RST
Data entered to data entry area 2 are
stored to Dl18
D118
1118 3
122F'-%LEDB 1
RST
1111
I
RST
1112
I
RST
1111
clh:l 1
At the completion of processing, initial
stateisrestored.
,
At the data entry abort,
restored.
~eec
(mkey)
LEDR
142
~2
CL+3E41-kDA
~9~136
-
*
-
F
LOCATE
S
U
B
D l 1position
1
CFEHD
L E Dline
C
column
LEDC D i l l
44
initial state is
At
the
completion
of
setting
or
abort
of
I
data entry, the cursor disappears
the screen.
from
J
Cursor
Cursor
position
'
Cursor
movement
with the LOCATE
instruction
I
7-7
IB (W - 7 4
7. APPLICATION PROGRAM EXAMPLES
of display
Display of "0"
Number of display
digits
Display of " I "
Number
digits
Display of "2"
Number of display
digits
/I
i
Display of "3"
Number of display
digits
CLEDR
25
*
ELEDB C I H 4
1
Display of "4"
Number of display
digits
3
3
Display of "5"
Number of display
3 digits
3
3
3
Display of "6"
Number of display
3 digits
3
3
3
Number of display
3 digits
,
Display of "7"
3
3
Number of display
3 digits
Display of "8"
3
3
3
Number of display
3 digits
Display of "9"
3
7-8
IB INN 682574
,
7. APPLICATION PROGRAM EXAMPLES
.
7. APPLICATION PROGRAM EXAMPLES
a
After the completion of keying in of the data, press the (GOI
(XOFF) key. Upon receiving the
key signal, thefollowing
processing is executed.
Fetching thedisplay data with the INPUT instruction
The data displayed in the data entry area is stored to Dl20
to Dl22 in the ASCII code.
i
1
!
/
Display unit
1
-12659
D l 20
Dl21
Dl22
Convertingthe data with the DABIN instruction
The data stored in the ASCII code are converted into binary
data and stored t o D l 16.
b15
D l 20
-
b8 b7
Dl21
36H
Dl22
3 9 ~
-
bO
32H
~
b15
D l 16
-
-12659
bO
I
1
L
3 5 ~
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, theexampleprogramis
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 isprompted.
i
i
1
7-10
IB (NAI 662574
i
c
7. APPLICATION PROGRAM EXAMPLES
7.4 Displ8ying Characters and Word Device PresentValues
This section gives an example of the program used to display the
ASCII characters and the present value of the word devices.
ProgrammingConditions
(1) AD57 isused.
(2) AD57 isloaded to useaddresses XPIOCO to XPIOFF.
(3) Displaypositions are as indicatedbelow.
Present data
m
-
10th line
...................................
12th line
...................................
display area
1
i
20th
column
29th
column
23rd column
Present data
display
area
(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 givenin yellow for theASCII characters andin white
for present data.
(6) At the count-up of a counter, the present
highlighted.
c
Program
Example
e y 3 8
I
tRsc
ce=
CHOU
02"
P H
8628
0284
1
data displayed is
" at 0200 t o
Setting
, , , , , =OT
Dm3
Setting
A" at 0204
I
L
Setting "BC" at0205
Setting "D" at D206
c
Desianatins display
I
I
Moving thecursor
with
the
LOCATE
instruction(10th
Cursorcolumnline,20thcolumn)
position
Cursor line
t
CLEDB PR
CLEDR
J
,
I
1
Heed device of
devices storing
display data
I
i
7-1
I
I
Displaying characters with the PR instruction
(Displaying
=
, ,, ,, ,, ,, , A B ~ D " )
16 ~NAI88257-A
1
7. APPLICATION PROGRAM EXAMPLES
Changing the data in 0200 to DZQS to
'C1
'UUYUU"
Cursor line position
Cursor
column
position
'
Displayingcharacters with the
PR instruction
(Displaying 'C1
Head device of
devices
storing
display data
--uuuLdu
ABCD" )
Designatingdisplaycolorwith
the COLOR instruction
Designeting white
171
Moving the cursor with the LOCATE instruction
(12th line,20th
column)
ELEDA BIHDR
CLEDC
C9
CLEDC
bise
Convertingpresentdata of CO into
ASCII character-string with the BINDA instruction; the result of conversion are stored in
Dl50 to Dl52
CLEDR
CLEDR BIHDA
CLEDC
C1
CLEDC
0168
Convertingpresentdata of C1 into
ASCII character-string with the BINDA instruction; the result of conversion are stored in
Dl60 to Dl62
CLEDR
212
216
~ 5 e
PLS
Mse
SUB
leec
Cursorlineposi-
I
,
Movingthecursor with the LOCATE instruction
(10th
line,
20th
column)
CLEDR 3
PRH CLEDA
3
H
ISuB
Number Of charESUB
3 acters to be displayed
ELEDC ~ 1 5 83 Head device of
devices
storing
CLEDR 3 thecharacters to
be displayed
6"
'
1
Displaying
present
data
of CO
thewith
PRN instruction
7. APPLICATION PROGRAM EXAMPLES
.
c 1,
CPLS
,I
265
1151
C L E M LOCATE
-
CSUB
)899C
CSUB
!2
K
CSUB
-
23
CLEDA
PRH
[SUB
-
CSUB
!
CLEDC
Dl68
-
ce,
:I
-
909C
CLEDR
~9,665
Number of characters t o be displayed
Head device of devices
storing
the
characters to be
displayed
ELEDB LOCATE
2eec
[sub
K
19
K
23
CSUB
[SUB
-
Cursor line position
Cursor column
position
,
Displaying
present
data of C1 with the
PRN instruction
I
Moving thecursor
with
the
LOCATE
instruction
(10th
line,
23rd
column)
CLEDR
-
CLEDB CRDSP
-
[SUB
-
CSUB
-
H
686C
K
6
CLEDR
363 Cl,,
-
119,965
CSUB
[SUB
Beer
K
12
K
23
Cursor line position
Cursor column
position
Movingthe cursor
with the LOCATE
instruction
(12th
line,
23rd
column)
CLEM
-
CLEDB CRDSP
-
CSUB
-
CSUB
XB’(6
: 1 1 4
CLEDB LOCATE
[SUB
-
8s
xep
414
Cursor column
position
H
-
468.
Cursor line position
FLEDR
-
318,
Movingthe cursor
with the LOCATE
instruction
(12th
line,
20th
column)
leec
K
6
ELEDR
Pl\g
Number of characters to be
highlighted
Highlighting the C1
present
data
with
the CRDSP instruction
C W
111~
K5
CT 1
II
CRST
ce
CRST
C1
CO and C1 countingprogram
7. APPLICATION PROGRAM EXAMPLES
Explanation
(1) Set the character code whichcorresponds
to the ASCII
characters to be displayed atD200 to D206.
' D200
D201
ASCII characters
I
D202
*
'TO==
ABCD"
D203
D204
(2) Set the character displaycolor
instruction.
to yellow with the
COLOR
(3) Move the cursorto the position where characters are displayed with the
LOCATE instruction.
(4) Display the characters corresponding to theASCII code stored
in D200 to D206 with the PR instruction.
(5) Set the character displaycolor
instruction.
towhitewiththe
COLOR
(6) Convert the present data to be displayed into the ASCII code
with the BINDA instruction. The conversion results are stored
to Dl50 to Dl52 and Dl60 to D162.
co
co
b15
-
bO
18
b15
-
32
-
b15
-
b8
b7
-
bO
D l 51
bO
31H
-
Dl60
Dl61
D l 62
.
.
.
_.
7-14
18 fNAI €6257-A
7. APPLICATION PROGRAM EXAMPLES
(7)Move the cursor to the present data display pasitian and
present data character-strings, stored in Dl50 to Dl52 and
Dl60 to D162, are displayed.
(8) Upon counting-up of the counter, the contact of the corresponding device is turned ON. This highlights the present data
currently displayed when the CRDSP instruction is executed.
7-15
IB
INAJ -74
7. APPLICATION PROGRAM EXAMPLES
-,
~
. .
I
,
.
i
.
._
P5
See (2) in Explanation.
Processing
exis
ecuted
when
the externally input
vatue is '10" or
larger.
D.21
K
9 025 D21
XLEDL L W R I E
3
,
H
eeec
SUB
K
15
€SUB
3
3
Movingthecursor
with the LOCATE
instruction
Cursor line position
3 Cursor column
C L EDD3C8
position
CLEDR 3
t L E M $$I
,-
3
leec 3
'
US
Number of "AH"
charactercodes to
be displayed
Displaying
the
same
characters
vertically with the
CC1 instruction.
L EDD2C3
Cursor line position
LEDC
DSB
Cursor column
position
Movingthecursor
with
the
LOCATE
instruction
L EDD2C2
Number of character codes to be displayed
&
UEDC
Processing
not
is
executed if the externally input value
is "100".
Processing
exis
ecutedonly
when
the externally input
value is "0 to 80".
t
:
DZ1
3
ELE,DR LDCRTE
3
.._
F
5
U
(I
B
3
3
Displaying
the
same
characters
vertically withthe
C C l instruction.
LEDR 3
D25
,
3
ELEDR 3
i
D? 1
PeeR
Y
E
L
E
D
R LOCRTE
,
3
,
CSUB
!d&;BBC 3
'
D24
CLEDC
1
3
3 Cursor column
C L E D 0C3, 6
CLEDR 3
C L E D RC C 1
Cursor line position
position
<SUB
H
BPeC 3
Number of "OH"
H
eeee
3
ILEDC
D25
3
€SUB
character codes to
be displayed
I
Movingthecursor
with
the
LOCATE
instruction
Displaying
the
same
characters
vertically with the
CC1 instruction.
7. APPLICATION PROGRAM EXAMPLES
Explanation
(1) In response to an external input in the range of 0 to 100, the
input value is displayed in a bar graph.
(2) Bar graph is displayed in the following
manner.
D20 -value) 9 10 = 021
0
0
0
- quotient - 1)th line........o,
(15 - quotient)th line.............. 0
I'
(15
15th line
D22
[Remainder/
Thecharactercorresponding
to code "OH" is
displayed; the numberof characters to be displayed is (10 - 1
quotient)
-
Theremainder is assumed as acharacter code
andcorrespondingdisplayisgiven.
a
I
a
.........I,
The
character
corresponding
to code "AH" is
displayed; the numberof characters to be displayed is'quotient".
Example) Input value of
68
':ie;haracters
" 8 ~ " character is displayed
J 3
0
II
= 9
are dis-
-
6
a
I
I
I
I
(3) The following are the interlock so thatprocessing will not
occur iftheinput
value is the same as thevalue
input
previously.
I O I D20 ID31 1 , 1 0 I D20 1 D32 I
(4) The following is the interlock so that processing will not occur
if the input value is "100" or larger.
I >=I KlOO 1 D20
7-18
I
IB INN 652574
8. ERROR CODE LISTS
8. ERROR CORE USTS
If an error occurs when thePC CPU is switched.tothe RUN state or
in the RUN state, error indication is given ormcatrespo'nding error
code is stored in register O 9 0 0 8 , detail error code. is stored in
register 09091 and error step is stored in register D9011. Refer to
Table 8.1 for description, c a w s and corrective action.
8.1 How to Read Error Codes
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.
8.2 Error Code Lists
The following listsgiveerror
messages, error code numbers,
detailerror code numbers, description, causes and corrective
action.
Mailed
Error Message
~~~
"INSTRCT
CODE ERR."
(Checked when
STOP-RUN
or at execution
of
instruction.)
10
~~~~
€nor and Cause
~
~
~
~~
~~~
Corrective Action
~
101
Instruction
codes
which
the
CPU (1) Read theerrorstepusing
a
peripheraldeviceandcorrect
cannot decode are included in the
the program of the
step.
program.
(2) Check the ROM if it contains
instruction codes which cannot
be decoded. Ifit does, replace it
with a correct ROM.
102
Indexqualification is specified fora
32-bit constant.
103
by an extended
Device
specified
applicationinstruction is notcorrect.
104
An
extended
application
instruction
has incorrect program structure.
105
An
extended
appiication
instruction
has incorrect command name.
~~
I
106
107
1
[ Indexqualificationusing
1-1
I
108
included in the pro ram
and
~
Read the
error
step
using
peripheraldeviceandcorrectthe
program of the step.
2 or V is
between
(1) Indexqualification is specified
for the device numbers andset
values in theOUT instruction of
timers and counters.
(2) Indexqualification is specified
at the label number of thepointer (PI provided to the head of
destination of the
SCJ 1I CALL 1 CALLP 1 [ JMP
[LEDNB
and
-- - . - I FCALLl
. -. .--. . -
I
1
1
1 LEDNB I BREAK 1
instructions
or at the label number of
the
interrupt pointer ( I ) provided to
the
head
of
an interrupt
program.
Errorsotherthan
tioned above.
101 to 107 men-
Table 8.1 Error Code List for the A[:'ACPU(Continue)
a
8. ERROR CODE LISTS
~
"CAN'T
EXECUTE (PI"
(Checked at
execution of
instruction.)
13
Capacity settings of the. main and
suti . piograms,
microcomputer
program,' file -Mer
commentsi
status latch, samplingtraceand
extension file registers are not
within the. usable tangeof the CPU.
Read parameters in the CPU memory,
check
the
contents,
make
necessary corrections
and
write
them again to the ,memory.
~~
,
112
TotOl'ofthe set cepadty of the main Read parameters in the CPU mem-
113
Latch .range set by parameters or
setting of M, L or S is incorrect.
114
12
Cormctive Action
c, ;. : , .
11
"MISSING END
INS."
(Checked at
STOP-RUN.)
Error and Cause
and sub' p r o g m ~ , file register ory, check the contents, make
pommFnts, status latch, sampling necessary corrections
and
write
traceand eitensionfile registers them again to the memory.
exceeds capacityofthe
memory
cassette.
Sum check error
115
Either ofsettings
oftheremote
RUNPAUSE contact point by parametets, operation made at occutr*
ence of error, annunciator indication 'mode, or STOP-4WN indication mode is incorrect.
116
The MNET-MINI automatic refresh
setting by parameters is incorrect.
117
Timer setting by parameters
correct.
118
Countersetting
incorrect.
121
The.END (FEND) instruction is not
given in the main program.
122
The END (FEND) instruction is not Writethe END instruction at the
given in the sub program if the sub end of the sub program.
program is set by parameters.
131
is in-
by parametersis
Writethe END instruction at the
end of the main program.
The same device number is usedat Eliminatethe
same pointernum-
twg or mar8 steps for the pointers bers provided at the head of jump
(PI andinterrupt pointers (I)
used as destination.
labels to be specifiedat the head of
jump destination.
132
Read the
error
step
using
a
peripheral device,check contents
and insert a jumpdestination pointer (P).
provided beforethe
tiori.
END instruc-
Tabk 8.1 Error coda List for the A::$CPU
..
(Continue)
8. ERROR CODE LISTS
Error M-.
"CAN'T
EXECUTE (PI"
(Checked at
execution of
instruction.)
irror Cock
(tme8l
13
Detailed
irror C o d e
(-1
1
133
Error and &use
( 1 ) The
instruction
was
in-
cluded in the program and executed though the
instruction
was
not
given.
(2) The [NEXT] and
[ LEDNB I BREAK instructions
were incktded in the p r o m
and executedthough the
instruction was not iven
(3) Nesting level of the
FCAUP].ad
instructions
is 6 levels or deeper, and the
6th level was executed.
(4) There
is
no
or
instruction at execution
the
of
instrucor
tion.
1-
1
fFoRl
step using a
peripheral device,check contents and correct program
01
the step.
2) Reduce the number of nesting
levels of the
instrucand
tions to 5 or less.
1 ) Read theerror
ml
fGJ
m
134
l
m
l
wl
The
instruction was included %ad
the
inprogram
and
executed
though no sub program
was provided.
~~~~~
Instructions (including NOP) other
than LDX,LDIX, ANDX and ANlX
are
included
instructhe
in
tioncircuitblock.
:heck the program of the
instruction and correct it re.
ferring to contents of detailed erroi
:odes.
and
I LEDA I IXEND I instructions.
141
142
instructions
Multiple
given.
1-
are
143
The number of contact points in the
m
instruction circuit block exceeds 150.
144
The
instructions are
r o t paired with ;he
LEDACHKEND instructions, or 2
or more pairs of them
are given.
145
Format of the block shown below,
which is providedbeforethe
instructioncircuit block, is
not as specified.
146
1-
m
Device numberof
D l inthe
I CHK 1 D l I D2 I instruction is diffe-
rent from that of the contact point
instruction.
before
the
147
~
33 or more sets of
( 2 ) There are
14
~
a
:1) Read theerrorstepusing
8
peripheral device,check
con.
oi
tentsandcorrectprogram
thestep.
:2) Reduce the number of sets 01
and
[LEDA I IXEND] instructions t c
32 or less.
135
"CHK FORMAT
ERR."
(Checked at
STOPPAUSE
+RUN.)
the
error
step
using
Indexqualification is used in the
check Datterncircuit.
8. ERROR CODE LISTS
Error and Cause
"CHK FORMAT
ERR."
(Checked at
STOPPAUSE
-..RUN.)
14
I LEDA I CHKEND~instructions
are given.
(2) There are 7 or more check condition circuits in the
LEDA 1 CHK]
L E D ~ C H KND(
E
instructions.
The chc3ckcondiJion circuits in
I
-
are written without using and
X
Y contact instructions or compareinstructions.
are writtenwith
steps.
257 ormore
~
"CAN'T
EXECUTE (1)"
(Checked at
occurrence of
interrupt.)
15
"CASSElTE
ERROR"
16
"RAM ERROR"
(Checked at
power on.)
20
"OPE. CIRCUIT
ERROR"
(Checked at
power on.)
21
151
instruction
The
given
was
outside of theinterruptprogram
andwasexecuted.
lead
the
error
__
step
using
~~
a
152
There is n o m instruction inthe
interrupt program.
153
Though an interrupt
module
is donitor special register D9011 usused, no interrupt pointer (I) which ng a peripheraldevice, and check if
corresponds to the module is given he interrupt program that corresin the program. Upon occurrence of)ends tothe storeddata is proerror, the problem pointer (I)num- tided or if two ormoreinterrupt
ber is stored atD9011.
lointers (I)of the samenumberare
liven. Make necessary corrections.
:heck the interrupt program if the
instruction is givenin it.
instruction if it is
k i t e the
lot given.
m]
Memory cassette isnotloaded.
'urn off the PC power and load the
nemory cassette.
201
The sequence program storage
RAM in the CPU module caused an
error.
Since this is CPU hardware error,
:onsultMitsubishirepresentative.
202
Thework area RAM inthe
modulecaused an error.
203
The device memoryin
the CPU
modulecaused an error.
204
The address RAM in the CPU modulecaused an error.
21 1
The operation circuit for index qual-jince this is CPU hardware error,
ification in the CPU does not work
:onsultMitsubishirepresentative.
correctly.
212
Hardware (logic) in the CPU does
notoperatecorrectly.
213
The operation circuit for sequential
processing inthe CPU does not
operate correctly.
CPU
Table 8.1 Ermr CodeList for tho A[:>CPU (Continue)
8. ERROR CODE LISTS
irror M
-
irror Code
corrective Action
Error and Cause
(Woo81
jcan time is longer than the WDT (1) Check the scan timeofthe
it
:ime.
user's proramandshorten
instructions.
using
the
:1) Scan time of the
user's program has been extended due to (2) Monitor contents of special register D9005 using a peripheral
certainconditions.
device. If the contents are other
:2)Scan time has beenextended
than 0, powersupplyvoltage
due to momentary power faimay not be stable. Check power
lure occurred during scanning.
supply and reduce variation in
voltage.
'WDT ERROR"
(Checked at
execution
of END
processing.)
22
"END NOT
EXECUTE"
(Checked at
execution
of theEND
instruction.)
24
"MAIN CPU
DOWN"
26
The main CPU is malfunctioning or Since this is CPU hardware error,
consultMitsubishirepresentative.
faulty.
"UNITVEWFY
ERR."
(Checked
continuously.)
31
Current I/O module information is
different from
that
recognized
when the power was turned on.
(1) The I/O module (including special function modules) connection became loose or the modulewasdisconnected
during
operation,or
wrongmodule
was connected.
"FUSE BREAK
OFF"
(Checked
continuously.)
32
There is an output module of which (1) Check the FUSE BLOWN indicaFuse is blown.
tor LED on the output module
andreplacethefuse.
(2) Read detailed error code using
a peripheral device and replace
the fuse of the output module
which corresponds to the data
(I/O headnumber).
Or, monitor special
registers
09100 to 09107 using a
peripheraldeviceandreplace
the fuse of the output module
ofwhichcorresponding
data
bit is "1".
CONTROL-BU:
ERR."
40
241
Nhole program of specified prog- (1) Reset and run the CPU again. If
ram capacity was executedwithout
the same error recurs,
Since thisis
CPU hardware
executingthe END instructions.
(1) When the END instruction was
error, consult Mitsubishi representative.
to be executed, the instruction
wasread as otherinstruction
codedue to noise.
[2) The END instruction changed to
otherinstructioncodedueto
unknown cause.
401
Due to the error of the control bus
which connects to special function
modules, the FROM/TO instruction
cannot be executed.
402
If parameter I/O assignment
is
being executed, specialfunction
modules are not accessible at initial
communication.
At erroroccurrence,thehead
I/O
number (upper 2 digits of 3 digits)
of the special function module that
caused error is storedat D9011.
a
Read detailederrorcodeusing
peripheral device and check or replacethemodulewhichcorresponds
the
to
data (I/O head
number).
Or, monitor special registers D9116
to D9123 using a peripheral device
and check or replace the modulesif
correspondingdatabit is "1".
Since it is a hardwareerrorof
special function module,CPU moduleor base module,replaceand
check defective module(s). Consult
Mitsubishi representative for defectivemodules.
Table 8.1 Error Code List for the A[:'ACPU (Continue)
\
8-5
IB (NAJ862574
8. ERROR CODE LISTS
Error M m @
"SP:'uNlT
DOWN "
Detailed
Error Code
Error C o d 4
,mwJos)
(D9091)
41
Error a d b u s e
41 1
Though an m e s s was made to a
special function module at execution of theFROMITO ingruction, no
response is received.
41 2
parameter
If
I/O assignment is
being executed, no response is received from aspecial function module at initial communication.
At erroroccurrence,thehead
I/O
number (upper 2 digits of 3 digits)
of the special fur+ction module that
caused error is stored. at D9011.
Since it is bardware &pt& of the
special function mod&
to which
an accesswas made, consult Mitsu.
bishirepresentative.
'tMKUNtT
'ERROR'
42
Either AJ71R22 or AJ71P22 is Remove
AJ71R22
or
either
loaded to the master station.
AJ71P22 from the master station.
"I/O INT.
ERROR"
43
Though the interrupt module is not Since it ishardwareerrorof
a
loaded, an interrupt occurred.
module, replace and check a defectivemodule.
For defectivemodules, consult Mitsubishi representative.
"SP. UNIT
LAY. ERR."
44
.~~
~~
~~
~
~~
special
function
module
is
assigned as an I/O module, or vice
versa, in the 110 assignment using
parameters from the peripheraldevice.
Execute I/O assignment again using
parameters from the peripheral device accordingto the loading status
of special function modules.
441
A
442
There are 9 or more special func- Reduce thespecialfunctionmodtionmodules
(except A161 (S1 ) ) ules(except A161(S1)) which can
which can execute interruption to
execute interrupt start to 8 or less.
the CPU module loaded.
443
There are 2 or more AJ71P22 or Reduce the AJ71P22 or AJ71R22
AJ71R22 modulesloaded.
modulesto 1 or less.
444
There are 7 or more modules such Reduce the computer link modules
as a computer link module loaded to 6 or less.
to one CPU module.
445
There are 2 or more A161(S1) mod- Reduce the A161 moduleto 1.
ulesloaded.
446
Modulesassignedbyparameters
for
MNTMlNl
automatic
refresh
from the peripheral device do not
conform with the types of station
modulesactuallylinked.
447
Thenumberofmodulesof
I/O Reduce the number of loaded speassignment registration (number ofcial function modules.
loaded modules) per one
CPU module for the
special function modules
which canuse dedicatedinstructions is largerthan the specified
limit. (Total of the number of computers shown below is larger than
1344.)
+
Perform again module assignment
for
MNTMlNl
automatic
refresh
with parameters
according
to
actuallylinkedstationmodules.
(AD59 X 5 )
(AD57(Sl)/AD58 X 8)
(AJ71C24(S3) X 10)
(AJ71C21tSl) X 29)
(AJ71PT32(S3) X 125)
Total
1344
>
Table 8.1 Error Code List for the A[:*CPU
(Continue)
8. ERROR CODE LISTS
nor M
q o
lrror C o d e
"SP. UNIT
ERROR"
(Checked at
Cecution of the
FROM/TO
instruction
*thededicated
instructions
for special
function
modules.)
46
"LINK PARA.
ERROR"
47
"OPERATION
ERROR"
(Checked at
execution of
instruction.)
50
Detailed
irror C o d e
Error and Cause
D
s
o
s
l
)
461
Module specified by the FROMnO 3ead the
error
step
using
a
instruction is not a special function Jeripheraldeviceand
check and
module.
:orrect contentsofthe
FROM0
nstruction of the step.
462
Module specified by the dedicated
instruction
for
special
function
moduleisnot
a specialfunction
moduleornotacorresponding
sDecial function. module.
a
3ead the
error
step
using
Jeripheraldeviceand
check and
:orrect contentsofthededicated
nstruction
for
special
function
nodules of the steD.
(1) Data writtento the parameter ' 1 ) Write in parameters again and
areas of the linkof which range
check.
was set by parameters using a :2) If the same error indication is
peripheral device does not con- given again, it is hardware faiform with the data of link paralure. Consult Mitsubishi repremetersread bythe CPU.
sentative.
Or, link
parameters
are not
written.
(2)Total number of local stations is
set at 0.
~
501
(1) When file registers (R) are used, 3ead the
error
step
using
a
operationisexecutedoutside
Jeripheraldeviceand
ofspecifiedrangesofdevice
:orrect program of the
numbers and block numbers of
file registers (R).
(2) File registers are used inthe
program without settingcapacity of file registers.
502
Combination of the devices specifiedbyinstruction is incorrect.
503
Stored data or constant of specified
device is not in the usable range.
504
Set number ofdata to be handled is
out of the usable range.
505
(1) Station number specified by the
LEDNB I LRDP
LCDNB I L W P
instructionsisnot
a
localstation.
(2) Head I/O number s ecified by
the
LEDNB I RTOP
instructions is not of a
remote station.
1
1
F
check and
step.
1
1m
l
I
wf
1 ml
506
I LEDNB I RFRP 1 -!
m l m l instructions is not
Head I10 number s ecifiedbthe
of a sDecial functionmodule.
507
.
AD57(S1) or AD58
wasexecutinginstructions
in
divided
processing
mode,
other
instructions
were
executed to either of them.
(2) When an AD57(S1) or AD58
wasexecutinginstructions
in
divided
processing
mode,
other
instructions
were
executed in
divided
mode
to
another AD57(S1) or AD58.
( 1 ) Whenthe
Table 8.1 Error Code List for the A[:*CPU
a-7
3ead the
error
step
using
a
Jeripheral device and provide interock with specialrelayM9066or
modify program structure so that,
when the AD57(S1) or AD58 is
3xecutinginstructionsindivided
wocessing
mode,
other
instruc:ions may not be executed to either
Df them or to another AD57(S1) or
9D58 individed mode.
(Continue)
IB INN 862574
8. ERROR CODE LISTS
Error Mesaga
'OPERATION
ERROR"
(Checked at
execution of
instruction.)
Error ' and Cause
50
C~mcbiveActlon
(1) An instruction which cannot be (1) Read theerrorstepusinga
executedbyremoteterminal
peripheraldeviceandcorrect
modules
connected
the
to
the program,meetingloaded
MNETMINLS3 was executedto
conditions of remote terminal
themodules.
modules.
(2) When
the
instruction
was
(2) Provideinterlock usi,ngM9081
__
executed to a remote terminal,
(communication
request
regthe
communication
request
istration areas BUSY signal) or
registration areas overflowed.
D9081 (number ofvacant areas
(3)
instruction
was
The
in the communication request
executed without executing the
re istration areas) whenthe
instruction.
PRC instruction isexecuted to
a remoteterminal.
The [ p I D 5 7 ) instruction was exinstruc13) Execute the
ecuted without executingthe
tion after execution of the
instrucm
o
r1 instruction.
tion.
Execute the
instruction
after execution ofthe
and
instructions.
m]
r"i
1-
1-
1-
m]I m
"MAIN CPU
DOWN"
60
(1) An interrupt (INT) instruction is
used the
inmicrocomputer
program.
(2) The CPU malfunctioned due to
noise.
(3)Hardwarefailure.
"BATTERY
ERROR"
(Checked at
power on.)
70
(11 Battery voltage has lowered be- :1) Replace battery.
low specifiedlevel.
:2) If aRAM
memoryorpower
(2) Batteryleadconnectoris
not
failurecompensationfunction
connected.
is used, connect the lead connector.
I
11) Delete the INT instruction from
the
microcomputer
program
since it is unusable.
12) Take propercountermeasures
fornoise.
13) Hardwarefailure.
Table 8.1 Error Code List for the A[:3CPU
1
8-8
IB I N N 662576.
c
',
APPENDIX
APPENDIX
Appendix 1 Processing Time Lists
The following listsgivetheprocessing
time required forthe
A2ACPU(Sl)/A3ACPU to execute the AD57(Sl)/AD58 control instructions.
The processing time given in the following lists has been
measured under the conditions mentionedbelow.The
processing timemay
vary withtype
of module and
operationmode to be used.
The AD57 module is used.
The CRT standard mode is set.
The cursor is not displayed.
Display
I
I
-cp51
mode
setting
instruction
1
I
CMODE
Display
condition
setting
instructions
Display
screen
control
instructions
I
CREV
CRDSP
CRDSPV
1
1
I
1
character
1
characters
96
39
152
2027
2219
1 character
I
I
CCDSPV
characters
96 2076
2213
1character
1 character
197 160
96characters
2051
1 character PRN
1
I
I
i
CSCRD
CON1
Designated
character
display
instructions
Cursor
control
instructions
188
COLOR
CCDSP
CSCRU
1
I
50
96 characters
PR
PRNV
2247
216 176
1234 1140
1 character 169 208
96 characters
1 character
96
1240 1371
178
characters
1245
217
1144
LOCATE
APP-1
IB INN €62576
APPENDIX
I
I
I
1, 1 ,I, 1 1;
PW
96 chaiacters
I
96 characters
character
1
CA 1
CR2
cc1
cc2
awCIN9
1328
1490
ClNZ
1character
fPRNV
L, I , .
CINPT
1 character
EPR
3esignated
character
display
nstructions
ClNHP
1character
EPRN
1
1207
1329 I
158
96 characters
1326
197
1488
1character
80 characters
1character
981
910
219172
character
187
149
1
character
1
10 characters
349
400
CINCLR
ASCII code
conversion
of display
characters
INPUT
JRAM data
reahrite
nstructions
208168
348
398
I
1
Designated
column
clear
instruction
40 characters
1041
956
20 character
I
I
ClNMP
Display
stateread
PUT
STAT
72
I
293
16 characters 490437
16 characters
16 characters
16 characters
I
1
I
I
16 characters
I
GET
Proc-sing
333
437
490
437
490
437
490
1 I I
I I I
I I I
282
1 character
192153
16 characters
376
322
1 word
96 words
1 word
96 words
322
221177
1191
1103
219 175
1189
1102
56
.
i
i
.
. . -.. . , .
APP-2
IB (NAJ 66257.4
%
1
*