--+---------------------------------------------------------------------------+ --+ SOHO Project -- Control File --+ ---------------------------- --+ --+ Name : MDI_TB_LHRO , !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 09:43 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_LHRO , 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 "lhrocom" @lhrocom() Case "lhrooff" @lhrooff() Case "lhroon" @lhroon() Case "lhrospt" @lhrospt() 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 lhrocom ( ) --. --. This procedure performs the redundant oven controller commissioning --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Str(80) !Get_dig = "" Str(80) !Question = "" Int !Get_int = 0 Real !Get_real = 0.0 Str(80) !LM_S1 = "" Main !Title = "-EXECUTING PROCEDURE: lhrocom" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Redundant Oven Controller Commissioning" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "~HRO set point 96 (0110 0000)" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKHROSPT" @SendCommand ( "MBHROSPT" , "96" ) @WaitTime ( "00h00m45s" , *!S ) Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select @CheckReg( "MKHROSPT" , "= 96" , *!NbErr ) @PrintParam( "MUHROCTL" , "ANA" ) !Title = "~HRO set point 159 (1001 1111)" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHROSPT" , "159" ) @WaitTime ( "00h00m45s" , *!S ) Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select @CheckReg( "MKHROSPT" , "= 159" , *!NbErr ) @PrintParam( "MUHROCTL" , "ANA" ) !Title = "~HRO set point 255 (1111 1111)" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHROSPT" , "255" ) @WaitTime ( "00h00m45s" , *!S ) Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select @CheckReg( "MKHROSPT" , "= 255" , *!NbErr ) @PrintParam( "MUHROCTL" , "ANA" ) !Title = "~HRO set point 0 (0000 0000)" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHROSPT" , "0" ) @WaitTime ( "00h00m45s" , *!S ) Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select @CheckReg( "MKHROSPT" , "= 0" , *!NbErr ) @PrintParam( "MUHROCTL" , "ANA" ) !Title = "~HRO set point 35 (0010 0011)" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHROSPT" , "35" ) @WaitTime ( "00h00m45s" , *!S ) Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select @CheckReg( "MKHROSPT" , "= 35" , *!NbErr ) @PrintParam( "MUHROCTL" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhrocom." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure lhrooff ( ) --. --. This procedure powers ON the Redundant Oven Controller: --. Var Str( 3) !ExpName = "MDI" Str(10) !Phase = " " Str(49) !Title = " " Str(80) !S = &80s(" ") Int !NbErr = 0 Str(80) !Question = "" Real !Get_real = 0.0 Str(80) !LM_S1 = "" Main !Title = "-EXECUTING PROCEDURE: lhrooff" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch OFF the Redundant Oven Controller" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKHROSPT" Inhibit "MKOVNMAX" Inhibit "MKPWHRO" @SendCommand ( "MBPWHROF" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWHRO" , "OFF" , 2 Enable "MKPWHRO" Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select @CheckDig( "MKPWHRO" , "= OFF" , *!NbErr ) @PrintParam( "MTOPTS4" , "ANA" ) @PrintParam( "MTOPTS5" , "ANA" ) @PrintParam( "QTMI1C" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhrooff." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure lhroon ( ) --. --. This Procedure powers up the Redundant Oven Controller --. and set the initial set point to 35 --. 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 = "" Int !Get_int = 0 Real !Get_real = 0.0 Str(80) !LM_S1 = "" Main !Title = "-EXECUTING PROCEDURE: lhroon." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch ON Redundant Oven Controller" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch ON to set point 35." @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBPWHRON" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWHRO" , "ON" , 1 Enable "MKPWHRO" !Title = "HRO set point 35" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHROSPT" , "35" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKHROSPT" , 35 , 1 Enable "MKHROSPT" Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select @SendCommand ( "MBOVNMAX" , "195" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKOVNMAX" , 195 , 1 Enable "MKOVNMAX" @SendCommand ( "MBHROMDB" , "146 , 110" ) @SendCommand ( "MBHROMCB" , "160 , 75" ) @WaitTime ( "00h00m45s" , *!S ) !Get_dig = Get( "MKPWHRO" ) If !Get_dig <> "ON" Then !Title = "*ERROR : Redundant Oven Controller is NOT ON" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Halt !Title = "*Operator CONTinue" @Message( "DC" , "time" , !ExpName , " " , !Title , *!S) End If @CheckDig( "MKPWHRO" , "= ON" , *!NbErr ) @CheckReg( "MKHRODBL", "= 110", *!NbErr ) @CheckReg( "MKHRODBH", "= 146", *!NbErr ) @CheckReg( "MKHROCBL", "= 75" , *!NbErr ) @CheckReg( "MKHROCBH", "= 160", *!NbErr ) @CheckReg( "MKHROSPT", "= 35" , *!NbErr ) @CheckReg( "MKHROCPT", "= 35" , *!NbErr ) @PrintParam( "MUHROCTL", "ANA" ) @PrintParam( "MTOPTS4" , "ANA" ) @PrintParam( "MTOPTS5" , "ANA" ) @PrintParam( "QTMI1C" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhroon." @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) Return End Procedure -------------------------------------------------------------------------------< Procedure lhrospt ( ) --. --. This Procedure establishes the set point for the Backup 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 = "" Str(80) !LM_S2 = "" Int !LM_I1 = 0 Main !Title = "-EXECUTING PROCEDURE: lhrospt." @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 HRO set point" @Message( "DCL" , "date" , !ExpName , !Phase , !Title , *!S ) !Question = "Enter HRO set point" !Check = ">= 0 and <= 255" @AskInt ( !Question, !Check, *!LM_I1, *!S, *!NbErr ) !LM_S1 = Get ("MKPWHRO") If !LM_I1 > 0 Then If !LM_S1 <> "ON" Then !Title = "~Redundant Oven Controller is NOT ON" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) !Title = "~Switch ON Redundant Oven Controller" @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) Inhibit "MKPWHRO" @SendCommand ( "MBPWHRON" , "" ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKPWHRO" , "ON" , 1 Enable "MKPWHRO" !LM_S1 = "ON" End If End If Inhibit "MKHROSPT" !Title = "~HRO set point: " + &d(!LM_I1) @Message( "DC" , "time" , !ExpName , !Phase , !Title , *!S ) @SendCommand ( "MBHROSPT" , &d(!LM_I1) ) @WaitTime ( "00h00m45s" , *!S ) Expect "MKHROSPT" , !LM_I1 , 1 Enable "MKHROSPT" Select !GM_Conf Case 1 @PrintAna ( "MIPWA" , "Nominal Side Current" ) Case 2 @PrintAna ( "MIPWB" , "Redundant Side Current" ) Default End Select !LM_S2 = "= "+ &s(!LM_S1) @CheckDig( "MKPWHRO" , *!LM_S2 , *!NbErr ) !LM_S2 = "= "+ &d(!LM_I1) @CheckReg( "MKHROSPT" , *!LM_S2 , *!NbErr ) @PrintParam( "MUHROCTL" , "ANA" ) @PrintParam( "M+15HTR" , "ANA" ) !GM_NbErr = !GM_NbErr + !NbErr !Title = "-FINISHED PROCEDURE: lhrospt." @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 ----------------------------------------------------------------------------------<