%@ LANGUAGE="VBScript" %>
Pinhole Details
<% start_time = Time %>
<%
Dim bonding_pattern(1536)
Dim pad(1536)
Dim leakage_current(1536,3)
Dim Bias(3)
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
%>
<%
Bias_Query="select distinct round(abs(bias)) rbias from sitester.sensor_pinhole sp,sitester.sensor_log sl "
Bias_Query = Bias_Query & "where sl.rowid='" & Request("rowid_x") & "' "
Bias_Query = Bias_Query & "and startdate=logdate"
Set SBias = Connection.Execute(Bias_Query)
nbias=0
Do While Not SBias.EOF
Bias(nbias)=Cint(Sbias("rbias"))
nbias=nbias+1
SBias.MoveNext
Loop
%>
<%
Pin_Query="select bonding_pattern,pad,bias,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 "
Pin_Query = Pin_Query & " order by bonding_pattern,pad,abs(bias)"
Set SPin = Connection.Execute(Pin_Query)
npads=0
ibias=0
old_bias=100000
Do While Not SPin.EOF
abias=Round(Abs(Cint(Spin("bias"))),0)
If old_bias > abias Then
' new bonding pad
Bonding_pattern(npads)=Cint(SPin("bonding_pattern"))
Pad(npads)=Cint(SPin("pad"))
npads=npads+1
ibias=0
Else
ibias=ibias+1
If ibias>nbias Then
response.write("error in ibias")
End If
End If
old_bias=abias
If ibias<=nbias Then
Leakage_Current(npads-1,ibias)=CLng(SPin("leakage_current"))
End If
SPin.MoveNext
Loop
%>
Batch <%=Slog("batch")%>, sensor <%=Cstr(Slog("sensor")) & " (" & ctype & ") "%> Pinhole Distribution
Bonding pattern |
Pad |
<%
For j=0 to nbias-1
%>
<%="@ " & Cstr(Bias(j)) & " [V]"%>
|
<%
Next
%>
<%
For i=1 to npads-1
%>
<%=bonding_pattern(i)%>
|
<%=pad(i)%>
|
<%
For j=0 to nbias-1
%>
<%=Cstr(leakage_current(i,j))%>
|
<%
Next
%>
<%
Next
%>
<%
Connection.Close
%>