<%@ 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 bias between " & Cstr(CDbl(maxba)-1) & " and " & Cstr(CDbl(maxba)+1) & " " Check_Query = Check_Query & "group by sl.sensor" 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 " 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 bias between " & Cstr(CDbl(maxba)-1) & " and " & Cstr(CDbl(maxba)+1) & " " 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 %>

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) & " % "%>
<% If ntot<>nseen Then line= "

Number of selected pads (" & Cstr(nseen) & ") is smaller than the number of sensor pads (" & Cstr(ntot) & ")

" Response.write(line) End If %> <% Dim Chart 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 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 cmax" 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