Example #1
0
def set_endstops(argv):
    '''A short example program that moves stuff around
    '''
    io = serial_connection('/dev/ttyUSB0', '<2Bi')
    
    device_ids = range(1,4)
    devices = []
    for device_id in device_ids:
        devices.append(zaber_device(io, device_id))

    for device in devices:
        device.restore_settings()

    io.close()
def set_endstops(argv):
    '''A short example program that moves stuff around
    '''
    io = serial_connection('/dev/ttyUSB0', '<2Bi')
    
    device_ids = range(1,4)
    devices = []
    for device_id in device_ids:
        devices.append(zaber_device(io, device_id))

    for device in devices:
        #device.restore_settings()
        current_position = device.get_current_position(blocking = True)
        print current_position
        device.set_maximum_range(current_position)

    io.close()
Example #3
0
def set_endstops(argv):
    '''A short program that sets the endstops
    '''
    io = serial_connection('/dev/ttyUSB0', '<2Bi')

    device_ids = range(1, 4)
    devices = []
    for device_id in device_ids:
        devices.append(zaber_device(io, device_id))

    print('Setting end stops at:')

    for device in devices:
        #device.restore_settings()
        current_position = device.get_current_position(blocking=True)
        print str(current_position)
        device.set_maximum_range(current_position)

    io.close()
Example #4
0
def set_endstops(argv):
    '''A short program that sets the endstops
    '''
    io = serial_connection('/dev/ttyUSB0', '<2Bi')
    
    device_ids = range(1,4)
    devices = []
    for device_id in device_ids:
        devices.append(zaber_device(io, device_id))

    print('Setting end stops at:')

    for device in devices:
        #device.restore_settings()
        current_position = device.get_current_position(blocking = True)
        print str(current_position)
        device.set_maximum_range(current_position)

    io.close()