stage_and_Ando.py
def MoveToPosition(SN, deviceUnits, timeout=20, queryDelay=0.01, tolerance=1):
    """
    Moves the rotation stage to a certain position (given by device units).
    This call blocks future action until the move is complete.
    The timeout is in seconds
    
    SN is a c_buffer of the serial number string
    deviceUnits shold be a int.
    tolerance is when the blocking should end (device units)
    """
    
    GetStatus(SN)
    p.ISC_MoveToPosition(SN, c.c_int(int(deviceUnits)))

    t = time.time()

    while time.time()<(t+timeout):
        GetStatus(SN)
        p.ISC_RequestStatus(SN) # order the stage to find out its location
        currentPosition = p.ISC_GetPosition(SN)
        error = currentPosition - deviceUnits
        if np.abs(error)<tolerance: 
            return
        else:
            time.sleep(queryDelay)
    raise ValueError('Oh no!!! We never got there!! Maybe you should make the timeout longer than %.3f seconds dude.'%timeout)

    Moves the rotation stage to a certain position (given by device units).
    This call blocks future action until the move is complete.
    The timeout is in seconds
    
    SN is a c_buffer of the serial number string
    deviceUnits shold be a int.
    tolerance is when the blocking should end (device units)
    
Moves the rotation stage to a certain position (given by device units).
This call blocks future action until the move is complete.
The timeout is in seconds

SN is a c_buffer of the serial number string
deviceUnits shold be a int.
tolerance is when the blocking should end (device units)
Moves the rotation stage to a certain position ( given by device units ) . This call blocks future action until the move is complete . The timeout is in seconds SN is a c_buffer of the serial number string deviceUnits shold be a int . tolerance is when the blocking should end ( device units )
def MoveToPosition(SN, deviceUnits, timeout=20, queryDelay=0.01, tolerance=1):
    GetStatus(SN)
    p.ISC_MoveToPosition(SN, c.c_int(int(deviceUnits)))
    t = time.time()
    while time.time()<(t+timeout):
        GetStatus(SN)
        p.ISC_RequestStatus(SN) 
        currentPosition = p.ISC_GetPosition(SN)
        error = currentPosition - deviceUnits
        if np.abs(error)<tolerance: 
            return
        else:
            time.sleep(queryDelay)
    raise ValueError('Oh no!!! We never got there!! Maybe you should make the timeout longer than %.3f seconds dude.'%timeout)
def MoveToPosition ( SN , deviceUnits , timeout = 20 , queryDelay = 0.01 , tolerance = 1 ) : GetStatus ( SN ) p . ISC_MoveToPosition ( SN , c . c_int ( int ( deviceUnits ) ) ) t = time . time ( ) while time . time ( ) < ( t + timeout ) : GetStatus ( SN ) p . ISC_RequestStatus ( SN ) currentPosition = p . ISC_GetPosition ( SN ) error = currentPosition - deviceUnits if np . abs ( error ) < tolerance : return else : time . sleep ( queryDelay ) raise ValueError ( 'Oh no!!! We never got there!! Maybe you should make the timeout longer than %.3f seconds dude.' % timeout )
Moves the rotation stage to a certain position (given by device units).
Moves the rotation stage to a certain position ( given by device units ) .
"""
    Moves the rotation stage to a certain position (given by device units).
    This call blocks future action until the move is complete.
    The timeout is in seconds
    
    SN is a c_buffer of the serial number string
    deviceUnits shold be a int.
    tolerance is when the blocking should end (device units)
    """ # order the stage to find out its location
SN
deviceUnits
timeout
queryDelay
tolerance