6-132
GOEND
6.5.2 Jump to END (GOEND)
GOEND
Function
(1) Jumps to the FEND or END instruction in the same program file.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The GOEND instruction has been executed after the execution of the CALL, ECALL
instruction, and prior to the execution of the RET instruction. (Error code: 4211)
• The GOEND instruction has been executed after the execution of the FOR instruction,
and prior to the execution of the NEXT instruction. (Error code: 4200)
• The GOEND instruction has been executed during an interrupt program but prior to the
execution of the IRET instruction. (Error code: 4221)
• The GOEND instruction was executed between the CHKCIR and CHKEND instruction
block. (Error code: 4230)
• The GOEND instruction was executed between the IX and IXEND instruction block.
(Error code: 4231)
Program Example
(1) The following program jumps to the END instruction if D0 holds a negative number.
[Ladder Mode] [List Mode]
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn Constants Other
Bit Word Bit Word
–– ––
Basic
Process
High
performance
Redundant
Universal
Command
GOENDGOEND
Step
Instruction
Device