<%@ LANGUAGE="VBScript" %> Capacitance Dist <% start_time = Time %> <% Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd Log_Query = "select batch,sensor,logdate,Measurement_type,Operator,Comments " Log_Query = Log_Query & "from sitester.sensor_log sl where sl.rowid='" Log_Query = Log_Query & Request("rowid_x") & "'" Set Slog = Connection.Execute(Log_Query) %> <% Type_Query="select (max(pad)+1) nchip, (max(bonding_pattern)+1) maxbp, max(bi.sensor_type) type,max(bi.mask_revision) mask " Type_Query=Type_Query & "from sitester.type_con tc,sitester.batch_info bi,sitester.sensor_log sl " Type_Query=Type_Query & "where sl.rowid='" & Request("rowid_x") & "' " Type_Query = Type_Query & "and sl.batch=bi.batch and tc.sensor_type=bi.sensor_type" Set Stype = Connection.Execute(Type_Query) If Not IsNull(Stype("nchip")) Then nchip=CInt(Stype("nchip")) maxbp=CInt(Stype("maxbp")) ntot=nchip*maxbp itype=Cint(Stype("type")) ctype=Sensor_Name(Stype("type"),Stype("mask")) Else nchip=128 maxbp=12 ntot=9999 itype=-1 ctype="unknown type" End If %> <% Bias_Query = "select max(bias) maxb,Avg(Temperature) atemp,Avg(Humidity) ahum from sitester.sensor se,sitester.sensor_log sl " Bias_Query = Bias_Query & "where sl.rowid='" & Request("rowid_x") & "' " Bias_Query = Bias_Query & "and startdate=logdate " Bias_Query = Bias_Query & "group by sl.sensor" Set Sbias = Connection.Execute(Bias_Query) If Not Sbias.EOF Then maxba=CDbl(Sbias("maxb")) atempa=CDbl(Sbias("atemp")) ahuma=CDbl(Sbias("ahum")) Else maxba=0 atempa=0 ahuma=0 End If %> <% Check_Query = "select count(pad) npad, avg(bias) avgb from sitester.sensor se, sitester.sensor_log sl " Check_Query = Check_Query & "where sl.rowid='" & Request("rowid_x") & "' " Check_Query = Check_Query & "and startdate=logdate and (bonding_pattern,pad,bias) in " Check_Query = Check_Query & "(select bonding_pattern, pad, MAX(bias) " Check_Query = Check_Query & "from sitester.sensor se2, sitester.sensor_log sl2 " Check_Query = Check_Query & "where sl2.rowid='" & Request("rowid_x") & "' " Check_Query = Check_Query & "and startdate=logdate " Check_Query = Check_Query & "group by bonding_pattern, pad)" Set Scheck = Connection.Execute(Check_Query) If Not Scheck.EOF Then nseen=CInt(Scheck("npad")) avgba=CDbl(Scheck("Avgb")) Else nseen=0 avgba=0 End If %> <% CV_Query = "select " & Cstr(nchip) & "*bonding_pattern+pad col, capacitance, " & Cstr(CDbl(maxba)) & "-bias dev " CV_Query = CV_Query & "from sitester.sensor se,sitester.sensor_log sl where sl.rowid='" CV_Query = CV_Query & Request("rowid_x") & "' " CV_Query = CV_Query & "and startdate=logdate and (bonding_pattern,pad,bias) in " CV_Query = CV_Query & "(select bonding_pattern, pad, MAX(bias) from sitester.sensor se2, sitester.sensor_log sl2 " CV_Query = CV_Query & "where sl2.rowid='" & Request("rowid_x") & "' and startdate=logdate " CV_Query = CV_Query & "group by bonding_pattern,pad) " CV_Query = CV_Query & "order by col" Set Scv = Connection.Execute(CV_Query) %> <% ' Prepare plot seed=-(second(now())+60*minute(now())+3600*hour(now())+3600*24*day(now())) filename="cvcv" & cstr(int(100000.*rnd(seed))) & ".jpg" filename_full=ph_image_directory & filename ' response.write(filename_full) %>

Batch <%=Slog("batch")%>, sensor <%=Cstr(Slog("sensor")) & " (" & ctype & ") "%> Capacitance Distribution

Measurement Date <%=Slog("Logdate")%>
Measurement Type <%=Slog("Measurement_type")%>
Operator <%=Slog("Operator")%>
Operator's Comments <%=Slog("Comments")%>
Temperature <%=Cstr(atempa) & "°C" %>
Humidity <%=Cstr(ahuma) & " % "%>
<% Dim Chart ' gsfs added lines to read xmin, xmax, ymin, ymax 8/3/00 If Not IsEmpty(Request("xmin")) Then xmin = CDbl(Request("xmin")) End If If Not IsEmpty(Request("xmax")) Then xmax = CDbl(Request("xmax")) End If If Not IsEmpty(Request("ymin")) Then ymin = CDbl(Request("ymin")) End If If Not IsEmpty(Request("ymax")) Then ymax = CDbl(Request("ymax")) End If If Not IsEmpty(Request("xtic")) Then xtic = CDbl(Request("xtic")) End If If Not IsEmpty(Request("ytic")) Then ytic = CDbl(Request("ytic")) End If ' End of gsfs addition Dim Color(8) Color(0) = vbRed Color(1) = vbBlue Color(2) = vbYellow Color(3) = vbGreen Color(4)= vbMagenta Color(5)= vbCyan Color(6)= vbWhite Color(7)= vbBlack rem ********************************************************************** rem * Instantiate the Chart component rem ********************************************************************** Set Chart = Server.CreateObject ("ASPChart.Chart") rem ********************************************************************** rem * Create x Array rem ********************************************************************** Chart.AddSeries 5 Chart.SeriesTitle = " test " Chart.LineWidth = 1 Chart.Stairs = true dev_count=0 If nseen>0 Then cmax=-10000 do while not Scv.Eof dcol=CDbl(Scv("col")) dcap=CDbl(Scv("Capacitance")) Chart.AddXY dcol, dcap, "",Color(1) If cmax1) or (CDbl(Scv("dev"))<-1) Then dev_count=dev_count+1 End If Scv.MoveNext loop Else cmax=0 End If If (ntot<>nseen) or (dev_count>0) Then Response.write("") End If rem ********************************************************************** rem * Add and format the title rem ********************************************************************** Chart.ChartTitleAdd ("Vb=" & Cstr(precision(avgba,1)) & " [V]") Chart.ChartTitleFont.Size = 18 Chart.ChartTitleFont.Name = "Times New Roman" Chart.ChartTitleFont.Italic = true Chart.ChartTitleFont.Bold = true Chart.View3D = false Chart.LegendVisible = false Chart.LegendStyle = cSeries Chart.AxisGridLines = true Chart.Frame = false Chart.BottomAxisIncrement = nchip ' gsfs added xtic, ytic option If IsEmpty(xtic) Then Chart.BottomAxisIncrement = nchip Else Chart.BottomAxisIncrement = xtic End If If Not IsEmpty(ytic) Then Chart.LeftAxisIncrement = ytic End If rem ********************************************************************** rem * Remove the OuterBevel, add a gradient fill to chart panel rem ********************************************************************** Chart.BevelOuter = 0 rem Chart.GradientVisible = true rem Chart.GradientStartColor = vbWhite rem Chart.GradientEndColor = vbYellow Chart.PanelColor = Color(6) rem ********************************************************************** rem * Set the Width and Height of the image rem ********************************************************************** Chart.Height = 300 Chart.Width = 600 Chart.HorizAxisMax = nchip*maxbp Chart.HorizAxisMin = 0. Select Case itype Case 1,2,3,4,5,6,9 Chart.VertAxisMax = 1.1*cmax Case 7,8 Chart.VertAxisMax = 50. Case Else Chart.VertAxisMax = 1.1*cmax End Select Chart.VertAxisMin = 0. ' Following lines added by gsfs 6/5/00 If IsEmpty(xmin) Then Chart.HorizAxisMin = 0 Else Chart.HorizAxisMin = xmin End If If IsEmpty(xmax) Then Chart.HorizAxisMax = nchip*maxbp Else Chart.HorizAxisMax = xmax End If If IsEmpty(ymin) Then Chart.VertAxisMin=0 Else Chart.VertAxisMin = ymin End If If IsEmpty(ymax) Then Select Case itype Case 1,2,3,4,5,6,9 Chart.VertAxisMax = 1.1*cmax Case 7,8 Chart.VertAxisMax = 50. Case Else Chart.VertAxisMax = 1.1*cmax End Select Else Chart.VertAxisMax = ymax End If ' End of gsfs addition Chart.AddAxisLabel 1 , "Capacitance [pF]" Chart.AddAxisLabel 2 , Cstr(nchip) & "*bonding_pattern+pad" rem ********************************************************************** rem * Set the filename, save the image and write the image tag rem ********************************************************************** Chart.FileName = filename_full Chart.SaveChart line="
" Response.Write (line) rem ********************************************************************** rem * Destroy the object rem ********************************************************************** Set Chart = nothing ' Database is not needed anymore ! Connection.Close %>

Detailed printout of all the capacitance data can be found ">here