reprap
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap_v0.1/reprap.py

pyRepRap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
 
pyRepRap is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with pyRepRap.  If not, see <http://www.gnu.org/licenses/>.

 
Modules
       
serial
snap
time

 
Classes
       
axisClass
cartesianClass
extruderClass
syncAxis

 
class axisClass
     Methods defined here:
DDA(self, speed, seekTo, slaveDelta, waitArrival=True)
__init__(self, address)
backward(self, speed)
#spin axis backward at given speed
backward1(self)
#move axis one step backward
forward(self, speed)
#spin axis forward at given speed
forward1(self)
#move axis one step forward
free(self)
#power off coils on stepper
getPos(self)
#get current axis position
getSensors(self)
#debug only
homeReset(self, speed, waitArrival=True)
#goto 0 position. When waitArrival is True, funtion does not return until reset is compete
seek(self, pos, speed, waitArrival=True)
#seek to axis location. When waitArrival is True, funtion does not return until seek is compete
setNotify(self)
setPos(self, pos)
#set current position (set variable not robot position)
setPower(self, power)
setSync(self, syncMode)

 
class cartesianClass
     Methods defined here:
__init__(self)
free(self)
# free all motors (no current on coils)
getPos(self)
# get current position of all three axies
homeReset(self, speed, waitArrival=True)
# goto home position (all axies)
seek(self, pos, speed, waitArrival=True)
# seek to location (all axies). When waitArrival is True, funtion does not return until all seeks are compete
# seek will automatically use syncSeek when it is required. Always use the seek function
setPower(self, power)
stop(self)
# stop all motors
syncSeek(self, pos, speed, waitArrival=True)
# perform syncronised x/y movement. This is called by seek when needed.

 
class extruderClass
     Methods defined here:
__init__(self)
freeMotor(self)
getModuleType(self)
getTemp(self)
getVersion(self)
setCooler(self, speed)
setHeat(self, lowHeat, highHeat, tempTarget, tempMax)
setMotor(self, direction, speed)
setVoltateReference(self, val)

 
class syncAxis
     Methods defined here:
__init__(self, axis, seekTo, delta, direction)

 
Functions
       
bytes2int(LSB, MSB)
# Convert two 8 bit bytes to one integer
checkReplyPacket(packet, numExpectedBytes, command)
closeSerial()
getNotification(serialPort)
int2bytes(val)
# Convert integer to two 8 bit bytes
openSerial(port, rate, tout)
scanNetwork()
# Scan reprap network for devices (incomplete) - this will be used by autoconfig functions when complete

 
Data
        CMD_BACKWARD1 = 13
CMD_CALIBRATE = 9
CMD_DDA = 11
CMD_FORWARD = 1
CMD_FORWARD1 = 12
CMD_FREE = 6
CMD_GETDEBUGINFO = 54
CMD_GETMODULETYPE = 255
CMD_GETPOS = 4
CMD_GETRANGE = 10
CMD_GETSENSOR = 15
CMD_GETTEMP = 10
CMD_GETTEMPINFO = 55
CMD_HOMERESET = 16
CMD_ISEMPTY = 8
CMD_NOTIFY = 7
CMD_PRESCALER = 51
CMD_PWMPERIOD = 50
CMD_REVERSE = 2
CMD_SEEK = 5
CMD_SETCOOLER = 11
CMD_SETHEAT = 9
CMD_SETPOS = 3
CMD_SETPOWER = 14
CMD_SETTEMPSCALER = 53
CMD_SETVREF = 52
CMD_SYNC = 8
CMD_VERSION = 0
cartesian = <reprap.cartesianClass instance at 0xb762720c>
extruder = <reprap.extruderClass instance at 0xb765550c>
printDebug = False
sync_dec = 3
sync_inc = 2
sync_none = 0
sync_seek = 1