--+-------------------------------------------------------------------------------+ --+ --+ ****************************************************** --+ * * --+ * THIS VERSION HAS BEEN REVISED FOR THE MDI SOFTWARE * --+ * RELOAD OF OCTOBER 1994. * --+ * * --+ ****************************************************** --+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_IPKA , !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 : --+ ------------- --+ - --+ --+ History : --+ ------- --+ Issue SIC Note Time Date Name / Updates --+ +---+ +------+ +---+ +------+ +--------------------------------------------+ --+ 1/01 289 14:08 07/02/94 A.J. TURK -- First Debug --+ 1/02 360 13:16 21/04/94 Ed COBB -- Rationalization --+ 1/03 393 13:09 20/05/94 Ed COBB -- MDI Updates --+ 1/04 406 13:12 24/05/94 Ed COBB -- MDI Updates --+ 1/06 434 11:31 13/06/94 Ph. IATRINO -- MDI Update (Fax of 12 June 94). --+ 28/09/94 M.Levay (LPARL) -- Update for new --+ MDI Software Load. --+ 1/08 11:24 8/10/94 Ph. IATRINO -- MDI Update. --+ --+-------------------------------------------------------------------------------+ 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 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_IPKA , Unique Defarg Str(80) !Proc_s Str(3) !Print = "yes" End Defarg Var Str( 3) !ExpName = "MDI" Int !NbErr = 0 Str(49) !Title = " " str(80) !S = &80s(" ") Main @OpenWindow() Select !Proc_s Case "ipkaload" @ipkaload() Case "ipkaltst" @ipkaltst() 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 ipkaload ( ) --. --. Loads IP memories to start a keep alive power test. --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: ipkaload." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) --. ****** NEXT FOUR @SENDCOMMAND STATEMENTS HAVE CHANGED SLIGHTLY ***** @SendCommand ( "MBIPTBL4" , "0, 0, 0x4000, 0" ) @WaitTime ( "00h00m20s" , *!S ) @SendCommand ( "MBIPTBL4" , "1, 0, 0x5000, 0" ) @WaitTime ( "00h00m20s" , *!S ) @SendCommand ( "MBIPTBL4" , "2, 0, 0x6000, 0" ) @WaitTime ( "00h00m20s" , *!S ) @SendCommand ( "MBIPTBL4" , "0, 0, 0x7000, 0" ) @WaitTime ( "00h00m20s" , *!S ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipkaload." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure ----------------------------------------------------------------------------------+ Procedure ipkaltst ( ) --. --. Verifies that the tables loaded by ipkaload are valid after power has been --. switched off and then back on. --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: ipkaltst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Loading queue for table dumps" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @varcmd ("MBIPLDIN", "0x154") @varcmd ("MBIPCMD" , "0x91, 300, 0x164, 0, 0x4000, 550, 0x4800, 0x7FFF, 0") --. >>>>>>>> Next 2 Lines are New <<<<<<<<<< @varcmd ("MBIPCMD", "0x91, 307, 0x1B2, 518, 2, 0x8225, 0") @varcmd ("MBIPCMD", "0x91, 312, 0x1B2, 512, 6, 0, 0, 0x4800, 0, 0xFFFF, 0xFF71") --. >>>>>>>> Next 2 Lines have changed <<<<<<< @varcmd ("MBIPCMD", "0x91, 321, 0x19C, 512") @varcmd ("MBIPCMD", "0x91, 323, 0x174, 0x13, 0x4800, 518") @varcmd ("MBIPCMD", "0x91, 327, 0x1FC") @varcmd ("MBIPCMD", "0x91, 330, 0x164, 0, 0x5000, 550, 0x4800, 0x3FFF, 0") --. >>>>>>>> Next 2 Lines are New <<<<<<<<<< @varcmd ("MBIPCMD", "0x91, 337, 0x1B2, 518, 2, 0x4225, 0") @varcmd ("MBIPCMD", "0x91, 342, 0x1B2, 512, 6, 0, 0, 0x4800, 0, 0xFFFF, 0xFF70") --. >>>>>>>> Next 2 Lines have changed <<<<<<< @varcmd ("MBIPCMD", "0x91, 351, 0x19C, 512") @varcmd ("MBIPCMD", "0x91, 353, 0x174, 0x13, 0x4800, 518") @varcmd ("MBIPCMD", "0x91, 357, 0x1FC") @varcmd ("MBIPCMD", "0x91, 360, 0x164, 0x0, 0x6000, 550, 0x4800, 0x7FFF, 0") --. >>>>>>>> Next 2 Lines are New <<<<<<<<<< @varcmd ("MBIPCMD", "0x91, 367, 0x1B2, 518, 2, 0x8225, 0") @varcmd ("MBIPCMD", "0x91, 372, 0x1B2, 512, 6, 0, 0, 0x4800, 0, 0xFFFF, 0xFF72") --. >>>>>>>> Next 2 Lines have changed <<<<<<< @varcmd ("MBIPCMD", "0x91, 381, 0x19C, 512") @varcmd ("MBIPCMD", "0x91, 383, 0x174, 0x13, 0x4800, 518") @varcmd ("MBIPCMD", "0x91, 387, 0x1FC") @varcmd ("MBIPCMD", "0x91, 390, 0x164, 0, 0x7000, 550, 0x4800, 0x7FFF, 0") --. >>>>>>>> Next 2 Lines are New <<<<<<<<<< @varcmd ("MBIPCMD", "0x91, 397, 0x1B2, 518, 2, 0x8225, 0") @varcmd ("MBIPCMD", "0x91, 402, 0x1B2, 512, 6, 0, 0, 0x4800, 0, 0xFFFF, 0xFF71") --. >>>>>>>> Next 2 Lines have changed <<<<<<< @varcmd ("MBIPCMD" , "0x91, 411, 0x19C, 512") @varcmd ("MBIPCMD" , "0x91, 413, 0x174, 0x13, 0x4800, 518") @varcmd ("MBIPCMD" , "0x91, 417, 0x1FC") @varcmd ("MBIPLDIN", "0x134") @varcmd ("MBIPLDIN", "0x136") !Title = "~Start IP table dumps" @Message ("DC", "time", !ExpName, !Phase, !Title, *!S) !Title = "Downlinking Reciprocal table " @Message ("DC", "time", !ExpName, !Phase, !Title, *!S) @varcmd ( "MBIPLDIN" , "0x152, 300") @WaitTime ("00h00m30s", *!S) !Title = "Downlinking Square Root table " @Message ("DC", "time", !ExpName, !Phase, !Title, *!S) @varcmd ("MBIPLDIN", "0x152, 330") @WaitTime ("00h00m30s", *!S) !Title = "Downlinking Velocity Lookup table " @Message ("DC", "time", !ExpName, !Phase, !Title, *!S) @varcmd ("MBIPLDIN", "0x152, 360") @WaitTime ("00h00m30s", *!S) !Title = "Downlinking Reciprocal table " @Message ("DC", "time", !ExpName, !Phase, !Title, *!S) @varcmd ("MBIPLDIN" , "0x152, 390") @WaitTime ("00h00m30s", *!S) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipkaltst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure ----------------------------------------------------------------------------------< 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) -- Beep Halt !Title = "+Operator CONTinue " @Message( "DC", "time", "MDI", " ", !Title , *!S) Return End If Select !Cmd_name Case "MBIPCMD" !Code_i = 0x0E !No_of_cmds_i = 0 Case "MBIPLDIN" !Code_i = 0x12 !No_of_cmds_i = 1 !Cmd_data_i(0) = 4 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( "DC", "time", "MDI", " ", !Title , *!S) -- Beep Halt !Title = "+Operator CONTinue " @Message( "DC", "time", "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 ----------------------------------------------------------------------------------<