**************************************************************************************************** ** 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 *************************************************************************************************** ** 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"] end proto ** Definition of Constants const string $sTitle := "TITLE" string $sTrace := "TRACE" ** Definition of Variables var string $sBufArg := "" string $sNumPha string $sPlatform date $dCurDate 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 @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 @su_seqphase2(1, "Start Power ON sequence for SWA instrument", *$sNumPha, $sTrace, $sTitle) if (($sMonitor = "FDIR") and ($sTargetMode <> "BOOT")) -- no FDIR monitoring available in "BOOT" mode @su_seqphase2(2, "Setting up SMON parameters for SWA", *$sNumPha, $sTrace, $sTitle) call TIZM_FMON_CONF, "SWA", "SETUP" endif ******************************************************************** @SU_SEQPHASE2(1, "Initial checks", *$sNumPha, "", $sTitle) ******************************************************************** @SU_SEQPHASE2(2, "Initial checks of unit LCL and RSA status before power up", *$sNumPha, "", $sTitle) @su_digacs($s_lcl_a_sts,"=","OFF", $sTrace, 5) -- Check LCL A status is OFF @su_digacs($s_lcl_b_sts,"=","OFF", $sTrace, 5) -- Check LCL B status is OFF @su_digacs($s_rsa_a_sts,"=","Off", $sTrace, 5) -- Check RSA A status is OFF @su_digacs($s_rsa_b_sts,"=","Off", $sTrace, 5) -- Check RSA 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) @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) 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_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) @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) @SU_SEQPHASE2(3, "Check TM's after Time sync", *$sNumPha,"", $sTitle) @COARSE_TIME("AB.TM.YIA58200",0) @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) 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 @su_digacs("AB.TM.NIAD0703","=","OPS", $sTrace, 10) -- Check DPU_CURR_STATUS TA_PRINT "DPU is now in Ops Mode" @su_wait(40) endif @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") stopreportflow $i_reportflowID_1 @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) @su_seqphase2(1, "Enabling instrument monitoring if required", *$sNumPha, $sTrace, $sTitle) if ($sMonitor = "FMON") @su_seqphase2(2, "Setting up SMON parameters for SWA", *$sNumPha, $sTrace, $sTitle) call TIZM_FMON_CONF, "SWA", "ENABLE" 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 @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, 60) -- Check LCL A status is ON @su_digacs($s_rsa_a_sts,"=","On", $sTrace, 60) -- Check RSA A status is ON @su_anaacs($s_lcl_a_cur,">=0.150","<=0.250",$sTrace, 60) -- Check SWA A LCL Current @su_digacs($s_lcl_b_sts,"=","OFF", $sTrace, 60) -- Check LCL B status is ON @su_digacs($s_rsa_b_sts,"=","Off", $sTrace, 60) -- Check RSA B status is ON @su_anaacs($s_lcl_b_cur,">=-0.1","<=0.1",$sTrace, 60) -- 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, 60) -- Check LCL B status is ON @su_digacs($s_rsa_a_sts,"=","Off", $sTrace, 60) -- Check RSA B status is ON @su_anaacs($s_lcl_a_cur,">=-0.1","<=0.1",$sTrace, 60) -- Check SWA B LCL Current @su_digacs($s_lcl_b_sts,"=","ON", $sTrace, 60) -- Check LCL B status is ON @su_digacs($s_rsa_b_sts,"=","On", $sTrace, 60) -- Check RSA B status is ON @su_anaacs($s_lcl_b_cur,">=0.150","<=0.250",$sTrace, 60) -- Check SWA B LCL Current endif END SEQUENCE ROUTINE COARSE_TIME PROTO string $s_TM := "" int $TIME_VAL := 0 [0, 1] END PROTO VAR string $sNumPha int $i_RptFlowId int $i_RptRefNb string $sTrace := "TRACE" int $i_counter := 0 int $i_NbOcds := 0 string $s_TM_Pckt(1000) int $i_TM_MSB int $i_CoarseTime MAIN StartOcdsFlow $s_TM , 100 $s_TM_Pckt := GETNEXTOCDS($s_TM, , 30000,"TEXT") $i_TM_MSB := int(val(extract($s_TM_Pckt(6), 19, 1))) **Store first 20 bytes of TM (including header) in string **************************************FIX this extraction part $i_CoarseTime := ($i_TM_MSB ANDB 0x8) SHR 3 **Coarse Time bit is MSB. Perform AND operation to verify value if($i_CoarseTime = $TIME_VAL) **IF coarse time has expected value, print check was successful, otherwise raise error TA_PRINT "Coarse Time is expectedly set to "+%d($TIME_VAL)+" in TM Packet MSB" else RAISE TEST_NOK, "Error: Coarse Time is not as expected" end if StopOCDSFlow $s_TM END ROUTINE -- COARSE_TIME