Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 8 of 9

User's Manual Visual KV Series 3 Programming, pages 61 to 70

Pages 61 to 70 of 79

The original document is the PDF (355 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Keyence KV-16R

Page 61

2.1 Instruction List

Instruction

INTERVAL TIMER

16-BIT COUNTER

16-BIT COUNTER COMPARATOR

16-BIT COUNTER

Symbol ITVL PLS DMnnnn PAUSE mmmm RES

CTH0 nnnn

#ddddd CTCn

CTH1 nnnn

Function

3-117

14.4

4 (6)

3-204

2 (6)

3-204

14.4

4 (6)

3-204

CTH

Count input R

CTC n: Hardware-based comparator Comparator between preset & current n: 0,1 No. values of high-speed counter ddddd: #00001 2.3 to 3.5 ddddd: (CTH0). This comparator is to #65535 # preset turned ON when these value values are equal.

0004 2100 2101 2102

0005 0500 2200 2201 2202

16-bit (0 to 65535) updown counter for clock pulses with input response frequency of 30 kHz.

16-bit (0 to 65535) updown counter for clock pulses with input response frequency of 30 kHz.

CTH

Count input R

CTC n: Hardware-based comparator Comparator between preset & current n: 2,3 No. values of high-speed counter ddddd: #00001 ddddd: (CTH1). This comparator is to #65535 # preset turned ON when these value values are equal.

2.3 to 3.5

2 (6)

3-204

5.4 to 6.5

2 (8)

3-122

2 (4)

3-122

4.3

1 (4)

3-122

12.0 to 18.0

3 (20)

3-125

0.5

1 (4)

3-125

22.1 to 180.0

5 (10)

3-131

Subroutine No.

00 to 99

Executes subroutine specified by operand.

SUBROUTINE ENTRY

SBN nn

SBN (FUN 38)

Subroutine No.

00 to 99

Represents beginning of subroutine specified by operand.

SUBROUTINE RETURN

RET

RET (FUN 33)

REPEAT START

FOR nnnn

FOR (FUN 16)

Represents end of subroutine.

# constant, DM No. TMxx

#00000 to Executes program #65535 between FOR & NEXT DM0000 to for number of times DM1999 specified by operand. TM00 to TM29 Represents end of repetition.

NEXT (FUN 29)

•

5 (10)

DMnnnn: DM0000 to Measures pulse-to-pulse DM1985 interval & pulse width in mmmm: specified mode. 1000 to 1912 3000 to 9912

CALL (FUN 03)

• •

20.0 to 80.0

ITVL

DMnnnn: DM No. mmmm: R No.

nn CALL

HKEY nnnn mmmm

Page

Operand value

SUBROUTINE CALL

16-KEY INPUT

Bytes

Operand

#ddddd CTCn

NEXT

Exec.time (µs)

Mnemonic

16-BIT COUNTER COMPARATOR

REPEAT END

Visual KV Series

HKEY (FUN 17)

nnnn: Input R mmmm: Output R nnnn: 0000 to 415 mmmm: 0500 to 915

Reads 16-key data by time-sharing and outputs these data into special utility Rs 2900 to 2915.

Number of bytes represents the memory capacity required for each instruction. Number in ( ) represents the memory capacity required for object code of each instruction. All operand values are shown in normal notation. The corresponding relay numbers in X-Y-M notation are shown below: Normal notation 0000 to 0415 0500 to 0915 1000 to 6915 7000 to 17915

X-Y-M notation X000 to X04F Y050 to Y09F M1000 to M6915 X700 to X174F or Y750 to Y179F

Chapter 2 Instructions

3-37

12

Page 62

2.1 Instruction List

Visual KV Series

2.1.3 Arithmetic Instructions Instruction

DATA MEMORY WRITE

TRIMMER SETTING

Symbol

Mnemonic nnnn DW DMmmmm

DW n TMIN

TMIN (FUN 50)

Operand

Operand value

Function

Exec.time (µs)

Bytes

Page nnnn: #/$ constant DMmmmm: DM No.

nnnn: #0000 to #65535 $0000 to $FFFF DMmmmm: DM0000 to DM1999

Writes constant into data memory.

8.0

5 (8)

3-136

8.9

1 (6)

0 to 1

Inputs value set by access window’s digital trimmer (0 to 65535) to internal register.

Trimmer No. n TMIN nnnn LDA

LOAD A nnnn LDA

@TMIN @(FUN 50)

3-138 20.9

0000 to 17915 T000 to T249 C000 to C249 LDA 6.4 to 14.0 CTH0 to CTH1 (FUN 23) R No., DM0000 to Inputs value specified by C/T No., DM1999 operand into internal DM No, TM00 to TM31 register or inputs current TM xx, #00000 to value when T/C is #/$ constant, #65535 specified as operand. @LDA #TMxx $0000 to $FFFF 18.4 to 26.0 @(FUN 23) #TM00 to #TM29

2 STA (FUN 42)

nnnn STA

STORE A

R No., C/T No., DM No., TM xx, #TMxx

0500 to 1915 2100 to 17915 T000 to T249 C000 to C249 CTH0 to CTC3 DM0000 to DM1999 TM00 to TM29 #TM00 to #TM29

Transfers content of internal register to location specified by operand, or changes preset value when T/C is specified as operand.

6.6 to 28.5

@STA @(FUN 42)

nnnn CMP

CMP (FUN 04)

nnnn CMP

@CMP @(FUN 04)

nnnn ADD

DM0000 to Adds content of internal 9.4 to 34.2 register and value DM1999 specified by operand and TM00 to TM31 inputs result back to @ADD #00000 to 21.4 to 46.2 same register. @(FUN 00) DM/TM No. #65535 TMxx, $0000 to #/$ constant, $FFFF Subtracts value specified SUB 10.8 to 35.6 #TMxx #TM00 to by operand from content (FUN 46) #TM29 of register and inputs result back to same @SUB 22.8 to 47.6 register. @(FUN 46)

ADD nnnn ADD nnnn SUB

SUBTRACT nnnn SUB

Compares content of internal register and value specified by operand.

MUL (FUN 28)

nnnn MUL

@MUL @(FUN28)

MULTIPLY

• •

3-140 3 (18)

3 (8)

18.0 to 40.5

3 (18)

10.8 to 35.6

3 (6) 3-146

22.8 to 47.6

ADD (FUN00)

nnnn MUL

3 (8)

3-140 nnnn STA

COMPARE

1 (16)

Multiplies content of 14.4 to 38.1 internal register by value specified by operand and inputs result back to 26.4 to 50.1 same register.

3 (16)

3 (6) 3-150 3 (16)

3 (6) 3-150 3 (16)

3 (6) 3-150 3 (16)

Number of bytes represents the memory capacity required for each instruction. Number in ( ) represents the memory capacity required for object code of each instruction.

3-38 Chapter 2 Instructions

Page 63

2.1 Instruction List

Instruction

Symbol nnnn DIV

DIVIDE nnnn DIV nnnn ANDA

AND A nnnn ANDA nnnn ORA

OR A nnnn ORA nnnn EORA

EXCLUSIVE OR A nnnn EORA

SHIFT RIGHT A

SHIFT LEFT A

Mnemonic

Operand

ROTATE LEFT A

Exec.time (µs)

Function

DM0000 to DM1999 17.4 to 43.3 TM00 to TM31 Divides content of internal R No., #00000 to DM No., register by value specified #65535 TM xx, by operand and inputs $0000 to #/$ constant, result back to same @DIV $FFFF #TMxx 29.4 to 55.3 register. @(FUN 11) #TM00 to #TM29 DIV (FUN 11)

ANDA (FUN 01)

ANDs each of 16 bits of 8.2 to 33.1 0000 to 17915 internal register and that DM0000 to of value specified by DM1999 operand, and inputs result @ANDA R No., 20.2 to 45.1 TM00 to TM31 back to same register. @(FUN 01) DM No., #00000 to TM xx, #65535 #/$ constant, ORA ORs each of 16 bits of $0000 to 8.2 to 33.1 #TMxx (FNC 31) internal register and that $FFFF of value specified by #TM00 to @ORA operand, and inputs result 20.2 to 45.1 #TM29 @(FUN 31) back to same register. 0000 to 17915 DM0000 to 8.2 to 33.1 EXCLUSIVE-ORs each of DM1999 R No., TM00 to TM31 16 bits of internal register DM No., and that of value specified #00000 to TM xx, by operand, and inputs #65535 #/$ constant, result back to same $0000 to #TMxx @EORA register. $FFFF 20.2 to 45.1 @(FUN 15) #TM00 to #TM29 EORA (FUN 15)

#dd SRA

SRA (FNC 41)

#dd SRA

@SRA @(FUN 41)

#dd SLA

SLA (FNC 40)

#dd SLA

@SLA @(FUN 40)

#dd RRA

RRA (FUN 37)

#dd RRA

@RRA @(FUN 37)

#dd RLA

RLA (FUN 35)

#dd RLA

@RLA @(FUN 35)

Moves content of internal register serially right by value specified by operand.

Moves content of internal register serially left by value specified by operand. # constant

ROTATE RIGHT A

Operand value

Visual KV Series

• • •

Bytes

Page

3 (6) 3-150 3 (16)

3 (8) 3-159 3 (18)

3 (8) 3-161 3 (18)

3 (8)

3-164

12

3 (18)

9.3 to 27.6

2 (6)

21.3 to 39.6

2 (16)

9.2 to 27.6

2 (6)

3-166

3-166 21.2 to 39.6

2 (16)

10.3 to 28.6 Rotates contents of internal register and carry bit (2009) clockwise by operand value. 22.3 to 40.6

2 (6)

#01 to #16

10.3 to 28.6 Rotates contents of internal register and carry bit (2009) counterclock22.3 to 40.6 wise by operand value.

3-169 2 (16) 2 (6) 3-169 2 (16)

Number of bytes represents the memory capacity required for each instruction. Number in ( ) represents the memory capacity required for object code of each instruction. All operand values are shown in normal notation. The corresponding relay numbers in X-Y-M notation are shown below: Normal notation 0000 to 0415 0500 to 0915 1000 to 6915 7000 to 17915

X-Y-M notation X000 to X04F Y050 to Y09F M1000 to M6915 X700 to X174F or Y750 to Y179F

Chapter 2 Instructions

3-39

Page 64

2.1 Instruction List

Instruction

Visual KV Series

Symbol

Mnemonic

COM

COM (FUN 05)

COMPLEMENT

INCREMENT MEMORY

DECREMENT MEMORY

MULTIPLEXER

COM

@COM @(FUN 05)

nnnn INC

INC (FNC 19)

nnnn INC

@INC @(FUN 19)

nnnn DEC

DEC (FNC 07)

nnnn DEC

@DEC @(FUN 07)

#n MPX

MPX (FUN 27)

#n MPX

@MPX @(FUN 27)

DMX

DMX (FUN 12)

DMX

@DMX @(FUN 12)

TBCD

TBCD (FUN 47)

TBCD

@TBCD @(FUN 47)

TBIN

TBIN (FUN 48)

TBIN

@TBIN @(FUN 48)

ASC

ASC (FUN 02)

ASC

@ASC @(FUN 02)

RASC

RASC (FUN 32)

RASC

@RASC @(FUN 32)

ROOT

ROOT (FUN 36)

ROOT

@ROOT @(FUN 36)

DM/TM No.

# constant

2 TRANSFER BCD

TRANSFER BIN

ASCII CONVERT

SQUARE ROOT

• • •

Operand value

Function

Exec.time (µs)

Bytes

5.6

1 (4)

Inverts content of each bit in internal register.

DM/TM No.

DEMULTIPLEXER

REVERSE ASCII CONVERT

Operand

3-171 17.6

1 (14)

9.8

3 (6)

21.8

3 (16)

10.4

3 (6)

22.4

3 (16)

DM0000 to DM1999 TM00 to TM29

Adds 1 to content of data memory specified by operand.

DM0000 to DM1999 TM00 to TM29

Subtracts 1 from content of data memory specified by operand.

10.1

1 (6)

#0 to #3

Converts 4-bit data (specified by operand) of internal register into 16-bit data.

22.1

1 (16)

Converts position of highest order bit with 1 in internal register into 4-bit data.

22.6

1 (4)

34.6

1 (14)

Converts content of internal register (16-bit binary) into 4-digit BCD data.

5.6

1 (4)

17.6

1 (14)

9.6

1 (4)

21.6

1 (14)

9.7

1 (4)

21.7

1 (14)

9.3

1 (4)

21.3

1 (14)

95.7

1 (4)

107.7

1 (14)

Converts content of internal register (4-digit BCD) into 16-bit binary data.

Converts content of lower order 8 bytes of internal register into 2-digit ASCII code. Converts 2-digit ASCII code of internal register into 2-digit numerical value. Takes square root of 32bit data (TM00: higher order byte, internal register: lower order byte) and inputs result back to same register.

Page

3-172

3-172

3-176

3-176

3-180

3-180

3-183

3-183

3-185

Number of bytes represents the memory capacity required for each instruction. Number in ( ) represents the memory capacity required for object code of each instruction. All operand values are shown in normal notation. The corresponding relay numbers in X-Y-M notation are shown below: Normal notation 0000 to 0415 0500 to 0915 1000 to 6915 7000 to 17915

3-40 Chapter 2 Instructions

X-Y-M notation X000 to X04F Y050 to Y09F M1000 to M6915 X700 to X174F or Y750 to Y179F (OUTPUT)

Page 65

2.1 Instruction List

Visual KV Series

2.1.4 Interrupt Instructions Instruction

Symbol

Mnemonic

INTERRUPT DISABLED

DI

DI (FUN 08)

INTERRUPT ENABLED

EI

EI (FUN 13)

INT nnnn

INT CTCn

RETI

•

Bytes

Page

Disables execution of interrupt.

2.2

1 (12)

3-193

Enables execution of interrupt.

4.0

1 (10)

3-193

60.0 to 90.0

1 (8)

3-192

R No.

000 to 003

Executes interrupt instructions between INT and RETI at rising/falling edge of input relays 0000 through 0003.

Comparator No.

CTC0 to CTC3

Used with comparators CTC0 to CTC3 and executes instructions between INT and RETI.

60.0 to 90.0

1 (8)

3-192

Represents end of interrupt.

18.0 to 22.0

1 (4)

3-192

RETI (FUN 34)

• •

Exec.time (µs)

Function

Operand value

INT (FUN 20)

INTERRUPT

RETURN INTERRUPT

Operand

Number of bytes represents the memory capacity required for each instruction. Number in ( ) represents the memory capacity required for object code of each instruction. All operand values are shown in normal notation. The corresponding relay numbers in X-Y-M notation are shown below: Normal notation 0000 to 0415 0500 to 0915 1000 to 6915 7000 to 17915

X-Y-M notation X000 to X04F Y050 to Y09F M1000 to M6915 X700 to X174F or Y750 to Y179F

2.1.5 Function No. List (Alphabetical order) The following list shows the function Nos. used to enter instructions with the KVP3E(01) handheld programmer. ➮ Function No. Instruction

Refer to "Chapter 6 Handheld Programmer" on page 1-195 for details. Function No. Instruction

Function No. Instruction

Function No. Instruction

00

ADD

13

EI

26

MEMSW

39

SFT

01

ANDA

14

ENDS

27

MPX

40

SLA

02

ASC

15

EORA

28

MUL

41

SRA

03

CALL

16

FOR

29

NEXT

42

STA

04

CMP

17

HKEY

30

NOP

43

STE

05

COM

18

HSP

31

ORA

44

STG

06

CON

19

INC

32

RASC

45

STP

07

DEC

20

INT

33

RET

46

SUB

08

DI

21

JMP

34

RET1

47

TBCD

09

DIFD

22

KEEP

35

RLA

48

TBIN

10

DIFU

23

LDA

36

ROOT

49

TMH

11

DIV

24

MC

37

RRA

50

TMIN

12

DMX

25

MCR

38

SBN

51

TMS

52

UDC

Reference: To find function No. assigned to desired function: 1. Press the [FUN] key. 2. When the cursor appears at the position where the function No. is to be entered, press the ON or OFF key and scroll the functions and assigned Nos. to find the desired function.

Chapter 2 Instructions

3-41

12

Page 66

KV-300 KV-300 Series, Series, KV-10/80

2.2 Instruction List

2.2 Instruction List • • •

KV-300 Series, KV-10/80

Number of bytes represents the memory capacity required for each instruction. Number in ( ) represents the memory capacity required for object code of each instruction. Abbreviations: R: Relay, T: Timer, C: Counter, #: Decimal, $: Hex.

2.2.1 Basic Instructions KV-10/16/24/40/80 Instruction Symbol

KV-10/16/24/40/80 Mnemonic Operand Operand value Operand value Exec.time Bytes KV-10/16 (µs) KV-24/40/80 nnnn

LOAD

LOAD BAR AND

2

1.5 to 2.5

3 (4)

Connects N.O. contact to bus.

3-57

LDB

2.1 to 3.5

3 (6)

Connects N.C. contact to bus.

3-57

AND

1.5 to 2.5

AND BAR nnnn

ANB

0000 to 2915 0000 to 6915 T000 to T063 T000 to T119 C000 to C063 C000 to C119 2.7 to 4.5 CTC0 to CTC3 CTC0 to CTC3

OR nnnn

OR

1.5 to 2.5

OR BAR nnnn

ORB

2.7 to 4.5

AND LOAD

ANL

1.0 to 1.4

OR LOAD

ORL

1.0 to 1.4

R No. T/C No.

nnnn

OUT

OUT

0500 to 1915 2009 2300 to 2915 nnnn

OUT BAR

SET

RESET

0.1-s TIMER

OUB nnnn

(SET)

nnnn

(RES)

#ddddd T xxx

Page

LD nnnn nnnn

Function

SET

R No.

Connects N.O. contact in series with previous contact. Connects N.C. contact 3 (8) in series with previous contact. Connects N.O. contact 3 (4) in parallel with previous contact. Connects N.C. contact 3 (8) in parallel with previous contact. Connects in series 1 (2) blocks made of one or more contacts. Connects in parallel 1 (2) blocks made of one or more contacts. Outputs input ON/OFF 3 (13) status to R coil. Outputs inverted input 3 (4)

5.2 to 8.4 0500 to 1915 2009 2300 to 6915 6.4 to 10.4 3 (17) ON/OFF status to R coil.

3-58 3-60

3-60

3-61

3-63

3-65 3-65

0500 to 1915 0500 to 1915 2009 2009 Forces R ON and holds 2100 to 2915 2100 to 6915 3.1 to 23.0 3 (8) this status when input is 3-66 T000 to T063 T000 to T119 ON. C000 to C063 C000 to C119

RES

0500 to 1915 0500 to 1915 2009 2009 2100 to 2915 2100 to 6915 T000 to T063 T000 to T119 3.1 to 24.0 3 (8) C000 to C063 C000 to C119 CTH0 to CTH1 CTH0 to CTH1 CTC0 to CTC3 CTC0 to CTC3

TMR

17.0 to 22.0 2 (5) T No., # preset value

3-58

000 to 063 #00000 to #65535

000 to 119 #00000 to #65535

Forces R/T/C OFF when input is ON.

16-bit on-delay T that counts down in 0.1-s decrements. 16-bit on-delay T that counts down in 0.01-s decrements. 16-bit on-delay T that counts down in 1-ms decrements.

3-66

3-67

0.01-s TIMER

#ddddd H xxx

TMH (FNC49)

1-ms TIMER

#ddddd S xxx

TMS (FNC51)

COUNTER

#ddddd C xxx nnnn

C

# preset value, C No., clock source R

#00000 to 65535 000 to 063 0000 to 6915

#00000 to #65535 19.0 to 21.0 4 (7) 000 to 119 0000 to 6915

Sets 16-bit up-counter.

3-72

UP-DOWN COUNTER

UP #ddddd DW RES

UDC (FNC52)

C No., # preset value

000 to 063 #00000 to #65535

000 to 119 #00000 to #65535

Sets a 16-bit up-down counter.

3-76

UDC xxx

17.0 to 22.0 2 (5) 17.0 to 22.0 2 (5)

3-42 Chapter 2 Instructions

21.0 to 26.0 2 (5)

3-68 3-69

Page 67

2.2 Instruction List

Instruction

Symbol

DIFFERENTIATE UP nnnn DIFU

DIFFERENTIATE DOWN

KEEP

KEEP (FNC22)

R No.

0500 to 1915 2009 2100 to 2915

SFT (FNC39)

R No.1st & last R Nos.

1000 to 1915

HSP (FNC18)

R No.

(KV-10) 0000 to 0005 (KV-16) 0000 to 0009

D nnnn CLK RES mmmm

HIGH SPEED

HSP

MASTER CONTROL

MC nnnn

SFT nnnn

MCR

MEMSW $xxxx $xxxx

NOP

END

END HI

1000 to 1915

DIFD (FNC09)

SHIFT

MEMORY SWITCH

DIFU (FNC10)

nnnn DIFD

SET RES

MASTER CONTROL RESET

KV-10/16/24/40/80 Operand value Mnemonic Operand Operand value Exec.time Bytes KV-10/16 (µs) KV-24/40/80

R No.

KEEP

END

ENDH

KV-300 Series, KV-10/80

1000 to 1915 3000 to 6915

0500 to 1915 2009 2100 to 6915 1000 to 19153000 to 6915 (KV-24) 0000 to 0015 (KV-40) 0000 to 0107

Page

Turns ON R for 1 11.0 to 13.0 3 (5) scan time at rising edge of input. Turns ON R for 1 11.0 to 13.0 3 (5) scan time at falling edge of input. Turns ON R and 9.0 to 26.0 3 (5) holds this status when SET input is ON. 5 (7) Turns OFF R when RESET input is ON.

(*)

8.0 to 9.0

MC (FNC24)

1.8 to 3.2

MCR (FNC25)

0.6 to 1.0

MEMSW $ constant (FNC26)

Function

3 (4)

3-78

3-78

3-80 3-82

Sets shift register.

3-86

Reduces input relay time 1 (7) constant to 25 ms for higher input response. Selects ON/OFF 1 (2) status of R coils, Ts, or Cs. Represents end of MC. Sets memory switches.

3-89

3-89

––

3 (0)

NOP (FNC30)

––

Performs no opera1 (0) tion.

3-94

END

––

1 (3) Indicates end of each routine of program.

3-94

ENDH

––

Indicates end of entire 1 (0) program.

3-94

$ 0000 to $ FFFF

3-92

KV-300 KV-300 Instruction

Symbol

Exec.time Bytes (µs)

Function

Page

LD

0.15 to 0.70 3 (5)

Connects N.O. contact to bus.

3-57

LDB

0.15 to 0.90 3 (7)

Connects N.C. contact to bus.

3-57

Mnemonic Operand

Operand value nnnn

LOAD nnnn

LOAD BAR nnnn

AND

AND BAR

AND R No. T/C No.

nnnn

ANB

0000 to 0009 0500 to 17915 T000 to T249 C000 to C249 CTC0 to CTC3

0.15 to 0.50 3 (4)

0.15 to 0.80 3 (8)

OR nnnn

OR

0.15 to 0.50 3 (4)

OR BAR nnnn

ORB

0.15 to 0.80 3 (8)

AND LOAD

ANL

0.55

1 (3)

OR LOAD

ORL

0.55

1 (3)

Connects N.O. contact in series with previous contact. Connects N.C. contact in series with previous contact. Connects N.O. contact in parallel with previous contact. Connects N.C. contact in parallel with previous contact. Connects in series blocks made of one or more contacts. Connects in parallel blocks made of one or more contacts.

Chapter 2 Instructions

3-58

3-58

3-60

3-60

3-61

3-63

3-43

12

Page 68

2.2 Instruction List

KV-300 KV-300 Series, Series, KV-10/80 KV-300

Instruction

Symbol

Mnemonic Operand

Function

Page

Outputs input ON/OFF status to R coil.

3-65

Outputs inverted input 0.50 to 1.20 3 (11) ON/OFF status to R coil.

3-65

Operand value

Exec.time Bytes (µs)

0500 to 1915 2009 2300 to 17915

0.20 to 0.56 nnnn

OUT

OUT nnnn

OUB

OUT BAR nnnn

SET

(SET)

nnnn

RESET

(RES)

#ddddd

SET

R No.

RES

0500 to 1915 2009 2100 to 17915 T000 to T249 C000 to C249

Forces R ON and holds 3-66 0.20 to 5.70 3 (12) this status when input is ON.

0500 to 1915 2009 2100 to 17915 T000 to T249 C000 to C249 CTH0 to CTH1 CTC0 to CTC3

Forces R/T/C OFF 0.50 to 4.40 3 (12) when input is ON.

000 to 249 #00000 to 65535

16-bit on-delay T that counts down in 0.1-s decrements. 16-bit on-delay T that 5.60 to 10.40 2 (7) counts down in 0.01-s decrements. 16-bit on-delay T that 5.60 to 10.40 2 (7) counts down in 1-ms decrements. 5.60 to 10.40 2 (7)

T xxx

TMR

0.01-s TIMER

#ddddd H xxx

TMH (FNC49)

1-ms TIMER

#ddddd S xxx

TMS (FNC51)

COUNTER

#ddddd C xxx nnnn

C

UP-DOWN COUNTER

UP #ddddd DW RES

DIFFERENTIATE UP nnnn DIFU

DIFU FNC10)

DIFFERENTIATE DOWN nnnn DIFD

DIFD (FNC09)

KEEP

KEEP (FNC22)

R No.

SFT (FNC39)

1st & last R Nos.

0500 to 1915 2009 2100 to 17915 1000 to 1915 3000 to 6915 (*) 7000 to 9915

HSP (FNC18)

R No.

0000 to 0009

0.1-s TIMER

2

UDC xxx

T No., # preset value

# preset value, C No., clock source R

C No., UDC (FNC52) # preset value

R No.

KEEP

SET RES

SHIFT

D nnnn CLK RES mmmm

HIGH SPEED

HSP

MASTER CONTROL

MC

MC (FNC24)

MASTER CONTROL RESET

MCR

MCR (FNC25)

MEMORY SWITCH

MEMSW $xxxx $xxxx nnnn

SFT nnnn

NOP

END

END HI

END

ENDH

3 (8)

3-66

3-67

3-68

3-69

#00000 to #65535 000 to 249 0000 to 0009 0500 to 17915

7.60 to 9.45

Sets 16-bit up-counter.

3-72

000 to 249 #00000 to #65535

8.00 to 11.60 2 (10) Sets a 16-bit up-down counter.

3-76

1000 to 1915 3000 to 6915 (*) 7000 to 9915

4 (7)

Turns ON R for 1 scan 3 (10) time at rising edge of input. Turns ON R for 1 scan 3 (10) time at falling edge of 6.70 input. Turns ON R and holds 6.10 to 7.90 3 (11) this status when SET input is ON.

3-78

6.40 to 8.20 5 (15) Turns OFF R when RESET input is ON.

3-82

6.70

3-78

3-80

3 (8) Sets shift register.

3-86

0.20

Reduces input relay time 1 (4) constant to 25 ms for higher input response.

3-89, 1 (0)

Selects ON/OFF status of R coils, Ts, or Cs.

3-89, 3 (0)

Represents end of MC. Sets memory switches.

3-92

NOP (FNC30), 1 (0)

Performs no operation.

3-94

END

0.95

1 (1)

Indicates end of each routine of program.

3-94

ENDH, 1 (0)

Indicates end of entire program.

3-94

MEMSW $ constant (FNC26)

$0000 to $FFFF

4.66 to 4.92

Note: 14.0 + 3.0 x (n) to 17.0 + 3.0 x (n) (n represents number of times the original data is generated.)

3-44 Chapter 2 Instructions

Page 69

2.2 Instruction List

KV-300 Series, KV-10/80

2.2.2 Application Instructions KV-10/16/24/40/80 KV-10/16/24/40/80 Instruction Symbol

Mnemonic Operand Operand value Operand value Exec.time Bytes (µs) KV-10/16 KV-24/40/80

WAIT ON nnnn ON mmmm

W-ON

WAIT OFF nnnn OFF mmmm

W-OFF

WAIT UP EDGE nnnn ↑ mmmm

W-UE

WAIT DOWN EDGE nnnn ↓ mmmm

W-D nnnn: nnnn: 0000 to 2915 0000 to 6915 T000 to T063 T000 to T119 nnnn: C000 to C063 C000 to C119 R,T, or C CTC0 to CTC3 CTC0 to CTC3 No.

mmmm: 1000 to 1915 mmmm: 1000 to 1915 3000 to 6915

11.0 to 13.0 11.0 to 13.0 14.0 to 18.0 14.0 to 18.0

CONNECT

CON [FNC 06]

0.4 to 0.6

PUSH

MPS

11.0 to 14.0

READ

MRD

8.0 to 10.0

POP

MPP

10.0 to 12.0 nnnn STG

STG [FNC 44]

11.0 to 14.0

JUMP nnnn JMP

JMP [FNC 21]

END STAGE

ENDS

ENDS [FNC 14]

STEP

STP nnnn

STP [FNC 45]

STAGE

R No.

STEP END

STE

ITVL

R, T, C Nos.

1000 to 1915

1000 to 1915 3000 to 6915

0000 to 2915 0000 to 6915 T000 to T063 T000 to T119 C000 to C063 C000 to C119 CTC0 to CTC3 CTC0 to CTC3

STE [FNC 43] DM0000 to DM0985 1000 to 1912

DM0000 to DM1985 1000 to 1912 3000 to 6912

Function

Page

Turns ON R (2nd operand 5 (7) [mmmm]) when R, T, or C (1st 3-96 operand [nnnn]) turns ON. When R, T, or C (1st operand 5 (7) [nnnn]) turns OFF, R (2nd 3-96 operand [mmmm]) turns ON. R (2nd operand [mmmm]) 5 (7) turns ON at rising edge of R, T, 3-98 or C (1st operand [nnnn]). R (2nd operand [mmmm]) 5 (7) turns ON at falling edge of R, 3-98 T, or C (1st operand [nnnn]). Represents series connection 301 of output instruction together 3-102 with another instruction. 1 (3) Stores input status and arithmetic flag.

3-103

Reads input status and 1 (3) arithmetic flag stored with 3-103 PUSH. Reads & clears input status 1 (3) and arithmetic flag stored with 3-103 PUSH. Executes instructions between 3 (7) STG & JMP when R 3-106 (operand) is ON.

10.0 to 13.0

Turns current stage OFF and 3 (5) next stage ON when input is ON.

7.0 to 9.0

1 (3) Turns current stage OFF when 3-106 input is ON.

3.7 to 5.3

Executes program between 3 (7) STP & STE when R (operand) 3-114 is ON.

0.00

1 (0) Is used with STEP to make program step.

3-114

29.0 to 79.0

Measures pulse-to-pulse 5 (7) interval & pulse width in specified mode.

3-117

3-106

ITVL

DM & R No.

CTH

Clock source Rs

0004 2100 to 2102

9.0 to 39.0

#ddddd CTCn

CTC n: Comparator No. ddddd: # preset value n: 0,1 ddddd: #00000 to #00255

3.0 to 4.0

CTH1 nnnn

CTH

Clock source Rs

0005 2200 to 2202

8.0 to 48.0

#ddddd CTCn

CTC n: Comparator No. ddddd: # preset value n: 2,3 ddddd: #00000 to #65535

3.0 to 4.0

SUBROUTINE CALL nn CALL

CALL [FNC 03]

Subroutine No.

00 to 99

8.0 to 10.0

2 (6) Executes subroutine specified by operand.

3-122

SUBROUTINE ENTRY

SBN nn

SBN [FNC 38]

Subroutine No.

00 to 99

0.00

Represents beginning of 2 (0) subroutine specified by operand.

3-122

RET

RET [FNC 33]

INTERVAL TIMER

PLS nnnn DM PAUSE mmmm RES

8-BIT COUNTER

CTH0 nnnn

8-BIT COUNTER COMPARATOR 16-BIT COUNTER 16-BIT COUNTER COMPARATOR

SUBROUTINE RETURN

8-bit (0 to255) up-counter for 4 (4) clock pulses with input 3-277 response frequency of 10 kHz. Hardware-based comparator between preset & current 2 (5) values of high speed counter. 3-277 This comparator is turned ON when these values are equal. 16-bit (0 to 65535) up-counter 4 (4) for clock pulses with input 3-204 response frequency of 10 kHz. Hardware-based comparator between preset & current 2 (5) values of high speed counter. 3-204 This comparator is turned ON when these values are equal.

4.6 to 6.2 1 (5) Represents end of subroutine. 3-122

Chapter 2 Instructions

3-45

12

Page 70

2.2 Instruction List

Mnemonic Operand

KV-10/16/24/40/80 Operand value Operand value Exec.time Bytes KV-10/16 (µs) KV-24/40/80

Function

Page

FOR nnnn

FOR [FNC 16]

#00000 to #00000 to #65535 #65535 DM0000 to 5.0 to 20.0 3 (15) DM0000 to DM1999 DM0999 TM00 to TM29 TM00 to TM29

Executes program between FOR & NEXT for number of times specified by operand.

3-125

NEXT

NEXT [FNC 29]

1 (3)

Represents end of repetition.

3-125

5 (7)

Reads 16-key data by time-sharing and outputs these data into 3-131 special utility Rs 2900 to 2915.

Instruction

Symbol

REPEAT START

REPEAT END

16-KEY INPUT

KV-300 KV-300 Series, Series, KV-10/80

HKEY nnnn mmmm

HKEY [FNC 17]

# constant, DM No.

1.7 to 2.3

I/O R nnnn:0000 to 0009 10000 to 10415 : 17000 to 17415 mmmm:10500 to 10915 : 17500 to 17915

71 to 370

KV-300 KV-300

2

Instruction

Symbol

Mnemonic Operand

WAIT ON nnnn ON mmmm

W-ON

WAIT OFF nnnn OFF mmmm

W-OFF

WAIT UP EDGE nnnn ↑ mmmm

W-UE

WAIT DOWN EDGE nnnn ↓ mmmm

W-DE nnnn: R,T, or C No.

Operand value nnnn: 0000 to 0009 0500 to 17915 T000 to T249 C000 to C249 CTC0 to CTC3 mmmm: 1000 to 1915 3000 to 6915 (*)7000 to 9915

Exec.time Bytes (µs)

Function

Turns ON R (2nd operand [mmmm]) when R, T, or C (1st 3-96 operand [nnnn]) turns ON. When R, T, or C (1st operand 5.00 to 6.10 5 (9) [nnnn]) turns OFF, R (2nd 3-96 operand [mmmm]) turns ON. R (2nd operand [mmmm]) 6.10 to 7.50 5 (10) turns ON at rising edge of R, 3-98 T, or C (1st operand [nnnn]). R (2nd operand [mmmm]) 6.10 to 7.50 5 (10) turns ON at falling edge of R, 3-98 T, or C (1st operand [nnnn]). Represents series connection, 1 (0) of output instruction together 3-102 with another instruction. 5.00 to 6.10 5 (9)

CONNECT

CON [FNC 06]

PUSH

MPS

1.30

1 (9)

READ

MRD

2.70

Reads input status and 1 (18) arithmetic flag stored with PUSH.

POP

MPP

STAGE nnnn STG

STG [FNC 44] R No.

JUMP nnnn JMP

JMP [FNC 21]

END STAGE

ENDS

ENDS [FNC 14]

STEP

STEP END

INTERVAL TIMER

16-BIT COUNTER

STP nnnn

STP [FNC 45]

STE

STE [FNC 43]

ITVL

PLS nnnn DM PAUSE mmmm RES

CTH0 nnnn

R, T, C Nos.

1000 to 1915 3000 to 6915 (*)7000 to 9915

0000 to 0009 0500 to 6915 (*)7000 to 9915 T000 to T249 C000 to C249 CTC0 to CTC3

ITVL

DM & R No.

DMnnnn: DM0000 to DM9985 mmmm: 1000 to 1912 3000 to 6912 (*)7000 to 9912

CTH

Clock source Rs

0004 2100 2101 2102

3-46 Chapter 2 Instructions

Page

Stores input status and arithmetic flag.

3-103 3-103

Reads & clears input status 3-103 and arithmetic flag stored with PUSH. Executes instructions 5.60 to 6.50 3 (10) between STG & JMP when R 3-106 (operand) is ON. Turns current stage OFF and 3.80 to 6.00 3 (7) next stage ON when input is 3-106 ON. 1.40

1 (9), 1 (0)

Turns current stage OFF when input is ON.

3-106

1.30

3 (9)

Executes program between STP & STE when R (operand) is ON.

3-114, 1 (0)

Is used with STEP to make program step.

3-114

13.80 to 17.30

3.85

Measures pulse-to-pulse 5 (11) interval & pulse width in specified mode.

4 (7)

3-117

16-bit (0 to 65535) up-counter for clock pulses with input 3-204 response frequency of 30 kHz.