LGC Documentation » History » Version 4
parag0n, 2013-01-09 13:52
1 | 1 | parag0n | h1. LGC Documentation |
---|---|---|---|
2 | |||
3 | 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. |
||
4 | |||
5 | An LGC file looks like this: |
||
6 | |||
7 | <pre> |
||
8 | 0 0 0 |
||
9 | 7 100 10000 |
||
10 | 7 101 10000 |
||
11 | 0 1000 1000 |
||
12 | 1 1000 11000 |
||
13 | 1 11000 11000 |
||
14 | 1 11000 1000 |
||
15 | 1 1000 1000 |
||
16 | </pre> |
||
17 | |||
18 | 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. |
||
19 | |||
20 | h2. 0 - Move |
||
21 | |||
22 | <pre>0 1000 1000 |
||
23 | 0 X Y </pre> |
||
24 | |||
25 | 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 |
||
26 | |||
27 | h2. 1 - Cut |
||
28 | |||
29 | <pre>1 10000 10000 |
||
30 | 1 X Y </pre> |
||
31 | |||
32 | 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. |
33 | 1 | parag0n | |
34 | 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, |
35 | |||
36 | 1 | parag0n | h2. 2 - Move Z |
37 | 2 | parag0n | |
38 | 4 | parag0n | <pre>2 1000 |
39 | 1 | parag0n | 2 Z</pre> |
40 | 4 | parag0n | |
41 | The 2 Command moves the bed to the height specified. The command above will move the bed down 1mm |
||
42 | |||
43 | h2. 4 - Set X Y Z |
||
44 | |||
45 | <pre>4 4000 4000 0 |
||
46 | 4 X Y Z</pre> |
||
47 | |||
48 | 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. |
||
49 | |||
50 | h2. 5 - Does Nothing |
||
51 | |||
52 | <pre>5</pre> |
||
53 | |||
54 | Not sure why this is explicity included in the LAOS LGC interpreter, as it does nothing. Maybe for future use? |
||
55 | |||
56 | h2. 7 - Set Parameter |
||
57 | |||
58 | h3. 7 100 - Set Speed |
||
59 | |||
60 | <pre>7 100 5000 |
||
61 | 7 100 SPD</pre> |
||
62 | |||
63 | 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. |
||
64 | |||
65 | h3. 7 101 - Set Power |
||
66 | |||
67 | <pre>7 101 7000 |
||
68 | 7 100 PWR</pre> |
||
69 | |||
70 | 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. |
||
71 | |||
72 | h3. 7 102 - No Idea |
||
73 | |||
74 | <pre>7 102 5000</pre> |
||
75 | |||
76 | No idea what this does, it appears to be sent by visicut though. |
||
77 | |||
78 | h2. 9 - Store bitmap data |
||
79 | |||
80 | <pre>9 1 384 4294967280 4294967295 4294901760 4042322160 4042322160 4042322160 4042322160 4042322160 4042322160 65535 4294967295 268435455 |
||
81 | 9 B W D0 D1 D2 ...</pre> |
||
82 | |||
83 | This stores bitmap data in LAOS's buffer. Once this data is in the buffer, a G1 command will draw it. |
||
84 | B is the BPP of the data being sent. This will usually be 1. |
||
85 | W is the width of the data bieng sent. In this case it is 384 bytes of data. |
||
86 | D0, D1 etc are the data being sent. |