**************************************************************************************************** ** LNG product: ELISA source **************************************************************************************************** ** Type: Sequence ** ** FOP Name & Version: None ** ** Description: The following sequence performs the following steps :- ** - Switch on via SWA power up function ** - Verify status of LCL, RSA and current drawn. ** - Verify reception of Boot Report ** - Seed one-shot Start Time Sync TC(9,129) to SWA ** - Go from BOOT to STANDBY mode ** - Perform connection test ** - Go to selected target mode (prior to start Service 20) if required ** - Start transmission of TC(20,128) to payload ** ** ** Input Arguments: $sUnit - Unit side to power up ["A", "B"] ** $sTargetMode - End mode to be reached ["BOOT", "STANDBY", "DPUOPS", "SWAOPS"] ** ** ** Output Values: None ** ** CSW Version: V2.1.3 or higher ** ** FOPs used: None ** ** HK TM packets used: AB.TM.YIA58452 AB.TM.YIA58211 AB.TM.YIA58440 AB.TM.YIA58446 AB.TM.YIA58902 ** AB.TM.YIA58435 AB.TM.YIA58200 AB.TM.YIA58061 AB.TM.YIA58445 AB.TM.YIA58216 ** ** Test Procedure & Reference: SWA EM Full Functional Test Procedure ** SO-SWA-MSSL-TP-033 Draft A ** ** Restrictions and Limitations: SSMM hardware required to be on before switch ON. ** **************************************************************************************************** ** History **-------------------------------------------------------------------------------------------------- ** Version Date Author Comment **-------------------------------------------------------------------------------------------------- ** 1.1 28/06/2017 Alberto Ruiz Initial creation ** 1.2 06/09/2017 Alberto Ruiz Move Enable S20 just after the power up function with 12 sec delay ** 1.4 J Silverthorn Time sync after LCL on ** HK TM rate increased to 10 seconds. ** 1.6 07/09/2017 Alberto Ruiz Comment out checks for LCL current for investigations ** 1.7 31/01/2017 J Silverthorn In-line with SO-SWA-MSSL-TP-059 issue 1 no HIS / PAS or EAS ** 1.8 01/02/2018 Correction to timing of switch-on. Error in last issue of script. ** 1.9 23/03/2018 "BOOT" mode added for SW load procedure ** 1.10 29/03/2018 J Silverthorn Capture FSW version and CRC ** 1.11 Inclusion of new OOL sequence ** 1.12 04/04/2018 J Silverthorn Increase wait after powerup function and before time synch to 8 seconds ** 1.13 04/04/2018 J Silverthorn Increase wait after powerup function and before time synch to 15 seconds ** 1.14 09/04/2018 COURSE TIME routine taken from PHI ** 1.15 28/04/2018 J Silverthorn Bug fix in COURSE TIME - wrong TM mnemonic ** Removed HIS, PAS and EAS On option - included in SFT ** 1.16 30/04/2018 Removed option for Instrument configuration to STBY - now in SFT ** 1.17 30/04/2018 Typo corrected in packet capture ** 1.18 01/05/2018 E BOulet Removed proto SPAS_AIRSAFE as not used by SWA_ON sequence ** 1.19 01/05/2018 E BOulet Increase timeout for check on OPS status ** 1.20 04/08/2018 J Silverthorn FSW_NOMINAL_SUBVERSION added to TM list ** 1.21 12/09/2018 Changes to seqphase2 parameters ** 1.22 stopreportflow for flows 0 and 1 added to BOOT mode script ** 1.23 13/09/2018 Typo found for checking if FMON SETUP should be run ** 1.24 21/09/2018 Diagnostic packets enabled for NCR 1027 investigation ** 1.25 04/10/2018 Check added at start for ABSENT instrument status ** 1.26 12/02/2019 D Cowan Added the option to not check TM (for MIST) ** 1.27 05/03/2019 D Cowan Changed time sync & validity checks to use new RIZV_INST_TIME routine which doesn't use HK TM ** 1.28 J Silverthorn YIA58902 not available to ground when TM = NO ** 1.29 12/03/2019 D Cowan Added delay after time sync command before verifying time sync ** 1.30 19/03/2019 J Silverthorn Moved test to check invalid time bit ** 1.31 20/03/2019 Increased acquiition time for RSA status ** 1.32 09/05/2019 N Cartledge Add $TM to second TIZM_FMON_CONF call ** 1.34 15/05/2019 M Dinsdale Increased $r_max_time_diff based on ETB run 20190511_SA_SFT_SOL_ETB_MD_02, to be reviewed with ** Alejandro Vega Rebull. ** 1.35 27/08/2019 J Silverthorn Removed test to check invalid time bit (does not work under BSW) ** 1.36 09/09/2019 J Silverthorn SpW inteface enabled prior to switch On - NCR 1323 Action #3/4 *************************************************************************************************** ** SEQUENCE TISC_SWA_ON SEQUENCE TISC_SWA_ON ** Definition of Input parameters proto string $sUnit := "A" upper ["A","B"] string $sTargetMode := "DPUSTBY" upper ["BOOT","DPUSTBY","DPUOPS"] string $sMonitor := "NONE" upper ["FMON", "OOLSEQ", "NONE"] string $TM := "YES" upper ["YES","NO"] end proto ** Definition of Constants const string $sTitle := "TITLE" string $sTrace := "TRACE" int $i_wait_time := 10 real $r_max_time_diff := 2.0 ** Definition of Variables var string $sBufArg := "" string $sNumPha string $sPlatform date $dCurDate bool $b_time_valid real $r_time_diff int $Count int $i_reportflowID int $i_reportflowID_1 int $i_reportflowID_2 int $i_reportflowID_3 int $i_RptRefNb int $i_RptRefNb_1 int $i_RptRefNb_2 int $i_RptRefNb_3 string $s_lcl_a_cur := "AB.TM.NPWD3267" --IFA_LCL4_LCL16 SWA-A_LCL TM string $s_lcl_b_cur := "AB.TM.NPWD2768" --IFA_LCL2_LCL17 SWA-B PWR_LCL TM string $s_lcl_a_sts := "AB.TM.NPWD0077" --IFA_LCL4_LCL16 SWA-A_LCL ST string $s_lcl_b_sts := "AB.TM.NPWD0038" --IFA_LCL2_LCL17 SWA-B PWR_LCL ST string $s_rsa_a_sts := "AB.TM.NRUD2007" --Acq. RSA_1_1_9 SWA A string $s_rsa_b_sts := "AB.TM.NRUD2067" --Acq. RSA_2_1_9 SWA B string $sTTRM string $sPM string $sRIU string $sPCDU string $sMilBus main window @SU_SEQSTART("Switching ON SWA side - "+$sUnit+" ON into mode - "+$sTargetMode, *$dCurDate, $sTrace, "") $sPlatform := AB.USR.PLATFORM if (AB.USR.SWA = "ABSENT") ta_print "SWA is not connected to Spacecraft - sequence aborted" RAISE NOK, "Instruement is ABSENT - Sequence abandoned" abort endif if ($TM = "YES") @TPZC_PSFT_CONFIG(*$sTTRM,*$sPM,*$sRIU,*$sPCDU,*$sMilBus) if ($sPCDU = "B") $s_lcl_a_cur := "AB.TM.NPWT3267" $s_lcl_b_cur := "AB.TM.NPWT2768" $s_lcl_a_sts := "AB.TM.NPWT0077" $s_lcl_b_sts := "AB.TM.NPWT0038" endif if ($sRIU = "B") $s_rsa_a_sts := "AB.TM.NRUT2007" $s_rsa_b_sts := "AB.TM.NRUT2067" endif end if @su_seqphase2(1, "Start Power ON sequence for SWA instrument", *$sNumPha, "", $sTitle) if (($sMonitor = "FMON") and ($sTargetMode <> "BOOT")) -- no FDIR monitoring available in "BOOT" mode @su_seqphase2(2, "Setting up SMON parameters for SWA", *$sNumPha, "", $sTitle) call TIZM_FMON_CONF, "SWA", "SETUP", "", $TM endif if ($sUnit = "A") @SU_SEQPHASE2(1, "Enableing the Nominal SpW interface for SWA", *$sNumPha, "", "TITLE") call TPDC_CRP_DH_3058,"SWA", "NOM_ENA" else @SU_SEQPHASE2(1, "Enableing the Redundant SpW interface for SWA", *$sNumPha, "", "TITLE") call TPDC_CRP_DH_3058,"SWA", "RED_ENA" endif ******************************************************************** @SU_SEQPHASE2(1, "Initial checks", *$sNumPha, "", $sTitle) ******************************************************************** @SU_SEQPHASE2(2, "Initial checks of unit LCL and RSA status before power up", *$sNumPha, "", $sTitle) if ($TM = "YES") @su_digacs($s_rsa_a_sts,"=","Off", $sTrace, 60) -- Check RSA A status is OFF @su_digacs($s_rsa_b_sts,"=","Off", $sTrace, 60) -- Check RSA B status is OFF end if @su_digacs($s_lcl_a_sts,"=","OFF", $sTrace, 60) -- Check LCL A status is OFF @su_digacs($s_lcl_b_sts,"=","OFF", $sTrace, 60) -- Check LCL B status is OFF @su_anaacs($s_lcl_a_cur,">=-0.1","<=0.1",$sTrace, 60) -- Check SWA A LCL Current @su_anaacs($s_lcl_b_cur,">=-0.1","<=0.1",$sTrace, 60) -- Check SWA B LCL Current $i_reportflowID := startreportflow("AB.TM.YIA58452") $i_reportflowID_1 := startreportflow("AB.TM.YIA58902") @SU_SEQPHASE2(2, "Main 28V power applied", *$sNumPha, "", $sTitle) if ($sUnit = "A") @SU_SEQPHASE2(3, "SWA-A Power Up function", *$sNumPha, "", $sTitle) @su_send({ AB.TC.ZCSD11D2 , PCSB0036_ := "UNIT_A" }, $sTrace, "", VER := "ACK_EXEC", TIMEOUT_VER := 60) --Power up function SWA-A else -- $sUnit_Side = "B" @SU_SEQPHASE2(3, "SWA-B Power Up function", *$sNumPha, "", $sTitle) @su_send({ AB.TC.ZCSD11D2 , PCSB0036_ := "UNIT_B" }, $sTrace, "", VER := "ACK_EXEC", TIMEOUT_VER := 60) --Power up function SWA-B end if @SU_WAIT(20) --Check time is invalid -- @SU_SEQPHASE2(2, "Check SWA time is invalid", *$sNumPha, "", "TITLE") -- call RIZV_INST_TIME, SINST := "SWA" , B_TIME_VALID := *$b_time_valid , R_TIME_DIFF := *$r_time_diff -- if ($b_time_valid) -- RAISE ERRNAME := TEST_NOK, ERREASON := "SWA time invalid bit is not set" -- end if @SU_SEQPHASE2(2, "Send Time synchronization command", *$sNumPha, "", $sTitle) @SU_SEND({ AB.TC.ZCD00982 , \ PCD09821_ := "SWA_0" , \ PCD09822_ := 0}, $sTrace, "", "ACK_EXEC", 60) if ($sTargetMode = "BOOT") -- procedure provided by Adam Mayall 23/03/2018 required for SW loading @su_wait(20) @SU_SEQPHASE2(2, "Send command to stay in Boot mode", *$sNumPha, "", $sTitle) @SU_SEND({ AB.TC.ZIA58734 , \ SHF:OBV := 0 , \ SID:OBV := 120}, $sTrace, "", "ACK_EXEC", 60) @SU_SEQPHASE2(2, "No instrument monitoring available Boot mode", *$sNumPha, "", $sTitle) stopreportflow $i_reportflowID stopreportflow $i_reportflowID_1 else @SU_WAIT(36) @SU_SEQPHASE2(2, "Send command to leave Boot mode", *$sNumPha, "", $sTitle) @SU_SEND({ AB.TC.ZIA58735 , \ SHF:OBV := 0 , \ SID:OBV := 120}, $sTrace, "", "ACK_EXEC", 60) @SU_WAIT(8) @SU_SEQPHASE2(2, "Enable S20 with a frequency of 8Hz (125 msec)", *$sNumPha, "", $sTitle) call TPDC_FCP_DH_1735, INS_ID := "SWA_SPW_ADDR" , PERIOD := 1 --Enable Service 20 @SU_WAIT(1) @SU_SEQPHASE2(2, "Send Time synchronization command", *$sNumPha, "", $sTitle) @SU_SEND({ AB.TC.ZCD00982 , \ -- TC for time sync. Not sure of paramters. Ask SWA. PCD09821_ := "SWA_0" , \ PCD09822_ := 0}, $sTrace, "", "ACK_EXEC", 60) @su_wait(2) --Check time is valid and difference is acceptable @SU_SEQPHASE2(2, "Check SWA time is equal to SSMM time", *$sNumPha, "", "TITLE") call RIZV_INST_TIME, SINST := "SWA" , B_TIME_VALID := *$b_time_valid , R_TIME_DIFF := *$r_time_diff if ($b_time_valid) TA_PRINT "SSMM time is "+ %g($r_time_diff) +" from SWA time" if (abs($r_time_diff)>$r_max_time_diff) RAISE ERRNAME := TEST_NOK, ERREASON := "SWA time is out of bounds" end if else RAISE ERRNAME := TEST_NOK, ERREASON := "SWA time invalid bit is set" end if @SU_SEQPHASE2(2, "Capture boot report", *$sNumPha, "", $sTitle) -- should already be in flow buffer started prior to power-up @RPZA_CATCHTMPCKT($i_reportFlowID, "AB.TM.YIA58452", *$i_RptRefNb) @SU_DIGRC($i_RptRefNb,"AB.TM.YIA58452.NIA01633","=","BootEvent") stopreportflow $i_reportflowID @SU_WAIT(60) if ($TM = "YES") @SU_SEQPHASE2(2, "Enable diagnostic packets for NCR 1027", *$sNumPha, "", $sTitle) @su_send({ AB.TC.ZIA58050, PIA58050_ := "DPU_TC_CNT_HK"}, $sTrace, "", "ACK_EXEC", 60) @RPZA_HKTM_CATCH("AB.TM.YIA58204", "WAIT" , *$Count , 60) @su_send({ AB.TC.ZIA58050, PIA58050_ := "DPU_MAX_DUR_HK"}, $sTrace, "", "ACK_EXEC", 60) @RPZA_HKTM_CATCH("AB.TM.YIA58207", "WAIT" , *$Count , 60) @su_send({ AB.TC.ZIA58050, PIA58050_ := "DPU_TM_CNT"}, $sTrace, "", "ACK_EXEC", 60) @RPZA_HKTM_CATCH("AB.TM.YIA58214", "WAIT" , *$Count , 60) end if @SU_SEQPHASE2(2, "Perform the SpW connection test", *$sNumPha, "", $sTitle) $i_reportflowID := startreportflow("AB.TM.YIA58061") -- Start Report Flow for Connection Test Report TM(17,2) @su_send({ AB.TC.ZIA58001}, $sTrace, "", "ACK_EXEC", 60) -- Send TC 17,1 @SU_SEQPHASE2(2, "Check connection test report YIA58061 TM(17,2) has been received", *$sNumPha, "", $sTitle) @RPZA_CATCHTMPCKT($i_reportFlowID, "AB.TM.YIA58061", *$i_RptRefNb) -- Check reception of Connection Test Report TM(17,2) stopreportflow $i_reportflowID -- Stop flow to capture TM(17,2) if ($TM = "YES") @SU_SEQPHASE2(2, "Check sensor currents", *$sNumPha, "", $sTitle) @su_anaacs("AB.TM.NIA00837",">=100","<=200", $sTrace, 60) @su_anaacs("AB.TM.NIA00833", ">=0","<=10", $sTrace, 60) @su_anaacs("AB.TM.NIA00832", ">=0","<=10", $sTrace, 60) @su_anaacs("AB.TM.NIA00835", ">=0","<=10", $sTrace, 60) @su_anaacs("AB.TM.NIA00834", ">=0","<=10", $sTrace, 60) end if if ($sTargetMode = "DPUOPS") @SU_SEQPHASE2(2, "Switch DPU into OPS mode", *$sNumPha, "", $sTitle) $i_reportflowID := startreportflow("AB.TM.YIA58445") @su_send({ AB.TC.ZIA58703}, $sTrace, "", "ACK_EXEC", 60) -- Send TC SWA_TC_DPU_OPER @SU_SEQPHASE2(3, "Check TM YIA58445 ; TM(5 1) SID=43545 SWA_E_DPU_OPS_STATE", *$sNumPha, "", $sTitle) @RPZA_CATCHTMPCKT($i_reportFlowID, "AB.TM.YIA58445", *$i_RptRefNb) -- Check reception of SWA_DPU_OPS_STATE Report TM(5,1) @SU_DIGRC($i_RptRefNb,"AB.TM.YIA58445.NIA01633","=","DpuOpsState") -- EVENT_ID Reception of TM(5,1) stopreportflow $i_reportflowID if ($TM = "YES") @su_digacs("AB.TM.NIAD0703","=","OPS", $sTrace, 10) -- Check DPU_CURR_STATUS end if TA_PRINT "DPU is now in Ops Mode" @su_wait(40) endif if ($TM = "YES") @SU_SEQPHASE2(2, "Capture FSW Startup Report", *$sNumPha, "", $sTitle) -- should already be in flow buffer started prior to power-up @RPZA_CATCHTMPCKT($i_reportFlowID_1, "AB.TM.YIA58902", *$i_RptRefNb) @SU_IPVRC($i_RptRefNb,"AB.TM.YIA58902.NIA01529","NO","NO") @SU_IPVRC($i_RptRefNb,"AB.TM.YIA58902.NIA01530","NO","NO") @SU_IPVRC($i_RptRefNb,"AB.TM.YIA58902.NIA01531","NO","NO") @SU_SEQPHASE2(2, "Set HK rate to 10 seconds.", *$sNumPha, "", $sTitle) @SU_SEND({ AB.TC.ZIA58052 , \ SHF:OBV := 0 , \ SID:OBV := 120 , \ PIA58050_ := "DPU_HK" , \ PIA58052_ := 10.0}, $sTrace, "", "ACK_EXEC", 60) @SU_WAIT(40) end if stopreportflow $i_reportflowID_1 @su_seqphase2(1, "Enabling instrument monitoring if required", *$sNumPha, "", $sTitle) if ($sMonitor = "FMON") @su_seqphase2(2, "Setting up SMON parameters for SWA", *$sNumPha, "", $sTitle) call TIZM_FMON_CONF, "SWA", "ENABLE", "", $TM endif if ($sMonitor = "OOLSEQ") @SU_SEQPHASE2(2, "Execute sequence in parallel to monitor SWA HKTM, to detect for OOL", *$sNumPha, "", "TITLE") EXEC TIZZ_PL_OOL_MON,"SWA","FAST" endif endif -- Not "BOOT" mode if ($TM = "YES") @SU_SEQPHASE2(2, "Check SWA LCL and RSA Status, and current for side "+$sUnit, *$sNumPha,"", $sTitle) if ($sUnit = "A") ta_print "Verify LCL-A and RSA-A statuses set to ON" @su_digacs($s_lcl_a_sts,"=","ON", $sTrace, 90) -- Check LCL A status is ON @su_digacs($s_rsa_a_sts,"=","On", $sTrace, 90) -- Check RSA A status is ON @su_anaacs($s_lcl_a_cur,">=0.150","<=0.250",$sTrace, 90) -- Check SWA A LCL Current @su_digacs($s_lcl_b_sts,"=","OFF", $sTrace, 90) -- Check LCL B status is ON @su_digacs($s_rsa_b_sts,"=","Off", $sTrace, 90) -- Check RSA B status is ON @su_anaacs($s_lcl_b_cur,">=-0.1","<=0.1",$sTrace, 90) -- Check SWA B LCL Current else -- $sUnit_Side = "B" ta_print "Verify LCL-B and RSA-B statuses set to ON" @su_digacs($s_lcl_a_sts,"=","OFF", $sTrace, 90) -- Check LCL B status is ON @su_digacs($s_rsa_a_sts,"=","Off", $sTrace, 90) -- Check RSA B status is ON @su_anaacs($s_lcl_a_cur,">=-0.1","<=0.1",$sTrace, 90) -- Check SWA B LCL Current @su_digacs($s_lcl_b_sts,"=","ON", $sTrace, 90) -- Check LCL B status is ON @su_digacs($s_rsa_b_sts,"=","On", $sTrace, 90) -- Check RSA B status is ON @su_anaacs($s_lcl_b_cur,">=0.150","<=0.250",$sTrace, 90) -- Check SWA B LCL Current endif end if END SEQUENCE