# 1 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao"
;ph_zg
;avance-version (07/04/03)
;1D sequence with inverse gated decoupling
;zgig for use with parahydrogen polariser
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=


# 1 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/Avance.incl" 1
;Avance3.incl
;   for AV III
;
;avance-version (13/06/17)
;
;$CLASS=HighRes Incl
;$COMMENT=
# 169 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/Avance.incl"
;$Id: Avance3.incl,v 1.9.8.3 2013/08/30 09:44:49 ber Exp $
# 13 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao" 2

# 1 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl" 1
;Polariserv3.incl
;defines the commands to control the polariser V3
;version 20110905 JMT 05 september 2011 

# 29 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
;addittionel defines to use the old pulse pogramms with the 
;news polariser and the new definition


# 42 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
;News defines for the polariser V3

subroutine IPSO_CMD

subroutine MANUAL_CMD
subroutine INJECT_POLARISER
subroutine EJECT_POLARISER
subroutine INJECT_PROBE
subroutine EJECT_PROBE
subroutine BUBBLE_H2
subroutine STOP_EVEN
subroutine POLARISE
# 14 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao" 2


"d11=30m"
"d3=1s/(cnst2*2)"
# 19 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao"
"acqt0=-p1*2/3.1416"


# 1 "mc_line 22 file /opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao dc-measurement inserted automatically"

    dccorr
# 22 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao"
1 ze
2	10u 
subr POLARISE
;EXEC_begin POLARISE POLARISE(delay d20, delay d21, delay d24)
# 159 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
 
;EXEC_begin IPSO_CMD IPSO_CMD()
# 44 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
 
	500m setnmr3|31^30^29|28 ;force to ipso 		;set to ipso mode
	500m setnmr3^31^30^29^28 ;acknowledge command
 
;EXEC_end   IPSO_CMD
	setnmr3^31^30|29|28 ;Force IN_MIX_CHAMBER 	;Sample is in the polariser	
;EXEC_begin BUBBLE_H2 BUBBLE_H2()
# 130 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
 
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  
   setnmr3^31|30|29|28 ;start regeneration
  
  100u trignl2        ;test '0' stat of trigger2			;test '0' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  setnmr3^31^30^29^28 ;acknowledge command			;IPSO acknowledge command

 
;EXEC_end   BUBBLE_H2
	d20			;polarisation time
;EXEC_begin STOP_EVEN STOP_EVEN()
# 143 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
 
  100u trignl2        ;test '0' stat of trigger2			;test '0' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
    
   setnmr3|31|30|29|28 ;stop BPHP at the end of the event 
 
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trignl1        ;test '0' stat of trigger1			;test '0' stat of trigger1
  setnmr3|31^30^29^28 ;end of acknowledge IPSO
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  setnmr3^31^30^29^28 ;acknowledge command  
 
;EXEC_end   STOP_EVEN
	d21 			;delay before sample transfered to NMR probe
;EXEC_begin INJECT_PROBE INJECT_PROBE()
# 94 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
 
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  
   setnmr3^31|30|29^28 ;sample fron polasiser  to probe
  
  100u trignl2        ;test '0' stat of trigger2			;test '0' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  setnmr3^31^30^29^28 ;acknowledge command			;IPSO acknowledge command
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trignl1        ;test '0' stat of trigger1			;test '0' stat of trigger1
  setnmr3|31^30^29^28 ;end of acknowledge IPSO			;end of acknowledge IPSO
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  setnmr3^31^30^29^28 ;acknowledge command			;IPSO acknowledge command
 
;EXEC_end   INJECT_PROBE
	setnmr3^31^30|29^28 ;Force IN_FLOWCELL			;test if transfert is finished 
	d24			; delay defore the acquisition
	
 
;EXEC_end   POLARISE
# 24 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao"
3 d25
	vp ph1
  ;d3
  go=3 ph31 
  30m wr #0 if #0 ivp
  lo to 3 times td1
  d31
subr EJECT_PROBE
;EXEC_begin EJECT_PROBE EJECT_PROBE()
# 112 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/Polariser3.incl"
 
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
 
   setnmr3^31|30^29^28 ;sample from probe  to polariser 
  
  100u trignl2        ;test '0' stat of trigger2			;test '0' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  setnmr3^31^30^29^28 ;acknowledge command			;IPSO acknowledge command
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trignl1        ;test '0' stat of trigger1			;test '0' stat of trigger1
  setnmr3|31^30^29^28 ;end of acknowledge IPSO			;end of acknowledge IPSO
  100u trigpl2        ;test '1' stat of trigger2 			;test '1' stat of trigger2
  100u trigpl1        ;test '1' stat of trigger1 			;test '1' stat of trigger1
  setnmr3^31^30^29^28 ;acknowledge command			;IPSO acknowledge command
 
;EXEC_end   EJECT_PROBE
# 32 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao"
  exit
# 35 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao"
ph1=0 2 2 0 1 3 3 1
ph31=0 2 2 0 1 3 3 1


;pl1 : f1 channel - power level for pulse (default)
;pl12: f2 channel - power level for CPD/BB decoupling
;p1 : f1 channel -  high power pulse
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O                             [30 msec]
;NS: 1 * n, total number of scans: NS * TD0
;cpd2: decoupling according to sequence defined by cpdprg2
;pcpd2: f2 channel - 90 degree pulse for decoupling sequence
;cnst2 = CH coupling to decouple
# 49 "/opt/topspin3.2.6/exp/stan/nmr/lists/pp/user/ph_multizg1H_vfa.ao"
;d1 : relaxation delay
;d12: load mix-chamber, wait for ready
;d20: bubble
;d21: stop bubbling, after D21 transfer
;d22: settling after transfer
;d22: wait before returning sample
;d25: time before consecutive zg's


;$Id: zgig,v 1.9 2007/04/11 13:34:31 ber Exp $
