
2.4 Instruction Details
3-132
2
Chapter 2 Instructions
2002 0001 C000
2815
0005
#09999
C000
0000
HKEY
0104
0512
ENDH
END
2900
LDA
TBIN
C000
STA
0600
HKEY
FUN
SET
1
LD
7
Output relayInput relay
ENT
R-SRCH
ENT
R-SRCH
Note 4: When two or more keys are pressed simultaneously even once during the
scan while relay 2814 is ON, relays 2900 through 2915 keep the current status as
soon as relay 2815 turns ON.
Note 5: The HKEY instruction does not properly operate if the scan time is longer
than 200 ms.
Note 6: When the expansion I/O module is used as an operand, the fetch may fail
unless the scan time is fixed to 2 ms or longer.
Operands
Key operation
Application of HKEY instruction
■ Changing the preset value of internal counters using a BCD digital switch
Coding
• As soon as 0005 turns ON, the preset value is replaced with the new preset
value specified by the digital switches.
➮
"TBIN instruction" (p. 3-180), "LDA, STA instructions" (p. 3-140)
• The digital switches are connected to the KV PLC as shown in the following
diagram: (Be sure to add the diodes at the specified points.)
• The preset values range from #0000 to #9999.
• The preset value is updated as soon as special utility relay 2815 turns ON.
Line No. Instruction Operand
0000 LD 2002
0001 ANB 0001
0002 C 000 #09999 0000
0003 CON
0004 AND C000
0005 OUT 0600
0006 LD 0005
0007 HKEY 0104 0512
0008 LD 2815
0009 LDA 2900
0010 CON
0011 TBIN
0012 CON
0013 STA C000
0014 END
0015 ENDH
Visual KV KV-300 KV-10/16/24/40/80
Input relay Output relay Input relay Output relay Input relay Output relay
0000 to 0500 to 00000 to 00500 to 0000 to 0500 to
0415 0915 00009 00503 0415 0915
10000 to 10500 to
10415 10915
::
17000 to 17500 to
17415 17915
KVNKA Chap 02_4bP.p65 08.3.11, 0:00 PM132
Comentarios a estos manuales