Project

General

Profile

LAOS configuration file » History » Version 26

peteruithoven, 2013-08-06 10:58

1 1 Anonymous
h1. LAOS configuration file
2
3 26 peteruithoven
The LAOS Mainboard looks for a "config.txt" file on the MBED, to obtain some essential settings on power-up. It can be set up and modified my plugging the MBED into USB, which will cause it to appear as a USB drive (label: MBED) with that config.txt file on it. 
4 1 Anonymous
5
The proper settings will depend on your configuration, attached is a file which works with the [[HPC LS3020]], [[LAOS mainboard v0.3]], and the July 7th release of the [[LAOS firmware]].
6 3 jaap
7
h3. Location
8 4 jaap
9 3 jaap
The configuration file is located on the MBED USB partition and is named *config.txt*. When a *config.txt* file is found  on your SD card, this will take precedence over the file on the MBED.
10
11
h3. Sample configurations
12 4 jaap
13 6 jaap
Sample configuration files can be found at the end of this page. Copy it and edit it to match your needs. If you configure LAOS for a new machine, please add your configuration file to this page.
14 3 jaap
15
h3. Updating the configuration file
16 4 jaap
17 26 peteruithoven
You can edit the config.txt directly on the MBED. After editing you need to reset the laser to read the new configuration file. Use the reset button on the MBED to restart the lasercutter.
18 3 jaap
19
h3. Format
20 4 jaap
21 3 jaap
The general format is:
22
23
<pre>
24
name value
25
</pre>
26
27
Each value is a single word, without spaces.
28
29
h4. Comments
30 4 jaap
31 3 jaap
Comments can be included with a semicolon (";") character. All characters after the semicolon (up to a newline) are
32
ignored. Multiple Whitespace and newlines are ignored. 
33
34
h4. Sections
35 4 jaap
36 3 jaap
The file contains various sections that configure different parts of the system.
37
The exact location of these sections (and ordering of their parameters) is not significant. Each parameter has a default value that
38
is used if the parameter is not found in the configuration file, so they can be omitted if the defaults suit you. It is advised to
39
include all parameters in the file, because the defaults may change in the future, causing your system to fail when you update the 
40
firmware.
41
42
h4. Network
43 4 jaap
44 5 bartb
The network parameters define the network configuration. The minimal network configuration is '''net.dhcp 1'''. In this case, the laser will request a IP address from a DHCP server in the network, and is accessible via port 2000. You may need to instruct your DHCP server to hand out a fixed IP address, or assign a DNS entry to the laser, otherwise it may be difficult to 'find' the laser in the network.
45 3 jaap
46
<pre>
47
net.dhcp 0                    ; Enable DHCP for IP address [0/1], if enabled, the other network settings (except port number) are not used
48
net.port 2000                 ; Communication socket port number []
49
net.ip 192.168.0.111          ; IP address [xxx.xxx.xxx.xxx] 
50
net.netmask 255.255.255.0     ; netmask [xxx.xxx.xxx.xxx] 
51
net.gateway 192.168.0.1       ; gateway
52
net.dns 192.168.0.1           ; DNS server
53 7 parag0n
net.port 69                   ; Port the TFTP server is available on
54 3 jaap
</pre>
55
56
h4. System
57 4 jaap
58 3 jaap
This section defines the behavior of the system.
59
<pre>
60
sys.autohome 0                ; Enable automatic homing at startup [1/0] or wait for cover to close (you need a cover sensor)
61 7 parag0n
sys.autozhome 0               ; Enable automatic homing of Z axis at startup [1/0] or wait for cover to close (you need a cover sensor)
62 3 jaap
sys.nodisplay 0               ; Disable the I2C display [1/0]
63
sys.i2cbaud 100000            ; I2C display baudrate [Hz]
64 7 parag0n
sys.cleandir 1                ; Clean out directory on startup
65 1 Anonymous
</pre>
66 8 peter
Note: Enabling the display, while no display is connected can lead to continuous reboots of the firmware during startup. It is than difficult to change back this setting. 
67
Hold the button on the mbed and keep it pressed while inserting the MBED USB connection. Now update the config file.
68 3 jaap
69 4 jaap
h4. Laser
70 1 Anonymous
71 7 parag0n
The properties of the laser are described here.  To invert the laser polarity, switch round the values in laser.pwm.min and laser.pwm.max
72 3 jaap
<pre>
73
laser.enable 0                ; Laser enable signal polarity [0/1]
74
laser.on 1                    ; Laser on signal polarity [0/1]
75
laser.pwm.min 0               ; minimum pwm value [%]
76 1 Anonymous
laser.pwm.max 100             ; maximum pwm value [%]
77 7 parag0n
laser.pwm.freq 20000          ; pwm frequency [Hz]
78 3 jaap
</pre>
79
80
h4. Motion
81 4 jaap
82 3 jaap
The motion section defines the overall motion properties. 
83
<pre>
84
motion.enable  0              ; Enable signal state to enable motors [0/1] 
85
motion.homespeed 100          ; Homing speed [microsecond/step]
86
motion.speed  400             ; max linear speed [millimeter/sec]
87
motion.accel  1000            ; linear acceleration [millimeter/sec2]
88
motion.tolerance  50          ; tolerance for cornering [micrometer] (larger is faster, but less accurate corners) 
89
</pre>
90 9 peter
Note: the homepseed is specified as microseconds/step: a LOWER value means FASTER homing. Depending on your microstep resolution, values from 50 to 5000 are typical.
91 10 peter
The motion.speed is the speed that corresponds to 100% speed setting in your drawing.
92 20 peteruithoven
motion.enable determines wheter the enable pin of a motor get's 0V or 5V. Enabling it makes sure it can't be moved by hand for example. 
93 3 jaap
94
h4. Axis
95 4 jaap
96 3 jaap
The various axis are configured with their respective values. An axis definition may exist for up to four axis (x,y,z,e).
97
At least two should be configured (x and y).
98
 
99
<pre>
100
; Next values are valid for axis x,y,z and e
101
x.pol 0                       ; home/limit sensor polarity [1/0]. Inverts the input of the switch, so it can be a N.O. or N.C. switch.
102
x.homedir 0                   ; state of the direction signal when homing (axis should move towards home-sensor) [1/0]
103
x.home 320000                 ; home positions [micrometer], this is the position we assume the home switch to be located 
104
105
x.scale -136986               ; axis scaling [steps/meter], use negative number to invert direction signal 
106 5 bartb
x.invert  1                   ; Invert signal polarity for step signal [1/0]
107 3 jaap
x.min 0                       ; minimal position [micrometer]. The axis is not allowed to move beyond this position 
108
x.max 320000                  ; maximum position [micrometer]. The axis is not allowed to move beyond this position 
109 5 bartb
x.rest 310000                 ; rest position [micrometer]. The position the axis assumes before/after a job
110 3 jaap
x.speed 1000                  ; maximum speed [millimeter/sec]. The maximum speed this axis is allowed to move at
111
</pre>
112 11 peter
113 18 peteruithoven
Note: Currently the _min_/_max_ and _speed_ setting are not used. They can be left at the default value. During homing the axis is moved at a constant speed (as defined in the system configuration) and jogging via the LCD is done at a fixed speed.
114 11 peter
115 1 Anonymous
The procedure to configure this section correctly: 
116
117 18 peteruithoven
# Use the pol setting to determine what's the mode is of the endswitches when they are pushed in. You could turn the lasercutter off, disconnect the x and y motor cables, turn it on and see if you can get past the homing step by pressing the switches. When it passes the homing step without you need to switch the value. 
118 21 peteruithoven
# Make sure the lasercutter moves towards the home switches using the homedir setting. You could first connect one of the axis, config it's homedir and, restart and then configure the other. Make sure to press the off switch when the lasercutter moves away from the endswitches. Homing movement isn't influenced by scale setting. 
119 23 peteruithoven
# Set the coordinate of the home position in the home setting (in micrometers). This should be the distance between the homeswitches and the bottom left corner (LAOS's 0,0 point). So when the endswitches are positioned top right _x.home_ should the max horizontal range of your lasercutter and _y.home_ should be the vertical range. 
120
It's best to have the lasercutter only touch the endswitches when homing, because the position that they switch can slightly differ. When your x endswitch is on the right side this should be the max horizontal range, but the _x.rest_ should be a few millimeters less. When the x endswitch is on the left you could set _x.home_ to -10 and _x.rest_ to 0. 
121
You can also use _home_ to position the start point of the lasercutter princely above the honeycomb. The home setting thus also influences the general location of the things you cut out. 
122 25 peteruithoven
# Set the number of steps per meter in the scale parameter. The wiring of the motors influences it's direction, when it's moving into the wrong direction you can turn this into a negative number. When your cutting out mirrored this might be the reason. I tweaked this until my 10x10mm square was actually cut out 10x10mm, better methods are welcome. To fine tune it; cut out a rectangle as big as possible and then do: 
123
accurate x scale = current x scale / measured width * desired width
124 17 peteruithoven
# The rest position if configured with a position to move the axis out of the way after a job (so you can remove the workpiece) Also relative from the bottom left. This doesn't influence the 0,0 point of the lasercutter. 
125 19 peteruithoven
# The invert setting is another aspect of the motor control, it determines whether the pulses we send it go from 0V to 5V or the other way around. In some motors this doesn't matter, in some you might notice that it loses small steps. 
126 1 Anonymous
127 20 peteruithoven
VisiCut's position system is different than LAOS. VisiCut's 0,0 is top left, while the 0,0 of the LAOS laser is bottom left. To compensate for this there are _flipXaxis_ and _flipYaxis_ settings in the device settings xml. The _flipYaxis_ for LAOS is set by default to true (and the _flipXaxis_ to false).
128 24 peteruithoven
This trick also means the bed height in VisiCut is crucial and should be the same as y.home (but in mm instead of um).