Hello Guest it is April 19, 2024, 06:21:36 AM

Author Topic: GCODE  (Read 1718 times)

0 Members and 1 Guest are viewing this topic.

GCODE
« on: August 07, 2015, 11:53:03 PM »
Hi,
My name is Preet. I want to run set of 100 programs sequentially.Name of  the programs are
701.nc
702.nc
703.nc
.
.
.
.801.nc


It is taking time to load next program at the end of each program.
Can anyone please help me out with the solution that causes the  next program to be loaded and run at the end of each program on pressing start button.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: GCODE
« Reply #1 on: August 08, 2015, 01:42:42 PM »
OK you will really have to pay attention to details but this is how to do it. In your case you would not be calling internal Programs you would be calling external programs AND THEY have to be set up as a sub as well.  The #vars are the key to making it work. The Sub name is incremented by 1 each loop. so the name changes as well. I tested it and it does work here.

G0 X0 Y0

#100 = 1
#101 = #100
M98 P#100 L2
(End Test)

M30

o001
(TestLoop1)
#100 = [#100 +1]
M98 P#100 L1
M99
%

o002
(testLoop2)
M99

o003
(testLoop3)

M99
%