--+-------------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_TB_LHPO , !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 : FR --+ Author : O. MICHEL --+-------------------------------------------------------------------------------+ --+ 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 495 11:51 16/11/94 Olivier MICHEL / First issue --+ --+-------------------------------------------------------------------------------+ 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 Group MWTM , PWP12TM cfile MDI_LT 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_TB_LHPO , 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() Select !Proc_s Case "lhpocom" @lhpocom() Case "lhpooff" @lhpooff() Case "lhpoon" @lhpoon() Case "lhpospt" @lhpospt() 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 lhpocom ( ) --. --. This procedure file performs Prime Oven Control commissioning --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Str(80) !Get_dig = "" Real !Get_real = 0.0 Int !Get_int = 0 Main !Title = "-EXECUTING PROCEDURE: lhpocom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Prime Oven Controller Commissioning" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "~Initial oven temperatures" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @PrintAna ( "MTOPTS4" , "Filter Oven" ) @PrintAna ( "MTOPTS5" , "Filter Oven" ) @PrintAna ( "MUHPOBRG", "Filter Oven Brid Out" ) @PrintParam ( "QTMI1C" , "ANA" ) !Title = "Command HPO set point 1(001), 34.01 degC" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKHPOSPT" @SendCommand ( "MBHPOSPT" , "1" ) @WaitTime ( "00h00m45s" , *!S ) @CheckReg( "MKHPOSPT" , "= 1" , *!NbErr ) @PrintAna( "MUHPOLOP" , "Filter Oven Loop Out" ) !Title = "Command HPO set point 4(100), 36.96 degC" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHPOSPT" , "4" ) @WaitTime ( "00h00m45s" , *!S ) @CheckReg( "MKHPOSPT" , "= 4" , *!NbErr ) @PrintAna( "MUHPOLOP" , "Filter Oven Loop Out" ) !Title = "Command HPO set point 7(111) 41.18 degC" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHPOSPT" , "7" ) @WaitTime ( "00h00m45s" , *!S ) @CheckReg( "MKHPOSPT" , "= 7" , *!NbErr ) @PrintAna( "MUHPOLOP" , "Filter Oven Loop Out" ) !Title = "Command HPO set point 0(000) 33.05 degC" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHPOSPT" , "0" ) @WaitTime ( "00h00m45s" , *!S ) @CheckReg( "MKHPOSPT" , "= 0" , *!NbErr ) @PrintAna( "MUHPOLOP" , "Filter Oven Loop Out" ) !Title = "Command HPO set point 2(010) 35.00 degC" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHPOSPT" , "2" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKHPOSPT" , 2 , 1 Enable "MKHPOSPT" @CheckReg ( "MKHPOSPT", "= 2" , *!NbErr ) @PrintAna ( "MUHPOLOP", "Filter Oven Loop Out" ) @PrintAna ( "MTOPTS4" , "Filter Oven" ) @PrintAna ( "MTOPTS5" , "Filter Oven" ) @PrintAna ( "MUHPOBRG", "Filter Oven Brid Out" ) @PrintParam ( "QTMI1C" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhpocom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure ----------------------------------------------------------------------------------< Procedure lhpooff ( ) --. --. This procedure file powers OFF the Prime Oven Controller: --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Real !Get_real = 0.0 Str(80) !Question = "" Str(80) !LM_S1 = "" Main !Title = "-EXECUTING PROCEDURE: lhpooff." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switching OFF the prime oven controller." @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKPWHPO" Inhibit "MKHPOSPT" Inhibit "MUHPOBRG" Inhibit "MIPWA" Inhibit "MIPWB" @SendCommand ( "MBPWHPOF" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWHPO" , "OFF" , 1 Enable "MKPWHPO" Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select Enable "MIPWA" Enable "MIPWB" @CheckDig ( "MKPWHPO" , "= OFF" , *!NbErr ) @PrintAna ( "MTOPTS4" , "Filter Oven" ) @PrintAna ( "MTOPTS5" , "Filter Oven" ) @PrintParam ( "QTMI1C" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhpooff." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure ----------------------------------------------------------------------------------< Procedure lhpoon ( ) --. This Procedure powers ON the Prime Oven Controller. --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Str(80) !Question = "" Str(80) !Get_dig = "" Real !Get_real = 0.0 Int !Get_int = 0 Str(80) !LM_S1 = "" Main !Title = "-EXECUTING PROCEDURE: lhpoon." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch ON Prime oven controller" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch ON to set point 2" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MIPWA" Inhibit "MIPWB" @SendCommand ( "MBPWHPON" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWHPO" , "ON" , 1 Enable "MKPWHPO" !Title = "Set HPO set point to 2 (35.00)" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHPOSPT" , "2" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKHPOSPT" , 2 , 1 Enable "MKHPOSPT" Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Enable "MIPWA" Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Enable "MIPWB" Default End Select @SendCommand ( "MBOVNMAX" , "195" ) @WaitTime ( "00h00m45s" , *!S ) !Get_dig = Get( "MKPWHPO" ) If !Get_dig <> "ON" Then !Title = "*ERROR : Prime Oven Ctlr is NOT ON" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Halt !Title = "*Operator CONTinue " @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) End If @CheckDig ( "MKPWHPO" , "= ON" , *!NbErr ) @CheckReg ( "MKHPOSPT" , "= 2" , *!NbErr ) @CheckReg ( "MKOVNMAX" , "= 195" , *!NbErr ) @PrintAna ( "MTOPTS4" , "Filter Oven" ) @PrintAna ( "MTOPTS5" , "Filter Oven" ) @PrintAna ( "MTOPTS15" , "Op. Structure In Frt." ) @PrintAna ( "MUHPOLOP" , "Filter Oven loop Out" ) @PrintAna ( "MUHPOBRG" , "Filter Oven Brid Out" ) @PrintParam ( "QTMI1C" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhpoon." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure lhpospt ( ) --. --. This Procedure establishes the set point for the Prime Oven Controller --. 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) !Get_dig = "" Int !Get_int = 0 Real !Get_real = 0.0 Str(80) !LM_S1 = "" Int !LM_I1 = 0 Main !Title = "-EXECUTING PROCEDURE: lhpospt." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) PERFORM/NO MDI_LT , "ltemps", "no" Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select !Title = "Establish HPO set point" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Question = "Enter HPO set point" !Check = ">= 0 and <= 7" @AskInt ( !Question, !Check, *!LM_I1, *!S, *!NbErr ) !LM_S1 = Get ("MKPWHPO") If !Get_Dig <> "ON" Then !Title = "~Prime Oven Controller is NOT ON" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch ON Prime Oven Controller" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKPWHPO" @SendCommand ( "MBPWHPON" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWHPO" , "ON" , 1 Enable "MKPWHPO" End If Inhibit "MKHPOSPT" !Title = "~HPO set point: " + &d(!LM_I1) @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHPOSPT" , &d(!LM_I1) ) @SendCommand ( "MBHPOMOF" , "") @WaitTime ( "00h00m45s" , *!S ) Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select Expect "MKHPOSPT" , !LM_I1 , 1 Enable "MKHPOSPT" @CheckDig( "MKPWHPO" , "= ON" , *!NbErr ) !LM_S1 = "= "+ &d(!LM_I1) @CheckReg( "MKHPOSPT" , *!LM_S1 , *!NbErr ) @PrintParam( "MUHPOLOP" , "ANA" ) @PrintParam( "MUHPOBRG" , "ANA" ) @PrintParam( "M+15HTR" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhpospt." @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 ----------------------------------------------------------------------------------<