0% found this document useful (0 votes)
575 views57 pages

CD2AB Controller

Uploaded by

nerd12345672
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
575 views57 pages

CD2AB Controller

Uploaded by

nerd12345672
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

===========Instructions===========

CD2A-B [Link]

Contents

' .... "

INTRODUCTION ..............................•........... ' .•... , ..............•.•..

2 UNPACKING AND INSTALLATION .................• .': " .;. ~ .: >;'.; .

3 OPERATION ..................................• , ...•••. , .• ~ •. , ~ .', ~ ., ..... , .

.; _._ ...

Page No.

3 5

3.1 Keyboard , ,........................ 5

3.2 Start-up ,........................................................ 5

3.3 Numerical-entry Key Group .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.3.1 3.3.2 3.3.3

EXAM Parameters ' .

CLEAR Display .

ENTER Value .

6 6 6

3.4 PARAMETER Key Group.. . . .. . . 7

3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.4.10 3.4.11 3.4.12 3.4.13

1/84

START POS ........................................•......... ' .

END POS .

INC/RATE .

DWELL TIME .

REP SCAN : .

SCAN DELAY .

LASER LINE .

SHUT HI/LO ' .

RECORD ON , , .

RECORD SCALE .

MARKER ON .

MARKER PERIOD ~ .

REMOTE (RS232) .

[Link] Configuration Parameters .

[Link] Input/Output Sequences .

[Link] Datalogger Output .

[Link] Standard Output , .

[Link] Input Format .

[Link] Parameter Input. Format. .

[Link] Command Formats .

[Link] Error Reporting .

[Link] Hardware Notes .

[Link] USER Programs .

7 7 7 7 7 7 7 8 8 8 8 8 8 9 9

14 14 14 14 15 15 15 16

3.5 MODE Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 17

3.5.1 3.5.2 3.5.3

CONT or BURST .

CONFG (Configuration) .

CAL (Calibrate Spectrometer Position) ' .

3.6 COMMAND Keys

17 17 17

17

3.6.1 SCAN Spectrometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '7

3.6.2 TRIG SCAN (External Trigger Required) : ' ' 18

3.6.3 SET Spectrometer Position 18

3.6.4 PAUSE Before Next Scan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.6.5 HALT All Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.7 Manual ADJUST and Limit-Switch Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 18

3.8 STATUS LINE Output to Peripherals " . . 19

3.9 Trigger Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 CONFIGURATION.................................................................. 21

4.1 CD2A Configuration Table ' " 21

4.2 Changing Gratings and Spectral Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 24

5 ERROR HANDLING 25

6 SPECIFICATIONS AND PIN LOCATIONS............................................... 27

6.1 SPECIFICATIONS.............................................................. 27

6.2 PIN LOCATIONS 28

6.2.1 CD2A Rear Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 28

6.2.2 Mini-step Driver (MSD) . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 29

6.2.3 Large-step Driver (LSD) 29

6.3 MSD Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6.3.1 LIMIT OPTION ,................................................... 30

6.3.2 STEP, STEP '..... . . .. 30

6.3.3 DIRECT OPTION 30

6.3.4 SHUTTER OPTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6.4 Technical Note 0-3 - External Control Over COMPUDRIVE Through RS232 . . . . . . . . . . . . . 31

7 INDEX........................................................................... 34

1 INTRODUCTION

The SPEX COMPUDRIVE (CD2A) hands you total keyboard control over your spectrometer/recorder drive system. Not only does it repeat scan over the spectral regions you define, while the stripchart recorder tracks faithfully along, but it also outputs the spectrometer position and scan status, at the same time accepting trigger inputs, so you can easily tie it into a dialog with your detector electronics or computer.

~

/los you might expect, the key to CD2's poII'Jer is flexibility. Drive your spectrometer manually, or slew automatically with a SET command. CD2's translator/drive gives you a step resolution decidedly finer than previously available. Scan continuously, or in bursts, or even latch data acquisition into your system with those external triggers to begin scans, or govern the length of the dwell between burst increments. All the while, CD2A updates its LED display so you know at a glance just where the spectrometer happens to be, no matter if you change

gratings, spectral order, or swap a Wavenumber for a waVelength spectrometer. A few keystroke modifications of CD2's configuration table are all you need before you're on your way taking data. Scan, start, end, rate, repetitions, delay between repetitions, recorder scale, and marker frequency are all programmable. Close and open.a shutter for laser-Raman PMT protection or tell an external device to flick a filter in and out of the beam at certain points in the scan. And if you do make a mistake, C02's error detection pinpoints its source.

Once C02 is out of its crate and hooked to your spectrometer as explained in Section 2, you can start operating immediately by following the step by step getacquainted instructions in Section 3. Section 4 details CD2's configuration table, while error codes are listed in Section 5.

Or you can link CD2A to your computer for two-way communication by following the instructions in Section 3.4.13.

1

2 UNPACKING AND INSTALLATION

Unwrap your C02 and save the packing material for possible future use or for inspection by the carrier should you uncover any damage. Carefully inspect both drive unit and keyboard console for any damage. If you find any, notify the carrier immediately.

Position the drive unit near the spectrometer and the keyboard console in a convenient location where airflow to its rear panel is not restricted. Unfold the wire kickstand on the floor of the console if)tou wish.

Connect the short, D-shell cable between MONO OUTPUT on the drive unit and the receptacle on the rear of your spectrometer. Now run the long ribbon cable

between the CONTROL INPUT connector on the translator drive and MONO DRIVE on the rear panel of the C02 console.

Connect RECORDER, REMOTE, BCD OUT, and TRIGGER cables as needed (Fig 1B). Pin assignments are listed in Section 6, Specifications.

Before attaching power cable, check to be sure that the 115/230 VAC switches on the rear of both drive unit and keyboard console are set to the proper line voltage and that the corresponding fuses are installed. Power cables may then be installed.

NOTE: The drive unit must always be turned on before the keyboard console to avoid selfdiagnostics errors.

230 VIC. -, r 115 VAG o c:J 0

3AG SLOW BLOW 0 1A at 115V

~Aat 230V

01 P

CONTROL INPUT

olL-~~~--,lo

MONO OUTPUT

Fig1A Drive Unit

~~~~~~~~~~.
,20Do 000 01 10 01 10
TII_ _IIIIIVE AIEMG1'E
01 10
"'- .
230V&C
"'- ncoRDlER
TY1II :lAG Fig 18

CD2A Console Rear Panel

3

I

I

;. WN

Mill AWN

PARAMETER

POSITIO N

RE'I FWO

A OJUST

-+-

Fig 2

CD2 COMPUDRIVE Keyboard and Display'

4

3 OPERATION

3.1 Keyboard

C02A's keyboard is shown in Fig 2. The power switch is in the upper, right-hand corner of the console and it should be in the off position for now. Note that there are two LEO displays for up to eight digits of data, messages, and error codes. The one labelled PARAMETER shows each entry as it is made and can also display the contents of various parameter buffers as explained further on. POSITION keeps track of where in the spectrum your spectrometer happens to be sitting. Once calibrated, it will faithfully follow all spectrometer movements, constantly updating in angstroms, nanometers, wavenumbers, or delta wavenumbers (as indicated by the lit dimension -A, NM, WN, .:lWN -, depending on the configuration, Section 5) even if you change gratings or spectral orders. Immediately beneath the PARAMETER display you'll find the keys that give you access to the operational parameters stored in memory and enable output to peripheral devices. Note that each key has an LEO in its upper, left-hand corner. Pressing anyone of these keys will light its LED and, if it happens to be a parameter key, the associated value will appear in the PARAMETER display. These values can be altered by entries from the bank of keys on the right, which includes the digits a through 9, a decimal point, a negative sign, and three other keys (EXAM, CLEAR, ENTER). All changes in parameter values must be locked into CD2's memory by pressing the ENTER key.

The MODE keys select the type of scanning you will be doing (continuous or burst), let you recalibrate your spectrometer, or give you access to CD2's configuration elements that define the type of system the C02 expects to control; that is, the kind of recorder, spectrometer, what gratings are mounted, and so on.

The bottom set of keys (GOMMAND) control the movements of the spectrometer. You can scan with a cycle determined completely by keyboard entries, or one based on outside trigger signals, set the spectrometer to a particular spectral position, pause at the end of the current scan in a multi-scan sequence, or just halt all operations and bring CD2 to a dead stop.

Finally, a toggle switch (ADJUST) gives you touch control over spectrometer position so you can home in . on a peak.

The functions of individual keys are detailed starting with Section 3.3.

3.2 Start-Up

Once your CD2A has been installed as detailed in Section 2, begin by turning the stepper drive power on. The rocker switch will light when power is supplied. Turn on your recorder (if attached), then push CD2's power switch to the ON position. Immediately C02 signals with a beep and a row of 8's in the display which reverts to

a row of dashes. This is the beginning of an intema:l diagnostic check which polls the various Circuits iln CD2's network for reports on their general well-beinc. Any symptoms of failure are instantly identified bY numerical error codes on the CD2A's PARAMETa display. Often, these errors are as Simple as turning en the CD2A console before the stepper drive unit (Error 26). In such cases, once the trouble is rectified (tum the translator drive on), the error display condition can be removed with the CLEAR key and normal operatico restored. Complete error codes are listed in Section 5..

Routinely, the self-diagnostics will be completed withOOl a hitch. C02 then removes the backlash from YOCJ1f spectrometer drive and signals with a beep. Cr-(Counter reading) appears on the PARAMETER dispia;. Before you go any further, you must load in the spectral position of your spectrometer as defined by me mechanical counter on the side panel of the instrument (in nm, A, or em- - not .:lcm·1, see Section 3.5.3. If necessary). Do this by pressing the correspondirng sequence of keys on the numerical pad, including decimal point when necessary. Note that the nurnbers appear in the PARAMETER display, but when you press ENTER to lock them in, the spectral positions transferred to the POSITION display. It will remain ther: throughout CD2A's operation, and be constarrrry updated as the monochromator is scanned, either automatically or manually with the ADJUST toggle. 5e sure that the POSITION units (A, NM, WN, t:.WM) agree with the units of your spectrometer. ALL PARAMt=! ::::=$ MUST BE LOCKED INTO MEMORY WITH T":-::

ENTER KEY.

Error messages for misentries result in an [Link] code number. They can be cleared, in most cases, ':Yy pressing the CLEAR key. Refer to Section 5 when you get into trouble.

For C02's configured in wavenumbers, the next PARAMETER display will be LL- (Laser Line), A ncozero number entered at this time automatically changes the POSITION units from WN to t:.WN (.:lWN = LL - WN). Enter a zero, and C02 stays in wavenumber units. Should your spectrometer also be equipped with a shutter to protect the PMT, your SHUTTER H! and 1-0 values should beset to define the protection windcw, or portion of scan range blocked from the PMT. Sat shutter values by pressing SHUT LO. (Note the LED on the key lights to show you which value is being displayed.) Key in the desired limit for the shutter ( - 5D, for example), and press ENTER. Repeat with SHUT HI (50, for example). The region between the limits ( - 50 to 50 .:lWN) is blanked out by the shutter. (SHU~ HIILO may also be used with any C02 system, regardless of scanning units, to control external devices, such as filters or sample changer, see Section 3A.E.)

You can go on to tell it to scan, set, or do any of me operations outlined in the sections to follow, if you prefer. On the other hand, it would probably be better to run through the sequence of commands described beiow to manually adjust the spectrometer, do a set tc a

5

particular position, and maybe even run a scan so you can get a quick feel for CD2's operation.

Place a fingertip on the ADJUST toggle, moving it back and forth while noting the POSITION display as it updates to match the spectrometer movements. Remember that you can't expect the POSITION to be accurate unless you are moving in a scan direction. After movements in a non-scan direction, at least ten (and as many as 50) units reverse into a scan direction are required to remove backlash depending on the spectrometer drive. All SPEX spectrometers scan from high to low wavenumber, low to high wavelength, etc.

Press SET. C02 responds with POS--(Position) in the PARAMETER display. Key in the spectral position you'd like your spectrometer to locate. When ENTER is pressed, the spectrometer slews to that destination, complete with backlash removal if approaching from a non-scan direction.

Run a quick scan by pressing START pas, and entering the beginning of the scan. Repeat with END pas and INC/RATE. This last entry, in the CONTinuous mode tells C02 how fast to scan. Try loading in 1.0 for 1 uniUsec. Press REP SCAN and enter in a 2 to repeat the scan, then a 5 into SCAN DELAY to idle for five seconds between scans. If you'd like to record the output from your detector during the scan, enter a 10 (10 scan units/recorder unit) into RECORD SCALE, then press RECORDER ON to enable the recorder drive. Now select CaNT in the MODE key bank, then SCAN. C02 will automatically slew to the START pas, taking out the backlash if need be, before scanning at one uniUsec as the recorder tracks along with the spectrometer.

On reaching the END pas, C02 pauses for five seconds before restarting the scan sequence. It then halts, waiting for the next command. Note that the display shows how many scans have been run out of the total requested (e.g. 001 002).

These scans were simple continuous movements of the spectrometer at a constant speed or rate. C02 also scans in a discontinuous or BURST mode in which the spectrometer slews tor a selected INCrement, DWELLS at that position for a selected length of time, before slewing to the next position in the scan, one increment away.

In addition, a continuous scan may be triggered externally (TRIG SCAN key) to start on a given signal, or the length of all the dwells in a BURST scan can be set by such a trigger. With our DPC2, this can lead to BURST scanning where data is taken only while the spectrometer is stationary (Section 3.10).

All the above features and other functions of the C02, such as STATUS LINE output, changing spectral order, etc. are detailed in the following sections.

3.3 Numerical-entry Key Group

Located on the right side of the C02 control panel, these keys include the numbers 0 through 9, a decimal polnt, a negative sign, and three operations (EXAM, CLEAR, ENTER) defined below.

The top 12 keys load their labels into the PARAMETER display to specify scan parameters or to alter CD2's configuration (Section 4). The displayed values are not locked into memory until the ENTER key is pressed. Then the value is loaded into the parameter that is identified by a lit LED on its key and confirmed to the operator by a beep.

3.3.1 EXAM

The EXAM key is a way to recall the present parameter value (for the key with a lit LED) after the display has been CLEARed or written over, but ENTER has not been pressed. For instance, pushing START POS may bring a 400 into the display. Pressing CLEAR or a sequence of numbers in an attempt to alter the START value will removed 400 from the display. But if ENTER has not been pressed, EXAM will load 400 back into the display, since that remains the real scan START value.

3.3.2 CLEAR

This key merely blanks the display so new parameter values can be entered. It has no effect on the parameter value unless ENTER is pressed after it. In that case the parameter value becomes zero.

3.3.3 ENTER

You'll probably resort to this key more than any other for it tells C02 to accept the disl;llayed data as a parameter value for the key identified by a lit LED. No numerical value will be trapped by CD2's memory until ENTER is pressed.

6

-

3.4 Parameter Key Group

This group of keys determines which parameter will be displayed or altered after ENTER is pressed. During operations, hitting a particular key displays the parameter associated with it and lights the LED to identify which parameter is being displayed.

This group also includes the keys for turning the recorder, marker, and peripheral data link on and off.

All scan parameters should be entered before a scan is requested to avoid errors (Section 5).

3.4.1. START POS

Press this key when you want to tell the C02 where scans begin. Load in the value, in units matching the POSITION display, from the numerical-entry keys, then lock in with ENTER.

3.4.2 END POS

Press this key to tell the CD2 where scans end. Load in the value, in units matching those in the POSITION display, from the numerical-entry keys, then lock in with ENTER.

3.4.3 INC/RATE

The meaning of the INC/RATE parameter key hinges on the mode of scanning you choose: Continuous or Burst.

For Burst scanning, in which the spectrometer slews over a spectral division or increment, then dwells there for a selected time (Section 3.4.4), or until an external trigger is received, set the distance between dwell points by loading in your increment in POSITION display units. The smallest logical increment is one motor step, the reciprocal of element 6 in the configuration table, Section 4. Choose your value by pressing the selected sequence of numerical keys, then ENTER.

For Continuous scanning, press this key to define the RATE, or speed, of your scan in POSITION display units/sec: (START-ENo)/RATE = total time of scanning. Normally continuous scans are not ramped; that is, the spectrometer begins stepping at the choosen rate immediately on leaving the START position. There is no gradual acceleration and so the inertia of the spectrometer drive sets a limit on the ultimate speed of a normal continuous scan. Because of this, CD2's maximum rate for unramped scanning is set by configuration element 9 (start speed of spectrometer/100 or 10 for LSD) and element 6 (motor

steps/unit, see Section 4). So the maximum continuous scan rate for your spectrometer will be (element 9 x 100)/(element 6). C02 will, of course, scan at rates higher than this. In fact, it will scan as fast as element 10 (maximum speed of spectrometer/1000 or 100 LSD) allows, and this upper limit is determined by (element A x 1000)/(element 6). However, these faster scans wiD . be ramped, and the recorder will not be allowed to follow in a coupled mode.

For example, if your element 9 was set to 40 and element 6 to 400, your maximum unramped scanning rate would be 10 units/sec. If you entered a value greater than this into INC/RATE and requested a CONTinuous scan, the scan would still be performed but C02 beeps and displays HI SPEED in the PARAMETER Display to let you know that normal scanning has been overridden. Now the spectrometer accelerates up to the specified speed on a ramp, then back down again to reach the end.

When a RATE greater than the maximum speed of the spectrometer is entered, requests for scans will result in an ERROR 86 and the RATE LED will light.

3.4.4 DWELL TIME

For Burst mode scanning where the pause after each increment is not to depend on an external trigger, but instead is set by CD2's own clock, press this key to select your parameter. Enter in a number between Q..01 and 600 seconds, then press ENTER. During scanning the spectrometer will be stationary that long between slew increments. DWELL TIME has no meaning when you select a continuous or triggered scan.

3.4.5 REP SCAN

With this key you tell C02 how many times to repeat the scan over the region defined by the other parameters. Key in a number between 1 and 999, then press ENTER.

Pressing the REP SCAN key during scans will display two numbers on the PARAMETER LEOs. The one on the left is the number of scans that have been completed, while the number on the right is the total number of scans that have been requested.

3.4.6 SCAN DELAY

Press this key to postpone the beginning of each scan repetition. The C02 will wait at the end of each scan while this delay runs out. Key in a number (between 0.01 and 600 seconds, or zero) and press ENTER.

SCAN DELAY does not function when a TRIGGER SCAN has been selected.

3.4.7 LASER LINE

For Raman systems, this key allows you to work in delta wave-numbers defined as AWN = Laser Line - WN.

7

A non-zero entry into this parameter automatically alters all wavenumber scan parameters, including START POS, END POS and SHUTIER HIILO to their delta wavenumber equivalents. The spectrometer POSITION is also changed as evidenced by lighting of the ~ WN symbol.

A zero entry into this parameter preserves (or restores) the wavenumber format of the instrument.

For wavelength-drive instruments, pressinq LASER LINE will simply be ignored.

Press the proper sequence of numerical keys (e.g. 19435), then ENTER.

3.4.8 SHUT HI/LO

With a Raman system, these keys define a region blocked from your PMT by a mechanical shutter. On any C02 system you can alternatively control an external device that may, for example, insert and remove a filter when scanning through a certain spectral region.

In any event, press either key to define when the shutter output begins (LO) and ends (HI). Key in the desired numbers in units that match those in the POSITION display, then lock in with an ENTER command.

NOTE: If HI = LO, the shutter is always open.

For instance, you may have installed that shutter to block out a region to either side of the laser line and prevent accidental blinding of your phototube. Entering - 25 into SHUTIER LO and 20 into SHUTTER HI will then prevent any light in the region from 25 delta wavenumbers on the anti-Stokes side, to 20 on the Stokes from reaching the exit port of your spectrometer. In the defined region, pin 9 in the MOTOR CONTROL connector is grounded. Pin locations and outputs for shutter control are listed in Section 6. (Note that for wavenumber units SHUT LO is a larger number than SHUT HI, since that corresponds to the scan direction.)

3.4.9 RECORD ON

This key enables or disables the drive circuitry which couples the recorder to the monochromator. Pressing a lit key disables and turns off the LED. Pressing an unlit key enables and lights the LED. The recorder cannot be turned on till a RECORDER SCALE is entered (Section 3.4.10).

Note that the first scan after start up automatically removes one recorder unit of backlash from the chart drive. Be sure there is enough excess paper in your recorder to allow for this.

If no recorder appears in the configuration table (Section 4), pressing RECORD ON will be ignored.

3.4.10 RECORD SCALE

Press this key to set the number of scan units that will be plotted as one unit of chart paper (e.g. 1OAlin., 5WN/cm, etc.). Follow the proper sequence of keys (maximum five digits, including decimal point) with an ENTER command.

In the Burst mode, you need only make sure the SCALE is not zero. However, in the Continuous mode you must always keep the SCALE large enough to allow the recorder to follow. This means that (RATE/SCALE) x RECORDER STEPS/RECORDER UNITS (see configuration element 7) must be less than or equal to the maximum recorder speed, element 8. For a SPEX recorder this simply means the number in RATE should never be more than about 1.5 times that in RECORD SCALE. Invalid RECORD SCALEs result in an ERROR 90 (~O valve), 91 (no continuous scan rate entered), 92 invalid; (e.g. too fast).

3.4.11 MARKER ON

This key enables or disables the circuitry which sends a pulse to your recorder at constant intervals to scale the wavelength or wavenumber axis of the charted data. Pressing an unlit key enables and lights the key's LED. The marker cannot be turned on unless a MARKER PERIOD (Section 3.4.12) has been entered.

If no marker appears in the configuration table (Section 4), this key is ignored.

3.4.12 MARKER PERIOD

Press this key when you want to select the number of spectrometer units between signal pulses to your marker. Follow the proper integer number (maximum 3 digits) with an ENTER command.

In the Continuous mode, MARKER PERIOD/RATE must be greater than or equal to one. In the Burst mode, MARKER PERIOD must be an integer multiple of the increment. When a scan is requested, invalid entries give an error 80 (~O), 8E (no increment/rate entered), SF (out of range).

3.4.13 REMOTE - RS232

The RS232 remote provides a communications port for OUTPUTTING data to a user device (such as a datalogger, printer, or computer) and RECEIVING data and commands from a computer. (See Tech Note #66 at the rear of this manual for an example.)

The RS232 port supplies information on spectrometer position and certain operational conditions described in following paragraphs. Also, Parameters and Commands may be inserted into the C02 through the RS232 port.

8

NOMENCLATURE: (The following symbols are used in this section)

< • . >: ASCII Control Character

< CR e-: Carriage Return (ASCII 13) < LF >: Unefeed (ASCII 10)

[ . . J: Optional Characters (as per

configuration)

[Link] Configuration Parameters

The RS232 hardware and software configuration is defined by codes entered in the CD2A configuration registered as described in section..4.1.

[Link] Input/Output Sequences

A. One-way RS232 - Configuration Element 21, bit #1 = 0

In the simplest communication scheme, the CD2A outputs position information to external devices while actual control of operations and parameters remains

with the CD2A keyboard. Output is initiated by pressing the REMOTE key prior to cafling for a SCAN or SET operation. The red LED on the key should light. Data transmission begins as soon as the SCAN or SET operation is ordered from the keyboard.

There are three versions of one-way RS232 communication.

1. No external response required.

2. External acknowledgement of data reception required «ACK>I<NAK».

3. In addition to 2 above, CD2A issues a service request prior to transmission « ENQ >CD).

1. One-way transmission with no handshake With configuration element 21 bit #1 = 0, #4 = 0 and element 22 bit #1 = O. The following protocol is observed:

Data transmission without the AcKlNAK bit-set looks like this

CD2A Gets New Data Block

'NO'

ERROR

User Responds

. <Ear>

CD2A Halts

'Nothing'

. ,

Fig 1

9

As soon as a SCAN or SET is ordered, CD2A begins transmitting position data in the format selected by configuration element 21 bit #3. A new data block is sent each time the POSITION display is updated. The transmission continues until one of the following three occur:

a. The SCAN or SET is completed. CD2A then sends an < ear> to the external device and HALTS.

b. CD2A receives an < ear> from the external

CD2A Gets New Data Block

device. CD2A HALTS operation.

c. CD2A receives any other transmission from the external device. CD2A HALTS operation and generates an appropriate error code (Section [Link]).

2. One-way Transmission with ACKINAK Handshake

When configuration element 21 has bit #1 = 0, the protocol enforced follows this sequence:

Data transmission with ACKiNAK is different

C02A

Data Transmission Begins

NO

YES

ERROR

'Other'

ERROR

<NAK> User

Responds

<EOT>

<ACK>

'YES'

C02A HALTS

C02 Sends <EOT> and HailS

Fig 2

10

After a SCAN or SET is ordered, CD2A begins transmitting exactly as in (1) above. But after the first Data Block has been transferred, CD2A waits for a time set by Configuration element 19 for the external device to respond.

transmitted, unless the end of SCAN or SET is reached, in which case CD2A transmits <ACK> and halts.

d. If <EOT> is received, CD2A"halts.

a. If no response is received in that time, an appropriate error code is issued (Section [Link]) and CD2A halts.

e. If any other character is received, an appropriate error code is issued and CD2A halts.

3. One-way Transmission with ACK/NAK handshake and < ENQ >CD.

b. If < NAK > is received, the same Data Block is transmitted again. SCAN or SET continues as normal, without the retransmission delaying progress.

With Configuration element 21 bit #1 = 0, #4 = 1 and element 22 bit #1 = 1, the following protocol is enforced:

c. If <ACK> is received, a new Data Block is

In one-way communication the C02A will issue a service request if the enquire configuration bit is set and the ACKINAK

configuration bit is set. •

NO

<NAK> User

Responds

<EOT>

<ACK>

'---------l

Fig 3

11

After SCAN or SET is ordered, CD2A transmits an < ENQ >CD to the external device and waits for a response for a time set by configurC!tion element 19.

a. If no response is received, an appropriate error code is issued (Section [Link]) and CD2A halts.

b. If <NAK> is received, the <ENQ>CD sequence is reinitiated.

c. If <ACK> is received, transmission follows in a manner similar to (2) above.

d. If < EaT> is received, CD2A halts.

e. If any other character is received, an appropriate error code is issued and CD2A halts.

B. Two-way RS232

When element 21, bit #1 = 1, CD2A is configured for twoway RS232. In this configuration, the < ENQ > CD function, element 22 bit #1, is ignored.

To initiate two-way RS232, the REMOTE key is pressed. Note, however, that as long as the red LED on this key is lit, CD2A keys, except for HALT, are disabled. Parameters and instructions must be sent in by an external device.

The actual operation of two-way RS232 involves the interaction of two components:

1. Data blocks can be transmitted to external devices just as in one-way RS232.

2. Parameters and commands can be input into CD2A from external devices.

Note that CD2A two-way RS232 is full duplex, so messages can be sent in and out simultaneously.

Also, an < EaT> received by CD2A at any time will HALT operation.

1. Transmission of Data Blocks

The protocol and format of this operation is essentially the same as in Section A1, or A2 above, depending on configuration of the ACKINAK bit. However, note that as soon as REMOTE is pressed, CD2A sends an < ACK > < CAN> to signal that it is ready. Actual transmission of Data Blocks commences upon receipt of an order to SCAN or SET from the external device.

2. Input of Commands and Parameters

The special feature of two-way RS232 is that CD2A accepts and responds to outside orders, just as the user might set a parameter or order up an operation from the keyboard.

In this mode, CD2A sends an < ACK > < CAN> as soon as Remote is pressed to signal that it is ready to receive commands or parameters.

Parameter input format is presented in Section [Link] Command input format is presented in Section [Link].

On receipt of a parameter command, CD2A will respond as follows:

a. A < NAK > is sent if the command or parameter message was received incorrectly (parity or related failure).

b. An <ACK><BEL> (error code) <EOT> indicates the message was received but not executed due to syntax or illegal characters (see Section [Link]).

c. An < ACK > < CAN> means the message was received and the command executed or parameter assigned.

12

2-Way
Remote Key
Turned On
'- ~


C02 Sends
<ACK> <CAN>

,...
C02 Awaits
Input

RX's --.,
Valid Char's No Invalid
<STK> or <CAN>
Any Char's
<CR> \.
Yes

C02 Sends
<NAK>
CD2
Processes
String

CO2
Executes
Command
C02 Sends
<ACK>

ERROR Message Sent : Not Allowed, Parameter
<BEL> Code <EOT> Out of Range. etc. Fig 4

13

[Link] Datalogger Format of Data-Block Output When Conf. Element 21 has bit #3 = 1, Data Blocks are sent in the following format:

Transmission sequence:

(Status), (Units), MSD._._. ,LSD.[(CS)],

<CR>. [<LF>]

Description:

(Status): P -Positioning

• -Set Position (end of set positioning)

S -Start of ScalT'{end of scan positioning)

E -End of Scan

B -End of Burst (burst movement complete. waiting for trigger or end of dwell time)

(Units): N -Nanometers W -Wavenumbers

D -Delta wavenumbers A -Angstroms

MSD through LSD - Scan position. MSD is Most Significant Digit. LSD is least Significant Digit.

Example:

End of burst position is 460.52 nanometers. Transmission:

B N 0 0 4 6 0 . 5 2 (CR) [Link] Standard Format of Data-Block Output

When Config. Element 21 has bit #3 = O. Data Blocks are sent in the following format:

Transmission sequence:

< STX>. (Status). (Units). MSo. __ ._._._._.

LSD. <ETX>. [(CS)]. <CR>. [<LF>l Description:

< STX >: Start of Message (Status): P -Positioning

• -Set Position (end of set positioning)

S -Start of Scan (end of scan positioning)

E -End of Scan

B -End of Burst (burst movement complete. waiting for trigger or end of dwell time)

(Units): MSD through LSD. same as Section [Link]

< ETX> : End of message body

(CS)- two ASCII-hexadecimal characters representing binary sum of preceding characters. overflow ignored. STX or ETX inclusive.

[Link] Input Formats

If the REMOTE key is activated on the C02. it will accept the following parameters and commands from the user's computer. when configuration element 21 is set

..

to select 2-way RS232.

PARAMETERS

Start Position

End Position

Burst Increment Continuous Scan Rate Burst Dwell Time Scan Type

Shutter High Position Shutter Low Position Enter Set Position Number of Scans Delay Between Scans Laser Line

COMMANDS START SCAN

START TRIGGER SCAN HALT

ENABLE TRIGGER SCAN GO TO SET POSITION

PAUSE .

CONTINUE

When the Co2A receives data and commands in the correct syntax. it will respond first with an ACK character (ASCII 06) or a NAK (ASCII 21).

[Link] Parameter Input Format

All numerical values transmitted or received are ordered with the most significant digit first. Leading zeroes or spaces are accepted. but the field width is only 8 characters maximum. The < ETX > must follow the last numerical character.

Examples: <STX>ST19000.34<ETX> <STX>EN 11000<ETX>

NOTE: <LF>and Nulls are ignored and can generally be sent anytime for the user's convenience (such as in half duplex mode). The above characters « LF> .Null) are not added to an input checksum when they are sent to the C02 before the <ED<> character when checksums are configured.

The CD2A accepts parameters in the following format:

< STX >, (Parameter 10), [(Parameter)]. < ETX >, [(CS)],<CR>.[ < LF> I

Description

Max. No. of Characters

< STX >: Start of message (Parameter 10) Identifies:

=02 ASCII

ST EN BI SR

(parameter) 8

8

6

6

Start Position

End Position

Burst Increment Continuous Scan Rate

14

or Burst Dwell Time TY Scan Type

SH Shutter High Position SL Shutter Low Position SE Set Position

NS Number of Scans

SO Delay Between Scans LL Laser Line

< ETX > End of Message

< CS > Two ASCII-hexadecimal characters representing binary sum of preceding characters, overflow ignored, srx to ETX inclusive. This may be omiUed with configuration register change.

5 1 8 8 8 3 5 8 1

(C or B)

=03 ASCII

2

[Link] Command Formats

The CD2A accepts commands in the following format:

<CAN>. (Command Character), < ETX>,[{CS)),<CR>.[<LF»

Description:

< CAN> Command identifier character = 24 ASCII

Command Character: Command:

S T

H E P

<SO> <SO>

START SCAN ENABLE TRIGGER SCAN

HALT

TRIGGER SCAN SET

PAUSE :: 14 ASCII CONTINUE

[Link] Error Reporting

If any command or parameter specification causes an error condition in the CD2A, an error code is transmitted back to the user's computer in the following format:

< BEL> .(Error Code). < EOT > where < BEL> = ASCII r:J1

(Error Code) is the two character error code described in the CD2A error summary

< EOT> end of error reporting :: ASCII 04

The user must take appropriate action to recover from the error condition.

[Link] Hardware Notes
CD2A has a female 0825 connecter for RS232.
-pin- -symbol- -generic term-
2 BA Transmit data
3 BB Receive data
4 CA RTS
5 C8 CTS
6 CC DSR
7
8 CF DCD
19 SCA Carrier
20 CD DTR C02A is OTE (terminal NOT modem).

RS232 pin assignments:

data output data input control output

(true when C02A remote is on) control input

(disables C02A transmit when false) control input

(HALTS CD2A when false) ----+---------+_ Signal ground -------------control input

(HALTS CD2A when false) control output

(true when C02A power is on) control output

(true when C02 completes power-on tests successfully)

-function-

C02A treats loss of DCD or DSR as a disconnect and executes a HALT and further turns off CD2A remote (drops its RTS line).

Loss of CTS longer than the configured timeout (0 to 9.9 sec) also results in HALT and remote off as above.

15A

CD2A output-only protocol (enquire and acklnak enabled)

===L= > means are your ready for first transmission?

I

means user not ready < = = = = = < NAK >

I or

CD2A HALTS < ===== <EaT>

I or

user is ready. < ===== <ACK>

l - I

CD2A output protocols (in output or input/output mode).

< ==1===

RS232

CD2A input protocols. When CD2A remote key is turned on an

===== > means ready for next command (Command accepted)

<STX>

(parameter code)

(parameter)

< = === < ETX>[(CS)<CR > <LF>J

====1 = > means received but not executed by CD2A per error code.

RS232

CD2A

RS232

<ENQ>CD i

[<STX>J (pOSition) (unit)

numerical value

[< ETX>{CS)j<CR >[ < LF>]

===== >

I

< =j===

< ==1===

CD2A repeats above transmission

CD2A sends next line

CD2A does a HALT

kACK> <CAN> is sent

if accepted and executed i t

if accepted and executed ELSE either

<NAK>

===== >

or

<BELL> (error code) <EaT>

[(CS)] < CR > [ < LF > ]

15B

USER

[<NAK>] or

[<'ACK>J or

<EaT>

or

<CAN>

(command code character) < ETX> [iCS) < CR > < LF> 1

means message not received (due to parity, framing, no <STX> or <ETX>, etc.)

Co2A (always oTE)

USER

(as oTE; null modem)

. Suggested interface for DCE (modems) and oTE (terminals):

Co2A always oTE)

3 2 5 4

20 7 19 8 6

2 3 4 5 6 7 8

19 20

USER (as DCE)

2 3 4 5 6 7 a

19 20

2 (RX) 3 (TX) 4 (CTS)

- 5 (ATS) 6 (oTA) 7 (GNo) 8 (SCA)

19 (OeD) 20 (OS A)

For no hardware handshake, Le. ONLY pins 2, 3, and 7 (transmit data, receive data, and ground with no ACK NAK configured), the Co2A will transmit position etc. with no pauses and data may be lost at the user's end especially at high baud rates unless a true communication program is in effect. The CD2A will receive all characters sent, but always sends handshake characters ACK, NAK, etc., to signal the user of the results of the command sent.

[Link] User Programs

The following flow chart, when used in conjunction with the protocols in the following page, will help you formulate your own programs to fully utilize CD2.4:s RS232 capabilities.

Suggested standard program for user:

user low level terminal program

No

Yes

Yes

process character

16

This set of keys controls all spectrometer movements except for manual adjustments with the toggle switch,

• I s s r PAUse HALT

[;JB .z; SCAN

3.5 MODE Keys

This bank of keys gives the operator access to the COMPUDRIVE CD2's internal configuration registers, allows recalibration of spectrometer spectral position, and tells the CD2 whether scans. when they are eventually ordered, will be in a continuous or burst mode.

MODE

3.5.1 CONT or BURST

Either of these keys must be selected before a SCAN or TRIG SCAN (Section 3.6.1) is ordered so CD2 knows whether to proceed smoothly (CaNT, continuous scanning) from the START POS to the END POS at a constant RATE (see Section 3.4.3 for a full explanation of rates and special fast-scanning override). or to slew by increments and remain stationary between them until the DWELL TIME (Section 3.4.4.) expires (BURST scanning), or an external trigger signal is received (TRIG SCAN). The LED on each key will light so you know at a glance which type of scan will be executed.

3.5.2 CNFG

Selecting this key puts you in the configuration mode in which you can check or modify CD2's compatibility with peripherral devices, as you would when changing gratings, spectrometers, spectral orders. recorders, and the like. Full details of CD2's configuration elements are listed in Section 4.

The only way to leave the Configuration mode after a change has been entered is by pressing HALT (Section 3.6.5). If no change has been made, any mode or command key returns the system to its previous state.

3.5.3 CAL

To alter the counter reading C02 recognizes as your spectrometer's spectral position, press this key. Cr-will apear in the PARAMETER display. Key in the proper sequence of numerical keys. then press ENTER to lock it into memory. The reading now appears in the POSITION display and will be updated as required. During power up, always calibrate with the spectral position corresponding to the standard grating, Configuration element 9, Section 4. In most cases, this will be the value shown in the mechanical counter built into the side of the spectrometer.

For wavenumber instruments always calibrate in wavenumber units, even if a laser line has been entered (Section 3.4.7). C02 will make the necessary adjustment before transferring the deltawavenumber equivalent to the POSITION display.

3.6 COMMAND Keys

3.6.1

SCAN

1=1

--'

When you wish to drive the monochromator through a spectral region defined by START and END POS (Section 3.4.1-2) in a manner that is independent of what any outside devices. such as detectors or counters, might be doing, select this command. As soon as the key is pressed, C02 drives the spectrometer to the START POSt always approaching from below to remove any backlash in the drive mechanism.

The movement from this point on is governed by your selection of CaNT or BURST (Section 3.5.1). If the CaNT key is lit, the spectrometer will move smoothly to the END POS at a speed set by RATE (see Section 3.4.3 if scan RATE exceeds spectrometer start speed. There it will stop if REP SCAN (Section 3.4.5) is 1. If not, CD2 will wait for any SCAN DELAY (section 3.4.6) to run out before returning to the START pas. The sequence continues for as many cycles as set in the value of REP SCAN.

If. on the other hand, BURST had been selected before SCAN, the sequence is identical except for the movement between START and END POS. After reaching START, C02 waits for the DWELL TIME (Section 3.4.4) to expire, then it slews for a distance set by INC (Section 3.4.3). There it again waits for the dwell time. slews, and follows that sequence until END is reached.

For CaNT/SCAN, the following parameters must be set:

START POS, END POS, INC/RATE, CaNT

For BURST/SCAN, the following parameters must be set:

START POS, END POS, INC/RATE, DWELL TIME, BURST

For recorder tracking and control. see Sections 3.4.9-12.

17

The POSITION display will be updated as the scan progresses.

3.6.2 TRIG SCAN g To link spectrometer movement to some outside timing sources such as a sample changer or photon-counting circuitry, choose TRIG SCAN (Section 3.9 and 6 describe the necessary trigger inputs).

When TRIG SCAN is pressed after CON (Section 3.5.1), C02 proceeds as with a regular SCAN, except it pauses at the START POS until the trigger is received. Scanning then goes on as normal unless more than one REP SCAN (Section 3.4.5) is requested. In that case, C02 pauses with the spectrometer at the END POS until another trigger signal is received, before the sequence repeats. Note that any SCAN DELAY (Section 3.4.6) is inoperable in a TRIG SCAN.

When TRIG SCAN is selected with BURST, the scan not only requires a trigger at every START and END POS, but also at every INC. In this case both DWELL TIME (Section 3.4.4) and SCAN DELAY are inoperable, having no influence on the evolution of a scan. In conjunction with the STATUS LINES, Section 3.8, BURSTfTRIG SCAN can dialog with your detection system in such a way that no data is recorded except when the spectrometer is stationary at a dwell point.

For CONTfTRIG SCAN, the following parameters must be set:

START POS, END POS, INC/RATE, CONT

For BURSTITRIG SCAN, the following parameters must be set:

START POS, END POS, INC/RATE, BURST 3.6.3 SET Spectrometer Position GJ When this key is pressed, the C02 responds with POS--in the PARAMETER display and it expects you to key in a spectral position that will be the destination for the SET command slew. Once the number is loaded into the display, C02 ramps and slews the spectrometer to that position as soon as ENTER is pressed, removing backlash as required.

SET only operates when the C02 is in the idle mode, that is, no other operation is taking place when SET is pressed.

The POSITION display is updated as the slew progresses.

~AUSE 1

This key tells C02 to stop when the current task is completed and wait for further instructions. There are two specific cases when it applies.

3.6.4 PAUSE Betore Next Scan

During repeat scans, press PAUSE and C02 stops aft the present scan is complete, overriding any SCA DELAY (Section 3.4.6) that might be inserted. It v. remain there until you press PAUSE again, befe resuming repeat scanning where it left off. For instanc if PAUSE was pressed in the middle of the third SCc of eight, C02 now goes on to the fourth scan.

The HALT key (Section 3.6.5) must be pressed befo: any non-scanning operation can be ordered.

Pressing PAUSE during a slew to the START POS w halt the scan at its beginning until PAUSE or HALT pressed.

3.6.5 HALT All Operations

i HAL

Pressing this key during a scan aborts all operanons stopping the spectrometer in the position it happens tl be at the time of the command.

HALT is also handy to clear illogical operations anc errors.

CAUTION: Pressing HALT during backlash remova may knock C02 out of step with your spectrometer drive For this reason, NEVER press HALT while backlash i~ being removed, or recalibration may be required.

Finally, HALT is the only way to exit the configuration mode (section 4). ~ ·l ADJUST ~

t

-+~

3.7

MANUAL ADJUST and Limit Switch Protection

18

The toggle in the center of CD2's keyboard allows to slowly move the spectrometer manually to spectral position within its range while you watch POSITION display or monitor your detector output preparation for peaking the optics on a selected Ramping is also supplied so speed control is a 4uC:;)LI~. of how many times, and, how long, you toggle switch. Don't forget to remove the backlash moving in a non-scan direction by overshooting mark and making the final approach in a scan

Should the spectrometer; for any reason, ever be

into one of the safety limit switches that define mechanical range of the lead scew, all scanning controls are disabled. Manual ADJUST becomes the only way to alter the spectral position Errors 2A and 28 are displayed depending on limit has been reached. In such cases, ADJUST drives the spectrometer away from the limit Once the drive is freed, C02 asks You to r""r:alltln (Cr-) before it returns to normal operation.

Enable 4 is active low (ground sink}, when running a BURST scan and happens to be between increments, waiting for a trigger expiration of the dwell time before moving on. 4 does not apply to the START and END POS.

3.8 STATUS LINE Output to Peripherals

To let peripheral devices such as scalers or computers know what the C02 is doing at a given instance, four status output lines are located in the TRIGGER CONNECTOR on the rear panel. (See Section 6 for pin locations.) Each is an' open collector device, capable of sinking 48mA. Maximum pull-up voltage is 5.5 VDC.

Enable 1 is active low (ground sink) when the spectrometer is being positioned during a SET, a move to the START POS, or during incremental movements in BURST scanning. In essence, it tells the peripheral device that any data collected at this time should be ignored since the spectrometer is slewing.

Enable 2 is active low (ground sink) when the spectrometer is poised at the START of a scan after a PAUSE operation, or waiting for a trigger, or the expiration of the first DWELL TIME.

Enable 3 is active low (ground sink) when the spectrometer is Sitting at the end of a scan.

3 Trigger Inputs

Fed into the corresponding connector in the rearpanel, a trigger pulse should be a FORM A SWITCH to ground lasting at least 2 J.'Sec. By correlating Status Lines and trigger inputs with the TRIG SCAN mode, a dialog can be established with your data counters, such as our DPC2, so data is taken only while the spectrometer is stationary.

(See schematic on following page)

19

CONTINUOUS SCAN

Scan Start

Scan End

Remove Backlash

PAUSE" (if any)

STATUS E2

STATUS E1

No STATUS signal

DELAY or PAUSE (if any)

STATUS E3

STATUS E1

No STATUS signal

Stall till trigger

STATUS E3 PAUSE (if any)

Scan at constant RATE

Slew to Scan Start

STATUS E1

CONTINUOUS TRIGGER SCAN

Remove Backlash

Scan Start Stall till trigger

STATUS E2 PAUSE" (if any)

~---------------------- ~igge~ ---------------------- __

Scan End

Scan at constant RATE

Slew to Scan Start

STATUS E1

BURST SCAN
Scan Start Scan End
Remove DWELL Slew to DWELL DELAY or PAUS
Backlash next point (if any)
STATUS E2 STATUS E4 ----- STATUS E3
STATUS E1 PAUSE" STATUS E1
any)
Slew to Scan Start
STATUS E1
BURST TRIGGER SCAN
Scan Start Trigge~ - - - - Scan End
Remove Stall till Slew to Stall till Stall till
Backlash trigger next point trigger trigger
STATUS E2 STATUS E4 ----- STATUS E3
STATUS E1 PAUSE* STATUS E1 PAUSE
(if any)
Slew to Scan Start
STATUS E1 20

·PAUSE requested during slew to start.

4 CONFIGURATION

Each C02 comes to you with a configuration best suited to your particular instrument and experimental designs. However, should you at any time want to modify your system by substituting a grating with a different groove density, another recorder, or even change to a completely different SPEX spectrometer, you'll find C02 ready and willing to adapt to the situation with only a few keystroke modifications of the configuration table. These changes are volatile, so the next time you power up, the factory configuration reappears.

Access to the configuration table is through the CNFG key. When you press it while the C02 is halted, the first element in the table appears. You can step through the rest of the elements by pressing ENTER till you reach the last, or 23rd element. The next ENTER returns the configuration table to the first element, and so on.

THE ONLY WAY TO EXIT CONFIGURATION MODE AFTER AN ALTERATION IS BY PRESSING HALT.

Configuration elements come in two forms, 4-bit binary or decimal. Note that element one, for example, is a binary presentation of four bits, each having the value zero or one. Referring to the table at the end of this

4.1 C02 Configuration Table

section, and reading left to right, you can see that 0100 translates into a wavelength (0) drive system that reads in angstroms (1). The next number is always zero (0), but the last tells us no PMTprotection is installed (0).

Other elements may be of the decimal type, such as element five. It might read 1200 to signify a grating with 1200 gr/mr has been installed in the instrument.

To alter a configuration element, press the CNFG key, then ENTER until the chosen element appears. Key in the new value, lock in with ENTER, and move on to the next element on your list. When done, press HALT. A roN of dashes (-) in the PARAMATER displays signals that C02 is confirming that the modification is consistent with the remaining configuration elements. (Be patient, reconfiguration takes about 10 seconds.) If the new configuration is cleared, CD2 returns to normal operation with a beep. If not, an error code is displayed (Section 5). Press EXAM to view the offending element. (You can change as many elements as you like, as long as they're mutually compatable.) Severely illogical modifications of the configuration elements may necessitate turning off the CD2 and beginning from scratch: All modifications of the configuration from the keyboard are lost when the power is cut.

,

Significance

123 4

Element #

Four-bit binary code, left to right First bit

If one, the spectrometer has a wave-number drive. If zero, the spectrometer is wave-length drive.

Second bit

(Only applies if bit 1 = 0)

If one, the spectrometer untis are angstroms.

If zero, the spectrometer units are nanometers.

Fourth bit

Must remain zero.

Third bit

If one, a shutter is installed for PMT protection. If zero, no shutter has been installed.

2

Four-bit binary code, left to right

'23 4

First bit

Must remain zero.

Second bit

If one, the spectrometer is fitted with limit switches. If zero, no limit switches.

Third bit

Undefined.

2

Fourth bit

Type of drive unit:

1 = Mini-Step Driver (MSD) o = Large-Step Driver (LSD)

3 Six decimal digits specify the lower (in wavelength, upper in wavenumber) mechanical scan limit of the spectrometer.

21

Element # Significance

4 Six decimal digits set the upper (in wavelength, lower in wavenumber) mechanical limit of the trometer. C02 will not knowingly drive the spectrometer outside the limits set by elements 3 4 but will instead respond with an error code.

5 Four decimal digits specify the grooves/mm of the grating actually installed in the spectrometer 1200)

6 A four-digit number specifies the grooves/mm of the standard grating, that is, the one for which mechanical counter on the side of the spectrometer is accurate.

7 Four decimal digits for the number of motor steps that will drive. the spectrometer one spectral with standard grating, e.g. 400 for 1400 and 1700 series spectrometers, and 500 for a 1269 (all Drivers). 50 for LSD's.

22

8 Units of backlash removed from spectrometer drive in reverse to approach START or SET

9 Start speed of spectrometer slew (two decimal digits) in units of 100 steps/sec MSD, is 4000 steps/sec) or 10 steps/s LSD (50 for LSD).

10 Maximum speed of spectrometer (two decimal digits) in units of 1000 steps/sec MSD tt\lr",.."Ih. is 28000 steps/sec) or 1 00 step/s LSD (0 for LSD)

11 Recorder options is a four-bit binary code (usually reading 0101), formed from the following binary set, left to right (1 2' 3 4):

Bit 1

Unused

Bit 2

If one, a marker exists. If zero, no marker.

Bit 3

Must be zero.

Bit 4

Set to zero for a time-base strip chart. Set to one for stepper-drive strip chart.

12 Motor steps that will drive the recorder one of its chart units: four-digit decimal (typically 200 for SPEX recorders).

13 Max speed of recorder (two decimal digits) in units of 10 steps/sec (typically 20 is 200

14 Duration of the marker pulse (two-digit decimal) in units of 10 msec (10 is 100 msec).

15

RS232:

Baud rate (two decimal digits).

Code 00 01 02 03 04 05 06 07 08 09
Baud 110 150 300 600 1200 1800 2400 4800 9600 19200 16 Four binary bits specify RS232 option output character with the following meaning, I (1 2 3 4):

Bit 1

If zero the character contains one'stop bit. If one, two stop bits.

Bit 2 and 3

If 0 and O. there are eight data bits in each character. If 0 and 1. seven bits per character.

If 1 and O. six bits per character.

If 1 and 1. five bits per character.

Bit 4

Unused.

Each RS232 character consists of a start bit. eight to five data bits ([Link], a parity bit (17:2,3.4, below). then the stop bits (16:1. above). Each bit passes out of XMIT DATA in the REMOTE connector (Section 6.2.1).

Element # Significance

17 Four binary bits specify RS232 option output character with the following meaning. left to right (1 2 3 4):

Bit 1

Unused

Bit 2.3. and 4

Parity option

000.100,010.110 - no parity 001 - odd parity

011 - even parity

101 - always 1 (MARK) 111 - always 0 '(SPACE)

18 CTS delay 00 to 99 (in units of 100 ms)

19 <ACK><NAK> delay. 00 to 99 (in units of 100 ms)

20 LF delay 00 to 99 (in units of 100 ms)

21 Four binary bits (1 2 3 4):

Bit 1

If one. 2-way RS232 If zero. 1-way RS232

Bit 2

Unused

Bit 3

If 1. datalogger output format If 0, standard

Bit 4

If 1. wait for <ACK><NAK> If O. don't wait

22 Four binary bits (1 2 3 4):

Bit 1

If one, < ENQ > CD before first CD2 transmission If zero. no < ENQ >

Bit 2

Unused

Bit 3

If 1. no checksum on input or output If O. checksum enabled

Bit 4

If 1, < LF> sent If 0, no <LF>

23 Revision level of proms.

23

4.2 Changing Gratings or Spectral Order

The mechanical counter on the side of your spectrometer is designed to read accurately only when the standard grating is fitted and run In first order diffraction. Should, for any reason, you wish to change the original grating or operate the spectrometer in a higher order for enhanced resolution, the installed grating configuration, element 3, will have to be modified.

After power up and calibration (Sectign 3), press CNFG. Element 1 will appear in the PARAMETER display. Press ENTER 4 times to get to element 5. If this is a grating change, key in the new density in grooveslmm, and press ENTER.

To move to a higher order; simply multiply the actual grating density by the order number. For example, a '1200 grImm grating should have 2400 in element 5 if you want to work in second order, and so on. Key in the modifications and secure with ENTER.

When you press HALT and the consistency check completes its run successfully, you'll note that the spectrometer POSITION reading has changed and no longer agrees with the mechanical counter. However, this position is the true one for the particular grating

. or spectral order in which you've selected to work. The mechanical counter on the side of the spectrometer does not read correctly. In addition, the parameters, such as START, END, etc., that define your spectrai scanning region, will all now refleCt the modification and you can go on to scan as though the system were actually designed around this new grating or order.

24

5. ERROR HANDLING

There are two families of errors detected by C02. The simplest type includes operations that are forbidden, such as trying to enter a number into the display without pressing a parameter key first. These blunders are answered with a beep.

The second variety of error detection extends to both operator and hardware malfunctions, and will usually be identified by the error codes at the end of this section. You may have neglected to turn on the stepper drive before you turned on the C02 (ERROR 26:C02 detects an open limit switch since there is no power to the circuit). Or you may merely have pressed the wrong keys (ERROR 81: invalid number entry).

In any case, error codes are usually accompanied by a beep and. where applicable. the offending parameter key is lit to help you localize the spot where you went astray. If the error is not too serious, you can usually CLEAR it, rectify the offending parameter, and go on as though nothing has happened. However, for particularly gross or multiple errors, you may have to resort to turning off C02's power and starting all over again.

When an error occurs on power up, pressing any key will send C02 back into the diagnostic routine to check if the source of the error has been eliminated. When an error has been detected during reconfiguration. press the EXAM key to display the offending entry.

Errors during reconfiguration may be especially taxing, for any modification of C02's configuration must be compatible with all other elements. In most cases, errors in reconfiguring result in C02 displaying the offending element. As an example of the difficulties the operator can get into, consider changing from a wavelength instrument that operates between 0 and 15000A, to a wavenumber instrument that 'operates from 30,000 to 11.000 em". If. on power up, you entered 9000 to calibrate position, on reconfiguring you will receive an error 53. Press EXAM and it will isolate element 4 to show you there is an inconsistency in limit values. Once you're aware of such a problem, however, you can anticipate and avoid it by calibrating to a number compatible with both configurations (e.g. 12000) on power up, irregardless of the actual counter reading. Turn C02 off and try again. Once you're successful, recalibrate to the actual counter value.

ERROR CODES

CODE # MEANING

01 ACIA (RS232) Status Reg Error

02 ACIA (RS232) Control Reg Error

03 ACIA (RS232) Command Reg Error

11 Read/Write Memory Failure (I.C. 44)

12 Read/Write Memory Failure (I.C. 39)

13 Read/Write Memory Failure (I.C. 15)

21 22 23 24 25 26 27 29

2A 2B

14 15 16 17 18 19 1A 1B 1C 10

Program Memory Failure (I.C. 3) Program Memory Failure (I.C. 4) Program Memory Failure (I.C. 9) Program Memory Failure (I.C. 10) Program Memory Failure (I.C. 15) Program Memory Failure (I.C. 16) Program Memory Failure (I.C. 17) Program Memory Failure (I.C. 22) Program Memory Failure (I.C. 27) Program Memory Failure (I.C. 28)

Command Out of Range

PIA Side A Failure

PIA Side B Failure

Timer Count Failure

Timer Slew Failure

Limit Switch Open Cable Invalid Command

Open Limit Switch Cable During Operation

High Limit

Low Limit

(I.C. 48) (I.C. 48) (I.C. 32) (I.C. 32)

30 35 .

36

Hardware Failure

Invalid Number Entry Math. Error (Divide by 0)

4O-5E Configuration Er'ror

press "exam" to review the bad entry if yo have tried to reconfigure. If a poweron test failure, press any key to retry the test that failed, else power off/on.

See below for possible sources of Configuration Errors.

SF Invalid Configuration of Baud Rate

60 Invalid Configuration of Cts Delay

61 Invalid Configuration of Ack Nak Delay

62 Invalid Configuration of If Delay

64 ACIA Control Register

67 Parity/Framing/Overrun

69 Invalid Command

6B < EOT> rx'd. Results in a halt

6C Loss of Carrier Detect < DCD >. Results in a halt and shut off of remote

60 Loss of Data Set Ready < DSR >.

Results in a halt and shut off of remote.

6F Loss of Clear to Send < CTS > for more than configured time, Results in a halt and shut off of remote.

70 Neither < ACK > nor < NAK > received within configured time delay after CD2A transmits a position line.

73 Unknown Command Received by C02A

74 Bad Operand for Command Received by CD2A

75 Received Command Not Allowed at This

TIme .

76 Missing Operand in Received Command

77 Received Line Has Too Many Characters.

78 Checksum Error on Received Line.

79 Limit Switch Hit

25

------Scan Time Errors-----Start Position Outside of Machine Limits Start & End Positions in Incorrect Order End Position Outside of Machine Limits Increment/Rate Entry Invalid Increment/Rate Entry Too Small « =0) Rate Too Fast

Dwell Time too Short « .01sec) No Scan Mode Selected

High Shutter Outside of Machine Limits Low Shutter Outside of Machine Limits Shutters in Wrong Order

Invalid Marker Period ... Value

Increment or Rate Out of Range

In Burst Mode, Increment = Integer Multiple Scan Increment for

Continuous Mode

Marker Period < Scan Rate Invalid Recorder Scale

In Continuous Scan, Invalid Scan Rate Continuous Scan Rate too fast for Selected Recorder Scales

81 82 83 64 85 86 f!1 88 SA

8B (8b) 8e 80 8E 8F

90 91 92

POSSIBLE CAUSES OF CONFIGURATION ERRORS

Element 1 a) wavenumber and Angstrom both

(may also be selected

Element 2) b) limit switch selected and no limit cable detected

c) MSD selected and ramp table is for LSD (special order situation only)

Element 3 (really element 3 or 4)

Element 5

Element 6

Element 7

limits in incorrect order

must be non-zero

must be non-zero

must be non-zero

Element 9

a) if MSD (Element 2) must be >00

b) if MSD (Element 2) must be ~40

c) if LSD (Element 2) must be ~ 02

d) if LSD (Element 2) must be s 50 (unless special ramp ordered)

a) must be ~ Element 9

10

b) if MSD must be ::s50

(unless special ramp ordered)

c) if LSD must be 0

(unless special ramp ordered)

bit 3 and bit 4 both selected

Element 10

Element 11

Element 12

must be non-zero

Element 13

must be non-zero

Element 14

must be non-zero

Element 15

must be between 00 and 09 inclusive

Element 23

Hardware error. Correct problem and start over.

ON RECONFIGUAATION

1) Normally laser line, shutters, and parameters are unchanged.

2) If the system type is changed (e.g. WN ..... - WL)

a) the counter reading must be reentered

b) shutters are reset to the limits (if they exist)

c) scan start, end, and set position are cleared

d) the laser line is cleared

3) If shutter is configured on after having been off, shutters are reset to the limits

4) If limits are changed or if steps per unit are changed

a) counter reading must be reentered

b) shutters are reset to the limits (if they exist)

26

6 SPECIFICATIONS AND PIN LOCATIONS

6.1 SPECIFICATIONS

Parameter Display: 8 characters, V2" high LEOs; for parameters, promoting messages, error codes, and selfdiagnostics.

Position Display: seven digits plus decimal point, V2" high LEOs, continuously update spectrometer position (in nm, A, etc) during movement.

Shutter Control: for PMT protection or auxiliary device such as a filter for any designated spectral range; pin 9 in MOTOR CONTROL set to ground in shutter region.

Drive Limits: pulses to stepper disabled when spectrometer reaches upper or lower boundary of the scanning range. Manual override only in direction away from limit.

Recorder Drive: TTL pulses, slaved at a selectable scale (e.g., untis/cm). Marker pulses, also selectable, calibrate chart scale.

Scan Parameters: Scanning in Continuous, Burst, or Triggered modes, between selected limits. Burst dwell from 0.01 to 600 seconds, or through external trigger. Burst dwell from 0.00001 to 105 scan units (nm, etc). Continuous scan rates settable to 0.001 units/sec, in accordance with scan rate table. Repeat up to 999 times, delays 0 to 655 seconds between repetitions.

SCAN RATES

(Actual rates are a function of individual spectrometer and gratings)

Continuous Scan Rates (See 3.4.3)

Step NORMAL
Instrument Resolution (No ramp)
1269 (1) 0.0002 nm 0.0001-0.8 nm/sec
1403 (2) 0.0025 cm·1 0.001-10 crrr'zsec
1404 (1) 0.00025 nm 0.0001-1 n/sec
1680B (1) 0.02 0.001-10
16818 (1) 0.02 0.00'-'0
1701, 1703 (1) 0.0025 ern- 0.0025-10 crrr' /sec
1702, 1704 (1) 0.00025 nm 0.0001-1 nm/sec.
18708 (1) 0.002 0.0001-1 nmisec
1870C (1) 0.00025 nm 0.0001-1.0 nm/sec
(1) Equipped with 1200 grImm grating, first order.
(2) Equipped with 1800 grimm grating, first order. HI SPEED (Ramped)· 0.8-5.6 nlsec 10-70 crrr' /sec

1-7 nm/sec

10-90 crrr' /sec

1-7 nm/sec

1-7 nm/sec

1-7 nm/sec

Ramping: software controls starting and maximum speed as well as acceleration . . SET POSITION: slews to a spectral position and halts automatically.

Status Outputs in TRIGGER Connector:

Line 1 - Indicates that the spectrometer is slewing to a START or SET position.

Line 2 -Indicates that the spectrometer has reached its START wavelength (or wavenumber), and is waiting for further instruction, such as a trigger pulse.

Line 3 -Indicates that the spectrometer is stationary at its selected upper wavelength (wavenumber) scan limit, and is [Link] the next command.

Line 4 -Indicates that the spectrometer is awaiting the next trigger pulse or burst dwell to expire.

27

Driver Unit Inputs:

Scan Direction: TTL high, forward; TTL low, reverse Scan Steps: TTL negative going pulse, 1 }'Sec wide or greater.

Motor advances on 0-1 transition of pulse.

"Power:

Control Unit Driver

1151230V, 50/60 Hz SOW 90W

.Dimensions:(HWL, em}

Weight (kg):

14x46x30

7

6.2 PIN LOCATIONS

6

6.2.1 CO Rear Panel

....

5 4 3 2 1 9 876

TRIGGER

13 12 11 10 9 8 7 6 5 4 3 2 1

25 24 23 22 21 20 19 18 17 16 15 14

PIN NUMBER TRIGGER

1 TRIG. •

2 ENABLE 1·

3 ENABLE 2·

4 ENABLE 3·

5 ENABLE 4·

6 GROUND

7 GROUND

8 GROUND

9 GROUND

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

MOTOR

OS·

01

DO

DP

03

02

SS1 ..

+5VDC [Link]. - FRWD - STEP - LO. LIM + HI. LIM. + GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND

MOTOR,REM~E,RECORDER

REM~E (RS232) CHASSIS XMIT DATA RECV DATA RTS

CTS

DSR GROUND DCD

(SCA) DTR

N.O. - Normally Open; N.C. - Normally Closed

28

RECORDER PEN COMMON PEN N. C. EVENT N. O. EVENT N. C.

PULSE + PULSE - FRWD + FRWD -

GROUND PEN N. O. GROUND EVENT COM. GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND

6.2.2 Mini-step Driver (MSD) with typical options (S,ee Section 6.3)

.

,j:;:~~Y~'.~ 1

2 3 4

5 6 7 8 9

10 11 12 13 14 15 16 17 18

19 20 21 22

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

CONTROL INPUT ,j,;':;.;. (25-pin female)

SHUTTER OPEN (neg. true) FORWARD

STEP

LIMIT SWITCH LOW (pos. true when open) LIMIT SWITCH HIGH (pas. true when open)

RET

SHUTTER OPEN RET FORWARD/RET STEP/RET

LIMIT SWITCH LOW/RET

6.2.3 Large-step Driver (LSD)

MONO OUTPUT (9-pin female)

Pin #

1 2 ";"'3 r"""-:4 ",5 "6

7 '.: 8

9

,::~~i>~~-."· ;"'~'- .. '

~---- :'~~J~~~~: -

Pin #

01 03

024 COMMON SW HIGH LIMIT SW LOW LIMIT 013 COMMON 02

04

SW LIMIT/RET

29

MONO OUTPUT (37-pin female)

Motor Phase 01 Motor Phase 02 Motor Phase 03 Motor Phase 04 Motor Phase 05 Motor Phase 06 Motor Phase 07 Motor Phase 08

+ 24V/RET

+5dc (to counter lights etc.)

LOW LIM

01/RET 02lRET 03/RET 04lRET 05/RET 06/RET 07/RET OS/RET .

AC GND

+ 24V SHUTTER SUPPLY XH1 CLUTCH XACTIVE ( + 24V)

GROUND (VAC/RET) HIGH LIM

CONTROL INPUT (25-pin female)

9 10 11 12 13 21 22 23 24 25

N/C

DIR

STEP LSWL LSWH 5V/RET 5V/RET DIR/RET STEP/RET LSW/RET

6.3

MSD Options

Each MSO driver has a set of 12 pairs of pins that define the way the driver interprets signals it receives from the controller unit (C02. OATAMATE. etc.) or from the spectrometer itself. Each pair of pins is labelled appropriately on the circuit board and to enable a function listed below, a jumper must be placed across the specified pair only.

6.3.1 LIMIT OPTION

The six pairs of pins that define the way a signal from a spectrometer limit switch is interpreted are AH, BH, CH (High limit input pin '3l on MSO driver connector) and AL. BL. CL (Low limit input pin 18). One pair in each of the two groups should be jumpered to give the following performance.

High Limit Input Oumper within one pair only)

AH - High limit condition achieved on receipt of an Active High (+ SV)

BH - High limit condition achieved on receipt of an Active Low (OV)

CH - High limit condition disabled

.

Low Limit Input Qumper one pair only)

AL = Low limit condition achieved on receipt of an Active High (+ SV)

BL = Low limit condition achieved on receipt of an Active Low (OV)

CL = Low limit condition disabled

6.3.2 STEP, STEP

When a jumper is [Link] across one of these pairs, MSO expects a STEP Signal from the controller unit (pin 11 on rear panel of C02, OATAMATE, etc.) to take the following form:

STEP - A positive pulse for STEP STEP - A negative pulse for STEP

6.3.3 DIRECT. OPTION

When a jumper is connected across one of these pairs of pins, the MSD expects the FORWARD signal from the control unit (pin 10 on rear panel of C02, DATAMATE, etc.) to take the following form:

A - FORWARD is High True (+ SV) B - FORWARD is Low True (OV)

6.3.4 SHUTTER OPTION

When a' jumper is connected across one of these pairs, the MSD supplies current to the shutter when the control unit (pin 9 on rear panel of C02, DATAMATE . etc.) gives the following signal:

A - current supplied to shutter when input is Low True (OV)

B -current supplied to shutter when input is High True (+SV)

30

· Technical Notes'

30 March 1983

Technical Note No. 0- 3

External Control over COMPUDRIVE through RS232

The CD2A COMPUDRIVE's keyboard puts control over any SPEX spectrometer at your fingertips. Scan a spectrum in continuous, trigger, or burst modes, set to a chosen wavelength position; trip a shutter or slave a recorder - all at the push of a button. Yet, the occasion may arise when there's need to go a step further in automation via an external computer without suffering the headaches of hardware interfacing and software generation. After all, keeping track of motor steps, limit switches, ramping and backlash removal can be an intimidating chore. That's when you'll begin to appreciate the two-way RS232 interface that is a standard feature of all CD2As.

In its simplest role, the RS232 interface is just a communications port that outputs spectrometer position and status to an external device, such as a printer. The full potential of the interface, however, is only approached when a computer is linked with CD2A to take the place of the operator's fingers. Now programs generated in your favorite language send standard ASCII characters through the interface to specify scan regions, set destinations and other relevant parameters. On signal, CD2A performs, keeping track of the detailS, slewing when necessary, removing the backlash, activating shutters, and performing any other operation normally ordered from the keyboard. And, when the job' is done, CD2A signals the external computer that it's ready for the next assignment.

In this Tech Note, we'll present an example of a program that externally commands a CD2A through an Apple III computer. The flow chart and logic can readily be adapted to any computer that happens to be available to you (as long as it has an asynchronous, full duplex RS232 input/output channel). A complete description of configuration choices that will make your COMPUDRIVE compatible with other devices is presented in Section 3.4.13 of your instruction manual.

Because it is didactic, the program to follow has been kept rudimentary. Designed to deliver access to CD2A's functions without any reference to the details of data acquisition, storage or processing, it demonstrates how to control your spectrometer and may become the kernel of a more sophisticated master program.

Configuration

The first step is to set up a rapport between the two communicating devices by matching configurations of

the two RS232 ports. We chose 9600 BAUD, no parity, and 8 data bits. This particular set of parameters is not mandatory; others will work, as long as both CD2A and your computer are in accordance.

To link CD2A and APPLE III, a null-modem cable was connected to their RS232 ports. This arrangement crosses the transmit/receive, ready-to-sendlclear-tosend, and various control lines between the instruments (Fig 1), a necessary step since both devices are DTE RS232 (Le. terminals).

Figure 1

A null modem cable consists of an RS232 cable wired as shown above.

At both ends, pin 1 is grounded to the metal mainframe. Pin 2 (data transmission path) at one end is connected to pin 3 (data reception path) at the other end.

Pin 4 (request-ta-send line) at one end is connected to pin 5 (clear-to-send line) at the other end.

Pin 7 (signal ground) is connected to pin, 7.

Pins 6 and 20 as well as pins 8 and 19 are crossed, here somewhat specific for the case of the Apple III computer.

The Program

The scenario of this program proceeds along a fairly conventional format. Apple III prompts the user to

31

Initialize
Apple RS232

Select
Transmission I.-

li'ansmit
Command
Prompt
User For
Value and
Transmit
,__
""'1.-
... ~
-
~
po-
Prompt
User For
CD2A
Command
;:
Interpret
Command
"-
Handshake
and
Error
Reporting

Determine
RS232 2
Status
2
2
L...2 100 120 1.0 160 180 200

CLEAR

[Link] (Z) : £TIS_CHitS C l) ICANS_CHRSI241 :[Link] (6' EOTS_CHRS 14, ~.NA.$.C:HRS e211 :NUU···

DIM ee ... ndS(lO) .lc:[Link](121

GOSU8 2010

~:E!::i:; .;"R$(7) J·tlolln on c:ct4: Zw.y r .. .,t •• then hlt the- RETURN key on

INPUT·-: zzzS:PIINT

HOfItE:cnOlC'''.O:O''.O

GOSU8 1100lA£JiI eno&c" [Link]

IF 2Q)d'OlC'. ANO chou:.)O THO liD "PI

INPUTIl res

PRINT:GOTO 260

e~ndS _NUU e fc:.,...[Link].S ,VAlueS -NUJ.$ IF c"0Ic.)10 THO ".0

011 choJ,c. GCSUI " .. O.S60.'IO.[Link].0.'80. 700. 720 C01'O 460

ON C'h01C.-lO GOSUI 740.160. 710.100.'20.'40,860 •• 10. soc .n .... r.O:ok.O:RCII pr ••• t for error

GaSUl 1760,AEM qet cd2·. , •• pon ••

II' .n .... r<>oit ftDl 340

PRINT·cd2 [Link]-:COT'O 260

fc;[Link]. -$- .nxs ,,,,,,,,1'-0: ItETURIf fC"_'[Link]. ·T·. axs ''''''''1'.0 ~ JI£1'URN

te .... [Link]··p··E'fXS~ .. n._I'.Ot.£TU1UI fco...[Link].-Z·. axs 'Ana_r_O z AE1'U ••

re .... [Link]+CH .. S« 14 •• tn:S IlIn ... ,.-O I .£TURN [Link]. ·H·. ETXS [Link]-O ,ItETURN e~[Link].·ST·:GCSU. 910laETUItN c~nd$.SnS.·U·:GQ5U. 910zltETtl ..

c .... [Link].·IZ·:GClSU. 'IOIJ£1'U1Ut co-..[Link].·SJt·:GQSU. 'IO:l£ttJRN co-..nd$.STXS.·OT-:GQSUa 'IO*~RN fea..[Link].-[Link]$'lIn.w,..O z RETURN fc:~ndS·SnS··n.-·ETXSIAn._r·OIJt£TU ..

e [Link].·SH·sGQSU. ,[Link]

C' [Link].·SL·:GQSU. 'IO~IftU_

eo..[Link].·SZ·,GOSU. '[Link] co-..[Link].·NS·:GOSU. '.OaRE1'U1Ut [Link].·SD·:GQsua 'IOzltE'!'U ... c .... ndS.S'!'XS.·t.L·sGQSU. ,aOsJtE1'URN .COO

IEII

REII

INPUT·ent..,r YAlaw ·,[Link]

PRlft CHRSllll,· -:IF l..[Link]~S)8 tHDI'

10

tC' ndS·e~ndS··'.lueS·£TXS

.n r_O IACTUIUI

REII

"Ell

VPCS.l: HPOS.I: INPUTI1,CS Sc:h01C' •• O

"Ift-1 ~KAn 7 •• tArt. po.l. [Link]·

PIUNT·2.tr1,,~r.e.n [Link] po'1t..on-

'.INT·3 .. qo to •• e politlon [Link] lncr .... nt·

PRINT·[Link]'19qer [Link] 1nuo~. sc.n ,.t"'-

PRIft·[Link]. lor [Link] [Link] ct_ll '1:1 .. •

PRUIT-'.hAlt C .. ICAn ty~ COntlnuoua-

PRINT· D ... eAn t.Y'~ bur.t.-

'RINT· £.anYt~.r h19" [Link]·

PRINT- r •• [Link] low po$[Link]"

PRINT- G.a.t [Link]-

PRINT- [Link].o.r of Scans·

'IUNT· [Link].n [Link]-

PJIlNT·En~.r ChOIC.: J.l ••• r IJ.n.·

PRINT-?· :

1 NPUTIl,CS

ON lao GOTO 1560 HPOS·lzVPOS-20 INPt1T, 1 rCS

IF LDUCSI<10 THEN 1460 PRINT CS,CHRSflll:

GOTO 1460 •

.EII

If' 18D)ASC, .:., THat 1740 IF K8D<A,SC'·O·, THai 1740

IF ASCI-A-,> lao ME) 180>ASC,-,-. THEN 1740 HPOS.2: 'IPOS. 1 4

PRINT CHIS,IBO. r zlr KaD)ASC{·'·' THEN 1120 enou: •• TEIIICHRSfl8D) ,

PIIIIT CHISClO) ,CMKSUl, J

POP!.E'!'tJRII

enoic.-TDIt ·[Link] ,IID-ASC'·C·' .41. IIGOTC 16BO POP,GOTO 1100

Rat _It tor ac •• can or IIc •• bell or nAk ,RIIITII, fc"_'ndSr

REII waH • httl. for cd2 t:o .n.'4r "Ell

INPtrrll,.n ..... es

IF LENllinawrSI >1 THEN 1900

IF ASCI"ID$'.n rS.l.1".Ase'ACItS' THEN 1940

IF ASCUUDSI.n rS~1.1' j_ASC,NAKSI THD 2020

.[Link].l:RETURN=REJI ~nknown [Link]. fro. ed2. shouldnt l'[Link].n

IF ASC,"lDS t.n es , 2 .. 21 ) .ASC 'CANS I THEN 2000

JF ASCfMIDS'.n rS.2.2) )<>7 THEH 1920 -

PRINT-c:d2 ",rror c:od. la; • :fUGHTS'.n ..... r s , 2, :.nl~ral: RETURN .n .... r.O: RETURN I REM .11 ok

PRJ NT- -:GOTO 1760

.EII

"Ell

DIM CSUDI

INVOKE-REQUEST _IW- :vJ -Ote-1

casus 2220:R£M q.t: lnl~l.l r.2l2 st..u,a.

SUBS I $$.141 -CHRS f 1211 :[Link].12IaCHRS f 240) .CHRS (0) .CHRS (2401 PERFORM CQHTJ«J&"I'C .. ,5SI RS

RETURN

"£"

RS·-.RS2J2-

OPEH'[Link]

caSU8 2120:RETURN:REM q.t r.232 sUtu. REII'

"E"

Col

PERf"OAM STATUS, 'C • '5S I RS RErUMN

END

220 240 '60 ,10 ]00 )20 ]40 ]60 lIO .00 .20 •• 0 460 • 10 SOO S20 HO S60 SIO 600 620 .. 0 060 •• 0 100 720 140 160 110 100 820 140 860

"'0 .00

.20

"0 960

910 1000

1020 1040 1060 IglO 1100 1120 1140 1160 1110 1200 1%20 1240 1260 1210 1300 1320 U.O 1360 1110 HOD H20 1440 1<160 1410 l~OO 1S20 IS'O 1560 ISIO 1600 1620 16.0 1660 1610 1700 1720 1740 1760 1780 1100 1120 1'40 1160 1880 1900 1920 1940 1960 1980 20aO 2020 20.0 2060 2G80 2100 2120 2UO 2160 2110 2200 2220 2240 2260 280 2300 2J20 ]40 )00 l80

Figura 2

Apple III BASIC program for external control of CC2A COM PUC RIVE via RS232.

32

1

supply a command (START SCAN, GO TO SET NOTE: Triggers for trigger-scan modes may also be supplied via the
POSITION, ENABLE TRIGGER SCAN, etc. Section RS232 port. In this program. a trigger is sent to CD2A each time the
[Link]) or to alter a parameter value (Start Position, menu choice of trigger is entered on Apple Ill's keyboard (in this case
Number of Scans, Laser Line, etc.). Once this "4" Step 1180). This transmits a "T" (step 560) which corresponds
information is typed in, Apple III relays it to CD2A which to a hexidecimal 54 (See Fig 3).
then executes the command or alters the parameter 'HEXADECIMAL
value. When the action is accomplished, CD2A signals MOST [Link] CHARAcrER
Apple III which again prompts the user.
To run the program, load it into your Apple III and 0 1 2 3 4 5 6 7
execute. Refer to Figure 2 and note the following 0 NUL OLE SP 0 @ P p
sequence of events: 1 SOH DC1 1 ·A Q a q
I 1. Steps 0 through 180 (including the subroutine 2 srx DC2 " 2 B R b r
2080-2380) are spent configuring Apple Ill's RS232 3 erx DC3 # 3 C S c s
for CD2A compatibility. 4 EOT DC4 $ 4 0 T d t
2. At Step 200, Apple asks the operator to switch CD2A LEAST 5 ENQ NAK % 5 E U e u
to the REMOTE mode. SIGNI- 6 ACK SYN & 6 F V f v
FICANT 7 BEL ETB 7 G W g w
3. Step 260 calls up the subroutine 1100-1740 which CHARAC-8 BS CAN 8 H X h x
prompts the user to supply a command or parameter TER 9 HT EM 9 I Y Y
name to be passed along to CD2A. If a parameter A LF SUB J Z j z
is selected, steps 660-1040 ask for a numerical value. B VT ESC + K [ k {
C FF FS < L \ I
4. Steps 280 to 420 interpret the operator's response D CR GS M 1 m
to select the correct transmission to CD2A (See E SO RS > N A n ::::
Section [Link] of your manual). The actual F SI US ? 0 o DEL
transmission takes place in Step 1780. EXAMPLES
5. Steps 1800-2000 wait for handshake acknowledge
from CD2A that the message was, in fact, received. W = 57
.If an error is detected, control characters are stripped H = 48
off the transmission, and CD2A's error code is a = 61
displayed for the operator on the Apple CRT. t = 74
@ = 40
6. The operator is once again asked to supply a NUL = 00
command or parameter name (Step 260). DEL = 7F
Figure 3
ASCII Code Conversion Table 33

7 INDEX Limit switches, 18
LO End, 7
ADJUST,18
Manual adjust, 18
BURST mode, 17 MARKER ON, 8
MARKER PERIOD, 8
CAL,17
CLEAR, 6 Numeral keys, 5
CNfG,17
COMMAND keys, 17 PARAMETER, 5
Computer Control, 8
Configuration, 17 PAUSE,18
table, 21 POSITION,5
CONT,17 Pin locations, 28
maximum rate, 7
Ramping, 7
Deltawavenumbers, 8 RATE,7
Driver unit, 24 RECORD ON, 8
DWELL TIME, 7 RECORD SCALE, 8
Recorder, 7
END POS, 7 REMOTE,8
Error, handling, 25 REPSCAN, 7
EXAM,6 RS232,8
External Control, 8
External Devices, 8 SCAN, 17
SCAN DELAY, 7
Gratings, change, 24 SET, 18
Shutters, 8
HALT,18 Specifications, 27
HI End, 20,18 Spectral Order, 24
HI SPEED, scan, 7 START POS, 7
Start up, 5
INC/RATE,7 Status lines, 19
Installation, 3 Step resolution, 27
Keyboard,5 TRIG SCAN, 18, 19
Trigger Inputs, 21
Laser line, 5 34

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165

read_chars

Pg 3 of 8 111-165

LL--until (spr<>chr($80» or (i=100); wait for char:=(i<>100);

_ _

end;

(***********************************************************)

(* This function reads num_of_chars into the buffer rd. *)

(* In addition the characters are returned as a string. *)

(***********************************************************)

function read_chars(num_of_chars: integer): string;

var

rd : cbuf;

spr : chari

i: integer; temp: string;

(* read data buffer *) (* serial poll response byte *)

begin temp:=' • ; i:=1; repeat

if wait for char then

[begf~rd(:ompUdrive,rd'1) ;

if «ibsta AND ERR) <> 0) then error; ~em~:=concat(temp,rd[1]);

1.:=1.+1;

end;

until (i>num_of_chars) or keypressed; read_chars:=temp;

end;

(***********************************************************) (* Send the message using first_char to initiate and etx *) (* to terminate, then wait for a response and read until *) (* no more characters. * ) (***********************************************************)

Procedure Send_Message(first_char: chari message: string); var i: integer;

wrt : cbuf; (* write data buffer

length_message: integer;

*)

begin

(* Determine length of message

*)

length_message:=length(message) ;

(* Put the first character into the write buffer

*)

wrt[1]:=first_char;

(* Put message into write buffer starting at position 2 *)

for i:=1 to length_message do

wrt[i+1]:=message[i]i

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

100 101 102 103 104 105 106 107 108 109 110

error

Pg 2 of 8 56-110

EProcedure error; begin

writeln (' Error'); prvars

end;

(***********************************************************) (* This routine displays the result of a read on the screen*)

(***********************************************************)

rocedure display(result_str: string); var i: integer;

ch: char;

begin

for i:=l to length (result_str) do

begin

ch:=result str[i]; if ch=bel then

[beg!~tOXY(10'21); .

clreol;

write('Error code ='); error_in_process:=true; end;

if (ch in [bel, 1 f , cr, I I..' ~ , ]) then

[begin write(ch); end

else

if error_in_process then

if ch<>eot then

write (ord(ch) :4)

else error_in_process:=false;

end;

end;

(***********************************************************) (* This function waits for characters to be available, or *) (* until a particular *) (* delay has been reached. The *)

(* function returns true if characters are available *)

(* otherwise false. *)

(***********************************************************)

function wait for char:boolean; var i: integer;

spr : char; (* serial poll response byte *)

begin i:=O;

'repeat

i:=i+1;

ibrsp (compudrive,spr);

if «ibsta AND ERR) <> 0) then error;

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

prvars

Pg 1 of 8 1-55

(****** Turbo Pascal Example Program - Device Level *******)

program main:

uses crt,tpdecl;

Type

cbuf = array[l •• 13] of char;

Var

bd : integer;

compudrive : integer;

result str: string: (* error_In_process: boolean; ack,

bel,

ch,

can,

cr,

eot,

etx,

If,

nak,

so,

stx: char;

(* board or device number *) (* device number *) Result string for each read *)

(***********************************************************) (* This routine would notify you of the values of status, *) (* error, and byte in the event of errors. *) (***********************************************************)

EProcedure prvars; begin

writeln ('ibsta=',ibsta,' iberr=',iberr,' ibcnt=',ibcnt)i end;

(***********************************************************)

(* This routine would notify you that the IBFIND call *)

(* failed, and refer you *) (* to the driver software *)

(* configuration procedures. *)

(***********************************************************)

EProcedure finderr; begin

writeln (' Find error'); end;

(***********************************************************) (* This routine would, among other things, check IBERR *) (* to determine the exact cause of the error condition & *) (* then take action appropriate to the application. For *) (* errors during data transfers, IBCNT may be examined to *) (* determine the actual number of bytes transferred. *) (***********************************************************)

Instructions for the C02B compudrive

The operation of the CD2B compudrive 15 similar to the operation of the C02A, except that the CD2B receives and transmits data through the IEEE-488 bus rather than the RS-232 interface. The commands used to communicate with another device through IEEE-488 interface are the same as those used to communicate through the RS-232 interface.

To install the CD2B, follow the instructions in the CD2A manual. The configuration table has been set at the factory for communication through IEEE-488 bus. Element 21 has been set for two-way RS-232 interface and element 15 has been set for a baud rate of 4800. Increasing the baud rate may decrease data integrity. If it is necessary to change these settings, refer to the C02A manual, section 4.

The IEEE-488 address of the C02B has been set at the factory as device #10. To verify the address, check the settings of IEEE- 488/C02 switches 1-5 on the rear panel of the C02B. The address can be determined by adding together the hexadecimal numbers of switches 1-5 that are set to 'HI'. For example, the switch settings below assign the address 10 (8 + 2}.

switch setting switch number Hex number

LO 1 16

HI 2 8

LO 3 4

HI 4 2

LO 5 1

LO 6

LO 7

HI 8

To change the address, change the settings of switches 1-5.

After the CD2B has been turned on and has completed its selftest, press the Remote key. The C02B is now ready to be controlled by another device through the IEEE-488 interface.

CONFIGU~ATION section, and [Link] to right, you can see that 0100

. .'. ..' . . '. ,', . . .' translates into a wavelength (0) drive system that reads

cf ~q2;~mes to youwitry. a:~nfjmlrat~,?1i bestsl:Jited. .: h~' cjng~troms (1). The n;e?'~rll!mber. is .always zerO- {O),

'j( r parti~ul~rinstruirle:nt'~d.-[Link]!11erifaf. designs. ..' blltthe last t~m;' .us' no P.M:t:protectioR ts. inStal!ed (0). . '.. ,

lwever, shoulc;l. yPu af any time ,Want: ~ . modifY" yOu": '. . ':, " .•.. .: , •. ' .. ', .'">.' ,_' .':'. :.... • : ~ :"~'" .' :: ~: : .. : :':.-:'

st;",; by sli~stituting ~ gratjng'~ith 'fl' differenfgrooV9: " ... ·bth~.r ~~m.~n~ . .may be 01. the -de~[Link]~·:sYc~:'~s:'··" .... :.:.::: ., I:.:' :

m ty, anOther [Link], or even change to a " . elelnent fi~e. ![Link]-~~d 1~OO to ~ignify:a Ql:Bting .. ~ith .:' " ;

llT ..... [Link] speCtr9meter,. you'll find C02' 1200 gr/~r·has been installed'iri the-instrument, ~ '. '.' "'~ .. :., ..

ady and w![Link] adapt tQ the 'situation' with on IV a ..' '. .... . .. . ... :.. .' '. .... j!

w ~~[Link] mpdifi¢atiQ.~s:~ft~e configura~iofl·ta~I~. ..~ To .. alte(a<lonfigurati~r eleinent,.press·[Link] CNFG ~ey, :'.:" :: :, .

1E I:) chang'~s. ar.e: volatile, so· the next tim.e [Link] powe( :. t~en .. Ef:-ITER until the' chosen el~ment ap'pears. Key in. " ". '. l . ;

), the .. fac~ configuration. reappears." . .: .., . .tne nev.: value, ·I~ck in with 'ENTER, 'and move on. ~o the' .:.' !

.. <,: . • .. , .... '. '. '.:. . ..... : • . :" next-element on 'your hsCWhE:[Link], press'HALlo' A. ~

:;( $S to t"e configu~~ion .. ·table is thr~gh [Link].G .: row· of dashes(-) iiJ the f?ARAMATE~ .displayS signals' :

;)y~tien you press lt whilethe CO~.[Link]., t~e·firSt. :that. 002 .. :ls· contlrming·:.that'the· moqifjeati9n' 1$'. . . ..... . •

. sment ~n"the table; appears; You can .Step [Link] the' . [Link] with' the remaining 'C9rifigil(C~tiori elements... ..' . '. f.:.' i

;)~?f the elements by pressing ENTER till you reach ·(B~. pat!ent,··rec'omig·[Link] aboutrtnseccnds) .

1€ 35t, or 23rd element. The next ENTER returns the If the new configuration is' cleared, C02 returnste

ollliguration table to the first element, and so on. normal operation with a beep. If not, an error code IS displayed (Section 5). Press EXAM to view the offending element. (You can change as many elements as you like, as long as they're mutually compatable.) Severely. illogical modificatiqns' of the configuration elements may necessitate turnir:tg off the_C02 and tj_eginnir:'lg from scratch. All modifications of the configuration from the keyboard are lost when the power is cut.

==san

I- • ONLY WAY TO EXIT CONFIGURATION MODE ,fER AN ALTERATION IS .BY PRESSING HALT.

. .'

JQnfiguration elements come in two forms, 4-bit binary lrecimal. Note that element one, for example, is a [Link] presentation of four bits, each having the value :ero or one. Referring to the table at the end of this

l.1 C02 Configuration Table

ement #

Significance

1

Four-bit binary code, left to right

1 234

First bit

If one, the spectrometer has a wave-number drive. If zero, the spectrometer is wave-length drive.

Second bit

(Only applies if bit 1 = 0)

If one, the spectrometer untis are angstroms.

If zero, the spectrometer units are nanometers.

Third bit

Must remain zero.

Fourth bit

If one, a shutter is installed for PMT protection. If zero, no shutter has been installed.

2

Four-bit binary code" left to right

1 2 3 4

First bit

Must remain zero.

Second bit

If one, the spectrometer is fitted with limit switches. If zero, no limit switches.

Third bit

Undefined.

2

Fourth bit

Type of drive unit:

1 = Mini·Step Driver (MSO) o = Large-Step Driver (LSD)

3 Six decimal digits specify the lower (in wavelength, upper in wavenumber) mechanical scan limit of the spectrometer.

21

j

. _.-. __ .,-,

.'

/ j.

Element # [Link]

. . '. _ .

. : '4 .: :: Si~d~cipi~1 digits s~[Link]·uppedin·~a~elength,·I~er [Link]~~i:nbe~l~e~ha~ic~i Iiml~·~f.;~e·~p~(

: . .: •...... .: ": :-::.: . ". tmmetee:. C02..[Link]·:~(lowingly· <:f~ive th8,spectrqm~IeF."[Link]' ttle li{Rits s~t. by-'el~mel:l1s ·3;an,·

:.: :'~'.: : '. ' 4·[Link]"[Link] with·ah:erfor·code: .. ;"~ :.;" ' ': ' i '> ••• : •••••

• : : -:; ~ ," •• ' ••• ~~ :~.:.~ •••••••• : : •• :,' e •• :: .' ••••• : •••• ' : ,0 ••••••• °0' •• 0. ., .

. .' :: . . 5':: '. FOUF decimal digit~ specify the 'grQoves/~m 'of the grating.~ctLi~IIY in~talled .i~·the ~pe~tromeier.( e.c

. '.' ." :1200)., '. '. . . '. . w

..

-,

':

.·6 .' . "A fOl:lr:.aigi~' n~m~er specifje's·.th~. ~~ocive.~/rtlm .ofthe· standard gr~ti~g,Jbat is, th~: one':for'~hiCh·th •.

..: '.:: '.rru3oh~r.1ical counter' on the s_iae of tfie ·speq_tr9meter. 'i~' accurate. '. .. .: .: . .

. .. -. . . . .'. ... .

'. . .' .. ' ~. 7' .: ..: FOiJr'~~·i.~~L digit~ f~r the hU,[Link] of motor ~teps'·~ha~. ~i·[Link]: iti~'~~~~fr~me~er one spe'ctra:l ~rii .

. :. :. . '. ..[Link] standard gfatin'g, ,e'.g. 400 for- 1.400 and 1700 series' spectrometers. and 50P for a 12-69 (all MS[ .

.. ' > .. ::: .:_·.·,:·qrlve·rs):5~·fo(~SD:s , .. : ;':: .. '.'." . :'. ~':: .. ~' .~.' f.' : "':' : ..

. , :' : ':-.e, '. '. l!nits' Qf. ~a~kja:sh~~~o~ei:rir~~ s~~ctrometer driv~ in' revei~e'to '~~'proach START dr' SET' pb~;'ti~~

9 Start speed of spectrometer slew (two decimal digits) in units of 100 steps/sec MSD, (typically 4C is 4000 steps/sec) 'or 1 Osteps/s LSD. (50 for LSD):

1 a ~aximUn'I·sp~e.d of spectrometer (two. decimal'digits) in units 'of 1000 steps/sec MSD (typically 2f

is 28000 steps/sec) ?r 10~ step/s LSD (0 for LSD) . . '. . .' . .

11 'Recorder options is a four-bit binary code (usually reading 0101), formed from the following three-bi binary set, left to right (1 2 3 4):

Bit 1

Unused

Bit 2

If one, a marker exists. If zero, no marker.

Bit 3

Must be zero.

Bit 4

Set to zero for a time-base strip chart. Set to one for stepper-drive strip chart.

12 Motor steps that will drive the recorder one of its chart units: four-digit decimal (typically 200 stepslir for SPEX recorders).

13 Max speed of recorder (two [Link] digits) in units of 10 steps/sec (typically 20 is 200 steps/sec).

14 Duration of the marker pulse (two-digit decimal) in units of 10 msec (lOis 100 msec).

15

RS232:

Baud rate (two decimal digits).

Code 00 01 02 I 03 04 05 06 07 08 09
Baud 110 150 300 I 600 1200 1800 2400 4800 '9600 19200 16 Four binary bits specify RS232 option output character with the following meaning, left to right (1 2 3 4):

22

Bit 1

If zero the character contains one stop bit. If one, two stop bits.

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

find_the_device

Pg 4 of 8 166-220

166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220

(* Put etx as the last character in the write buffer *)

wrt[length_message+2]:=etx;

(* Now write the buffer

ibwrt (compudrive,wrt,length message+2); if «ibsta AND ERR) <> 0) then error;

*)

(* If first char <> can then wait until characters are *)

(* available then read one at a time until none are *)

(* available *)

if first char <> can then begin-

while not wait for char do;

gotoxy(10,21) ; clreol;

[repeat result_str:=read_chars(l); display(result_str);

until not wait_for_char;

end;

end;

function find the device(name: string): integer;

var i, _ _

len_name: integer;

devname: nbuf; (* device name buffer *)

begin

len name: =length (name) ; if len name>nbufsize then len-name:=nbufsize;

devname:=' , ;

for i:=l to len name do devname[i]:=name[i]; find_the_device:=ibfind (devname); end;

procedure initialize; begin

(* Initialize a few variables

*)

ack:=chr(6); bel:=chr(7); can:=chr(24); cr:=chr(13) ; eot:=chr(4); etx:=chr(3); If:=chr(10) ; nak:=chr(21);

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275

show_message

Pg 5 of 8 221-275

so:=chr(14); stx:=chr(2); error_in_process:=falsei

bd := find the device('gpibO '): ibsic (bd); _

(* Assign a unique identifier to the device "compudrive":

*)

compudrive := find_the_device('DEV10'); (* Check for ibfind error:

if (compudrive < 0) then finderr;

*)

(* Clear the device:

*)

ibclr (compudrive);

(* Check for an error on each GPIB call .to be safe •••

*)

if «ibsta AND ERR) <> 0) then errori

clrscr; gotoxy(10,10); write (bel,

'Turn on CD2B remote, then hit any key on your PC'); while not keypressed do;

ch:=readkeYi

[repeat result_str:=read_chars(l) i display(result_str);

until not wait_for_char;

end;

(* Display a message on the screen at column x, row y

*)

EProcedure. show_message(x,y: begin

gotoxy(x,y) ;

write (message) ;

endi .

integer; message: string);

(* Put the menu on the display

*)

procedure show_menu; begin

clrscri

show message(10,3,'[Link]'); show=message(10,4,'[Link] scan'); show_message(10,5,'[Link] set position'); show_message(10,6,'[Link]'); show_message(10,7,'[Link]/continue') ; show_message(10,8,'[Link]');

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330

get_and_send

Pg 6 of 8 276-330

show_message(10,10,'[Link]');

show message(50,3,'[Link] position'); show-message(50,4,'[Link] position'); show=message(50,5, '[Link] increment'); show_message(50,6,'[Link] scan rate'); show message(50,7,'[Link] dwell time'); show-message(50,8,'[Link] type continuos'); show:message(50,9,'[Link] type burst'); show_message(50,10,'[Link] high position'); show_message(50,11,'[Link] low position'); show message(50,12, '[Link] position'); show-message(50,13,'[Link] of scans'); show-message(50,14,'[Link] delay'); show-message(50,15,'[Link] line');

end; _

(* Display a message on the screen, get the user's input (* then send it on the the CD2B

*) *)

procedure get_and_send(command,message: string); var temp: string;

begin

gotoxy(10,20);

clreol;

write(message,':');

readln(temp)i send_message(stx,concat(command,temp» ;

end;

(* Get the users choice of operation, then do it

*)

procedure get_user_inputi begin

gotoxy(10,20) ;

clreoli

show_message(10,20,'Enter choice:') i ch:=upcase(readkey);

case ch of

'1': send_message(can,'S') i '2': send_message(can,'T'); '3': send_message(can,'P'); '4': send_message(can, 'E'); '5': send_message(can,so); '6': send_message(can, 'H');

'7': get_and_send('ST','Start position'); '8': get_and_send('EN','End position'); '9': get_and_send('BI','Burst increment');

'A': get_and_send('SR','continuous scan rate'); 'B': get_and_send('DT', 'Burst dwell time'); 'C': send_message(stx, 'TYC');

'0': send_message(stx, 'TYB');

'E': get_and_send('SH', 'Shutter high position'); 'F': get_and_send('SL','Shutter low position'); 'G': get_and_send('SE','Set position');

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385

get_user_input

Pg 7 of 8 331-385

get_and_send('NS','Number of scans'); get_and_send('SD','Scan delay'); get_and_sendC'LL','Laser line'); exit;

'H' : 'I' : 'J' : 'Q' : else

[beg!~ow_message(10'20' 'Invalid choice!! (press ch:=readkey;

end

any key to continue) ');

end;

(* We're moving so let's read whatever comes at us

case ch of , 1 ' ,

'2' ,

'3' ,

1'4': begin gotoxy(10,21): clreol;

while not wait_for char do;

(* Now read until not ack, bell, or can result_str:=read_chars(1) ;

while result_str[1] in [ack,bel,can] do

begin

display (result_str) ; result_str:=read_chars(1): if keypressed then

[begin ch:=upcase(readkey); exit:

end;

end: gotoxy(10,22): clreol;

*)

*)

(* Read the rest of this data block *)

result_str:=concat(result_str,read_chars(11»; display (result_str) ;

if keypressed then

[begin ch:=upcase(readkey) ; eXl.t;

end;

(* Now keep reading 12 characters at a time until there is *) (* an «, then you are done *)

while not (result_str[1] in ['*','E']) do

Ibeg!~tOXY(10/22) ;

if wait for char then ,begin _

I result_str:=read_chars(12);

09-17-89 [Link] [Link] Wed 10-25-89 [Link]

shut_down

Pg 8 of 8 386-422

386 display(result_str);

387 if keypressed then

388 begin

389 ch:-upcase(readkey);

390 if ch in [ '5 I , '6 I] then

391 [case ch of

392 15': send message(can,so);

393 161: send_message(can,IHI);

394 end

395 else

396 exit;

397 end;

398 end;

399 end;

400 end;

401 end;

402 end;

403

404 procedure shut_down;

405 begin

406 (* To close out a programming sequence, send IFC to *)

407 (* initialize the bus and call the IBONL function to *)

408 (* disable the hardware and software: *)

409

410 bd := find_the_device(lgpibO ');

411 ibsic (bd);

412 writeln;

413 end;

414

415 begin

416 initialize;

417 show_menu;

418 [repeat

419 get user input;

420 until ch in-['Q','q'];

421 shut_down;

422 end.

==

z Q f::> « u

~ w :z ...: 0.

0: ...: w a:

u

"'

'" -0

No> Q ..

u"

~~

-' .

.. 0 ~Z U,.. ...... .,01>

- ~

o '" a.

~~~~~~~~~~~ a

~ ·
or .. ·
~ ~ ~ '"
,.
¥ ; ~
f •
o -a.
.......
0; -
L , Q



,;..

2

.,:,\:;"."./.~;

",."

I 1:: .,.::.~ '!! 2 f ~ :l J

z s
~ '\ ..
ki D ..
" .. . ... I 3 .., s a
w .. . . .. a;
i
7 ~:~ f--t>
~ ~:~
.
l :d -"
~ .. 011
* . 1\
~~ . .. ..
- - S! -,~--~ r- -1-- - ---..,
:--- (J) I '> I 01
;! .. ~~ J .lOc :.+ ~..,__,j ... \,01 ..
.
~ '"
~
~
i •
,~,
... ~ ,?,
'"

You might also like