<%@ LANGUAGE="VBScript" %> Pinhole Distribution <% 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 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 ctype=Sensor_Name(Stype("type"),Stype("mask")) 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='" & Request("rowid_x") & "' " 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 %> <% %>

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

Measurement Date <%=Slog("Logdate")%>
Measurement Type <%=Slog("Measurement_type")%>
Operator <%=Slog("Operator")%>
Operator's Comments <%=Slog("Comments")%>
<% If npins=0 Then %>

There are no pinholes among <%=Cstr(npads)%> measured pads (">more details)

<% Else ' Prepare plot seed=-(second(now())+60*minute(now())+3600*hour(now())+3600*24*day(now())) filename="pin" & cstr(int(100000.*rnd(seed))) & ".jpg" filename_full=ph_image_directory & filename 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 = " pinholes " Chart.LineWidth = 1 Chart.Stairs = true 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 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 ' List channels with Pinholes %>

There are <% =Cstr(npins)%> pinholes out of <%=Cstr(npads)%> measured pads (">more details):

<% For i=0 to npads-1 If abs(leakage_current(i))>100 Then %> <% End If Next %>
Bonding Pattern Pad Current at V<>0
<%=bonding_pattern(i)%> <%=pad(i)%> <%=abs(leakage_current(i))%>
<% End If ' Database is not needed anymore ! Connection.Close %>