< < THE NEW SYSTEM = < < = CONTENTS = > > = THE CHANGEOVER >

The New System (contd)

3.3. Bi-Directional Scan

Fig 6 - BiDirectional Scan

Zig zag On the old BBC system, at the end of each line of scan, the head would slowly float back to the beginning (not scanning) before starting to scan the next line of data. The idea of a bi-directional scan was to speed things up a bit by scanning the alternate in the reverse direction so that no time was wasted by moving without scanning. Thought was needed to work out how to write the file with the data for the reverse lines as it would be read in reverse order. Details of how this problem was solved are given in the next section.

3.4. File Format

The file format for the old BBC system consisted of a file header with the scan parameter in it followed by the series of readings, with one reading per line. To enable the bi-directional scan to update the file as it scanned, a random access file format was preferred as this would enable the return direction scans to update records in reverse order.

I managed to combine both formats together in such a way that the new format would be identical to the old format except that spaces would pad it out to make every record the same length. Each record would be 10 characters long with 2 record separator characters (carriage return and line feed) between them. The first two header lines would be 34 characters long to keep the spacing the same without the record separators.

So that DMA (direct memory access) could be performed as described, the whole file had to be created first, otherwise errors would occur when the program attempted to read or write a value past the end of the file. When a new file was created all the readings would be set to the dummy value 29999 um (zero was not used because that was a possible legitimate reading while 29999 was well outside the range of the LVDT and so would stand out as not having been scanned)

New File Format Example

 X Start     X Finish    X Step    ¦
 Y Start     Y Finish    Y Step    ¦
 Height 1  ¦
 Height 2  ¦
 etc..     ¦ 
Fig 7 - New File Format

The ¦ character has been used to indicate the end of line. All values are in um (micrometers)

Other Benefits of New Format

I realised very quickly that this new format would make the merge routine a lot easier as well (although later develoments make the merge routine becomes virtually redundant) The record number for a particular co-ordinate could be calculated and the data in that record could be updated without the affecting data in the rest of the file. The new data could overwrite data in the old file instead of having to create a third file with part of the data from one file and part from the second.

From this it followed that it would be possible to view the recorded value of single points in the file by calculating the record number for the current position of the head. This would be particularly useful if you had changed the stylus as it meant that the program could display the value recorded for a point already scanned and you could manually control the height adjustment so that the new value is the same.

Furthermore, it followed that it would be possible to revise and correct a single point on a file with a new value, perhaps correcting an error caused by the probe sticking effect.

Moreover, I realised that it would be possible to do a partial scan, only updating part of a large data file at a time, instead of scanning several small files and merging them together. The start and finish values for X and Y for the scan need not be the same as the start and finish values for the file. The need to merge files would only arise if one part of the scan needed the height to be offset higher or lower. (Theoretically it should be possible to eliminate this as well but I think that that would cause more problems than it would solve)

3.5. LVDT Driver Unit

On the old BBC system this was a combined driver unit and ADC unit (analogue to digital converter) [13]. It produced 17 bits of BCD (binary coded decimal) which would have to be read in and converted to binary by the computer. Other problems with this unit are as follows :-
bulletIt is now obsolete so a replacement would not be available.
bulletIt would also require an additional digital input module to be purchased for the DMS541.
After checking catalogues, however, I found that a new LVDT driver unit could be purchased at a reasonable cost and so this was used, combined with an already existing analogue input module for the DMS541.

Other effects of the change are:-

  1. The resolution is reduced from 19999 to 4096, but this is still adequate.
  2. The readings are positive and negative about a central value, i.e.instead of giving a reading from 0 to 19999 it is from -2048 to +2047.
  3. The reading rate changes from 2.5 readings per sec to 20 ms per reading (50,000 reading per sec)

3.6. Interface Box

To try to avoid too much complication with wiring going from everywhere to everywhere I routed all signal wiring to go via the interface box.

3.7. Co-ordinate System

All values are in um and are treated as integers in the program. The co-ordinate system was kept the same as the old system, with the Y value increasing when moving away from you.


(0,0)---------> X
|
| As seen from
| above
|
\/
Y

Fig 8 - Co-ordinate system

The program was designed so that current co-ordinates will always be displayed on the top line of the screen.

3.8. Height Range and Accuracy

The range of the LVDT is +/- 2.5 mm The ADC can give a readout from -2048 to +2047. The most obvious range setting would be 1 count = 1 um but this would have given a reduced range of +/- 2 mm. So that the maximum range of the LVDT could be used the gain of the LVDT amplifier and ADC will be set to give a reading of 1250 at a height of +2.5 mm and this value will be multiplied by 2 by the software to give a height value in um. This results in a reduced resolution of 2 um, which was adequate for the purposes required, as maximising the height range was more important than using the full range of the ADC to maximise the resolution. Calibration must be performed on the LVDT, LVDT amplifier and ADC as a complete set.

3.9. Stepper motor speed

This advances through several speeds, of equal periods of time, to the maximum speed that the stepper motors can go and then slows down in the same way when stopping. This is because if you start the motors too fast they do not manage to get into synchronisation with the field applied and will stall . If they are stopped too suddenly they are likely to continue because of inertia and overstep the required finish point. If the motors were only operated at their maximum start speed (as is done on the old system) it would be rather slow. Using this new method the ramp up and ramp down periods are of less than 500 steps each which represents 0.5 mm of movement.

Problems occurred if you pressed a key on the keyboard when the motors were moving fast. This was because the small delay caused by the keyboard interrupt caused the pulses to the stepper motor to be out of synchronisation and made it stall. This did not seem to be a problem at slow speeds. The scanning process did not seem to be affected, presumably because the scanning steps are normally small and therefore the motors do not get up to full speed.

3.10. Stepper Motor Safety

The software was designed so that the motors will not move if:-
  1. The LVDT is not at its maximum (uppermost). This is checked only at the start of each move and the program will wait until it is ready. The optimum time is given for the probe to move up, thereby ensuring that sideways movement can not bend the probe but without an unnecessarily long pause.
  2. A limit switch is depressed (except where the head is moving in the correct direction to move off the limit.) This is to avoid damage to the threaded screws in the linear translation unit.
  3. If electrical contact is made between the LVDT and sample. This is to avoid the LVDT needle being bent when moving over extra high peaks on the surface of the sample. The motors will not be able to move again until contact is broken manually.
In case 1 the motors will resume movement when the condition is removed but in cases 2 & 3 the rest of the movement will not be performed.
Each movement in the Y axis is always followed by a 0.5 second pause. Movement in the Y axis causes vibrations and so the delay was put there to give these vibrations a chance to settle down. Vibrations are presumably caused in this axis because of the method of construction of the gantry with 2 solid bars parallel to each other in the X axis holding up the unit.

3.11. Simulation Mode

This facility was devised so that if no input or output modules are present then the program could still show the appearance of running on the monitor with all the time delays associated with sending pulses out to the stepper motors. This may seem like a luxury item for a one off project like this, but it came in useful at the beginning as I could start the project in an office where there were other people about who could help me with FORTRAN problems. It also came in useful at the end of the project because I could send a demo disk to Berkeley for at least partial evaluation on a PC without the need for them to visit Wythenshawe to try it out on the full set up of equipment . It will also be used at the poster session where the general principle of the equipment can be demonstrated.

3.12. Report file

When a new data file is created, a report file will be created with the same name but with the extension ".REP". Each time the data file is changed by scanning, merging etc. the time and date and area of scan will be logged in the report file. The only operations which will not be logged will be ones which do not change the data, such as the check routine. This will help in the analysis stage later as the report file can be checked to see if any unusual characteristics in the data could have been caused by, for example, changing the stylus rather than a characteristic of the surface.

                     X           Y
                     -           -
 Offset              0           0
 Start               0           0
 Finish              12000       12000
 Step                100         100
 
 Scan  started       06/16/94    16:13:57.92
 Scan interrupted    06/16/94    16:14:39.77
 Co-ords             11800       0
 Scan finished       06/16/94    16:14:41.04 

Fig 9 - Example Report File
< THE NEW SYSTEM = < < = CONTENTS = > > = THE CHANGEOVER >