440 likes | 629 Views
ISUAL Instrument Software. Steve Geller UCB. Topics Presented. Software Functions SOH Telemetry Command Processing Science Telemetry Operational Modes Software Tasks. terminology. AEP - Associated Electronics Package DCM - Data Compression Module PVCF - Pseudo Virtual Channel Frame
E N D
ISUAL Instrument Software Steve Geller UCB ISUAL CDR - Instrument Software
Topics Presented • Software Functions • SOH Telemetry • Command Processing • Science Telemetry • Operational Modes • Software Tasks ISUAL CDR - Instrument Software
terminology • AEP - Associated Electronics Package • DCM - Data Compression Module • PVCF - Pseudo Virtual Channel Frame • transmission unit for sending science packets to the ground • SOH - Status of Health • Housekeeping data ISUAL CDR - Instrument Software
Instrument Software Functions • Receive and execute Commands • Generate Status telemetry (SOH) • Instrument Control and Readout • Management of Readout Data • Pass data to DCM for compression • Generate science telemetry packets • Make packets into PVCFs; store in spacecraft buffer. • Transfer PVCF data to Satellite ISUAL CDR - Instrument Software
DPU processor • 8085 processor • Programmed in assembly Language • Some code is heritage from IMAGE/FUV • Instrument control software developed by UCB ISUAL CDR - Instrument Software
SOH Telemetry • Command Echoes and other real-time status is sent out the Command Status channel • Some of the short status packets may be directed to: • SOH channel • Science telemetry channel • Both • Neither ISUAL CDR - Instrument Software
Analog Monitors Packet ISUAL CDR - Instrument Software
Digital Housekeeping Packet ISUAL CDR - Instrument Software
Command Processing • Commands are received from the satellite as CCSDS command packets. • Commands may be received at any time. • Some commands are executed immediately • Most commands have a Time Tag for later execution ISUAL CDR - Instrument Software
Command Packet Definition • Document 8564-X7 defines command packets ISUAL CDR - Instrument Software
Time-Tagged Commands • Stored in Time-Tagged List in DPU memory • Instrument software “background loop” continuously checks command times against current UT • After execution, time-tagged are erased from memory. ISUAL CDR - Instrument Software
Command Groups • Commands may be assigned a group number, and stored in the Time-Tagged List • A single command will cause all commands in a group to be executed • Group commands use the time-tag for order. ISUAL CDR - Instrument Software
Group Command Procedures • Group commands are not erased after execution; the group may be used again and again to execute common procedures. • Groups may be erased or replaced by specific commands. ISUAL CDR - Instrument Software
Example Command Procedure • ; Clear Statistics and Faults • /I_CLEAR_STATS • /I_CLEAR_FAULTS • ; Patch in readout buffer sizes • /I_PATCH4 BANK=0 ADDR=CAM_RO_NBYTES DATA=X'00705566' • /I_PATCH4 BANK=0 ADDR=SPH_RO_NBYTES DATA=X'00705566' • /I_PATCH4 BANK=0 ADDR=APH_RO_NBYTES DATA=X'00705566' • ; Patch in relative number of MMCBs per event • /I_PATCH2 BANK=0 ADDR=N_CAM_MMCBS DATA=X'0070' • /I_PATCH2 BANK=0 ADDR=N_SPH_MMCBS DATA=X'0070' • /I_PATCH2 BANK=0 ADDR=N_APH_MMCBS DATA=X'0070' ISUAL CDR - Instrument Software
Example Command Procedure • ;Set Filter • /I_FILTER_SET ID=1 • ;Setup Camera • /I_SPRITE_SETUP ID=NFRAMES VAL=123 • /I_SPRITE_SETUP ID=EXPOSURE VAL=123 • /I_SPRITE_SETUP ID=INTERVAL VAL=123 • /I_SPRITE_SETUP ID=NPOST VAL=123 • ;Setup SPH and APH too ... ISUAL CDR - Instrument Software
Example Command Procedure • ;Turn on Mass Memory power • /I_MM_ON ; Turn on Mass Memory • /I_DELAY SECONDS=1 ; wait an extra second • ;Allocate Mass Memory Control Blocks • /I_MMCB_FORMAT ; format the MMCBs and readouts • /I_DELAY SECONDS=1 • ;Allocate TM area • ;for building packets, PVCFs and 64 Megabit "files". • /I_TM_FORMAT ; format the PCVF buffers; start TM ISUAL CDR - Instrument Software
Example Command Procedure • ;Turn on DCM • /I_DCM_ON • ;DCM shows "busy" until it completes its internal checks • /I_DELAY SECONDS=5 • ; It's not convenient to check ground telemetry • ; when running a time-tagged procedure, • ; so we test the telemetry within the DPU's SOH array • /I_VERIFY_SOH_BYTE OFFSET=DCM_Status MIN=2 MAX=2 • ; This "SCIENCE" Proc is executed as part of a command group. • ; If test fails, remainder of command group is ignored • ; and a Spacecraft Alert packet is generated. ISUAL CDR - Instrument Software
Example Command Procedure • ;Copy DSP program from EEPROM to MM • /I_DCM_PLB PLB=1 ; Copy PLB from EEPROM to MM • ;Issue CDI commands • /I_DCM_XMT OP= DATA= • ;tell DCM where in MM it can get its initial MMCB and DSP program • /I_DCM_START • /I_DELAY SECONDS=2 • /I_VERIFY_SOH_BYTE OFFSET=DCM_Status MIN=1 MAX=1 ISUAL CDR - Instrument Software
Example Command Procedure • ;Turn on HV and other Science Power services • /I_PWR_ON SERVICE=1 • /I_PWR_ON SERVICE=2 • /I_PWR_ON SERVICE=3 • /I_PWR_ON SERVICE=4 • ;Set mode; Start science data taking • /I_SPRITE_CONT ; continuous mode • ; Verify that Continuous Mode got started • /I_DELAY=5 • /I_VERIFY_SOH_BYTE OFFSET=10 MIN=2 MAX=2 ISUAL CDR - Instrument Software
Data Compression • All compression is done by the DCM • DPU allocates Mass Memory and supplies work for the DCM ISUAL CDR - Instrument Software
Telemetry Generation • Telemetry products are generated as CCSDS source packets • Packets are broken up into PVCFs and accumulated in memory until a 64 megabit Block is filled • Block is transferred to spacecraft as a series of PVCF transmissions ISUAL CDR - Instrument Software
Science Data Flow ---Instruments--- --Mass memory--------------- --Telemetry-- Sprite Event Raw readout Camera frames Spectrometer sample arrays Compressed Data Science Products ISUAL CDR - Instrument Software
Operational Modes • Standby • Data-Taking • Sprite Continuous/Burst • Aurora • Dayside Data Processing ISUAL CDR - Instrument Software
Standby Mode • No Science Data taken • All science power services off • Command processing active • Status (SOH) telemetry generated • Mass Memory and DCM may or may not be turned on. ISUAL CDR - Instrument Software
Power-On Status • At ISUAL Power-on,status is Standby Mode, plus... • Mass Memory is off, DCM is off • Time-tagged command list is empty • PVCF storage is empty ISUAL CDR - Instrument Software
Data-Taking Mode : Aurora • Camera takes fixed-exposure at regular intervals; various filters set • Photometer Data sampled at regular intervals and averaged ISUAL CDR - Instrument Software
Data-Taking Mode : Sprite • Data taking synchronized with a Sprite Event. DPU gets an interrupt and notes the time. • When a camera readout is complete, DPU stamps the time and passes the data on for compression and science telemetry. • Same for Photometers. ISUAL CDR - Instrument Software
Dayside Data Processing • No Data Taking • Data Compression from accumulated nightside raw data • Telemetry Generation. • Command Processing Note: at any time, a SAFE command will shut off all HV and switch to Standby Mode. ISUAL CDR - Instrument Software
Software Tasks • A task is an independent code thread with its own stack. • A task which is waiting for something will execute ‘call task'; this transfers control to the next task in a list of tasks. ISUAL CDR - Instrument Software
Non-Preemptive multi-tasking • ISUAL Flight Software uses a non-preemptive multi-tasking system. A task switch happens only when a task executes a 'call task'. • Interrupt service routines do not change the current task, but an interrupt service routine may change the state of something which will cause the current task to do a 'call task'. ISUAL CDR - Instrument Software
Tasks in ISUAL • Background loop • SOH task - Generates housekeeping • Supply task - recycles readout memory • DCM task - manages compression • TM task - telemetry Packet Generator • SC task - send PVCFs to Spacecraft ISUAL CDR - Instrument Software
Background Loop Task • Command Processing • Receive Commands • Execute commands from time-tagged list ISUAL CDR - Instrument Software
SOH Task • Generate Event Log packets • Generate Echo packets • Read Analog Monitors • Generate Analog Monitor and Digital Housekeeping packets ISUAL CDR - Instrument Software
Supply Task • If an instrument readout is complete: • Mark the MMCB “ready for compression” • Put MMCB on DCM queue • Get another MMCB for that instrument • Command a new readout address ISUAL CDR - Instrument Software
Supply Task ISUAL CDR - Instrument Software
DCM Task • Get up to 16 MMCBs from DCM queue • Store in Mass Memory • Signal DCM to do compression • After compression, move MMCBs to TLM queue ISUAL CDR - Instrument Software
TM task • Wait for MMCB on TM queue • Generate Header Packet • Generate multiple data packets • Release MMCB to supply queue appropriate to instrument ISUAL CDR - Instrument Software
TM Task ISUAL CDR - Instrument Software
SC Task • Wait for SC buffer to fill • Send MBR message to spacecraft • Wait for reply command • Send PVCFs ISUAL CDR - Instrument Software