; FILE: vc2_obs.ips ; PURPOSE: To downlink the stored magnetograms and LOI circular buffer data ; and to make a Hi Res magnetogram and downlink it if there is no ; stored data products to downlink ; METHOD: ; Call MAG_DL_SETUP.IPS routine to get the page numbers to downlink and ; how much to downlink. See MAG_DL_SETUP.IPS for the table showing which ; items are downlinked on which minutes. The items returned by MAG_DL_SETUP ; are: ; $IPRL_MAG_DLPAGES- the two pages to downlink ; $IPRL_MAG_DLPAGES = 0xA000 to indicate "No Mag Page" Condition ; $IPRL_MAG_DLPAGES+1 = 0xFFFF if only 1 page is to be downlinked ; $IPRL_MAG_PGLEN1 - the number of words in page 1 (TEMPORARY WORKAROUND) ; $IPRL_MAG_PGLEN2 - the number of words in page 2 (TEMPORARY WORKAROUND) ; NOTES: ; At Frame 5 - Downlink the circular queue dataproduct (minutes 1 or 2) ; At Frame 9 - Downlink the IPREG set if (a) not two pages of downlink (so basically if it is ; minute 3,4,5 or 6) AND (b) there are magnetograms (othewise it is doing the ; observable creation) ; At Frame 10 - Downlink (a) the stored magnetogram, (b) 30 sec Velocity if in minute 1 or 2, ; or (c) the observable created by this routine ; HISTORY: ; Written 3-Nov-95 by M.Morrison ; 6-Nov-95 (MDM) - Modified to have the "OBS" downlink the IP Registers ; at frame 8 instead of frame 10 ; 7-Nov-95 (MDM) - Modified to have the frame list have 10 frames ; - Do "OBS" downlink of the IP registers at frame 10 ; - Do START1HR of circular buffer data at frame 5 ; - Do START1HR of stored mag or V at frame 10 ; 7-Nov-95 (MDM) - Patch a conditional (where to look for FFFF) ; - Patch to set the compression ; 16-Nov-95 (MDM) - Placed calls to the newly revised DUMP_IPREG ; subroutine (which now uses DOWNLINK) ; - Changed to have "obs" ipreg dump done on frame 10 ; (not frame 8). ; - Fixed a bug which was causing extraneous data products ; ($IPRL_MAG_DLPAGES reference should have been +1) ; 21-Nov-95 (MDM) - Added END statements after frame 5 and frame 9 work ; 11-Dec-95 (MDM) - Modified to not corrupt the Cir-buffer header ; information (DO_HDECODE copies the DPC and N/K ; info for a two parameter call (assumes that it ; was source/destination pair) ; 18-Jul-96 (MDM) - Modified to call a new HR mag program ; (call hr_m1_ipreg instead of hr_mag) ; QPROG_VC2_OBS:: BRANCHEQ R3072 1 &FRM01 BRANCHEQ $IPRL_MAG_DLPAGES 0xA000 &DO_OBS ;no stored data to downlink BRANCHEQ R3072 5 &FRM05 ;issue the downlink commands for circular queue stored stuff (optionally) BRANCHEQ R3072 9 &FRM09 ;issue the downlink of the IP Register set (optionally) BRANCHEQ R3072 10 &FRM10 ;issue the downlink commands for main stored stuff END FRM01: CALLQUE $QSR_MAG_STORD_PG ;find out if there is stored data to downlink BRANCHEQ $IPRL_MAG_DLPAGES 0xA000 &DO_OBS ;no stored data to downlink SETREG $IPRL_HDECODE_PARAM+1 0x8000 ;give it a legitimate page number just to write some junk COPYREG $IPRL_MAG_DLPAGES $IPRL_HDECODE_PARAM ;temporarily needed to be able to store the # of words CALLQUE $QSR_DO_HDECODE SETUP_PAGE1: COPYRI2D $IPRP_HDECODE_ADDR $IPRL_HEAD_WORK 10 ;copy the register list to a fixed working area COPYREG $IPRL_MAG_PGLEN1 $IPRL_HEAD_WORK+8 ;set the length COPYREG $IPRL_MAG_PGLEN1+1 $IPRL_HEAD_WORK+9 ;set the length SETREG $IPRL_HEAD_WORK+3 0xE5 ;set the compression COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR 10 ;copy the register list back to the slot BRANCHEQ $IPRL_MAG_DLPAGES+1 0xFFFF &SETUP_DONE ;only one page of stored data to downlink SETUP_PAGE2: COPYREG $IPRL_MAG_DLPAGES+1 $IPRL_HDECODE_PARAM ;temporarily needed to be able to store the # of words CALLQUE $QSR_DO_HDECODE COPYRI2D $IPRP_HDECODE_ADDR $IPRL_HEAD_WORK 10 ;copy the register list to a fixed working area COPYREG $IPRL_MAG_PGLEN2 $IPRL_HEAD_WORK+8 ;set the length COPYREG $IPRL_MAG_PGLEN2+1 $IPRL_HEAD_WORK+9 ;set the length COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR 10 ;copy the register list back to the slot SETUP_DONE: END FRM05: BRANCHEQ $IPRL_MAG_DLPAGES+1 0xFFFF &DONE ;if there is only one page to downlink, then exit COPYREG $IPRL_MAG_DLPAGES+1 $IPRL_DL_PARAM ;otherwise downlink that page CALLQUE $QSR_DL_1PAGE END FRM09: BRANCHNE $IPRL_MAG_DLPAGES+1 0xFFFF &DONE ;if there are 2 pages to downlink, then don't D/L the IP Regs CALLQUE $QSR_DUMP_IPREG END FRM10: COPYREG $IPRL_MAG_DLPAGES $IPRL_DL_PARAM CALLQUE $QSR_DL_1PAGE END ;------------------------------------------------------------------------------------------------- DO_OBS: ;make the HR Magnetogram observable GOTO $QPROG_HR_M1_IPREG DONE: END