CNC Machinist Calculator Ultra

Home › G-codes › Siemens 808D › GOTOF

GOTOF Jump forward or back to a label

Siemens 808D G-code · Mill and lathe

GOTOF jumps forward toward the program end, GOTOB back toward the start. IF in front makes it a conditional jump. The target is a label or block number in the same program.

Format

GOTOF LABEL or GOTOB LABEL or IF condition GOTOF LABEL

Addresses

AddressWhat it does
LABELJump target, set with a colon at the start of the block, as LABEL1:
conditionComparison such as R1>5, R1==2 or R1<>0

How it works

Non modal. The jump needs a block of its own.

Example program

R1=0 ; COUNTER
MC1: G91 G0 X10 ; STEP 10 IN X
R1=R1+1 ; COUNT UP
IF R1<5 GOTOB MC1 ; REPEAT UNTIL 5 STEPS
…

The full 8-line example is in the app. Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

L · RET

GOTOF on other controls

The same number can mean something different on another control.

ControlMeaning
Siemens 840D 828DJump forward or back to a label

Every G-code for Siemens 808D in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.

Open GOTOF in the app All Siemens 808D G-codes

App Store Google Play