Quantcast

Hardware-based synchronization sequence length

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hardware-based synchronization sequence length

gwitz
Hello everyone,

I'm using the MDA in hardware-based synchronization mode with camera TTLs triggering both an LED controlled by an Arduino and a sequenceable z-piezo stage. I'm imaging a z-stack in two channels.

Everything works as expected when acquiring in the order Channel/Slice even for a large number of planes (~20): the two stacks are acquired in streaming mode one after the other.

When acquiring in the Slice/Channel order the systems behaves in a strange way: it somehow splits the acquisition into separate blocks, but each block is still acquired in the streaming/sequenceable mode. For example for 9 stacks, it would take the first 4 planes in both colors as a sequence, pause, and then acquire the next 5 planes in both colors as a sequence.

I guess this is a consequence of the limited size of the sequence that can be stored on the Arduino, which if I correctly understand is 12. I managed to avoid the problem by scripting my own MDA and using the fact that it's sufficient to store a sequence of size two for the two channels, as Arduino just loops over whatever sequence it has. However, I'd prefer being able to use the "native" MDA, and I'm wondering whether there's a fundamental reason why the sequence size is limited to 12 positions? And if that doesn't explain the strange behavior, what could be the problem?

Thanks,

Guillaume

Guillaume Witz | van Nimwegen Lab | Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hardware-based synchronization sequence length

Nico Stuurman-2
Hi Guillame,


> I'm using the MDA in hardware-based synchronization mode with camera TTLs
> triggering both an LED controlled by an Arduino and a sequenceable z-piezo
> stage. I'm imaging a z-stack in two channels.
>
> Everything works as expected when acquiring in the order Channel/Slice even
> for a large number of planes (~20): the two stacks are acquired in streaming
> mode one after the other.
>
> When acquiring in the Slice/Channel order the systems behaves in a strange
> way: it somehow splits the acquisition into separate blocks, but each block
> is still acquired in the streaming/sequenceable mode. For example for 9
> stacks, it would take the first 4 planes in both colors as a sequence,
> pause, and then acquire the next 5 planes in both colors as a sequence.
>
> I guess this is a consequence of the limited size of the sequence that can
> be stored on the Arduino, which if I correctly understand is 12. I managed
> to avoid the problem by scripting my own MDA and using the fact that it's
> sufficient to store a sequence of size two for the two channels, as Arduino
> just loops over whatever sequence it has. However, I'd prefer being able to
> use the "native" MDA, and I'm wondering whether there's a fundamental reason
> why the sequence size is limited to 12 positions? And if that doesn't
> explain the strange behavior, what could be the problem?

I think you assessed the situation correctly.  Couple of thoughts that
may help:
- The Arduino indeed only stores 12 positions in a sequence.  This is
hard coded in two positions: the variable NUMPATTERNS in the header file
of the device adapter (Arduino.h), and the firmware code itself, which
has the followin line:
const int SEQUENCELENGTH = 12;  // this should be good enough for
everybody;)
I wrote that code a long time ago and do not exactly recall the reasons,
but the amount of RAM in an Arduino is limited and I likely wanted to
avoid running into problems.  You could certainly try to increase this
number and let us know how high you can go without problems (I'll be
happy to help if it is difficult for you to compile the C++ code).
- The acquisition engine indeed wants to send a sequence for the
complete acquisition rather than relying on the device to keep on
cycling through a sequence.  The ASI adapter has a setting to "trick"
the MDA so that a sequence is send to the device only once. I forgot how
exactly that works, but it may be possible to do something similar in
the Arduino adapter.

Best,

Nico




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hardware-based synchronization sequence length

JonD
Nico Stuurman-2 wrote
The ASI adapter has a setting to "trick"
the MDA so that a sequence is send to the device only once. I forgot how
exactly that works, but it may be possible to do something similar in
the Arduino adapter.
I wrote that bit of code, it is described in the paragraph starting "There is a further feature" on https://micro-manager.org/wiki/ASIStage.  You can see the implementation by looking at the code in ASIStage.cpp and searching for everywhere the variable "runningFastSequence_" is used.

Jon

-------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: (541) 461-8181 x118
-------------------------------------------

Loading...