PPL script is a text that contains Variable declaration, declaration of signals and statements including Pulse statements of a pulse sequence. The values of variables can be set outside of the script by Main Engine or declared inside the script. The execution of the PPL program is similar to calling a subroutine with parameters passed by values. Besides the generation of the pulse sequence, the script returns the acquisition coefficients that scale the acquired data (used for phase cycling).

Example:

%% Inversion recovery experiment as implemented for EPR imaging time tau, t90, t180, T1 %% Variable declaration int ph,rr %% Variable declaration signal a,b %% Signal declaration %% Phase cycles (selection of pulse pattern) patt1 = [ 0, 1, 2, 3, 1, 0, 3, 2, 0, 1, 2, 3, 0, 1, 2, 3] patt2 = [ 2, 2, 1, 1, 3, 3, 0, 0, 0, 1, 2, 3, 1, 0, 3, 2] %% Acquisition coefficients (definition of signal that will contribute to acquisition channel) det1 = [ a, -a, -b, b, -a, a, b, -b, -a, a, b, -b, -a, a, b, -b] det2 = [ b, -b, a, -a, -b, b, -a, a, -b, b, -a, a, -b, b, -a, a] %% For the 8-th delay inversion pulse is removed %% This emulates infinite delay after inversion if rr < 8 mwpulse t180 wait T1 - (t90+t180)/2 else %% Note that the else keyword is necessary even if no statement is provided end %% Detection sequence mwpulse t90, patt1(ph), 1 wait tau - (t90+t180)/2 %% Note that this delay specifies distance between midpoints of pulses mwpulse t180, patt2(ph) wait tau - t180/2 detect det1(ph), det2(ph)

Legend: PPL keywords; PPL pulse commands; comments.