SX Bayside Stage Tests.

16:04
  • Starting a data set with large offsets and the retry function.
  • FLAO has a larger tolerance (40, 40, 40)um vs (20, 20, 30)um of ARGOS
  • Testing to see if it is merely a problem of large offsets, independent of tolerance.
  • at 160 degrees.
  • centerpos=-60.
    step1 = 50.
    step2 = 2.

    # Pause between each movement in seconds
    pause = 2

    nsteps=5
    ntests = 10

    for test in range(ntests):

    pos = centerpos + random.random()*step1 - step1/2.
    print 'Test %d - moving to star - pos %5.3f mm' % (test, pos)
    app.stagex.moveTo(pos, accuracy = 0.04, waitTimeout=30)
    time.sleep(pause)
  • One X stage trial with the tolerance of 0.04 (40um).
  • No failures, as expected
  • Fixed the script to do larger offset. Now we can go randomly from -10 to -110
17:09
  • Restarting program.
  • With the large tolerance, we get no timeouts. I don't have a retry set, but will soon.
17:18
  • Trying 20um without retry.
18:51
  • Tried 10um at 250, 160, and 70 deg
  • can't get the x stage to fail for love or money.
  • Going to try the "retry" option.
  • 19:17
  • Y stage.
  • am not seeing timeouts.
19:30
  • Doing Z.
  • Still can't get the bloody thing to time out.
19:50
  • Modifying script to do offsets in all three axes at the same time.
  • Moving to new angle
20:22
  • Moving to 160
20:45
  • Going to try a longer delay between moves.
  • John H. suggests 20 seconds.
  • This might come closer to what ARGOS does in that they stay at a position for a long time.
  • I'm also going to put the range to be very close to the absolute limits 0-> -115, 0-> -80, 0->56, (x,y,z)
  • I'll be continuously spinning slowly (0.1 degree per second) between -90 and 450 on the rotator.
  • #!/usr/bin/env python

    from AdOpt import thAOApp, setupDevices, cfg

    app = thAOApp('testz', side = cfg.side)
    setupDevices.loadDevices( app, ['stagez'], check=True)
    setupDevices.loadDevices( app, ['stagey'], check=True)
    setupDevices.loadDevices( app, ['stagex'], check=True)

    import random
    import time
    random.seed()

    # Pos and steps in mm
    zcenterpos=30.
    zstep1 = 25.9
    step2 = 2.

    ycenterpos=-40.
    ystep1 = 39.9

    xcenterpos=-60.
    xstep1 = 54.9

    # Pause between each movement in seconds
    pause = 20

    nsteps=5
    ntests = 10

    for test in range(ntests):

    #pos = centerpos + random.random()*step1 - step1/2.
    zpos = zcenterpos + random.uniform(-1.0,1.0)*zstep1
    print 'Test %d - moving to star - zpos %5.3f mm' % (test, zpos)
    ypos = ycenterpos + random.uniform(-1.0,1.0)*ystep1
    print 'Test %d - moving to star - ypos %5.3f mm' % (test, ypos)
    xpos = xcenterpos + random.uniform(-1.0,1.0)*xstep1
    print 'Test %d - moving to star - xpos %5.3f mm' % (test, xpos)
    #app.stagex.moveTo(pos, accuracy = 0.01, waitTimeout=60)
    app.stagez.moveToWithRetry(zpos, accuracy = 0.01, moveTimeout=40)
    app.stagey.moveToWithRetry(ypos, accuracy = 0.01, moveTimeout=40)
    app.stagex.moveToWithRetry(xpos, accuracy = 0.01, moveTimeout=40)
    app.stagex.enable(True, onaftermove = True)
    app.stagey.enable(True, onaftermove = True)
    app.stagez.enable(True, onaftermove = True)
    time.sleep(pause)

    for step in range(nsteps):
    zs = random.random()*step2 - step2/2.
    ys = random.random()*step2 - step2/2.
    xs = random.random()*step2 - step2/2.
    zfinal = zpos + zs
    yfinal = ypos + ys
    xfinal = xpos + xs
    print 'Test %d - step %d (%5.3f mm), zpos %5.3f mm' % (test, step, zs, zfinal)
    print 'Test %d - step %d (%5.3f mm), ypos %5.3f mm' % (test, step, ys, yfinal)
    print 'Test %d - step %d (%5.3f mm), xpos %5.3f mm' % (test, step, xs, xfinal)
    #app.stagex.moveTo( final, accuracy = 0.01, waitTimeout=60)
    app.stagez.moveToWithRetry(zfinal, accuracy = 0.01, moveTimeout=40)
    app.stagey.moveToWithRetry(yfinal, accuracy = 0.01, moveTimeout=40)
    app.stagex.moveToWithRetry(xfinal, accuracy = 0.01, moveTimeout=40)
    app.stagex.enable(True, onaftermove = True)
    app.stagey.enable(True, onaftermove = True)
    app.stagez.enable(True, onaftermove = True)
    time.sleep(pause)
  • I made it so that it closes the brake after each move, this made it time out.
  • Traceback (most recent call last):
    File "./teststage.py", line 44, in <module>
    app.stagex.enable(True, onaftermove = enableAfter)
    NameError: name 'enableAfter' is not defined
    [AOeng@flao-sxwfs scripts]$ ./teststage.py >> /tmp/junk/SX_ZsXYZstage_10um_2_retry.txt
    Traceback (most recent call last):
    File "./teststage.py", line 60, in <module>
    time.sleep(pause)
    File "/home/aoeng/aoroot/lib/python/AdOpt/hwctrl/bayside_stage.py", line 227, in moveToWithRetry
    self.waitTargetReached( moveTimeout)
    File "/home/aoeng/aoroot/lib/python/AdOpt/hwctrl/simplemotor.py", line 300, in waitTargetReached
    raise AdOptError( AOErrCode['TIMEOUT_ERROR'], "Timeout error on %s" % self.name)
    AdOpt.AOExcept.AdOptError: Timeout error on baysidez - code: -5001 TIMEOUT_ERROR

21:38
  • I'll put the tolerance to the ARGOS tolerances like argos does (20,20,30)um.
  • It sets the break each time.
  • #!/usr/bin/env python

    from AdOpt import thAOApp, setupDevices, cfg

    app = thAOApp('testz', side = cfg.side)
    setupDevices.loadDevices( app, ['stagez'], check=True)
    setupDevices.loadDevices( app, ['stagey'], check=True)
    setupDevices.loadDevices( app, ['stagex'], check=True)

    import random
    import time
    random.seed()

    # Pos and steps in mm
    zcenterpos=30.
    zstep1 = 25.9
    step2 = 2.

    ycenterpos=-40.
    ystep1 = 39.9

    xcenterpos=-60.
    xstep1 = 54.9

    # Pause between each movement in seconds
    pause = 20

    nsteps=5
    ntests = 10

    for test in range(ntests):
    app.stagex.enable(True, onaftermove = True)
    app.stagey.enable(True, onaftermove = True)
    app.stagez.enable(True, onaftermove = True)
    #pos = centerpos + random.random()*step1 - step1/2.
    zpos = zcenterpos + random.uniform(-1.0,1.0)*zstep1
    print 'Test %d - moving to star - zpos %5.3f mm' % (test, zpos)
    ypos = ycenterpos + random.uniform(-1.0,1.0)*ystep1
    print 'Test %d - moving to star - ypos %5.3f mm' % (test, ypos)
    xpos = xcenterpos + random.uniform(-1.0,1.0)*xstep1
    print 'Test %d - moving to star - xpos %5.3f mm' % (test, xpos)
    #app.stagex.moveTo(pos, accuracy = 0.01, waitTimeout=60)
    app.stagez.moveToWithRetry(zpos, accuracy = 0.02, moveTimeout=40)
    app.stagey.moveToWithRetry(ypos, accuracy = 0.02, moveTimeout=40)
    app.stagex.moveToWithRetry(xpos, accuracy = 0.03, moveTimeout=40)
    app.stagex.enable(False)
    app.stagey.enable(False)
    app.stagez.enable(False)
    time.sleep(pause)

    for step in range(nsteps):
    app.stagex.enable(True, onaftermove = True)
    app.stagey.enable(True, onaftermove = True)
    app.stagez.enable(True, onaftermove = True)
    zs = random.random()*step2 - step2/2.
    ys = random.random()*step2 - step2/2.
    xs = random.random()*step2 - step2/2.
    zfinal = zpos + zs
    yfinal = ypos + ys
    xfinal = xpos + xs
    print 'Test %d - step %d (%5.3f mm), zpos %5.3f mm' % (test, step, zs, zfinal)
    print 'Test %d - step %d (%5.3f mm), ypos %5.3f mm' % (test, step, ys, yfinal)
    print 'Test %d - step %d (%5.3f mm), xpos %5.3f mm' % (test, step, xs, xfinal)
    #app.stagex.moveTo( final, accuracy = 0.01, waitTimeout=60)
    app.stagez.moveToWithRetry(zfinal, accuracy = 0.02, moveTimeout=40)
    app.stagey.moveToWithRetry(yfinal, accuracy = 0.02, moveTimeout=40)
    app.stagex.moveToWithRetry(xfinal, accuracy = 0.03, moveTimeout=40)
    app.stagex.enable(False)
    app.stagey.enable(False)
    app.stagez.enable(False)
    time.sleep(pause)

  • Only the one timeout.

-- %USERSIG{GregoryTaylor - 2017-10-24}%
Topic revision: r2 - 24 Oct 2017, GregoryTaylor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback