<%@ LANGUAGE="VBScript" %> <% Dim module(30) Dim glued(30) Dim sensor(30) ' ivb,ivg,ono,sog,pn,cv_pads,pinholes,polysilicon,arrival ' 1 2 3 4 5 6 7 8 9 ' Dim measurements(20,30) Dim status(3,30) ' arrival selection mounting ' 1 2 3 Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLStmt = "select sl.batch batch,sl.sensor sensor,sl.action action,sl.measurement_type measurement_type,sensor_type,mask_revision,status,location,description " SQLStmt = SQLStmt & " from sitester.sensor_log sl,sitester.batch_info bi,sitester.sensor_measurement_list sml where sl.batch=bi.batch and sl.batch='" & Request("batch") & "'" SQLStmt = SQLStmt & " and sl.measurement_type=sml.measurement_type and bi.status>0 and sl.sensor<30 order by sl.sensor,sl.logdate" Set RS = Connection.Execute(SQLStmt) SQLMount= "select batch,sensor,module_id from assembly.asm_sensor_bond_id where batch='" & Request("batch") & "' order by sensor" Set RSMount = Connection.Execute(SQLMount) SQLGlue= "select asbi.sensor,aml.config from assembly.asm_sensor_bond_id asbi,assembly.asm_module_log aml where asbi.batch='" & Request("batch") & "'" SQLGlue= SQLGlue & " and asbi.module_id=aml.module_id and aml.action='Sensor_gluing' " SQLGlue= SQLGlue & " order by asbi.sensor,aml.logdate" Set RSGlue = Connection.Execute(SQLGlue) %> Completed Measurements For One Batch <% If RS.EOF Then Response.Write(" No valid data in the database for batch " & Request("batch")) End If old_batch="BOF" ise=-1 nsensors=-1 Do While Not RS.EOF If Cstr(RS("batch"))=old_batch Then If Cint(RS("sensor"))<>ise Then ' new sensor ise=Cint(RS("sensor")) nsensors=nsensors+1 sensor(nsensors)=ise End If If Cint(RS("sensor"))=ise Then ' the same sensor ' ivb,ivg,ono,sog,pn,cv_pads,pinholes,polysilicon, arrival, acceptance, mounting, long term ' 1 2 3 4 5 6 7 8 9 10 11 12 ' Select Case Cstr(RS("Measurement_type")) Case "IV_bias_guard_gnd" measurements(1,ise)= "Done" Case "IV_guard_bias_gnd" measurements(2,ise)= "Done" Case "IV_PolySI_testkey" measurements(8,ise)= "Done" Case "CV_PN_testkey" measurements(5,ise)= "Done" Case "CV_Regular" measurements(6,ise)= "Done" Case "C_ONO_testkey" measurements(3,ise)= "Done" Case "C_SOG_testkey" measurements(4,ise)= "Done" Case "Pinhole" measurements(7,ise)= "Done" Case "Arrival" measurements(9,ise)= "Done" status(1,ise)=Cstr(RS("location")) Case "Accepted10","Accepted20","Accepted30","Accepted40","Accepted50" measurements(10,ise)= "Accepted" status(2,ise)=Cstr(RS("description")) Case "Reject10","Reject20","Reject30","Reject40" measurements(10,ise)= "Rejected" status(2,ise)=Cstr(RS("description")) Case "BIAS","GUARD" measurements(12,ise)= "Done" End Select If Cstr(module(ise))<>"Not Mounted" Then measurements(11,ise)= "Assigned" status(3,ise)=Cstr(module(ise)) If glued(ise)="Glued" Then measurements(11,ise)= "Glued" end If End If End If RS.MoveNext End If If RS.EOF Then btest="EOF" Else btest=Cstr(RS("batch")) itype=CInt(RS("sensor_type")) imr=CInt(RS("mask_revision")) End If If btest<>old_batch Then If old_batch<>"BOF" Then ' finish work for previous batch ' write the sensor table using arrays... ' ivb,ivg,ono,sog,pn,cv_pads,pinholes,polysilicon, arrival ' 1 2 3 4 5 6 7 8 9 ' %> <% For ist=0 to nsensors %> <% Next %>
Sens. Location IV bias IV guard ONO SOG Vf CV pads Pinhls Rp Lng Term Acceptance Mounting
<%Response.write(Cstr(sensor(ist)))%> <%If Cstr(measurements(9,Cint(sensor(ist))))="Done" Then %>

<%=status(1,Cint(sensor(ist)))%> <% Else %> N/A <% End If%>

<%If Cstr(measurements(1,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(2,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(3,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(4,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(5,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(6,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(7,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(8,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Cstr(measurements(12,Cint(sensor(ist))))="Done" Then %>

<% Else %> <% End If%>

<%If Not Cstr(measurements(10,Cint(sensor(ist))))="Not Done" Then %>

<% Select Case Cstr(measurements(10,Cint(sensor(ist)))) Case "Rejected" %> <%=status(2,Cint(sensor(ist)))%> <% Case "Accepted" %> <%=status(2,Cint(sensor(ist)))%> <% Case Else %> <%=status(2,Cint(sensor(ist)))%> <% End Select %> <% Else %> N/A <% End If%>

<%If Cstr(measurements(11,Cint(sensor(ist))))="Not Done" Then %>

N/A <% Else %>

<% If Cstr(measurements(11,Cint(sensor(ist))))="Glued" Then Response.write("Mounted on ") Else Response.write("Assigned to ") End If %> <%=status(3,Cint(sensor(ist)))%> <% End If%>

<% End If If btest<>"EOF" Then ' start new batch ise=-1 %>

<% Response.write("Batch " & Cstr(btest) & ", " & Cstr(Sensor_Name(itype,imr))) %> (.asp?batch=<%=Cstr(btest)%>">summary)

<% nsensors=-1 For i=1 to 30 sensor(i)=0 module(i)="Not Mounted" glued(i)="Not Glued" For j=1 to 20 measurements(j,i)="Not Done" Next For j=1 to 3 status(j,i)="N/A" Next Next ' ' fill information from assembly tables ' Do While Not RSMount.EOF If Cint(RSMount("sensor"))<=30 Then module(Cint(RSMount("sensor")))=Cstr(RSMount("module_id")) End If RSMount.MoveNext Loop Do While Not RSGlue.EOF If Cint(RSGlue("sensor"))<=30 Then If CStr(RSGlue("config"))="OK" Then glued(Cint(RSGlue("sensor")))="Glued" Else glued(Cint(RSGlue("sensor")))="Not Glued" End If End If RSGlue.MoveNext Loop End If old_batch=btest End If Loop %> <% Connection.Close %>