This is the firmware for the LaOS - Laser Open Source project. You can use it to drive a laser cutter. For hardware and more information, look at our wiki: http://wiki.laoslaser.org

Dependencies:   EthernetNetIf mbed

Embed: (wiki syntax)

« Back to documentation index

LaosMotion Class Reference

LaosMotion Class Reference

Motion Controll system. More...

#include <LaosMotion.h>

Public Member Functions

 LaosMotion ()
 Make new LaosMotion object.
 ~LaosMotion ()
 Destructor.
void write (int i)
 write() Write command and parameters to motion controller
int ready ()
 ready() ready to receive new commands
void reset ()
 reset() reset the state
void home (int xhome, int yhome, int zhome)
 Home the axis, stop when both home switches are pressed.
bool isStart ()
 Return true if start button is pressed.
void setPosition (int x, int y, int z)
 Hard set the absolute position Warning: only call when the motion is not busy!
void getPosition (int *x, int *y, int *z)
 get the absolute position
void setOrigin (int x, int y, int z)
 set the origin to this absolute position set to (0,0,0) to reset the orgin back to its original position.
void moveTo (int x, int y, int z)
 MoveTo()
void moveTo (int x, int y, int z, int speed)
 MoveTo() width specific speed (%)
int queue ()
 queue() return nr of items in the queue (0 is empty)

Detailed Description

Motion Controll system.

Example:

Definition at line 40 of file LaosMotion.h.


Constructor & Destructor Documentation

LaosMotion (  )

Make new LaosMotion object.

LaosMotion() Constructor Make new motion object.

Installs ticker

Definition at line 89 of file LaosMotion.cpp.

~LaosMotion (  )

Destructor.

Definition at line 141 of file LaosMotion.cpp.


Member Function Documentation

void getPosition ( int *  x,
int *  y,
int *  z 
)

get the absolute position

Definition at line 358 of file LaosMotion.cpp.

void home ( int  xhome,
int  yhome,
int  zhome 
)

Home the axis, stop when both home switches are pressed.

Definition at line 387 of file LaosMotion.cpp.

bool isStart (  )

Return true if start button is pressed.

Definition at line 339 of file LaosMotion.cpp.

void moveTo ( int  x,
int  y,
int  z 
)

MoveTo()

Definition at line 187 of file LaosMotion.cpp.

void moveTo ( int  x,
int  y,
int  z,
int  speed 
)

MoveTo() width specific speed (%)

Definition at line 201 of file LaosMotion.cpp.

int queue (  )

queue() return nr of items in the queue (0 is empty)

Definition at line 176 of file LaosMotion.cpp.

int ready (  )

ready() ready to receive new commands

Definition at line 166 of file LaosMotion.cpp.

void reset (  )

reset() reset the state

Definition at line 151 of file LaosMotion.cpp.

void setOrigin ( int  x,
int  y,
int  z 
)

set the origin to this absolute position set to (0,0,0) to reset the orgin back to its original position.

Note: Make sure you only call this at stand-still (motion queue is empty), otherwise strange things may happen

Definition at line 374 of file LaosMotion.cpp.

void setPosition ( int  x,
int  y,
int  z 
)

Hard set the absolute position Warning: only call when the motion is not busy!

Definition at line 349 of file LaosMotion.cpp.

void write ( int  i )

write() Write command and parameters to motion controller

Definition at line 216 of file LaosMotion.cpp.