You are on page 1of 29

Userguide

Pump-Probe Starter
Tobias Staut

Contents
1 Introduction

2 Getting Started Set up the Hardware

2.1

Schematic Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.2

Connections to the Host PC . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.3

Setting up myRIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.4

The Breakout Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.5

Laser Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.5.1

Microsecond Configurations . . . . . . . . . . . . . . . . . . . . . . .

2.5.2

Picosecond Configurations . . . . . . . . . . . . . . . . . . . . . . . .

3 Operating the Software and Output File Formats

10

3.1

Alignment Tool algntool.exe . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2

Power Control pwr-ctrl.exe . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.3

The Caller pps.exe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.4

Picosecond Delayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.5

Microsecond Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.6

Picosecond Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 Under the hood LabVIEW Programming

18

4.1

Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4.2

The Caller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4.3

Picosecond Delayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.4

Microsecond Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.5

Picosecond Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.6

Realtime Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.7

Realtime Microseconds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.8

Realtime Picoseconds

4.9

FPGA Microseconds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.10 FPGA Picoseconds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26


4.11 Alignment Tool / Power Control . . . . . . . . . . . . . . . . . . . . . . . . 26
5 Concluding Remarks

27

5.1

About this script and hardware . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.2

Revisions and known issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.3

Things left to do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Userguide Pump-Probe Starter

1 Introduction
As a part of my Ph.D. I developed a piece of software that allows us to perform pumpprobe measurements (laser induced fluorescence in an inverted microscope) on multiple
timescales.
In order to fulfil the timing requirements for these experiments, I used a programmable
hardware circuit, a so-called FPGA (Field Programmable Gate Arrray). Several companies
offer a variety of developement boards fitted with one of the many types of FPGAs available, but my choice was the National Instruments myRIO-1900. Its advantages include the
relatively cheap price, an RTOS (Real-Time Operating System) layer, and the (relatively1 )
easy-to-use and powerful LabVIEW developement environment.
The software has two measurement modes, one for the microsecond and one for the nanosecond time range (the latter one will be referred to as picosecond mode as the timing
resolution is 10 ps). Moreover I added tools to align the laser beam path and the fluorescence detection path and to prevent our Toptica FFPro TVIS from creeping to lower
power during run time.
The scope of the next two sections is to communicate the hardware setup, how to use the
compiled piece of software, and describe the format of output data. The fourth section
explains how the software works underneath the front panel.

2 Getting Started Set up the Hardware


First of all there are several pieces of hardware you will need:
a PC, obviously (all modes)
FPGA board NI myRIO (all modes, other RIO boards after recompilation)
a breakout box2 to supply convenient IO connectors (all modes, here mostly SMA)
at least one APD with TTL output (all modes, here: Excelitas SPCM-AHQR-14)
two (different) lasers (picosecond mode: pulsed lasers obligatory)
an AOM with TTL-triggered driver (microsecond mode, here: AA Opto-electronic
AA.MT110-A1-VIS and AA.MODA110-B51k-34)
delay line MPD Picosecond Delayer (picosecond mode)
1

If compared to the VHDL language I would have had to use otherwise, you may substitute relatively
with ridiculously.
2
This might not be a correct name in the strictest definition of the term.

3/29

Userguide Pump-Probe Starter

power meter Newport 1936-C or compatible (alignment mode, optional)


a laser out of Topticas FFPro series (alignment and power control, here: TVIS LRC)

2.1 Schematic Diagrams

Figure 1: Schematic experimental layout for the picosecond mode including control (PC,
myRIO), delay line (EDL), lasers und detection. Other laser setups are possible.

Figure 2: Schematic experimental layout for the microsecond mode with control (PC,
myRIO), delay line (EDL), lasers und detection. Other laser setups are possible.

4/29

Userguide Pump-Probe Starter

These schematics give a brief overview of the required hardware. Fig. 1 is the schematic
for the picosecond mode. Please note that there are several Laser configurations possible
which I will explain in ch. 2.5. Fig. 2 is the schematic for the microsecond mode. Here,
several laser configurations are possible as well.

2.2 Connections to the Host PC


The delay line, TVIS, and the power meter have to be connected to the PC via serial port
(RS-232, DE-9). Check the port numbers and adjust the VIs concerned.
Connect the myRIO via USB and youre done.

2.3 Setting up myRIO


The myRIO should be able to run the program out-of-the-box. Please check anyway if
the device is capable of handling network variables, network streams, and programmatic
launch of RT VIs.
Fig. 3 shows the hooked up myRIO. As there are only seven DGNDs at one MXP port, I
use two more for the nine IO ports available at the breakout box (next section). Every IO
has its own DGND because the APD inputs require this to avoid crosstalk, and so it was
implemented for every other port as well.

Figure 3: Photo of the hooked up myRIO. The ribbon cable connects the MXP A to the
breakout box, two more DGNDs are connected via the red cables.

5/29

Userguide Pump-Probe Starter

2.4 The Breakout Box


The inputs to the box are the cables from the myRIO and from a 24 V power supply. They
can not be seen in Fig. 4. The outputs include a DE-9 port with four connections (DIO,
DGNG, +24 V, and GND) that connect to the AOM driver (right side of the box), four
unaltered IO ports (left front), and four ports that are shifted to 5 V with a SparkFun
Logic Level Converter (right front).
In Fig. 4 all connections but the AOM connections are colour-coded. Red stands for APD
0 connections, green for APD 1 connections. White indicates the gating connectors, both
of which have to be connected in order to measure correct count rates.3 Blue indicates the
probe laser gate (SLM 2), purple the pump laser gate (SLM 1).

Figure 4: Photo of the hooked up breakout box. The colour code is given in the text.
3

This is a workaround for immense crosstalk that vanishes when all four cables are connected.

6/29

Userguide Pump-Probe Starter

2.5 Laser Configurations


In our TCSPC lab youll find different pulsed lasers: A tunable, fibre-pumped femtosecond
laser (Toptica FemtoFibre pro TVIS), the frequency-doubled pump laser of the TVIS as
an additional unit (Toptica FemtoFibre pro NIR), and three laser diodes driven by a
PicoQuant Sepia with two laser driver modules.
2.5.1 Microsecond Configurations
These are the easier ones, as laser syncronising can be dropped. Moreover it is not possible
to use the NIR, as someone would have to redo the optical table outline and reroute the
NIR to an AOM not made for its wavelength.
TVIS pump, Sepia probe
AOM connected as usual, probe laser out connected to one of the green fast gate ports on
the Sepia (see Fig. 5). Reverse case works the same way.
Sepia both
Pump and probe laser out connected to one fast gate each.
2.5.2 Picosecond Configurations
There are two ways to syncronise two lasers. The easyer one is to use the sync out of one
to drive the other, which is possible when combining either one of TVIS or NIR with the
Sepia. The harder one is to syncronise two independent oscillators with inherently different
frequencies. Therefore we have the LRC upgrade of the TVIS.4
TVIS/NIR pump, Sepia probe
Connect the monitor (sync) out of the TVIS/NIR to the delayer input. Connect the delayer
NIM output to the trigger input of the Sepia and flip the switch to external (Fig. 7). It is
also possible to directly connect the delayer with the trigger in of a laser driver module. The
reverse case works the same way, it should only depend on the system under examination
which is pump and which is probe.
Sepia both
Not possible with the sequencer. But the oscillator has three outputs. Wire one of them
directly to the trigger in of a laser driver, another to the delayer and then to the other
laser driver.
TVIS pump, NIR probe
Connect both lasers monitor out to the LRC phase detector inputs (Fig. 6). One it
doesnt matter which one of them via the delayer. Match phases, lock them, and go.
4

Explaining synchorisation is not in the scope of this manual. If in doubt, contact Topticas support.

7/29

Userguide Pump-Probe Starter

Figure 5: The sepia laser drivers.5 Green ports are fast gates to enable/disable the diode
output, black ones slow triggers for continuous pulsing.

Figure 6: The LRC module. RF1 and RF2 on the left are for the monitor outputs. The
PID regulator is used to finally lock the oscillators in phase.
5

Note that these drivers are equivalent to those on the Sepia II. We luckily own an intermediate series
model that wasnt produced very long.

8/29

Userguide Pump-Probe Starter

Figure 7: Overview of the Sepia and delayer. Connecting instructions are given in the text.

9/29

Userguide Pump-Probe Starter

3 Operating the Software and Output File Formats


3.1 Alignment Tool algntool.exe
The Alignment Tool (Fig. 8) has several functions. First of all, it is used to display the
APD count rates (Important: The myRIO specs only allow positive input signals!) in the
two chart windows. Unless someone had the time to properly connect the APD gating
inputs, the chX active buttons above the charts have no functionality. To prevent the
gating inputs from assuming an undefined state, they should remain active nontheless.
The string indicators/controls let you set the myRIO IP adress, display the actual size of
the DMA FIFO buffer (cf.ch. 4.7) and whether the readout was successful, how many buffer
elements could not be read in the current iteration, if the buffer is close to overflowing,
and how many elements are to be read at once.
The IP adress should remain the same unless the PC is changed. The actual size indicator
assures you that the network variables work properly. The buffer indicators are remnants
of the development for performance monitoring and with the elements to read control
one can bring the front panel update cycle to humanly processable speeds. Note that the
panel is updated with at least 4 Hz.
The TVIS (in)active button actually (de)activates the AOM, the Sepia (in)active buttons
control the fast gate inputs of the laser drivers.
In the top right corner a connection to the Newport 1936-C power meter can be established.
You can set the wavelength and receive formatted power readouts.
The top left is the power control part. You can connect to the laser and will be given its
current output state (This indicator will not be updated!). You will get an unformatted
power readout of the power meter in W which you can conveniently use as a setpoint for
the laser power by pressing the button right to the indicator. If you press No Control
the power control will be activated and the TVIS will be kept from creeping to powers
below the setpoint by increasing the axSi.position in micrometer steps set at the control
at the right side of the box. The two indicators in the middle keep you informed about the
number of corrections and the time you run with stabilized power.
If you switch Do not save you will be able to save the temporal power profile of the laser
to disc. The axSi.moverel buttons move the prisms by 10 m. The Chart History buttons
reset the chart displays below or save the current data (1024 point) to disc, respectively.
The stop button terminates the program. The error in/out clusters have no functionality
as the program runs standalone.

10/29

Userguide Pump-Probe Starter

Figure 8: Alignment Tool front panel. Description is given in the text.

Figure 9: Power Control Tool front panel. Description is given in the text.

11/29

Userguide Pump-Probe Starter

3.2 Power Control pwr-ctrl.exe


Simply the power control part of the Alignment Tool with nicer looks. Follow the instructions given on the front panel.

3.3 The Caller pps.exe


In the introduction I mentioned two measurement modes.The caller is the shared superprogram in which one of both modes can be started with adjusted settings. When you start
the pps.exe (Pump-Probe Spectroscopy compiled starter) it is actually the caller that is
started. At first, there is a pop-up reminding you to take care of the necessary hardware
connections (cf. ch. 2 and Fig. 10).

Figure 10: Pop-up when starting the pps Software. Last chance to check the hardware.
In both modes new settings have to be applied by pressing a button called save measurement settings, it will not happen automatically.6 Upon request you can check the settings
before starting the measurement. This is a remnant of the testing phase as well. Which
settings have to be taken care of will be explained in the chapters about the specific measurement mode.
The respective measurement is started with a press on the start measurement button.
The folder in which the data are saved is indicated right below the start button.
After the measurement you get the chance to return to the caller or to exit the program.
6

Not all too user friendly, but robust and flexible.

12/29

Userguide Pump-Probe Starter

3.4 Picosecond Delayer


Before any picosecond measurement the starting delay may be set.7 It is not necessary if
the sweep range is large enough (at least 25 ns) as every positive and negative delay will
then be assumed anyway, but proper preparation can reduce measurent time.
The Picosecond Delayer software includes all important settings and readouts. As indicated in Fig. 11 you can set the delay between inpupt and output, the detected edge
(rising/falling), the detection threshold, and the output pulse width. Note that the latter
applies to NIM output pulses and that TTL output pulses are approx. 1 ns longer.
The software does not automatically connect to the hardware, but if disconnected it automatically stops in order to return to the caller. This also applies to the standalone version.

Figure 11: Front panel of the Picosecond Delayer software displaying the standard settings.
Edge detection is optimised for the TVIS monitor out.

Again it is not in the scope of the manual to tell you how.

13/29

Userguide Pump-Probe Starter

3.5 Microsecond Measurements


Fig. 12 shows the caller setup tab for the microsecond mode. Besides a control for the
myRIO IP adress and the name of the measurement folder, there is the uspp-configurationcluster which has five fields.

Figure 12: Microsecond setup mode of the caller. The value check part is not shown.
The first chooses the laser setup (cf. ch. 2.5), the second determines how long the pump
laser is active to saturate the sample, the third is for the maximum duration of the free
decay between pump and probe, the fourth sets the interval in which the free decay time
is increased, and the fifth determines how long count rates are gathered while the probe
laser is active.

Figure 13: The four timing variables visualised. Different colours symbolise different lasers.

14/29

Userguide Pump-Probe Starter

Pressing the start measurement button loads the microsecond measurement program in a
new window (cf. Fig. 14). You can see the previously described debugging indicators on the
lower left and two chart windows displaying measurement curves from one APD each. The
charts include four curves: the current free decay time, the milliseconds since the current
fluorescence collection started8 , the number of photons in the current millisecond bin, and
the resulting count rate.

Figure 14: Front panel of the microsecond measurement program.


The measurement yields four ASCII output files, two for each APD channel, containing
either the photons per bin or the countrate versus the millisecond they were registered. Note
that these files only header row consists of the current free decay delay in microseconds.
Columnwise the output looks like this:

ms bin i

counts i

ms bin i+1

counts i+1

where the counts stand for either photons per bin or the count rate. Note that in order to
avoid zero entries the ms bin is not continuous, making mean count rate calculations much
easier.
8

This is because the events are read out in ms-wide bins. More explanation in ch. 4.7.

15/29

Userguide Pump-Probe Starter

3.6 Picosecond Measurements


Fig. 15 shows the caller setup tab for the picosecond mode. The first step here involves the
setting of the start delay. Pressing zero delay search will pop up the Picosecond Delayer
software described earlier.9 Besides a control for the myRIO IP adress and the name of the
measurement folder, there are three fields to control the timing of the measurement in the
middle tab.

Figure 15: Picosecond setup mode of the caller. The value check part is not shown.
The delay interval determines the interval in witch the delay is increased, the max. delay
sets the maximum delay, and the meas. period determines the time in which the fluorescence
for each delay is gathered. Note that in order to cover all possible (positive and negative)
delays, you have to sweep at least twice the period. So at 80 MHz (max. delay - zero delay)
has to be at least 25 ns. If you make sure that at zero delay the lasers actually arrive at
the sample at the same time, you of course only have to sweep over one period.
Pressing the start measurement button loads the picosecond measurement program in
a new window (cf. Fig. 16). The presets tab on top shortly displays the settings passed
from the caller to the measurement program, then switches to the monitoring tab with
the debugging indicators and two chart windows displaying current count rates. Below the
9

The way I chose to save the values from the Picosecond Delayer software is the reason you have to
update new values in the caller by pressing a button.

16/29

Userguide Pump-Probe Starter

tabs is the measurement curve, where mean count rates for each delay are shown. Last but
not least there are the error cluster and a stop button to interrupt excecution.

Figure 16: Front panel of the picosecond measurement program.


The measurement yields several ASCII output files, one of them contains the mean count
rates per delay, the others all the single count rates from one delay only. In contrast to the
microsecond program those count rates are arbitrarily spaced and not millisecond resolved,
as the photophysics happens six orders of magnitude faster than the acquisition time. The
output files have self-explaining headers.

17/29

Userguide Pump-Probe Starter

4 Under the hood LabVIEW Programming


4.1 Block Diagram
Until now, when discussing LabVIEW programs, you only saw the front panel, the layer
where user interacts with the program. The block diagram, on the other hand, is where the
actual programming is done. As LabVIEW is a dataflow oriented programming language,
the (oversimplified) task you are up to here is putting wires from one functional unit to the
next. In the next section I will explain some of those functional units and some paradigms
to follow. Note that the didactical concept here is to adress topics as they come up during
the discussion of (sub)VIs, and especially that this is not and cannot be an introduction
to LabVIEW programming!

4.2 The Caller


Every program should have an initialisation phase. In the callers (Fig. 17), standard values
are loaded and excecution is stalled to let you check the hardware configuration (cf. ch. 3.3).

Figure 17: Block Diagram of the caller. From left to right there is a initialisation phase
(double film strip), run phase (green box), and a stop phase (film strip and
code outside the box).
Some values are stored in so-called Functional Global Variables (FGV).10 This undermines
the dataflow structure of LabVIEW, as storing and reading of values does not have to be
10

As to every other element within the LabVIEW universe there is extensive documentation and examples
available online.

18/29

Userguide Pump-Probe Starter

connected by wires, but of all the possibilities to pass data around arbitrarily, this is by
far the most reliable choice.
The run phase, the actual program, if you will, is written as a very basic event-driven
producer/consumer. If you press any button on the front panel, some action will be triggered. It is possible to transmit data as well as cases, but as I use FGVs explicit data
transfer is not necessary. Fig. 17 shows what happens when you press the start button of
the picosecond case: The case pspp - start is send to the consumer, where the settings are
read from the FGV and loaded to the measurement program, which then pops up. After
it finished there is an error handling subVI and the possibility to stop the caller or just
perform another measurement.
When the excecution is stopped, the stop phase, which resets all values to standard, is
passed through before the program stops. Note that the black-yellow error wires not only
keep track of errors, but also assure that the functional units are excecuted in order.

4.3 Picosecond Delayer

Figure 18: In contrast to the last event-driven producer/consumer, data is passed, too.
Instead of a FGV a shift register in the producer is used as storage.

19/29

Userguide Pump-Probe Starter

The block diagram in Fig. 18 is not so different from the callers. The initialisation phase
is hidden in its own case, as the connection to the device is only established upon request,
and the data storage differs, as here an initialised shift register is used instead of a FGV.
A closer look at how to open a serial connection is advisable. After figuring out the serial
connection settings of your hardware, it can be fed to the appropriate subVI (supplied
code, white square at the top left in Fig. 19). Then you can initialise your device to a
specific state by feeding it commands (for loop with the indexed input). The Picosecond
Delayer accepts ASCII code, so it is slow, but comprehensible. The rest is a query to assure
the settings are correct.

Figure 19: Connecting to the Picosecond Delayer consists of the serial connection plus some
standard settings and reading a response.

4.4 Microsecond Measurements


Another useful programming architecture is the state machine. In Fig. 20 it is used to put
all the initialisation steps and the shutdown steps in their own state. Note that the folders
and filepaths are generated in advance as to save one shift register. Also the network variables are initialised beforehand to avoid runtime errors. Network variables are one way
to pass data between two distant machines. The communication is lossy and only used for
monitoring.
The lower part of the diagram just updates the front panel and handles user stop commands, a remainder of the testing phase. The top part is a second state machine handling the

20/29

Userguide Pump-Probe Starter

measurement. In the displayed case, values are read from two different network streams,
but only if there are any available. Network streams too are a way to pass data between
two distant machines. In this case the communication is lossless, as buffers are involved.
The values fron the stream are then fed to charts on the front panel and FGVs which
save them during excecution. Note that the values are saved to the RAM only during the
measurement as writing data to disc is much to slow to be used during acquisition.

Figure 20: The block diagram for the microsecond measurements contains nested state
machines. Here you see the measurement state of the Measurement state.

4.5 Picosecond Measurements


The program is written as a nested state machine as well. Connecting to the myRIO,
opening folders and setting network variables is not too different, but here we also have
to connect to the Picosecond Delayer. The measurement state is completely different,
as it involves setting new delays and intermediate saves to disc. I can afford the latter as
acquisition is halted to reset the delay anyway.

4.6 Realtime Connection


This is a subVI to connect to the myRIO and run the realtime program. Its block diagram
is shown in Fig. 21.
The realtime program has to be compiled to a Source Distribution before loading can be
successful.

21/29

Userguide Pump-Probe Starter

Figure 21: A connection is established to the myRIO and the precompiled program is
loaded and started.

4.7 Realtime Microseconds

Figure 22: Startup sequence of the realtime microsecond VI.


Fig. 22 shows the startup phase of the realtime VI for the microsecond measurement.
From left to right the sequence is as follows: First, network variables are read, and then
the network stream is initialised together with FGVs. The third step is the FPGA startup
including loading the bitfile, configuring the DMA FIFO with the depth introduced in
ch. 3.1 and starting it, and setting up the timing parameters introduced in ch. 3.5. Lastly
FPGA excecution is started and the realtime program advances to the main phase depicted
in Fig. 23.
The top structure is a state machine querying if the host is ready and if so waking the
FPGA from the idle state it assumes after startup.
The middle part, the producer, runs on a kHz clock. This is indicated by the blueish frame
around the while loop and its additional input/output elements. Those loops are called
timed loops.

22/29

Userguide Pump-Probe Starter

Figure 23: Main phase of the realtime microsecond VI. It is organised as realtime (RT)
FIFO producer/consumer with a command parser on top.
Every millisecond if the FPGA is in a fluorescence collection state and a multiple of
three elements is in the FIFO the DMA FIFO is read. Each datapoint consists of three
elements, hence the multiple-of-3 condition. The first element is the current delay, the
second and third are number of ticks (200 MHz clock) between two photon events on APD
0 and 1. These points are sent to the RT FIFO including the number of elements and the
milliseconds between this datapoint and the last one.
The lower part, the consumer, calls a subVI that processes the raw data from the RT FIFO.
The datapoints, which contained delay, number of ticks, and as metadata the milliseconds
between this and the last datapoint, are transformed. In the end, datapoints containing the
current delay, milliseconds since the current delays fluorescence collection started, number
of photons in the current millisecond bin, and the current count rate are sent to the network
stream.
After the last delay, the FGVs are reset, the FPGA is stopped and the host is notified via
a network variable that the remote VI finished.

23/29

Userguide Pump-Probe Starter

4.8 Realtime Picoseconds


Same structure as before, but way simpler. No FPGA startup values have to be passed.
The command parser has only one state, moreover it is only necessary for monitoring
purposes and the Alignment Tool. The RT FIFO producer does not have to keep track
of passing milliseconds or different FPGA states. Finally in the consumer the RT FIFO
datapoints, which are the same as in the chapter before without the metadata, averages
several datapoints to countrates and sends the to the network stream.

4.9 FPGA Microseconds

Figure 24: Logic section of the FPGA VI. The left part grabs the timing settings and stalls.
The right part contains the actual timing logic.
As seen in Fig. 24, the timing logic is a state machine as well. The different states provide
different values for the physical outputs (Rose boxes 2, 3, 4 from the top on the right side
in Fig. 24.), and the two registers for FIFO activation and current delay, respectively.
The case structure inside the state machine provides the necessary value changes when
using different laser setups. Note that this time the state machine is inside a single-cycle
timed loop. This means that the hole code inside the loop is excecuted in a single clock
period. But it takes a signal two clock cycles to propagate through the circuit, because I
added flip-flops (boxes with arrows in the figure). This was necessary to reduce the critical
path length and keep the clock rate as high as possible. The maximum is 160 MHz.
The near-square on the left side of the timed loop is a counter implemented through a DSP
on the FPGA. No more counters are needed, as this one is reset inbetween the actual

24/29

Userguide Pump-Probe Starter

states, pumping, free decay, and fluorescence collection.


Below in Fig. 25 is the universal logic detecting rising edges at a digital input of the FPGA.
It consists of a timed loop, the input readout, a counter and an enabled writer to a DMA
FIFO. This piece of code samples rising edges because it compares the currrent input with
its value from the last iteration and flags (>) if the new value is true, when the last
was false. The counter is reset with every rising edge and the number of counts between
to edges is forwarded to the FIFO.

Figure 25: Counting logic which is used in both FPGA VIs.

Figure 26: DMA FIFO accessible from the realtime machine located on the right. Also used
in the picosecond mode, only without the registers.

25/29

Userguide Pump-Probe Starter

Fig. 26 shows the part of the FPGA VI, where the single elements from the input FIFOs
and, in this case, the current delay register, are combined to the datapoints read in the
realtime machine. I have to make sure that the datapoints always consist of three elements.
So if one input FIFO times out11 , i.e. no photon event occurred in that channel since the
last iteration, theres a zero written. Also, if no elements are in the input FIFOs or if the
FPGA is not in the collection state (FIFO enable), there is nothing sent at all, as the
writing to the DMA FIFO is disabled.

4.10 FPGA Picoseconds

Figure 27: Only part genuine to the picosecond mode: The loop needed to set outputs when
running the Alignment Tool.
The picosecond mode is more or less the microsecond mode without the timing logic. As
mentioned before the counting logic is the same, and the DMA FIFO works the same
way but lacks the registers. The only code genuine to the picosecond mode is the loop in
Fig. 27, which is only needed in the Alignment Tool to programmatically enable the lasers
(Note again that the APD gates do not work due to limitations of the myRIO, so the
corresponding switches do not work properly).

4.11 Alignment Tool / Power Control


I will not provide images of any block diagram here. The FPGA and realtime VIs are the
same as for the picosecond mode. The host is kept very simple. There is an initialisation
phase to set standard values, the main phase, which has only one state and an event handler
with a case for every button in Fig. 8, but not as producer/consumer, and the shutdown
phase, in which all connections and indicators are properly reset.
11

Which will be the case most of the time, since at 200 MHz sampling rate, photons are not likely to arrive
at the same time.

26/29

Userguide Pump-Probe Starter

5 Concluding Remarks
5.1 About this script and hardware
I hope that this script is helpful. I tried to comment the LabVIEW block diagrams themselves as much as possible, so that the last chapter became only a very brief description
of the main components of the program, requiring a lot of prior knowledge. Additionally
I labeled hardware wherever possible so that with the second chapter it should be easy
to set up the experiments. The front panels themselves are put together with the aim to
guide you through the acquisition process, so that hopefully no problems arise the third
chapter cant solve.
If you acquired the code via the NI myRIO community: The hardware used for this experimental setup easily breaks the 100k e barrier. In principle the APDs and light sources are
replaceable by cheap electronics (LEDs, photodiods), as long as they provide the necessary
inputs and outputs. If there are any sensible demonstration experiments possible is another
question. Replacing the Picosecond Delayer is not so easy as it requires not only finding a
replacement, but also a rewrite of the code.
If after all these changes any meaningful experiments are still possible is another question,
but it would suffice for demonstrations.

5.2 Revisions and known issues


The current version (October 2015) is 2.3.1.
Major 2: First working version of the microsecond mode.
Minor 1: Substantial improvement in error handling12 and better code commenting.
Fix 1: Reading in multiples of three in the microsecond mode.
Minor 2: Introduced a save current values as standard button to the caller, added
the second Sepia driver enable to the Alignment Tool, changed the picosecond
FPGA VI enable booleans to front panel elements, and included the update to
LabVIEW 2014.
Fix 1: Reading in multiples of three in the picosecond mode.
Minor 3: Repeated measurements at the same decay delay are possible.
Fix 1: Adjusted the timed loop period in the real-time part.
12

Especially the network streams will produce ommittable errors when the endpoints are destroyed.

27/29

Userguide Pump-Probe Starter

The timed loop period for repeated measurements is too long (50 s). In order to capture
only the timespan of triplet decay it should be no longer than 10 s. To circumvent the
problem, make sure that saturation, free decay and collection time add to at least 50 s.
A solution would be to add a waiting state to the FPGA procedure.

28/29

Userguide Pump-Probe Starter

5.3 Things left to do


linklist LV
LRC documentation.
Zero delay search documentation.
Even better documentation: subVI wiring requirements and context help.
Extend power meter and TVIS tool functionality.
Working APD gates.

29/29

You might also like