Top Banner
BARC/1992/E/021 03 o I s IBM-PC BASED DATA ACQUISITION SYSTEM FOR A LASER ENHANCED ION1SATION SPECTROMETER USING A LOW COST GPIB CARD R. Sampath Kumar and S. V. G. Ravinilranaih Spectroscopy Division 1992
49

1992 - inis.iaea.org

Apr 02, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1992 - inis.iaea.org

BARC/1992/E/021

03

o

Is

IBM-PC BASED DATA ACQUISITION SYSTEM FOR A LASER ENHANCEDION1SATION SPECTROMETER USING A LOW COST GPIB CARD

R. Sampath Kumar and S. V. G. RavinilranaihSpectroscopy Division

1992

Page 2: 1992 - inis.iaea.org

BARC/1992/E/021

OUJ

£ GOVERNMENT OF INDIA~ ATOMIC HNHUCY COMMISSIONUOS<

IBM - PC BASED ACQUISITION SYSTEM FOR A LASER ENHANCED

IONISATION SPECTROMETER USING A LOW COST GPIB CARD

by

R. Sampath Kumar and S.V.G. RavindranathSpectroscopy Division

BHABHA ATOMIC RESEARCH CENTREBOMBAY, INDIA

1992

Page 3: 1992 - inis.iaea.org

BARC/1992/E/021

BIBLIOGRAPHIC DESCRIPTION SHEET FOR TECHNICAL REPORT

C M par IS i 9400 - 1980)

01

02

03

04

05

06

07

08

10

11

13

20

Security classification i

Distribution i

Report status i

Series i

Report type i

Report Ko. i

Part No. or Volu*e Wo. i

Contract No. i

Title and subtitle i

Collation i

Project No. i

Personal author(s) i

Unclassified

External

New

BARC External

Technical Report

BARC/1992/E/021

IBM-PC based data acquisitionsystem for a laser enhancedionisation spectroMeter usinga low cost BPIB card

46p., IB figs.v 2 appendixes

R. Sampath Kumar|B.V.S. Ravindranath

21 Affiliation c.f author<•> i Bpectroscopy Division,Bhabha Atonic Research Centre,Bombay

22 Corporate author<s> i Bhabha Atomic Research Centre,>ay - 400 0B5

23 Originating unit i Bpectroscopy Division, BARC,Bombay

24 Sponsor<s> Name t

Type t

Department of Atomic Energy

Government

30 Date of submission i June 1992

31 Publication/Issue date i July 1992

Contd...

Page 4: 1992 - inis.iaea.org

40 Pub11shar/Distributor i Head, Library and Information01vialon, Bhabha Atomic ResearchCentre, Bombay

42 Form of diatribution s

50 Language of text i

51 Languaga of summary i

52 No. of references i

53 Bivas data on i

Hard Copy

English

English

6 rafs.

Abstract i An IBM - PC based Data Acquisition System has beendeveloped for the existing Laser Enhanced IonisationSpectrometer in the Division. Here the Boxcar Averager (type BR250) which integrates the spectrometer output is interfaced toan IBM-PC, converted into a BPIB controller with the help of alocally available BPIB card, (Dynalog Micro Systems make PCLB48) through the BPIB port of the Computer Interface Module <BR245). The menu driven software developed in BABIC, triggers thescan in the Dye Laser through its control port, collects datafrom the spectrometer, plots, displays and stores it on thehard disc fcr further use.

70 Keywords/Descriptorseywords/Descriptors t MICROCOMPUTERS) EQUIPMENT INTERFACESiCOMPUTER CODES) DATA ACQUISITION SYSTEMS| LASER 8PECTROBCOPY)DYE LASERBi DATA PR0CEB8INB| SPECTRA) SODIUM

71 Class No. i INIB Subject Category i E42.0B

99 Supplementary\elements i

Page 5: 1992 - inis.iaea.org

An IBM-PC based data acquisition system (-fig 1) has been

developed for the Laser Enhanced Ionisation spectrometer of our

Division. This system, compared to the existing system where data

is obtained on a chart recorder, offers advantages such as

accurate and faster data acquisition and storage of collected data

for any further analysis.

The signal from the spectrometer is integrated by the

integrator module (SR 250) of the Boxcar unit and the integrated

output is scanned for data acquisition by the computer via the

Computer Interface Module <SR 245) through the IEEE-4BB interface

bus. The Boxcar Averager is interfaced to the PC with the

help of a GPIB card PCL-848 of Dynalog Micro Systems.

In the existing system, data acquisition is done

manually, by recording the spectrum with the help of a chart

recorder. In the chart recorder, the wavelength at which peaks

appear is calculated by referring to some standard peak of a known

sample. Since in knowing the peak positions, human judgement is

involved, there is scope for human error in knowing the precise

positions of the peaks. Also in the manually operated system,

digitisation of data for further use is lot done. The newly

developed Data Acquisision System minimises all these problems

and improves the reliability of the routine analysis of the

samples by minimising the drawbacks of human judgement and

providing the data for further processing and analysis. The

required software has been developed in Microsoft's BASIC for

this purpose.

This report describes the details of the interface

setup, software, the operation of the PC based data acquisition

system and the data obtained in the form of spectra of samples

taken with the setup.

Page 6: 1992 - inis.iaea.org

1 • O

1.1 LASER ENHANCED IONISATION SPECTROMETER

The Laser Enhanced ionisation Spectrometer C13 consists

of a tunable Dye Laser system to provide monochromatic wavelengths

far absorption by atoms, a reservoir of atoms which is provided

by a long flame premixed type of burner, a collection electrode

system with a high voltage bias applied to the electrodes around

the flame, a Boxcar Averager for integrating the LEI signal

and a PC to acquire the data.

1.2.1 STANFORD RESEARCH SYSTEMS' BOXCAR INTEGRATOR C SR 250 )

The model SR250 Gated Integrator is a versatile, high

speed, low cost NIM module designed to recover fast analog signals

from noisy backgrounds [23.

The SR250 consists of a gate generator, a fast gated

integrator and exponential averaging circuitry. The gate

generator triggered internally or externally, provides an

adjustable delay from a few nanoseconds to 100 milliseconds,

before it generates a continuously adjustable gate of 2

nanoseconds to 15 milliseconds. The delay may be set by a front

panel potentiometer, or automatically scanned by a rear panel

input voltage in order to record entire waveforms.

The fast gated integrator integrates the input signal

during the gate (fig 2). The output from the integrator is then

normalised by the gate width to provide a voltage which is

proportional to the average of the input signal during the

sampling gate. This signal is further amplified according to the

front panel sensitivity setting. Then it is sampled by a low

droop sample and hold amplifier, and output via a front panel BNC

connector. This LAST SAMPLE output allows the experimenter to do

a shot-by-shot analysis of the signal being studied, and makes the

instrument a particularly useful component in a computer data

acquisition system. A moving exponential average over 1 to 10K

samples is available at the AVERAGED OUTPUT. This tradition*!

Page 7: 1992 - inis.iaea.org

averaging technique is useful for extracting small signals

from noisy backgrounds. The width of the sampling gate, signal

=&nsitivity are set using front panel knobs and the amplitude of

the averaged output depends on the sensitivity setting.

1.2.2 STANFORD RESEARCH SYSTEMS' COMPUTER INTERFACE MODULE CSR245)

The SR245 Computer Interface module is capable of

providing a variety of the scanning, counting and communication

functions typically required in the laboratory C23. It is remotely

programmable via either RS232 or GPIB rear panel connectors and

can be used with laboratory computers or simply with a terminal.

Eight front panel analog ports can be programmed as inputs or

outputs with a range of ±10.24 Volts. The two front panel digital

I/O bits are provided for general use as well as an eight-bit

digital I/O port accessible via an internal 20 pin dual-in-line

connector. The digital ports can be used as the trigger input

for the computer interface module. One of the eight analog ports

which is configured as an input is used to collect the data

from the gated integrator and another analog port designated as an

output port is used to trigger the initiation of the scan.

The computer interface module is accessed by quoting it's address

which is set to 23.

1.3 LAMBDA PHYSIK DYE LASER CFL 3002)

In order to promote the sample atoms to the excited

state , energy has to be provided to them. This is

achieved by the use of laser beam from a Dye Laser C33 ( FL 3002 >

pumped by an Excimer Laser C43 <LP EMG 201 MSC) which supplies

energy to enable excitation. The dye used in the laser,

Rhodamine 6 G, is effective in,the wavelength range 568 nm to

608 nm with peak at 581 nm. The Dye Laser is capable of giving

pulses of 20 nanoseconds duration and 5 to 30 mi H i Joules

of energy with a line width of about 0.2 cm . The laser beam is

scanned through the experimental wavelength range. For this the

start wavelength, stop wavelength, scan step and number of

Page 8: 1992 - inis.iaea.org

scans are set manually using the microprocessor controller. The

laser is put in the external synchronisation mode whereby it

can be synchronised with an external device. The Dye Laser has a

rear panel control port which is a D—type 9—pin socket. The

laser in external synchronisation mode can be triggered by

supplying a TTL pulse o-f at least 1O mSec duration at pin 7

< Trig.in input ) of this control port. This TTL pulse is

generated at one of the analog ports <port 4) of the SR245, by the

computer and the control port is connected to the corresponding

analog output port by a co-axial signal cable. When the laser

is externally triggered, scanning starts and proceeds at the

set rate until the stop wavelength is reached. If more than one

scan is set, the laser waits for one more trigger from the

synchroniser to trigger the next scan. Thus the laser and the

data acquisition system are synchronised and this helps in

knowing the accurate positions of peaks characteristic of the

sample.

The Dye Laser has a GPIB port through which it can be

controlled by a PC with BPIB card. By interfacing the Dye Laser,

the need for using the control port will be eliminated and the

total control will be assumed by the PC. The microprocessor scan

control will then become redundant in this mode.

1.4 GPIB INTERFACE

Commonly called as the IEEE-488 interface bus or the

general purpose interface bus is used to achieve data transfer

between a GPIB device anri a. PC. GPIB devices communicate with

interconnected GPIB devices by passing device dependant messages

which contain device specific information such as programming

instructions, measurement results, machine status and data and

interface messages which perform functions such as initialising

the bus, addressing and unaddressing devices and setting device

modes to remote or local programming through the interface system.

The GPIB has stand alone devices interconnected via the

cable. In our system the WIPRO PC/XT with PCL-848 DMS GPIB

add-on card is the system controller at address zero and the

Page 9: 1992 - inis.iaea.org

Boxcar Averager's Computer Interface Module SR245 at address 23

which can be configured as a talker or listner.

The GPIB inter-face system itself consists of 16 signal

line and 8 ground return lines [ 5 3.

In the interface system with GPIB, not more than 15

device loads can be connected to each bus, with not more than

two-thirds powered on. The maximum cable length is 20 metres and

hence an average separation of 2 metres over the entire bus is

allowed. Cable extenders can be used to exceed these limits.

In our system locally available and low cost GPIB card

PCL-848 of Dynalog Micro Systems is used. To interact with the PC

equipped with this card, functions callable in a defined syntax

shown in appendix 1, are available on the on-board ROM of PCL-848.

1.5 IBM PERSONAL COMPUTER

An IBM compatible PC from m/s WIPRO with 640 KB RAM

8OPL, processing unit with 8O87 numeric processor, 20 MB hard disk,

one floppy drive and an Epson's FX-10S 132 column dot matrix

printer was procured for data acquision and processing purposes.

The selection of the PC is based on it's memory size, data storage

facility and availability of free I/O slots to incorporate the

interface circuit. The power to energise the interface card is

obtained from the DC power' bus of the computer.

2.0

A menu driven software in Microsoft's interpreter BASIC

is developed for the control and data acquisition system.

The program file has been put in to the AUTOEXEC.BAT file so

that the program is loaded in to the memory soon after the power

is on.

The program when run displays menus shown in the figures

3 to 9 , and collects various experimental parameters from the

user. The parameters once entered, if the user wishes to change

them that is also made possible by calling a subroutine which

asks the user tc change the parameters which he wishes to.

Page 10: 1992 - inis.iaea.org

The software makes use of the Boxcar Averager Computer

Interface Module's commands.(appendix 2). These commands are sent

to the Boxcar Averager and the response received by calling

suitable functions residing in the on - board ROM of the GPIB

interface card C63. The various functions called are identified

with their offsets and the base memory address where these

functions reside is DOOOh. These user callable functions have a

defined syntax.

The software does the follwoing actions:

1. Initialises the interface by calling the INITX function.

2. Puts the device (Boxcar Averager) in to the remote mode by

calling the REMOTE* function.

3. Clears the device in the remote mode by calling the DEVCLR7.

function. The device is now ready to correspond with PC

through the interface bus.

4. Sends commands and data to the device in the -form of a string

by calling the function OUTPUT"/..

5. Through commands, it resets the Boxcar Averager and designates

analog ports 1 to 3 and digital bit port 1 as input ports and

analog ports 4 to 8 and digital bit port 2 as output ports.

6. Generates a TTL pulse at port 4, connected to the control port

of the dye laser and triggers the scan. Scan starts from the

previously set start wavelength and proceeds at the set rate

until the previously set stop wavelength is reached. Data

acquisition also starts when the scan starts.

7. The integrated output of SR2S0 connected to analog port 1 is

scanned for the required number of triggers.

8. Receives data from the Boxcar Averager in to a string by

calling the function ENTER'/..

9. Averages and stores the collected data in a data file.

10. Displays the collected on the screen with wavelength against

intensity. This type of display is very useful in that it

helps us to know the intensity at each wavelength and the

problem of knowing the wavelength at which a peak appears by

manual judgement is totally eliminated. The data in this mode

of display can be seen any number of times and once out of

this mode the data is plotted in the form of a graph with

Page 11: 1992 - inis.iaea.org

intensity vs. wavelength, using graphic statements of BASIC.

The program is written to acquire data from the system

in two modes. The first way is to let the computer average

different shots of the data from the spectrometer after being

integrated by SR245. For this we take the LAST SAMPLE output of

the SR250 and scan it for the required number of triggers with the

SCXport no.>:<no. of triggers/ cummand. Here the port number is 1

as we are using the anal eg port 1 designated as an input port to

collect the data from SR250. The data acquired is averaged and is

stored into a data file.

In the second mode averaging is done by the Boxcar

Averager itself by selecting the number of samples which varies

from 1 to 10K. Here the AVERAGED OUTPUT is given to the analog

input port 1 and the output received using the ?<port no.> command

of the SR245. This data is stored in a file on the hard disk for

future processing. In our system data can be acquired in both the

modes and the option is left to the user.

While displaying the data graphically, the user can

select a scale of his own choice for X and Y-axes. A separate

menu is there for this purpose. The user can also select Auto

Scale mode in which the system takes care of the scale of both X

and Y axes.

The user can also plot or display data already available

in a file by using the option "DATA PROCESSING" in the main menu

which has two su,b - options namely GRAPH and DISPLAY which ask the

user to enter the name of the data file and other required

parameters. The collected data can be displayed either vertically

i.e., just as in the chart recorder or horizontally.

The last option in the main menu is "QUIT" which when

selected returns the control to DOS.

An additional feature of this software is that when a

mode is selected, it asks the user to check for the hardware

connections necessary to operate in that mode and provides

suitable prompts for entering the various parameters.

Page 12: 1992 - inis.iaea.org

3 . 0 SVSTTE1M OPERAITO<DtN

The sequence o-f events during the data acquisition

process is shown with the help of the -flowchart as shown in

f ig . 10.

4 . 0

The Sodium spectra obtained using this system on

Epson's FX - 105, 132 column dot matrix printer, are shown

in figures 11 to 13. The peak positions are -found to be in

agreement with those of the standard Na spectrum. Both forward

and reverse scans were carried out to study the asymmetry in the

shape of the spectrum and since the forward (fig 14)and reverse

<fig 15) spectra agree closely, this asymmetry can be attributed

to the large time constant for the discharge in the Boxcar

integrator.

This system is now semi-automatic, with the Dye Laser

manually operated. The Dye Laser, as mentioned earlier, has a

GPIB port through which it can be controlled by a PC. Once the

Dye Laser is also interfaced to the PC, the system will become

fully automatic.

By using this system, the problems associated with the

human judgement in analysing the collected data are minimised. By

having the computer average the results of a number of short

scans, the effect of long term drift in th& averaged output during

a single long scan is minimised or eliminated. Also, with the

development of this system, data is digitised and stored with

intensity against wavelength, thereby making it available for any

subsequent user specific processing.

3

Page 13: 1992 - inis.iaea.org

The authors would like to thank Dr. L.C. Chandola and

Shri. P.P. Khanna, spectroscopy Division, B.A.R.C., for the

valuable co-operation. They are grateful to Dr. V.B. Kartha,

Head, Spectroscopy Division and Ghri, P.K.S. Prakasa Rao for their

encouragement and guidance in bringing out this rsport.

REFERENCES

1. Setting up and performance of a Laser Enhanced Ionisation

Spectrometer

by

L.C. Chandola, P.P. Khanna and M.A.N. Razvi,

Atomic Energy Commission (India) Report B.A.R.C.-1510 (1990).

2. Manual of Fast Gated Integrators and Boxcar Averagers

( SR-250 and SR-245 ) from Stanford Research Systems (SRS).

3. Manual of Dye Laser FL 3OO2 from Lambda Physik Laser Technik.

4. Manual of Excimer Lsser LP EMG 201 MSC from Lambda Physik

Laser Technik.

5. IEEE-488 Control, Data Acquisition and Analysis manual from

National Instruments <1988).

6. Manual of 6PIB card ( PCL - 848 ) from Dynalog Micro Systems.

******

Page 14: 1992 - inis.iaea.org

45 D,-A ACQUISITION SYSTEM FOR A LASER ENHANCEDfc ION1SATION SPECTROMETER7 ' — ~ — ~* — • ~ — • " • •

10 CLSiKEY OFF:SCREEN It WIDTH BOiCDLOR 0,7i5 DIM ARR<255,10>20 LINE U,1)-(630,190),,030 LINE (10 ,5 ) - (620 ,20 ) , ,IJF|HNG ( 2 , t > - ( 6 2 9 , 2 4 ) , , B40 LOCATE 2,13:PRINT " Data Acquisit ion System -for LEI Spectroscopi c Analysis ••50 LINE (110,50) - (510 ,130) , ,B60 LINE U30,40>-<530,50>,,BF:LINE (510,50)-(530,140),,BF70 LOCATE 8,30:PRINT "MAIN MENU" I LOCATE 9,28:PRINT «*•>'•<••»«••<••>•«.*•->.•<.—•80 LOCATE Il,23sPRINT "1. COMPUTER AVERAGING"90 LOCATE 13,23:PRINT "2. BOXCAR AVERAGING"92 LOCATE 15,23iPRINT "3. DATA PROCESSING"94 LOCATE 17f23:PRINT "4. QUIT"100 LINE (1,170) - (630,171),,BF110 LOCATE 23,2iPRINT "#PRESS SPACE BAR TD MDVE •=> 'g'to select the item"120 LINE (1,1B7) - (630,188),,BF130 LOCATE U,18lPRINT '•<=>"140 I*=1NKEY*: IF 1*="" THEN GOTO 140150 IF I*-"E" OR I*- "S" THEN GC1SUB US00:GOSUB 12000:GOSUB 10001 GOTO 200 : ELSEIF I* = " " THEN LOCATE 11,1B:PRINT " "iLOCATE 13,18«PRINT "«>" ELSE GOTO 140170 I*=INKEY*: IF I**"" THEN GOTO 170180 IF is-"s" OR I»="S" THEN GOSUB 11600!GOTO 6400 ELSE IF I*=" " THEN LOCATE 13,18:PRINT " '^LOCATE 15,18:PRINT "=>" ELSE GOTO 170182 I*=INKEY*:1F I»-"" THEN GOTO 1B21B4 IF I* = "S" OR I*="a" THEN GOTO 9000 ELSE IF I*«=" " THEN LOCATE 15, 18: PRINT"

":LOCATE 17,16:PRINT "->" ELSE GOTO 1821B6 I*=1NKEY*:IF I*="" THEN GOTO 186187 IF I* = "S" OR I* = "s" THEN GOTO 820 ELBE IF I#=" " THEN LOCATE 17,1B:PRINT

"1 LOCATE 11,18:PRINT "=>" ELSE GOTO 186190 GOTO 140IV*. —-— — -»— -— __.«».—- — _ - . _ _ _ - _ — _ _ _ — _-____«.»^™.____i_..^__».__-__._ — _._.«_^»_

194 ROUTINE FOR COMPUTER AVERAGING MODE

200 DEF SEG=S<HD000210 1N11 V.=0: MYADDR"/.=0: I0P0RT7.=S<H2BBi SETTING7.=!<HD000220 0UTPUT7.=3sENTERX=6:REM0TE7.=332~0 CALL INIT7. (IOPORT7.,MYADDR7.,SETTIN6y.)240 ADDR7.=2:j250 CALL REM0TE7. (ADDR7.)255 O* = 1IMR"258 CALL OUTr-UTX <ADDR7.,D*>300 A*="13;MSj Tl;ET;S4=5.00;s4=0.04"320 CLS:LINE (1,1)-(630,190>,,B:LINE (130,80)-(500,100),,BiLINE (150,74)-C520,60) ,,BF330 LINE (500,B0)-(520,94),,BF340 LOCATE 12,29:PRINT "PLEASE WAIT FOR DATA "3f>0 Z't = ->&"

1O

Page 15: 1992 - inis.iaea.org

3603703B03-7U40041047048049(35B0510

53054U545

5605713580•59 B60061062063B

6tf.06607207307657707S0790795800810H2I3

040SJ.I2I860900910920

M=l:MD=10:MP=ll3sC*="r->ti2"D* = "N"OPEN " n " , » 2 , " t e m p . r t a t "CNT=0tCALL OUTPUT V. <ADI>R"/. , A * )I1=TIMER:LE=WLS5Uri=0lCNT=CN1+l :CALL OUTPUT 7. (ADDRX. ,A1 * )FOR PL = 1 IQ SMCALL OUTPUT/. (AODKX,C*)NEXT PLF-OR 1 >= 1 10 BMCALL OUTPUT'/. (ADDRV., D*>RF-.D*=BPACE*<B0)CALL EIMTERX (ADDRX, KKXl * )Z=VAL(RED*) ' t SUM=SUM+Zl «V13= (BUM/SM)T2=TIMER«KI = (T2-T1)*R: IF SUN<REV) •= -1 THEN WL*=LE-M ELSE WL «WRITfc *2,Wl.,ZNEXT I13=TIMER:IF T3--T1 <' (B/R) THEN GOTO 410CLOSE #2 ' t QOSIJB 8000ClF'EN "O",#1,F*OPEN "i " ,#2,"temp.clat"lBUI"l = 0i I«lWHILI-: NOT E0F<2)INPUT #2,WL,ZSUM = SUM + ZAVQ = SUM/IIF I = SM THEN I = l:SUM • 0:WRITE #l,WL,AVG1=1+1:WENDCLOSE #2CLOSE KliGOSUB 8000GOSUB 3000LINE <175,160)-(485,190),.BILINE (165,165)-(475,195),,BFLOCATE 23,26tPRINT " Want to continue? (y/n):"LOCATE 23,51:INPUT "",YEN1*IF YENl*O"n" AND VEN1*O"N" AND YEN1* <> "y" AND YEN1* <> "Y"IF YEN1* » "n" OR '.EN1* = "N" THEN-CLOSE #ltGOTO 820CLS:BOTO 20LEY ONCLS:LINE (155,80) - (465, R5> ,, 1<F: LINE < 155 ,85) - < 165, 110) , ,BFLINE (165,85) -(475, U S ) , ,DLOCATE 13,27:PRINT " Goorlhye until ni?xt exerciBe! "FOR I = 1 TO 5000t NEXT J:SYST£M

LE+kl

THEN GOTO 790

-SUE-ROUTINE TO ENT!:R PARAMETERS FOR-COMPUTER AVEI-AGING

1000 L I N E U , l>-(630,190),, B1010 LINE (130,10)-(500,190) ,,B:LINE ( 15«, 11 - <52<B, IB) , ,BF1020 LINE (500,10)-(520,170),,BF1030 LOCATE 4,2B:PRINT " Enter the following p.r_m»ters1040 LOCATE 7,22:PRINT "1. DATA FILE NAME " t"1050 LOCATE 10,22:PRINT "2. SCAN RATE (NM/SEC) t"

11

Page 16: 1992 - inis.iaea.org

107010B011390

1 110111011301140use11601 178118011909012001210190019101920193H2000200520102020203020402050TR20602070

LOCATE 13,22:PRINT "3. NO. OF SAMPLES :'LOCATE 19,22s PRINT "4. STOP WAVELENGTH (NM) «'LOCATE 16,22:PRINT "5. START WAVELENGTH (NM) :'LOCATE 22,22:PRINTLOCATE 7,53:INPUT "LOCATE 10,531 INPUTLOCATE 13,53:INPUTLOCATE 16,53iINPUTLOCATE 19,53:INPUTG»ABS(WLF-WLS)I REVLOCATE 22,53s INPUTLINE (176,22>-(447,41),,BF:LOCATE 4,30»PRINT "ANY CHANGE <y/n>?"LOCATE 3,26:PRINT "If YES retyp* all parameter*"YN*»INKEY*t IF YN*O"n" AND YN*O"N" AND YN*O"y" AND YN* <>"Y" THEN GOTO 11

"3. NO. OF SAMPLES"4. STOP WAVELENGTH <NM)"5. START WAVELENGTH <NM)"6. SCAN COMM tSCxtSamples]",F*"",R"",SM"",WLS•'",WLF« (WLF-WLS)

IF YN*«="y" OR YN*»RETURN

•Y-" THEN GOSUB 20001 GOTO 1170

-SUB-ROUTINE TO CHANGE THE ENTERED PARAMETERS-IF REQUIRED

LOCATE 7,53: INPUT "",FR*:IF FR*<>"" THEN F*-»FR*LOCATE 9,53s INPUT " " ,F1R»: If- F1R*<>"" THEN FI*«F1R*LOCATE 10,53: INPUT "".RliIF R 1 O 0 THEN R-RlLOCATE 13,53: INPUT "",SM1:IF SM1O0 THEN SM=SM1LOCATE 16,53»INPUT "".WLS^IF WLS1O0 THEN WLS-WLS1LOCATE 19,53«INPUT "",WLF1:IF WLF1O.0 THEN.WLF-WLF1G-ABS<WLFl-WLSl)sREV = (WLF1-WLS1) ":TR=P1«(t/Rl)#G:LOCATE 22,42:PRINT

LOCATE 22,33:INPUT "",A11*:1F All*<>"" THEN A1*=A11»RETURN

T.01030203100.'•105311031503155316031703180319032003210322013,13230324032503270

-SUB-R')UTINE TO PLOT THK SCAN DATA IN THE FORM-0F INTENSITY Vs WAVELENGTH GRAPH

DOIWB 3600: G=ABS (WF - WS): REV = (WF-WS) : GOSUB 3800:CLSGOSUB 4000:YSCALE = 120/<BB-PS>AF=(BB-PS)/6:CLS

I""N"T"E"N"S":LOCArE 11,1:PRINT "I":LOCATE 12,1:PRINT "T":LOCATE

PRINTPRINTPRINTPRINTPRINT

LOCATE 3,1LOCATE 6,1LOCATE 7,1LOCATE 8,1LOCATE 9,1LOCATE 10,1 :PR INT:PRINT "V"LOCATE 19,38 J PRIPT "LINE <97,0) - (97,125)LINE (97,125)-<65B,>25)FOR I - 0 TO 120 STEP 20

W A V E L E N G T H

Page 17: 1992 - inis.iaea.org

3280 K -= 125-13290 PSET(98,K):PBET(9V,K>3300 LOCATE INT(K/8)+1,5sPRINT USING "##.##"|PS3310 PS - PS+AF332B NEXT I3323 IF SBN(REV)- -1 THEN 60SUB 14000 ELSE BOSUB 33303326 RETURN3330 XRANBE-B » XSCALE-530/XRANBElXPT1-03340 SCNTR«CNTR»XPT1-0«K»13330 FOR N - 1 TO CNTR/53360 FOR I » 1 TO 10 STEP 237 .3 VA » ( (ARR <N,I+l)-PS1)*YSCALE>3398 IF K>1 AND ARR(N,I) < WSU THEN LASTX»«?7lLASTY«125-VA3400 IF (K > 1) AND ARR (N,I) >- WSU THEN XPT1 « XPT1 + (XSCALE • (ABS(ARR<N,I)-Fl>))iPT « 97 + XPTll LINE (LASTX,LASTY)-<PT,123-VA)tLASTY-125-VAlLASTX-PT3405 IF ARR(N,I) >« WFU THEN GOTO 34303410 IF K • 1 AND ARR(N,I>>- WSU THEN LASTX » 97lLASTY-123-VAiLOCATE 17,10:PR1NTUSING "###.###"( ARR<N,I)

3415 IF K=l THEN LASTX-971LASTY-12S-VA3421 XPT2-K MOD MD3422 IF XPT2 - 0 AND ARR<N,I) >- WSU THEN PSET <PT,124)iPSET <PT,123)I LOCATE17,10+INT (XPT1/8)iPRINT USING "#«*.#•#"|ARR (N,I) 'I IF ARR<N,1)«WLF THEN BOTO3430

3424 K « K+llFl-ARR(N,I)3426 CNTR » CNTR-1: IF CNTR » 0 THEN BOTO 34303428 NEXT I I NEXT N3430 LINE (236,166) - (417,176),,B3440 LOCATE 22,32:PRINT " Spectrum of SODIUM "3480 A*«INKEY*:IF A*-"" THEN GOTO 34803490 CLOSE #13500 LOCATE 23,13510 RETURN3550 '3560 SUB-ROUTINE TO SCAN THROUGH THE DATA FILE, OBTAIN3565 PARAMETERS FROM IT AND STORE THE DATA IN AN ARRAY3570 '3600 BB=03612 CLSiLINE (1,1)-(630,190),,BlLINE <130,80)-<500,100),,BlLINE (150,74)-(520,80),.BFiLINE (500,80)-<520,94),,BF3615 LOCATE 12,23lPRINT " WOULD YOU MIND WAITINB A FEW SECONDS..."3620 OPEN "I",#1,F*3630 M=l:N=llCNTR»03640 WHILE NOT EOF<1)3650 INPUT «1, ARR(M.N),ARR<M,N+1>ICNTR-CNTR+1IARR<M,N+1>-(-1>*ARR(M,N+1)3660 WS=ARR(1,1)»WF»ARR<M,N)>IF (M " 1) AND <N«1> THEN PS-ARRU,2>3670 IF AKR(M,N+1) > BE THEN BB - ARR«M,N+1)3680 IF ARR(M,N+1) < PS THEN PS = ARR(M,N+1>36B5 PS1=PS SPRINT "pt n*xt«"|PS,"pml«"|PS15690 N = N+2 I IF N > 10 THEN M «• M+1|N - 13700 WEND

Page 18: 1992 - inis.iaea.org

3710 CLOSE #13720 RETURN3765 '3770 ' SUB-ROUTINE TO SELECT THE RANQE FOR X-AXIS

3800 CI_S:LINE (80,60) - <500,160>,,BJ.810 LINE (100,50) - (520,60) , , BF3820 LINE (500,60) - (520,15B),,BF3830 LOCATE 23,10:PRINT " Select with space bar and press '*' to select "3840 LOCATE 10,17:PRINT " SELECT RANGE FOR X-AXIS3850 L O C A T E 1 1 , 1 7 : P R I N T " «.•»•>.•.«.•*•*•*•>.«.•*•.•»•*•.•.•*•»•>.«.•*»+ „

3860 LOCATE 15,20:PRINT " l> AUTO "3B70 LOCATE 17,20|PRINT " 2> USER SELECTABLE "3880 LOCATE 15,15lPRINT "->"3B90 A* - INKEY*: IF (A* <> " ") AND (A* <> "*"> AND (A* <> "B") THEN GOTO 3B9&3900 IF A* - " " THEN LOCATE lS.lSiPRINT " "iLOCATE 17,15:PRINT "->"3910 IF <A*»"B") OR <A*»"s"> THEN GOTO 39B53920 A* - INKEY*i IF (A* <> " ") AND (A* <> "S") AND <A* <> "s") THEN GOTO i3930 IF A* - " " THEN LOCATE 17,15«PRINT GOTO 3BB03940 IF <A* - "s") OR <A* - "S"> THEN CLS3950 WLS-0iWLF«01 LOCATE 5,10:PRINT "THE START WAVELENGTH 18"|W6iLOCATE 7,10«PR]T 'THE STOP WAVELENGTH IS"(WF3960 LOCATE 9,22IPR1NT "TYPE YOUR REGION OF INTEREST"I LOCATE 12,20:PRINT "STAR!WAVELENGTH"iLOCATE 14,20:PRINT "STOP WAVELENGTH"3970 LOCATE 12,40:INPUT "",WSU:LOCATE 14,401 INPUT "",WFU3980 G=ABS(WFU-WSU):GOTO 399039B5 WFU=WFiWSU»W63990 RETURN

3996 : SUB-ROUTINE TO SELECT THE SCALE FOR Y-AXIS7 O o y '__ _ _ _ — _ — — _ _ _ _ _ _ _ _ _ _ __..._ — _ _ „ _ _ _ _ —,_—,.»_:_,—,_ _ — _»-.__•_,»_:_:•.___ _ ^ _>_.__. — — «_«• — «-_

4000 CLS:LINE (B0,60) - (5B0,160),,B:LINE <1,1)-<63B,190),,B4010 LINE <100,50) - (520,60),,BF4020 LINE (500,60)-(520,150),,BF4030 LOCATE 23,14:PRINT " • Select with Space bar and prees 'B' to select"4040 LOCATE 10,17:PRINT " SELECT SCALE FOR Y-AXIS4050 LOCATE 11,23: PRINT " M * " * * * « " ' ' « » * * V M , * * W » » « , * M ,4060 LOCATE 15,20:PRINT "1> AUTO SCALE"4070 LOCATE 17,20:PRINT "2> USER SELECTABLE"4080 LOCATE 15,15iPRINT "«>"4090 A*«=INKEY«; IF (A* <> " ") AND (A* O "S") AND (A* <> "s"> THEN GOTO 40904100 IF A* =• " " THEN LOCATE 15,15:PRINT " "lLOCATE 17,15:PRINT "->"4110 IF (A* = "S") OR (A* • "s") THEN GOTO 42704120 A* » INKEY*: IF (A* <. > " ") AND (A* <> "o") AND (A* <. > "S") THEN GOTO 412C4130 IF A* = " " THEN LOCATE 17,15:PRINT " "IGOTO 40B04140 IF (A* = "s") OR (A* - "S") THEN CLS4150 LINE (1,1)-(630,190),,B:LINE (100,75) - (500,115),,B4160 LOCATE 13,19lINPUT "ENTER SCALE FOR Y-AXIS (A:B)-",AA*4170 AA=VAL(AA*>4180 WHILE LEFT*(AA*,1) <> " I "4200 AA$>=RIGHTS(AA*,LEN(AA*)-1>4210 WEND

14

Page 19: 1992 - inis.iaea.org

4220 AA*=RIGHT*(AA*,LEN<AA*>-1>4230 BB » VAL(AA*>4240 YSCALE =» AA/BB4270 RETURN4900 '4910 ' SUB-ROUTINE TO SET PARAMETERS FROM THE USER FOR4920 • PLOTTING THE INTENSITY VB WAVELENGTH GRAPH4930 '3000 CLS50)0 LINE (130,40) - (490,150),,B5820 LINE <120,35> - <50B,1S5>,,BS030 LINE (1,1) - (630,190),,B5040 LINE (10,5) - (620,18b),,BS045 GOSUB 135005050 LOCATE 7,24»PRINT "ENTER THE FOLLOWING PARAMETERS"5060 L O C A T E 8 , 2 4 : P R I N T »•*'•»'<••>""'«"»«••->••»•*•<">•"••<••<••<"<••>•«•'<••>••»«">.—>.*.••

5B70 LOCATE 12,25IPR1NT "1. NAME OF DATA FILEi"5080 LOCATE 12,501 INPUT "",F*5130 LOCATE 14,25:PRINT "2. X-SCALE FACTOR :"5140 LOCATE 14,501 INPUT "",MD5150 LOCATE 18,30:PRINT "ANY CHANGE? <Y/N)I"5160 LOCATE 18,501 INPUT "",YN1*5170 IF YN1* <>"y"AND YN1*O"Y" AND YN1*O"N" AND YNl*O"n" THEN GOTO 516B5180 IF (YNl*»"y"> OR (YN1*="Y"> THEN GOSUB 55001 GOTO 51S05190 GOSUB 30005200 RETURN5400 '5450 '5455 ' SUB-ROUTINE TO CHANGE THE ENTERED PARAMETERS IF REQUIRED5460 '5500 LOCATE 12,501 INPUT "",F1*JIF Fl*<>"" THEN F*-Fl*5530 LOCATE'14,50iINPUT "".PlDlJlF MD1O0 THEN MD-MD15540 RETURN

5980 '5985 — ROUTINE FOR THE BOXCAR AVERAGING MODE5990 '6400 GOSUB 116001GOSUB 13000:GOSUB 70006500 DEF SEG»S<HD00B6510 INITX»0:MYADDR"/.=0: I0P0RT'/.=S<H2BB: SETTING%=S<HD08B6520 OUTPUTX-3: ENTER*/.=6: REMOTE5t=336530 CALL INITV. (IDPORTV.,MYADDR*/.,SETTING1/.)6540 ADDR/.-236550 CALL REMOTE"/. (ADDRX)6560 MP=10iMD»100lO*»"MR"6570 CALL OUTPUT"/. (ADDRX,0*)6580 A*»"131Ma jS4=5.00;84=0.04"6590 CLS)LINE (1,1)-(630,190),,BxLINE (130,B0>-(500,100),,BlLINE (150,74)-(520,80),,BF6600 LINE (300,80)-(520,94),,BF6610 LOCATE 12,29:PRINT "PLEASE WAIT FOR DATA "6620 M=l •:C*=""PB2" " :KI= (6/<CNT)) I C*-"PB2"6630 D*="?l"6640 OPEN "o",#l,F*6650 CNT=0tCALL 0UTPUTX < ADDR"/., A*)

Page 20: 1992 - inis.iaea.org

66606670666066V06700671067206730674069006910692069J-.07000701070207030704070507060707070807090710071107120713071407150

71607170717271747176717B7100719072007210722072307450746074707480750075107520753075407550

T 1=TIMER:LE«=WLS FOR L=l TO (TR)CALL OUTPUT'/. < ADDRV., D*)RED*=»SPACE*(80>CALL ENTER7. (ADDR7. ,REDt)AVG=»VAL (RE D* > ISUM-SUM+ Z i A VG- < SUM/SM)T2»T1MER:KI=«(T2-T1>*R» IF SBN(REV) » -1 THEN WL-LE-KI ELSE WL - LE+KIWRITE #1,WL,AVGT3=TIMER:IF T3-T1 <=• (B/R) THEN GOTO 6670CLOSE #1:GOSUB 80001COSUB 319001 GOTO 770

-SUB-ROUTINE TO ENTER PARAMETERS FOR-BOXCAR AVERABINB

LlNEd ,1)--<630,190) ,,BLINE (130,10>-(5B0,190>,,B:LINE (1S0,1>-(520,10),,BFLINE <500,10)-<52B,170>,,BFLOCATE 4,20:PRINT " Enter th» following parameter*LOCATE 9,22tPRINT "1. DATA FILE NAME I"LOCATE 13,221 PR I NT "2. SCAN RATE (NM/SEC)

3. STOP WAVELEN3TH <NM)"4. START WAVELENSTH (NM)

: "t ": "

LOCATE 21,22:PRINTLOCATE 17,22:PRINTLOCATE 9,53:INPUTLOCATE 13,53:INPUT "",RLOCATE 17,53:INPUT "",WLSLOCATE 21,53:INPUT "",WLFG=AB5<WLF-WLS>:REV = (WLF-WLS) 'ITR«P»<1/R>«G:LOCATE 22,42tPRINT TRLINE (176,22)-<447,41),,BF:LOCATE 4,30:PRINT "ANY CHANGE <y/n>?"LOCATE 5,26:PRINT "If YES retyp* all p*ram»t«rs"YN*=INKEY*: IF YN*O"n n AND YN*O"N" AND YN*O"y" AND YN*O"Y" THEN GOTO 71'

IF YN*="y" OR YN*«="Y" THEN GOSUB 7180:GOTO 7130RETURN

—SUB-ROUTINE TO CHANGE THE ENTERED PARAMETERS-IF REQUIRED

LOCATE 9,53:INPUT "",F1*:IF Fl*<>"" THEN F*=F1*LOCATE 13,53: INPUT "".RljIF R1O0 THEN R-RlLOCATE 17,53: INPUT "'\WLSliIF WLS1O0 THEN WLS-WLS1LOCATE 21,53:INPUT "",WLF1:IF WLF1O0 THEN WLF-WLF1G=ABS(WLF1-WLS1):REV = (WLF1-WLS1)RETURN

-SUB-ROUTINE TO COLLECT THE PARAMETERS REQUIRED-F0F; DISPLAYING THE DATA

CLSrGOSUB 13600LINE (130,40) - (490,150),,BLINE (120,35) - (500,155),,BLINE (1,1) - (630,190),,BLINE (10,5) - (620,185),,BLOCATE 7,24:PRINT "ENTER THE FOLLOWING PARAMETERS"

IB

Page 21: 1992 - inis.iaea.org

NAME OF DATA FILEi"7560 LOCATE B,24sPRINT "">-">'•'7570 LOCATE !2,25tPRINT "1.75B0 LOCATE 12,50:INPUT "",F*7590 LOCATE 14,25iPRINT "2. DISPLAY FACTOR7b00 LOCATE 14,S0tINPUT761 a LOCATE 18,308 PRINT

THEN GOTO 7620)

-SUB-ROUTINE FOR VERTICAL DISPLAY-

'•",MP"ANY CHANGE? (Y/N)»"

7620 LOCATE 18,30!INPUT "",YN1*7630 IF YN1* <>"y"AND YN1*O"Y" AND YN1*O"N" AND YNl*O"n"7640 IF <YNl*»"y") OR <YN1*="Y" ) THEN (3OSUB 77S0:QOTO 76107645 BOSUB B0007646 LINE <175,160>-(4B5,190>,.BtLINE (169,165)-(475,195),,BF7647 LOCATE 23,26tPRINT " Want to continue? (y/n)I"7646 LOCATE 23,51l INPUT "" , YEN1*I IF YENl*O"y" AND YEN1*O"Y" AND YENI*O"n" ANDYENl*v>"N" THEN GOTO 7648

7649 IF YEN1* «• "n" OR YEN1* » "N" THEN CLOSE #li BOTO 8207650 CLS : GOTO 90007750 LOCATE 10,301 INPUT "",Fl*iIF Fl*<>"" THEN F»-F1»7760 LOCATE 16,50« INPUT "",MPUJF MD1O0 THEN MD-MD17770 RETURN7900 ' *•791079208000801080208030SB40P.050807080808090010081 1081 1581208130814089509960897090009010902090309040905090609070908090909100

M=1:OPEN "i",#l,F*CLSiWHILE NOT EOF(l):INPUT #1,WL,AVGY=1+INT(ABS(AVG)«(MP))IF M>24 THEN M=24LOCATE M,YPRINT USING " + *#i»#tt. «#«#•» *";WL,AVGM=M+1:WENDLINE <175,160)-<485,190>,,BLINE (165,165)-<475,195),,BFLOCATE 23,27iPRINT " Want to Bee again?(y/n)I"LOCATE 23,52:INPUT "",YEN*IF YEN*O"Y" AND YEN*O"N" AND YEN» <>"y" AND YEN*O"n" THEN SOTO 8110IF YEN*='V OR YEN^c-'Y" THEN CLOSE tliGDTO 8000CLOSE #1RETURN

-SUB-ROUTINE TO CHOOSE BETWEEN GRAPH AND DISPLAY-

CLS:LINE (1,1)-(630,190),,BLINE <5,3>-(&25,lB3),,BCIRCLE (450,50),120,,,,3/18LOCATE 7,45«F-RINT "PRESS SPACEBAR TO MOVE ->"CIRCLE (160,145),120,,,,3/lQLOCATE 19,lltPRINT "PRESS 'S- TO SELECT"CIRCLE (150,65),110CIRCLE (150,65),105CIRCLE (460,130),110CIRCLE (460,130),105LOCATE 9,17:PR INT "GRAPH"

Page 22: 1992 - inis.iaea.org

7110 LOCATE 17,55:PRINT "DISPLAY"^120 LOCATE 9,14:PRINT "«>"9<:\(fl A»=INkE.V* 1 IF A*<>" " AND A* <> "»" AND A* <> "S" THEN BOTD 91309140 IF A*=" " THEN LOCATE 9,14sPRINT LOCATE 17,S2lPRINT "->"9150 IF A*="S" OR A*="s" THEN GOSUB S000:6OTO 92009160 A*»INKEV*i IF A*<>" " AND A*<>"»" AND A*<>"8" THEN GOTO 91609170 IF A*=" " THEN LOCATE 17,52|PRINT " "iGOTO 912091B0 IF A*="S" OR A*-"s" THEN GOTO 100009200 LINE <175,160>-(485,190> , ,B»l.INE U63, 163) - (475,195) , ,BF9210 LOCATE 23,26iPRINT " Want to continue? <y/n>«"92".0 LOCATE 23,51i INPUT "",YEN1*|IF YENl*-"n" OR YEN1*-"N" THEN CLOSE WlsGOTO 6209240 CLSiSOTO 90009950 •9960 ' SUB-ROUTINE TO CHOOSE BETWEEN9970 HORIZONTAL AND VERTICAL DISPLAYS

10B00 CLS: LINE (13(3,40) - (490,150) , ,BlLINE (120,33) - (300,155) , ,B1001(3 CIRCLE (220,97) ,6010020 CIRCLE <400,97),6010030 LOCATE 8,32:PRINT "CHOOSE BETWEEN"1BCI40 LOCATE 12,25:PRINT "VERTICAL"108)50 LOCATE 13,25sPRINT "DISPLAY!" t LOCATE 13,39tPRINT "S."10060 LOCATE 12,46:PRINT "HORIZONTAL"10U70 LOCATE 13.47JPRINT "DISPLAY!"100B0 LOCATE 11,28:PRINT "•"10085 LINt (1,1)-(630,190),,B:LINE(1,170)-(630,171>,,BFlLINE<1,187)-<63B,IBB),,EFJ0088 I OCATE 23,2:PRINT " Pre»» space bar to move # 'E

to select the mode "10090 J*=INKEY»JIF I*-"" THEN GOTO 1009010100 IF I*="S" OR l*~"z" THEN GOTO 7500 ELSE LOCATE H,2BlPRINT » "iLOCATE 11,50:PRINT "•"10110 I*=INKEY»iIF I»«"" THEN GOTO 1011010120 IF I*="S" OR I*»"s" THEN GOSUB 10500 ELSE LOCATE 11,5B|PRINT " ":GOTO 10C8010130 GOTO 5200l lMi. t f l •10460 ' SUB-ROUTINE TO DISPLAY THE DATA IN THE FORM OF A TABLE

105013 CLS: LINE (165,85)-(473,115) , ,BtLINE (1,1) - (630,190) , ,B10510 LOCATE 13,25:PRINT "NAME OF DATAFILE :"10520 LOCATE 13,43iINPUT "",Ft105T.0 CLS: OPEN " I" ,«1 ,F*: N=l1Q540 WHILE NOT EOF<1)1 0 5 5 0 L O C A T E 1 , 2 7 : P R I N T " S C A N D A T A "10560 FOR M=2 TO 2010570 INPUT #1,WL,AV6105B0 LOCATE M.NjPRINT WL,AVS1(8590 IF EOF(l) THEN BOTO 1064012600 NEXT M

te

Page 23: 1992 - inis.iaea.org

10610 N=N+2510620 IF N=51 THEN GOSUB 11000106 30 WENDI0t,50 LINE U75,16I3>-<485,190> , .BJLINE (165,165) - (475,195) , ,BF1066(2) LOCATE 23,2/sPRINT " Want to see again? <y/n>i"

",Y#:IF V*O"n" AND Y*O"N" AND Y*O"y" AND Y*O"Y" TH10670 LOCATE 23,52iINPUTEN GOTO 1067010680 IF Y*="y" OR Y*»"Y" THEN CLOSE fllsGOTO 1053010690 CLOSE KltSOTO 77010959 '10960 ' SUB-ROUTINE TO ASK FOR MORE DATA10970 •11005 LINE (1,170)-(630,171),,BFtLINE (1,187)-(630,188),,BF11007 LOCATE 23,27:PRINT " Type 'm' -for more data "11008 I*=INKEY*tIF It-"" THEN GOTO 1100011010 IF I*»"m" OR I*="M" THEN CLS|N«111020 RETURN11440 •11450 • SUB-ROUTINE TO PROVIDE PROMPTS FOR COMPUTER AVERAGING11460 '11500 CLSsLINE (1,1) - (630,190),,B11510 LOCATE 5,20:PRINT "PLEASE MAKE THE FOLLOWING HARDWARE CONNECTIONS"11520 LOCATE 6,20:PRINT "~~~~~~~~~~~~~~~~~~~~~~~~~">''>''*~~~~~~~'v~'>'~~~'v~~~'>."11530 LOCATE 10,10:PRINT "1. Connect the Bit Ports 81 and B2."11540 LOCATE 12,10iPRINT "2. Connect the SR250 Last Sample output to analog port 1 o-f SR245. "11550 LOCATE 14,101 PRINTrol part >"11560 LOCATE 16,10lPRINT11570 LOCATE 18,l0sPRINTt o-f SR250. "11575 LOCATE 22,241 PRI NT11530 A*=INKEY*tIF A*=""11590 RETURN1159? '11594 • —11596 '--

"3. Connect analog port 4 of SR245 to Dye Laser's cont

"4."5.

Connect Laser Trigger to trigger input of SR250."Connect the Spectrometer signal to the signal inpu

"'PRESS ANY KEY TO GOTO MAIN MENU"THEN GOTO 115B0

-SUB-ROUTINE TO PROVIDE PROMPTS FOR BOXCAR AVERAGINQ-

11600 CLSsLINE (1,1) - (630,190),,B11610 LOCATE 5,20JPRINT11620 LOCATE 6,20:PRINT11630 LOCATE 10,10|PRINTo* SR245."11640 LOCATE 13,10:PRINTrol port."11650 LOCATE 16,10sPRINT11663 LOCATE 19,10|PRINTt o-f SR250. "11665 LOCATE 22,24jPRINT11670 A*=INKEY*iIF A*-11 "11690 RETURN

"PLEASE MAKE THE FOLLOWING HARDWARE CONNECTIONS"

"1. Connect the SR250 Averaged output to analog port 1

"2. Ccr.nect analog port 4 of SR245 to Dye Laser's cont

"3. Connect Laser Trigger to trigger input of SR250.""4. Connect the Spectrometer signal to the signal inpu

"PRESS ANY KEY TO GOTO MAIN MENU"1

THEN GOTO 11670

te

Page 24: 1992 - inis.iaea.org

11V40 '11950 ' SUB-ROUTINE TO PROVIDE PROMPTS FOR COMPUTER AVERAGING11960 '12000 CLS:LINE (3,2)-(125,60),,B12010 LOCATE 3,4:PRINT "1. Type the":LOCATE 4,4:PRINT "data file":LOCATE 5.4:PRNT "name."12020 LOCATE 7,4:PRINT "( *.dat >12030 LINE (3,62)-(125,122),,B12040 LOCATE 10.4:PRINT "2. Type the"jLOCATE U,4iPRINf "rate at":LOCATE 12,4:PlINT "at which"12050 LOCATE 13,4:PR1NT "grating is"»LOCATE 14.4:PRINT "moved."12060 LINE <3,124)-(123,J84),,B12070 LOCATE 18.4:PRINT "3. Type the"«LOCATE 19,4:PRINT "nuitiber of":LOCATE 20.4:PRINT "samples tobe"12OB0 LOCATE 21.4:PRINT "averaged.":LOCATE 22,4iPRINT "( say 1O >"12090 LINE (525.2)-(625,60),,B12100 LINE (525,62)-(625.122),,B12110 LINE (525.124)-(625,184),,B12120 LOCATE 3.68:PRINT "4. Type the"iLOCATE 4,68lPRINT "wavelength"tLOCATE 5.6t:PRINT "at which "iLOCATE 6,68iPRINT "the scan-jLQCATE 7.6B|PRINT "starts"12130 LOCATE 10,6B:PRINT "5. Type the":LOCATE 11.6BiPRINT "wavelength":LOCATE V..681PRINT "at which "sLOCATE 13,68:PRINT "the scan":LOCATE 14,68:PRINT "stops"12140 LOCATE 17.6B.-PRINT "6. Type the":LOCATE 18,68lPRINT "command in":LOCATE lc

,68:PRINT "specified"tLOCATE 20,68tPRINT "format."iLOCATE 21.6B|PRINT "( Type":lOCATE 22,681 PRINT "sclslO >"!2150 RETURN

12994 ' SUB-ROUTINE TO PROVIDE PROMPTS FOR BOXCAR AVERAGING1 ». . T fa ' ~ — — — — — — — — — —— — — — — — — — — —— — — — — — —— — — ——— ____—_— -.__- — »•__.— .-__. ____— __—__13000 CLS:LINE (3,2)-(125,90),,B13010 LOCATE 4,4:PRINT "1. Type the"zLDCATE 5,4:PRINT "name of the":LOCATE 6.4.-FRINT "data file"13020 LOCATE 7.4:PRINT "to Etore":LOCATE 8.4:PRINT "the data.":LOCATE 1O,4:PRIN1"< *.dat )"

13030 LINE (3.92>-(125.184),,B13040 LOCATE 16.4:PR1NT "2. Type the"iLOCATE 17,4sPRINT "rate at":LOCATE 18,4iPFINT "at which"13050 LOCATE 19,4:PRINT "qratinq is"iLOCATE 20.4:PRINT "moved."13090 LINE (525,2)-(625,90),.B13100 LINE (525.92>-(625,184>,,B13120 LOCATE 5,68:PRINT "4. Type the":LDCATE 6,6B«PRINT "wavelength":LOCATE 7,tE:PRINT "at which ":LOCATE 8.68:PRINT "the scan"tLOCATE 9.6BrPRINT "starts"13130 LOCATE 16,6B:PRINT "5. Type? the":LOCATE 17,68:PRINT "wavelength":LOCATE \t.o8:PRINT "at which "iLOCATE 19,68!PRINT "the scan"iLOCATE 20.68iPRINT "stops"1?. 14i.i RETURN1 3440 '13450 ' SUB-ROUTINE TO PROVIDE PROMPTS FOR PLOTTING THE GRAPH

13500 LINE(15.40)-(115.150)..B13510 LINE (510,40)-(615.150),,B

2O

Page 25: 1992 - inis.iaea.org

1 3520 LOCATE 9.5:PR1NT "l.Tvne the": LOCATE 1O.5:PRINT "name o-f": LOCATE 11.5:PRIh1 "the tile":LOCATE 12.5:PRINT "from which":LOCATE 13,5:PRINT "data has":LOCATE14.5:PRINT "to be ":LOCATE 15.5:PRINT "piotted.":LOCATE 17,5:PRINT "( *.dat )"13530 LOCATE 9,6/:PRINT "Z. This ":LOCATE 10.67:PRJNT "-factor" r LOCATE 11.67:PRIM1"is used to":LOCATE 12,67:PRINT "mark the":LOCATE 13.67:PRINT "points on":LOCA"l

E ]4.67:PRINT "x-axis.":LOCATE 16.67:PR1NT "(Tvpe 100)"13540 RETURN

13550 ' SUB-ROUTINE TO PROVIDE PROMPTS FOR VERTICAL DISPLAY

13600 LINE(15,40)-<115.150),.B13610 LINE (510.40) -(615.150).,B13620 LOCATE 9,5:PRINT "l.Type the":LOCATE 10.5:PRINT "name of":LQCATE 11.5:PRIf>T "the file":LQCATE 12.5:PRINT "from which":LOCATE 13.5tPRINT "data has":LOCATE14.5:PRINT "to be '^LOCATE 15.5:PRINT "di spl ayed. " :LOCATE 17,5:PRINT "( *.dat )"13630 LOCATE 9.67:PRINT "2.This ":LOCATE IO,67:PRINT "factor":LOCATE 11,67:PR1N1"is used to":LOCArE 12,67:PRINT "bring the":LOCATE 13,67:PRINT "display ":L0CAI

E 14,67:PRINT "within tne": 1..JCATE 15.67:PRINT "screen. ": LOCATE 17.67:PRINT " (Type 10) "13640 RETURN

13650 ' SUB-ROUTINE TO PLOT THE REVERSE SCAN DATA

14000 XRANGE=G : XSCALE=530/XRANQE:XPT1=O14010 SCNTR=CNTR:XPT1=O:K=114020 FOR N = 1 TO CNTR/514030 FOR I = 1 TO 10 STEP 214040 VA = ( (ARR (N. 1 + D-PS1) *YSCALE)14050 IF K M AND ARR(N.I) :• W5U THEN LAST X=97jLA5TY=125-VA14060 IF <K s 1) AND ARR (N,I) <= WSU THEN XPT1 = XPT1 + (XSCALE * (ABS(ARR(N,I)-F1))>:PT = 97 + XPT1: LINE (LASTX,LABTY)-<PT,125-VA):LASTY=125-VA:LASTX=PT14070 IF ARR(N.I) <= WFU THEN GOTO 1415014080 IF K = 1 AND ARR(N,I)<= WSU THEN LAST* = 97:LAETY=125-VA:LOCATE 17.7:PRIN1USING "###.###":ARR<N.I)14090 IF K=l THEN LASTX=97:LASTY=125-VA14100 XPT2=K MOD MD14110 IF XPT2 = 0 AND ARR(N,I> <,= WEU THEN PSET (PT. 124) : PSET (PT. 123) : LOCATE17.7+INT <XPT1/S):PRINT USING "#»#.#»«" :ARR (N.I) ':IF ARR(N,I)=WLF THEN GOT

O 34-3014120 K = K*-1:F1=ARR(N, I>14130 CNTR = CNTR-1: IF CNTR = 0 THEN GOTO 1415014140 NEXT I : NEXT N14150 LINE (236.166) - (417,176).,B14160 LOCATE 22,32:PRINT " Spectrum of SODIUM "14170 AS=INKEYS:IF A*="" THEN GOTO 1417014180 CLOSE #114190 LOCATE 23.114200 RETURN4 rt"^(")j") -•" _ _ , _ _ _ _ _ , _ _ . _ _ . _ _ . ™.— _ — _ _ — _ _ - _ _ — - _ , _ _ _ _ _ _ _ _ _ -^—___—«.— «• _••_-»___.-.__

14400 ********************** END OF PR06RAM ft******************************

21

Page 26: 1992 - inis.iaea.org

Mioro-Prooessorbased so«ncontrol

DVE LASER

EXCINER LASER

Start Sc*n

LASER

ENHANCED

IONISATION

SPECTROHETER

OPIB CONTROLLER

<IBM PC WITH GPIBPCL-B48 CARD)

ICOMPUTER

INTERFACE NODULE

< SR 245 >

tBOXCAR INTEQRATOR

< SR 2 3 0 >

F i ± . Bloolt Soh*M*tii -bi on S wEnhancvd

o f ±,Tt

Page 27: 1992 - inis.iaea.org

Oat*output

To««l*

output

Valid <H-i> $anpl»Last thSanpl*

Output

•ot

Invalid

«osv

Valid N Sanpl*

blav

* T >•oao

tor 2 miosr O i •orrat

Page 28: 1992 - inis.iaea.org

SaTl^cquTsTTT^f^yste^TorTIIET^pecTrosco'p^

1, COHPUTER AVERAGING2. BOXCAR AVERAGING3. DATA PROCESSING4, QUIT

"PRESS SPACE BAR TO HOVE : 's ' to select the iteit

R I G 3 - M a t i n M e n u

Page 29: 1992 - inis.iaea.org

1. Iype thedata t i l enane.

( *.dat )«

2, Iype therate atat whichgrating isMoved.

3. lype thenuMler ofsaMples tobeaveraged.( say 18 )

^ • • • • • • • • • • • 1Ente r the fol lowing parameters

1. DATA FILE NAME : Naf2.dat

2. SCAN SATE (NN/SEC) ', .01

3 . NO, OF SAMPLES : 18

4. START UAIIELENGIH (KM) : 588,8

S, STOP UAUELENGTH (NH) 1 589.2

6. SCAN COHN ISCx lSawles ] : s c l l l S I 1

4. Type thewavelengthat whichthe scanstarts

5. Type thewavelengthat whichthe scanstops

6. lype thecoMMand inspecifiedfornat.( lyyescl:lB )

F I G Sub—menu -to * r» -t(f o r CoMpu-t» r ft «-» «

pa.ra.M

-AST i r» gr .

Page 30: 1992 - inis.iaea.org

1, Type thenawe of thedata fileto storethe data,

( *,dat )

2, Type therate atat whichgrating isMoved.

pm

i ,

2,

3,

4,

wmmmmammmm- Enter the f o l l o w i n g para«e ter s •

DATA FILE NAME

SCAN RATE (NH/SEC)

START WAVELENGTH (NH)

STOP WAVELENGTH (NH)

•••

: Nalf2.dat •1: .91 I

1: 588.8 ••I•: 589.2 | •

! l

4, I we thewavelengthat whichthe scanstarts

5, Type thewavelengthat whichthe scanstops

FIG 5 . Sub—Menu "tof o r Boxcar A

Page 31: 1992 - inis.iaea.org

r=- i - €> . Sub~M»n u -toand D

• 1 e e tom -fcuj»»n

Page 32: 1992 - inis.iaea.org

vt

ITS

171CHJ

001H

01ill •

ito -H

+> x

C I01I X

CO

•H

li

Page 33: 1992 - inis.iaea.org

SELECT SCALE FOR V-ftXIS

:> i> AUIO SCALE

2> USER SELECTABLE

* Select with Space lap and press 's' to select

i gr. 7 b . Su.t>—ci e» rt u. -to

For- V — m.x i

Page 34: 1992 - inis.iaea.org

l.Type thename ofthe filef?OM whichdata hasto beplotted.

( ft.dat )

1. NAME OF DATA FILE: Naf2.dat

2. H C A L E FACTOR ; 188

ANY CHANGE? (Ml): n|

2,Thisfactoris used tonark thepoints onx-axis.

(Type 188)

F ig . S Sut»— iwi

f* o x~ c3Lcji -to e n

ui i r» or -fcl-»

Page 35: 1992 - inis.iaea.org

CHOOSE BEIUEEN

/ HORIZONTALDISPLAY?

\

Press space lap to Move # 's' to select the Mode

S LJ. fc>—ivt e r» i_ii -fco

1 ay .

Page 36: 1992 - inis.iaea.org

1. VERTICAL

Z. HORIZONTAL

1. INITIALISE PORTS8. TR1QOJER BCAN3. SET ft ENABLE THE

TRIQOER rOR THECOUP. INTERFACENODULE

4. SCAN I/P FORT 15. STORE THE DATA

IN A FILE,DISPLAY ft PLOT

M Q I N M E N U

1. COMPUTER AVERAGING

2. BOXCAR AUERAOIHO

3. DATA PROCESSING.

4. QUIT

1. OBftPH

2. DISPLAY

1. BCAN THEDATA FILE

3. COLLECTPARANETERS

SELECT V-SCALE1. AUTOS. UBER BELECTABLE

PLOT THE ORAPHWAVELENGTH

Vs.INTENSITY

PAB6 THECONTROL TO

DOS

COLLECT V-SCALE

FRON THE UBER

1. INITIALISE PORTS

2. TRIGGER SCAN

3. NEASURE THEVOLTAQE ATANALOO INPUTPORT 1

4. STORE, DISPLAY ftPLOT THE DATA

F I G 3- 0 . Bloolt dL i th«

Page 37: 1992 - inis.iaea.org

\

Si

COCO

C O

«•—s

0 d -dH C0 tiA £

4> XC -H

•H 3 f.0

C t <H1 tirf 0 C<i I o$ -H

! c &d -H o(. in^ « iio (, Hn <A D O

(0 (£ M

to•H

ll

Page 38: 1992 - inis.iaea.org

£•4

0M

(. U4 t 00 B -PX 3 30 <

c•H 3 •

C • 4Ol TJ 0

:^ X

&? c TJ

u a ̂

ft I Hft } Ito t •

Nrl

ti•H

It

Page 39: 1992 - inis.iaea.org

COCO

C O

0M

Xu u4 1 00 l ^ >X D j0 4n ̂C "H

- 3 •H

C M(HOP! 0 I< S

H

(< ill 4>HO0 (< •I I HP. > I

to <r M

i

n

Oi

IL

Page 40: 1992 - inis.iaea.org

Eat)

2!

AS00

CO CO CO CO i

c t• -d4 0

ft

5 C

d a

o u• iP. >to a

n•

ti

IL

Page 41: 1992 - inis.iaea.org

oa

oi

ut >

3 10ft i ^

0 «

* 3 •[HI TJ 0ni

* xft

I c tiU ft 4»+> « 0O l * lI I Hft > •to <r i

nrl

ft

Page 42: 1992 - inis.iaea.org

ui0X00)

ae C

c1

JJu01Pi(0

3

0

3iTJ0S

c

Hi

(,1>

c

0

c40II »

coCO4

in•H

y.

•w:

Page 43: 1992 - inis.iaea.org

Xf>

S3 ^i crs

II

uU I1 >0 •X K0m ̂ n

^ cC -H -H

•x 3 •>

c i f<A 0

! C

d a o

o d eI I 4a > o

CO <E H

i•H

u.

Page 44: 1992 - inis.iaea.org

AIPIPEINIDOK 1

Routine

ABORT

DEVCLR

DEVICE

ENTER

ENTERA

EOL

INIT

Offset Parameters

None

15

57

51

12

0

ADDR7.

ADDRX,PORT%

ADDR'/.,D*

ADDR%,LENGTH*DATASEGJC

ADDR7.,0UTE0LV.OUTEOL*,INEOLXINEOLBVTEX

IOPORTV., MYADDRXSETTING*

Activity

Aborts all bus

activity by pulsingthe IFC line.

Device clear orselective deviceclear.

Replaces an LPTn:or COMn: port withan IEEE-488 device.

Enters the datafrom a dvice.

Enters a long stringfrom a device.

Sets the terminatorsof input and outputstring of a device.

Initialises theinterface and setsparameters.

LLO

LOCAL

OUTPUT

OUTPUTA

PPOL

PPOLLC

PPOLLU

REMOTE

18

21

3

54

24

27

313

33

None

AODR'/.

ADDR-/..D*

ADDR7. , DATASEG7.LENSTHX

RESPONSE*/.

ADDR7.,C0NFIB7.

ADDR7.

ADDRV.

Local Lockout.

Sets a device tolocal mode orreleases the REN line

Outputs data to adevice.

Outputs a long stringof data to a device.

Parallel Poll

Parallel PollConfigure

Parallel Poll(Jnconf igure.

Sets a device toremote mode and setsthe REN line.

Page 45: 1992 - inis.iaea.org

...Appandix 1 continuad

SEND 36 CMD*

SPOLL

STATUS

TIMEOUT

TRIGGER

ERRPTR

39

42

49

46

60

ADDRX, RESPONSE'*

CONDITION*,8%

TX

ADDRX

IOERRXIOCOUNTX

Sands tha IEEE-488

nntnoni cs commandsto tha bus.

Sarial Poll

Roads tha status oftha intarfacs.

Sats timaout intarval

Triggars a davica ordavices.

Assign variablas -formrror number andcount of stringbytas.

***••*•**•**

Page 46: 1992 - inis.iaea.org

AIPPEINIDOX 2

INPUT / OUTPUT COMMANDS;

1. Kn> n « 0 to 8 Designates the first n analog ports as

inputs, the remainder become outputs. Default is IB.

2. ?<n> n = 1 to 8 C 73,?5 ...1 Returns the value of the

designated analog port.

3. ?B<n> n-1,2 C7B13 Returns the value (0 or 1) of the

designated port.

4. ?D Returns the value of the internal 8 it digital input

port.

5. ?S Returns the value of the status byte, and clears the

status byte.

6. C Configures B2 as ab input and resets the B2 counter.

7. ?C Returnsa the number of pulses occurring at B2 since the

previous C.

B. S<n> - <x> n * 1 to 8 | x > -10.237 to +10.237

[ S8 • 6 or S2 • -41.SE23 Sets analog port n (which must be

designated as an output) to the value x Volts. x may also be

expressed in exponential format with a two digit exponent

preceded by an E.

9. SB<n> • <M> n * l o r 2 > m « 0 , l CSB1 • 13 Designates

digital bit n as output and sets its value to TTL low if m=0

or high i f m»1.

10. SB<n> • I n = 1,2 CSB2 • 13 Designates the selected bit

as an input.

11. SD • <n> n = 0 to 255 CSD a 1283 Sets the 8-bit digital

output port to the value n.

Page 47: 1992 - inis.iaea.org

...Appendix 2 continued

12. SM<n> n - 0-255 CSM • 103 Sat« the SPIB 3RQ mask to the

valua n.

TRIGGER COMMANDS!

13. MS Sets tha synchronoua mod*. Responses to ? commands are

raturnad immadiataly after tha next triggar.

14. MA Sats tha asynchronous moda (default). Rasponsas to ?

commands ara raturnad right after tha command is racaived.

15. T<n> n • 1 to 32,7767 CT33 Dasignatas avary n th pulse at

Bl as a triggar.

16. DT Masks tha tigqer input so that no triggers are

recognised.

17. ET Unmasks the trigger input.

18. PB<n> n=l,2 CPB23 Outputs a lBpsec TTL pulse at bit port n.

19. P/<n> n - 1 - 255 CP/3] Outputs a 10 psec TTL pulse at

B2 each nth trigger.

SCAN COMMANDS!

20. SC<lXk>t<n> i,k » 1-B,D CSC1,3,DsSOO] Scans the list i ,k

of analog ports or digital port -for n triggers. Total # of

samples may not exceed 3711.

21. ES End the current scan immediately and reset the point

sending counter.

22. N Send the next point of the stored scan.

23. ?N Returns the # of points scanned.

24. A<n>,<l> n-l-255;i-1-255 CA 10,23 Adds n x 2.5 mV to the

value of the analog port 8 (must be a positive output) on

every ith trigger.

Page 48: 1992 - inis.iaea.org

...Appendix 2 continued

25. SS<i>,<k>:<n> i,k=l-B,D CSS1:1O3 Scans the list i,k of

analog ports or digital port -for n triggers. Data is sent in

a 2 byte binary -format while the scan is in progress.

26. X Sends the data of a stored scan in 2 byte binary -format.

MISCELLANEOUS COMMANDS:

27. MR Master Resat. Returns the SR 24S command settings to

their default values.

28. W<n> n = 0-255 Introduces a delay of approximately n x

400/Lisec before sending each character over the RS232.

Default is W255. Allows slow peripherals to keep up.

29. Z<i><lc> CZ13,133 Changes the end-of-record characters sent

by the SR 245 to those specified by the ASCII codes, i...k.

Page 49: 1992 - inis.iaea.org

Published by : M. K. Balakrishnan Head. Library & Information Services DivisionBhabha Atomic Research Centre Bombay 400 085