Project

General

Profile

LAOS configuration file » History » Version 7

parag0n, 2013-01-09 18:29
Added new config variables from global.cpp

1 1 Anonymous
h1. LAOS configuration file
2
3 3 jaap
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 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 3 jaap
You can update the file by connecting the MBED to a PC with the USB connector. It should be visible as a small (2Mbyte) USB disk (label: MBED). Copy the configuration file to the root of this disk and eject the disk, using the appropriate method for your operating system (unmount, eject, save remove, etc.). You need to reset the laser to read the new configuration file. Use the reset button on the MBED or power down the system (make sure you remove the USB cable, or the MBED will not power down).
18
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
57
h4. System
58 4 jaap
59 3 jaap
This section defines the behavior of the system.
60
<pre>
61
sys.autohome 0                ; Enable automatic homing at startup [1/0] or wait for cover to close (you need a cover sensor)
62 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)
63 3 jaap
sys.nodisplay 0               ; Disable the I2C display [1/0]
64
sys.i2cbaud 100000            ; I2C display baudrate [Hz]
65 7 parag0n
sys.cleandir 1                ; Clean out directory on startup
66 3 jaap
</pre>
67
68 4 jaap
h4. Laser
69 1 Anonymous
70 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
71 3 jaap
<pre>
72
laser.enable 0                ; Laser enable signal polarity [0/1]
73
laser.on 1                    ; Laser on signal polarity [0/1]
74
laser.pwm.min 0               ; minimum pwm value [%]
75 1 Anonymous
laser.pwm.max 100             ; maximum pwm value [%]
76 7 parag0n
laser.pwm.freq 20000          ; pwm frequency [Hz]
77 3 jaap
</pre>
78
79
h4. Motion
80 4 jaap
81 3 jaap
The motion section defines the overall motion properties. 
82
<pre>
83
motion.enable  0              ; Enable signal state to enable motors [0/1] 
84
motion.homespeed 100          ; Homing speed [microsecond/step]
85
motion.speed  400             ; max linear speed [millimeter/sec]
86
motion.accel  1000            ; linear acceleration [millimeter/sec2]
87
motion.tolerance  50          ; tolerance for cornering [micrometer] (larger is faster, but less accurate corners) 
88
</pre>
89
90
h4. Axis
91 4 jaap
92 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).
93
At least two should be configured (x and y).
94
 
95
<pre>
96
; Next values are valid for axis x,y,z and e
97
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.
98
x.homedir 0                   ; state of the direction signal when homing (axis should move towards home-sensor) [1/0]
99
x.home 320000                 ; home positions [micrometer], this is the position we assume the home switch to be located 
100
101
x.scale -136986               ; axis scaling [steps/meter], use negative number to invert direction signal 
102 5 bartb
x.invert  1                   ; Invert signal polarity for step signal [1/0]
103 3 jaap
x.min 0                       ; minimal position [micrometer]. The axis is not allowed to move beyond this position 
104
x.max 320000                  ; maximum position [micrometer]. The axis is not allowed to move beyond this position 
105 5 bartb
x.rest 310000                 ; rest position [micrometer]. The position the axis assumes before/after a job
106 3 jaap
x.speed 1000                  ; maximum speed [millimeter/sec]. The maximum speed this axis is allowed to move at
107
</pre>