--+----------------------------------------------------------------------------+ --+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_HR_SEL , !MDI_HRsel , !Print --+ Purpose : Selection of MDI High Rate data --+ --+ Sub_system : PLM --+ Drawing No : 3137-ZA042-SCB Issue : A/00 --+ Project No : SH-MAR-SW-70224 --+ Origin : UK --+ Author : Ed COBB --+----------------------------------------------------------------------------+ --+ Principle : --+ --------- --+ This test sequence performs the MDI Experiment High Rate data selection --+ --+ Passed parameters : --+ ----------------- --+ !MDI_HRsel : MDI High / Medium Rate telemetry select ( "HR" | "MR" ) --+ !Print : CF Log print indicator ( "yes" (default) | "no" ). --+ --+ Prerequisites : --+ ------------- --+ MDI Experiment Sub_System Powered ON --+ --+ History : --+ ------- --+ Issue SIC Note Time Date Name/Updates --+ +---+ +------+ +---+ +------+ +-------------------------------------+ --+ 1/03 393 11:22 20/05/94 Ed COBB -- Created. --+ 1/04 406 13:09 24/05/94 Ed COBB -- MDI Update. --+ 1/04 429 11:29 08/06/94 Ed COBB -- MDI Corrections. --+ --+----------------------------------------------------------------------------< 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 MDI_ON , MDI_OFF , MDI_COM , MDI_OBS , MDI_CHK , MDI_RCS Cfile MDI_DSOS , MDI_LFD Group MWTM , MWTC , PWP12TM Procedure CheckArgReal , CheckArgStr , CheckArgInt Procedure DispMess Procedure ExConnect , ExDisconnect Procedure ExitCF Procedure Message Procedure OpenWindow , WaitTime Procedure Lower , Upper , AskStr End Extern -------------------------------------------------------------------------------< Program MDI_HR_SEL , Unique Defarg Str(2) !MDI_HRsel = "??" Str(3) !Print = "yes" End Defarg Var Str( 3) !ExpName = "MDI" -- Experiment name Str(80) !S = &80s("") -- To save the display messages Str(10) !Phase = " " -- Phase label (e.g. 3.3.1.2) Str(49) !Title = "" Str(80) !Question = "" Str(80) !Check = "" Str(80) !Resp_s = "" Str(1) !Archive = "?" Str(1) !Mode = "?" Int !NbErr = 0 Int !Test_Err = 0 -- No. of Errors in 'TEST' CF Main @OpenWindow() @CheckArgStr (!MDI_HRsel, "Arg 1 as Data Select","in HR, hr, MR, mr", *!NbErr ) If( !NbErr <> 0 ) Then !Title = "*ERROR: INVALID Input Argument (see above)" @Message( "DC", "date", !ExpName, !Phase, !Title, *!S) !Rstat = "ARG_NOK" If !GZ_Test = FALSE Then Halt End If Return !Rstat End If !Title = "-START OF MDI HR / MR TELEM SELECTION" @Message( "DCL", "date", !ExpName, !Phase, !Title, *!S) If (!MDI_HRsel = "HR") OR (!MDI_HRsel = "hr") Then @Remote_Tc( "RCMD SET TMFORMAT HR" , 30 , *!NbErr ) @WaitTime( "00h00m30s" , *!S ) -- Waiting for 30 seconds @Remote_Tc( "RCMD MDI ACQ START" , 30 , *!NbErr ) Else @Remote_Tc( "RCMD SET TMFORMAT MR" , 30 , *!NbErr ) @WaitTime( "00h00m30s" , *!S ) -- Waiting for 30 seconds @Remote_Tc( "RCMD MDI ACQ STOP" , 30 , *!NbErr ) End If !Question = "Redundant Mode?(Y/N)" !Check = "in Y, y, N, n" @AskStr ( !Question , !Check , *!Mode , *!S , *!NbErr ) @Upper ( !Mode , *!Mode ) If !Mode = "Y" Then @Remote_Tc( "RCMD SET MDI REDUNDANT" , 30 , *!NbErr ) Else @Remote_Tc( "RCMD SET MDI NOMINAL" , 30 , *!NbErr ) End If !Question = "Archive Telemetry On?(Y/N)" !Check = "in Y, y, N, n" @AskStr ( !Question , !Check , *!Archive , *!S , *!NbErr ) @Upper ( !Archive , *!Archive ) If !Archive = "Y" Then ARCHIVE ON , TELEMETRY Else ARCHIVE OFF , TELEMETRY End If !GM_NbErr = !GM_NbErr + !NbErr !Title = "-END OF MDI HR / MR TELEM SELECTION" @Message( "DCL", "date", !ExpName, !Phase, !Title, *!S) @ExitCF (!Test_Err ) @PrintCF (!ExpName , !Print ) Return !Rstat End Program -------------------------------------------------------------------------------< Procedure Remote_Tc( Str(80) !Message , Int !TimeOut , Int *!NbErr ) Var Str(80) !resp_s = "" Str(80) !S = "" Str(3) !Report = "" Str(8) !STime = "" Main If !GZ_Test = FALSE Then !resp_s = Remote( TC , !Message , !TimeOut ) Else !resp_s = "...ACK" End If !STime = Extract(Date(), 10, 8) If (Find(!resp_s, "ACK") = 0) Then !Report = "NOK" Else !Report = "ok" End If Cflog &-8s(" Send") + &-60s("Remote " + !Message ) + &-4s( !Report ) +!STime If !Report = "NOK" Then Cflog &-8s(" Err.") + &-64s("Response: " + !resp_s) +!STime End If Return End Procedure -------------------------------------------------------------------------------< Procedure PrintCF(str(3) !ExpName, Str(3) !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 -------------------------------------------------------------------------------<