LAOS configuration file

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.

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.


The primary 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. The SD card file does not change the file on the MBED USB partition so is most useful for preparing units that do not have a wired connection available. The SD card file is deleted or hidden at least on at least one cards and setups so the persistence of the configuration is not clear.

Sample configurations

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.

Updating the configuration file

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.


The general format is:

name value

Each value is a single word, without spaces.


Comments can be included with a semicolon (";") character. All characters after the semicolon (up to a newline) are
ignored. Multiple Whitespace and newlines are ignored.


The file contains various sections that configure different parts of the system.
The exact location of these sections (and ordering of their parameters) is not significant. Each parameter has a default value that
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
include all parameters in the file, because the defaults may change in the future, causing your system to fail when you update the


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.

net.dhcp 0                    ; Enable DHCP for IP address [0/1], if enabled, the other network settings (except port number) are not used
net.port 2000                 ; Communication socket port number []
net.ip          ; IP address [] 
net.mask        ; netmask [] 
net.gateway       ; gateway
net.dns           ; DNS server
net.port 69                   ; Port the TFTP server is available on


This section defines the behavior of the system.

sys.autohome 0                ; Enable automatic homing at startup [1/0] or wait for cover to close (you need a cover sensor)
sys.autozhome 0               ; Enable automatic homing of Z axis at startup [1/0] or wait for cover to close (you need a cover sensor)
sys.nodisplay 0               ; Disable the I2C display [1/0]
sys.i2cbaud 100000            ; I2C display baudrate [Hz]
sys.cleandir 1                ; Clean out directory on startup

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.
Hold the button on the mbed and keep it pressed while inserting the MBED USB connection. Now update the config file.


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

laser.enable 0                ; Laser enable signal polarity [0/1]
laser.on 1                    ; Laser on signal polarity [0/1]
laser.pwm.min 0               ; minimum pwm value [%]
laser.pwm.max 100             ; maximum pwm value [%]
laser.pwm.freq 20000          ; pwm frequency [Hz]

[joostn: unless I'm mistaken, it seems that laser.on is ignored: LaserOn signal seems to be hard coded to idle-high, active-low.
Also note that the laser Enable signal is not used currently.]


The motion section defines the overall motion properties.

motion.enable  0              ; Enable signal state to enable motors [0/1] 
motion.homespeed 100          ; Homing speed [microsecond/step]
motion.speed  400             ; max linear speed [millimeter/sec]
motion.accel  1000            ; linear acceleration [millimeter/sec2]
motion.tolerance  50          ; tolerance for cornering [micrometer] (larger is faster, but less accurate corners) 

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.
The motion.speed is the speed that corresponds to 100% speed setting in your drawing.
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.


The various axis are configured with their respective values. An axis definition may exist for up to four axis (x,y,z,e).
At least two should be configured (x and y).

; Next values are valid for axis x,y,z and e
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.
x.homedir 0                   ; state of the direction signal when homing (axis should move towards home-sensor) [1/0]
x.home 320000                 ; home positions [micrometer], this is the position we assume the home switch to be located 

x.scale -136986               ; axis scaling [steps/meter], use negative number to invert direction signal 
x.invert  1                   ; Invert signal polarity for step signal [1/0]
x.min 0                       ; minimal position [micrometer]. The axis is not allowed to move beyond this position 
x.max 320000                  ; maximum position [micrometer]. The axis is not allowed to move beyond this position 310000                 ; rest position [micrometer]. The position the axis assumes before/after a job
x.speed 1000                  ; maximum speed [millimeter/sec]. The maximum speed this axis is allowed to move at
                              ; typical 100 to 1000 mm/sec (lower if it skips steps, or quality is bad)
x.accel 5000                  ; typical 1000 to 10000 mm/sec2, (lower if it skips steps)

Note: x.speed and x.accel are used for fast bitmap (engrave) moves, see
Note: Marking and cutting use motion.speed and motion.accel for planning (though speed is limited by x.speed and y.speed as well)
Note: y.accel is currently unused
Note: min and max settings are partially used. For the X and Y axis, these are checked before starting cutting. For the Z axis, these are only checked during cutting (and motion is truncated if it would exceed limits, cutting is not halted). For the E axis, limits are not currently used.
Note: 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.

The procedure to configure this section correctly:

  1. 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.
  2. 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.
  3. 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.
    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 should be a few millimeters less. When the x endswitch is on the left you could set x.home to -10000 and to 0.
    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.
  4. 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:
    accurate x scale = current x scale / measured width * desired width
  5. 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.
  6. 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.

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).
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).

Updated by matthijs over 8 years ago · 31 revisions