Saut de ligne sur Mach3

  • Auteur de la discussion Léondelucel
  • Date de début
L

Léondelucel

Nouveau
Salut l'équipe, dans Mach3 comment inscrit-on un saut de ligne en gcode, si par exemple je veux qu'il exécute a partir de la ligne x.Sur certain programme on utilise Goto.End. Y a t il une formule sur mach 3 pour obtenir cela?? merci a vous
 
D

dh42

Compagnon
Salut,

Mach3 ne gère pas les GOTO, IF, etc ...

Par contre il gère l'appel d'une sous routine via M98


10.8.7 Call subroutine - M98

This has two formats:

(a) To call a subroutine program within the current part program file code M98 P~ L~ or
M98 ~P ~Q The program must contain an O line with the number given by the P word of
the Call . This O line is a sort of "label" which indicates the start of the subroutine. TheO
line may not have a line number (N word) on it. It, and the following code, will normally be
written with other subroutines and follow either an M2, M30 or M99 so it is not reached
directly by the flow of the program.

(b) To call a subroutine which is in a separate file code M98(filename)L~

for example M98 (test.tap)

For both formats:

The L word (or optionally the Q word) gives the number of times that the subroutine is to
be called before continuing with the line following the M98. If the L (Q) word is omitted
then its value defaults to 1.

By using parameters values or incremental moves a repeated subroutine can make several
roughing cuts around a complex path or cut several identical objects from one piece of
material.

Subroutine calls may be nested. That is to say a subroutine may contain a M98 call to
another subroutine. As no conditional branching is permitted it is not meaningful for
subroutines to call themselves recursively.

10.8.8 Return from subroutine

To return from a subroutine program M99 Execution will continue after the M98 which
called the subroutine.

If M99 is written in the main program, i.e. not in a subroutine, then the program will start
execution from the first line again. See also M47 to achieve the same effect.




++
David
 
L

Léondelucel

Nouveau
Salut, merci pour l'info je vais tester cela
a+
 
D

dh42

Compagnon
Salut,

Il existe un moyen de simuler le IF/THEN, mais c'est un peu acrobatique :maiscebien:


Je ne sais pas si on peut trouver un moyen de simuler un GOTO ; il n'y a rien qui me viens à l'esprit (je ne travaille qu'avec une FAO, et les FAO utilisent un GCode "simple", sans sous-routine, branchements conditionnel ou inconditionnels)

++
David
 

Sujets similaires

L
Réponses
11
Affichages
1 770
lecoyote
L
PL50
Réponses
14
Affichages
1 242
Squal112
Squal112
B
Réponses
3
Affichages
1 096
D
PL50
Réponses
25
Affichages
957
D
M4vrick
Réponses
9
Affichages
1 371
gaston48
G
2
Réponses
27
Affichages
1 327
jean-jacques
J
G
Réponses
0
Affichages
625
gaston83
G
S
Réponses
10
Affichages
1 694
D
Contrebasse52
Réponses
7
Affichages
1 310
Contrebasse52
Contrebasse52
Haut