--+------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_EMRGNCY , !Print --+ Purpose : Powers OFF the MDI Experiment in an Emergency. --+ --+ Sub_system : PLM --+ Drawing No : 3137-ZA042-SCB Issue : A/00 --+ Project No : SH-MAR-SW-70224 --+ Origin : UK --+ Author : Jon B. CARTER --+------------------------------------------------------------------------+ --+ Principle : --+ --------- --+ This Control File Turns OFF the Power to the MDI experiment in the --+ event of an Emergency. --+ --+ Passed parameters : --+ ----------------- --+ !Print : CF Log print indicator ( "yes" (default) | "no" ). --+ --+ Prerequisites : --+ ------------- --+ The MDI Experiment is in any state of ON. --+ --+ History : --+ ------- --+ Issue SIC Note Time Date Name/Updates --+ +---+ +------+ +---+ +-------+ +-------------------------------------+ --+ 1/00 211 17:18 07/01/94 A.J. TURK -- Conversion from MDI language. --+ 1/01 289 09:05 07/02/94 A.J. TURK -- During debug phase. --+ 1/02 360 16:48 15/04/94 Ed COBB -- FM Rationalization. --+ 1/03 393 16:03 11/05/94 Ed COBB/Ph. IATRINO -- MDI Updates. --+ 1/05 411 13:59 24/05/94 Ed COBB/Ph. IATRINO -- MDI Updates. --+ 1/11 453 14:05 27/06/94 Ed COBB -- MDI Errors. --+ --+------------------------------------------------------------------------+ Common Var Bool !GZ_Window -- Open window flag (on CF start) Bool !GZ_Spool -- Automatic Spool (at End of CF exec) Bool !GZ_Halt -- Check Error flag (to halt if error) Bool !GZ_Test -- Execution test flag (to not send TC) Int !GZ_Trace -- Level of Trace (TBD) Int !GM_Conf -- MDI Configuration Int !GM_NbErr -- MDI Global Error Count End Common -------------------------------------------------------------------------------< Extern Cfile MDI_HR_SEL Group MWTM , PWP12TM Procedure AskReal , AskStr , AskInt Procedure CheckAna , CheckDig , CheckReg Procedure CheckArgReal , CheckArgStr , CheckArgInt Procedure DispMess Procedure ExConnect , ExDisconnect Procedure ExitCF Procedure Message Procedure OpenWindow Procedure PrintAna , PrintDig , PrintReg , PrintParam Procedure SendCommand Procedure Lower , Upper Procedure WaitAna , WaitDig , WaitReg , WaitTime End Extern -------------------------------------------------------------------------------< Program MDI_EMRGNCY , Unique Defarg Str(3) !Print = "yes" End Defarg Var Str( 3) !ExpName = "MDI" -- Experiment name Str(80) !S = &80s("") -- To save the display messages Str(10) !Phase = " " -- Phase label (e.g. 3.3.1.2) Str(49) !Title = "" Str(1) !LM_S0 = " " Str(80) !Question = "" Str(80) !Check = "" Int !NbErr = 0 -- Number of Errors Found Main @OpenWindow() !Title = "-START MDI EXPT EMERGENCY POWER OFF" @Message( "DCL", "date", !ExpName, !Phase, !Title, *!S) Inhibit "MSPWA" Inhibit "MSPWB" Inhibit "MIPWA" Inhibit "MIPWB" Inhibit "MWTM" @SendCommand ( "MCALLOFN" , "" ) @SendCommand ( "MCALLOFR" , "" ) @SendCommand ( "KNMPWAFN" , "" ) @WaitTime( "00h00m02s" , *!S) @SendCommand ( "KNMPWBFN" , "" ) @WaitTime( "00h00m02s" , *!S) @SendCommand ( "KNMPWAFR" , "" ) @WaitTime( "00h00m02s" , *!S ) @SendCommand ( "KNMPWBFR" , "" ) @WaitTime( "00h01m00s" , *!S ) @CheckDig( "MSPWA" , "= OFF" , *!NbErr ) @CheckDig( "MSPWB" , "= OFF" , *!NbErr ) @PrintAna("MIPWA" , "Nominal Side Current") @PrintAna("MIPWB" , "Redundant Side Current") !Question = "Confirm Expt is OFF (Y/y)" !Check = "in Y, y" @AskStr (!Question, !Check, *!LM_S0, *!S, *!NbErr) !GM_Conf = 0 Cflog !Title = "-END MDI EXPT EMERGENCY POWER OFF" @Message( "DCL", "date", !ExpName, !Phase, !Title, *!S) @ExitCF ( !NbErr ) @PrintCF ( !ExpName , !Print ) Return !Rstat End Program -------------------------------------------------------------------------------< Procedure PrintCF(str(3) !ExpName, Str(3) !Print) --. Print the control file log file if required by !Print ; --. - using the 'Spool' statement if the variable !GZ_Spool is TRUE, --. - using the dialog box window if the variable !GZ_Spool is FALSE. --. Var str(80) !S = &80s("") Main If !Print = "yes" Then If !GZ_Spool = TRUE Then Spool CF Else Cflog @Message ("DC", "date", !ExpName, " ", \ "++++Print the CFLog, then type CONT+++", *!S) Halt @Message ("DC", "date", !ExpName, " ", \ "+Operator continue.", *!S) End If End If Return End Procedure -------------------------------------------------------------------------------<