--+------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_LDMC , !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 sucessfully 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:36 03/02/94 Ph. IATRINO -- During Debug Phase --+ 1/02 360 10:00 05/05/94 Ed COBB/Ph. IATRINO -- Rationalization --+ 1/03 393 10:37 20/05/94 Ed COBB -- MDI Updates --+ 1/04 406 13:23 24/05/94 Ed COBB -- MDI Updates --+ 1/07 443 15:56 17/06/94 Ed COBB -- CF errors. --+ 1/09 448 15:36 21/06/94 Ed COBB -- CF Improvements. --+ 1/10 450 09:58 23/06/94 Ed COBB -- CF Improvements. --+ 1/11 470 09:58 15/09/94 Ed COBB -- Create Procedure @Command2. --+ --+------------------------------------------------------------------------+ 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 PLM_BLOCK, MDI_MODE 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_LDMC , Unique Defarg Str(80) !Proc_s Str(3) !Print = "yes" End Defarg Var str(8) !TCName = " " str(72) !TCArg = " " 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() Select !Proc_s Case "ldmccom" @ldmccom() Case "ldmcoff" @ldmcoff() Case "ldmcon" @ldmcon() Case "ldmcam" @ldmcam() Case "dmcnorm" @dmcnorm() 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 ldmccom ( ) --. --. This procedure file performs the commissioning test of the --. Degraded Motor Controller (DMC) --. Var str(8) !TCName = " " str(72) !TCArg = " " Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Int !Get_int = 0 Int !Cmd_data_i(30) Main !Title = "-EXECUTING PROCEDURE: ldmccom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Inhibit "M+15MTR" Inhibit "M+75LT" @Command2 ( "MBDPFLGS" , "0 , 0X20 , 1" ) -- motor position cmd correction @Command2 ( "MBM1RS" , "" ) -- reset motors @Command2 ( "MBM2RS" , "" ) @Command2 ( "MBPARS" , "" ) @Command2 ( "MBC1RS" , "" ) @Command2 ( "MBC2RS" , "" ) -- !Cmd_data_i(0) = 0X1100 -- !Cmd_data_i(1) = 0X1100 -- !Cmd_data_i(2) = 0X1100 -- !Cmd_data_i(3) = 0X1100 -- !Cmd_data_i(4) = 0X1100 -- PERFORM/NO PLM_BLOCK , "MDI" , 0x1D, !Cmd_data_i() , 5 -- set CW default -- !Cmd_data_i(0) = 0 -- !Cmd_data_i(1) = 0 -- !Cmd_data_i(2) = 0 -- !Cmd_data_i(3) = 0 -- !Cmd_data_i(4) = 0 -- PERFORM/NO PLM_BLOCK , "MDI" , 0x1D, !Cmd_data_i() , 5 -- move motors !Cmd_data_i(0) = 0X0100 !Cmd_data_i(1) = 0X0100 !Cmd_data_i(2) = 0X0100 !Cmd_data_i(3) = 0X0100 !Cmd_data_i(4) = 0X0100 PERFORM/NO PLM_BLOCK , "MDI" , 0x1D, !Cmd_data_i() , 5 -- CW def & move @WaitTime ( "00h00m45s", *!S) @ldmcprn () @Command2 ( "MBPWM1OF" , "" ) -- all mechanisms off @Command2 ( "MBPWM2OF" , "" ) @Command2 ( "MBPWPAOF" , "" ) @Command2 ( "MBPWC1OF" , "" ) @Command2 ( "MBPWC2OF" , "" ) @Command2 ( "MBPWSHOF" , "" ) @Command2 ( "MBPWAMOF" , "" ) @Command2 ( "MBPWFDOF" , "" ) @WaitTime ( "00h00m45s", *!S) Expect "MKPWM1" , "OFF" , 1 Expect "MKPWM2" , "OFF" , 1 Expect "MKPWPA" , "OFF" , 1 Expect "MKPWC1" , "OFF" , 1 Expect "MKPWC2" , "OFF" , 1 Expect "MKPWSH" , "OFF" , 1 Expect "MKPWAM" , "OFF" , 1 Expect "MKPWFD" , "OFF" , 1 Enable "MKPWM1" Enable "MKPWM2" Enable "MKPWPA" Enable "MKPWC1" Enable "MKPWC2" Enable "MKPWSH" Enable "MKPWAM" Enable "MKPWFD" @Command2 ( "MBPWDMON" , "" ) -- DMC on @WaitTime ( "00h00m03s", *!S) @Command2 ( "MBDMSTEP" , "256 , 0 , 0" ) -- MTM1 to DMC mode @Command2 ( "MBDMSTEP" , "512 , 0 , 0" ) -- MTM2 to DMC mode @Command2 ( "MBDMSTEP" , "768 , 0 , 0" ) -- PAW to DMC mode @Command2 ( "MBDMSTEP" , "3072 , 0 , 0" ) -- CAL1 to DMC mode @Command2 ( "MBDMSTEP" , "5120 , 0 , 0" ) -- CAL2 to DMC mode @Command2 ( "MBM1SP" , "222" ) -- Try to move motors to 222 @Command2 ( "MBM1CW" , "" ) -- motors won't really move because @Command2 ( "MBM2SP" , "222" ) -- DMC relays are in DMC position @Command2 ( "MBM2CW" , "" ) -- so this just turns on the encoders @Command2 ( "MBPASP" , "222" ) @Command2 ( "MBPACW" , "" ) @Command2 ( "MBC1SP" , "222" ) @Command2 ( "MBC1CW" , "" ) @Command2 ( "MBC2SP" , "222" ) @Command2 ( "MBC2CW" , "" ) @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "68 , 0 , 0" ) -- DMC1 to step 1 @Command2 ( "MBDMSTEP" , "66 , 0 , 0" ) -- DMC2 to step 1 @Command2 ( "MBDMSTEP" , "65 , 0 , 0" ) -- DMC3 to step 1 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "36 , 0 , 0" ) -- DMC1 to step 2 @Command2 ( "MBDMSTEP" , "34 , 0 , 0" ) -- DMC2 to step 2 @Command2 ( "MBDMSTEP" , "33 , 0 , 0" ) -- DMC3 to step 2 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "100 , 0 , 0" ) -- DMC1 to step 3 @Command2 ( "MBDMSTEP" , "98 , 0 , 0" ) -- DMC2 to step 3 @Command2 ( "MBDMSTEP" , "97 , 0 , 0" ) -- DMC3 to step 3 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "20 , 0 , 0" ) -- DMC1 to step 4 @Command2 ( "MBDMSTEP" , "18 , 0 , 0" ) -- DMC2 to step 4 @Command2 ( "MBDMSTEP" , "17 , 0 , 0" ) -- DMC3 to step 4 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "84 , 0 , 0" ) -- DMC1 to step 5 @Command2 ( "MBDMSTEP" , "82 , 0 , 0" ) -- DMC2 to step 5 @Command2 ( "MBDMSTEP" , "81 , 0 , 0" ) -- DMC3 to step 5 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "52 , 0 , 0" ) -- DMC1 to step 6 @Command2 ( "MBDMSTEP" , "50 , 0 , 0" ) -- DMC2 to step 6 @Command2 ( "MBDMSTEP" , "49 , 0 , 0" ) -- DMC3 to step 6 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "84 , 0 , 0" ) -- DMC1 to step 5 @Command2 ( "MBDMSTEP" , "82 , 0 , 0" ) -- DMC2 to step 5 @Command2 ( "MBDMSTEP" , "81 , 0 , 0" ) -- DMC3 to step 5 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "20 , 0 , 0" ) -- DMC1 to step 4 @Command2 ( "MBDMSTEP" , "18 , 0 , 0" ) -- DMC2 to step 4 @Command2 ( "MBDMSTEP" , "17 , 0 , 0" ) -- DMC3 to step 4 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "100 , 0 , 0" ) -- DMC1 to step 3 @Command2 ( "MBDMSTEP" , "98 , 0 , 0" ) -- DMC2 to step 3 @Command2 ( "MBDMSTEP" , "97 , 0 , 0" ) -- DMC3 to step 3 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "36 , 0 , 0" ) -- DMC1 to step 2 @Command2 ( "MBDMSTEP" , "34 , 0 , 0" ) -- DMC2 to step 2 @Command2 ( "MBDMSTEP" , "33 , 0 , 0" ) -- DMC3 to step 2 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBDMSTEP" , "68 , 0 , 0" ) -- DMC1 to step 1 @Command2 ( "MBDMSTEP" , "66 , 0 , 0" ) -- DMC3 to step 1 @WaitTime ( "00h00m45s" , *!S ) @ldmcprn() @Command2 ( "MBM1RS" , "" ) -- reset motors so they don't try @Command2 ( "MBM2RS" , "" ) -- to go when power is applied. @Command2 ( "MBPARS" , "" ) @Command2 ( "MBC1RS" , "" ) @Command2 ( "MBC2RS" , "" ) @Command2 ( "MBDMSTEP" , "128 , 0 , 0" ) -- MTM1 Normal @Command2 ( "MBDMSTEP" , "384 , 0 , 0" ) -- MTM2 Normal @Command2 ( "MBDMSTEP" , "640 , 0 , 0" ) -- PAW Normal @Command2 ( "MBDMSTEP" , "2048 , 0 , 0" ) -- CAL1 Normal @Command2 ( "MBDMSTEP" , "4096 , 0 , 0" ) -- CAL2 Normal @Command2 ( "MBPWDMOF" , "" ) -- DMC off Inhibit "MKPWM1" Inhibit "MKPWM2" Inhibit "MKPWPA" Inhibit "MKPWC1" Inhibit "MKPWC2" Inhibit "MKPWSH" Inhibit "MKPWAM" Inhibit "MKPWFD" @Command2 ( "MBSHRS" , "" ) -- Shutter on and reset @Command2 ( "MBPWSHON" , "" ) @Command2 ( "MBSHRS" , "") @Command2 ( "MBM1RS" , "" ) -- MTM 1 on and reset @Command2 ( "MBPWM1ON" , "" ) @Command2 ( "MBM1RS" , "" ) @Command2 ( "MBM2RS" , "" ) -- MTM 2 on and reset @Command2 ( "MBPWM2ON" , "" ) @Command2 ( "MBM2RS" , "" ) @Command2 ( "MBPARS" , "" ) -- Pol Analyzer Wheel on and reset @Command2 ( "MBPWPAON" , "" ) @Command2 ( "MBPARS" , "" ) @Command2 ( "MBC1RS" , "" ) -- Cal 1 Wheel on and reset @Command2 ( "MBPWC1ON" , "" ) @Command2 ( "MBC1RS" , "" ) @Command2 ( "MBC2RS" , "" ) -- Cal 2 Wheel on and reset @Command2 ( "MBPWC2ON" , "" ) @Command2 ( "MBC2RS" , "" ) @WaitTime ( "00h00m45s", *!S) Expect "MKPWM1" , "ON" , 1 Expect "MKPWM2" , "ON" , 1 Expect "MKPWPA" , "ON" , 1 Expect "MKPWC1" , "ON" , 1 Expect "MKPWC2" , "ON" , 1 Expect "MKPWSH" , "ON" , 1 Enable "MKPWM1" Enable "MKPWM2" Enable "MKPWPA" Enable "MKPWC1" Enable "MKPWC2" Enable "MKPWSH" Enable "MKPWAM" Enable "MKPWFD" Enable "M+15MTR" Enable "M+75LT" PERFORM/NO MDI_MODE , "lobsmode" , "no" !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ldmccom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure ------------------------------------------------------------------------------------- Procedure ldmcoff ( ) --. --. This procedure file powers OFF the Degraded Motor Controller: --. Var str(8) !TCName = " " str(72) !TCArg = " " Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: ldmcoff" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch OFF degraded motor controller." @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKPWDM" @Command2 ( "MBPWDMOF" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWDM" , "OFF" , 1 Enable "MKPWDM" @PrintParam( "MKPWDM" , "DIG" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ldmcoff" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure ldmcon ( ) --. --. This Procedure powers ON the Degraded Motor Controller. --. Var str(8) !TCName = " " str(72) !TCArg = " " Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Int !ErrCount = 0 Str(80) !Get_dig = "" Main !Title = "-EXECUTING PROCEDURE: ldmcon" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch ON degraded motor controller." @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKPWDM" @Command2 ( "MBPWDMON" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWDM" , "ON" , 1 Enable "MKPWDM" !Get_dig = Get( "MKPWDM" ) If !Get_dig <> "ON" Then !Title = "*DMC is NOT ON - procedure halted " @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Halt !Title = "*Operator CONTinue " @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) End If @PrintParam( "MKPWDM" , "DIG" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ldmcon" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure ldmcam ( ) --. --. This procedure file operates the alignment mechanism using the DMC --. Var str(8) !TCName = " " str(72) !TCArg = " " 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 Int !LM_I2 = 0 Int !LM_I3 = 0 Real !Get_real = 0.0 Main !Title = "-EXECUTING PROCEDURE: ldmcam" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKPWM1" Inhibit "MKPWM2" Inhibit "MKPWPA" Inhibit "MKPWC1" Inhibit "MKPWC2" Inhibit "MKPWSH" Inhibit "MKPWAM" Inhibit "MKPWFD" @Command2 ( "MBPWM1OF" , "" ) -- all mechanisms off @Command2 ( "MBPWM2OF" , "" ) @Command2 ( "MBPWPAOF" , "" ) @Command2 ( "MBPWC1OF" , "" ) @Command2 ( "MBPWC2OF" , "" ) @Command2 ( "MBPWSHOF" , "" ) @Command2 ( "MBPWAMOF" , "" ) @Command2 ( "MBPWFDOF" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWM1" , "OFF" , 1 Expect "MKPWM2" , "OFF" , 1 Expect "MKPWPA" , "OFF" , 1 Expect "MKPWC1" , "OFF" , 1 Expect "MKPWC2" , "OFF" , 1 Expect "MKPWSH" , "OFF" , 1 Expect "MKPWAM" , "OFF" , 1 Expect "MKPWFD" , "OFF" , 1 Enable "MKPWM1" Enable "MKPWM2" Enable "MKPWPA" Enable "MKPWC1" Enable "MKPWC2" Enable "MKPWSH" Enable "MKPWAM" Enable "MKPWFD" @Command2 ( "MBPWDMON" , "" ) -- DMC on @Command2 ( "MBDMSTEP" , "49152 , 0 , 0" ) -- AM1 to DMC mode (AM2) @Command2 ( "MBDMSTEP" , "32768 , 0 , 0" ) -- AM2 to DMC mode (AM1) !Title = "Initial Positions" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @PrintParam( "MXAM1POS" , "ANA" ) @PrintParam( "MXAM2POS" , "ANA" ) For !LM_I0 = 1 to 2 For !LM_I1 = 1 To 4 !LM_I2 = (!LM_I0 - 1)*4 + !LM_I1 !Title = "Increment #" + &6d(!LM_I2) @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @Command2 ( "MBDMSTEP" , "66 , 0 , 0" ) -- DMC2 to step 1 @Command2 ( "MBDMSTEP" , "65 , 0 , 0" ) -- DMC3 to step 1 @Command2 ( "MBDMSTEP" , "34 , 0 , 0" ) -- DMC2 to step 2 @Command2 ( "MBDMSTEP" , "33 , 0 , 0" ) -- DMC3 to step 2 @Command2 ( "MBDMSTEP" , "98 , 0 , 0" ) -- DMC2 to step 3 @Command2 ( "MBDMSTEP" , "97 , 0 , 0" ) -- DMC3 to step 3 @Command2 ( "MBDMSTEP" , "18 , 0 , 0" ) -- DMC2 to step 4 @Command2 ( "MBDMSTEP" , "17 , 0 , 0" ) -- DMC3 to step 4 @Command2 ( "MBDMSTEP" , "82 , 0 , 0" ) -- DMC2 to step 5 @Command2 ( "MBDMSTEP" , "81 , 0 , 0" ) -- DMC3 to step 5 @Command2 ( "MBDMSTEP" , "50 , 0 , 0" ) -- DMC2 to step 6 @Command2 ( "MBDMSTEP" , "49 , 0 , 0" ) -- DMC3 to step 6 @WaitTime ( "00h00m15s" , *!S ) End For @WaitTime ( "00h00m45s" , *!S ) @PrintParam( "MXAM1POS" , "ANA" ) @PrintParam( "MXAM2POS" , "ANA" ) End For For !LM_I0 = 1 to 2 For !LM_I1 = 1 To 4 !LM_I2 = (!LM_I0 - 1)*4 + !LM_I1 !Title = "Decrement #" + &6d(!LM_I2) @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @Command2 ( "MBDMSTEP" , "82 , 0 , 0" ) -- DMC2 to step 5 @Command2 ( "MBDMSTEP" , "81 , 0 , 0" ) -- DMC3 to step 5 @Command2 ( "MBDMSTEP" , "18 , 0 , 0" ) -- DMC2 to step 4 @Command2 ( "MBDMSTEP" , "17 , 0 , 0" ) -- DMC3 to step 4 @Command2 ( "MBDMSTEP" , "98 , 0 , 0" ) -- DMC2 to step 3 @Command2 ( "MBDMSTEP" , "97 , 0 , 0" ) -- DMC3 to step 3 @Command2 ( "MBDMSTEP" , "34 , 0 , 0" ) -- DMC2 to step 2 @Command2 ( "MBDMSTEP" , "33 , 0 , 0" ) -- DMC3 to step 2 @Command2 ( "MBDMSTEP" , "66 , 0 , 0" ) -- DMC2 to step 1 @Command2 ( "MBDMSTEP" , "65 , 0 , 0" ) -- DMC3 to step 1 @Command2 ( "MBDMSTEP" , "50 , 0 , 0" ) -- DMC2 to step 6 @Command2 ( "MBDMSTEP" , "49 , 0 , 0" ) -- DMC3 to step 6 @WaitTime ( "00h00m15s" , *!S ) End For @WaitTime ( "00h00m45s" , *!S ) @PrintParam( "MXAM1POS" , "ANA" ) @PrintParam( "MXAM2POS" , "ANA" ) End For @WaitTime ( "00h00m45s" , *!S ) !Title = "Final positions: " @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @PrintParam( "MXAM1POS" , "ANA" ) @PrintParam( "MXAM2POS" , "ANA" ) @Command2 ( "MBDMSTEP" , "40960 , 0 , 0" ) -- AM1 to Normal mode (AM2) @Command2 ( "MBDMSTEP" , "24576 , 0 , 0" ) -- AM2 to Normal mode (AM1) Inhibit "MKPWM1" Inhibit "MKPWM2" Inhibit "MKPWPA" Inhibit "MKPWC1" Inhibit "MKPWC2" Inhibit "MKPWSH" Inhibit "MKPWAM" Inhibit "MKPWFD" @Command2 ( "MBPWDMOF" , "" ) -- DMC OFF @Command2 ( "MBSHRS" , "" ) -- Shutter ON and Reset @Command2 ( "MBPWSHON" , "" ) @Command2 ( "MBSHRS" , "" ) @Command2 ( "MBM1RS" , "" ) -- MTM 1 ON and Reset @Command2 ( "MBPWM1ON" , "" ) @Command2 ( "MBM1RS" , "" ) @Command2 ( "MBM2RS" , "" ) -- MTM 2 ON and Reset @Command2 ( "MBPWM2ON" , "" ) @Command2 ( "MBM2RS" , "" ) @Command2 ( "MBPARS" , "" ) -- Pol Analyzer Wheel ON and Reset @Command2 ( "MBPWPAON" , "" ) @Command2 ( "MBPARS" , "" ) @Command2 ( "MBC1RS" , "" ) -- Cal 1 Wheel ON and Reset @Command2 ( "MBPWC1ON" , "" ) @Command2 ( "MBC1RS" , "" ) @Command2 ( "MBC2RS" , "" ) -- Cal 2 Wheel ON and Reset @Command2 ( "MBPWC2ON" , "" ) @Command2 ( "MBC2RS" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWM1" , "ON" , 1 Expect "MKPWM2" , "ON" , 1 Expect "MKPWPA" , "ON" , 1 Expect "MKPWC1" , "ON" , 1 Expect "MKPWC2" , "ON" , 1 Expect "MKPWSH" , "ON" , 1 Enable "MKPWM1" Enable "MKPWM2" Enable "MKPWPA" Enable "MKPWC1" Enable "MKPWC2" Enable "MKPWSH" Enable "MKPWAM" Enable "MKPWFD" PERFORM/NO MDI_MODE , "lobsmode" , "no" !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: ldmcam" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure ----------------------------------------------------------------------------------< Procedure dmcnorm ( ) --. --. This procedure sets the DMC relays to their NORMAL positions --. Var str(8) !TCName = " " str(72) !TCArg = " " Str(3) !Test_s Str( 3) !ExpName = "MDI" Str(80) !S = &80s(" ") Str(10) !Phase = " " Str(49) !Title = " " Int !NbErr = 0 Main !Title = "-EXECUTING PROCEDURE: dmcnorm" @Message( "DCL" , "date" , !ExpName , " " , !Title , *!S ) @Command2 ( "MBPWDMON" , "" ) @Command2 ( "MBDMSTEP" , "128 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "384 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "640 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "896 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "2048 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "4096 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "6144 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "8192 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "24576 , 0 , 0" ) @Command2 ( "MBDMSTEP" , "40960 , 0 , 0" ) @Command2 ( "MBPWDMOF" , "" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: dmcnorm" @Message( "DCL" , "date" , !ExpName , " " , !Title , *!S ) Return End Procedure ----------------------------------------------------------------------------------< Procedure ldmcprn() Main @PrintParam( "MKM1POS" , "REG" ) @PrintParam( "MKM2POS" , "REG" ) @PrintParam( "MKPAPOS" , "REG" ) @PrintParam( "MKC1POS" , "REG" ) @PrintParam( "MKC2POS" , "REG" ) Return End Procedure ----------------------------------------------------------------------------------< Procedure Command2 ( str(8) !TCName, str(72) !TCArg ) Main @SendCommand ( !TCName , !TCArg ) Wait Time , 2 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 -----------------------------------------------------------------------