'Seek to axis location pos. If waitArrival is True, funtion waits until seek is compete to return'

def seek(self, pos, speed=None, waitArrival=True, units=None):

    if (speed == None):
        speed = self.speed
        if (speed == None):
            raise _RepRapError('Axis    speed    not    set')
    if (units == None):
        units = self.units
        if (units == None):
            units = UNITS_STEPS
    if (units == UNITS_STEPS):
        pass
    elif (units == UNITS_MM):
        newX = int((float(newX) * self.stepsPerMM))
        newY = int((float(newY) * self.stepsPerMM))
    elif (units == UNITS_INCHES):
        newX = int(((float(newX) * self.stepsPerMM) * 25.4))
        newX = int(((float(newY) * self.stepsPerMM) * 25.4))
    else:
        raise _RepRapError('Invalid    units')
    if (((pos <= self.limit) or (self.limit == 0)) and (pos >= 0) and (pos <= 65535) and (speed >= 0) and (speed <= 255)):
        (posMSB, posLSB) = _int2bytes(pos)
        p = snap.Packet(self.address, snap.localAddress, 0, 1, [CMD_SEEK, int(speed), posMSB, posLSB])
        p.send()
        if waitArrival:
            notif = p.getReply()
            if (not (notif.dataBytes[0] == CMD_SEEK)):
                raise _RepRapError('Expected    seek    notification')
    else:
        raise _RepRapError('Invalid    speed    or    position    value')
