Project

General

Profile

LGC Documentation » History » Version 6

parag0n, 2013-02-20 10:53

1 1 parag0n
h1. LGC Documentation
2
3 5 peter
h1. See [[SimpleCode]] for the full documentation.
4 1 parag0n
5 6 parag0n
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. 
6 5 peter
7
All dimensions are in uM, so multiply your millimeter values by 1000. 
8
9 1 parag0n
An LGC file looks like this:
10
11
<pre>
12
0 0 0
13
7 100 10000
14
7 101 10000
15
0 1000 1000
16
1 1000 11000
17
1 11000 11000
18
1 11000 1000
19
1 1000 1000
20
</pre>
21
22
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.
23
24
h2. 0 - Move
25
26
<pre>0 1000 1000
27
0  X   Y   </pre>
28
29
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
30
31
h2. 1 - Cut
32
33
<pre>1 10000 10000
34
1  X   Y   </pre>
35
36 4 parag0n
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.  
37 1 parag0n
38 4 parag0n
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,  
39
40 1 parag0n
h2. 2 - Move Z
41 2 parag0n
42 4 parag0n
<pre>2 1000
43 1 parag0n
2  Z</pre>
44 4 parag0n
45
The 2 Command moves the bed to the height specified.  The command above will move the bed down 1mm
46
47
h2. 4 - Set X Y Z
48
49
<pre>4 4000 4000 0
50
4  X   Y   Z</pre>
51
52
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.
53
54 6 parag0n
h2. 5 - No Operation
55 4 parag0n
56
<pre>5</pre>
57
58 6 parag0n
Does Nothing.
59 4 parag0n
60
h2. 7 - Set Parameter
61
62
h3. 7 100 - Set Speed
63
64
<pre>7 100 5000
65
7 100 SPD</pre>
66
67
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.  
68
69
h3. 7 101 - Set Power
70
71
<pre>7 101 7000
72
7 100 PWR</pre>
73
74 1 parag0n
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.  
75 5 peter
76 4 parag0n
h2. 9 - Store bitmap data
77
78
<pre>9 1 384 4294967280 4294967295 4294901760 4042322160 4042322160 4042322160 4042322160 4042322160 4042322160 65535 4294967295 268435455
79 1 parag0n
9 B W D0 D1 D2 ...</pre>
80 4 parag0n
81
This stores bitmap data in LAOS's buffer. Once this data is in the buffer, a G1 command will draw it.
82 5 peter
B is the BPP of the data being sent.  This will usually be 1 (currently the only implemented bit depth).
83 6 parag0n
W is the width of the data being sent.  In this case it is 384 bytes of data.
84 4 parag0n
D0, D1 etc are the data being sent.