32
A-1 Appendix A THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03/00 1. INTRODUCTION The microwave system (see Figs. 1 and 2) can be used to carry out the equivalent of thermal demagnetisation and Thellier type intensity analyses. Setting the microwave power is essentially the equivalent to setting the temperature in conventional thermal demagnetisers. With this system the microwaves are always applied for 10s duration. The forward power meter controls the amount of power going into the microwave cavity and the reflected power meter measures the power that is reflected back. It is essential for the safety features to work that when microwaves are applied the two power meters are on the same range. The user inputs the percentage of the maximum power available on the selected range of the meter. See Appendix A for a conversion to power in Watts. There is no set power range to use, each sample is different and it also depends on its size and position in the cavity. It is in general best to start with a low power (such as 8 Watts) to remove the viscous and then slowly increase until the sample is totally demagnetised or an absolute maximum of 250 Watts is reached. At the end of the day you are aiming for around 10 evenly spaced data points from max NRM to zero NRM. In practise this isn’t always so easy, particularly when dealing with lavas as you will find that a sample is hard to demag and then suddenly a large amount of the moment is lost in a small power increase – in other words lavas typically have narrower blocking temperature ranges than ceramics. For demagnetisation and directional analysis it is possible to use oriented samples. There is a stick with a pin on the end attached to the mu metal shielding and a corresponding mark on the back wall with which to align the sample to the magnetometer orientation system. For palaeointensity experiments different methods are generally used for ceramics and for lavas. These methods are described in the published papers (see Appendix D). For the ceramic method once it is established that the direction of remanence is stable, at each power increment firstly apply microwaves with an applied field in the same direction as the NRM, measure, and then secondly apply microwaves of the same power in zero field. The first step is NRM + T M RM and the second step the NRM for that particular power level. From this, a plot of NRM + T M RM against T M RM can be produced, the gradient found and hence the ancient field deduced. The ancient field is equal to (1- gradient) times the laboratory field.

THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

Embed Size (px)

Citation preview

Page 1: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-1

Appendix A

THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM

Mimi J. Hill Version 4 15/03/00

1. INTRODUCTION The microwave system (see Figs. 1 and 2) can be used to carry out the equivalent of thermal demagnetisation and Thellier type intensity analyses. Setting the microwave power is essentially the equivalent to setting the temperature in conventional thermal demagnetisers. With this system the microwaves are always applied for 10s duration. The forward power meter controls the amount of power going into the microwave cavity and the reflected power meter measures the power that is reflected back. It is essential for the safety features to work that when microwaves are applied the two power meters are on the same range. The user inputs the percentage of the maximum power available on the selected range of the meter. See Appendix A for a conversion to power in Watts. There is no set power range to use, each sample is different and it also depends on its size and position in the cavity. It is in general best to start with a low power (such as 8 Watts) to remove the viscous and then slowly increase until the sample is totally demagnetised or an absolute maximum of 250 Watts is reached. At the end of the day you are aiming for around 10 evenly spaced data points from max NRM to zero NRM. In practise this isn’t always so easy, particularly when dealing with lavas as you will find that a sample is hard to demag and then suddenly a large amount of the moment is lost in a small power increase – in other words lavas typically have narrower blocking temperature ranges than ceramics. For demagnetisation and directional analysis it is possible to use oriented samples. There is a stick with a pin on the end attached to the mu metal shielding and a corresponding mark on the back wall with which to align the sample to the magnetometer orientation system. For palaeointensity experiments different methods are generally used for ceramics and for lavas. These methods are described in the published papers (see Appendix D). For the ceramic method once it is established that the direction of remanence is stable, at each power increment firstly apply microwaves with an applied field in the same direction as the NRM, measure, and then secondly apply microwaves of the same power in zero field. The first step is NRM + TMRM and the second step the NRM for that particular power level. From this, a plot of NRM + TMRM against TMRM can be produced, the gradient found and hence the ancient field deduced. The ancient field is equal to (1- gradient) times the laboratory field.

Page 2: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-2

For lavas the method most often used has only one microwave application carried out at each power level. Once it has been established that the NRM direction is stable microwaves at increasing power levels are applied in an ambient field perpendicular to the direction of the NRM. From vector component analysis the NRM and TMRM values can be deduced and a traditional Arai plot of NRM lost against TMRM gained produced. The ancient field is equal to the gradient times the laboratory field. Excel spreadsheets are available to do this analysis as well as calculate the Coe statistics associated with conventional Thellier analysis.

Computer

8.2 GHz Signal

Generator

TWT Amplifier

Klystron

Waveguide

Pneumatic Control

Pneumatic Sample

Movement

Sample

Microwave Cavity

SQUID Magnetometer

Measure Position

Mu-metal Shield

Figure 1 Block diagram of the automated 8.2 GHz microwave and SQUID magnetometer system. The 3 axis coil system for applying weak fields during palaeointensity experiments

have not been shown for clarity.

Page 3: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-3

8 . 2 1

Forward power meter Reflected power meter

Signal Generator

Microwave Amplifier

Klystron

Power Wheel

LEDs

10 kV 1 Amp

Gain

Frequency fine tune

Frequency tune

On / Off switches

Figure 2 Schematic of the microwave equipment controls.

Page 4: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-4

2. SAMPLE PREPARATION The system uses 5mm diameter cores. There is no standard length but around 3mm is a good starting point. If the sample is strong you can use a smaller length weak longer Remembering that the smaller the sample the better the coupling with the microwave system.

Use ‘pyruma’ fire cement to mount the sample on to a 10cm length of quartz and leave it to dry. It is best left over night but if in a hur ry a blast with the hair dryer speeds things up. If oriented samples are required then the orientation marks from standard inch cores can, with care, be transferred to the 5mm cores. The orientation convention for standard inch cores is shown in Figure 3 along with instructions for drilling the mini cores. Firstly the orientation line of the standard core is transferred to the bottom of the core using a diamond scribe. A slot is then inserted along this orientation line on the bottom of the sample, using a diamond wafering saw. The 5 mm cores are drilled along the slot whilst making sure the inch core has a flat bottom to ensure the z direction is vertical. It is also possible to insert additional parallel slots with the wafering saw if more oriented mini samples are required.

Y X

Z

TOP

Z

BOTTOM

Y

X

Orientation slot inserted on bottom of core using wafering saw. 5 mm

samples are then drilled along the slot.

Figure 3 Liverpool palaeomagnetic core orientation system and procedure for drilling 5mm

mini cores.

Page 5: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-5

The side of the 5 mm core without the slot, is attached to a quartz sample rod (using pyruma) making sure that the core is kept in alignment with the sample rod. Once the pyruma has set the sample is ready for orientation to the microwave system. Sample orientation is illustrated in Figure 4. Attached to the mu metal shield surrounding the magnetometer is a stick with a pin on the top that is aligned to the x direction of the microwave system. There is also a corresponding mark on the back wall. The sample is attached to the Teflon sample holder and then rotated until the slot is aligned to the pin and the mark on the back wall. In the correct position it is possible to see daylight through the slot.

Z

Quartz sample rod

Sample with orientation slot

Mark on back wall

Orientation stick with pin, attached to mu metal magnetometer shield. X

Y

The orientation system of the microwave system is:- Z vertical down X towards you as you face the system Y towards the FIT magnetometer

Figure 4 Schematic illustrating the procedure for sample orientation to the microwave system.

Page 6: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-6

3. THE COMPUTER PROGRAM MWAVE.BAS The program is written in Quick Basic and Appendix C contains a hard copy. To run the program SHIFT F5 To crash out of the program CONTROL ALT DELETE A. IS THE APPARATUS ALIGNED CORRECTLY?

The cavity must be aligned directly on top of the entrance to the SQUID, if it isn’t the sample holder and shaft will get stuck, the sample will fall off, the plastic sample shaft will bend and eventually snap. The air ram will not stop for anything! BE WARNED! When the system has been apart (i.e. filled with lHe) use a torch to see that the cavity is aligned over the top of the entrance to the magnetometer. When satisfied attach the mu metal lid and copper rod, and push in an EMPTY quartz rod to the sample shaft to check alignment. At the beginning of the program MWAVE.BAS you will see something like: ‘ CALL cavitypos ‘ CALL outpos ‘ STOP The quotation marks mean that the program ignores these commands. Delete the ‘ from the first and last lines and you now have a mini program that tells the air ram to move to the cavity position (using SHIFT F5 to run it). Once there it is a small distance down to the out of coil position of the magnetometer outpos that is past the critical cavity / magnetometer connection. Put back in ‘ in line 1 and remove it from line 2 so that the air ram moves down to outpos. If the quartz rod gets stuck be ready to manually free it. Repeat moving the air ram from cavitypos to outpos (and adjusting the cavity itself) until the sample shaft moves freely. When happy put all the ‘ back in and press SHIFT F5 which starts the main program and moves the sample shaft up to the load position loadpos. B. GETTING STARTED Attach quartz sample rod to sample shaft so that the middle of the sample is aligned with the mark on the wall (this ensures the sample will be in the middle of the cavity). If using oriented samples use the stick with the pin on top and mark on the back wall to help with alignment. Put a disc into the drive! To start the program press SHIFT F5 MWAVE.BAS is not case sensitive.

Page 7: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-7

Disc files ? (Y/N) Generally no. It is possible to make up a file

containing field data first but there is no need as the program stands at the moment.

Do you want to change default (Y/N) Yes, unless you want just a test run. Now is

your chance to input field data, sample name (7 characters max) and the applied field value for palaeointensity exp. A file will be created on your disc samplenamed.dat, and the info will be printed out as a header.

Allows repositioning for tune When you hit any key the sample moves Adjust your shaft length. down to the cavity position. Here you can Any key when ready tune the microwave system and see how

good the resonance is (how low the reflected power is, see part E).

Tuning ok? The sample is moved back up to the load

position. If Y then the program carries on to the next question, if N you can reposition the sample and then go back to the cavity position.

Zero Test (Y/N) No, only necessary when dealing with very

weak samples. Range Test (Y/N) This routine moves the sample to the

measure position and then rotates it so that you can see the induced deflection on the SQUID box of tricks. Generally range 1 is appropriate (the least sensitive) for ceramics and lavas. As a general rule move to range 10 if the intensity is around 70000 units and you never want the SQUID to go to full deflection and reset.

Input Range (1,10,100) You need to input the correct range in the

program and change it on the SQUID box of tricks, make sure they are the same!

C. MEASURE CYCLE The sample is moved to the out of coil position and a reading is taken, then it is moved to the measure position and readings are taken in the four positions, 90°

Page 8: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-8

apart before another out of coil reading is taken. The sample is then moved to the cavity position. The x, y and z values, intensity, declination and inclination are displayed on the screen and printed out along with M/D, power (both percentage and in Watts) and time values. Written to the disc are x, y, z, microwave power in Watts and mass. Remeasure? (Y/N) It is advisable to take a minimum of 2

readings at each measure stage. Exit? (Y/N) If N you then move on to the microwave

application part of the program, Y and you exit the program.

D. MICROWAVE START UP A block diagram of the microwave part of the equipment is shown in Figure 2. 1. Turn the cooling air on a little at the wall. 2. Make sure that the wheel on the bottom left is fully rotated anticlockwise. 3. Switch on the signal generator (top switch), microwave amplifier to stand by

(second box down), and the klystron (big switch bottom left). The fan will now be activated and it’ll be making a noise!

4. Wait aprox 2 mins for the klystron to warm up and the 2 right hand LEDs (that you can see when you look over silver casing on bottom) to come on.

5. Whilst waiting zero the power meters (use 0.1mW range). 6. When 2 LEDs are on push the small switch on the right at the bottom down

which enables the EHT to the klystron, and the third LED will come on. 7. Turn the wheel slowly to approx 3 o’clock, voltage 4 kV. Whilst doing this

you will hear a kick and the fourth LED will be on. 8. Switch amplifier to operate if going straight to tune otherwise leave as is. This

is the stable standby position of the equipment and it can be left with the amplifier on standby for periods of time, say over coffee. If leaving the equipment for longer periods of time disable the klystron (3 LEDs alight only).

E. MICROWAVE PROCEDURE Low level microwaves on for tuning It is in fact possible to tune when it says

Exit? as the amplifier is leaky. 1. Zero power meters on 0.1mW range. 2. Push down small silver switch at bottom right to enable EHT, after a moment

you’ll hear a kick and the fourth LED will light up – if it is not already on. 3. Put TWT from standby to operate. 4. Use tune dial on the TWT to find the resonance (approx 8.21 GHz). The

resonance is the place where the needles on the power meters jump, the reflected power down and the forward power up. The reflected power should be approximately zero.

Page 9: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-9

5. Use the fine tuning dial to locate the exact position of the resonance – watch the reflected power meter.

6. Put power meters back to the appropriate range, 1mW to start with and then the 3mW range. Don’t go beyond this range.

The apparatus is now set up and tuned awaiting command from the computer. Hit any key Demag or remag (M/D) D will apply microwaves in zero field whilst M

enables you to specify an applied field (see lava and ceramic sections)

Once you have specified M / D and appropriate field etc you need to input power. Power Remember that this is the percentage of the total

power available on the power meter range selected (see Appendix A).

Power Range (1/3)? Specify 1mW or 3mW range, so that the power in

Watts can be calculated. Time Generally, 10 seconds is always used. When ready press any key Once you have started to zap, move immediately to observe the power meters. If the reflected power increases try and reduce it by fine tuning the frequency. You won’t have to move it much! This will take practise and you’ll get the hang of it in time. If the microwave trips out or there is no power output then look at the computer screen to see if there are any error messages, if so refer to Appendix B. If the microwave trips out and there are no error messages then come and tell someone. Once the time is up and no more microwave are being applied:- 1. Switch the amplifier to standby. The microwave apparatus is now safe to leave and the sample will cool in the cavity before going in to the measure routine. F. MICROWAVE SHUT DOWN 1. The amplifier should already be in standby. 2. Disable the klystron – lift small silver switch on bottom right up. 3. Turn the wheel at the bottom fully anticlockwise. 4. Switch off klystron, amplifier, and signal generator, i.e. all the big switches!

Page 10: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-10

4. LAVA, TMRM PERPENDICULAR TO NRM METHOD When you are satisfied that the NRM direction is stable you are ready to start applying a perpendicular field! The intensity of the applied field is taken from the original field data input and is displayed on the header. After tuning:- Magnetise or demagnetise? (M/D) M Put field directon of NRM, perpendicular to NRM or specify own direction? (NRM/PERP/OWN)

PERP. NRM is for the ceramic method in which the field is applied in the same direction as the NRM and OWN allows you to specify your own direction and magnitude.

Values for the applied field bapp% and the magnitude of the north, east and vertical coils (bn, be and bv) are printed on the screen. When you start bn, be and bv will be zero so you need to change the field settings. Change bn, be,bv (Y/N)? Y the first time through when you start to

apply a field thereafter N. Values for bn, be and bv are calculated from the previous x, y and z values from the measure routine so that the applied field can be calculated to be perpendicular to them according to the equations below.

0

/

/

22

22

=

+=

+−=

applied

nrmnrmnrmapplied

nrmnrmnrmapplied

z

yxxy

yxyx

The field coils will now be activated and the field applied. As a check two red LEDs should be on in the box of electronics under the printer – only two as there is no field applied to the z-axis. You are now ready to input power and time, apply the microwaves and then go into the measure routine. Once this is completed and you are in the microwave section, again select PERP but from now until the end of the experiment you won’t need to change the settings for bn, be and bv as you want the field to be on in the same direction for the whole experiment. The resulting vector intensity won’t change drastically but the directions will gradually change. The inclination

Page 11: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-11

will decrease to zero and the declination will increase to 90 degrees greater than its original va lue. As a check on the NRM direction you can do a microwave zap in zero field. For a pTRM check (the equivalent to those used in traditional Thellier experiments), after a demag step, apply microwaves with the perpendicular field on but for a previous power level.

5. CERAMICS, TMRM PARALLEL TO NRM METHOD When you are satisfied that the NRM direction is stable (this isn’t so critical as it is with the lava method) and there has been around a 10% decrease in the moment you are ready to start applying a field. After tuning Magnetise or demagnetise? (M/D) M Put field directon of NRM, perpendicular to NRM or specify own direction? (NRM/PERP/OWN)

NRM. PERP is for the lava method and OWN allows you to specify your own direction and magnitude

The applied field coils will then be activated. The direction is calculated from the measurement immediately previous so, if the direction of NRM changes so will the direction of the applied TMRM. The intensity is taken from the initial input at the beginning of the program and is displayed on the print out. As a check 3 LEDs should be on in the box of electronics under the printer. You are now ready to input power and time, apply the microwaves and then the measure cycle to be carried out. The next step is to demagnetise at the same power level. To ensure that all the TMRM is removed and it is just the NRM that is left P+1 % power is generally used. Magnetise or demagnetise? (M/D) D You are now ready to input power (magnetise power + 1%) and time, apply the microwaves and then the measure cycle to be carried out. Repeat all the above for increasing power levels.

6 ADDING DATA TO THE DATABASE Your data will be in a text file called named.dat. It can be imported straight into excel for intensity analysis. The excel spreadsheet available to obtain the NRM and TMRM components and for Coe stats is lavadata.xls.

Page 12: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-12

To transfer the data to the data base (to use plotcore) you need to convert the data to spinner magnetometer format. The VB programme UWTRANS does this and produces a file dmagdata.acm with the demag data and a file magdata.acm with the mag data. The data can then be added to the database in the usual way (addmag etc). A previous way of adding data to the database is described below:- A file of the form namei.dat is needed that contains field information as well as named.dat. This file is easy to make and is a text file of the form:- “dip”,”yetn”,”tilt”,”direction”,”mass (g)”,”applied field (µT)” For example:- "90","90","0","0","1","50" Both files need to be on a disc as the program that formats the data reads from the a: drive. The required program is SD1SPLIT.EXE. It outputs on to your disc two files, the demag data to Demagdat.acm and the mag data to Magdat.acm. These files are in the correct format to transfer to the database in the usual manner. If you then run another sample through SD1SPLIT.EXE it will overwrite the output files so you need to make your own copy of the output data.

Page 13: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-13

APPENDIX A POWER POWER METER RANGE % POWER POWER WATTS 1mW 10 8.3

20 16.6 30 24.9 40 33.2 50 41.6 60 49.9 70 58.2 80 66.5 90 74.8 100 83.1

3mW 10 25

20 50 30 75 40 100 50 125 60 150 70 175 80 200 90 225 100 250

Never go above 250 Watts, in general you won’t need to and don’t want to go above 175 Watts.

Page 14: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-14

APPENDIX B ERROR MESSAGES Microwave drive off High VSWR Protection Press any key to stop The reflected power to forward power ratio is too high so the microwave apparatus cuts out. Reasons for this happening are due to a poor resonance, check the tuning, sample size, is the sample still there? You will hopefully never see this error message. Microwave drive off Pl% > 255 Press any key to stop The DAC only goes up to 255 so if it has reached this and the required power has not been reached then this error message will occur. To overcome this you must increase the gain of the amplifier a smidge whilst in the tuning stage. In both cases when you press any key it goes straight into the measure cycle, so you’ll have to wait to solve the problem once this has finished. Any queries about the errors ask before you play!

Page 15: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-15

APPENDIX C MWAVE.BAS DECLARE SUB sysreset () DECLARE SUB adcread (value) DECLARE SUB sqdreset () DECLARE SUB cvert (ia%) DECLARE SUB measurepos () DECLARE SUB microwave (pa%, pt%, pw%) DECLARE SUB readings (j, dec, inc, xf, yf, zf, F$, x9, y9, z9) DECLARE SUB Alarm () DECLARE SUB Alarm1 () DECLARE SUB fielddirect () DECLARE SUB fieldset (bapp%, xf, yf, zf) DECLARE SUB fieldperp (bapp%, x9, y9, z9, bn, be, bv) DECLARE SUB fieldoff () DECLARE SUB Opinput (code$, bapp%) DECLARE SUB calc (x9, y9, z9, j, dec, inc) DECLARE SUB loadpos () DECLARE SUB outpos () DECLARE SUB fwd (swrF%) DECLARE SUB ref (swrR%) DECLARE SUB pulse (pa%, pt%) DECLARE SUB measure (x9, y9, z9) DECLARE SUB cns (ia%) DECLARE SUB cew (ia%) DECLARE SUB cavitypos () DECLARE SUB range () DECLARE SUB rotate (R%) DECLARE SUB discread (code$, bapp%) DECLARE SUB header (code$, bapp%) DECLARE SUB reswrite (code$, F$, j, dec, inc, x9, y9, z9) DECLARE SUB tune () DECLARE SUB Zero () DECLARE SUB initialise () DECLARE SUB Openscreen (version$) DECLARE SUB mwaveoff () DECLARE SUB filefinder (code$) DIM SHARED a(1 TO 5) DIM SHARED v(0 TO 10) DIM SHARED t(0 TO 10) DIM SHARED z(0 TO 10) DIM SHARED s(1 TO 4) DIM SHARED c(1 TO 4) COMMON SHARED p% COMMON SHARED rnge% COMMON SHARED pa% COMMON SHARED pt% COMMON SHARED code$ COMMON SHARED F$ COMMON SHARED bapp% COMMON SHARED pw% 'P% is Sample position 'F$ is System status passed to printer and disc saves version$ = "27 January 1999"

Page 16: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-16

'mimi; field options nrm or own 'mimi; coils re calibrated 26/7/98 'mimi; field option perpendicular to NRM 25/11/98 'steve; pulse - slow down cavity constant correction 27/01/99 testinput: ' put test routines in here mark: 'CALL loadpos 'CALL cavitypos 'CALL tune 'CALL loadpos 'CALL outpos 'CALL loadpos 'SLEEP (15) 'CALL measurepos 'CALL loadpos 'CALL cavitypos 'CALL outpos ' GOTO mark 'STOP start: ON KEY(10) GOSUB steve KEY(10) ON CALL initialise 'Sample at load position and ready to operate CALL Openscreen(version$) CLS CALL Opinput(code$, bapp%) CALL header(code$, bapp%) steve: CLS PRINT "Allows repositioning for tune " 155 CALL loadpos PRINT "Adjust your shaft length. Any key when ready" DO: LOOP UNTIL INKEY$ <> "" CALL cavitypos INPUT "Tuning OK?"; OK$ IF UCASE$(OK$) = "Y" THEN GOSUB operate IF UCASE$(OK$) = "N" THEN GOTO 155 operate: PRINT "When ready hit any key" DO: LOOP UNTIL INKEY$ <> "" INPUT "Zero test (Y/N) ?", Zro$ IF UCASE$(Zro$) = "Y" THEN CALL Zero ' IF UCASE$(Zro$) = "N" THEN INPUT "enter zero values", z(1), z(2), z(3), z(4) CALL loadpos CALL rotate(4) CLS PRINT : PRINT PRINT " M O U N T S A M P L E"

Page 17: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-17

INPUT "Range test (Y/N) ?", rge$ IF UCASE$(rge$) = "Y" THEN CALL range IF UCASE$(rge$) = "N" THEN INPUT "Enter range(1/10/100)", rnge% measure: CLS PRINT "M E A S U R E" PRINT : PRINT CALL readings(j, dec, inc, xf, yf, zf, F$, x9, y9, z9) PRINT : PRINT : PRINT BEEP INPUT "Re-measure (Y/N)", m$ IF UCASE$(m$) = "Y" THEN GOTO measure PRINT : PRINT : PRINT INPUT "Exit (Y/N) ", E$ IF UCASE$(E$) = "Y" THEN GOTO escape microwave: CALL cavitypos CALL rotate(4) CLS PRINT : PRINT "M I C R O W A V E " PRINT : PRINT CALL tune PRINT : PRINT INPUT "demagnetise or magnetise (d/m)? ", F$ F$ = UCASE$(F$) CALL fieldoff IF F$ = "M" THEN INPUT "put field directon of NRM, perpendicular to NRM or specify own direction? (NRM/PERP/OWN)", g$ g$ = UCASE$(g$) IF g$ = "NRM" THEN CALL fieldset(bapp%, xf, yf, zf) ELSE IF g$ = "PERP" THEN CALL fieldperp(bapp%, x9, y9, z9, bn, be, bv) ELSE CALL fielddirect END IF END IF END IF CALL microwave(pa%, pt%, pw%) CALL mwaveoff PRINT "cooling time of 30s" ' cool% = 0

Page 18: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-18

cool% = 30 Finish = TIMER + cool% DO LOOP UNTIL TIMER > Finish IF UCASE$(F$) = "M" THEN PRINT "cooling time of 60s" cool% = 30 Finish = TIMER + cool% DO LOOP UNTIL TIMER > Finish END IF GOTO measure escape: CLOSE CALL loadpos CALL mwaveoff CALL fieldoff CLS END SUB adcread (value) 'Returns the ADC and resets in variable (value) 'Delay for filter rise time Finish = TIMER + 5 DO LOOP UNTIL TIMER >= Finish value = 0: total = 0: a = 0: b = 0: c = 0: d = 0 FOR i% = 1 TO 50 OUT &H30C, 0 DO: LOOP UNTIL INP(&H30C) <> 1 a = INP(&H308) b = (a * 256) c = INP(&H309) adc = 32768 - b - c ' LPRINT TAB(1); adc a = 10 * adc / 32768 'Read in Squid reset counter b% = 128 - INP(&H30A) total = ((10 * b%) + a) * 3276.8 d = d + total NEXT i% value = d \ 50 ' mimi; to give correct x y z orientation value = -value ' LPRINT TAB(1); value

Page 19: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-19

END SUB SUB Alarm 'Microwave drive zero OUT &H302, 0 CLS PRINT : PRINT : PRINT PRINT " Microwave drive off" PRINT : PRINT : PRINT PRINT "High VSWR Protection" PRINT : PRINT : PRINT PRINT "Any key to stop" DO: LOOP UNTIL INKEY$ <> "" END SUB SUB Alarm1 OUT &H302, 0 CLS PRINT : PRINT : PRINT PRINT "microwave drive off" PRINT "pl% > 255 increase gain" DO: LOOP UNTIL INKEY$ <> "" END SUB SUB calc (x9, y9, z9, j, dec, inc) ' are dip dec....mass 'x9,y9,z9 come from readings routine e4 = (s(4) ^ 2) f3 = c(3) - 1 f4 = 1 - e4 j = INT(SQR(x9 ^ 2 + y9 ^ 2 + z9 ^ 2)) + .0000001# A1 = x9 * s(1) * c(2) - y9 * s(2) + z9 * c(1) * c(2) A2 = x9 * s(1) * s(2) + y9 * c(2) + z9 * c(1) * s(2) A3 = z9 * s(1) - x9 * c(1) a = A1 * (f4 * f3 + 1) + A2 * s(4) * c(4) * f3 + A3 * s(3) * c(4) b = A1 * s(4) * c(4) * f3 + A2 * (e4 * f3 + 1) + A3 * s(3) * s(4) c = A3 * c(3) - A1 * s(3) * c(4) - A2 * s(3) * s(4) 'Calculate declination 'Divide by zero trap IF a = 0 THEN a = .0000001# angle! = ATN(b / a) 'angle in radians, convert to degrees z! = 57.29578 * angle! IF a < 0 THEN z! = 180 + z! 'test if negative result and correct IF z! < 0 THEN z! = z! + 360 dec = (INT(z! * 10)) / 10 'Calculate inclination 'Divide by zero trap

Page 20: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-20

h = ((SQR(a * a + b * b))) IF h = 0 THEN h = .000001# angle! = ATN(c / h) 'angle in radians, convert to degrees z! = (57.29578 * angle!) IF h < 0 THEN z! = z + 180 inc = (INT(z! * 10)) / 10 'Calculate amplitude 'Allow for SQUID Range setting j1 = j * 100 / rnge% ' j1 = j1 / (2! * a(5)) 'mimi; so that j1 in 10-9 Am^2/kg j1 = j1 / a(5) j1 = (INT(j1 * 10)) / 10 LPRINT TAB(1); F$; TAB(9); pa%; TAB(18); pw%; TAB(27); pt%; TAB(39); j1; TAB(55); dec; TAB(62); inc PRINT "Dec "; dec; "Inc "; inc; "Moment "; j1 ' LPRINT TAB(1); s(1); TAB(9); c(1); TAB(9); s(2); TAB(9); c(2) END SUB SUB cavitypos IF p% = 2 THEN EXIT SUB PRINT "Moving sample to Cavity position ", OUT &H301, 2 IF p% = 0 THEN delay% = 5 ELSE delay% = 12 Finish = TIMER + delay% DO LOOP UNTIL TIMER > Finish PRINT "At cavity" p% = 2 END SUB SUB cew (ia%) 'calibration correction '26/7/98 re calibrate IF ia% = 0 THEN EXIT SUB ELSE ia% = (ia% * 1.05) + 3.65 ia% = INT(ia% * 8.217) ' PRINT ia% 'sets east/west coil current (ia%) mA into DAC msb% = ia% \ 256 lsb% = ia% MOD 256 OUT &H307, msb% OUT &H308, lsb% END SUB SUB cns (ia%) 'calibration correction 'mimi re calibrate 26/7/98

Page 21: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-21

IF ia% = 0 THEN EXIT SUB ELSE ia% = (ia% * 1.26) + 10 ia% = INT(ia% * 7.289) 'sets north/south coil current (ia%) mA into DAC msb% = ia% \ 256 lsb% = ia% MOD 256 OUT &H305, msb% OUT &H306, lsb% END SUB SUB cvert (ia%) 'calibration correction 'mimi re calibrate 26/7/98 IF ia% = 0 THEN EXIT SUB ELSE ia% = (ia% * 1.06) + 2.5 ia% = INT(ia% * 11.468) 'sets vertical coil current (ia%) mA into DAC msb% = ia% \ 256 lsb% = ia% MOD 256 OUT &H309, msb% OUT &H30A, lsb% END SUB SUB discread (code$, bapp%) 'Reads prepared file data from disc 'sets up values in dip,dec,tilt,dir,mass,field PRINT "Insert File disc into drive B" PRINT "and press any key when ready " DO 8 LOOP UNTIL INKEY$ <> "" FILES "a:" INPUT "Name file :- ", code$ file$ = "a:" + code$ + "I.DAT" OPEN (file$) FOR INPUT AS #1 DO WHILE NOT EOF(1) INPUT #1, dip$, dec$, tilt$, dirs$, mass$, bapp$ a(1) = VAL(dip$) a(2) = VAL(dec$) a(3) = VAL(tilt$) a(4) = VAL(dirs$) a(5) = VAL(mass$) bapp% = VAL(bapp$) LOOP CLOSE #1 END SUB SUB fielddirect 'Applies field to specified axis coil CALL fieldoff F$ = UCASE$(F$) IF F$ = "D" THEN EXIT SUB 'demag selected xf = 0: yf = 0: zf = 0 INPUT "Applied field amplitude ", bapp% INPUT "x=", xf

Page 22: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-22

INPUT "y=", yf INPUT "z=", zf PRINT bapp%; xf; yf; zf 'enable only axis with non-zero values bn = bapp% * xf: be = bapp% * yf: bv = bapp% * zf PRINT bn; be; bv 'North/South coil ia% = ABS(bn) CALL cns(ia%) IF bn < 0 THEN pn% = 0 ELSE pn% = 1 IF ia% = 0 THEN en% = 0 ELSE en% = 2 'East/West coil ia% = ABS(be) CALL cew(ia%) IF be < 0 THEN pe% = 0 ELSE pe% = 4 IF ia% = 0 THEN ee% = 0 ELSE ee% = 8 'Vertical coil ia% = ABS(bv) CALL cvert(ia%) IF bv < 0 THEN pv% = 0 ELSE pv% = 16 IF ia% = 0 THEN ev% = 0 ELSE ev% = 32 fe% = 0 'Set up coil polarities, and enable connections "ON" fe% = pn% + en% + pe% + ee% + pv% + ev% OUT &H30B, fe% END SUB SUB fieldoff 'Ensures applied field is OFF OUT &H30B, 0 END SUB SUB fieldperp (bapp%, x9, y9, z9, bn, be, bv) 'This routine automatically applies a field of amplitude bapp% 'perpendicular to NRM direction CALL fieldoff IF bapp% = 0 THEN EXIT SUB ' PRINT "x9"; x9; "y9"; y9 PRINT "bn"; bn; "be"; be; "bv"; bv; "bapp%"; bapp% INPUT "Change bn, be, bv (Y/N)?"; c$ IF UCASE$(c$) = "N" THEN GOTO coils ELSE bn = bapp% * -(y9 / (SQR((x9 ^ 2) + (y9 ^ 2)))) be = bapp% * (x9 / (SQR(x9 ^ 2 + y9 ^ 2))) bv = 0 PRINT "bn"; bn; "be"; be; "bv"; bv END IF

Page 23: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-23

coils: 'North/South coil ia% = (ABS(bn)) CALL cns(ia%) IF bn < 0 THEN pn% = 0 ELSE pn% = 1 IF ia% = 0 THEN en% = 0 ELSE en% = 2 'East/West coil ia% = (ABS(be)) CALL cew(ia%) IF be < 0 THEN pe% = 0 ELSE pe% = 4 IF ia% = 0 THEN ee% = 0 ELSE ee% = 8 'Vertical coil ia% = (ABS(bv)) CALL cvert(ia%) IF bv < 0 THEN pv% = 0 ELSE pv% = 16 IF ia% = 0 THEN ev% = 0 ELSE ev% = 32 fe% = 0 'Set up coil polarities and enable connections ON fe% = pn% + en% + pe% + ee% + pv% + ev% OUT &H30B, fe% END SUB SUB fieldset (bapp%, xf, yf, zf) 'This routine automatically applies a field of amplitude 'bapp% and directions relative to sample magnetisation. 'xf, yf & zf come from SUB Calc 'To apply fields directly for testing give x,y,zf 'values before calling SUB fieldset CALL fieldoff 'bapp% = 45 IF bapp% = 0 THEN EXIT SUB IF UCASE$(F$) = "D" THEN EXIT SUB PRINT "bapp"; bapp% PRINT "xf"; xf; "yf"; yf; "zf"; zf 'enable only axis with non-zero values 'mimi negative values as changes -adc bn = bapp% * xf: be = bapp% * yf: bv = bapp% * zf 'North/South coil ia% = (ABS(bn)) CALL cns(ia%) IF bn < 0 THEN pn% = 0 ELSE pn% = 1 IF ia% = 0 THEN en% = 0 ELSE en% = 2 'East/West coil ia% = (ABS(be)) CALL cew(ia%) IF be < 0 THEN pe% = 0 ELSE pe% = 4 IF ia% = 0 THEN ee% = 0 ELSE ee% = 8

Page 24: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-24

'Vertical coil ia% = (ABS(bv)) CALL cvert(ia%) IF bv < 0 THEN pv% = 0 ELSE pv% = 16 IF ia% = 0 THEN ev% = 0 ELSE ev% = 32 fe% = 0 'Set up coil polarities, and enable connections "ON" fe% = pn% + en% + pe% + ee% + pv% + ev% OUT &H30B, fe% END SUB SUB filefinder (code$) 'Lists files on disc ending in ".DAT" CLS PRINT "These files are on your disc:- " FILES "B:*.DAT" INPUT "Enter name of required file :- ", code$ END SUB SUB fwd (swrF%) OUT &H30C, 255 adc% = (INP(&H302) * 16) + (INP(&H301) AND 15) swrF% = 4095 - adc% END SUB SUB header (code$, bapp%) LPRINT CHR$(27); "G"; CHR$(27); "E" LPRINT "SAMPLE :- "; code$ LPRINT "Date "; DATE$ LPRINT TAB(40); "Applied field "; bapp%; " uT" LPRINT : LPRINT : LPRINT LPRINT "DIP = "; a(1); TAB(13); "DEC = "; a(2); TAB(26); "TILT = "; a(3); TAB(39); "DIRECTION = "; a(4); TAB(60); "MASS = "; a(5) LPRINT ' Next three lines give print out options 'LPRINT "n/s"; TAB(10); "e/w"; TAB(20); "v"; TAB(25); "moment"; TAB(33); "declination"; TAB(46); "inclination" LPRINT TAB(1); "FIELD"; TAB(9); "POWER%"; TAB(18); "power"; TAB(27); "TIME"; TAB(39); "MOMENT"; TAB(55); "DEC"; TAB(62); "INC" 'LPRINT TAB(1); "FIELD"; TAB(10); "POWER"; TAB(20); " J"; TAB(35); "Dec"; TAB(50); "Inc"; LPRINT CHR$(27); "H"; CHR$(27); "F" END SUB SUB initialise CLS LPRINT CHR$(13) CALL mwaveoff CALL fieldoff

Page 25: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-25

CALL loadpos CALL sysreset CALL rotate(4) END SUB SUB loadpos IF p% = 0 THEN EXIT SUB PRINT "Moving sample to load position ", OUT &H301, 0 Finish = TIMER + 2 DO LOOP UNTIL TIMER > Finish PRINT "At load" p% = 0 END SUB SUB measure (x9, y9, z9) 'z(1) = 537 'z(2) = 521 'z(3) = 484 'z(4) = 431 CALL outpos CALL sqdreset CALL adcread(value) v(0) = value: t(0) = TIMER CALL measurepos CALL rotate(4) CALL adcread(value) v(1) = value: t(1) = TIMER - t(0) CALL rotate(8) CALL adcread(value) v(2) = value: t(2) = TIMER - t(0) CALL rotate(16) CALL adcread(value) v(3) = value: t(3) = TIMER - t(0) CALL rotate(32) CALL adcread(value) v(4) = value: t(4) = TIMER - t(0) CALL rotate(4) CALL outpos CALL adcread(value) v(5) = value: t(5) = TIMER - t(0) drift = (v(0) - v(5)) IF ABS(drift) > rnge% * 208 THEN CALL sqdreset drift = (v(0) - v(5)) / t(5) ' PRINT v(0), v(5) FOR R = 1 TO 5 v(R) = INT(v(R) + drift * t(R)) NEXT R 'May need to go to line printer and not screen********** PRINT v(0), v(1), v(2): PRINT v(3), v(4), v(5) v(1) = v(1) - (z(1) * rnge% / 100) v(2) = v(2) - (z(2) * rnge% / 100) v(3) = v(3) - (z(3) * rnge% / 100) v(4) = v(4) - (z(4) * rnge% / 100) x9 = INT((v(3) - v(1)) / 2) y9 = INT((v(4) - v(2)) / 2) v = v(1) + v(2) + v(3) + v(4) W = v(0) + v(5)

Page 26: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-26

z9 = INT(v / 4 - W / 2) PRINT z(1) PRINT "x9= "; x9 PRINT "y9= "; y9 PRINT "z9= "; z9 END SUB SUB measurepos IF p% = 4 THEN EXIT SUB PRINT "Moving sample to measure position ", OUT &H301, 3 IF p% = 2 THEN delay% = 16 ELSE delay% = 12 Finish = TIMER + delay% DO LOOP UNTIL TIMER > Finish PRINT "At measure" p% = 4 END SUB SUB microwave (pa%, pt%, pw%) 'The power DAC will take 0 to 255 but feedback fm Fwd Pwr 'is used to determine power applied to cavity and is in ratio 'of 35:1 for application and 40:1 for hold (see pulse routine) 'If pa% is increased over 100 you cannot get sufficient value 'from 12 bit Fwd pwr ADC !!! (100*40=4,000). DO INPUT "Power (1-100)? ", pa% LOOP UNTIL pa% <= 100 INPUT "Power range (mW) (1/3)?", p% IF p% = 1 THEN pw% = (pa% / 100) * 83.1 ELSE pw% = (pa% / 100) * 250 END IF DO INPUT "Time (1-20)? ", pt% LOOP UNTIL pt% <= 20 PRINT "Hit any key to run" DO: LOOP UNTIL INKEY$ <> "" CALL pulse(pa%, pt%) END SUB SUB mwaveoff 'Sets Microwave Pulse DAC output to zero OUT &H302, 0 END SUB SUB Openscreen (version$) CLS PRINT PRINT

Page 27: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-27

PRINT " MIMI / 7 " PRINT PRINT PRINT PRINT " 8 gHz System Program" PRINT PRINT " Applied field single axis, user specified parameters" PRINT PRINT : PRINT : PRINT : PRINT PRINT "Version :- "; version$: PRINT : PRINT INPUT "Continue (y/n)? ", z$ IF UCASE$(z$) = "N" THEN STOP END SUB SUB Opinput (code$, bapp%) INPUT "Disc files ? (y/n) ", z$ IF UCASE$(z$) = "Y" THEN CALL discread(code$, bapp%): GOTO Convert 'Default values code$ = "Test " a(1) = 90: 'dip a(2) = 0: 'YETN a(3) = 0: 'tilt a(4) = 0: 'direction a(5) = 1: 'mass bapp% = 0: 'applied field PRINT "Default settings:-" PRINT PRINT "Sample Code :- "; code$ PRINT PRINT "Dip YETN Tilt Dir Mass Field" PRINT "90 90 0 0 1.0 0" PRINT INPUT "Do you want to change (y/n) ", z$ IF UCASE$(z$) = "N" THEN GOTO Convert PRINT "SAMPLES SETTINGS" INPUT "Sample code ", code$ INPUT "dip ", a(1) INPUT "YETN ", a(2) INPUT "tilt ", a(3) INPUT "dir ", a(4) INPUT "mass ", a(5) INPUT "Applied field uT ", bapp% Convert: c! = .01745329# 'Radian convert (1/57.306) s(1) = SIN(a(1) * c!): c(1) = COS(a(1) * c!) s(2) = SIN((a(2) - 90) * c!): c(2) = COS((a(2) - 90) * c!) s(3) = SIN(a(3) * c!): c(3) = COS(a(3) * c!) s(4) = SIN(a(4) * c!): c(4) = COS(a(4) * c!) IF c(1) < ABS(.000001) THEN c(1) = 0 IF c(1) > ABS(.99999) THEN c(1) = 1

Page 28: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-28

IF s(1) > ABS(.999999) THEN s(1) = 1 IF s(1) < ABS(.000001) THEN s(1) = 0 END SUB SUB outpos PRINT "Moving sample to Out position ", IF p% = 3 THEN PRINT "At out of coil": EXIT SUB OUT &H301, 1 IF p% = 2 THEN delay% = 12 ELSE delay% = 10 Finish = TIMER + delay% DO LOOP UNTIL TIMER > Finish PRINT "At out of coil" p% = 3 END SUB SUB pulse (pa%, pt%) CLS LOCATE 15, 1 PRINT " M I C R O W A V E S ON" 'Power drive level is pl% 'Ramp up power until fwd swr pwr = 35 times "pa%" value pl% = 0 DO ' PRINT "want"; pa%; "get"; pl% pl% = pl% + 1 IF pl% > 255 THEN CALL Alarm1: EXIT SUB OUT &H302, pl% CALL fwd(swrF%) CALL ref(swrR%) IF swrF% < 100 THEN F% = 100 ELSE F% = swrF% 'divide by zero trap IF swrR% = F% THEN swrR% = (F% - 1) 'Test Cavity Standing wave Ratio VSWR = (F% + swrR%) / (F% - swrR%) IF VSWR > 4 THEN CALL Alarm: EXIT SUB 'PRINT "RAMP UP VSWR ="; VSWR ' Slow down rampup rate interval = TIMER DO LOOP UNTIL TIMER > (interval + .05) LOOP UNTIL (swrF%) >= (35 * pa%) cavpower% = swrF% - swrR% ' PRINT "cavpower"; cavpower%

Page 29: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-29

'Apply microwaves for time pt% 'If fwd swr pwr >40 times "pa%" then reduce drive level Finish = TIMER + pt% DO CALL fwd(swrF%) CALL ref(swrR%) ' cavpower% = swrF% - swrR% IF swrF% < 100 THEN F% = 100 ELSE F% = swrF% 'divide by zero trap IF swrR% = F% THEN swrR% = (F% - 1) 'Test Cavity Standing Wave Ratio VSWR = (F% + swrR%) / (F% - swrR%) 'PRINT "VSWR HOLD ="; VSWR IF VSWR > 4 THEN CALL Alarm: EXIT SUB ' IF swrF% > (40 * pa%) THEN pl% = pl% - 1 ' IF swrF% < (30 * pa%) THEN pl% = pl% + 1 ' PRINT "pl%"; pl% 'keep power in cavity constant, fwd-ref IF (swrF% - swrR%) > (cavpower% * 1.1#) THEN pl% = pl% - 1 IF (swrF% - swrR%) < (cavpower% * .9#) THEN pl% = pl% + 1 'PRINT swrF% - swrR% pse = TIMER DO LOOP UNTIL TIMER > (pse + .01) OUT &H302, pl% LOOP UNTIL TIMER > Finish 'Shut off drive OUT &H302, 0 CLS 'for temp exp ' p% = 2 ' CALL loadpos ' STOP END SUB SUB range CALL cavitypos CALL measurepos CLS PRINT : PRINT : PRINT "Range Test" DO FOR test% = 1 TO 5 CALL rotate(8) CALL rotate(16) CALL rotate(32) CALL rotate(4) NEXT test% INPUT "OK (y/n)? ", OK$ LOOP UNTIL UCASE$(OK$) = "Y"

Page 30: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-30

PRINT : PRINT : PRINT INPUT "enter range (1/10/100) ", rnge% CLS CALL cavitypos CLS END SUB SUB readings (j, dec, inc, xf, yf, zf, F$, x9, y9, z9) CALL measure(x9, y9, z9) CALL calc(x9, y9, z9, j, dec, inc) j = j + .0000001# xf = x9 / j yf = y9 / j zf = z9 / j CALL reswrite(code$, F$, j, dec, inc, x9, y9, z9) CALL cavitypos END SUB SUB ref (swrR%) OUT &H30C, 255 adc% = (INP(&H307) * 16) + (INP(&H306) AND 15) swrR% = 4095 - adc% 'compensate for directional coupler differences swrR% = INT(swrR% * .56) END SUB SUB reswrite (code$, F$, j, dec, inc, x9, y9, z9) 'writes almost everything onto disc 'BEWARE code$!!!!! 'if multiple saves then change code$ in operate part of program file$ = "A:" + code$ + "D.DAT" OPEN (file$) FOR APPEND AS #1 'WRITE #1, code$, A(1), A(2), 0#, 0#, 0#, 0#, 0#, 0#, 0# WRITE #1, F$, pw%, x9, y9, z9, a(5) CLOSE #1 END SUB SUB rotate (R%) PRINT "Sample rotation ", ' 4=REF,8=90,16=180,32=270 DO WHILE (INP(&H300) AND R%) = 0 OUT &H300, 255 'wait for step to complete WAIT &H300, 2, 1 FOR x = 1 TO 50: NEXT x LOOP PRINT "Sample rotated" END SUB

Page 31: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-31

SUB sqdreset 'Resets the SQUID Range counter only OUT &H30D, 255 END SUB SUB sysreset 'Resets the whole system,EVERYTHING! OUT &H30F, 255 END SUB SUB tune PRINT "Low level Microwaves to permit tuning" OUT &H302, 10 PRINT : PRINT PRINT "Low level Microwaves ON Hit any key to continue" DO LOOP UNTIL INKEY$ <> "" OUT &H302, 0 PRINT "Lowlevel Microwaves OFF" PRINT : PRINT END SUB SUB Zero CALL rotate(4) z(1) = 0: z(2) = 0: z(3) = 0: z(4) = 0 za = 0: zb = 0: zc = 0: zd = 0 CALL cavitypos CLS FOR zr% = 1 TO 5 PRINT : PRINT PRINT "Zero test "; zr%; " in progress" PRINT "Be patient, this takes a long time" PRINT : PRINT CALL measure(x9, y9, z9) za = za + v(1) - (v(0) + v(5)) / 2 zb = zb + v(2) - (v(0) + v(5)) / 2 zc = zc + v(3) - (v(0) + v(5)) / 2 zd = zd + v(4) - (v(0) + v(5)) / 2 NEXT zr% z(1) = INT(za / 5) z(2) = INT(zb / 5) z(3) = INT(zc / 5) z(4) = INT(zd / 5) CLS PRINT "zero correction" PRINT "x="; z(1), "-y="; z(2), "-x="; z(3), "y="; z(4) LPRINT "x="; z(1), "-y="; z(2), "-x="; z(3), "y="; z(4) PRINT : PRINT CALL cavitypos END SUB

Page 32: THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEMmimi/AppendixA.pdf · THE IDIOTS GUIDE TO THE 8.2 GHz MICROWAVE DEMAG / REMAG SYSTEM Mimi J. Hill Version 4 15/03 /00

A-32

APPENDIX D Publications Hill, M. J., & Shaw, J., 1999. Palaeointensity results for historic lavas from Mt.

Etna using microwave demagnetisation / remagnetisation in a modified Thellier type experiment, Geophys. J. Int., 139, 583-590.

Hill, M. J., & Shaw, J., 2000. Magnetic field intensity study of the 1960 Kilauea lava flow, Hawaii, using the microwave palaeointensity technique, Geophys. J. Int., in press.

Share, J. A. & Hakes, J., 1997. 2.5 GHz power source, Electronics World,

March, 206-207.

Share, J., 1993. The care and feeding of a klystron amplifier, Electrotechnology, Oct/Nov, 29-31.

Shaw, J., Walton, D., Yang, S., Rolph, T. C. and Share, J. A., 1996. Microwave archaeointensities from Peruvian ceramics, Geophys. J. Int., 124, 241-244,

Shaw, J., Yang, S. & Odah, H., 2000. Microwave archaeointensity results from Egyptian ceramics, Geophys. J. Int., in review.

Shaw, J., Yang, S, Rolph, T. C. and Sun, F. Y., 1999. A comparison of archaeointensity results from Chinese ceramics using microwave and conventional Thellier’s and Shaw’s methods, Geophys. J. Int., 136, 714-718.

Walton, D., 1991. A new technique for determining palaeomagnetic intensities, J. Geomag. Geoelctr., 43, 333-340.

Walton, D., Shaw, J., Share, J. A. and Hakes, J., 1992. Microwave demagnetisation, J. Appl. Physics, 71, (3), 1549-1551.

Walton, D., Share, J. A., Rolph, T. C. and Shaw, J., 1993. Microwave magnetisation, Geophys. Res. Lett., 20, 109-111.

Walton, D., Snape, S., Rolph, T. C., Shaw, J. and Share, J., 1996. Application of ferimagnetic resonance heating to palaeointensity determinations, Phys. Earth Plan. Int., 94, 183-186.