<%@ LANGUAGE="VBScript" %> <% start_time = Time %> <% Dim bonding_pattern(1536) Dim pad(1536) Dim leakage_current(1536) 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_pinhole,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) %> Batch <%= Request("batch") %>, Sensor <%= Request("sensor") %> Pinhole Distribution Selection

Batch <%=Request("batch")%>, Sensor <%=Cstr(Request("sensor")) %> (<%= Sensor_Name(CInt(rowid_list("sensor_type")),CInt(rowid_list("mask_revision"))) %>) Pinhole Distributions

 

<% 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 Dim pinhole_array() seed=-(second(now())+60*minute(now())+3600*hour(now())+3600*24*day(now())) 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 & CStr(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='" & CStr(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 ctype="unknown type" End If %> <% Pin_Query="select bonding_pattern,pad,leakage_current from sitester.sensor_pinhole sp,sitester.sensor_log sl " Pin_Query = Pin_Query & "where sl.rowid='" & CStr(rowid_list("rowid")) & "' " Pin_Query = Pin_Query & "and startdate=logdate and abs(bias)>0.5" Pin_Query = Pin_Query & "order by bonding_pattern,pad" Set SPin = Connection.Execute(Pin_Query) npads=0 npins=0 Do While Not SPin.EOF Bonding_pattern(npads)=Cint(SPin("bonding_pattern")) Pad(npads)=Cint(SPin("pad")) Leakage_Current(npads)=CLng(SPin("leakage_current")) If Abs(Leakage_current(npads))>100 Then npins=npins+1 End If npads=npads+1 SPin.MoveNext Loop %> <% %> <% ' Prepare plot seed=seed+1 filename="pin" & cstr(int(100000.*rnd(seed))) & ".jpg" filename_full=ph_image_directory & filename 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 = " pinholes " Chart.LineWidth = 1 Chart.Stairs = true ReDim pinhole_array(nchip*maxbp-1) For i=0 to npads-1 dchan=nchip*bonding_pattern(i)+pad(i) if (Abs(leakage_current(i))<100) Then dpin=0 Else dpin=1 End If ' stuff for forms pinhole_array(dchan)=CStr(leakage_current(i)) ' end stuff for forms Chart.AddXY dchan, dpin, "",Color(1) Next rem ********************************************************************** rem * Add and format the title rem ********************************************************************** Chart.ChartTitleAdd ("Pinholes") 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 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 = 2. Chart.VertAxisMin = 0. Chart.AddAxisLabel 1 , "Pinhole Yes/No" 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
<%=Slog("Logdate")%> <%=Slog("Operator")%> <%=Slog("Comments")%>
">

.pinhole_array.value=this.form.leakage_current.value;self.opener.document.pinhole_array_receive<%= Request("sensor") %>.reset();self.close()">

 

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