--+------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_LOFF , !Proc_s , !Print --+ Purpose : (See Procedure headers) --+ --+ Sub_system : PLM --+ Drawing No : 3137-ZA042-SCB Issue : A/00 --+ Project No : SH-MAR-SW-70224 --+ Origin : UK --+ Author : Jon B. CARTER --+------------------------------------------------------------------------+ --+ Principle : --+ --------- --+ Holding CF for a group of related Procedures, originally written in --+ MDI's own Control File language. --+ --+ Passed parameters : --+ ----------------- --+ !Proc_s : Name of required Procedure. --+ !Print : CF Log print indicator ( "yes" (default) | "no" ). --+ --+ Prerequisites : --+ ------------- --+ This Control File forms part of MDI_OFF. --+ --+ History : --+ ------- --+ Issue SIC Note Time Date Name/Updates --+ +---+ +------+ +---+ +------+ +-------------------------------------+ --+ 1/00 211 13:43 17/01/94 A.J. TURK -- Conversion from MDI language. --+ 1/01 289 16:35 07/02/94 A.J. TURK -- During debug phase. --+ 1/02 360 17:45 05/05/94 Ed COBB/Ph. IATRINO -- Rationalization/MDI Inputs. --+ 1/03 393 18:05 12/05/94 Ed COBB -- MDI Updates. --+ 1/05 411 14:06 24/05/94 Ed COBB -- MDI Updates. --+ 1/07 443 17:36 17/06/94 Ed COBB -- MDI Updates. --+ 1/08 578 11:36 20/03/95 O MICHEL -- MDI Updates. --+ --+------------------------------------------------------------------------+ 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_NbErr -- MDI Global Error Count Int !GM_Conf -- MDI Configuration End Common -------------------------------------------------------------------------------< Extern Group MWTM , PWP12TM CFile MDI_MODE, MDI_HR_SEL 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_LOFF , Unique Defarg Str(80) !Proc_s Str(3) !Print = "yes" End Defarg Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Str(80) !Question = "" Str(80) !Check = "" Int !NbErr = 0 Main @OpenWindow() Select !Proc_s Case "loffsca" @loffsca() Case "loffscb" @loffscb() Default !Title = "*ERROR: UNKNOWN PROCEDURE: "+!Proc_s @Message("DCL" , "date" , !ExpName , " " , !Title , *!S) -- Beep Halt !Title = "*Operator CONTinue" @Message("DC" , "date" , !ExpName , " " , !Title , *!S) Return !Rstat End Select @ExitCF (!NbErr) @PrintCF ( !ExpName , !Print ) Return !Rstat End Program ----------------------------------------------------------------------------------< Procedure loffsca ( ) --. --. This procedure powers OFF the MDI instrument from the --. PLM BUS A using primary pulse commands. --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Str(80) !Get_Dig = "" Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: loffsca." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Turn OFF Mechanisms, Camera and IP" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) PERFORM/NO MDI_MODE, "lobsmode", "no" @SendCommand ( "MBSHRS" , "" ) Inhibit "MWTM" @SendCommand ( "MBPWAMOF" , "" ) @SendCommand ( "MBPWFDOF" , "" ) @SendCommand ( "MBPWLTOF" , "" ) @SendCommand ( "MBPWC2OF" , "" ) @SendCommand ( "MBPWC1OF" , "" ) @SendCommand ( "MBPWPAOF" , "" ) @SendCommand ( "MBPWM2OF" , "" ) @SendCommand ( "MBPWM1OF" , "" ) @SendCommand ( "MBPWSHOF" , "" ) @SendCommand ( "MBPWCMOF" , "" ) @SendCommand ( "MBPWIPOF" , "" ) @WaitTime( "00h00m45s" , *!S ) !Title = "~Verify Mechanisms, Camera and IP are OFF" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @CheckDig( "MKPWIP" , "= OFF" , *!NbErr ) @CheckDig( "MKPWCM" , "= OFF" , *!NbErr ) @CheckDig( "MKPWLT" , "= OFF" , *!NbErr ) @CheckDig( "MKPWSH" , "= OFF" , *!NbErr ) @CheckDig( "MKPWM1" , "= OFF" , *!NbErr ) @CheckDig( "MKPWM2" , "= OFF" , *!NbErr ) @CheckDig( "MKPWPA" , "= OFF" , *!NbErr ) @CheckDig( "MKPWC1" , "= OFF" , *!NbErr ) @CheckDig( "MKPWC2" , "= OFF" , *!NbErr ) @CheckDig( "MKPWAM" , "= OFF" , *!NbErr ) !Title = "~Send TM Select 1 and ALL OFF command" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ("MBPWTM1O" , "") @SendCommand ("MCALLOFN" , "") @WaitTime ( "00h00m45s" , *!S ) !Title = "Verify that DEP and AE are OFF" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @CheckDig ( "MSPWDPN" , "= OFF" , *!NbErr ) @CheckDig ( "MSPWAEN" , "= OFF" , *!NbErr ) @CheckDig ( "MSTMSELN" , "= 1" , *!NbErr ) !Title = "~Switch all Power Convs to BUS B" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MCRC1BN" , "" ) @SendCommand ( "MCRC2BN" , "" ) @SendCommand ( "MCPC1BN" , "" ) @SendCommand ( "MCPC2BN" , "" ) @WaitTime ( "00h00m45s" , *!S ) !Title = "~Check Power Conv switch settings" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @CheckDig ( "MSPC1N" , "= B" , *!NbErr ) @CheckDig ( "MSPC2N" , "= B" , *!NbErr ) @CheckDig ( "MSRC1N" , "= B" , *!NbErr ) @CheckDig ( "MSRC2N" , "= B" , *!NbErr ) !Title = "Reset relays to Nominal Conditions" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MCALLONN" , "" ) Inhibit "MSPWA" Inhibit "MIPWA" Inhibit "MSPWB" Inhibit "MIPWB" @SendCommand ( "KNMPWAFN" , "" ) -- PLM BUS A, Nominal OFF Cmd. @SendCommand ( "MCPC1AN" , "" ) @SendCommand ( "MCPC2AN" , "" ) @WaitTime ( "00h00m45s" , *!S ) !Get_Dig = Get( "MSPWA" ) If !Get_Dig <> "OFF" Then !Title = "*PLM BUS A still ON!" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) -- Beep Halt !Title = "*Operator CONTinue" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) End If @CheckDig ( "MSPC1N" , "= A" , *!NbErr ) @CheckDig ( "MSPC2N" , "= A" , *!NbErr ) @CheckDig ( "MSRC1N" , "= B" , *!NbErr ) @CheckDig ( "MSRC2N" , "= B" , *!NbErr ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: loffsca." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure loffscb ( ) --. --. This procedure powers OFF the MDI instrument from the --. PLM BUS B using redundant pulse commands. --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Str(80) !Get_Dig = "" Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: loffscb." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Turn OFF Mechanisms, Camera and IP" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) PERFORM/NO MDI_MODE, "lobsmode", "no" @SendCommand ( "MBSHRS" , "" ) Inhibit "MWTM" @SendCommand ( "MBPWAMOF" , "" ) @SendCommand ( "MBPWFDOF" , "" ) @SendCommand ( "MBPWLTOF" , "" ) @SendCommand ( "MBPWC2OF" , "" ) @SendCommand ( "MBPWC1OF" , "" ) @SendCommand ( "MBPWPAOF" , "" ) @SendCommand ( "MBPWM2OF" , "" ) @SendCommand ( "MBPWM1OF" , "" ) @SendCommand ( "MBPWSHOF" , "" ) @SendCommand ( "MBPWCMOF" , "" ) @SendCommand ( "MBPWIPOF" , "" ) @WaitTime( "00h00m45s" , *!S ) !Title = "~Verify Mechanisms, Camera and IP are OFF" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @CheckDig( "MKPWIP" , "= OFF" , *!NbErr ) @CheckDig( "MKPWCM" , "= OFF" , *!NbErr ) @CheckDig( "MKPWLT" , "= OFF" , *!NbErr ) @CheckDig( "MKPWSH" , "= OFF" , *!NbErr ) @CheckDig( "MKPWM1" , "= OFF" , *!NbErr ) @CheckDig( "MKPWM2" , "= OFF" , *!NbErr ) @CheckDig( "MKPWPA" , "= OFF" , *!NbErr ) @CheckDig( "MKPWC1" , "= OFF" , *!NbErr ) @CheckDig( "MKPWC2" , "= OFF" , *!NbErr ) @CheckDig( "MKPWAM" , "= OFF" , *!NbErr ) !Title = "~Send TM Select 1 and ALL OFF command" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ("MBPWTM1O" , "") @SendCommand ("MCALLOFR" , "") @WaitTime( "00h00m45s" , *!S ) !Title = "~Verify that DEP and AE are OFF" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @CheckDig ( "MSPWDPR" , "= OFF" , *!NbErr ) @CheckDig ( "MSPWAER" , "= OFF" , *!NbErr ) @CheckDig ( "MSTMSELR" , "= 1" , *!NbErr ) !Title = "~Switch all Power Convs to BUS A" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ("MCRC1AR" , "") @SendCommand ("MCRC2AR" , "") @SendCommand ("MCPC1AR" , "") @SendCommand ("MCPC2AR" , "") @WaitTime( "00h00m45s" , *!S ) !Title = "~Check Power Conv switch settings" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @CheckDig( "MSPC1R" , "= A" , *!NbErr ) @CheckDig( "MSPC2R" , "= A" , *!NbErr ) @CheckDig( "MSRC1R" , "= A" , *!NbErr ) @CheckDig( "MSRC2R" , "= A" , *!NbErr ) !Title = "Reset relays to Nominal Conditions" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MCALLONR" , "" ) Inhibit "MSPWB" Inhibit "MIPWB" Inhibit "MSPWA" Inhibit "MIPWA" @SendCommand ( "KNMPWBFR" , "" ) -- PLM BUS B, Redundant OFF Cmd. @SendCommand ("MCRC1BR" , "") @SendCommand ("MCRC2BR" , "") @WaitTime( "00h00m45s" , *!S ) !Get_Dig = Get( "MSPWB" ) If !Get_Dig <> "OFF" Then !Title = "*PLM BUS B still ON!" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) -- Beep Halt !Title = "*Operator CONTinue" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) End If @CheckDig( "MSPC1R" , "= A" , *!NbErr ) @CheckDig( "MSPC2R" , "= A" , *!NbErr ) @CheckDig( "MSRC1R" , "= B" , *!NbErr ) @CheckDig( "MSRC2R" , "= B" , *!NbErr ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: loffscb." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure PrintCF( str(3) !ExpName, str(8) !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 ----------------------------------------------------------------------------------<