06-21-2018 08:00 AM
Hi,
I am working on project where I have to scan the rectangular area of the cells in raster manner by using dual galvano mirrors.
I made VI which is intended to scan in raster manner, but unfortunately it is not working in a right way and instead of scanning in raster manner it scan diagonally between the input range.
I have attached image which shows the raster pattern I wanted to scan.
I also have attached the VI which I use for scanning(I use two diff VIs).
I have attached the video as well to see how it scans right now.
and if anyone know another solution apart from this two VI than it also be good.
Solved! Go to Solution.
06-21-2018 10:42 AM
You picture "Raster.png" shows, in fact, the common form of a Raster. It consists of a unidirectional (we'll say Left-to-Right) horizontal scan at a controlled rate, followed by a "fly-back" quick Right-to-Left return to the left edge while simultaneously moving down one scan line to begin the next sample.
If you are creating a raster using movement along Cartesian (X, Y) axes, this horizontal scan/diagonal "fly-back" is probably the most common model of scans, used in (analog) Video devices (the electron beam moves this way). The "catch", of course, is that you generally move the beam at two speeds, "Scan" and "Fly-Back", two "time" intervals, one where data are taken/displayed, and another where it is "ignored", and a "busy" Axis (X, generally) and one that moves a scan line every sweep (Y). [Note -- Videos often "interlace", doing even scan lines in one pass, followed by the odd scan lines, but the principle of a "fast" and "slow" axis is still valid].
It occurs to me that if you are doing the scan, yourself, you might try scanning back and forth. The Odd Scans go horizontally L->R. At the end, you stop the mirror, step down one Scan line on the Y axis (a short step), then on the Even Scan go R->L. This minimizes the large "Fly-Back", though you'll still have the same situation when you get to the bottom of the Scan, and need to move Y back to the top. But ... no reason you can't use the following scheme:
This "messes up" the timing some, but saves "wear and tear" on the mechanics, and if there are multiple scans per "event-of-interest", this might be a useful tradeoff.
To implement a conventional raster, the algorithm goes like this:
Note that you'd need to test the timings -- galvo mirrors are pretty good, but they don't instanteously start and stop.
Bob Schor
P.S. -- I haven't (yet) looked at your code. This is in response to your pictures, to clarify that your Raster picture is what you should expect to see. You need to know "when to sample" and "when to wait", which will require a more complex sampling scheme.
06-22-2018 01:01 AM
hi,
I went through your raster scan vi. you have to just make a little change and it will work. Just send the a double array of xy cordinates with voltage factor to output and you can perform the raster. Refer to the image below.
06-22-2018 08:08 AM
Hi,
Thank you very much for providing me the solution and it is working in right manner in which it should be
06-22-2018 08:56 AM
Glad you've got this part working *almost* right. Technically, the AO and AI tasks still aren't locked into hardware-level sync. As illustrated, the tasks will start at *nearly* the same time, but there's no guarantee which starts first or how much earlier.
Please follow some of the links I pointed you to in other threads to see how get that last little bit of hardware-sync guarantee by sharing a sample clock.
-Kevin P
06-22-2018 10:41 AM
Hi,
Yes the scanning is done, now I have to sync the AI and AO and I will have a look the threads you pointed before and I will try to make the things by myself.
Thank you very much again for the help.I really appreciate the way you helping me as well others.
10-10-2024 07:19 PM
I wonder if you can tell me the electrical connections between the 2-axis galvo driver board and your NIDAQ USB with 2 analog ouputs. Since the tholabs munual gives me the instructions that we should use the three wire: one + the other - and a ground wire. I can see that the ground wire should connect to the ground in NIDAQ. But I was confused about how to connect the other two +/- wires. As you said before, one analog output can control one-axis galvo, which means the + wire should connect to one analog output. So, what about the - wire? Do I need to also connect the - wire to the ground of the NIDAQ? Thanks a lot.