SpecMan4EPR programming languages

Different languages or syntaxes are applied to the programming of SpecMan4EPR. Three groups of applications can be specified

  • Time event programming
  • Real-time programming
  • GUI and instrument configuration

Time events programming

Pulse Programming Language allows users to describe waveforms and time events. PPL scripts contain a declaration part where variables are declared and a time-ordered pulse statement part. The declaration part is exposed to the experiment engine and allows passing experiment variables into the script. The execution of the PPL program is similar to calling a subroutine with parameters passed by value. The primary difference between PPL and ordinary languages is that PPL statements are initiated at a specific time and have a defined duration. A statement generates a binary pulse, waveform, or delay.

Example:

%% Detection sequence mwpulse t90, phase1(ph), 1 wait tau - (t90+t180)/2 mwpulse t180, phase2(ph) wait tau - t180/2 detect det1(ph), det2(ph)

Legend: PPL keywords; PPL pulse commands; comments.

Real-time and GUI programming

Console commands give direct and immediate access to all components of the program. Scripts can modify spectrometer configuration, enhance the GUI, program GUI elements and plugins, and alter the program environment at run-time. Experiment-embedded scripts are executed before and after the experiment run. Scripts can be used to control devices and interfaces. Scripts can be used for the Remote control of SpecMan4EPR.

.spec.puls.softsync=1 - software synchronization options
.spec.puls.rtpos=0  - repetition time position (0 - no repetition time)
.puls.comm.mwpulse.phase.ch1.use=0
.spec.BRIDGE.Attenuator=12 - set attenuator to 12 dB

Experiment variables

Ranges of values assigned to variables can be defined in a variety of ways

255 mT to 289 mT
255 mT via 289 mT
8ns step 4ns
12 us logto 22 us
mT: 22.1,22.2,22.3,22.4,22.5

Extensions

External programming languages Python and MATLAB can serve as an extension of script language and can be called from inside the script (Call Python, Call MATLAB). Python and MATLAB statements can be embedded into the experiment variable definition.

python: Frequency = matrix[idx]
MATLAB: Frequency = matrix(idx)

AWG related

Pattern: Shape Generator syntax presents a simple way to program shapes of AWG pulses.

Example:

exp(j*par1*t) * sin(0.5*t0/tp) - IQ RF pulse sin(par1*t) * gaussian(t0, 0.5*tp, 0.1*tp) - gaussian RF pulse