Leica SP2 control via Labview

classic Classic list List threaded Threaded
6 messages Options
Christian Liebig Christian Liebig
Reply | Threaded
Open this post in threaded view
|

Leica SP2 control via Labview

Hi all,

I wonder whether anybody has tried/ succeeded to control a Leica SP2
confocal with Labview or a software other than the Leica software? Is it
possible at all?

Thanks for any helpful hints, kind regards,

Christian


--
Christian Liebig, PhD

Hertie-Institut für klinische Hirnforschung
Abteilung Zellbiologie Neurologischer Erkrankungen
Otfried-Müller-Strasse 27
72076 Tübingen

Tel.: 07071/29-87607
Fax: 07071/29-4521

[hidden email]
Mario Faretta Mario Faretta
Reply | Threaded
Open this post in threaded view
|

Re: Leica SP2 control via Labview

Leica provides a macro package (sold as a separate option to be activated in
your hardware key) containing the commands to control the confocal with visual
basic and allowing access to most of the elementary operations. I found it
very useful to produce ad-hoc acquisition semiautomated protocols.
Hope it helps
Mario

Christian Liebig ([hidden email]) wrote:

>
> Hi all,
>
> I wonder whether anybody has tried/ succeeded to control a Leica SP2
> confocal with Labview or a software other than the Leica software? Is it
> possible at all?
>
> Thanks for any helpful hints, kind regards,
>
> Christian
>
>
> --
> Christian Liebig, PhD
>
> Hertie-Institut für klinische Hirnforschung
> Abteilung Zellbiologie Neurologischer Erkrankungen
> Otfried-Müller-Strasse 27
> 72076 Tübingen
>
> Tel.: 07071/29-87607
> Fax: 07071/29-4521
>
> [hidden email]
>

--
Mario Faretta
Department of Experimental Oncology
European Institute of Oncology
c/o IFOM-IEO Campus for Oncogenomics
via Adamello 16
20139 Milan
Italy
Phone: ++39-02574303054
email: [hidden email]
http://www.ifom-ieo-campus.it



[- Il Tuo 5 per Mille a favore della Ricerca dell'Istituto Europeo di
Oncologia

Tutti coloro che presentano il modello Unico, il modello 730 o più
semplicemente che ricevono dal proprio datore di lavoro il modello CUD, hanno
la facoltà di scegliere la destinazione del proprio 5 per mille.

Nella casella riservata al Finanziamento agli Enti della Ricerca Sanitaria
inserisci il codice fiscale dello IEO (08 69 14 40 153) ed apponi la Tua
firma.
Il Tuo 5 per Mille verrà destinato alla ricerca contro il cancro dell'Istituto
Europeo di Oncologia

NON COSTA NULLA E NON COMPORTA ALCUN AUMENTO DELLE IMPOSTE DA VERSARE
NON È UN'ALTERNATIVA ALL'8 PER MILLE
E' UN GESTO CONCRETO E DI GRANDE VALORE

Per saperne di più vai al sito dello IEO www.ieo.it < http://www.ieo.it >
oppure scrivi a [hidden email] < mailto:[hidden email]>

Segnala ad un amico questa opportunità

 -]
Craig Brideau Craig Brideau
Reply | Threaded
Open this post in threaded view
|

Re: Leica SP2 control via Labview

In reply to this post by Christian Liebig
Labview is relatively slow so you will need a good computer to be able
to keep up with things on the data display side.  The DAQ hardware has
no problems streaming data in, but the labview user interface is
inefficient enough that it often can't update the display fast enough.
 I managed to get a microscope running at a frame per second.  The
microscope was mostly built from parts though so I didn't have to try
to decipher any proprietary interfaces.  We had another microscope
that we tried to run at video rate, but the programmer was only able
to get it up to about 7 fps after considerable labview code
optimization.

Craig


On Fri, Feb 5, 2010 at 5:34 AM, Christian Liebig
<[hidden email]> wrote:

> Hi all,
>
> I wonder whether anybody has tried/ succeeded to control a Leica SP2
> confocal with Labview or a software other than the Leica software? Is it
> possible at all?
>
> Thanks for any helpful hints, kind regards,
>
> Christian
>
>
> --
> Christian Liebig, PhD
>
> Hertie-Institut für klinische Hirnforschung
> Abteilung Zellbiologie Neurologischer Erkrankungen
> Otfried-Müller-Strasse 27
> 72076 Tübingen
>
> Tel.: 07071/29-87607
> Fax: 07071/29-4521
>
> [hidden email]
>
Mario-2 Mario-2
Reply | Threaded
Open this post in threaded view
|

Re: Leica SP2 control via Labview

Craig,

Can you give some of the specifications of the
computer you were using? Multiprocessor? Bus
speed (probably fairly critical)? System software?

Were all the routines done in LabView/Realtime or
was the LabView interface used to call external
subroutines (often better).

When I was at the Advanced Light Source in
Berkeley, a very large percentage of the
beamlines used LabView programming to
simultaneously run steering mirrors, pinholes,
cameras, photomultiplier signal collection, piezo
scanning stages, etc. Mostly this was done on
Unix platforms but some Windows, as well.
External subroutines were used liberally in
addition.

In any event, I have had it on my to do list to
assemble a microscope system using LabView since,
in principle, it should allow for a lot of
flexibility. I am aware that subVI routines can
introduce a lot of overhead and that to make
LabView run well you are better off using
National Instrument boards, which may or may not
be a bit self-serving. Can you comment a bit
further?

Thanks,

Mario

>Labview is relatively slow so you will need a good computer to be able
>to keep up with things on the data display side.  The DAQ hardware has
>no problems streaming data in, but the labview user interface is
>inefficient enough that it often can't update the display fast enough.
>  I managed to get a microscope running at a frame per second.  The
>microscope was mostly built from parts though so I didn't have to try
>to decipher any proprietary interfaces.  We had another microscope
>that we tried to run at video rate, but the programmer was only able
>to get it up to about 7 fps after considerable labview code
>optimization.
>
>Craig
>
>
>On Fri, Feb 5, 2010 at 5:34 AM, Christian Liebig
><[hidden email]> wrote:
>>  Hi all,
>>
>>  I wonder whether anybody has tried/ succeeded to control a Leica SP2
>>  confocal with Labview or a software other than the Leica software? Is it
>>  possible at all?
>>
>>  Thanks for any helpful hints, kind regards,
>>
>>  Christian
>>
>>
>>  --
>>  Christian Liebig, PhD
>>
>>  Hertie-Institut für klinische Hirnforschung
>>  Abteilung Zellbiologie Neurologischer Erkrankungen
>>  Otfried-Müller-Strasse 27
>>  72076 Tübingen
>>
>>  Tel.: 07071/29-87607
>>  Fax: 07071/29-4521
>>
>>  [hidden email]
>>


--
________________________________________________________________________________
Mario M. Moronne, Ph.D.

[hidden email]
[hidden email]
Craig Brideau Craig Brideau
Reply | Threaded
Open this post in threaded view
|

Re: Leica SP2 control via Labview

In reply to this post by Craig Brideau
The slow scan system was constructed using a regular PC with 2GB of
RAM and a P4 processor with all NI boards for DAQ.  The scan
controller was a pre-programmed SC2000 from GSI or Cambridge (I forget
which) generating a triggered raster pattern.  Basically a DIO line
from one of the NI boards would trigger the scan controller
line-by-line and the DAQ acquired data driven by a pixel clock
generated by a NI 6608 timer-counter board.  We did photon counting so
one of the other counters on the 6608 actually collected the data,
gated by the first pixel clock timer.  This was all displayed in
Labview using one of the Chart display widgets.  The main limit seemed
to be getting the data from the 6608's buffer and displaying the data
in the graph onscreen.  The laser would sweep out a line, the data
would stream into the 6608's buffer, then labview would display the
information for that line.  Then the next line would trigger and the
process would repeat.

The fast scan system we recently tried to assemble was video-rate with
analog detection.  The computer was a mid-high-end Dell workstation
with 4GB RAM and recent processor (don't remember specs off hand but
was fairly new).  The DAQ was an Alzar two-channel board.  The scanner
was a Thorlabs 'Confocal Camera' which is a resonant-galvo-based
system.  A D-A board from NI ran an analog waveform to drive the slow
galvo, while the resonant galvo free-ran at 8kHz.  A triggering pulse
from the resonant scanner system synchronized the Alzar data
acquisition and the slow-galvo sweep.  Again the speed limit seemed to
be the interface.  The scanner was doing about 20 fps but we could
only display 7 fps to the user.  The data WAS saved at 20 fps so we
weren't losing frames from the record, it's just that the user got a
slower real-time frame rate.  We will be trying to improve this one so
any input would be appreciated.

Craig



On Fri, Feb 5, 2010 at 12:52 PM, Mario <[hidden email]> wrote:

> Craig,
>
> Can you give some of the specifications of the computer you were using?
> Multiprocessor? Bus speed (probably fairly critical)? System software?
>
> Were all the routines done in LabView/Realtime or was the LabView interface
> used to call external subroutines (often better).
>
> When I was at the Advanced Light Source in Berkeley, a very large percentage
> of the beamlines used LabView programming to simultaneously run steering
> mirrors, pinholes, cameras, photomultiplier signal collection, piezo
> scanning stages, etc. Mostly this was done on Unix platforms but some
> Windows, as well. External subroutines were used liberally in addition.
>
> In any event, I have had it on my to do list to assemble a microscope system
> using LabView since, in principle, it should allow for a lot of flexibility.
> I am aware that subVI routines can introduce a lot of overhead and that to
> make LabView run well you are better off using National Instrument boards,
> which may or may not be a bit self-serving. Can you comment a bit further?
>
> Thanks,
>
> Mario
>
>> Labview is relatively slow so you will need a good computer to be able
>> to keep up with things on the data display side.  The DAQ hardware has
>> no problems streaming data in, but the labview user interface is
>> inefficient enough that it often can't update the display fast enough.
>>  I managed to get a microscope running at a frame per second.  The
>> microscope was mostly built from parts though so I didn't have to try
>> to decipher any proprietary interfaces.  We had another microscope
>> that we tried to run at video rate, but the programmer was only able
>> to get it up to about 7 fps after considerable labview code
>> optimization.
>>
>> Craig
>>
>>
>> On Fri, Feb 5, 2010 at 5:34 AM, Christian Liebig
>> <[hidden email]> wrote:
>>>
>>>  Hi all,
>>>
>>>  I wonder whether anybody has tried/ succeeded to control a Leica SP2
>>>  confocal with Labview or a software other than the Leica software? Is it
>>>  possible at all?
>>>
>>>  Thanks for any helpful hints, kind regards,
>>>
>>>  Christian
>>>
>>>
>>>  --
>>>  Christian Liebig, PhD
>>>
>>>  Hertie-Institut für klinische Hirnforschung
>>>  Abteilung Zellbiologie Neurologischer Erkrankungen
>>>  Otfried-Müller-Strasse 27
>>>  72076 Tübingen
>>>
>>>  Tel.: 07071/29-87607
>>>  Fax: 07071/29-4521
>>>
>>>  [hidden email]
>>>
>
>
> --
> ________________________________________________________________________________
> Mario M. Moronne, Ph.D.
>
> [hidden email]
> [hidden email]
>
Emmanuel Gustin Emmanuel Gustin
Reply | Threaded
Open this post in threaded view
|

Re: Leica SP2 control via Labview

In reply to this post by Craig Brideau
In my own experience -- with a now ancient version of LabView -- we solved the
image throughput problem by using a C++ DLL, which transferred images from the
camera, put them on screen in a dialog window, and stored them. To avoid delay in
user interface interactions, as much as possible the work was delegated to a
background thread in the DLL, and some image processing was done by the processor
of the framegrabber. LabView code integrated all the part of the system, and
provided the user interface. It still works well. Debugging a setup like that may
require a bit of ingenuity!

I have also used the VBA macro language of a Leica SP2 -- specifically, to set up
automated 4D scanning on eight-chamber slides. I have to say that it wasn't as easy
as I had hoped, because the SP2 macro language was a bit underdeveloped, and that
was never solved because Leica concentrated its efforts on the new SP5 software.
For example, after a lot of trouble it was suggested to us that if we wanted to
run a macro that changes the scan mode, problems could be avoided by using the
Format button in the menu -- just change the image size back and forth -- before
starting the macro. (Don't ask me why, I don't know.) Not all SP2 methods are
implemented in VBA, and some that do work, appear to leak memory. However, it is
an useful tool. (For the SP5, Leica provides its own automated scanning solution.)

From the VBA environment, you can also call a COM object. I used this to analyze XZ
slices as an improvised autofocus mechanism, and it appeared to be trouble-free.
That is at least one way to connect an SP2 to code written in another language, and
you could use it to synchronize the actions of the SP2 with other systems.

Best Regards,

Emmanuel



-----Original Message-----
From: Confocal Microscopy List [mailto:[hidden email]] On Behalf Of Craig Brideau
Sent: vrijdag 5 februari 2010 18:15
To: [hidden email]
Subject: Re: Leica SP2 control via Labview

Labview is relatively slow so you will need a good computer to be able
to keep up with things on the data display side.  The DAQ hardware has
no problems streaming data in, but the labview user interface is
inefficient enough that it often can't update the display fast enough.
 I managed to get a microscope running at a frame per second.  The
microscope was mostly built from parts though so I didn't have to try
to decipher any proprietary interfaces.  We had another microscope
that we tried to run at video rate, but the programmer was only able
to get it up to about 7 fps after considerable labview code
optimization.

Craig


On Fri, Feb 5, 2010 at 5:34 AM, Christian Liebig
<[hidden email]> wrote:

> Hi all,
>
> I wonder whether anybody has tried/ succeeded to control a Leica SP2
> confocal with Labview or a software other than the Leica software? Is it
> possible at all?
>
> Thanks for any helpful hints, kind regards,
>
> Christian
>
>
> --
> Christian Liebig, PhD
>
> Hertie-Institut für klinische Hirnforschung
> Abteilung Zellbiologie Neurologischer Erkrankungen
> Otfried-Müller-Strasse 27
> 72076 Tübingen
>
> Tel.: 07071/29-87607
> Fax: 07071/29-4521
>
> [hidden email]
>