CNC Machinist Calculator Ultra

Home › G-codes › Siemens 840D 828D › GOTOF

GOTOF Jump forward or back to a label

Siemens 840D 828D G-code · Mill and lathe

GOTOF jumps forward to a label, GOTOB jumps back. With IF it becomes a conditional jump for loops and checks.

Format

GOTOF LABEL or GOTOB LABEL or IF condition GOTOF LABEL

Addresses

AddressWhat it does
LABELJump destination, set as LABEL: in front of a block

How it works

Non modal.

Example program

R1=0 ; COUNTER
LOOP: G91 G0 X10 ; STEP
R1=R1+1
IF R1<5 GOTOB LOOP ; REPEAT 5 TIMES
…

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

Watch out for

Related codes

REPEAT · L

Every G-code for Siemens 840D 828D 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 840D 828D G-codes

App Store Google Play