--+------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_SQ_PATCH , !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 : --+ ------------- --+ Control File MDI_ON must have been successfully performed. --+ --+ History : --+ ------- --+ Issue SIC Note Time Date Name/Updates --+ +---+ +------+ +---+ +------+ +-------------------------------------+ --+ 1/00 575 11:03 17/03/95 O. michel Creation with 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 Int !GM_I0 Int !GM_I9 End Common -------------------------------------------------------------------------------< Extern Cfile PLM_BLOCK 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_SQ_PATCH , Unique Defarg Str(3) !Print = "yes" End Defarg Var Str( 3) !ExpName = "MDI" Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Str(10) !Phase = " " Str(80) !Question = " " Int !LM_I0 = 0 Main @OpenWindow() !Title = "-Start of SQ_PATCH Sequence." @Message("DCL" , "date" , !ExpName , !Phase , !Title , *!S) -- The following commands change the times at which images -- are taken by the default structure observation built -- into the DEP Flight Software ver 10.02 @varcmd ( "MBDPML" , "0x1000, 0x3ef4, 0xfe30" ) @varcmd ( "MBDPML" , "0x1000, 0x3f00, 0xfe60" ) @varcmd ( "MBDPML" , "0x1000, 0x3f0c, 0xfe90" ) @varcmd ( "MBDPML" , "0x1000, 0x3f18, 0xfec0" ) @varcmd ( "MBDPML" , "0x1000, 0x3f24, 0xfef0" ) @varcmd ( "MBDPML" , "0x1000, 0x3f3c, 0xff20" ) @varcmd ( "MBDPML" , "0x1000, 0x3f48, 0xff50" ) @varcmd ( "MBDPML" , "0x1000, 0x3f54, 0xff80" ) @varcmd ( "MBDPML" , "0x1000, 0x3f60, 0xffb0" ) @varcmd ( "MBDPML" , "0x1000, 0x3f6c, 0xffe0" ) @varcmd ( "MBDPML" , "0x1000, 0x3f84, 0x0010" ) @varcmd ( "MBDPML" , "0x1000, 0x3f90, 0x0040" ) @varcmd ( "MBDPML" , "0x1000, 0x3f9c, 0x0070" ) @varcmd ( "MBDPML" , "0x1000, 0x3fa8, 0x00a0" ) @varcmd ( "MBDPML" , "0x1000, 0x3fb4, 0x00d0" ) @varcmd ( "MBDPML" , "0x1000, 0x3fcc, 0x0100" ) @varcmd ( "MBDPML" , "0x1000, 0x3fd8, 0x0130" ) @varcmd ( "MBDPML" , "0x1000, 0x3fe4, 0x0160" ) @varcmd ( "MBDPML" , "0x1000, 0x3ff0, 0x0190" ) @varcmd ( "MBDPML" , "0x1000, 0x3ffc, 0x01c0" ) @WaitTime ("00h00m15s",*!S) @Sendcommand ("MBDPMD" , "0x1000 , 0x3ef4 , 0x108") @varcmd ( "MBDPML" , "0x1000, 0x0492, 0x8002" ) @WaitTime ("00h00m15s",*!S) @Sendcommand ("MBDPMD" , "0x1000 , 0x488 , 0x100") !GM_NbErr = !GM_NbErr + !NbErr !Title = "-End of IPCSLD Sequence." @Message ("DCL", "date", !ExpName, !Phase, !Title, *!S) @ExitCF (!NbErr) @PrintCF (!ExpName , !Print ) Return !Rstat End Program ----------------------------------------------------------------------------------< Procedure varcmd ( Str(10) !Cmd_name , Str(80) !Cmd_data ) Var Str( 1) !Expt_s Int !Code_i Int !Cmd_data_i(30) Int !No_of_cmds_i Int !Data_len_i Str(10) !Data_item_s Int !Commas_i Int !Count Int !Char_pos Str(1) !Char Str(49) !Title = " " Str(80) !Cmd_data_s Str(80) !S = &80s(" ") Main !Expt_s = Extract ( !Cmd_name , 1 , 1 ) If !Expt_s <> "M" Then !Title = "*ERROR : Non-MDI Command " + !Cmd_name @Message( "DC" , "time" , "MDI" , " " , !Title , *!S ) Halt !Title = "+Operator CONTinue " @Message( "DC" , "time" , "MDI" , " ", !Title , *!S ) End If Select !Cmd_name Case "MBIPCMD" !Code_i = 0x0e !No_of_cmds_i = 0 Case "MBIPTBL" !Code_i = 0x0f !No_of_cmds_i = 0 Case "MBIPMACL" !Code_i = 0x11 !No_of_cmds_i = 0 Case "MBIPLDIN" !Code_i = 0x12 !No_of_cmds_i = 0 Case "MBDPML" !Code_i = 0x0a !No_of_cmds_i = 0 Case "MBDPCONF" !Code_i = 0x1d !No_of_cmds_i = 0 Default !Title = "*ERROR: Unrecognised Command "+!Cmd_name @Message("DCL" , "date" , "MDI" , " " , !Title , *!S) Halt !Title = "*Operator CONTinue" @Message("DCL" , "date" , "MDI" , " " , !Title , *!S) Return End Select !Cmd_data_s = !Cmd_data + "," !Data_len_i = Len( !Cmd_data_s ) !Commas_i = 0 For !Char_pos = 1 to !Data_len_i !Char = Extract( !Cmd_data_s , !Char_pos , 1 ) If !Char = "," Then !Commas_i = !Commas_i + 1 End If End For For !Count = 1 to !Commas_i !Data_item_s = Splitstr( !Cmd_data_s , "," , !Count ) !Cmd_data_i( !No_of_cmds_i ) = Int( Val( !Data_item_s ) ) !No_of_cmds_i = !No_of_cmds_i + 1 End For PERFORM/NO PLM_BLOCK , "MDI" , !Code_i , !Cmd_data_i() , !No_of_cmds_i @WaitTime ( "00h00m02s" , *!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 ----------------------------------------------------------------------------------<