##########################                                            ##-#
#                                                                     ##-#
# Assembled by checkpoint, 1.18.2 (23-Sep-99).                        ##-#
# (EDIT THE ORIGINAL SOURCE, NOT THIS FILE!)                          ##-#
# Date-assembled: Fri May 11 11:37:41 EDT 2001                        ##-#
# Orig-source: /mdisw/cfl/flight/src/p30v_hr_ve_v01.src               ##-#
#                                                                     ##-#
##########################                                            ##-#
# File: p30v_hr_ve_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/q_p30v_hr_ve_v01.src"
descr "Loads IP queue instructions"
                                                                      ##-#
#=#=#=#=#=#=#=#=#=#=# src ln 20.  (Open Log file)                     ##-#
if !GS9 = "" then                                                     ##-#
  display "Opening logfile from q_p30v_hr_ve_v01"                     ##-#
  perf openlog                                                        ##-#
end if                                                                ##-#
write !GS9 "%s q_p30v_hr_ve_v01:" !TIME                               ##-#
writen !GS9 "Starting..."                                             ##-#
#=#=#=#=#=#=#=#=#=#=#+ src ln 20.  Block 0  Next line is #23          ##-#
 display "Running block 0 of q_p30v_hr_ve_v01."                       ##-#
set !LI0 = getint(mktccnt)                                            ##-#
queue on ## Queue next 9 commands.                                    ##-#
#=======================================================
#
#
#; FILE:    p30v_hr_ve.ips
#; PURPOSE: Grab the prime30 velocity and also make a high resolut
#;	   dopplergram.  Send the full cropped P30 velocity and a
#;	   extracted portion of the dopplergram
#; HISTORY: 
#;       Written 22-Jul-96 by M.Morrison
#;	23-Jul-96 (MDM) - Changed extract size to 600 (from 800)
#
#QPROG_P30V_HR_VE::
#
#    CALLQUE $QSR_STORE_P30V					;store/move the prime30 velocity
tcblock mbipmacl 0x1B76    0x01F8 0x1898 
#
#    CALLQUE  $QSR_HR_VLC30                                      ;
tcblock mbipmacl 0x1B78    0x01F8 0x1747 
#    BRANCHLT R3072 10 &DONE                                     ;
tcblock mbipmacl 0x1B7A    0x01B8 0x0C00 0x000A 0x1B91 
#
#    COPYRD2D $IPRL_CROP_RAD504 $IPRL_CROP_PARAM+4 5
tcblock mbipmacl 0x1B7E    0x0144 0x147D 0x146E 0x0005 
#    CALLQUE  $QSR_STD_CFMT_PVEL					;---- Crop the velocity
tcblock mbipmacl 0x1B82    0x01F8 0x183C 
#
#    COPYRD2D $IPRL_EXTRACT_60K $IPRL_EXTRACT_PARAM 6            ;
tcblock mbipmacl 0x1B84    0x0144 0x1455 0x1173 0x0006 
#    CALLQUE  $QSR_STD_EFMT_VEL					;---- Extract the magnetogram 
tcblock mbipmacl 0x1B88    0x01F8 0x1842 
#
#    SETREGS  $IPRL_DL_PARAM 2 0x7800 0x6800                     ;
tcblock mbipmacl 0x1B8A    0x01B2 0x11D0 0x0002 0x7800 \
                                0x6800 
#    CALLQUE  $QSR_DL_2PAGE                                      ;
tcblock mbipmacl 0x1B8F    0x01F8 0x0DA5 
queue off ## Synchronize w/ POCC                                      ##-#
#
#DONE:
#    END
tcblock mbipmacl 0x1B91    0x01FC 
#=#=#=#=#=#=#=#=#=#=#- src ln 48.  Block 0   Cmds:10   Total:10       ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 10                                                  ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_p30v_hr_ve_v01:" !TIME                              ##-#
 writen !GS9  "CMD CT ERR in block 0. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 10 cmds; expected cmd ctr: %d)" !LI1       ##-#
 writen !GS9  "      Halted.  (restart at line 23)"                   ##-#
 display "ERR: q_p30v_hr_ve_v01 blk 0: cmd ctr isnt %d. (CONT 23)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_p30v_hr_ve_v01:" !TIME                              ##-#
 writen !GS9  "Override.  Continuing past block 0..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_p30v_hr_ve_v01:" !TIME                              ##-#
 writen !GS9  "Block 0 completed OK."                                 ##-#
display "Completed block 0 of q_p30v_hr_ve_v01."                      ##-#
end if                                                                ##-#
#################### END of BLOCK 0 ####################              ##-#
#=======================================================
#
write !GS9 "%s q_p30v_hr_ve_v01:" !TIME                               ##-#
writen !GS9 "returning from procedure 'q_p30v_hr_ve_v01'"             ##-#
return
#
#=======================================================
write !GS9 "%s q_p30v_hr_ve_v01:" !TIME                               ##-#
writen !GS9 "Falling off the bottom."                                 ##-#
