--+--------------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_STRDYN1 , !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 : F --+ Author : Ph. IATRINO --+--------------------------------------------------------------------------------+ --+ 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/00 611 13:28 21/06/95 Ph. IATRINO -- New On Board S/W. --+ --+--------------------------------------------------------------------------------+ 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 End Common -----------------------------------------------------------------------------------+ Extern Cfile PLM_BLOCK Group MWTM , PWP12TM Procedure WaitAna , WaitDig , WaitReg , WaitTime Procedure DispMess , ExitCF , Message , OpenWindow Procedure PrintAna , PrintDig , PrintReg , PrintParam Procedure CheckArgReal, CheckArgStr, CheckArgInt Procedure AskReal , AskStr , AskInt Procedure CheckAna , CheckDig , CheckReg Procedure Lower , Upper Procedure SendCommand End Extern -----------------------------------------------------------------------------------+ Program MDI_STRDYN1 , Unique Defarg Str(80) !Proc_s Str(3) !Print = "yes" End Defarg Var Str( 3) !ExpName = "MDI" Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Main @OpenWindow() Select !Proc_s Case "scitbls" @scitbls() Case "runstr" @runstr() 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 scitbls () --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !Cmd_data_i(30) Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: scitbls." @Message ("DCL", "date", !ExpName, !Phase, !Title, *!S) @SendCommand ("MBIPTBL4", "0, 0, 0x800a, 0") @SendCommand ("MBIPTBL4", "1, 0, 0x8009, 0") @SendCommand ("MBIPTBL4", "2, 0x8000 0x800a, 0") @varcmd ("MBIPTBL", "0x10, 4000, 3800, 4096, 4096, 1024") @SendCommand ("MBIPTBL4", "3, 0, 0x8800, 0") @varcmd ("MBIPTBL", "4,0x100,0x8800,0,3856,3816," + \ "296,12,0x9800,0x880E,0,0,1280,0xBFFF,0xFFB3") !Cmd_data_i(0) = 0x11 !Cmd_data_i(1) = 1920 !Cmd_data_i(2) = 3584 !Cmd_data_i(3) = 6016 !Cmd_data_i(4) = 9472 !Cmd_data_i(5) = 13824 !Cmd_data_i(6) = 18816 !Cmd_data_i(7) = 23936 !Cmd_data_i(8) = 28416 !Cmd_data_i(9) = 31488 !Cmd_data_i(10) = 32640 !Cmd_data_i(11) = 31488 !Cmd_data_i(12) = 28416 !Cmd_data_i(13) = 23936 !Cmd_data_i(14) = 31488 !Cmd_data_i(15) = 28416 !Cmd_data_i(16) = 23936 !Cmd_data_i(17) = 18816 !Cmd_data_i(18) = 13824 !Cmd_data_i(19) = 9472 !Cmd_data_i(20) = 6016 !Cmd_data_i(21) = 3584 !Cmd_data_i(22) = 1920 PERFORM/NO PLM_BLOCK , "MDI" , 0x0F , !Cmd_data_i() , 23 @WaitTime ("00h02m00s", *!S) !Cmd_data_i(0) = 0x12 !Cmd_data_i(1) = 1920 !Cmd_data_i(2) = 3584 !Cmd_data_i(3) = 6016 !Cmd_data_i(4) = 9472 !Cmd_data_i(5) = 13824 !Cmd_data_i(6) = 18816 !Cmd_data_i(7) = 23936 !Cmd_data_i(8) = 28416 !Cmd_data_i(9) = 31488 !Cmd_data_i(10) = 32640 !Cmd_data_i(11) = 31488 !Cmd_data_i(12) = 28416 !Cmd_data_i(13) = 23936 !Cmd_data_i(14) = 31488 !Cmd_data_i(15) = 28416 !Cmd_data_i(16) = 23936 !Cmd_data_i(17) = 18816 !Cmd_data_i(18) = 13824 !Cmd_data_i(19) = 9472 !Cmd_data_i(20) = 6016 !Cmd_data_i(21) = 3584 !Cmd_data_i(22) = 1920 PERFORM/NO PLM_BLOCK , "MDI" , 0x0F , !Cmd_data_i() , 23 @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPTBL", "6,0x7000,0x8800,0,3264,6,8,192,4,0,0x3001,0,0,4096,4096,0") @WaitTime ("00h00m15s", *!S) @varcmd ("MBIPTBL", "7,4096,34817,0,3840,8,8,8,32778,1,0,168,12,31744," + \ "34828,0,0,960,0xBfff,0xFFB1") @WaitTime ("00h00m15s", *!S) @varcmd ("MBIPTBL", "7,4096,34818,0,3840,8,8,8,34826,1,0,232,12,35328," + \ "34829,0,0,960,0xBFFF,0xFFB2") @WaitTime ("00h00m15s", *!S) !Title = "-FINISHED PROCEDURE: scitbls." @Message ("DCL", "date", !ExpName, !Phase, !Title, *!S) Return End Procedure -----------------------------------------------------------------------------------+ Procedure runstr () --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !Cmd_data_i(30) Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: runstr." @Message ("DCL", "date", !ExpName, !Phase, !Title, *!S) @SendCommand ("MBDPMOD", "1") @varcmd ("MBIPLDIN", "0x016C,0x0000,0x7000,0x0000,0x0010,0x0001") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x016C,0x7C00,0x880C,0x8400,0x0003,0x0000") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x016C,0x0000,0x5800,0x0000,0x0010,0x0020") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x016C,0x0000,0x5000,0x0000,0x0010,0x0040") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x016C,0x0000,0x6000,0x0000,0x0010,0x0050") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x016C,0x0000,0x6800,0x0000,0x0010,0x0068") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x016C,0x0000,0x7000,0x0000,0x0010,0x0070") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x016C,0x0000,0x7800,0x0000,0x0010,0x0088") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x0140, 26, 0") @varcmd ("MBIPLDIN", "0x0140, 28, 1") @varcmd ("MBIPLDIN", "0x01B2, 69, 2, 0, 0") @varcmd ("MBIPLDIN", "0x01B2, 560, 2, 0, 0") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x0154") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPCMD", "0x0091, 0, 0x0100") @varcmd ("MBIPLDIN", "0x0136") @WaitTime ("00h00m05s", *!S) @SendCommand ("MBDPMOD", "3") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x0134") @WaitTime ("00h00m05s", *!S) @varcmd ("MBIPLDIN", "0x0140, 3104, 0") @SendCommand ("MBSQREG", "5, 1") @WaitTime ("00h00m03s", *!S) @varcmd ("MBIPLDIN", "0x01B2, 464, 3, 0, 0x2011, 4800") @varcmd ("MBIPLDIN", "0x01EC, 464") @SendCommand ("MBSQSTR", "0") !Title = "-FINISHED PROCEDURE: runstr." @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 -----------------------------------------------------------------------------------+