Project

General

Profile

Actions

LGC Documentation

See SimpleCode for the full documentation.

This page is intended to document the LGC (laser g-code?) file format as implemented by LAOS and provide examples. See the SimpleCode page for full documentation.

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 - No Operation

5

Does Nothing.

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.

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 (currently the only implemented bit depth).
W is the width of the data being sent. In this case it is 384 bytes of data.
D0, D1 etc are the data being sent.

Updated by parag0n about 11 years ago ยท 6 revisions