chemistry 838 - hour exam 2
Post on 17-May-2022
3 Views
Preview:
TRANSCRIPT
Tuesday December 7, 2004 - 1 -
Chemistry 838 - Hour Exam 2
Fall 2004
Department of Chemistry Michigan State University East Lansing, MI 48824
Name
Student Number
Question Points Score
Question 1 Number Systems 15
Question 2 Data Acquisition Systems 15
Question 3 Data Acquisition Systems II 15
Question 4 Computer Architecture 15
Question 5 Computer Architecture II 15
Question 6 National Instruments Hardware 15
Question 7 LABView 15
Question 8 LABView II 15
Question 9 Data Analysis 15
Total of 7 105
Answer any 7 of the 9 questions. The number of points earned on this exam will be added to your total points for determination of the final course grade. Notice that you may earn 5 bonus points above the advertised 100 points for this exam. Do your work on these pages. Use the backs of the pages for extra space if necessary.
The exam is closed book. Calculators are not allowed. A number of possibly useful tables are included at the end of the exam.
CEM 838 Fall 2004 Hour Exam 2 Question 1 Number Systems
Tuesday December 7, 2004 - 2 -
Question 1 Number Systems a.) (8 points) Complete the following table by filling in the missing entries. Each row of the table contains the representation of an unsigned 16-bit integer using three different modulo.
Binary Decimal Hexadecimal
61453 F00D
1101101011000001 56001
44483 ADC3
1010101010101010 43690
b.) (7 points) Complete the following table with the appropriate 16 bit representations of the indicated signed integers.
Signed Integer Two’s Complement Representation
(Decimal) Binary Hexadecimal
31415 7AB7
-31415
5227 146B
-5227
CEM 838 Fall 2004 Hour Exam 2 Question 2 Data Acquisition Systems
Tuesday December 7, 2004 - 3 -
Question 2 Data Acquisition Systems
Sample/Hold
(0 = sample, 1 = hold)
Out
Control
In In
ADC
CS
R
Mul
tiple
xer
Convert
Busy
d , ..., dn-1 0
a0a1a2
e1
e3
e5
e7
e0
e2
e4
e6
Dat
a
World Computer
Inte
rface
to I/
O B
us
Prog. Clock
Base Freq Select
Preload Reg
Counter
Enable Count
Latched Clock Out
Clear Latched Clock Out
Clock Out
Dat
a R
egD
ata
Reg
Dat
a R
eg
Enable Overflow CSR
Inte
rface
to I/
O B
us
Figure 1 – Acquisition System
Figure 1 illustrates a computer based acquisition system. The programmable clock has a n bit counter. This system is to be used to acquire data from an experiment in which two wave lengths of light are emitted from a sample that has been excited with a laser pulse. The intensities of the two wavelengths of emitted light are to be monitored as a function of time. The time course of such an experiment is illustrated in Figure 2. Isolation of the two wavelengths of light are achieved with a monochromator with two exit slits such as illustrated in Figure 3.
CEM 838 Fall 2004 Hour Exam 2 Question 2 Data Acquisition Systems
Tuesday December 7, 2004 - 4 -
λ1
λ2
Time
Inte
nsity
Figure 2 – Time Course of a reaction with Two Emitters
Monochromator
PMT-V
PMT-V
ea
eb
λa λb
Figure 3 - Dual Slit Monochromator
a.) (2 Points) How would you connect the acquisition system to the experiment?
b.) (13 Points) List the steps the program would have to do in order to acquire the signals. Assume that a data point is to be taken every 379 milliseconds.
For this problem, ignore triggering, i.e. assume that the program will begin at the “proper” time. Notice also, that you are not to give particular computer instruction, rather general statements of what is to happen. For example, the following might be appropriate somewhere in your answer.
CEM 838 Fall 2004 Hour Exam 2 Question 2 Data Acquisition Systems
Tuesday December 7, 2004 - 5 -
1. Read the ADC CSR
2. Check the Busy bit
3. Branch to Step 1 if Busy is true
CEM 838 Fall 2004 Hour Exam 2 Question 3 Data Acquisition Systems II
Tuesday December 7, 2004 - 6 -
Question 3 Data Acquisition Systems II
In the previous question you were instructed to ignore triggering. For this problem, discuss in general terms how and why triggering might be applied to the experiment in the previous question. You should touch on manual approaches, software only approaches; pre-, mid-, and post- triggering; possible definitions of the trigger event, signal(s) to be used to observed the trigger event, etc.
CEM 838 Fall 2004 Hour Exam 2 Question 4 Computer Architecture
Tuesday December 7, 2004 - 7 -
Question 4 Computer Architecture Figure 4, Table 1, and Table 2 illustrate aspects of the laser experiment used in class to illustrate computer architecture and computer interfacing. This question relates to these materials.
Interface Registers
LaserExpReg.cdr 21-Oct-2002
Status Register
Bus
y
b7 b6 b5 b4 b3 b2 b1 b0
D0
Control Register
SHU
TTER
FIR
E
CO
NVE
RT
b7 b6 b5 b4 b3 b2 b1 b0
D1 D0D2
Intensity Registerb7 b6 b5 b4 b3 b2 b1 b0
D1 D0D2D3D4D5D6D7
AD
C7
AD
C6
AD
C5
AD
C4
AD
C3
AD
C2
AD
C1
AD
C0
Figure 4 – Laser Experiment Interface
CEM 838 Fall 2004 Hour Exam 2 Question 4 Computer Architecture
Tuesday December 7, 2004 - 8 -
Table 1 – Code Example
Location Contents (word)
Label Op Code I/D Ra Rb Operand
00001000 24 00 A0 18 START: LOAD D R2 NUMPNT
00001004 26 00 A0 20 LOAD D R3 POINT
00001008 22 00 A0 0C LOAD D R1 #1
0000100C 32 1F FF EC STORE D R1 CONTROL
00001010 10 00 00 00 NOOP
00001014 10 00 00 00 NOOP
00001018 10 00 00 00 NOOP
0000101C 10 00 00 00 NOOP
00001020 22 00 A0 10 LOAD D R1 #2
00001024 32 1F FF EC STORE D R1 CONTROL
00001028 10 00 00 00 NOOP
0000102C 10 00 00 00 NOOP
00001030 22 00 A0 14 LOOP1: LOAD D R1 #6
00001034 32 1F FF EC STORE D R1 CONTROL
00001038 22 00 A0 10 LOAD D R1 #2
0000103C 32 1F FF EC STORE D R1 CONTROL
00001040 32 1F FF F0 LOOP2: LOAD D R1 STATUS
00001044 92 00 10 40 BNE R1 LOOP2
00001048 28 1F FF F4 LOAD D R4 DATA
0000104C 38 E0 00 04 STORE I R4 R3
00001050 E6 00 A0 0C ADD D R3 #1
00001054 2A 00 A0 00 LOAD D R5 DELAY
00001058 EA 00 A0 14 LOOP3: ADD D R5 #-1
0000105C 9A 00 10 58 BNE R5 LOOP3
00001060 E4 00 A0 14 ADD D R2 #-1
00001064 94 00 10 30 BNE R2 LOOP1
00001068 00 00 00 00 HALT
CEM 838 Fall 2004 Hour Exam 2 Question 4 Computer Architecture
Tuesday December 7, 2004 - 9 -
Table 2 - View Of Memory Before Execution
Location Contents Logical Name
001FFFFC Last word
001FFFF8
001FFFF4 DATA
001FFFF0 STATUS
001FFFEC CONTROL
001FFFE8
001FFFE4
001FFFE0
0000A03C
0000A038
0000A034
0000A030
0000A02C
0000A028
0000A024
0000A020 data array
0000A01C
0000A018 00 00 03 E8 NUMPNT (10010)
0000A014 00 00 00 06 6
0000A010 00 00 00 02 2
0000A00C 00 00 00 01 1
0000A008 FF FF FF FF -1
0000A004 00 00 A0 20 POINT
0000A000 00 00 00 0F DELAY (1510)
00009FFC
00009FF8
Location Contents Logical Name
00001070
0000106C
00001068 00 00 00 00
00001064 94 00 10 30
00001060 E4 00 A0 14
0000105C 9A 00 10 58
00001058 EA 00 A0 14
00001054 2A 00 A0 00
00001050 E6 00 A0 0C Loop3
0000104C 38 E0 00 00
00001048 28 1F FF F4
00001044 92 00 10 40
00001040 32 1F FF F0 LOOP2
0000103C 32 1F FF EC
00001038 22 00 A0 10
00001034 32 1F FF EC
00001030 22 00 A0 14 LOOP1
0000102C 10 00 00 00
00001028 10 00 00 00
00001024 32 1F FF EC
00001020 22 00 A0 10
0000101C 10 00 00 00
00001018 10 00 00 00
00001014 10 00 00 00
00001010 10 00 00 00
0000100C 32 1F FF EC
00001008 22 00 A0 0C
00001004 26 00 A0 20
00001000 24 00 A0 18 START
00000FFC
CEM 838 Fall 2004 Hour Exam 2 Question 4 Computer Architecture
Tuesday December 7, 2004 - 10 -
a.) Discuss the memory location 0000A000. Include what the content (functional, not numerical) of the location is and how the content is utilized by the program. b.) Discuss the four program steps located in memory locations 00001030 through 0000103F. Include a description of the operations performed when the CPU executes these instructions. What is the purpose of these instructions in the context of the experiment?
CEM 838 Fall 2004 Hour Exam 2 Question 4 Computer Architecture
Tuesday December 7, 2004 - 11 -
c.) The NOOP instruction is used in two different places in the program. Discuss the nature of this instruction. Why is this use of the NOOP less than ideal?
CEM 838 Fall 2004 Hour Exam 2 Question 5 Computer Architecture II
Tuesday December 7, 2004 - 12 -
Question 5 Computer Architecture II
Latch GateLatch GateLatch Gate
A
LCa
La
GCa
Ga
B
Bus
LCb
Lb
GCb
Gb
C
LCc
Lc
GCc
Gc
FS04E2_1BitBus.cdr
Figure 5 – A Simple 1 Bit Data Bus System
Figure 5 illustrates a simple system consisting of a 1 bit bus connecting three 1 bit devices: A, B, and C. The initial contents of the devices are La(t0), Lb(t0), and Lc(t0). The following transfers are to be made in the order indicated. Lb copied to Lc. Lc copied to La La copied to Lb
a.) (11 points) In the manner used in class, list the sequence of steps that would be required to achieve the three transfers in the order listed.
CEM 838 Fall 2004 Hour Exam 2 Question 5 Computer Architecture II
Tuesday December 7, 2004 - 13 -
b.) (3 Points) What are the final contents of the three devices in terms of the original contents, e.g. La(t0), Lb(t0), and Lc(t0)? La Lb Lc c.) (1 Point) What happened to La(t0)?
CEM 838 Fall 2004 Hour Exam 2 Question 6 National Instruments Hardware
Tuesday December 7, 2004 - 14 -
Question 6 National Instruments Hardware A stopped flow apparatus provides the ability to thoroughly mix two solutions in a very short period of time. Fast reactions resulting from the mixing of the two solutions can thus be observed.
The two solutions flow together into a mixing chamber. The turbulence of the flow mixes the two solutions together. The reaction begins as soon as the two solution mix and continue as the mixed solution flows out of the chamber. If the flow is stopped, the solution that is in the mixing chamber at the time the flow is stopped will have just been mixed. Thus, the reaction can be studied by observing the solution in the mixing chamber as time progresses.
Figure 6 illustrates a simplified design of an apparatus that could be used for such an experiment. Two syringes are ganged together and driven by a piston that can be pushed in or pulled out in small steps. The direction of piston travel is controlled by the signal Direction, which has the value 0 for pushing and the value 1 for pulling. A rising edge on Step causes the piston to be advanced one increment in the direction given by Direction. A valve (A or B) allows a syringe to be connected to the corresponding reservoir or to the mixing chamber. Valve B is shown in the mixing chamber position. Valve A is shown in the reservoir position. Each valve is controlled by a controller (not shown) that responds to a signal, Valvei. Valvei = 0 causes valve i to be placed in the mixing chamber position. Valvei = 1 causes valve i to be placed in the reservoir position. A series of experiments can thus be performed by refilling the syringes from the reservoirs between pushes into the mixing chamber. Also not shown is an exhaust port coming out of the mixing chamber out of which the solution flows during a push.
The selection of the wavelength to be passed through the monochromator is made by setting the analog voltage ewavelength as shown below, where m and k are known constants.
Wavelength = m* ewavelength +k
In addition, the temperature of the mixing chamber is to be monitored with a thermistor, Rtemp. The analog voltage, Vtemp, is to be computer controlled in order to be able to turn the thermistor off when the temperature is not being measured (to avoid self heating) and to adjust the sensitivity of the temperature measurement.
a.) (8 Points) Computer control of the stopped flow experiment is to be achieved with the NI-6024E and the BNC-2120. Design the interface by indicating on Figure 7 where each of the signals listed in Table 3 are to be connected. Do this by drawing an arrow to the actual point that the conductor (wire) carrying the signal of interest would be connected. Identify each arrow with a unique label.
Also, indicate where you would make a connection to common.
b.) (7 Points) For each of the interface signals, indicate in Table 3 whether that signal is an input (to the computer) or and output.
CEM 838 Fall 2004 Hour Exam 2 Question 6 National Instruments Hardware
Tuesday December 7, 2004 - 15 -
Table 3 - Signal Direction
Signal Input/ Output
Direction
Step
ValveA
ValveB
Vtemp
ewavelength
etemperature
eLight
Mixing Chamber
Solution A Valve A
Valve B
ToReservoir
A
ToReservoir
B
Solution B
DirectionStep
Syringe Body
Syringe Plunger
Piston Positioner
Piston
FS04E2_StoppedFlow.cdr
Monochromator
Emitted Light
WavelengthSelected Light
ewavelength
PistonControl
eLight
etemperature
PMT-V
Vtemp
Rtemp
R1
R2
Figure 6 – Simplified Stopped Flow Apparatus
CEM 838 Fall 2004 Hour Exam 2 Question 6 National Instruments Hardware
Tuesday December 7, 2004 - 16 -
FS04E2_BNC2120A.cdr
1 Res
ANALOG INPUTS
TIMING I/O
ANALOG OUTPUTS
FUNCTION GENERATOR
DIGITAL I/O
SCREW TERMINAL TOBNC CONVERTERS
Frequency Selection
BNC
PWRBNC-2120
NATIONALINSTRUMENTS
BNC
ACH0 ACH1
ACH3
ACH3
ACH5
ACH7
ACH2
ACH4
ACH6
DAC0
Sine Triangle
Amplitude Adjust Frequency AdjustLo LoHi Hi
100-10kHz 1K-100kHz 13k-1MHZ
Sine/Triangle TTL Square Wave
DAC7
USER1
CLK
OutputsInputs
PFI1
PFI10/TRIG1
QUADRATUREENCODER
96 Pulses/rev
PFI2
PFI3
PFI4
PFI5
PFI6
PFI7
PFI8
PFI9
UP/DN
AI-TRG2
AI-CONVERT
CTR - SOURCE1
CTR - GATE1
AO - UPDATE
AO - WFTRIG
AI - STARTSCAN
CTR - SOURCE0
CTR - GATE0
CTR - OUT1
CTR - OUT0
FREQ OUT
+5V
DGND
USER2
DAC6
DAC5
DAC4
DAC3
DAC2
DAC1
DAC0
DGND
DAC1
BNC
FS GS
FS GS
FS GS
FS GS FS GS
FS GS
FS GS
FS GS
TempRef
ThermoCouple
2
3
4
Figure 7 - National Instruments BNC-2120
CEM 838 Fall 2004 Hour Exam 2 Question 7 LABView
Tuesday December 7, 2004 - 17 -
Question 7 LABView Figure 8 is the block diagram of an example VI. Figure 9 is a view of the Front Panel for the VI after execution.
Figure 8 - Block Diagram
CEM 838 Fall 2004 Hour Exam 2 Question 7 LABView
Tuesday December 7, 2004 - 18 -
Figure 9 – Front Panel
Identify the LABView objects in Table 4 by giving the name of the object, e.g. “Random noise generator”; the data type; checking the Object Type, i.e. function(F), control (C), indicator (I), Constant (Co), variable (V); and checking whether the object is a source and/or sink of data.
Table 4 – LABView Objects
Object Type Data Object Outline
Color Object Name Data TypeF C I Co V Source Sink
C Orange
E Orange
F Orange
H Orange
J Orange
K Black
M Black
N Orange
O Orange
P Black
Q Orange
CEM 838 Fall 2004 Hour Exam 2 Question 8 LABView II
Tuesday December 7, 2004 - 19 -
Question 8 LABView II Objects A and B in Figure 8 are two parts of one instance of one type of LABView object.
a.) (2 Points) What type of object is this?
b.) (3 Points) What is the order of execution of the two parts?
c.) (3 Points) What defines when the transition between the two parts occurs?
CEM 838 Fall 2004 Hour Exam 2 Question 8 LABView II
Tuesday December 7, 2004 - 20 -
Object D is another type of LABView object.
d.) (2 Points) What type of object is D?
e.) (2 Points) Which (if any) other objects are always associated with D?
f.) (3 Points) Describe the operation of Object D.
CEM 838 Fall 2004 Hour Exam 2 Question 9 Data Analysis
Tuesday December 7, 2004 - 21 -
Question 9 Data Analysis
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
400 410 420 430 440 450 460 470 480 490 500
Wavelength
Inte
nsity
Figure 10 - Sample Spectra
An computerized experiment produces spectra of a chemical system that has two features. Figure 10 is an example spectrum produced by the experiment. The chemical system is stable and any number of spectra maybe obtained. Discuss how each of the following topics could be applied to the experiment. The goal of the experiment is to find the position, line shape, and amplitude of all features.
a.) (5 Points) Averaging Successive Scans
CEM 838 Fall 2004 Hour Exam 2 Question 9 Data Analysis
Tuesday December 7, 2004 - 22 -
b.) (5 Points) Smoothing
c.) (5 Points) Curve Fitting
CEM 838 Fall 2004 Hour Exam 2 Appendix
Tuesday December 7, 2004 - 23 -
Appendix
Table 5 - Powers of 2
n DEC OCT HEX 0 1 1 1
1 2 2 2
2 4 4 4
3 8 10 8
4 16 20 10
5 32 40 20
6 64 100 40
7 128 200 80
8 256 400 100
9 512 1000 200
10 1024 2000 400
11 2048 4000 800
12 4096 10000 1000
13 8192 20000 2000
14 16384 40000 4000
15 32768 100000 8000
16 65536 200000 10000
17 131072 400000 20000
18 262144 1000000 40000
19 524288 2000000 80000
20 1048576 4000000 100000
21 2097152 1000000 200000
22 4194304 20000000 400000
23 8388608 40000000 800000
24 16777216 100000000 1000000
25 33554432 200000000 2000000
26 67108864 400000000 4000000
27 134217728 1000000000 8000000
28 268435456 2000000000 10000000
29 536870912 4000000000 20000000
30 1073741824 10000000000 40000000
31 2147483648 20000000000 80000000
32 4294967296 40000000000 100000000
CEM 838 Fall 2004 Hour Exam 2 Appendix
Tuesday December 7, 2004 - 24 -
Table 6 - Instruction Set
Op Code Mnemonic I/D? Description
0 HALT N Halt CPU operation
1 NOOP N Do nothing for one instruction cycle
2 LOAD Y Load contents of Operand (i.e. Memory Location) into Register Ra
3 STORE Y Store contents of Register Ra into Operand (i.e. Memory Location)
4 MOVE N Move the contents of register Ra to register Rb
5 AND N The logical AND of the contents of registers Ra and Rb is calculated and stored in Register Ra
6 OR N The logical OR of the contents of registers Ra and Rb is calculated and stored in Register Ra
7 INV N Invert the contents of Register Ra
8 NEG N Negate (take two's complement of) the contents of Register Ra
9 BNE N Branch to the address of the operand if Register Ra is not equal to zero
A BEQ Y Branch to the address of the operand if Register Ra is equal to zero
B JMP Y Branch to the address contained in the Operand
C RET Y Branch to location after last CALL instruction
D CALL N Branch to the address contained in the Operand and store next address for return
E ADD N Contents of Register Ra is added to the contents of Rb and the result is stored in Register Ra
F MUL N Contents of Register Ra is multiplied by the contents of Rb and the result is stored in Register Ra
CEM 838 Fall 2004 Hour Exam 2 Appendix
Tuesday December 7, 2004 - 25 -
Chemistry 838 - Hour Exam 2 .........................................................................................1 Question 1 Number Systems............................................................................................2 Question 2 Data Acquisition Systems .............................................................................3 Question 3 Data Acquisition Systems II..........................................................................6 Question 4 Computer Architecture ..................................................................................7 Question 5 Computer Architecture II ..............................................................................12 Question 6 National Instruments Hardware.....................................................................14 Question 7 LABView ......................................................................................................17 Question 8 LABView II...................................................................................................19 Question 9 Data Analysis ................................................................................................21 Appendix..........................................................................................................................23
top related