<%@ LANGUAGE="VBScript" %> <% start_time = Time %> Results of Signal Calibration Tests <% ' ' Get the two ROWID's for the measurement, the outside routine will determine which ones ! ' Dim Rowid(1) Dim Wurst(1) For i=0 To 1 Rowid(i)="-" Wurst(i)=-1 Next nrows=0 If Request("REQ_ROWID_0")<>"" Then Rowid(nrows)=Request("REQ_ROWID_0") nrows=nrows+1 End If If Request("REQ_ROWID_1")<>"" Then Rowid(nrows)=Request("REQ_ROWID_1") nrows=nrows+1 End If nrows=nrows-1 If nrows>-1 Then Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLStmt0 = "select ahl.HYBRID_ID,logdate,ahl.WURST_ID,CONFIG,ahl.COMMENTS from ASSEMBLY.ASM_HYBRID_LOG ahl " SQLStmt1 = "select CHANNELNUM,MEASUREMENT_INP,MEASUREMENT_OUT from ASSEMBLY.STRING_CHANNEL_MEASUREMENT SCM,ASSEMBLY.ASM_HYBRID_LOG ahl " If nrows=0 Then ' ' Just one string ' SQLStmt0 = SQLStmt0 & " where ahl.ROWID = '" & CStr(Rowid(0)) & "'" SQLStmt1 = SQLStmt1 & " where ahl.ROWID = '" & CStr(Rowid(0)) & "'" Else ' ' Two strings ' SQLStmt0 = SQLStmt0 & " where (ahl.ROWID = '" & CStr(Rowid(0)) & "' or ahl.ROWID = '" & CStr(Rowid(1)) & "') " SQLStmt1 = SQLStmt1 & " where (ahl.ROWID = '" & CStr(Rowid(0)) & "' or ahl.ROWID = '" & CStr(Rowid(1)) & "') " End If SQLStmt0 = SQLStmt0 & " order by ahl.WURST_ID" SQLStmt1 = SQLStmt1 & " and ahl.LOGDATE=scm.STARTDATE and scm.MEASUREMENT_ID = 'SIGCAL' order by ahl.WURST_ID,scm.CHANNELNUM" response.write(SQLStmt0) response.write(SQLStmt1) 'Set RS0 = Connection.Execute(SQLStmt0) 'Set RS1 = Connection.Execute(SQLStmt1) %> <% start_time = Time %> <% ' Prepare plot seed=-(second(now())+60*minute(now())+3600*hour(now())+3600*24*day(now())) filename="sigcal" & 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 6 Chart.SeriesTitle = "Signal Calibration" Chart.LineWidth = 1 Chart.Stairs = False Chart.SeriesInLegend = true Do While Not RS0.Eof rem Chart.AddXY CDbl(RS0("CHANNELNUM")), (CDbl(RS0("MEASUREMENT_OUT"))/CDbl(RS0("MEASUREMENT_INP")) *1000.0), "",Color(1) Chart.AddXY CDbl(RS0("MEASUREMENT_INP"))/1000.00, CDbl(RS0("MEASUREMENT_OUT")), "",Color(1) RS0.MoveNext Loop rem ********************************************************************** rem * Add and format the title rem ********************************************************************** Chart.ChartTitleAdd ("Signal Calibration for Channel # 42 (Test Page)") Chart.ChartTitleFont.Size = 18 Chart.ChartTitleFont.Name = "Arial" 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 = 10 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 = 400 Chart.Width = 1200 Chart.HorizAxisMax = 1.1 Chart.HorizAxisMin = 0. Chart.VertAxisMax = 0.5 Chart.VertAxisMin = 0. Chart.AddAxisLabel 1 , "Output" Chart.AddAxisLabel 2 , "Input" 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 ' Database is not needed anymore ! Connection.Close %> <% Else %>

Both ROWID's are empty ! <%End If%>