Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition using dual axis galvo mirrors

Hi all,

I am pretty much new to Labview and thought I could ask for your help.

So, let me explain you what I am going to do in Labview at this time (Before, I wrote my program in C++, and know I want to implement it in Labview):

 

In my setup, I have a dual axis (x-y) galvonometer mirrors and an APD detector as a detector (Something like a CCD camera, let's assume).

In my first step, I want to control my x-y galvos with a sine/cosine waveform. My frame size is 512*512 (lines*lines).

Also, I want to triger it using two ways: (1) trigerring for each line (horizontal line) and (2) trigerring after a full frame gets acquired.

And, when the whole frame eventually gets acquired, I get the data as a 16bits raw/lossless/uncompressed image.

 

Looking forward to hearing from you shortly.

 

Ali

0 Kudos
Message 1 of 14
(7,978 Views)

Ali,

 

Interesting project.  You did not actually ask a question. What do you want help with?

 

It is not clear from your description what you are triggering.

 

What data acquisition equipment do you have?  That is, how are you converting the APD output voltage or current to digital? How are you converting your sine/cosine waveforms to current for the galvonometers?  How fast do you need to do this?

 

Lynn

0 Kudos
Message 2 of 14
(7,977 Views)

Hi Lynn,

Thanks for the reply.

I am using NIDAQ6125 PCIe card. I am using an APD module that gives output voltage. The line rate that I am aiming for here would be 1.5 kHz (x-mirror: 2KHz and y-mirror: 6Hz). There was a typo on my previous post. The correct frame size is 512*1024. I want to triger the x-mirror and y-mirror, so they work properly with respect to eachother (when the x-mirror swipes the first line (from left to right) and when it gets to the end, y-mirror moves up and then x-mirror again starts swiping (But this time from the right to the left),...==>Please find the image attached.

What I am doing currently to control the galvo in C++, is by controling the voltage. So here, I can use the proper voltage applying to the galvo-mirrors to control their amplitude/angel of rotation.

 

Thanks,

Ali 

0 Kudos
Message 3 of 14
(7,973 Views)

I'm looking at this primarily in terms of timing & syncing of AO and AI clocks & tasks.  I don't see a clear description of what you're after, so let me take a guess and try to go from there.

 

AO

------

- Predefine a buffer containing appropriate values for both the X and Y galvos to generate the desired

sweep pattern.   Looks like that will require at least 512x1024 values per channel.  The Y channel data

would be a stair-stepping pattern which only changes after each full sweep of X.  The X channel data

would be something like a triangle, with some curvature if values don't sweep linearly.  Y channel steps

would occur at the vertices of the triangle.

 

AI

---

- I'm gonna guess that you'll take only one AI reading per AO update and you just need them to be in sync.

 

When I've done stim-response stuff in the past, I would often generate my sample clock with a counter

so I can delay the AI as long as possible after an AO change to let it settle out.  Then I'd take my sample

*just before* the next AO update.  That's done by making a pulse train with a 90-95% duty cycle, using the

leading edge for the AO update and the trailing edge for the AI sample.

 

Sorry, that's all the time I've got now but hope it helps move you along a little more...

 

-Kevin P

 

 

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 4 of 14
(7,949 Views)

Hi Kevin,

Thanks for the help. I want to create a stair-step waveform (By choosing the Vmax, Vmin and the stepsize).I tried to build it but it seems hard. I am sure that should be an easy way out there that can create that.

Do you have any approcaches/suggestions or even an already built one for it to share?

 

Cheers,

Ali

0 Kudos
Message 5 of 14
(7,925 Views)

XY Scan.JPG

 

Using a simple nest of For Loops can easily build your raster waveform on-the-fly which allows you to trigger the camera dynamically and avoid have to synchronize your two systems (galvos & APD) in code.  

 

An APD is nothing like a CCD which is inherently XY and wouldn't need an XY scanner to take an XY image (just a lens).  I assume you're building a 2D point source object scanner?  Maybe with the intent of rotating your subject and generating a 3D model???

 

I'm not getting the need for Sin or Cos in a raster scan application.  You just need step and ramp like the loops provide.

 

I also suggest you don't try for bi-directional scanning if you care about image accuracy.  Having your scan line consistent means your image will be too. Bi-directional is tricky to sync up properly (but it can be done to avoid the wasted retrace of each X scan line.

 

Perhaps if you provide more details about your app we can help better...

 

BTW, please be honest and tell us if this is a school project. Smiley Wink

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 6 of 14
(7,915 Views)

Hi ,

 

Milind is here I am working on the same type of project where i have to scan the bio sample line by line for that,

I am using small beam galvano Mirror 2D system (Thor lab, https://www.thorlabs.de/newgrouppage9.cfm?objectgroup_id=3770), Lab-view, DAQ device (Ni USB 6361)

 

but I do not know How to write programme in LabView to function the mirror to scan line by line, so could you help me for the same ?

 

I am using sine,triangle, square and saw tooth wave.

voltage range +- 10V

rotation 0.8/1 degree

I have prepared the VI which makes mirrors to move, but do not know how to control them for the raster scanning.

 

please find attached Vi.

 

 

 

Message 7 of 14
(4,785 Views)

I have the same problem but in C#. I cannot find any implementation examples. 

0 Kudos
Message 8 of 14
(2,823 Views)

It's hard to find examples because no one really does this.  Most people will buy some type of scan controller that sends motion control signals to the XY galvo drivers AND clocks their laser control lines in a high speed, tightly synchronized manner.  That's very difficult with software and a DAQ card but very easy with an FPGA/CPLD-based dedicated controller.  Plus they come with nice software packages that make it easy to define patterns, characters, etc.  

Datasheet - SMC - V2.4.19.pdf (camtechfiles.s3-us-west-2.amazonaws.com)

SurfBoard-1 Scan Controller | Laser Marking | Nutfield Tech

 

Having said that, building your own laser scanner is very doable and would make a wonderful project for a college student or home-"Maker".  There's a lot of good quality laser scanners out there and even a pre-built XY scanhead can be put together cheaply with all the options available since 3D printing became so popular.

 

Your first step is to define the signals you will need but I would go back another step and just start with drawing a circle on the wall with a laser pointer.  Once you can do that you can turn it into a square, then raster pattern, then add a pulse train to synchronize your detector, etc.  Take it step at a time.

 

Post your hardware details if you want more specific help.  BTW, for name444 writing in C#, do you have NI Measurement Studio?  

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 9 of 14
(2,807 Views)

HI, I dont and I wont use Measurement Studio. I will use NI-DAQmx and C#. Do you have any examples?

0 Kudos
Message 10 of 14
(2,773 Views)