Stg: stage jmp: jump ends: end stage – KEYENCE Visual KV Series User Manual
Page 130

2.4 Instruction Details
3-106
2
Chapter 2 Instructions
Example
1) When transition condition relay 0000 is ON, transfers execution to STG1001.
2) 0500 turns ON. When transition condition relay 0001 is ON, transfers execution
to STG1002.
3) 0501 turns ON. When transition condition relay 0002 is ON, transfers execution
to STG1001 and repeats the process above.
When transition condition relay 0003 turns ON, transfers execution to STG1000
and 1003.
4) 0502 turns ON. The process finishes when transition condition relay 0004 turns
ON.
Coding
STG: Stage
JMP: Jump
ENDS: End Stage
Executes instructions in STG block when operand relay is ON.
When transition condition relay is ON, turns OFF relay of current
stage and transfers execution to stage specified by operand.
When transition condition relay is ON, turns OFF relay
of current stage.
ENDS
nnnn
JMP
nnnn
STG
LDB
4
LDB
4
LDB
4
SET
1
SET
1
ANL
2
FUN
FUN
FUN
Initial setting
2008
0000
0500
1001
JMP
1000
STG
0001
1002
JMP
1001
STG
0502
0004
ENDS
1003
STG
0501
0002
1001
JMP
1002
STG
0003
1000
JMP
1003
JMP
1000
SET
1)
2)
3)
4)
Line No.
Instruction
Operand
Line No.
Instruction
Operand
0000
LD
2008
0013
MPS
0001
SET
1000
0014
AND
0002
0002
STG
1000
0015
JMP
1001
0003
AND
0000
0016
MPP
0004
JMP
1001
0017
AND
0003
0005
STG
1001
0018
JMP
1000
0006
OUT
0500
0019
JMP
1003
0007
CON
0020
STG
1003
0008
AND
0001
0021
OUT
0502
0009
JMP
1002
0022
CON
0010
STG
1002
0023
AND
0004
0011
OUT
0501
0024
ENDS
0012
CON
:
:
:
STG / JMP / ENDS
KVNKA Chap 02_4bP.p65
08.3.11, 0:00 PM
106