<%@ LANGUAGE="VBScript" %> <% start_time = Time %> <% Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd rowid_query = "select distinct sl.rowid,sl.sensor,logdate,sensor_type,mask_revision from sitester.sensor_log sl,sitester.sensor,sitester.batch_info where startdate=logdate and sl.batch=batch_info.batch and sl.batch='"+Request("batch")+"' and sl.sensor="+Request("sensor")+" order by sl.sensor,logdate" Set rowid_list = Connection.Execute(rowid_query) cv_templatesubquery1 = "(select MAX(logdate) from sitester.sensor_log where action='Summary' and measurement_type='CV_Template' and batch='"+Request("batch")+"')" cv_templatequery = "select bonding_pattern,pad,capacitance from sitester.cv_template where entrydate="+cv_templatesubquery1+" order by bonding_pattern, pad" Set cv_template_rs = Connection.Execute(cv_templatequery) 'Fill cv_template array i=0 Do While Not cv_template_rs.EOF ReDim Preserve cv_template(i) cv_template(i)=CDbl(cv_template_rs("capacitance")) i=i+1 cv_template_rs.MoveNext Loop %> Batch <%= Request("batch") %>, Sensor <%= Request("sensor") %> Normalized CV Curve Selection

Batch <%= CStr(Request("batch")) %>, Sensor <%= CStr(Request("sensor")) %> (<%= Sensor_Name(CInt(rowid_list("sensor_type")),CInt(rowid_list("mask_revision"))) %>) Normalized CV Curves

 

<% 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 ' gsfs added lines to read xmin, xmax, ymin, ymax 8/4/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 capacitance_array() row = 0 Do while Not rowid_list.EOF row=row+1 %> <% 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 & rowid_list("rowid") & "'" 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='" & rowid_list("rowid") & "' " 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 Else nchip=128 maxbp=12 ntot=9999 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='" & rowid_list("rowid") & "' " 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='" & rowid_list("rowid") & "' " 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,bonding_pattern,pad " CV_Query = CV_Query & "from sitester.sensor se,sitester.sensor_log sl where sl.rowid='" CV_Query = CV_Query & rowid_list("rowid") & "' " 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=seed+1 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 %> <% 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 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 ReDim capacitance_array(nchip*maxbp-1) do while not Scv.Eof dcol=CDbl(Scv("col")) dcap=CDbl(Scv("Capacitance")) ' stuff for forms capacitance_array(dcol)=CStr(Scv("capacitance")) ' end stuff for forms Chart.AddXY dcol, (dcap/cv_template(dcol)), "",Color(1) If cmax<(dcap/cv_template(dcol)) Then cmax=(dcap/cv_template(dcol)) End If Scv.MoveNext loop Else cmax=0 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. ' Chart.VertAxisMax = 1.1*cmax ' Chart.VertAxisMin = 0. ' Following lines added by gsfs 8/4/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 Chart.VertAxisMax = 1.1*cmax Else Chart.VertAxisMax = ymax End If ' End of gsfs addition Chart.AddAxisLabel 1 , "Cpad/Ctemplate" 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 %>
Logdate Operator Operator's Comments Temperature Humidity
<%=Slog("Logdate")%> <%=Slog("Operator")%> <%=Slog("Comments")%> <%=Cstr(atempa) & "°C" %> <%=Cstr(ahuma) & " % "%>
">

.cv_array.value=this.form.capacitance.value;self.opener.document.cv_array_receive<%= Request("sensor") %>.reset();self.close()">

 

<% rowid_list.MoveNext Loop %> <% ' Database is not needed anymore ! Connection.Close %>