Pulse Program Reference Manual
Chapter 1. Basic pulse program writing

1.4 Basic syntax rules
;zgcw30
;avance-version
;1D sequence with CW decoupling
;using 30 degree flip angle

#include <Avance.incl>

1 ze
  d11 pl26:f2
  d11 cw
:f2
2 d1
  p1*0.33 ph1
  go=2 ph31
  wr #0
  d11 do
:f2
  exit

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)
;pl26: f2 channel - power level for cw/hd decoupling
;p1 : f1 channel - 90 degree high power pulse
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O [30 msec]

Table 1.1 Pulse program example

shows zgcw30 as an example of a simple Bruker pulse program. Here the following pulse programming rues are used:

1. Pulse programs are line oriented. Each line specifies an action to be performed by the acquisition hardware or software.
2. A semicolon (;) indicates the beginning of a comment. You can put it anywhere in a line. The rest of the line will then be treated as a comment.
3. #include <filename> or #include "filename"
This statement allows you to use pulse program text that is stored in a different file. It allows you to keep your pulse program reasonably sized, and to use the same code in various pulse programs. If the filename is given in angle brackets (< >), the file is searched for in the directory $xwinnmrhome/exp/stan/nmr/lists/pp/. Alternatively, double quotes (" ") can be used to specify the entire path name of the file to be included.
4. 1 ze
Any pulse program line can start with a label ("1" in the example above). Labels are only required for lines which must be reached by loop or branch statements such as go=labellotolabeltimesn or gotolabel. You can, however, also use labels for numbering the lines. A label can be a number or, an alphanumeric string followed by a comma. An example of the latter is:
firstlabel, ze
The statement ze has the following function:
Reset the scan counter (which is displayed during acquisition) to 0
Enable the execution of dummy scans. This will cause the pulse program statement go=label to perform DS dummy scans before accumulating NS data acquisition scans. If you replace ze with zdgo=label will omit the dummy scans
The statement zd automatically resets all phase program pointers to the first element, whereas the statement ze sets all phase program pointers such that they are at the first element after DS dummy scans.
5. d11 pl14:f2
Execute a delay whose duration is given by the acquisition parameter D[11]. Behind any delay statement, you can specify further statements to be executed during that delay (note that the delay must be long enough for that statement). In this example, the power level of channel f2 is switched to the value given by the acquisition parameter PL[14].
6. d11 cw:f2
Execute a delay whose duration is given by the acquisition parameter D[11] and, at the same time, turn on continuous wave (cw) decoupling on frequency channel f2. Decoupling will remain active until it is explicitly switched off with the statement do:f2. This delay and cw decoupling will begin immediately after the delay specified in item 5 has finished.
Items 5 and 6 illustrate a general feature of pulse programs: the actions specified in two consecutive lines are executed sequentially. Actions specified on the same line are executed simultaneously.
7. 2 d1
Execute a delay whose duration is given by the acquisition parameter D[1]. This line starts with the label "2", the position where the statement go=2 will loop back to.
8. p1*0.33 ph1
Execute a pulse on frequency channel f1. The pulse length of this pulse is given by the acquisition parameter P[1] multiplied by 0.33. P[1] is normally used for the pulse width of a 90° flip angle. The statement p1*0.33 would then execute a 30° pulse. In general, you can specify the operator * behind (not before!) a pulse or delay statement, followed by a floating point number. Note that the channel f1 is not specified; it is the default channel for p1, i.e.:
p1*0.33
is identical to:
p1*0.33:f1
The pulse is executed with a power (amplitude) defined by the acquisition parameter PL[1]. PL[1] is the default power level for channel f1, but you can also use a different parameter. For example, the statement pl7:f1 sets the channel f1 power to the value of PL[7]. It must be put on a separate line, with a delay, before the line with the pulse statement. This gives the transmitter some time to settle before the pulse is executed.
The phase of this pulse in our example is selected according to ph1, the name of a phase program or phase list. It must be specified behind the pulse and defined after the pulse program body. In this example we use the phase program
ph1=0 2 2 0 1 3 3 1
The phase of the pulse varies according to the current data acquisition scan. For the first scan, p1 will get the phase 0*90°, for the second scan 2*90, for the third scan 2*90, for the fourth scan 0*90, etc. After 8 scans, the list is exhausted. The phase program is cycled so with scan 9 the phase will be set to the first element of the list: 0*90°. Phase cycling is a method of artefact suppression in the spectrum to be acquired. The receiver phase must be cycled accordingly to ensure that coherent signals of subsequent scans are accumulated, not cancelled. This is achieved by the receiver phase program ph31 in our example.
9. go=2 ph31
Execute 1 data acquisition scan, then loop to the pulse program line with label "2". Repeat this until NS scans have been accumulated. Note that NS is an acquisition parameter. The data acquisition scans are preceded by DS dummy scans (because the statement ze is used at the beginning of the pulse sequence rather than zd). A dummy scan does not acquire any data, but requires the same time (given by the acquisition parameter AQ) as a real scan. Dummy scans are used to put the spin system of the sample into a steady state before acquisition starts.
The receiver phase is changed after each scan as described above for the pulse phase. Phase cycling is done according to the phase program ph31. Phase cycling is also used during the execution of dummy scans. Both DS and NS must therefore be a multiple of the number of phases in the list.
The go=label statement executes a delay, the so-called pre-scan delay to avoid pulse feed through before it starts digitizing the NMR signal. During this time the receiver gate is opened. For AQ_mod = DQD and for any value of AQ_mod if you have an RX22 receiver, the frequency is switched from transmit to receive. DE is an acquisition parameter that can be set from eda or by entering de on the command line. It consists of the sub-delays DE1, DE2, DEPA, DERX and DEADC that can be set with the command edscon (see the Acquisition Reference manual). Normally, you can accept the default values for DE value and its sub-delays. The total time the go=label statement requires to execute a scan is DE+AQ+3 millisec. The duration of 3 millisec is required for preparation of the next scan. It is valid for all Avance type spectrometers. AMX/ARX spectrometers require 6 millisec.
10. wr #0
Writes the accumulated data as file fid into the EXPNO directory of the current data set. Note that with the zgcw30 pulse program, data are only stored on disk after all NS scans have been accumulated. You can, however, store the data to disk at any time during the acquisition by entering the command tr on the command line. You can process and plot these data while the acquisition continues. If you want to protect your data against power failures during long term experiments, we recommend that you write the data on disk in regular intervals, for example every 1000 scans. To accomplish this, you can set NS=1000, and add the line:
lo to 1 times 30
before the exit statement. The pulse program then accumulates a total of 30.000 scans, but stores the result every 1000 scans.
Please note that the loop must include the ze statement. The reason for this is that wr#0adds the last acquired data to the data already present in the file.
The real time FID display will only show the data currently present in the acquisition processor's memory.
11. exit
Specifies the end of the pulse program.