<%@ LANGUAGE="VBScript" %> <% Dim Alarms(7) Dim Alarm_Name(7) Dim Oct_Flow(7) Dim TShield_Flow(7) Dim NSpect_Flow(7) Dim PSpect_Flow(7) Alarm_Name(0)="Reserve Vacuum Pump ON" Alarm_Name(1)="Reserve Water Pump ON" Alarm_Name(2)="Low Water Level in Main Tank" Alarm_Name(3)="High Water level in Upper Tank" Alarm_Name(4)="Suction Operating ON" Alarm_Name(5)="" Alarm_Name(6)="" Alarm_Name(7)="" If Not IsEmpty(request.form("Close")) Then %> <% End If timedate=Request("timedate") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If Not IsEmpty(request.form("Latest")) Then timedate="" End If 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")) End If ' response.write(SQLStmtX) If Not IsDate(timedate) Then message="Wrong Time/Date format " & timedate %> <% End If timedate_par=replace(timedate," ","%20") %> Cooling System Status

               

<% SQLStmt = " select to_char(logdate,'MM/DD/YYYY HH24:MI:SS') ddate, " SQLStmt = SQLStmt & " temp_03,temp_04,temp_05, " SQLStmt = SQLStmt & " temp_06,temp_07,temp_08,temp_09,temp_10,temp_11, " SQLStmt = SQLStmt & " press_01,press_02, " SQLStmt = SQLStmt & " ascii(oct_flow) oct_flow,ascii(tshield_flow) tshield_flow, " SQLStmt = SQLStmt & " ascii(nspect_flow) nspect_flow,ascii(pspect_flow) pspect_flow,ascii(alarms) alarms " SQLStmt = SQLStmt & " from phoffline.cooling_monitoring " SQLStmt = SQLStmt & " where logdate= " SQLStmt = SQLStmt & " (select max(logdate) from phoffline.cooling_monitoring " SQLStmt = SQLStmt & " where logdate between to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-2 " SQLStmt = SQLStmt & " and to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')) " Set RS = Connection.Execute(SQLStmt) ' response.write(SQLStmt) If Not RS.EoF Then ' ' Set various bits ' For i=0 To 7 Alarms(i)=(CInt(RS("alarms")) And 2^i)/(2^i) Oct_Flow(i)=(CInt(RS("oct_flow")) And 2^i)/(2^i) TShield_Flow(i)=(CInt(RS("tshield_flow")) And 2^i)/(2^i) NSpect_Flow(i)=(CInt(RS("nspect_flow")) And 2^i)/(2^i) PSpect_Flow(i)=(CInt(RS("pspect_flow")) And 2^i)/(2^i) Next %>
DB Time <%=RS("ddate")%>

Temperatures [deg C]

Main Distributor, Inlet <%=round(RS("temp_03"),1)%>
N Arm Outlet <%=round(RS("temp_04"),1)%>
N Thermal Shield Up <%=round(RS("temp_05"),1)%>
N Thermal Shield Low <%=round(RS("temp_06"),1)%>
Octagon Outlet <%=round(RS("temp_07"),1)%>
P Arm Outlet <%=round(RS("temp_08"),1)%>
P Thermal Shield Low <%=round(RS("temp_09"),1)%>
P Thermal Shield Up <%=round(RS("temp_10"),1)%>
Main Collector, Outlet <%=round(RS("temp_11"),1)%>
Pressure [kPa]
Atmospheric <%=round(RS("press_01"),2)%>
Main tank <%=round(RS("press_02"),2)%>
<% For i=0 To 4 %> <% Next %>
Alarms

(=OFF/OK)

<%=Alarm_Name(i)%> <% If Alarms(i)=0 Then %>

<% Else %> <% End If %>

Water Flow
Negative
Spect.
Positive
Spect.
Octagon Thermal
Shield
<% For i=0 To 7 %> <% Next %>
<% If NSpect_flow(i)=0 Then %>

<% Else %> <% End If %>

<% For i=0 To 7 %> <% Next %>
<% If PSpect_flow(i)=0 Then %>

<% Else %> <% End If %>

<% For i=0 To 5 %> <% Next %>
<% If Oct_flow(i)=0 Then %>

<% Else %> <% End If %>

<% For i=0 To 3 %> <% Next %>
<% If TShield_flow(i)=0 Then %>

<% Else %> <% End If %>

<% End If Connection.Close Set RS=nothing Set Connection=nothing %>