Operational Flight Software MAVEN Particles and Fields Operational Flight Software Code Walkthrough Instruments #2 (SWEA, SWIA, STATIC) Peter R. Harvey
Agenda FSW Walkthrough’s Software Architecture Module Overview Modules PWR SSR CMP SWEA SWIA STATIC Other Walkthrough’s Operational Core Instruments #1 (LPW, MAG, SEP) Fault Protection
FSW Modules - Operational Architecture FSW Modules - Operational Software context diagram showing each subsystem or major component
Operational FSW Expanded Upon Boot Architecture Operational FSW Expanded Upon Boot Boot Operational
Memory Summary (@CDR)
Memory Summary (@PSR) Memory has grown a bit or two
Data Processing - Up to 4 User Programs BKG Interrupts 256 Hz Interrupt Process Distributes CPU Time per Table Basic ¼ second table repeats 4Hz CMD, PWR, HSK get 32 Hz Instruments get 8-16 Hz, etc. Implements module requirements Reconfigurable FSW measures time in each ISR FSW measures total CPU% Design for < 50% usage EXEC Loop - Up to 4 User Programs - Calculations that take > 2 milliseconds (e.g. EEPROM table checksums)
INST Manager Generic Instrument Manager Design (type1) LPW, MAG,SEP controllers Messages received and packets generated under interrupt.
INST Manager Generic Instrument Manager Design (type 2) SWEA, SWIA, STATIC controllers Messages are received under interrupt building data structures Accumulations made in foreground, and telemetry packets generated.
Modes & Enables FSW Modes Safe – Minimal Activities Allowed Normal - FLASH Memory Allowed, HV, Attenuators Engineering – EEPROM Writing Implementation All Enables are Masked by Mode Mask for Safe/Norm/Eng Mode Transitions Have Associated Mode Initialization Script
Module Overview Generic Module Requirements “Module_Init”: Initialize Variables and Hardware to Allow all Module Calls to Work “Module_Cmd”: Handle Commands within one half interrupt period “Module_Hsk”: Provide Module Housekeeping for Telemetry Generic Examples // ============================================================ // Loader Initialization // On StartUp, we want to Dump Table[0] (EEPROM directory) void LD_Init() { DumpAdr = LoadAdr = (long) TableStart[0]; DumpSize = 80; // ~ # Bytes in Table[0] DumpCtr = 255; // # of Dump packets to make } // ============================================================ // Loader Commands void LD_Cmd(unsigned long cmd) {unsigned int op,dta,tbl,ofs; unsigned char *p; unsigned long dest; op = (int)(cmd>>24)&0x0F; // Op is the Command Option tbl= (int)(cmd>>20)&0x1F; // Table bits for some cmds ofs= (int)(cmd>>8 )&0x0FFF; dta= (int) cmd&0xFF; // Right Byte is Dta switch(op) { case 0: LoadAdr = (cmd>>8)&0xFFFF; // Load Byte p = (unsigned char *) LoadAdr; *p= (unsigned char) dta; break; case 1: DumpAdr = (cmd>>8)&0xFFFF; // Dump Byte(s) DumpSize = dta; DumpCtr = 255; // ============================================================ // EXEC Module Housekeeping // This routine formats a string of data storing them using // the input pointer and returns the string length in bytes. int Read_Exec_Hsk( char *ptr ) {int n; n=0; ptr[n++] = (char) Version ; ptr[n++] = (char) Fgnd1pps ; ptr[n++] = (char) *Mode_Ptr ; ptr[n++] = (char) *Reset_Ptr; ptr[n++] = (char) (*Enable_Ptr>>8); ptr[n++] = (char) *Enable_Ptr ; ptr[n++] = (char) ErrorCode ; ptr[n++] = (char) (ErrorData>>8); ptr[n++] = (char) ErrorData ; ptr[n++] = (char) ErrorCtr ; return( n ); }
PWR Module PWR Module Requirements (BOOT) Can Turn Instruments Off, but Not On Can Close SEP1, SEP2, EUV Doors but Cannot Open Them Requirements (OPER) Can Turn On All instruments and use overrides Can Directly Fire Actuators Can Accept Actuators “Requests” and will implement asap Control EUV Aperture Control SEP Doors Prohibit HV to instruments with cover ON Will Limit Monitor Housekeeping Values Requirements that Moved Ramp Instrument HV Moved to SWEA, SWIA and STATIC modules
PWR Actuators Actuator Timing “Allowed” bit refers to the Fault Protection control register
PWR Limits LIMIT Monitoring Limit Database: Up to 128 limit monitor records stored in EEPROM and loaded to SRAM at start up. Can be disabled by clearing the first byte (Action code) in SRAM. Each Element Described as 8-byte record:
PWR Limits LIMIT Monitoring
SSR Overview SOLID STATE RECORDER Management Requirements Manage the Non-Volatile Memory (Flash) Format the Flash into addressable blocks Implement a Circular Recorder/playback system to store 30 k bps Keep the power off when possible Provide packets to TM module Detailed Design Handles Variable-size Packets Routes packets based upon ApID and Table 4 routing information [0] -> Waste Basket [1] -> Real-Time Telemetry [2] -> Archive (Flash) storage Design changes since SwPDR Instrument Message to Real-Time Packet Conversion (for EM I&T Tests) Automatically Adds PAD bytes to achieve 4-byte alignment requirement
Real-Time Data Mgmt RT Data Management
Archive Data Mgmt Archive Data Management
Archive Data Mgmt Archive Data Management
Archive Data Mgmt Archive Data Management
FMAP : FLASH Virtual-to-Physical Memory Map Archive Data Storage FLASH Hardware 8 GB Capacity Each 4GB powered separately EDAC Enabled Write/Read DMA-Channel to/from SRAM Block Addressable 2^16 128KB Blocks Each Block has 2K extra bytes EDAC Bad-Block-Indicator Erase Count Write Time FSW Functions Stores/Retrieves Archive Science Blocks Circular Memory with Separate Read & Write Ptrs Playback Commanded by Block Number and Length Both Read/Write Block pointers Telemetered Ground S/W keeps Time-to-Block Number relationship FMAP of 256 provides 32 MB control FSW_020_ANALYSES.XLS FMAP : FLASH Virtual-to-Physical Memory Map
SSR FLASH Logic Read/Write/Diag Decision State D0
SSR FLASH Logic Read Logic States with Error Handling
SSR FLASH Logic Write Logic State W1 with Error Handling
SSR FLASH Logic Write Logic State W2 with Error Handling
Compression CMP Requirements (OPER) Enable/Disable/Option by APID Provide Log-Compression Count Rate Compression 19-to-8 bit (and 3 more options) Performed at Initial Packet Formatting Provide “Space Particle Data Compression” (dwc’s paper) Provide Compression on Survey and Archive data Provide Archive compression at Downlink Time
Telemetry APIDs
Telemetry APIDs
Data Collection DMA Channels are Assigned to Each Data Instrument FSW Writes Destination Addresses into Each DMA Controller DMA Registers are Double-Buffered to Eliminate Gaps DMA Buffers Automatically Swap at 1 second FSW Modules Process Messages Using Inst. Msg Headers Data Collection Rates Max Raw Input Rate of ~153 KB/sec (1.2 Mbps) Vast Majority are Summing Counts Important to know max data volume in 1 second
SWEA Manager SWEA Management // FSW.SWEA-1 : SWEA_INIT shall initialize the module and define its hardware initial // state so the module works correctly. // FSW.SWEA-2 : SWEA shall receive and execute commands to the module at up to 32Hz, // and complete those commands in <1/10 interrupt period. // FSW.SWEA-3 : SWEA shall provide housekeeping telemetry as defined in MAVEN PF // Command/Telemetry document // FSW.SWEA-4 : *** DELETED *** // FSW.SWEA-5 : PFP FSW shall be able to upload the SWEA sweep table from the // ground or from non-volatile memory with an arbitrary pattern. // FSW.SWEA-6 : PFP FSW shall re-load the SWEA LUT in the event of a LUT checksum // mismatch. // FSW.SWEA-7 : PFP FSW shall provide identification of the operating SWEA sweep // LUT using a 'modeID' // [a] to be set by command; // [b] to be telemetered in housekeeping. // FSW.SWEA-8 : PFP FSW shall control the SWEA fixed HV based on ground command // (parameter table) settings; // [a] controlling the supply via a DAC in SWEA programmed over // the PFDPU to SWEA interface; // [b] allowing non-zero SWEA HV if enabled; // [c] automatically zeroing SWEA HV if disabled; // [d] indicating SWEA HV enable/disable in SWEA housekeeping. // FSW.SWEA-9 : PFP FSW shall control the SWEA test pulser via a register in SWEA // in response to both // [a] pulser enable/disable; // [b] mode ground commands. // FSW.SWEA-10 : PFP FSW shall control SWEA HV enable in response to ground command // [a] using registers in SWEA programmed over the PFDPU to SWEA interface; // [b] functioning as a pass-through for these enabling commands; and // [c] allowing HV to be disabled by the safing system // FSW.SWEA-11 : PFP FSW shall // [a] decode SWEA housekeeping information provided over the SWEA to // PFDPU interface; and // [b] include this data in the PFP periodic housekeeping packet; and // [c] provide access to status bits (TBD) to other software modules.
SWEA Manager SWEA Management // FSW.SWEA-12 : PFP FSW shall // [a] collect fast housekeeping samples into 4 tables // (one for each sweep source); // [b] telemeter the tables on command, cycling through tables every // 4th cycle (8 secs); and // [c] implement a mode in which the select is commanded to a // non-sweeping source. // FSW.SWEA-13 : PFP FSW shall generate 3D distribution telemetry packets at a // programmable rate // [a] using raw SWEA distributions; // [b] providing separate packets with separate intervals and // formats for Survey and Archive; // [c] which shall be formatted as 16, 32, or 64 energies by 80 angles; // [d] sampling, not averaging, raw samples when the sample interval // is greater than 2 seconds; // [e] compressing to 8-bit data. // FSW.SWEA-14 : PFP FSW shall generate Pitch Angle Distribution telemetry packets // (Survey only) at a programmable rate // [b] selecting data using the magnetic field direction; // [c] averaging samples when the sample interval is greater // than 2 seconds. // ** This requirement is TBD. Defer implementation to Build 3. ** // FSW.SWEA-15 : PFP FSW shall generate Spectra Telemetry packets // [a] at separately programmable rates for survey and archive; // [b] summing over the raw distribution function over all angles // for each energy (64 energy samples); // [c] scaling each deflector summation by one-of-six deflector // scale factors; // [d] dividing each result by the number of intervals; // [e] utilizing at least 4 types of compression TBD // [e.g 19-to-8 bit compression]; // [f] repeating at a 2**N second programmable interval; // [g] packing several spectra into a ~1kbyte packet. // FSW.SWEA-16 : SWEA shall monitor instrument messages and disable HV if there // is a loss of communication between the PFDPU and the instrument.
SWEA Messages SWEA Messages
SWEA Processing SWEA Processing See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
SWEA Processing
SWEA Processing
SWEA Processing Atan2 (Four Quadrant Arc Tangent Development) Verification .vs. Std Floating Point MAVEN PFP PAD Development, Peter Harvey v.09/13/12 [-10000,-10000] ATAN Std New -135.000 -135.000 [ -5000,-10000] ATAN Std New -153.435 -153.281 [ 0,-10000] ATAN Std New 180.000 180.000 [ 5000,-10000] ATAN Std New 153.435 153.281 [ 10000,-10000] ATAN Std New 135.000 135.000 [-10000, -5000] ATAN Std New -116.565 -116.719 [ -5000, -5000] ATAN Std New -135.000 -135.000 [ 0, -5000] ATAN Std New 180.000 180.000 [ 5000, -5000] ATAN Std New 135.000 135.000 [ 10000, -5000] ATAN Std New 116.565 116.719 [-10000, 0] ATAN Std New -90.000 -90.000 [ -5000, 0] ATAN Std New -90.000 -90.000 [ 0, 0] ATAN Std New 0.000 0.000 [ 5000, 0] ATAN Std New 90.000 90.000 [ 10000, 0] ATAN Std New 90.000 90.000 [-10000, 5000] ATAN Std New -63.435 -63.281 [ -5000, 5000] ATAN Std New -45.000 -45.000 [ 0, 5000] ATAN Std New 0.000 0.000 [ 5000, 5000] ATAN Std New 45.000 45.000 [ 10000, 5000] ATAN Std New 63.435 63.281 [-10000, 10000] ATAN Std New -45.000 -45.000 [ -5000, 10000] ATAN Std New -26.565 -26.719 [ 0, 10000] ATAN Std New 0.000 0.000 [ 5000, 10000] ATAN Std New 26.565 26.719 [ 10000, 10000] ATAN Std New 45.000 45.000 [-10000, 15000] ATAN Std New -33.690 -33.750 [ -5000, 15000] ATAN Std New -18.435 -16.875 [ 0, 15000] ATAN Std New 0.000 0.000 [ 5000, 15000] ATAN Std New 18.435 16.875 [ 10000, 15000] ATAN Std New 33.690 33.750 [-10000, 20000] ATAN Std New -26.565 -26.719 [ -5000, 20000] ATAN Std New -14.036 -14.063 [ 0, 20000] ATAN Std New 0.000 0.000 [ 5000, 20000] ATAN Std New 14.036 14.063 [ 10000, 20000] ATAN Std New 26.565 26.719 Similar Tests of Sin() were performed
SWEA Processing Pitch Angle Distribution (PAD) Processing Verification SWEAMAG 2900 3900 -4900 Calculating SWE Vector SWE_Mag squared = 47630000 SWE_Mag = 6901 SWE_MAG =13770 18518 -23266 Calculating SWE Az El ATAN2( 13770, 18518) = 0.931 rads [13770,18518] ATAN= 53.366 54.844 Atan2x = 39 MagAz pair 2 2 MagEl pair 9 9 SWE_MagAz = 2 SWE_MagEl = 9 Extracting the PAD Show PAD [0] 300 410 510 620 730 840 940 1050 1150 1250 1340 1430 1520 1610 110 200 … Compared this to DWC’s Excel spreadsheet “MAVEN_PF_TN_044A_Sample.xls” Repeated this test for a variety of MAG input values.
SWEA Hsk APID 28 Table 18
SWEA Hsk APID Table 18
SWEA Table 18 Table 18
SWEA Memory Instrument DMA Memory
SWEA EEPROM SWEA EEPROM Memory
SWEA RTS SWEA Relative Time Sequences RTS19 (SWESTART) RTS=[ "cmd.PFP_RTSDIS(15)", # Disable HVON "cmd.PFP_RTSSTOP(15)", # Stop HVON if running "cmd.PFP_RTSWAIT(80)", # Wait 20 sec in case HVON was running "cmd.SWE_SIFMODE(LUTCKSM=0,HSKPG=1,ANODE=0)", # Enable HSK messages only "cmd.SWE_SSCTL(0x0007)", # Set Active Buffer to 7 "cmd.PFP_SWELDLUT(0)", # Load LUT 0 into Buffer 0 "cmd.PFP_RTSWAIT(240)", # Wait 60 seconds for table load "cmd.SWE_SSCTL(0x0000)", # Set Active Buffer to 0 "cmd.SWE_SIFMODE(LUTCKSM=0,HSKPG=1,ANODE=1)", # Enable HSK and Anode messages "cmd.PFP_SWELDLUT(1)", # Load LUT 1 into Buffer 1 "cmd.PFP_SWELDLUT(2)", # Load LUT 2 into Buffer 2 "cmd.PFP_SWELDLUT(3)", # Load LUT 3 into Buffer 3 "cmd.SWE_MTMCTL(0,0,1)", # Enable checksums "cmd.SWE_SIFMODE(LUTCKSM=1,HSKPG=1,ANODE=1)", # Enable all messages "cmd.PFP_RTSENA(15)", # Enable HVON "cmd.RTSEND()" # RTS END command ]
SWEA RTS SWEA RTS #SWEHVOFF (RTS 9) RTS=[ "cmd.PFP_RTSSTOP(15)", # STOP HV ON if running "cmd.SWE_SIFCTL(0,0,0,0,0,0,0)", # HV OFF SWEA "cmd.RTSEND()" # RTS END command ] #SWEHVON (RTS 15) RTS=[ "cmd.PFP_RTSSTOP(9)", #Stop SWEHVOFF, if running "cmd.SWE_SIFCTL(0,0,0,0,0,0,1)", # HV Enable Allow "cmd.SWE_HVENABK0(0x0000)", # NR HV Arm (insert key for flight) "cmd.SWE_HVENABK1(0x0000)", # NR HV Enable (insert key for flight) "cmd.PFP_RTSWAIT(16)", # Wait 4 seconds "cmd.SWE_HVENABK0(0x0000)", # MCP HV Arm (insert key for flight) "cmd.SWE_HVENABK1(0x0000)", # MCP HV Enable (insert key for flight) "cmd.PFP_RTSWAIT(80)", # Wait 20 seconds for MCP enable overshoot "cmd.SWE_SIFCTL(1,0,0,0,0,0,1)", # Enable Sweep "cmd.PFP_RTSWAIT(32)", # Wait 8 seconds (4 sweeps) "cmd.PFP_SWEMCPRAMP(0xC924)", # RAMP MCP to 2750 V "cmd.PFP_RTSWAIT(240)", # Wait 60 seconds for ramp to complete "cmd.RTSEND()" # RTS END command ]
SWEA LM SWEA Limit Monitors
SWEA FP SWEA Mgr() Decodes SWEA messages Resets Timer(11) when HSK message found. Resets its timer when SWEA is off. IsSWEAHVOn() If SWEA Off, HV is off. If any HV > 100V, then HV is ON. IsSWEAAllowed() If Zone Alert[6]=1 then No. If User Enable[5]=0, then No.
SWEA FP ManSWEAHV() If SWEA is off, HV is off so exit. If HV is ON but not allowed, this routine starts RTS[10], SWEA HV Off. If HV is OFF but allowed, this routine starts RTS(16), SWEA HV On ManSWEAPower() If no HSK coming out, then turn SWEA off. If HV not complying, then turn SWEA off.
SWEA FP SWEA Fault Protection
SWIA Manager SWIA Management Requirements Summary // FSW.SWIA-1 : SWIA_INIT shall initialize the module and define its hardware initial // state so the module works correctly. // FSW.SWIA-2 : SWIA shall receive and execute commands to the module at up to 32Hz, // and complete those commands in <1/10 interrupt period. // FSW.SWIA-3 : SWIA shall provide housekeeping telemetry as defined in MAVEN PF // Command/Telemetry document // FSW.SWIA-4 : LUT Generation Function Deleted // FSW.SWIA-5 : PFP FSW shall be able to upload the SWIA sweep table from the ground // or from non-voltaile memory with an arbitrary pattern. // FSW.SWIA-6 : PFP FSW shall re-load the SWIA LUT in the event of a LUT checksum mismatch. // FSW.SWIA-7 : PFP FSW shall provide identification of the operating SWIA sweep LUT // using a 'modeID' // [a] to be set by command; // [b] to be telemetered in housekeeping. // FSW.SWIA-8 : PFP FSW shall control the SWIA fixed HV based on ground command // (parameter table) settings; // [a] controlling the supply via a DAC in SWIA programmed over the PFDPU // to SWIA interface; // [b] allowing non-zero SWIA HV if enabled; // [c] automatically zeroing SWIA HV DAC if SWIA HV is disabled; // [d] indicating SWIA HV enable/disable in SWIA housekeeping. // FSW.SWIA-9 : PFP FSW shall control the SWIA test pulser in response to // enable/disable and mode ground commands via a register in SWIA // programmed over the PFDPU to SWIA interface (see SWIA FPGA spec). // FSW.SWIA-10 : PFP FSW shall control SWIA HV enable in response to ground command // [a] using registers in SWIA programmed over the PFDPU to SWIA interface; // [b] functioning as a pass-through for these enabling commands; and // [c] allowing HV to be disabled by the safing system
SWIA Manager SWIA Management Requirements Summary // FSW.SWIA-11 : PFP FSW shall // [a] decode SWIA housekeeping information provided over the SWIA to // PFDPU interface; and // [b] include this data in the PFP periodic housekeeping packet; and // [c] provide access to status bits (TBD) to other software modules. // FSW.SWIA-12 : PFP FSW shall // [a] collect fast housekeeping samples into 4 tables (one for each sweep source); // [b] telemeter the tables on command; and // [c] stopping on a non-sweeping source. // FSW.SWIA-13 : PFP FSW shall generate Coarse Distribution telemetry packets at a // programmable rate // [a] using raw SWIA P1 distributions; // [b] providing separate packets with separate intervals for Survey and // Archive; // [c] which shall be formatted as 16, 24 or 48 energies by 4 deflections by 16 anodes; // [d] compressed using one of four types [ 19-to-8, 26-to-8, etc]. // FSW.SWIA-14 : PFP FSW shall generate Fine Distribution telemetry packets at a // [a] using raw SWIA P2 distributions; // [b] providing separate packets with separate intervals and formats for // Survey and Archive; // [c] which shall be formatted either as // i. 48 energies by 12 deflections by 10 anodes; OR // ii. 32 energies by 8 deflections by 6 Anodes; // FSW.SWIA-15 : PFP FSW shall generate Raw distribution telemetry packets at a // [a] using raw P0 distributions; // [b] providing separate packets with separate intervals for Survey ; // [c] which shall include all 96 energies by 24 deflections by 24 anodes. // FSW.SWIA-16 : PFP FSW shall compute moments from P1 or P2 data (based upon mode) // [a] including the standard 13 moments of density, velocity, pressure // tensor, and heat flux; // [b] computed at the highest available time resolution (4s); // [c] with multiple sets of 13 moments included in each packet; // [d] routed to Survey telemetry only. // *** This requirement is TBD: Defer implementation to Build 3.
SWIA Messages SWIA Messages
SWIA Processing SWIA Processing See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
SWIA Processing SWIA Processing
SWIA Processing SWIA Processing
SWIA Processing SWIA Processing
SWIA Processing SWIA Processing
SWIA Processing SWIA Coarse & Fine Distribution Timing
SWIA Processing SWIA Moments Specification MAVEN_PF_SYS_038C_SWIAMoments.doc Defined terms and provided code segments Database & “Test Pulser” Case SWIAMoments_0707_2.xls Defined scale factors FSW LUT Load MAVEN_PF_FSW_011_Moment_LUTs.xlsx Builds a PFDPU load script to SRAM
SWIA Processing SWIA Moments Test Pulser Cases P1 & P2 Matched Excel Results Simulated on Code Warrior P1 took 1.6 M cycles P2 took 4.4 M cycles (~1/2 sec) MAVEN PFP Moments Development, Peter Harvey v.09/25/12 P1 Moments N : 5f57 : 6.0228E+016 NVx : de50 : -4.1659E+016 NVy : 586a : 5.4372E+015 NVz : 56f1 : 3.3134E+015 NPxx : 5cd3 : 2.5469E+016 Npyy : 5947 : 7.3823E+015 NPzz : 590c : 6.8672E+015 Npxy : d46f : -1.3710E+015 NPxz : d2d4 : -7.9658E+014 Npyz : 4cf3 : 1.0379E+014 NHx : da6a : -1.0886E+016 Nhy : 5485 : 1.4205E+015 NHz : 523f : 6.3236E+014 Full Hex N : 00d5f8a98720b20f NVx : ff6bffad87153766 NVy : 00135121adda9a5b NVz : 000bc5827167331a NPxx : 005a7c19b8a7a983 Npyy : 001a3a2ad87d6cff NPzz : 001865b5a585eca9 Npxy : fffb210cabbd7b03 NPxz : fffd2b841691b4b5 Npyz : 00005e6554a09fc3 NHx : ffd9539ebf71afce Nhy : 00050bf45d38cb9d NHz : 00023f20d05292fa P2 Moments N : 675d : 9.6943E+017 NVx : e149 : -1.1837E+017 NVy : 5603 : 2.2683E+015 NVz : 5f4b : 5.9362E+016 NPxx : 5b62 : 1.5241E+016 Npyy : 52e1 : 8.1039E+014 NPzz : 5842 : 5.0919E+015 Npxy : d013 : -2.9246E+014 NPxz : d92f : -7.1748E+015 Npyz : 4e07 : 1.4289E+014 NHx : d78d : -4.0017E+015 Nhy : 4c60 : 8.3577E+013 NHz : 55b5 : 2.0885E+015 Full Hex N : 0d741ff37e38bd0c NVx : fe5b74ec2c700c00 NVy : 00080efeaa091a43 NVz : 00d2e56d213515ee NPxx : 00362527721436c0 Npyy : 0002e10b6c9a48a7 NPzz : 0012170f9ab9be73 Npxy : fffef601a9c329dc NPxz : ffe6828df2c7e697 Npyz : 000081f4471b9d06 NHx : fff1c87251695ad7 Nhy : 00004c035390f18d NHz : 00076b79fd3ebf36 See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
SWIA Processing SWIA FAST HSK See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
SWIA Table 19 Table 19
SWIA Memory Instrument DMA Memory
SWIA EEPROM SWIA EEPROM Memory
SWIA RTS SWIA RTS #SWISTART (RTS 20) RTS=[ "cmd.PFP_RTSDIS(16)", # Disable HVON "cmd.PFP_RTSSTOP(16)", # Stop HVON if running "cmd.PFP_CDI(SYSTEM=3,ADDR=0xFF,VALUE=0x0)", # Reset FPGA "cmd.PFP_RTSWAIT(4)", # Delay(1 second) "cmd.PFP_RTSSTART(26)", # Initialize in SW Telemetry mode "cmd.SWI_STMODE(LUTCKSM=1,HSKPG=1,P2=0,P1=0,P0=0)", # Enable LUT and HSK messages "cmd.SWI_MTMCTL(PNTR=0, DPM=0, DIAG=1)", # Turns on Checksum calculation "cmd.PFP_RTSWAIT(16)", # Delay(4 seconds) "cmd.PFP_SWILDLUT(0)", # Load SWI LUT Buffer#0 "cmd.PFP_RTSWAIT(96)", # Delay(18 seconds) "cmd.PFP_SWILDLUT(1)", # Load SWI LUT Buffer#1 "cmd.PFP_RTSWAIT(72)", # Delay(18 seconds) "cmd.SWI_PA1TDAC(0x9500)", # Set DAC Threshold "cmd.SWI_PA2TDAC(0x9500)", # Set DAC Threshold "cmd.SWI_ACP2ERNG(UPPER=0x5F, LOWER=0)", # ACP2ERNG(UPPER=0x5F, LOWER=0) "cmd.SWI_ACP2DRNG(UPPER=0x17, LOWER=0)", # ACP2DRNG(UPPER=0x17, LOWER=0) "cmd.SWI_A2OFA1MD(P1MODE=1, DOFF=0x06, EOFF=0x18)", # P1MODE=1, DOFF=0x06, EOFF=0x18 "cmd.SWI_ANODMASK(0x0000)", # ANODE MASK(0) "cmd.SWI_STMODE(LUTCKSM=1,HSKPG=1,P2=1,P1=1,P0=0)", # Enable products "cmd.PFP_RTSENA(16)", # Enable HVON "cmd.PFP_ARM(6)", # Enable Attenuator Control "cmd.PFP_LOADTABLE(TABLE=19,OFFSET = 1,BYTE = 0x1)", # Enable Mode Control "cmd.RTSEND()" # RTS END command ]
SWIA RTS SWIA RTS #SWIHVOFF (RTS10) RTS=[ "cmd.PFP_RTSSTOP(16)", # Disable HVON "cmd.PFP_CDI(SYSTEM=3,ADDR=0x21,Value=0)", # HV OFF SWIA "cmd.RTSEND()" # RTS END command ] #SWIHVON (RTS 16) RTS=[ "cmd.PFP_RTSSTOP(10)", # Stop HVOFF if running "cmd.PFP_CDI(SYSTEM=3,ADDR=0x21,VALUE=0x0701)", # SWEEP = 0,DIAG=7,SHUTDOWN=0,HVENBALLOW=1 "cmd.PFP_CDI(SYSTEM=3,ADDR=0x27,VALUE=0x0)", # Keys for flight need to be inserted "cmd.PFP_CDI(SYSTEM=3,ADDR=0x32,VALUE=0x0)", # Keys for flight need to be inserted "cmd.PFP_RTSWAIT(16)", # Delay(4 seconds) "cmd.PFP_SWIRAWRAMP(0xDC28)", # RAMP to 4.3 kV "cmd.PFP_RTSWAIT(256)", # Delay(64 seconds) "cmd.PFP_CDI(SYSTEM=3,ADDR=0x21,VALUE=0x8001)", # SWEEP = 1,DIAG=0,SHUTDOWN=0,HVENBALLOW=1) "cmd.PFP_SWIMCPRAMP(0x9800)", # RAMP MCP to 1.8 kV "cmd.RTSEND()" # RTS END command ]
SWIA LM SWIA Limit Monitors
SWIA FP SWIA Mgr() Decodes SWIA messages Resets Timer(10) when HSK message found. Resets its timer when SWIA is off. IsSWIAHVOn() If SWIA Off, HV is off. If any HV > 100V, then HV is ON. IsSWIAAllowed() If Zone Alert[6]=1 then No. If User Enable[4]=0, then No.
SWIA FP ManSWIAHV() If SWIA is off, HV is off so exit. If HV is ON but not allowed, this routine starts RTS[9], SWIA HV Off. If HV is OFF but allowed, this routine starts RTS(15), SWIA HV On ManSWIAPower() If no HSK coming out, then turn SWIA off. If HV not complying, then turn SWIA off.
SWIA FP SWIA Fault Protection
STATIC Manager STATIC Management // FSW.STAT-1 : STAT_INIT shall initialize the module and define its hardware // initial state so the module works correctly.. // FSW.STAT-2 : STAT shall receive and execute commands to the module at up to // 32Hz, and complete those commands in <1/10 interrupt period. // FSW.STAT-3 : STAT shall provide housekeeping telemetry as defined in MAVEN PF // Command/Telemetry document // FSW.STAT-4 : DELETED 3/1/2012 due to the complexity and lack of an integer // algorithm. Will load LUTs from EEPROM. // FSW.STAT-5 : PFP FSW shall be able to upload the STATIC sweep table from the // ground or from non-volatile memory with an arbitrary pattern. // FSW.STAT-6 : PFP FSW shall re-load the STATIC SLUTs in the event of a SLUT // checksum mismatch. // FSW.STAT-7 : PFP FSW shall provide identification of the operating STATIC // sweep LUT using a 'modeID' // [a] to be set by command; // [b] to be telemetered in housekeeping. // FSW.STAT-8 : PFP FSW shall load the MLUT from non-volatile memory or by ground command // [a] to one of 4 MLUT in STATIC; The MLUT shall be loaded as described // in the STATIC FPGA spec. A 'mode ID' shall be set by command and be // telemetered in housekeeping to identify the operating MLUT. // FSW.STAT-9 : PFP FSW shall re-load the STATIC MLUTs in the event of a MLUT checksum mismatch. // FSW.STAT-10 : PFP FSW shall provide identification of the operating STATIC mass // LUT using a 'modeID'
STATIC Manager STATIC Management // FSW.STAT-11 : PFP FSW shall // [a] set which MLUT and SLUT is active by command; // [b] inhibit loading an MLUT or SLUT which is active. // FSW.STAT-12 : Deleted (PFFSW-310) // FSW.STAT-13 : PFP FSW shall control the STATIC Fixed HV based on ground command // (parameter table) settings; // [a] controlling the supply via a DAC in STATIC programmed over the // PFDPU to STATIC interface; // [b] allowing non-zero STATIC HV if enabled; // [c] automatically zeroing the fixed HV DAC if STATIC HV is disabled; // [d] indicating STATIC HV enable/disable in STATIC housekeeping. // FSW.STAT-14 : *** DELETED 3/1/2012. Not implemented in HDW *** // FSW.STAT-15 : PFP FSW shall control the STATIC SMA attenuator // [a] when STATIC atten logic is enabled; // [b] when STATIC P1 max counting rates using TIMERST value // i. exceed a programmable threshold1 N times in M periods, // increase attenuation; // ii. fall below programmable threshold2 N times in M periods, // decrease attenuation; // [c] including the attenuator position in all STATIC distribution // telemetry products; // FSW.STAT-16 : PFP FSW shall program the various registers in STATIC // (thresholds, modes, etc) in response to ground commands and // RTS using the CDI interface
STATIC Messages STATIC Messages
STATIC Messages STATIC Messages See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
STATIC Messages STATIC Messages See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
STATIC Messages STATIC Messages See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
STATIC Messages STATIC Messages See MAVEN_PF_FSW_021_CTM.xls for formats of these APIDs
STATIC Processing STATIC P1A-P1D
STATIC Processing STATIC P2
STATIC Processing STATIC P3
STATIC Processing STATIC P4A
STATIC Processing STATIC P4B
STATIC Processing STATIC P4C
STATIC Processing STATIC P4D
STATIC Processing STATIC P4E
STATIC Processing STATIC RATES (R1,R2,R3)
STATIC Processing STATIC Fast HSK/ HV Offset Calibration
STATIC Memory Instrument DMA Memory
STATIC EEPROM STATIC EEPROM
STATIC RTS STATIC RTS # STASTART RTS=[ "cmd.PFP_RTSDIS(14)", "cmd.PFP_CDI(SYSTEM=5,ADDR=0xFF,VALUE=0x0)", # Reset the FPGA "cmd.PFP_RTSWAIT(4)", # Delay(1 second) # Disable resets due to no data packets or bad checksums during startup "cmd.PFP_LOADTABLE(21,30,0)", #CSMLIM "cmd.PFP_LOADTABLE(21,31,0)", #CSMCTR "cmd.PFP_LOADTABLE(21,32,0)", #RTSLMT "cmd.PFP_LOADTABLE(21,33,0)", #RTSCTR # This part is converted from events_nom. "cmd.STA_STMODE(LUTCHKSUM=1, HSKPG=1, RAWEVENTS=1, RATES=1, P4=0, P3=0, P2=0, P1=0, MASSHISTO=0, FASTRATES=0)", "cmd.STA_SWHSKCH(DWELLMODE=0, CHANNEL=0)", "cmd.STA_TPMODE(VDELAY=0, VFREQ=0, DELAYSET=0, DELAYMODE=0, SLOW=0, ENABLE=0)", "cmd.STA_TSTARTDAC(VALUE=0x0200)", "cmd.STA_TSTOPDAC(VALUE=0x0200)", "cmd.STA_EVPLUT(VALUE=0x8000)", "cmd.STA_EVPCTL(ABINMODE=0, MBINMODE=0, P4SEL=1, STOPFIRSTOK=0, EVTOUT=3, NUMEVENTS=3)", "cmd.STA_MTMCTL(REGREADPTR=0x00, CYCTAG=0, MTPATMODE=0, MEMDIAGMODE=1)", "cmd.STA_EVPFMRCTL(TIMERSTDUR=0x04)", "cmd.STA_MASSHSTCTL(SELTDC=1, ESEL=0, ASEL=0, MQUAL=1, AQUAL=1, EWILD=1, AWILD=1)", "cmd.STA_MTREG(THRESH=0x0f)", "cmd.STA_ABRMCTL(AREJMODE=0, AREJBIN=0)", "cmd.STA_EVDECCTL(DECISEL=0, ENABLE=0, THRESH=0x0000)", "cmd.STA_ADCTHOLD(VALUE=0x4ccc)", "cmd.STA_TDCOCCTL(IGNORELATCHUP=0, PWRFORCEON=0, PWRFORCEOFF=0)", "cmd.PFP_TMPKTRATE(0xa,8)", #HKP rate for apid 2A # Default routing and table initialization "cmd.PFP_LOADTABLE(21, 0,0x00)", #STA STARTUP Mode 0, CAAAAAAA = 00000000 "cmd.PFP_LOADTABLE(21, 2,0x00)", #P1A survey APID 0xc0, 4s CCxxSNNN=00xx0000 "cmd.PFP_LOADTABLE(21, 3,0x09)", #P1B survey APID 0xc2, 8s off CCxxSNNN=00xx1001 "cmd.PFP_LOADTABLE(21, 4,0x00)", #P1C survey APID 0xc4, 4s off CCxxSNNN=00xx0000 "cmd.PFP_LOADTABLE(21, 5,0x0D)", #P1D survey APID 0xc6, 128s off CCxxSNNN=00xx1101 "cmd.PFP_LOADTABLE(21, 6,0x00)", #P2 survey APID 0xc8, 4s CCxxSNNN=00xx0000 "cmd.PFP_LOADTABLE(21, 7,0x00)", #P3 survey APID 0xca, 4s CCxxSNNN=00xx0000 "cmd.PFP_LOADTABLE(21, 8,0x0D)", #P4B survey APID 0xcc-d2, 128s CCxxSNNN=00xx1101 "cmd.PFP_LOADTABLE(21, 9,0x00)", #P4B burst APID 0xcd-d3, 4s off CCxxSNNN=00xx0000 "cmd.PFP_LOADTABLE(21,10,0x09)", #P4E survey APID 0xd4, 8s off CCxxSNNN=00xx1001 "cmd.PFP_LOADTABLE(21,12,0x00)", #Events survey APID 0xd6, 4s xxPPxNNN=00xx0000 ?? "cmd.PFP_LOADTABLE(21,13,0x00)", #HKP survey APID 0xd7, off xxxxxxxC=00xx0000 "cmd.PFP_LOADTABLE(21,14,0x00)", #Rates1 survey APID 0xd8, 4s CCxxSNNN=00xx0000 "cmd.PFP_LOADTABLE(21,15,0x0D)", #Rates2 survey APID 0xd9, 128s CCxxSNNN=00xx1101 "cmd.PFP_LOADTABLE(21,16,0x18)", #Rates3 survey APID 0xda, 4s CCGGSNNN=00011000 64 per cycle "cmd.PFP_LOADTABLE(21,17,0x0C)", #MassHist survey APID 0xdb, 64s CCxxSNNN=00xx1100 "cmd.PFP_LOADTABLE(21,40,0x04)", #Rate3 select for APID 0xda, xxxxRRRR=xxxx0100 TimeRST
STATIC RTS STATIC RTS "cmd.PFP_LOADTABLE(21,18,13)", #Slot 0 gets SLUT0 "cmd.PFP_LOADTABLE(21,19,14)", #Slot 1 gets SLUT1 "cmd.PFP_LOADTABLE(21,20,15)", #Slot 2 gets SLUT2 "cmd.PFP_LOADTABLE(21,21,15)", #Slot 3 gets SLUT2 "cmd.PFP_LOADTABLE(21,22,13)", #Slot 4 gets SLUT0 "cmd.PFP_LOADTABLE(21,23,14)", #Slot 5 gets SLUT1 "cmd.PFP_LOADTABLE(21,24,15)", #Slot 6 gets SLUT2 "cmd.PFP_LOADTABLE(21,25,15)", #Slot 7 gets SLUT2 "cmd.PFP_LOADTABLE(21,26,16)", #Slot 8 gets MLUT0 "cmd.PFP_LOADTABLE(21,27,18)", #Slot 9 gets MLUT2 "cmd.PFP_LOADTABLE(21,28,16)", #Slot 10 gets MLUT0 "cmd.PFP_LOADTABLE(21,29,18)", #Slot 11 gets MLUT2 "cmd.PFP_SSR_ROUTE(1,0xc0)", #P1A survey APID 0xc0, on 64E 2M "cmd.PFP_SSR_ROUTE(0,0xc2)", #P1B survey APID 0xc2, off 32E 32M "cmd.PFP_SSR_ROUTE(0,0xc4)", #P1C survey APID 0xc4, off 4E 64M "cmd.PFP_SSR_ROUTE(0,0xc6)", #P1D survey APID 0xc6, off 32E 64M "cmd.PFP_SSR_ROUTE(1,0xc8)", #P2 survey APID 0xc8, on 32E 16D "cmd.PFP_SSR_ROUTE(1,0xca)", #P3 survey APID 0xca, on 16E 4D 16A "cmd.PFP_SSR_ROUTE(0,0xcc)", #P4A survey APID 0xcc, off 32E 32M 8D "cmd.PFP_SSR_ROUTE(0,0xcd)", #P4A burst APID 0xcd, off 32E 32M 8D "cmd.PFP_SSR_ROUTE(1,0xce)", #P4B survey APID 0xce, on 16E 16M 4D 16A /128s, "cmd.PFP_SSR_ROUTE(0,0xcf)", #P4B burst APID 0xce, off 16E 16M 4D 16A /4s, "cmd.PFP_SSR_ROUTE(0,0xd0)", #P4C survey APID 0xd0, off 32E 8M 4D 16A /256s, "cmd.PFP_SSR_ROUTE(0,0xd1)", #P4C burst APID 0xd1, off 32E 8M 4D 16A /4s, "cmd.PFP_SSR_ROUTE(0,0xd2)", #P4D survey APID 0xd2, off 32E 8M 4D 16A /16s, "cmd.PFP_SSR_ROUTE(0,0xd3)", #P4D burst APID 0xd3, off 32E 8M 16A /4s, "cmd.PFP_SSR_ROUTE(0,0xd4)", #P4E survey APID 0xd4, off 2M 4D 16A /8s, "cmd.PFP_SSR_ROUTE(1,0xd6)", #Events survey APID 0xd6, on "cmd.PFP_SSR_ROUTE(0,0xd7)", #Fst HKP survey APID 0xd7, off "cmd.PFP_SSR_ROUTE(1,0xd8)", #Rates1 survey APID 0xd8, on 12R "cmd.PFP_SSR_ROUTE(1,0xd9)", #Rates2 survey APID 0xd9, on 12R 64E "cmd.PFP_SSR_ROUTE(1,0xda)", #Rates3 survey APID 0xda, on 1R 64E "cmd.PFP_SSR_ROUTE(1,0xdb)", #MassHist survey APID 0xdb, on 1024M # Load sluts 0..6 and MLUTS 0..2 - the ones that do not interfere with the # currently set lut. "cmd.STA_SSCTL(MLUT=3,SLUT=7)", "cmd.PFP_RTSWAIT(32)", # sluts "cmd.PFP_STALDLUT(0)", # chksum = 0 "cmd.PFP_RTSWAIT(32)", # FIXME: Are these waits necessary? FIXME#2: What's # a good timing value?
STATIC RTS STATIC RTS "cmd.PFP_STALDLUT(1)", # chksum = 0x80 "cmd.PFP_RTSWAIT(32)", "cmd.PFP_STALDLUT(2)", # chksum = 0x30 "cmd.PFP_STALDLUT(3)", # chksum = "cmd.PFP_STALDLUT(4)", # chksum = "cmd.PFP_STALDLUT(5)", # chksum = "cmd.PFP_STALDLUT(6)", # chksum = # mluts "cmd.PFP_STALDLUT(8)", # chksum = 0x0 "cmd.PFP_RTSWAIT(48)", "cmd.PFP_STALDLUT(9)", # chksum = 0x0 "cmd.PFP_STALDLUT(10)", # chksum = 0x8c # and switch to default LUTs "cmd.STA_SSCTL(MLUT=0,SLUT=0)", # and lot the other two highest LUTs "cmd.PFP_STALDLUT(7)", "cmd.PFP_STALDLUT(11)", # anode bin borders "cmd.STA_ABIN0STOPReg(UPLIMIT=0x93, LOWLIMIT=0x8c)", "cmd.STA_ABIN0STARTReg(UPLIMIT=0x93, LOWLIMIT=0x8c)", "cmd.STA_ABIN1STOPReg(UPLIMIT=0x81, LOWLIMIT=0x7a)", "cmd.STA_ABIN1STARTReg(UPLIMIT=0x81, LOWLIMIT=0x7a)", "cmd.STA_ABIN2STOPReg(UPLIMIT=0x6e, LOWLIMIT=0x67)", "cmd.STA_ABIN2STARTReg(UPLIMIT=0x6e, LOWLIMIT=0x67)", "cmd.STA_ABIN3STOPReg(UPLIMIT=0x5a, LOWLIMIT=0x53)", "cmd.STA_ABIN3STARTReg(UPLIMIT=0x5b, LOWLIMIT=0x54)", "cmd.STA_ABIN4STOPReg(UPLIMIT=0x48, LOWLIMIT=0x41)", "cmd.STA_ABIN4STARTReg(UPLIMIT=0x49, LOWLIMIT=0x42)", "cmd.STA_ABIN5STOPReg(UPLIMIT=0x35, LOWLIMIT=0x2e)", "cmd.STA_ABIN5STARTReg(UPLIMIT=0x38, LOWLIMIT=0x31)", "cmd.STA_ABIN6STOPReg(UPLIMIT=0x22, LOWLIMIT=0x1b)", "cmd.STA_ABIN6STARTReg(UPLIMIT=0x24, LOWLIMIT=0x1d)", "cmd.STA_ABIN7STOPReg(UPLIMIT=0x0f, LOWLIMIT=0x08)", "cmd.STA_ABIN7STARTReg(UPLIMIT=0x12, LOWLIMIT=0x0b)", "cmd.STA_ABIN8STOPReg(UPLIMIT=0x10, LOWLIMIT=0x09)", "cmd.STA_ABIN8STARTReg(UPLIMIT=0x0c, LOWLIMIT=0x05)", "cmd.STA_ABIN9STOPReg(UPLIMIT=0x22, LOWLIMIT=0x1b)", "cmd.STA_ABIN9STARTReg(UPLIMIT=0x23, LOWLIMIT=0x1b)", "cmd.STA_ABIN10STOPReg(UPLIMIT=0x35, LOWLIMIT=0x2e)", "cmd.STA_ABIN10STARTReg(UPLIMIT=0x32, LOWLIMIT=0x2b)", "cmd.STA_ABIN11STOPReg(UPLIMIT=0x48, LOWLIMIT=0x41)", "cmd.STA_ABIN11STARTReg(UPLIMIT=0x43, LOWLIMIT=0x3c)", "cmd.STA_ABIN12STOPReg(UPLIMIT=0x5b, LOWLIMIT=0x54)", "cmd.STA_ABIN12STARTReg(UPLIMIT=0x57, LOWLIMIT=0x50)", "cmd.STA_ABIN13STOPReg(UPLIMIT=0x6e, LOWLIMIT=0x67)", "cmd.STA_ABIN13STARTReg(UPLIMIT=0x69, LOWLIMIT=0x62)", "cmd.STA_ABIN14STOPReg(UPLIMIT=0x80, LOWLIMIT=0x79)", "cmd.STA_ABIN14STARTReg(UPLIMIT=0x7b, LOWLIMIT=0x74)", "cmd.STA_ABIN15STOPReg(UPLIMIT=0x93, LOWLIMIT=0x8c)", "cmd.STA_ABIN15STARTReg(UPLIMIT=0x8d, LOWLIMIT=0x86)",
STATIC RTS STATIC RTS # mass bias values "cmd.STA_MBIAS0(MBIASA1=0x00, MBIASA0=0x00)", "cmd.STA_MBIAS1(MBIASA3=0x00, MBIASA2=0x00)", "cmd.STA_MBIAS2(MBIASA5=0x00, MBIASA4=0x00)", "cmd.STA_MBIAS3(MBIASA7=0x00, MBIASA6=0x00)", "cmd.STA_MBIAS4(MBIASA9=0x00, MBIASA8=0x00)", "cmd.STA_MBIAS5(MBIASA11=0x00, MBIASA10=0x00)", "cmd.STA_MBIAS6(MBIASA13=0x00, MBIASA12=0x00)", "cmd.STA_MBIAS7(MBIASA15=0x00, MBIASA14=0x00)", # Turn on all the packets once table loads are complete "cmd.STA_STMODE(LUTCHKSUM=1,HSKPG=1,RAWEVENTS=1,RATES=1,P4=1,P3=1,P2=1,P1=1,MASSHISTO=1,FASTRATES=0)", "cmd.PFP_RTSWAIT(64)", # wait 16 sec # Enable resets due to no data packets or bad checksums after sensor is initialized, # Need to change the "0" in these table loads to appropriate values "cmd.PFP_LOADTABLE(21,30,0)", #CSMLIM "cmd.PFP_LOADTABLE(21,31,0)", #CSMCTR "cmd.PFP_LOADTABLE(21,32,0)", #RTSLMT "cmd.PFP_LOADTABLE(21,33,0)", #RTSCTR # Turn on test pulser for 32 seconds then turn TP off "cmd.PFP_LOADTABLE(21,17,0x00)", #MassHist survey APID 0xdb, 4s CCxxSNNN=00xx0000 "cmd.STA_TPSTARTDAC(VALUE=0x8000)", "cmd.STA_TPSTOPDAC(VALUE=0x8000)", "cmd.STA_TPFREQ(DIVIDER=0x0200)", "cmd.STA_TPMODE(VDELAY=1,VFREQ=0,DELAYSET=1,DELAYMODE=0,SLOW=0,ENABLE=1)", "cmd.PFP_STAEVENTS(1)", # FILL THE EVENTS BUFFER "cmd.PFP_RTSWAIT(128)", # wait 32 sec "cmd.STA_TPMODE(VDELAY=0,VFREQ=0,DELAYSET=1,DELAYMODE=0,SLOW=0,ENABLE=1)", "cmd.STA_TPMODE(VDELAY=0,VFREQ=0,DELAYSET=0,DELAYMODE=0,SLOW=0,ENABLE=0)", "cmd.STA_TPFREQ(DIVIDER=0xffff)", "cmd.STA_TPSTARTDAC(VALUE=0x0000)", "cmd.STA_TPSTOPDAC(VALUE=0x0000)", "cmd.PFP_RTSWAIT(32)", # wait 8 sec "cmd.PFP_LOADTABLE(21,17,0x0C)", # MassHist survey APID 0xdb, 64s CCxxSNNN=00xx1100 # Begin Ramping MCP, RAW & ACCEL # FIXME: Check whether this command is the right one "cmd.PFP_ARM(8)", "cmd.PFP_RTSENA(14)", "cmd.RTSEND()"
STATIC RTS STATIC RTS #STAHVOFF (RTS8) #STAHVON (RTS 14) RTS=[ RTS=[ "cmd.PFP_RTSSTOP(14)", # Stop HVON RTS # disable HV bit should switch off all HVs "cmd.STA_STACCTL(ENBSWEEP=0, SDDIAG=0, FLOPEN=0, FLRELAYADDR=0, SETIOJ1P34=0, HVENBALLOW=0)", # Make sure all DACs are zero "cmd.STA_ACCELDAC(VALUE=0x0000)", "cmd.STA_MCPDAC(VALUE=0x0000)", "cmd.STA_CTLHVRAW(VALUE=0x0000)", "cmd.STA_A1DACDIAG(VALUE=0x0000)", "cmd.STA_A2DACDIAG(VALUE=0x0000)", "cmd.STA_DUDACDIAG(VALUE=0x0000)", "cmd.STA_DDDACDIAG(VALUE=0x0000)", "cmd.STA_ATDACDIAG(VALUE=0x0000)", "cmd.RTSEND()", # RTS END command ] #STAHVON (RTS 14) RTS=[ "cmd.PFP_RTSSTOP(8)", # Stop HVOFF RTS # from hv_enable "cmd.STA_STACCTL(ENBSWEEP=1, SDDIAG=0, FLOPEN=0, FLRELAYADDR=0, SETIOJ1P34=0, HVENBALLOW=1)", "cmd.PFP_RTSWAIT(DELAY=8)", # "cmd.STA_HVENBK0(KEY=0xkey)", # run the keys separately by hand "cmd.PFP_RTSWAIT(DELAY=4)", # "cmd.STA_HVENBK1(KEY=0xkey)", # run the keys separately by hand "cmd.STA_AOFFSETDAC(VALUE=0x8060)", "cmd.STA_DUOFFSETDAC(VALUE=0x8040)", "cmd.STA_DDOFFSETDAC(VALUE=0x7e80)", "cmd.PFP_TMPKTRATE(0xa,0.128)", #HKP rate for apid 2A # ramp up high voltages to their full, nominal voltages "cmd.STA_SWHSKCH(CHANNEL=20,DWELLMODE=0)", "cmd.PFP_STACNTRAMP(0xed85)", # sta_hv_raw_nom value "cmd.PFP_RTSWAIT(240)", # 0xee=238 (+2) "cmd.STA_SWHSKCH(CHANNEL=18,DWELLMODE=0)", "cmd.PFP_STAMCPRAMP(0xb800)", # sta_hv_mcp_nom_fm value "cmd.PFP_RTSWAIT(186)", "cmd.STA_SWHSKCH(CHANNEL=16,DWELLMODE=0)", "cmd.PFP_STAACCRAMP(0xffff)", # full range/sta_hv_acc_15kV "cmd.PFP_RTSWAIT(258)", "cmd.STA_SWHSKCH(CHANNEL=0,DWELLMODE=0)", "cmd.PFP_TMPKTRATE(0xa,8)", # HKP rate for apid 2A "cmd.PFP_STAEVENTS(1)", # FILL THE EVENTS BUFFER "cmd.RTSEND()" ]
STATIC Housekeeping APID 2A
STATIC Housekeeping APID 2A
STATIC Housekeeping APID 2A
STATIC Table 21 Table 21
STATIC LM STATIC Limit Monitors
STATIC FP STAT Mgr() Decodes STATIC messages Resets Timer(9) when HSK message found. Resets its timer when STATIC is off. IsSTATHVOn() If STATIC Off, HV is off. If any HV > 100V, then HV is ON. IsSTATAllowed() If Zone Alert[5]=1 then No. If User Enable[3]=0, then No.
STATIC FP ManSTATHV() If STATIC is off, HV is off so exit. If HV is ON but not allowed, this routine starts RTS[8], STATIC HV Off. If HV is OFF but allowed, this routine starts RTS(14), STATIC HV On ManSTATPower() If no HSK coming out, then turn STATIC off. If HV not complying, then turn STATIC off.
STATIC FP STATIC Fault Protection #STAHVOFF (RTS 8) RTS=[ "cmd.PFP_RTSSTOP(14)", # Stop HVON RTS # disable HV bit should switch off all HVs "cmd.STA_STACCTL(ENBSWEEP=0, SDDIAG=0, FLOPEN=0, FLRELAYADDR=0, SETIOJ1P34=0, HVENBALLOW=0)", # Make sure all DACs are zero "cmd.STA_ACCELDAC(VALUE=0x0000)", "cmd.STA_MCPDAC(VALUE=0x0000)", "cmd.STA_CTLHVRAW(VALUE=0x0000)", "cmd.STA_A1DACDIAG(VALUE=0x0000)", "cmd.STA_A2DACDIAG(VALUE=0x0000)", "cmd.STA_DUDACDIAG(VALUE=0x0000)", "cmd.STA_DDDACDIAG(VALUE=0x0000)", "cmd.STA_ATDACDIAG(VALUE=0x0000)", "cmd.RTSEND()", # RTS END command ]
STATIC FP STATIC Fault Protection #STAHVOFF (RTS 14) RTS=[ "cmd.PFP_RTSSTOP(8)", # Stop HVOFF RTS # from hv_enable "cmd.STA_STACCTL(ENBSWEEP=1, SDDIAG=0, FLOPEN=0, FLRELAYADDR=0, SETIOJ1P34=0, HVENBALLOW=1)", "cmd.PFP_RTSWAIT(DELAY=8)", # "cmd.STA_HVENBK0(KEY=0xkey)", # run the keys separately by hand "cmd.PFP_RTSWAIT(DELAY=4)", # "cmd.STA_HVENBK1(KEY=0xkey)", # run the keys separately by hand "cmd.STA_AOFFSETDAC(VALUE=0x8060)", "cmd.STA_DUOFFSETDAC(VALUE=0x8040)", "cmd.STA_DDOFFSETDAC(VALUE=0x7e80)", "cmd.PFP_TMPKTRATE(0xa,0.128)", #HKP rate for apid 2A # ramp up high voltages to their full, nominal voltages "cmd.STA_SWHSKCH(CHANNEL=20,DWELLMODE=0)", "cmd.PFP_STACNTRAMP(0xed85)", # sta_hv_raw_nom value "cmd.PFP_RTSWAIT(240)", # 0xee=238 (+2) "cmd.STA_SWHSKCH(CHANNEL=18,DWELLMODE=0)", "cmd.PFP_STAMCPRAMP(0xb800)", # sta_hv_mcp_nom_fm value "cmd.PFP_RTSWAIT(186)", "cmd.STA_SWHSKCH(CHANNEL=16,DWELLMODE=0)", "cmd.PFP_STAACCRAMP(0xffff)", # full range/sta_hv_acc_15kV "cmd.PFP_RTSWAIT(258)", "cmd.STA_SWHSKCH(CHANNEL=0,DWELLMODE=0)", "cmd.PFP_TMPKTRATE(0xa,8)", # HKP rate for apid 2A "cmd.PFP_STAEVENTS(1)", # FILL THE EVENTS BUFFER "cmd.RTSEND()" ]
STATIC FP STATIC Fault Protection