--+----------------------------------------------------------------------------+ --+ --+ ****************************************************** --+ * * --+ * THIS VERSION HAS BEEN REVISED FOR THE MDI SOFTWARE * --+ * RELOAD OF OCTOBER 1994. * --+ * * --+ ****************************************************** --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_LSEQ --+ 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 16:53 30/11/93 A.J. TURK -- Conversion from MDI language. --+ 1/01 289 16:58 07/02/94 A.J. TURK -- During debug phase. --+ 1/02 360 11:41 05/05/94 Ed COBB/Ph. IATRINO -- Rationalization. --+ 1/03 393 16:30 11/05/94 Ed COBB/Ph. IATRINO -- MDI Updates. --+ 1/07 443 18:01 17/06/94 Ed COBB/Ph. IATRINO -- MDI Updates. --+ 28/09/94 Michael Levay (LPARL) -- S/W update. --+ 1/09 12:52 8/10/94 Ph. IATRINO -- MDI Updates. --+ 1/10 572 14:20 17/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 Cfile MDI_MODE , MDI_EMI2 , 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_LSEQ , 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() Cflog Select !Proc_s Case "lseqtest" @lseqtest() Case "lsqcom" @lsqcom() 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 lseqtest ( ) --. --. This procedure loads and executes a DEP Imaging Sequence --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Int !LM_I0 = 0 Int !LM_I1 = 0 Main !Title = "-EXECUTING PROCEDURE: lseqtest." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) ---. Sequence start command changed in october update @SendCommand ("MBSQSTR", "0x400") -- initiate DEP sequence at address 0x400 @WaitTime ( "00h00m45s" , *!S ) -- DEP sequence EMITEST !Title = "~DEP Sequence Status" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @PrintParam( "MKDPSQST" , "REG" ) @PrintParam( "MKSQID" , "REG" ) @PrintParam( "MKSHNEXP" , "REG" ) @PrintParam( "MKSQNUM" , "REG" ) @PrintParam( "MKDPSQPT" , "REG" ) @PrintParam( "MKDPSQEB" , "REG" ) @PrintParam( "MKSQINTC" , "REG" ) For !LM_I0 = 0 to 10 @WaitTime ( "00h00m15s" , *!S ) !Title = "Iteration: " + &3d( !LM_I0 ) !LM_I1 = Get( "MKSQFRM" ) !Title = !Title + " Frame # in Seq:" + &3d( !LM_I1 ) @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !LM_I1 = Get( "MKSQFQPP" ) !Title = "Sequence Frame Queue Packet Pointer" + &3d( !LM_I1 ) @Message( "C" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "Pointer MTM1 MTM2 PAW" @Message( "C" , "time" , !ExpName , !Phase , !Title , *!S ) !LM_I1 = Get( "MKSQM1A1" ) !Title = " 1 " + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQM2A1" ) !Title = !Title + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQPAA1" ) !Title = !Title + " " + &3d( !LM_I1 ) @Message( "C" , "time" , !ExpName , !Phase , !Title , *!S ) !LM_I1 = Get( "MKSQM1A2" ) !Title = " 2 " + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQM2A2" ) !Title = !Title + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQPAA2" ) !Title = !Title + " " + &3d( !LM_I1 ) @Message( "C" , "time" , !ExpName , !Phase , !Title , *!S ) !LM_I1 = Get( "MKSQM1A3" ) !Title = " 3 " + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQM2A3" ) !Title = !Title + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQPAA3" ) !Title = !Title + " " + &3d( !LM_I1 ) @Message( "C" , "time" , !ExpName , !Phase , !Title , *!S ) !LM_I1 = Get( "MKSQM1A4" ) !Title = " 4 " + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQM2A4" ) !Title = !Title + " " + &3d( !LM_I1 ) !LM_I1 = Get( "MKSQPAA4" ) !Title = !Title + " " + &3d( !LM_I1 ) @Message( "C" , "time" , !ExpName , !Phase , !Title , *!S ) End For !Title = "CONTinue when Experimenter is satisfied" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Halt !Title = "*Operator CONTinue" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBSQEND" , "" ) -- terminate DEP sequence !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lseqtest." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------+ Procedure lsqcom ( ) --. --. This procedure file performs the Commissioning test of the DEP --. Sequence Interpreter --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: lsqcom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Commissioning DEP Sequence Interpreter" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "Configure for 'lobsmode' and 256x256 extract" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Perform MDI_MODE , "lobsmode" , "no" -- set mechanisms to observing mode PERFORM/NO MDI_LIP , "liplbic5" , "no" !Title = "~Loading DEP sequence emi2" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) --------- --. sequence that used to be loaded with ipdepif5 built-in (Oct 1994) --. built-in address is 0x400 --. Perform MDI_EMI2 , "emi2" , "no" -------- @lseqtest() !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lsqcom." @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 -------------------------------------------------------------------------------+