1.4 Program jumps

NC programs process their blocks in the sequence in which they were arranged when they were written. The processing sequence can be changed by introducing program jumps. The jump destination can be a block with a label or with a block number. This block must be located within the program.

Labels can be freely selected, but must follow some orders. Labels that are in the block that serves as the jump destination are ended by a colon. They must locate at the start of a block. If a block number is also present, the label is located after the block number.

Example:

Label1: G01 X20                                          ;Label1 is the label, jump destination

N100 GOTOB Label1    ;Jump to Label1 block

1.4.1 Unconditional program jumps

The unconditional jump instruction requires a separate block.

Example:

GOTOF Label     ; Jump forward (towards the last block of the program)

GOTOB Label     ; Jump backward (towards the first block of the program)

1.4.2 Conditional program jumps

Jump conditions are formulated after the IF instruction. If the jump condition (value not zero) is satisfied, the jump takes place. The jump destination can be a block with a label or with a block number. This block must be located within the program. Conditional jump instructions require a separate block.

Example:

IF condition GOTOF Label                           ; Jump forward

IF condition GOTOB Label                          ; Jump backward

Comparative operations:

= = Equal to

! = Not equal to

>  Greater than

<  Less than

> = Greater than or equal to

< = Less than or equal to

Example:

N10 IF R1>1 GOTOF Label      ; If R1 is greater than 1, go to the block with Label

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
5.2.6 Boring (boring 2) CYCLE86
Viewed 11866 times since Fri, Aug 26, 2016
5.3.2 Undercut CYCLE94
Viewed 3555 times since Fri, Aug 26, 2016
2.1 Absolute / incremental dimensioning: G90/G91, AC/IC
Viewed 4907 times since Thu, Aug 25, 2016
1.2 NC program name, structure and content rules
Viewed 2394 times since Thu, Aug 25, 2016
1.8 G function group
Viewed 2120 times since Thu, Aug 25, 2016
6.1 Outer contouring
Viewed 1506 times since Fri, Aug 26, 2016
5.2.2 Drilling, counterboring CYCLE82
Viewed 2458 times since Fri, Aug 26, 2016
5.2.3 Deep-hole drilling CYCLE83
Viewed 13806 times since Fri, Aug 26, 2016
5.2.7 Boring with stop 1 (boring pass 3) CYCLE87
Viewed 1903 times since Fri, Aug 26, 2016
5.2.9 Reaming 2 (boring 5) CYCLE89
Viewed 1723 times since Fri, Aug 26, 2016