PPL program starts with the declaration of external variables (see Variable declaration). These are the variables controlled by Main Engine (see Experiment Editor). Example: time tau, t90, t180, T1 %% Variable declaration int ph,rr %% Variable declaration Legend: PPL keywords; PPL pulse commands; comments. Variable declaration is followed by declaration of signals or input channels. Example: signal I, Q Legend: PPL keywords; PPL pulse commands; comments. The names of signals are arbitrary. Physical acquisition channels are assigned to signals in Experiment Editor. Signal names are used in detect command to define used acquisition channels and their acquisition coefficients. Example: signal first, second, third detect -first, -second, third %% Note acquisition coefficient (+1/-1) %% added to the signal names Legend: PPL keywords; PPL pulse commands; comments. The body of PPL program consist of declaration of internal variables, Array declarations ... Example: %% Phase cycles (selection of pulse pattern) newtau = tau - 500ns phase1 = [ 0, 1, 2, 3, 1, 0, 3, 2, 0, 1, 2, 3, 0, 1, 2, 3] phase2 = [ 2, 2, 1, 1, 3, 3, 0, 0, 0, 1, 2, 3, 1, 0, 3, 2] Legend: PPL keywords; PPL pulse commands; comments. ... and pulse commands. Example: %% Detection sequence mwpulse t90, phase1(ph), 1 wait tau - ((t90+t180)/2) mwpulse t180, phase2(ph) wait tau - 150ns detect det1(ph), det2(ph) Legend: PPL keywords; PPL pulse commands; comments. |