# 1 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
; wobble pulseprogram for spectrometers with digital receiver  -*-pulsprog-*-
; $Id: pp_drx,v 1.21 2016/07/21 11:43:31 chjo Exp $(C) 2015 Bruker Biospin GmbH;


# 13 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
;#define setrtp1|14|13 setrtp1|14
# 15 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
define list <frequency> freqList=<$FQ1LIST>

define delay		dwellTime
define loopcounter	wbstCmplx
define loopcounter      pointsForAveraging

"pointsForAveraging = l1"
"dwellTime = 2 * d1 * pointsForAveraging" ; for one point in wobble curve
"wbstCmplx = td/2"
# 26 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
# 26 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
	ze	
		
        ; use PL2 to be compatible with old wobble procedure
	10u pl2:f1

	10u setrtp1|14|13

        ; tell receiver not to acquire until next setrtp1^1
        1u setrtp1|1
# 36 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
    ;********
    ; next wobble curve

    1	200m freqList.res ;speed adjustment
	
 	1m adc ph0 syrec

	1u reset:f1
# 45 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
	; tell receiver to acquire WBST points 
	1u setrtp1|0 ; former DWELL_ENABLE

    ;--------------
    ; now acquire WBST points

    2   1u freqList(receive):f1
# 53 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
        ; note that at least 150u are required here 
        ; to avoid spikes after PLL change
        150u freqList:f1 

        ; send tune signal and acquire simultaneously
	10u setrtp1|26|27

	; now acquire a complex sample point
        1u setrtp1^1
# 63 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
        ; dwell time for one complex point
	; of the wobble curve
        dwellTime

        ; tell receiver not to acquire until next setrtp1^1
	1u setrtp1|1

	1u setrtp1^26^27
# 72 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
	1u freqList.inc

	lo to 2 times wbstCmplx 

    ;--------------
# 79 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
	rcyc=1
					
    ;********

	exit

# 87 "/root/.topspin-BladeEpu/local_acqu/wobbDir/pp_drx"
ph0 = 0
