generating AO waveform with NI board

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

generating AO waveform with NI board

Nikita Vladimirov

Hi, everyone,

I am new to MM and am trying to control a galvo with AO waveform generated by a National Instruments board PCIe-6321.

I successfully connected to the board using NI100x driver and can set the output voltage via script like

> core.setProperty("AnalogIO", "Volts", 1.0);

But this is a far cry from generating a waveform (long pre-defined sequence at rate ~ 1KHz), in a hardware-triggered mode.

I searched the mailing list archives but could not find any code snippets which would do this.

Has anyone solved this problem and can point me to some code examples?

Many thanks, and Happy Holidays!

Nikita

-- 
Nikita Vladimirov, PhD

Preibisch Lab
Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center for Molecular Medicine (MDC)
Robert-Rössle-Str. 10
Bld. 89, room 1.08
13125 Berlin
twitter.com/nvladimus
github.com/nvladimus

------------------------------------------------------------------------------
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
|

Re: generating AO waveform with NI board

Kyle Douglass

Hi Nikita,


There is a some-what recent and related post on the list here:

http://micro-manager.3463995.n2.nabble.com/Getting-a-DAQ-analog-output-to-send-out-a-constant-sin-wave-td7588567.html#a7588573


A labmate and I looked into using the NI100x device adapter for sinusoidal waveform generation, but we concluded that it exposes an insufficient subset of the NIDAQmx library for this purpose. I think its original intent was to allow the NIDAQ device work in MM's sequenceable acquisitions.


If you can confirm this, then perhaps you could try writing your own device adapter by starting from the current one: 

https://github.com/micro-manager/micro-manager/tree/master/DeviceAdapters/NI100X


Other possible solutions are Austin Blanco's TriggerScope (

http://www.triggerscope.com/) , an RPC call to something with more complete NIDAQmx integration, like MATLAB, or making your own from an Arduino.


Cheers,

Kyle


Dr. Kyle M. Douglass
Post-doctoral Researcher
EPFL - The Laboratory of Experimental Biophysics
http://leb.epfl.ch/
http://kmdouglass.github.io

From: Nikita Vladimirov <[hidden email]>
Sent: Thursday, December 28, 2017 5:59 PM
To: [hidden email]
Subject: [micro-manager-general] generating AO waveform with NI board
 

Hi, everyone,

I am new to MM and am trying to control a galvo with AO waveform generated by a National Instruments board PCIe-6321.

I successfully connected to the board using NI100x driver and can set the output voltage via script like

> core.setProperty("AnalogIO", "Volts", 1.0);

But this is a far cry from generating a waveform (long pre-defined sequence at rate ~ 1KHz), in a hardware-triggered mode.

I searched the mailing list archives but could not find any code snippets which would do this.

Has anyone solved this problem and can point me to some code examples?

Many thanks, and Happy Holidays!

Nikita

-- 
Nikita Vladimirov, PhD

Preibisch Lab
Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center for Molecular Medicine (MDC)
Robert-Rössle-Str. 10
Bld. 89, room 1.08
13125 Berlin
twitter.com/nvladimus
github.com/nvladimus

------------------------------------------------------------------------------
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
|

Re: generating AO waveform with NI board

Nikita Vladimirov

Hi, Kyle,

Thanks a lot for very informative answer. As much as I am excited about MM and open source, it seems that I need to return to LabView. It's quite a pity..

Thank you,

Nikita


On 02/01/2018 07:39, Kyle Michael Douglass wrote:

Hi Nikita,


There is a some-what recent and related post on the list here:

http://micro-manager.3463995.n2.nabble.com/Getting-a-DAQ-analog-output-to-send-out-a-constant-sin-wave-td7588567.html#a7588573


A labmate and I looked into using the NI100x device adapter for sinusoidal waveform generation, but we concluded that it exposes an insufficient subset of the NIDAQmx library for this purpose. I think its original intent was to allow the NIDAQ device work in MM's sequenceable acquisitions.


If you can confirm this, then perhaps you could try writing your own device adapter by starting from the current one: 

https://github.com/micro-manager/micro-manager/tree/master/DeviceAdapters/NI100X


Other possible solutions are Austin Blanco's TriggerScope (

http://www.triggerscope.com/) , an RPC call to something with more complete NIDAQmx integration, like MATLAB, or making your own from an Arduino.


Cheers,

Kyle


Dr. Kyle M. Douglass
Post-doctoral Researcher
EPFL - The Laboratory of Experimental Biophysics
http://leb.epfl.ch/
http://kmdouglass.github.io

From: Nikita Vladimirov [hidden email]
Sent: Thursday, December 28, 2017 5:59 PM
To: [hidden email]
Subject: [micro-manager-general] generating AO waveform with NI board
 

Hi, everyone,

I am new to MM and am trying to control a galvo with AO waveform generated by a National Instruments board PCIe-6321.

I successfully connected to the board using NI100x driver and can set the output voltage via script like

> core.setProperty("AnalogIO", "Volts", 1.0);

But this is a far cry from generating a waveform (long pre-defined sequence at rate ~ 1KHz), in a hardware-triggered mode.

I searched the mailing list archives but could not find any code snippets which would do this.

Has anyone solved this problem and can point me to some code examples?

Many thanks, and Happy Holidays!

Nikita

-- 
Nikita Vladimirov, PhD

Preibisch Lab
Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center for Molecular Medicine (MDC)
Robert-Rössle-Str. 10
Bld. 89, room 1.08
13125 Berlin
twitter.com/nvladimus
github.com/nvladimus


------------------------------------------------------------------------------
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

-- 
Nikita Vladimirov, PhD

Preibisch Lab
Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center for Molecular Medicine (MDC)
Robert-Rössle-Str. 10
Bld. 89, room 1.08
13125 Berlin
twitter.com/nvladimus
github.com/nvladimus

------------------------------------------------------------------------------
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
|

Re: generating AO waveform with NI board

JonD
Administrator
Nikita Vladimirov wrote
> Thanks a lot for very informative answer. As much as I am excited about
> MM and open source, it seems that I need to return to LabView. It's
> quite a pity..

It's worth considering a shared LabView and Micro-Manager solution.  E.g.
use LabView to load the waveform and configure the DAQ card, but then
Micro-Manager does everything else including triggering the DAQ card.

Also it's worth a glance at the device adapter source code to see if you
could easily add the functionality you require.

**commercial plug**  To add to the list of devices Kyle gave: ASI makes a
DAC card for our Tiger controller that should meet your needs.  We also make
a scanner with an integrated 2D MEMS mirror that can replace stand-alone
galvos in many (but not all) galvo applications; lots of control options are
built into the firmware and exposed in Micro-Manager.  **end commercial
plug**

Jon

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







--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
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
|

Re: generating AO waveform with NI board

Nikita Vladimirov
Hi, Jon!

Thanks for your comments. I was planning to do exactly what you
suggested: run the camera in MM and listen to its output trigger in
LabView-controlled NI DAC card that generates hardware-triggered AO
waveforms. Not ideal, but takes the best from both platforms. I already
decided on the hardware side, but thanks for commercial info - good to
know for future.

Best regards,

Nikita


On 03/01/2018 00:01, JonD wrote:

> Nikita Vladimirov wrote
>> Thanks a lot for very informative answer. As much as I am excited about
>> MM and open source, it seems that I need to return to LabView. It's
>> quite a pity..
> It's worth considering a shared LabView and Micro-Manager solution.  E.g.
> use LabView to load the waveform and configure the DAQ card, but then
> Micro-Manager does everything else including triggering the DAQ card.
>
> Also it's worth a glance at the device adapter source code to see if you
> could easily add the functionality you require.
>
> **commercial plug**  To add to the list of devices Kyle gave: ASI makes a
> DAC card for our Tiger controller that should meet your needs.  We also make
> a scanner with an integrated 2D MEMS mirror that can replace stand-alone
> galvos in many (but not all) galvo applications; lots of control options are
> built into the firmware and exposed in Micro-Manager.  **end commercial
> plug**
>
> Jon
>
> --------------------------------------------
> Jon Daniels
> Applied Scientific Instrumentation
> 29391 West Enid Rd, Eugene, OR 97402
> Phone: (541) 461-8181 x118
> --------------------------------------------
>
>
>
>
>
>
>
> --
> Sent from: http://micro-manager.3463995.n2.nabble.com/
>
> ------------------------------------------------------------------------------
> 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

--
Nikita Vladimirov, PhD

Preibisch Lab
Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center for Molecular Medicine (MDC)
Robert-Rössle-Str. 10
Bld. 89, room 1.08
13125 Berlin
twitter.com/nvladimus
github.com/nvladimus


------------------------------------------------------------------------------
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
|

Re: generating AO waveform with NI board

Karl Bellve-3
In reply to this post by Nikita Vladimirov


On Thu, Dec 28, 2017 at 12:00 PM Nikita Vladimirov <[hidden email]> wrote:

Hi, everyone,

I am new to MM and am trying to control a galvo with AO waveform generated by a National Instruments board PCIe-6321.

I successfully connected to the board using NI100x driver and can set the output voltage via script like

> core.setProperty("AnalogIO", "Volts", 1.0);

But this is a far cry from generating a waveform (long pre-defined sequence at rate ~ 1KHz), in a hardware-triggered mode.

I searched the mailing list archives but could not find any code snippets which would do this.

Has anyone solved this problem and can point me to some code examples?

Many thanks, and Happy Holidays!

Nikita



My original ITC18 device adapter, which predates the µManager Hardware Control API, can generate AO waveforms at 1 or 10 kHz.

However, I only wrote it specifically for the ITC18, which costs $$$ and because it predates the µManager Hardware Control API, I didn't write it for that either. :(

But, you could use it as an inspiration to modify the NI100x driver. I basically load an external file with all the values, load them into the DA's buffer, and constantly feed its buffer, asynchronously from µManager. This is independent of the camera or needing to be triggered by the camera. I have a whole script system to create these AO/TTL files that gets loaded by µManager.



Cheers Karl

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School
 

------------------------------------------------------------------------------
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
|

Re: generating AO waveform with NI board

Matthijs
Karl Bellve-3 wrote
> However, I only wrote it specifically for the ITC18, which costs $$$

Worse still, when I last inquired with HEKA, they told me the ITC-18 is now
officially discontinued. The times, they are a-changing.

All the best,

  Matthijs




--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
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
|

Re: generating AO waveform with NI board

AustinBlanco
I figured I’d mention the new Triggerscope v3, released today, can support AO generation from -10V to +10 V at a step speed of 20us. 
Not sure if that will work for the original poster’s needs, but if it does here’s the product page. 
I specifically added the negative output range to support stuff like this, so I hope some will find it useful. 


Austin Blanco
Advanced Research Consulting Corporation
e. [hidden email]




On Jan 3, 2018, at 6:22 AM, Matthijs <[hidden email]> wrote:

Karl Bellve-3 wrote
However, I only wrote it specifically for the ITC18, which costs $$$

Worse still, when I last inquired with HEKA, they told me the ITC-18 is now
officially discontinued. The times, they are a-changing.

All the best,

 Matthijs




--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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
|

Trigger Scope 3 (was Re: generating AO waveform with NI board)

Karl Bellve-3

On Wed, Jan 3, 2018 at 3:46 PM Austin <[hidden email]> wrote:
I figured I’d mention the new Triggerscope v3, released today, can support AO generation from -10V to +10 V at a step speed of 20us. 
Not sure if that will work for the original poster’s needs, but if it does here’s the product page. 
I specifically added the negative output range to support stuff like this, so I hope some will find it useful. 


Austin Blanco
Advanced Research Consulting Corporation
e. [hidden email]


Hi Austiin,

The Triggerscope-3 looks really great. I love the exposed PCB design. The Arduino Mega footprint is easy to see. I assume that (0-5V) default Arduino ADCs as well, just not exposed via SMC?

I can't find the buffer, or number of samples it can hold before needing filling/reading by computer, or clock rate for sample update. Are the TTL/DAC simultaneously updated or sequentially? 

Cheers Karl

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School

 

------------------------------------------------------------------------------
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
|

Re: Trigger Scope 3 (was Re: generating AO waveform with NI board)

AustinBlanco
Thanks Karl!

It’s running on the Due, I support 5V TTL I/O using level shifters.

None of the AI pins are exposed, but this would be an interesting addition for external data capture. 
The switch arrays can hold 1,200 execution lines. ( memory registers are assigned for every ttl and dac line)
This can be increased if needed. The due has 1/2MB of memory to use, which is nice working room :-)

Both sequential and serial change states are supported.

A program line can be set up to execute any # of DAC/TTL lines, so for instance program line #1 may only set one TTL from high to low. 
Or, program line # 2 may set 5 different DAC levels, and switch on 5 TTL’s.

Program lines are cycled either by external trigger, or a timer, depending on user’s needs.

Switch time for DAC or TTL is 18us if using the sequence mode, so in the above case of 10 total changes, the total time to get all of those outputs switched would be 180-200us. 
For the first line to execute and return, it would be 18us. I spec 20 to account for settling.

Austin Blanco
Advanced Research Consulting Corporation
e. [hidden email]
w. www.advancedresearch.co
c. 510.708.2995





On Jan 9, 2018, at 9:13 AM, Karl Bellve <[hidden email]> wrote:


On Wed, Jan 3, 2018 at 3:46 PM Austin <[hidden email]> wrote:
I figured I’d mention the new Triggerscope v3, released today, can support AO generation from -10V to +10 V at a step speed of 20us. 
Not sure if that will work for the original poster’s needs, but if it does here’s the product page. 
I specifically added the negative output range to support stuff like this, so I hope some will find it useful. 


Austin Blanco
Advanced Research Consulting Corporation
e. [hidden email]


Hi Austiin,

The Triggerscope-3 looks really great. I love the exposed PCB design. The Arduino Mega footprint is easy to see. I assume that (0-5V) default Arduino ADCs as well, just not exposed via SMC?

I can't find the buffer, or number of samples it can hold before needing filling/reading by computer, or clock rate for sample update. Are the TTL/DAC simultaneously updated or sequentially? 

Cheers Karl

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School

 
------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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