Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Integrate 4 shots instead of 3 (using ccdtake(3, 1 , bShutter=True))  OK
  2. missing some shots when in 2 shots mode. SOLVED (USING MODE 3.2)
  3. Stopping the program (:RESET_PG 1) tooks long time than before 1-3 sec more)
    Needed one variable to check if RESET_PG is completed or if is OK to change mode.
  4. Switch from mode 1 to 3 still doesn't work. Example:
    ccdtake(1, 1 , bShutter=True) WORKS
  5. ccdtake(3, 1 , bShutter=True) FAILS!
    Still needs to do HOMING
  6. Fast OPEN and CLOSE doesn't work.

...

Code Block
   def _align(self):
        caput('%s:%s' % (self.sPpmPv, 'C2'), 1)
        val = caget('%s:%s' % (self.sPpmPv, 'C2'))
        C2      = int(val)
        APR_000 = self.apr_000 
        APR_180 = self.apr_180
        ALG_000 = self.alg_000
        ALG_180 = self.alg_180
        self._exe_align(C2, APR_000, APR_180, ALG_000, ALG_180)
        
    def _exe_align(self, C2, APR_000, APR_180, ALG_000, ALG_180):
        print '_exe_align self.homeDone', self.homeDone
        self._dis_pars()
        self._pr_log('Blades alignment -----------------')
        if not self.homeDone:
            self._pr_err('!! Need to home before alignment procedure')
            return False
        
        #cmd = '%s:%s' % (self.sPpmPv, 'C1'); val = '%d' % C2
        #self._pr_log('caput(\'%s\', %s)' % (cmd, val)) # set C1=C2
        caput('%s:%s' % (self.sPpmPv, 'SET_VM'), 25600)  # set EE=0 (open loop)
        caput('%s:%s' % (self.sPpmPv, 'SET_VI'),  2844) # set C1=0
        caput('%s:%s' % (self.sPpmPv, 'SET_A'),  45511) # set C1=0
        caput('%s:%s' % (self.sPpmPv, 'SET_D'),  45511) # set C1=0
                
        caput('%s:%s' % (self.sPpmPv, 'SET_C1'), C2) # set C1=C2
        caput('%s:%s' % (self.sPpmPv, 'SET_EE'), 1)  # set EE=1 (close loop)
        #cmd = '%s:%s' % (self.sPpmPv, 'EE'); val = 1
        #self._pr_log('caput(\'%s\', %s)' % (cmd, val)) # set EE=1 (close loop)
        
        print 'C2 >= APR_000', C2, APR_000
        print 'C2 < APR_180', C2, APR_180
        print 'C2 < APR_000', C2, APR_000
        print 'C2 >= APR_180', C2, APR_180
        
#        if C2 >= APR_000 and C2 < APR_180:
#            # move absolute to ALG_180 position
#            #cmd = '%s:%s' % (self.sPpmPv, 'MA'); val = '%d' % ALG_180
#            #self._pr_log('caput(\'%s\', %s)' % (cmd, val))
#            caput('%s:%s' % (self.sPpmPv, 'MA'), ALG_180)
#        elif C2 < APR_000 and C2 >= APR_180:
#            # move absolute to ALG_100 position
#            #cmd = '%s:%s' % (self.sPpmPv, 'MA'); val = '%d' % ALG_000
#            #self._pr_log('caput(\'%s\', %s)' % (cmd, val))
#            caput('%s:%s' % (self.sPpmPv, 'MA'), ALG_000)
#            
            
        caput('%s:%s' % (self.sPpmPv, 'MA'), ALG_000)   
#        else:
#            self.homeDone = False
#            print '!! Need to home before alignment procedure'
#            return False
#        cmd = '%s:%s' % (self.sPpmPv, 'EE'); val = 0
#        self._pr_log('caput(\'%s\', %s)' % (cmd, val)) # set EE=0 (open loop)
#        cmd = '%s:%s' % (self.sPpmPv, 'C1'); val = 0
#        self._pr_log('caput(\'%s\', %s)' % (cmd, val)) # set C1=0
        time.sleep(5)
        caput('%s:%s' % (self.sPpmPv, 'SET_EE'), 0)  # set EE=0 (open loop)
        caput('%s:%s' % (self.sPpmPv, 'SET_C1'), 0) # set C1=0
        caput('%s:%s' % (self.sPpmPv, 'SET_C2'), 0) # set C1=0

...