Project

General

Profile

Actions

LGC Documentation » History » Revision 4

« Previous | Revision 4/6 (diff) | Next »
parag0n, 2013-01-09 13:52


LGC Documentation

This page is intended to be full documentation of the LGC (laser g-code?) file format as used by LAOS. All dimensions are in uM, so multiply your millimeter values by 1000.

An LGC file looks like this:

0 0 0
7 100 10000
7 101 10000
0 1000 1000
1 1000 11000
1 11000 11000
1 11000 1000
1 1000 1000

Each command line of an LGC file starts with a number, which is the command. Depending on the command given, the file can then have a number of parameters, seperated by spaces to tell the command what to actually do.

0 - Move

0 1000 1000
0  X   Y   

The 0 Command moves the laser head to the coordinates specified with the laser turned off. The command above will move the laser head to X=1mm, Y=1mm

1 - Cut

1 10000 10000
1  X   Y   

If no bitmap data is loaded, the 1 Command moves the laser head to the coordinates specified with the laser active. The command will activate the laser, then will move the laser head to X=10mm, Y=10mm, cutting all the way.

If bitmap data is loaded into the buffer, the laser will move, turning on and off as specified in the buffer. The command above would activate the laser,

2 - Move Z

2 1000
2  Z

The 2 Command moves the bed to the height specified. The command above will move the bed down 1mm

4 - Set X Y Z

4 4000 4000 0
4  X   Y   Z

Resets the current position of the laser cutter to the specified coordinates. The command above tells the laser cutter it is currently at x=4mm, y=4mm, z=0.

5 - Does Nothing

5

Not sure why this is explicity included in the LAOS LGC interpreter, as it does nothing. Maybe for future use?

7 - Set Parameter

7 100 - Set Speed

7 100 5000
7 100 SPD

This sets the speed the laser head will move at when a 0 or 1 command is issued. The units are percent of total speed * 100. The above command will set the head to move at 5000/100 = 50% maximum speed.

7 101 - Set Power

7 101 7000
7 100 PWR

This sets the duty cycle of the laser. The units are percent of total power * 100. The above command will set the laser to 7000/100 = 70% power.

7 102 - No Idea

7 102 5000

No idea what this does, it appears to be sent by visicut though.

9 - Store bitmap data

9 1 384 4294967280 4294967295 4294901760 4042322160 4042322160 4042322160 4042322160 4042322160 4042322160 65535 4294967295 268435455
9 B W D0 D1 D2 ...

This stores bitmap data in LAOS's buffer. Once this data is in the buffer, a G1 command will draw it.
B is the BPP of the data being sent. This will usually be 1.
W is the width of the data bieng sent. In this case it is 384 bytes of data.
D0, D1 etc are the data being sent.

Updated by parag0n almost 12 years ago · 4 revisions