%@ LANGUAGE="VBScript" %> <% 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 from sitester.sensor_log sl,sitester.batch_info bi,sitester.sensor_measurement_list sml where sl.batch=bi.batch and sl.measurement_type=sml.measurement_type and bi.status>0 and sl.sensor<30 order by sensor_type,batch,sensor" Set RS = Connection.Execute(SQLStmt) %>
Sorted by first by sensor type and then by batch name
<% 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" measurements(10,ise)= "Accepted" status(2,ise)=Cstr(RS("description")) Case "Reject10","Reject20","Reject30" measurements(10,ise)= "Rejected" status(2,ise)=Cstr(RS("description")) Case "Mounted10" measurements(11,ise)= "Done" status(3,ise)=Cstr(RS("description")) Case "Mounted20" measurements(11,ise)= "Done" status(3,ise)=Cstr(RS("description")) Case "BIAS","GUARD" measurements(12,ise)= "Done" End Select 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 ' %>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 %>
|
<%If Cstr(measurements(2,Cint(sensor(ist))))="Done" Then %>
|
<%If Cstr(measurements(3,Cint(sensor(ist))))="Done" Then %>
|
<%If Cstr(measurements(4,Cint(sensor(ist))))="Done" Then %>
|
<%If Cstr(measurements(5,Cint(sensor(ist))))="Done" Then %>
|
<%If Cstr(measurements(6,Cint(sensor(ist))))="Done" Then %>
|
<%If Cstr(measurements(7,Cint(sensor(ist))))="Done" Then %>
|
<%If Cstr(measurements(8,Cint(sensor(ist))))="Done" Then %>
|
<%If Cstr(measurements(12,Cint(sensor(ist))))="Done" Then %>
|
<%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 Not Cstr(measurements(11,Cint(sensor(ist))))="Not Done" Then %>
<%=status(3,Cint(sensor(ist)))%><% Else %> N/A <% End If%> |
<% 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 For j=1 to 20 measurements(j,i)="Not Done" Next For j=1 to 3 status(j,i)="N/A" Next Next End If old_batch=btest End If Loop %> <% Connection.Close %>