# File: prog_hr_mag_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "prog_hr_mag_v01.ips"
descr "Loads IP queue instructions"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#; FILE:    prog_hr_mag.ips
#; PURPOSE: Make a high resolution magnetogram from a 30 sec obser
#; METHOD:
#; HISTORY: Written 15-Jan-96 by M.Morrison
#;	   18-Jan-96 (MDM) - Modified to work with 10 frame squenence
#;	   		   - Changed the DPCs
#
#QPROG_HR_MAG::
#
#INCOMING_IMG:
#    BRANCHEQ R3072  8 &FRM8
tcblock mbipcmd 0x0091 0x17BF   0x01AE 0x0C00 0x0008 0x17C8 
#    BRANCHEQ R3072  9 &FRM9
tcblock mbipcmd 0x0091 0x17C3   0x01AE 0x0C00 0x0009 0x17DA 
#    END
tcblock mbipcmd 0x0091 0x17C7   0x01FC 
#
#FRM8:
#    ;---- Make RCP velocity
#    SETREGS $IPRL_VEL_PARAM 12 1:0x00514  4:0x00514  5:0x00726  4
tcblock mbipcmd 0x0091 0x17C8   0x01B2 0x11B5 0x000C 0x0514 \
                                0x0800 0x0514 0x2000 0x0726 \
                                0x2800 0x0004 0x007F 0x0001 \
                                0x00E5 0x4A42 0x2000 
#    CALLQUE $QSR_MK_VEL
tcblock mbipcmd 0x0091 0x17D7   0x01F8 0x1751 
#    END
tcblock mbipcmd 0x0091 0x17D9   0x01FC 
#
#FRM9:
#    ;---- Make LCP velocity
#    SETREGS $IPRL_VEL_PARAM 12 0:0x00514  6:0x00514  4:0x00726  4
tcblock mbipcmd 0x0091 0x17DA   0x01B2 0x11B5 0x000C 0x0514 \
                                0x0000 0x0514 0x3000 0x0726 \
                                0x2000 0x0004 0x007F 0x0001 \
                                0x00E5 0x4A41 0x2000 
#    CALLQUE $QSR_MK_VEL
tcblock mbipcmd 0x0091 0x17E9   0x01F8 0x1751 
#
#    ;---- Subtract two velocities to make the mag
#    SETREGS $IPRL_MAG_PARAM    6  5:0x00726  6:0x00726  4:0x00726
tcblock mbipcmd 0x0091 0x17EB   0x01B2 0x1278 0x0006 0x0726 \
                                0x2800 0x0726 0x3000 0x0726 \
                                0x2000 
#    SETREGS $IPRL_MAG_PARAM+6  5  0x100000L  1  0xFFFF  12
tcblock mbipcmd 0x0091 0x17F4   0x01B2 0x127E 0x0005 0x0000 \
                                0x0010 0x0001 0xFFFF 0x000C 
#    SETREGS $IPRL_MAG_PARAM+11 3  0xe4 0x4b00 0x2000
tcblock mbipcmd 0x0091 0x17FC   0x01B2 0x1283 0x0003 0x00E4 \
                                0x4B00 0x2000 
#    CALLQUE $QSR_MK_MAG
tcblock mbipcmd 0x0091 0x1802   0x01F8 0x1786 
#
#    ;---- Downlink the magnetogram
#    SETREG  $IPRL_DL_PARAM 0x2000		;setup to downlink the mag
tcblock mbipcmd 0x0091 0x1804   0x0140 0x11D0 0x2000 
#    CALLQUE $QSR_DL_1PAGE
tcblock mbipcmd 0x0091 0x1807   0x01F8 0x10D6 
#
#END
tcblock mbipcmd 0x0091 0x1809   0x01FC 
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
