Versions Compared

Key

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

Welcome!

You'll want to read this first: Pulse Picker Presentation 2014-06-26.pptx (UPDATED 2014-06-26 with new "Follower" mode).

For more detailed information you can read the children pages below.

Children Display

Pulse Selector in the Hutches

Table of Contents

Tuesday Jul 2nd

Initial XRay aligned positions:
Y position: 0.0000 mm
X position: 0.1512 mm

Test examples
Single shot 10 images

Code Block

   ccdtake(1,10, bShutter=True)
   

Burst mode 3 shots 100 images

Code Block

   ccdtake(3,100, bShutter=True)
   

Alignment Laser used to test the system

  1. To insert the laser
    Code Block
    
        In [2]: rl2.movein()
        
  2. To remove the laser
    Code Block
    
        In [2]: rl2.moveiout()
        

Results: Tests doesn't work satisfactory. Problems found in Mcode:

  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.

Monday Jul 1st

New tests with new ioc version (new MCode version)
Features:

  • New MODE (MODE 3.3)
    • One EVR Trigger OPEN, Next EVR Trigger CLOSE OK IT WORKS
  • Fast OPEN and CLOSE commands NEED TO BE TESTED

TO BE IMPLEMENTED IN THE MCODE ASAP:

  • Start position insensitive
  • HOME (Index Mark) position set to zero (DIAL)
  • START position (insensitive) relative to HOME (USER)
  • Record to report position (Encoder) as monitor at any time

TODO and issues in XCS

==================================================

in xcs-control:

caput XCS:SB2:MMS:09:SET_VE 0

modify reg/d/iocCommon/sioc/ioc-xcs-trigger-ims/startup.cmd

to point to working area,

ssh ioc-xcs-mot1

kill ioc (telnet localhost...)

boot ioc from reg/d/iocCommon/sioc/ioc-xcs-trigger-ims/startup.cmd

===================================================
to fast open/close:
caput XCS:SB2:MMS:09:MODE_OPEN 1 (C2 should be around 655)
caget XCS:SB2:MMS:09:SE_L (to be read 4)
caput XCS:SB2:MMS:09:MODE_CLOSE 1 (C2 should be around 0 or 2x655)
caget XCS:SB2:MMS:09:SE_L (to be read 5)
===================================================

   1. START STOP mode3.3

         SET_TG 2

         SET_MODE 3

  2. FAST OPEN/CLOSE PV

  3. START POSITION INDEPENDENT:

  1. ISSUE: No counting -> trigger "burst stop" sometimes
  2. FIXME: Avoid arm/disarm
  3. TODO: Benchmark time needed for position correction
  4. FIXME: Start position dependent on present position
  5. TODO: If
    position correction takes <= 10ms the do each time
  6. TODO: Home offset as PV
  7. TODO: Make Aperture Angle as VAR and PV (to be changed as needed)
  8. TODO: Dial zero @ Encoder Home marker
    User zero @ "Aligned" position (means that RESET_PG reset only users) - to be discussed with Jeff
  9. TODO: Fast Open/Close PV
  1. NEXT: Uses First Trigger to Open, Second Trigger to Close
    The PP listen then for just one Event Code.
    Example of sequence:
    84 1 -> PP
    85 2 -> DAQ
    85 1 -> DAQ
    85 1 -> DAQ
    84 1 -> PP
    85 1 -> DAQ

Alignment without pass by open shutter position (Working in progress):

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

MCODE programs (Jeff version on Jun 26 2013):

located in:

Code Block

    [working area]... modules/pcds_motion/current/pcds_motionApp/src/ims_bootup_V3.mcode
    

Working in Progress:

Code Block

initial condition:
Motor is homing from outside:
 C2 = 0 C1= 0
 MN = ?
 MF = XXXX steps (known) forward
 MB = XXXX steps (known) backward
 MO = XXXX steps (known) open position

Idle routine:
looking for where to go... (mod 2, mod 3, mod 4, fastopen, fastclose)

checkset subroutine
 check my pos:
   read C2
   MN=MB, C2=MF +/- DELTA (dead band)
   RT

   MN=MF, C2=MB +/- DELTA (dead band)
   RT


   (MA MF and  MN=MF), C2=MO +/- DELTA (dead band)
   RT

   if I m in startup+:
     set next move to startup- (MB)
     return subroutine
   if I m in startup-:
     set next move to startup+ (MF)
     return subroutine
   if I m open (MO):
     MA to startup+ (MF)
     set next move to startup- (MB)

mod 2
call chekset
waiting for trigger
...

mod 3
call chekset
waiting for trigger
...

mod 4
call chekset
waiting for trigger
...

fastopen
MA to open pos

fastclose
if in open pos
MA to startup+

Single Shot Mode (MODE 1)
Code Block

' Program Fragment: MODE_1 (Single Shot)
 

Continuous Mode (MODE 2)
Code Block

' Program Fragment: MODE_2 (Continuous)
 

Burst Mode (MODE 3)
Code Block

' Program Fragment: MODE_3 (Burst mode)
 

Settings in XCS

Server running the IOC

Code Block

ssh ioc-xcs-mot1

Startup IOC

Code Block

su <authorized_user>
ssh ioc-xcs-mot1
sudo /reg/d/iocCommon/sioc/ioc-xcs-trigger-ims/startup.cmd
telnet localhost 30999

How to start the Pulse Selector Python script:

Code Block

/reg/neh/home1/paiser/working/ioc/xcs/xip_pp/current/pyscripts/src/run_pp.sh

Configuration file

Code Block

~/.pp_xcs/pvlist.lst

Current configuration (Working in progress)

Code Block

# ---------------------------------------------------------------
# Pulse Selector Description File
# ---------------------------------------------------------------
# Syntax:
#   <TYPE>, <PVNAME|IOCNAME|SCRIPT>, <DESC> # some_more_comments
# Where:
#   <Type>    : "SEQ" -> Sequencer
#               "EVR" -> EVR associated to sequencer
#               "PPM" -> Pulse Selector
#               "SVR" -> Motor and Pulse Selector Server
#               "IOC" -> Motor and Pulse Selector software IOC
#               "SPP" -> EDM screens for motion
#               "SEV" -> EDM screens for evr
#   <PVNAME>  : PV base name
#   <IOCNAME> : Server name associated to Pulse Selector PVs
#   <DESC>    : User description
# Notes:
#   PVNAME or IOCNAME are not case sensitive.
#   Line can be commented out by starting with '#' character.
# ---------------------------------------------------------------
SEQ, XPP:R35:IOC:SEQ,     XPP DAQ Sequencer                            # FIXME To check
PLY, IOC:IN20:EV01,       XPP DAQ Sequencer play mode                  # FIXME to check
EVR, XCS:R42:EVR:01,      VME EVR located in XCS Rack 42               # OK
IOC, ioc-xcs-trigger-ims, IOC running pulse selector                   # OK
SPP, ppm_gui.sh,          EDM screen startup shell script for PP motor # OK
PPM, XCS:SB2:MMS:09,      Pulse Selector Motor                         # OK
YTR, XCS:SB2:MMS:21,      Y translation motor                          # OK
XTR, XCS:SB2:MMS:08,      X translation motor                          # OK
SEV, evr_gui.sh,          EDM screen startup shell script for EVR      # OK
SVR, ioc-xcs-mot1,        server running IOC for pulse selector        # OK

Screens

PP and Motor GUIs :

Code Block

/reg/neh/home1/paiser/working/ioc/xcs/xip_pp/current/pyscripts/ppm_gui.sh XCS:SB2:MMS:09 XCS:SB2:MMS:21 XCS:SB2:MMS:08

TODO:

Code Block

 # FIXME Configuration file default location
 # TODO  Autosave default rampup values
 # TODO  Fast close and open functions
 # TODO  Test Sequencer

Setup Lab tests

Table of Contents

XIP Pulse Selector: Files, modes, schematics

Setup Lab: EVR Settings

Setup Lab: Working with the EVR from pslogin
  1. in pslogin type (you need to have your securekeys):
    Code Block
    
     ssh ioc-tst-cam5 /reg/neh/home1/paiser/bin/evr.sh EVR=TST:CAM:05:EVR
     
  2. Then configure EVR as you need manually...
Setup Lab: In case the server ioc-tst-cam5 was power cycled
  1. Connect to the server:
    Code Block
    
     ssh ioc-tst-cam5
     
  2. Run the startup command that contains EVR ioc in:
    Code Block
    
     sudo /reg/d/iocCommon/sioc/ioc-tst-cam5/startup.cmd
     
  3. You should see with psproc:
    Code Block
    
     [paiser@ioc-xrt-xcscam04 ~ 12:18:20] psproc
     PID   USER-ID   SIOC                      COMMAND   HOSTNAME            PORT
     4851  tstioc    caRepeater                procServ  ioc-xrt-xcscam04    30000
     5147  tstioc    ioc-tst-cam5              procServ  ioc-xrt-xcscam04    30001
     5150  tstioc    ioc-tst-cam5              procServ  ioc-xrt-xcscam04    40000
     
Setup Lab : In case you need to power cycle ioc-tst-cam5
Code Block

 ipmitool -I lanplus -U ADMIN -P <you_should_know> -H ioc-tst-cam5-ipmi power status
 ipmitool -I lanplus -U ADMIN -P <you_should_know> -H ioc-tst-cam5-ipmi power reset
 

Where: <you_should_know> is the standard ipmi password that you_should_know...

Setup Lab : Test Screens

Python homing script:
/reg/neh/home1/jsludvik/test-python/xip-home.py

XIP main GUI:
/reg/neh/home1/jsludvik/svn/trunk/ioc/xpp/xip_pp/current/motionScreens/xip_gui.sh

XPP motor GUIs:

Code Block

/reg/g/pcds/package/epics/3.14/modules/pcds_motion/R2.3.4/launch-motor.sh XPP:TST:MMS:01
/reg/g/pcds/package/epics/3.14/modules/pcds_motion/R2.3.4/launch-motor.sh XPP:TST:MMS:02
/reg/g/pcds/package/epics/3.14/modules/pcds_motion/R2.3.4/launch-motor.sh XPP:TST:MMS:03

Startup.cmd:

Code Block

/reg/d/iocCommon/sioc/ioc-xpp-trigger-ims/startup.cmd

Mode Descriptions

Mode 1: Single pulse
Mode 2: Continuous trigger

Mode 1 and 2 should be the same program, as the Seq will generate the pulses to the motor, and open/close operation shouldn't make any difference whether it is 1 or more. The motor sees a trigger and moves.

This mode is accessed by <PV>:RUN_MODE2

Mode 3: The motor opens on a pulse, counts N pulses and closes on the Nth pulse. The pre-trigger and close trigger should be factored in by the upper layer software to determine the proper N value to put into the motor. All the motor does is, open on N=1, count, then close on N=N.

This mode is accessed by <PV>:RUN_MODE3

Mode 1 was programmed like just mode 2 with a User "Trigger" enable/disable, which may or may not be useful for us. Sort of like 2 layers of enabling, versus just 1 for mode2
This mode is accessed by <PV>:RUN_MODE1

Reset Modes to start new mode:
<PV>:RESET

Homing Sequence

1) EPICS Motor Record: HOMF
2) Zero Position
3) Move Relative -76.25 degrees
4) Zero Position

MCode Program State Diagram

<insert VISIO diagram>
<code example>

Motor Interlock Scheme

Screenshots

Pulse Selector Test/Checkout Procedure (6/10/2013)

X motor calibration

  • Found offset from X zero position: 5.8075 mm from + limit
  • Offset for X zero position: 5.7332 mm from - limit
  • Limits performed as expected, and in place before hardstops

Y motor calibration

  • Offset from +Y limit to zero: 15.6689 mm
  • Offset from -Y limit to zero: 7.9956 mm
  • Limits performed as expected, and in place before hardstops

New Interlock:

Add Y motor interlock, position >= 2 mm above 0 position, no X movement allowed

X-Y interlock stopped working today, need to investigate.

Image Removed