AUSTRALIAN NATIONAL UNIVERSITY

 

System Design Note 11.15

 

Created: 10 May 2002

Last modified: 16 May 2002

 

---

 

COMMISSIONING PROCEDURE FOR SPIN MECHANISMS

 

Mark Jarnyk

 

Research School of Astronomy and Astrophysics

Institute of Advanced Studies

Australian National University

 

Revision History

 

Revision No.

Author &

Date

Approval &

Date

Description

Revision 1

Mark Jarnyk

17 May 2002

Peter Young

17 May 2002

Original document.

 

 

Contents

 

1.1 Set HOPR and LOPR.. 2

1.2 Measure CSW... 2

1.3 Set FSW... 4

1.4 Measure WTHP and WTHB.. 4

1.5 Set VELO and ACCL.. 5

1.6 Calculate TOUT.. 5

1.7 Measure BLSH.. 5

1.8 Commit these changes. 7

1.9 Datum the mechanism.. 7

1.10 Test the Datum.. 7

1.11 Set DOF1. 8

1.12 SettingTHRB.. 8

1.13 Setting CDSA, CDSB and CDSC.. 8

1.14 Commit these changes. 9

1.15 Run Cycle Tool 10

1.16 Configure cfg.tcl 10

1.17 Run the Position Tool 10

1.18 Set TOL.. 10

1.19 Commit these changes. 11

1.20 Test the Engineering Database. 11

1.21 Test the Components Controller Database. 11

1.22 Run the Test Script 12

 

 

To commission a spin mechanism, follow the procedure in the order specified in this document

 

1.1 Set HOPR and LOPR

The upper limit (HOPR) and the lower limit (LOPR) are the first parameters which must be set before any other test is performed.

1.        Set LOPR to 0.  In the file ENG/pv/cc.pv set the LOPR line corresponding to the mechanism being calibrated and set it to 0. e.g. for the grating mechanism, the appropriate line will look like:

int $(top)eng:cc:gratHallstep.LOPR = 0;

 

2.        Set HOPR to the number of steps per revolution. This is a design value, depending on gear ratios. For NIFS, the values are:

Mechanism

HOPR

Grating Turret

1008000

Filter Wheel

508200

Focal Plane Mask Wheel

323400

 

3.        Like LOPR, this value is set in the file, ENG/pv/cc.pv. Look for the line corresponding to HOPR for the mechanism being calibrated and set it to the appropriate value, e.g. for the filter wheel mechanism, the resulting line will be:

int $(top)eng:cc:filtHallstep.HOPR = 323400;

 

 

1.2 Measure CSW

The Coarse Search Width is used to locate the position of the peak on the coarse sensor (HS1P). When a datum is issued, the software instructs the motor to find its home position. The motor does this by moving in the positive direction until the voltage which it measures on the HS1P sensor exceeds some fixed voltage (fixed by the hardware). In practice, this voltage is measured as 0.5 volts on the engineering interface. The CSW needs to be set so that the peak is within CSW steps of any point where the HS1P sensor shows a voltage greater than 0.5 volts (since it would be possible to start a datum from where the HOME signal is already triggered)

 

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the mechanism to be calibrated.
  4. What we want to do is to position the datum magnet so that it is near the sensor. The datum signal will be unique in that it will yield the only positive signal for all of the position magnets. To find this signal, keep incrementing the position value (by entering new values in the position field and hitting return without moving the mouse from the field) until a positive going signal is seen on the dial display of the 1P sensor.

 

  1. From the “External Tools” pop-up menu choose “Scan Tool”
  2. In the Scan Tool guess values for the START, END and STEP SIZE fields. (START should be a value slightly less than the current position).
  3. Select the Forward radio button
  4. Press RUN
  5. Keep changing the values and repeating steps 6 through 8 until you see the full peak in the HS1P window as shown in Figure 1. The value of CSW is equal to the half-width full-max of the peak. In Figure 1 CSW is about 5000 steps. Precision is not important: the value just needs to guarantee that the peak can be found from a position where the HOME signal is triggered. The only cost of an overly large width is a longer time to datum. (A more precise procedure would be to move to a position less than the datum position, change the velocity to the lowest allowed, and issue a datum. Then wait for the Status field to change from “Rough datum search” to “Rough search for coarse peak”. Immediately hit STOP and record the HS1P voltage at that position. This is the HOME voltage, so CSW should be set to the distance from the position which reports this voltage to the peak + some value (to ensure that the signal changes direction and the peak is located).

 

 

Figure 1 Scan Tool showing scan of the datum position

 

 

 

  1. Enter the value of CSW into the ENG/pv/cc.pc file, e.g. for the grating wheel our setting may be

 

int $(top)eng:cc:gratHallstep.CSW = 5000;

 

 

1.3 Set FSW

This value the number of steps required to make a half-revolution of the motors.

 

  1. For all of the NIFS spin mechanisms this value is 1000.
  2. Enter the value of FSW into the ENG/pv/cc.pc file, e.g. for the grating wheel:

 

   int $(top)eng:cc:gratHallstep.FSW = 1000;

 

 

 

 

1.4 Measure WTHP and WTHB

WTHP is the full width of the primary datum sensor (HS2P) and WTHB the full width of the backup sensor. To measure these values, use the scan tool

 

1.        Run the engineering interface from the root of the NIFS tree:

 

           ./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the mechanism being tested
  4. From the “External Tools” pop-up menu choose “Scan Tool”
  5. In the Scan Tool guess values for the START,  END and STEP SIZE fields. (START should be a value slightly less than the current position). Since the sensor is on the motor shaft and there are 1000 steps to a revolution of this shaft, start with the END value equal to the START value plus 1000. Make step-size = 10.
  6. Select the Forward radio button
  7. Press RUN
  8. Repeat this scan, each time refining the START and END values (and reducing the STEP-SIZE) until the full width of the peak of the HS2P sensor is observed.
  9. Repeat the scan with the STEP SIZE equal to one and save the data to a file (see Figure 2 )
  10. Inspect the data file and note the max value.
  11. Note the “floor” value
  12. Set the threshold = (peak  - floor)x0.01 + floor
  13. Note the position where the sensor voltage is first above this threshold voltage. Call the position A.
  14. Note the position on the other side of the peak which is last above this threshold voltage. Call this position B
  15. WTHP = B – A
  16. Save this value in ENG/pv/cc.pv

 

int $(top)eng:cc:gratHallstep.WTHP = 88;

 

  1. Repeat for HS2B to find WTHB

 

 

 

 

 

 

Figure 2 Grating Turret Sensor Scan

 

1.5 Set VELO and ACCL

These are the velocity (in steps per second) and acceleration (seconds taken to get from 0 to VELO) which are design parameters. Enter them into ENG/pv/cc.pv:

 

double $(top)eng:cc:gratMotor.VELO = 4000;

double $(top)eng:cc:gratMotor.ACCL = 0.5;

 

 

1.6 Calculate TOUT

This is the timeout on finding the HOME position when issuing the HOMF command to the Oregon controller.  Worst case is the time to complete a full revolution of the mechanism. To allow for acceleration set

 

                TOUT = 1.1 * HOPR/VELO

 

 

1.7 Measure BLSH

It is necessary to choose a value which will be greater than any amount of backlash in the system. To measure the backlash take the following steps:

 

1.        Run the engineering interface from the root of the NIFS tree:

 

           ./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the mechanism being tested
  4. From the “External Tools” pop-up menu choose “Scan Tool”
  5. In the Scan Tool choose values that will allow you to see the full width of the HS1P signal
  6. Set the backlash value to 0
  7. Select “Both” radio button
  8. Press RUN
  9. A scan looking like Figure 3 should be obtained, which shows a backlash of about 200 steps

 

Figure 3 Scan showing backlash of grating turret

 

  1. Choose a value for the backlash which is much bigger than this value, such as 1000.
  2. Test that this value removes the backlash by repeating the scan, but this time changing the backlash value in the scan window from zero to the new value. You should see a plot like Figure 4

 

Figure 4 Scan of grating turret with BLSH = 1000

 

 

  1. Save this value in ENG/pv/cc.pv

 

int $(top)eng:cc:gratHallstep.BLSH = 1000;

 

1.8 Commit these changes

1.        In the ENG/pv directory, type in

              ./gmake

 

  1. Reboot the IOC

 

 

1.9 Datum the mechanism

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the “Grating”.
  4. Press the “datum” button

 

 

1.10 Test the Datum

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the “Grating”.
  4. Issue a redatum
  5. Move to different positions and issue a redatum
  6. If redatum fails, then you will probably need to choose a larger value for CSW (or maybe BLSH). If CSW is changed, ensure that the value is committed to cc.pv , the source tree remade and the IOC rebooted.

 

 

1.11 Set DOF1

DOF1 is the displacement between the peak of HS2P and the peak of HS2B. This parameter is used when datuming on the backup sensor.

 

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the “Grating”.
  4. From the “External Tools” pop-up menu choose “Scan Tool”
  5. In the Scan Tool guess values for the START,  END and STEP SIZE fields. (START should be a value slightly less than the current position). Since the sensor is on the motor shaft and there are 1000 steps to a revolution of this shaft, start with the END value equal to the START value plus 1000. Make step-size = 10.
  6. Select the Forward radio button
  7. Press RUN
  8. Repeat this scan, each time refining the START and END values (and reducing the STEP-SIZE) until both HS2P and HS2B sensor peaks are recorded. The STEP-SIZE for the final scan should be 1.
  9. Save to a data file and locate the position of the peak of HS2P. Call this A.
  10. Locate the position of the peak of HS2B. Call this B.
  11. Calculate DOF1, where

DOF1 =A-B

  1. Save this value in ENG/pv/cc.pv

 

int $(top)eng:cc:gratHallstep.DOF1 = -56;

 

 

1.12 SettingTHRB

This value is used to find the datum with the backup sensor. Use the half-max value of HS1B for this. Enter it into ENG/pv/cc.pv , gmake and reboot as usual.

 

 

1.13 Setting CDSA, CDSB and CDSC

These are the positions relative to the datum position which will be used in the diagnose command to validate the datum. When the DIAGNOSE command is issued, the spin mechanism will move to the datum position. Once at this position, call it DATUM, it will move to DATUM+CDSA and measure the voltage on HS1P/HS1B and compare it with the E1PA/E1BA values calibrated with the cycle tool. If it is within the tolerance, it will move to DATUM+CDSB, compare it with its E1PB/E1BB values. If is within tolerance, it will finally move to DATUM+CDSC, measure the HS1P/HS1B sensor voltage and compare it with its E1PC/E1BC values. If this is ok, then the datum is considered to be validated.

 

Once the spin mechanism is datumed, perform the following steps

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the “Grating”.
  4. Move to the datum (home) position
  5. From the “External Tools” pop-up menu choose “Scan Tool”
  6. In the Scan Tool guess values for the START,  END and STEP SIZE fields. Select the Forward radio button
  7. Press RUN
  8. Repeat this scan until the peak of  HS1P occupies the full width of the plot (Figure 5).

 

Figure 5 Scan of HS1P and HS1B

 

 

  1. Note the position of the peak.  This is CDSA
  2. Note the position of the half-max positions. The lower one is CDSB, and the upper one CDSC.
  3. Save these values in ENG/pv/cc.pv

 

int $(top)eng:cc:gratHallstep.CDSA = -313;

int $(top)eng:cc:gratHallstep.CDSB = -500;

int $(top)eng:cc:gratHallstep.CDSC = -153;

 

1.14 Commit these changes

1.        In the ENG/pv directory, type in

              ./gmake

 

  1. Reboot the IOC

 

 

1.15 Run Cycle Tool

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the “Grating”.
  4. Move to the datum (home) position
  5. From the “External Tools” pop-up menu choose “Cycle Tool”
  6. Press the “rescan” button

8. When the scan is complete, press the “Write” button

 

 

1.16 Configure cfg.tcl

This file determines the positons (number of steps from datum) at which each HS1P/HS1B sensor will be recorded.

 

  1. Edit this file, changing the values of the second column in the section for the relevant mechanism. For example, for the grating mechanism:

 

set const(defs, ccGrat) {

              {pos00       0 25 0.250}

              {pos01  164000 25 0.250}

              {pos02  333000 25 0.250}

       {pos03  500000 25 0.250}

              {pos04  667000 25 0.250}

       {pos05  834000 25 0.250}

              {home        0 25 0.250}

       {park        0 25 0.250}

}

 

2.        In the ENG/pv directory, type in

              gmake

 

 

1.17 Run the Position Tool

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Low Level Engineering” screen.
  2. From the Low Level Engineering screen choose the “Components Controller” screen.
  3. From this screen choose the “Grating”.
  4. From the “External Tools” pop-up menu choose “Position Tool”
  5. Press the “rescan” button
  6. When the scan is complete, press the “Write” button

 

 

1.18 Set TOL

When a diagnose or cycle command is issued, the spin mechanism measures the HS1P voltage at three positions at three predefined positions (datum+CDSA, datum+CDSB and datum+CDSC) and compares it to prerecorded values. Provided that the difference between the new measurements and the prerecorded measurements are less than TOL, the mechanism is considered to be operating properly. The value which you set this to, simply depends on how sensitive you wish to make the verification. 0.25 seems a reasonable value.

 

 

1.19 Commit these changes

  1. In the ENG directory, type

              gmake

 

  1. Reboot the IOC

 

 

 

 

1.20 Test the Engineering Database

Now that all of the engineering parameters have been set up in their final form, it is time to test the configuration. If it fails any of the steps below, the mechanism will need to be reconfigured.

 

  1. Move to the left of the datum position
  2. Datum.
  3. Cycle
  4. If it passes ten cycles, press end cycle
  5. Move to each position that can be selected using the Select menu. (N.B. The select menu  has twelve positions plus home and park. This may exceed the number of positions available for the mechanism being tested. An error will occur if you move to an available position – this is normal)
  6. Redatum
  7. Datum/Diag
  8. Move to the right of the datum position
  9. Repeat steps 2 to 7
  10. Move to the datum position
  11. Repeat steps 2 to 7
  12. Determine the HOMF value by setting VELO to the lowest value possible (try setting it to 0 and it should then be automatically clipped to some minimum value like 200 steps/sec), Issue a datum, and then stop the datum immediately when the displayed messaged changes from “Rough datum search” to “Search for coarse peak”. The reading on HS1P indicates the voltage which triggers the HOMF signal. Move the mechanism in the positive direction until the HS1P signal starts to decrease. Position the mechanism, such that the voltage read on the HS1P sensor is just above the HOMF trigger voltage. Then issue a datum. If you have done this properly, then the datum will move almost instantly from “Rough datum search” to “Search for coarse peak”. This is a worst case scenario for finding the datum and testing the value of CSW.
  13. Repeat steps 2 and 3
  14. Now position the mechanism, so that the HS1P voltage is just above the HOMF signal on the opposite side of the datum peak (i.e. where the HS1P signal is increasing with the position)
  15. Repeat steps 2 and 3
  16. On the engineering screen disable the HS1P sensor
  17. Repeat steps 2 to 7
  18. Disable HS2P
  19. Move to various positions
  20. Disable HS2B
  21. Enable HS2P
  22. Move to various positions
  23. Enable HS1P
  24. Move to various positions
  25. Enable HS2B
  26. Enable HS1P

 

 

1.21 Test the Components Controller Database

1.        Run the engineering interface from the root of the NIFS tree:

 

./nifsStart

 

  1. From the engineering interface choose the “Components Controller” screen
  2. From the “Components Controller” screen choose the “Control” screen for the mechanism being tested.
  3. Press “Find Datum”
  4. Exercise each of the commands on the screen (Note, only the grating turret and focal plane mask wheel support the offset command)

 

1.22 Run the Test Script

The final test is to run a script which exercises the full range of commands for the mechanisms.  The script needs to know the database name of the mechanism (fopl, grat or filt), the name to appear in the report, the number of positions, and some arbitrary string to identify the report. To test the grating mechanism saving the report in the file results

 

 ENG/src/testMech.sh sh grat grating 6 results > results

 

This test takes several hours