--+-----------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ Name : MDI_IP , !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 : --+ Control File MDI_ON must have been successfully performed. --+ History : --+ Issue SIC Note Time Date Name/Updates --+ +---+ +------+ +---+ +------+ +------------------------------------------+ --+ 1/00 211 18:26 11/01/94 Jon B CARTER -- Conversion from MDI. --+ 1/01 289 11:44 03/02/94 A.J. TURK -- During debug phase. --+ 1/02 360 13:10 21/04/94 Ed COBB -- Rationalization. --+ 1/03 393 13:18 20/05/94 Ed COBB -- MDI Updates. --+ 1/04 406 13:10 24/05/94 Ed COBB -- MDI Updates. --+ 1/08 444 15:15 18/06/94 Ed COBB -- MDI Updates. --+ 28/09/94 Michael Levay (LPARL) -- S/W update. --+ 1/10 486 12:56 8/10/94 Ph. IATRINO -- MDI Updates. --+ 1/11 486 21:16 10/10/94 Ph. IATRINO -- MDI Updates. --+ 1/12 525 22:32 15/12/94 Ph. IATRINO -- Minor Mods. --+ 1/13 531 03:18 07/01/95 Ed COBB -- Experimenter Requested Mods. --+ 1/14 20/01/95 Michael Levay (LPARL) -- S/W Reload --+ 1/15 544 12:17 31/01/95 Ph. IATRINO -- MDI Updates. --+ 1/16 545 14:55 02/02/95 B. Newcomb -- MDI corrections. --+ 1/17 572 19:19 17/03/95 O. MICHEL -- MDI Updates. --+ 1/18 597 16:26 02/05/95 Ph. IATRINO -- Update for EMC. --+-----------------------------------------------------------------------------+ 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 Int !GM_I0 Int !GM_I9 End Common --------------------------------------------------------------------------------+ Extern Cfile PLM_BLOCK , MDI_IPCSLD, MDI_LIP 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_IP , 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 "ipcom" @ipcom() Case "ipdmatst" @ipdmatst() Case "ipdynmac" @ipdynmac() Case "ipmemtst" @ipmemtst() Case "ipseqtst" @ipseqtst() Case "iptbload" @iptbload() Case "iptbltst" @iptbltst() Case "iptmtst" @iptmtst() Case "ipwload" @ipwload() Case "iploct94" @iploct94() Default !Title = "*ERROR: UNKNOWN PROCEDURE: "+!Proc_s @Message("DCL", "date", !ExpName, " ", !Title, *!S) Halt !Title = "*Operator CONTinue" @Message("DC", "date", !ExpName, " ", !Title, *!S) Return !Rstat End Select @ExitCF (!NbErr) @PrintCF ( !ExpName , !Print ) Return !Rstat End Program --------------------------------------------------------------------------------+ Procedure ipcom ( ) --. This is the top level procedure for commissioning the Image Processor. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Int !NbErr = 0 Str(10) !Time = " " Str(80) !Question = " " Str(80) !Check = " " Str(80) !Resp_s = " " Str(80) !LM_S1 = " " Main !Title = "-EXECUTING PROCEDURE: ipcom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Question = "VERIFY 5K & 160K DATA (DONE/done)" !Check = "in DONE, done" @AskStr (!Question, !Check, *!Resp_s, *!S, *!NbErr) @ipwload() !Question = "START 5K Sci Data (DONE/done)" !Check = "in DONE, done" @AskStr (!Question, !Check, *!Resp_s, *!S, *!NbErr) @ipmemtst() !Question = "MDI to Open Decom File (DONE/done)" !Check = "in DONE, done" @AskStr (!Question, !Check, *!Resp_s, *!S, *!NbErr) @iptmtst() @iptbload() @iptbltst() @ipdmatst() @ipdynmac() @ipseqtst() @iploct94() @SendCommand ("MBSQSTR","0") @WaitTime ("00h05m00s",*!S) @WaitTime ("00h01m00s",*!S) @SendCommand ("MBSQEND","") @WaitTime ("00h01m00s",*!S) PERFORM/NO MDI_LIP , "liplbic4" , "no" !Question = "MDI to Close Decom File (DONE/done)" !Check = "in DONE, done" @AskStr (!Question, !Check, *!Resp_s, *!S, *!NbErr) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipcom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure ipdmatst ( ) --. Test DMA as part of IP commissioning Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Str(80) !Question = " " Int !NbErr = 0 Str(10) !Time = " " Int !LM_I0 = 0 Main !Title = "-EXECUTING PROCEDURE: ipdmatst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) @varcmd ( "MBIPCMD" , "0x91, 400, 0x164, 252, " + \ "0, 550, 0x4800, 0x648F, 0x10" ) @varcmd ( "MBIPCMD","0x91,407,0x1B2,518,2,0x66B5,0x10") @varcmd ( "MBIPCMD","0x91,412,0x1B2,512,6,1,0,0x4800,0,0xFFFF,0xFF50") @varcmd ( "MBIPCMD","0x91,421,0x19C,512") @varcmd ( "MBIPCMD","0x91,423,0x174,0x13,0x4800,518") @varcmd ( "MBIPCMD" , "0x91, 427, 0x1FC" ) @varcmd ( "MBIPCMD" , "0x91, 430, 0x164, 252, " + \ "0x800, 550, 0x4800, 0x648F, 0x10" ) @varcmd ( "MBIPCMD","0x91,437,0x1B2,518,2,0x66B5,0x10") @varcmd ( "MBIPCMD","0x91,442,0x1B2,512,6,1,0x800,0x4800,0,0xFFFF,0xFF50") @varcmd ( "MBIPCMD","0x91,451,0x19C,512") @varcmd ( "MBIPCMD","0x91,453,0x174,0x13,0x4800,518") @varcmd ( "MBIPCMD","0x91,457,0x1FC" ) @WaitTime ("00h00m15s",*!S) @varcmd ( "MBIPCMD" , "0x91, 460, 0x164, 252, " + \ "0x1000, 550, 0x4000, 0x648F, 0x10" ) @varcmd ( "MBIPCMD","0x91,467,0x1B2,512,6,1,0x1000,0x4000,0,0xFFFF,0xFF51") @varcmd ( "MBIPCMD","0x91,476,0x19C,512") @varcmd ( "MBIPCMD","0x91,478,0x164,252, " + \ "0x1800, 550, 0x4800, 0x648F, 0x10" ) @varcmd ( "MBIPCMD","0x91,485,0x1B2,512,6,1,0x1800,0x4800,0,0xFFFF,0xFF52" ) @varcmd ( "MBIPCMD","0x91,494,0x19C,512") @varcmd ( "MBIPCMD","0x91,496,0x1B2,518,2,0x66B5,0x10") @varcmd ( "MBIPCMD","0x91,501,0x19A,0x4b,0x4000,0x4800,518,518") @varcmd ( "MBIPCMD","0x91,507, 0x1FC" ) @varcmd ( "MBIPCMD","0x91,0,400,430,460" ) @varcmd ( "MBIPLDIN", "0x134" ) @varcmd ( "MBIPLDIN", "0x136" ) @WaitTime ("00h00m15s",*!S) @SendCommand ( "MBCMHDR1", "0x4041, 0x4243, 0, 1, 0" ) @SendCommand ( "MBCMTP1R" , "0xC023," + &d( !GM_I0) + "," + &d( !GM_I0 ) ) @WaitTime ( "00h03m00s" , *!S ) @SendCommand ( "MBCMHDR1", "0x4141, 0x82C3, 0, 1, 1" ) @SendCommand ( "MBCMTP1R" , "0xC023," + &d( !GM_I0) + "," + &d( !GM_I0 ) ) @WaitTime ( "00h03m00s" , *!S ) @SendCommand ( "MBCMHDR1", "0x4040, 0x4040, 0, 1, 2" ) @SendCommand ( "MBCMTP1R" , "0xC023," + &d( !GM_I0) + "," + &d( !GM_I0 ) ) @WaitTime ( "00h05m00s" , *!S ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipdmatst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure ipdynmac ( ) --. This procedure loads the IP macro queue with the instructions needed for --. realizing the first test of the dynamics program. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Int !NbErr = 0 Str(10) !Time = " " Str(80) !Question = " " Str(80) !Check = " " Str(10) !LM_S0 = " " Main !Title = "-EXECUTING PROCEDURE: ipdynmac." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) @varcmd ( "MBIPCMD" , "0x92 , 0 , 1" ) @varcmd ( "MBIPLDIN" , "0x154" ) @varcmd ("MBIPCMD","0x91,0,600") @varcmd ("MBIPCMD","0x91,600,0x1B2,1000,6,1300,0,1300,0x800,550,0x4000") @varcmd ("MBIPCMD","0x91,609,0x1B2,1006,2,2,127,0x1B2,69,2,0,0") @varcmd ("MBIPCMD","0x91,619,0x1B2,1008,8,1300,0x1000,550,0x4800," + \ "1024,1024,1040,69") @varcmd ("MBIPCMD","0x91,630,0x17C,1000,0x17A,1008" ) @WaitTime ("00h00m15s",*!S) @varcmd ("MBIPCMD","0x91,634,0x01DE,0x01DE,0x01DE,0x01DE") @varcmd ("MBIPCMD","0x91,638,0x1B2,512,6,1,0,0x4000,0,0xFFFF,0xFF40") @varcmd ("MBIPCMD","0x91,647,0x19C,512") @varcmd ("MBIPCMD","0x91,649,0x1B2,512,6,1,0x1000,0x4800,0,0xFFFF,0xFF41") @varcmd ("MBIPCMD","0x91,658,0x19C,512") @varcmd ("MBIPCMD","0x91,660,0x1B2,518,2,0x225,0x10") @varcmd ("MBIPCMD","0x91,665,0x19A,0x4b,0x4000,518,0x4800,518") @varcmd ("MBIPCMD","0x91,671,0x1FC") @WaitTime ("00h00m15s",*!S) @varcmd ("MBIPCMD","0x91,700,0x164,252,0,550,0x4800,0x648F,0x10") @varcmd ("MBIPCMD","0x91,707,0x1B2,512,6,1,0,0x4800,0,0xFFFF,0xFF42") @varcmd ("MBIPCMD","0x91,716,0x1B2,518,2,0x66B5,0x10") @varcmd ("MBIPCMD","0x91,721,0x19C,512") @varcmd ("MBIPCMD","0x91,723,0x174,0x13,0x4800,518") @varcmd ("MBIPCMD","0x91,727,0x1FC") @WaitTime ("00h00m15s",*!S) @varcmd ("MBIPCMD","0x91,800,0x164,252,0x800,550,0x4800,0x648F,0x10") @varcmd ("MBIPCMD","0x91,807,0x1B2,512,6,1,0x800,0x4800,0,0xFFFF,0xFF43") @varcmd ("MBIPCMD","0x91,816,0x1B2,518,2,0x66B5,0x10") @varcmd ("MBIPCMD","0x91,821,0x19C,512") @varcmd ("MBIPCMD","0x91,823,0x174,0x13,0x4800,518") @varcmd ("MBIPCMD","0x91,827,0x1FC") @WaitTime ("00h00m15s",*!S) @varcmd ("MBIPCMD","0x91,900,0x164,252,0x1000,550,0x4800,0x648F,0x10") @varcmd ("MBIPCMD","0x91,907,0x1B2,512,6,1,0x1000,0x4800,0,0xFFFF,0xFF44") @varcmd ("MBIPCMD","0x91,916,0x1B2,518,2,0x66B5,0x10") @varcmd ("MBIPCMD","0x91,921,0x19C,512") @varcmd ("MBIPCMD","0x91,923,0x174,0x13,0x4800,518") @varcmd ("MBIPCMD","0x91,927,0x1FC") @WaitTime ("00h00m15s",*!S) @varcmd ( "MBIPLDIN", "0x13c" ) @varcmd ( "MBIPCMD" , "0x32 , 0x8000 , 600" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBDPMD" , "0x1000 , 0xc99c , 40" ) !Question = "Dump of queue ok?" !Check = "in Y, N, y, n" @AskStr ( !Question , !Check , *!LM_S0 , *!S , *!NbErr ) @Upper( !LM_S0 , *!LM_S0 ) If !LM_S0 <> "Y" Then Halt End If @varcmd ( "MBIPLDIN", "0x134" ) @varcmd ( "MBIPLDIN", "0x136" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipdynmac." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure ipmemtst ( ) --. Performs IP memory test Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Int !NbErr = 0 Str(80) !Question = " " Str(80) !Check = " " Str(80) !LM_S1 = "" Main !Title = "-EXECUTING PROCEDURE: ipmemtst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) @varcmd ( "MBIPLDIN" , "0x110, 0x4000, 0x4800, 0" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPRDDR" , "6" ) @varcmd ( "MBIPLDIN" , "0x110, 0x5000, 0x5800, 0x800" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPRDDR" , "6" ) @varcmd ( "MBIPLDIN" , "0x110, 0x6000, 0x6800, 0x1000" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPRDDR" , "6" ) @varcmd ( "MBIPLDIN" , "0x110, 0x7000, 0x7800, 0x1800" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPRDDR" , "6" ) @varcmd ( "MBIPLDIN" , "0x110, 0x8000, 0x8800, 0x2000" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPRDDR" , "6" ) @varcmd ( "MBIPLDIN" , "0x110, 0x9000, 0x9800, 0x2800" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPRDDR" , "6" ) @varcmd ( "MBIPLDIN" , "0x110, 0x3000, 0x3800, 0" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPRDDR" , "6" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipmemtst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure ipseqtst( ) --. This procedure verifies the normal flight operation of the Image --. Processor-Camera-Dep subsystem by executing a test version of the --. dynamics program. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Int !NbErr = 0 Str(80) !Question = "" Str(80) !LM_S1 = "" Int !LM_I0 = 0 Int !LM_I1 = 0 Main !Title = "-EXECUTING PROCEDURE: ipseqtst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) @varcmd ( "MBDPML" , "0x1000, 0x4088, 240" ) @varcmd ("MBIPCMD","0x91,0,600") @SendCommand ( "MBSQSTR" , "0x500" ) @WaitTime ( "00h00m30s" , *!S ) For !LM_I0 = 0 to 20 !LM_I1 = Get( "MKSQFRM" ) !Title = "Wait Count = " + &4d( !LM_I0 ) !Title = !Title + " Frame Number " + &2d( !LM_I1 ) @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Exit If !LM_I1 >= 80 @WaitTime ( "00h01m00s" , *!S ) End For @SendCommand ( "MBSQEND" , "" ) If !LM_I1 <> 80 Then !Question = "Frame Count ERROR ... should be 80" @AskStr ( !Question , "??" , *!LM_S1 , *!S , *!NbErr ) End If @WaitTime ( "00h04m00s" , *!S ) @varcmd ( "MBIPLDIN" , "0x152, 700" ) @WaitTime ( "00h02m30s" , *!S ) @varcmd ( "MBIPLDIN" , "0x152, 800" ) @WaitTime ( "00h02m30s" , *!S ) @varcmd ( "MBIPLDIN" , "0x152, 900" ) @WaitTime ( "00h02m30s" , *!S ) @varcmd ( "MBDPML" , "0x1000, 0x4088, 60" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipseqtst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure iptbload ( ) --. Loads IP WCS, Tables and Dynamics program. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: iptbload." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBIPTBL4" , "0, 0, 0x800a, 0" ) @WaitTime ( "00h00m10s" , *!S ) @SendCommand ( "MBIPTBL4" , "1, 0, 0x8009, 0" ) @WaitTime ( "00h00m10s" , *!S ) @SendCommand ( "MBIPTBL4" , "2, 0x8000, 0x800a, 0" ) @WaitTime ( "00h00m15s" , *!S ) @varcmd ( "MBIPTBL" , "0x10,4000,3800,4096,4096,1024" ) @WaitTime ( "00h00m15s" , *!S ) @SendCommand ( "MBIPTBL4" , "3, 0, 0x8800, 0" ) @WaitTime ( "00h00m15s" , *!S ) @varcmd ("MBIPTBL", "4,0x1000,0x8800,0,4000, " + \ "3952,176,24,0,0x6800,0,0,0x200,0xFA,0xF70" ) @WaitTime ( "00h00m15s" , *!S ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: iptbload." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure iptbltst ( ) --. Peforms IP Table Dump Test. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: iptbltst." @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,0x8009,550,0x4800,0x3FFF,0") @varcmd ("MBIPCMD","0x91,307,0x1B2,518,2,0x4225, 0") @varcmd ("MBIPCMD","0x91,312,0x1B2,512,6,1,0,0x4800,0,0xFFFF,0xFF70") @varcmd ("MBIPCMD","0x91,321,0x19C,512") @varcmd ("MBIPCMD","0x91,323,0x174,0x13,0x4800,518") @varcmd ("MBIPCMD","0x91,327,0x1FC") @WaitTime ( "00h00m10s" , *!S ) @varcmd ("MBIPCMD","0x91,330,0x164,0,0x800A,550,0x4800,0x7FFF,0") @varcmd ("MBIPCMD","0x91,337,0x1B2,518,2,0x8225, 0") @varcmd ("MBIPCMD","0x91,342,0x1B2,512,6,1,0,0x4800,0,0xFFFF,0xFF71") @varcmd ("MBIPCMD","0x91,351,0x19C,512") @varcmd ("MBIPCMD","0x91,353,0x174,0x13,0x4800,518") @varcmd ("MBIPCMD","0x91,357,0x1FC") @WaitTime ( "00h00m10s" , *!S ) @varcmd ("MBIPCMD","0x91,360,0x164,0x8000,0x800A,550,0x4800,0x7FFF,0") @varcmd ("MBIPCMD","0x91,367,0x1B2,518,2,0x8225, 0") @varcmd ("MBIPCMD","0x91,372,0x1B2,512,6,1,0,0x4800,0,0xFFFF,0xFF72") @varcmd ("MBIPCMD","0x91,381,0x19C,512") @varcmd ("MBIPCMD","0x91,383,0x174,0x13,0x4800,518") @varcmd ("MBIPCMD","0x91,387,0x1FC") @WaitTime ( "00h00m10s" , *!S ) @varcmd ("MBIPMACL","400,0x164,0x0000,0x8800,550,0x4800,3500,0") @varcmd ("MBIPMACL","9999,0x1b2,512,6,1,0,0x4800,0,0xffff,0xff73") @varcmd ("MBIPMACL","9999,0x1B2,518,2,4050,0") @varcmd ("MBIPMACL","9999,0x19C,512") @varcmd ("MBIPMACL","9999,0x174,0x13,0x4800,518") @varcmd ("MBIPMACL","9999,0x1FC") @varcmd ("MBIPMACL","500,0x164,0x1000,0x8800,550,0x4800,6500,0") @varcmd ("MBIPMACL","9999,0x1b2,512,6,1,0,0x4800,0,0xffff,0xff74") @varcmd ("MBIPMACL","9999,0x1B2,518,2,7050,0") @varcmd ("MBIPMACL","9999,0x19C,512") @varcmd ("MBIPMACL","9999,0x174,0x13,0x4800,518") @varcmd ("MBIPMACL","9999,0x1FC") @varcmd ( "MBIPLDIN", "0x134" ) @varcmd ( "MBIPLDIN", "0x136" ) @WaitTime ( "00h00m10s" , *!S ) !Title = "~Start IP Table Dumps" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "Downlinking Square Root table" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @varcmd ( "MBIPLDIN" , "0x152, 300" ) @WaitTime ( "00h00m30s" , *!S ) !Title = "Downlinking Reciprocal 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 Full disk Crop List" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @varcmd ( "MBIPLDIN" , "0x152, 400" ) @WaitTime ( "00h00m30s" , *!S ) !Title = "Downlinking Limb Figure List" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @varcmd ( "MBIPLDIN" , "0x152, 500" ) @WaitTime ( "00h00m30s" , *!S ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: iptbltst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure iptmtst ( ) --. Performs IP telemetry test Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: iptmtst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "Downlinking RAW test pattern" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @varcmd ("MBIPLDIN","0x112,0x4800,0x93") @varcmd ("MBIPLDIN","0x1B2,512,6,1,0,0x4800,0x93,0xFFFF,0xFF60") @varcmd ("MBIPLDIN","0x1B2,518,2,0xFFFF,0x11") @varcmd ("MBIPLDIN","0x19C,512") @varcmd ("MBIPLDIN","0x174,0x13,0x4800,518") @WaitTime ( "00h02m30s" , *!S ) !Title = "Downlinking COMPRESSED test pattern" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @varcmd ("MBIPLDIN","0x1B2,512,6,1,0,0x4800,0xC4,0xFFFF,0xFF61") @varcmd ("MBIPLDIN","0x1B2,518,2,0xFFFF,0x11") @varcmd ("MBIPLDIN","0x19C,512") @varcmd ("MBIPLDIN","0x174,0x11,0x4800,518") @WaitTime ( "00h02m30s" , *!S ) !Title = "Downlinking PACKED test pattern" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @varcmd ("MBIPLDIN","0x1B2,512,6,1,0,0x4800,0xCC,0xFFFF,0xFF62") @varcmd ("MBIPLDIN","0x1B2,518,2,0xFFFF,0x11") @varcmd ("MBIPLDIN","0x19C,512") @varcmd ("MBIPLDIN","0x174,0x12,0x4800,518") !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: iptmtst." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+ Procedure ipwload ( ) --. Loads IP WCS Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Str(80) !Question = "" Str(80) !Check = "" Int !NbErr = 0 Int !Last_NbErr = 0 Int !Get_Raw = 0 Int !Get_Int = 0 Str(80) !LM_S1 = "" Str(80) !LM_S2 = "" Str(80) !LM_S3 = "" Main !Title = "-EXECUTING PROCEDURE: ipwload." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) ##LOAD !Title = "Loading WCS" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBIPLBIC" , "0x36, 6" ) @WaitTime ("00h02m00s", *!S) !Last_NbErr = !NbErr @CheckReg( "MKDPSPEC" , "= 9" , *!NbErr ) @CheckReg( "MKDPSPE1" , "= 0" , *!NbErr ) @CheckReg( "MKDPSPE2" , "= 1" , *!NbErr ) If !NbErr = !Last_NbErr Then !LM_S3 = "NOERR" Else !LM_S3 = "ERROR" End If If !LM_S3 = "NOERR" Then Goto ##LOADDONE End If !Title = "*ERROR LOADING WCS" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Question = "Try Load again?" !Check = "in Y, N, y, n" @AskStr ( !Question , !Check , *!LM_S1 , *!S , *!NbErr ) @Upper( !LM_S1 , *!LM_S1 ) If !LM_S1 = "Y" Then Goto ##LOAD End If !Question = "WCS LOAD ERROR. SELECT ACTION AFTER HALT" @AskStr ( !Question , "??" , *!LM_S1 , *!S , *!NbErr ) Halt !Title = "*Operator Action" @Message("DC" , "time" , !ExpName , " " , !Title , *!S) ##LOADDONE @varcmd ("MBIPLDIN","0x116,0x8000,128") @varcmd ("MBIPLDIN","0x118,0x8800,136") ---- @SendCommand ( "MBIPRSAP" , "" ) ---- @SendCommand ( "MBIPRUN" , "" ) @WaitTime ( "00h00m30s" , *!S ) !Get_Int = Get( "MKIPSTAT" ) If !Get_Int <> 0x48 Then !Question = "IP DID NOT GO TO RUN...." @AskStr ( !Question , "??" , *!LM_S1 , *!S , *!NbErr ) Halt !Title = "*Operator Action" @Message("DC" , "time" , !ExpName , " " , !Title , *!S) End If !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipwload." @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) 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 "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 = 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) 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 --------------------------------------------------------------------------------+ Procedure iploct94 ( ) --. Loads ip program to test dep/ip revision of October 1994 Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s("") Str(80) !Question = " " Int !NbErr = 0 Str(10) !Time = " " Int !LM_I0 = 0 Main !Title = "-EXECUTING PROCEDURE: ipoct94." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) @varcmd ("MBIPLDIN","0x0154") @varcmd ("MBIPCMD","0x0091,0x0000,0x0100") @varcmd ("MBIPCMD","0x0091,0x0100,0x01AE,0x0C00,0x0000,0x0110") @varcmd ("MBIPCMD","0x0091,0x0104,0x01AE,0x0C00,0x0800,0x0110") @varcmd ("MBIPCMD","0x0091,0x0108,0x01AE,0x0C00,0x0900,0x0110") @varcmd ("MBIPCMD","0x0091,0x010C,0x01B0,0x0C00,0x1300,0x0127") @varcmd ("MBIPCMD","0x0091,0x0110,0x01B2,0x0BB0," + \ "0x0006,0x0001,0x1800,0x4000,0x0000,0xFFFF,0xFF10") @varcmd ("MBIPCMD","0x0091,0x0119,0x019C,0x0BB0") @varcmd ("MBIPCMD","0x0091,0x011B,0x0164,0x0514," + \ "0x1800,0x0226,0x4000,0x0800,0x0000,0x01DE") @varcmd ("MBIPCMD","0x0091,0x0123,0x01DE,0x01DE") @varcmd ("MBIPCMD","0x0091,0x0125,0x0156,0x013C") @varcmd ("MBIPCMD","0x0091,0x0127,0x01B2,0x0BA0," + \ "0x0006,0x0001,0x1000,0x4000,0x0000,0xFFFF,0xFF11") @varcmd ("MBIPCMD","0x0091,0x0130,0x019C,0x0BA0") @varcmd ("MBIPCMD","0x0091,0x0132,0x0164,0x0154," + \ "0x1000,0x0226,0x4000,0x0800,0x0000,0x01DE") @varcmd ("MBIPCMD","0x0091,0x013A,0x01DE,0x01DE") @varcmd ("MBIPCMD","0x0091,0x013C,0x01B2,0x0049,0x0002,0x27ff,0x0000") @varcmd ("MBIPCMD","0x0091,0x0141,0x0174,0x0003,0x4000,0x0049") @varcmd ("MBIPCMD","0x0091,0x0145,0x01FC") @varcmd ("MBIPLDIN","0x0136") !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ipoct94t." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure --------------------------------------------------------------------------------+