<%@ LANGUAGE="VBScript" %> <% timedate=Request("timedate") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If timedate="" Then SQLStmtX = " select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') timedate from dual " Set RSX = Connection.Execute(SQLStmtX) timedate = CStr(RSX("timedate")) Set RSX=nothing End If ' response.write(SQLStmtX) If Not IsDate(timedate) Then message="Wrong Time/Date format " & timedate %> <% End If timedate_par=replace(timedate," ","%20") %> LeCroy HV Monitoring Status

ToF and Trigger HV Supply Monitoring Status <%=timedate%>


(Hint: to get most recent time/date clear the window and push refresh button)
This web page looks only at data taken up to 2 days before the specified date, if the last data is older than 2 days it will not show up here

Back to monitoring Page



<% SQLStmt = " select to_char(lhv.logdate,'MM/DD/YYYY hh24:mi:ss') ddate, " SQLStmt = SQLStmt & " 24*60*(to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-lhv.logdate) ddif, " SQLStmt = SQLStmt & " lhv.logdate,lhv.hv_group,lhv.hv_channel,to_char(lhv.v_meas,'9999.9') v_meas,to_char(lhv.i_meas,'9999.9') i_meas,to_char(lhv.v_req,'9999') v_req,lhv.enabled " SQLStmt = SQLStmt & " from phoffline.lecroy_hv lhv, " SQLStmt = SQLStmt & " (select max(logdate) logdate,hv_group,hv_channel " SQLStmt = SQLStmt & " from phoffline.lecroy_hv " SQLStmt = SQLStmt & " where logdate between to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-2 and to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')" SQLStmt = SQLStmt & " group by hv_group,hv_channel) sc " SQLStmt = SQLStmt & " where lhv.logdate=sc.logdate " SQLStmt = SQLStmt & " and lhv.hv_group=sc.hv_group " SQLStmt = SQLStmt & " and lhv.hv_channel=sc.hv_channel " SQLStmt = SQLStmt & " order by lhv.hv_group,lhv.hv_channel " Set RS = Connection.Execute(SQLStmt) ' response.write(SQLStmt) %>

<% Do While Not RS.EOF %> <% RS.Movenext Loop Set RS=nothing %>
HV Group HV Channel Graph Last DB write V Measured V Requested I Measured Status
<%=RS("hv_group")%> <%=RS("hv_channel")%>

&hv_channel=<%=RS("hv_channel")%>&days=2">

<% If CDbl(RS("ddif"))<=390 Then 'measurement is less than 6 hours and 30 minutes old Response.write("" & CStr(RS("ddate")) & "") Else Response.write("" & CStr(RS("ddate")) & "") End If %> <%=Trim(RS("V_Meas"))%> <%=Trim(RS("V_req"))%> <%=Trim(RS("I_meas"))%> <% If CInt(RS("enabled"))=1 Then 'channel is enabled Response.write(" Enabled ") Else Response.write(" Disabled ") End If %>

 <% Connection.Close Set Connection=nothing %>