
2.4 Instruction Details
1
2
3-161
Chapter 2 Instructions
Example
Coding
Description
• The contents of DM0000 are transferred to the internal register when input relay
0000 is ON.
• The contents of the internal register (DM0000) and the value specified by the
operand ($00FF) are ORed for each bit and the result (logical sum) is input back
to the same register.
• When the operation result is "0", special utility relay 2010 turns ON.
• The contents of the internal register are transferred to DM0001.
• The following shows the case when DM0000 is "$F0F0".
Operands
Key operation
Line No. Instruction Operand
0000 LD 0000
0001 LDA DM0000
0002 CON
0003 ORA $00FF
0004 CON
0005 STA DM0001
ORA:
@ORA:
ORs contents of internal register and value
specified by operand for each of 16 bits,
and inputs result back to same register.
Or A
(Logical sum)
@
#,$
FUN
FUN
SET
1
ORL
3
SET
1
ORL
3
nnnn
ORA
nnnn
ORA
1
OR
111000011110000
1111000011110000
0000000011111111
1111000011111111
1111000011111111
DM0000
LDA
$00FF
ORA
DM0001
STA
D
15
D
14
D
13
D
12
D
11
D
10
D
9
D
8
D
7
D
6
D
5
D
4
D
3
D
2
D
1
D
0
Contents of DM0000 are
transferred to the internal
register.
Only when both bits of the
internal register and the
operand are "0", will the logical
sum be "0".
These values are ORed for
each bit to obtain logical sum.
The result is transferred
to DM0001.
Internal
register
Operand ($00FF)
Internal
register
OR (Logical sum)
truth table
(Result)
@
#,$
FUN
FUN
SET
1
ORL
3
ENT
R-SRCH
ENT
R-SRCH
Operand
0000
DM0000
LDA
$00FF
ORA
DM0001
STA
(DM0000) U ($00FF) = (DM0001)
Logical sum
:
:
DM000 ($F0F0)
($F0F0)
($F0FF)
Internal
Operand
Internal
register register
111
101
011
000
ORA / @ORA
Visual KV KV-300 KV-10/16 KV-24/40/80
0000 to 17915 0000 to 0009 0000 to 2915 0000 to 6915
DM0000 to DM1999 0500 to 17915 DM0000 to DM0999 DM0000 to DM1999
TM00 to TM31 DM0000 to DM9999 TM00 to TM31 TM00 to TM31
#00000 to #65535 TM00 to TM31 #00000 to #65535 #00000 to #65535
$0000 to $FFFF #00000 to #65535 $0000 to $FFFF $0000 to $FFFF
#TM00 to #TM29 $0000 to $FFFF #TM00 to #TM29 #TM00 to #TM29
#TM00 to #TM29
KVNKA Chap 02_4cP.p65 08.3.11, 0:02 PM161
Comentários a estes Manuais