03-11-2019 04:20 PM
Hi all,
I used a dual-axis galvo mirrors to do the x-y scanning, x direction is triangle wave generated by waveform generation vi, y direction goes up in one direction. For the waveform generation vi, I am confused about the meaning of the sampling rate, number of samples and frequency. How do these parameters relate with the scanning rate, and the scanning dimension? For example, if I want the scanning rate is 104800 pixels/second, and scanning dimension is 1024 pixels per row, 512 rows in total. How should I set the he sampling rate, number of samples and frequency? The unit of sampling rate in waveform generation vi seems HZ, not pixels/second.
Another question is I want to monitor the scanning time for one image, what should I do about the program?
Please see the attached VI.
Thanks,
Mei
03-12-2019 12:27 PM
A couple of points:
Bob Schor
03-12-2019 01:22 PM
Hi Bob,
Thanks for your reply. But I still have some questions:
1. What do you mean by 'non-parallel scan lines' in your point two? If I use the rising edge of the triangle wave for scanning like from left to right, then use the falling edge scanning from right to left, and add one extra data at the turn-around position to equal the number. Like a snake scan(please see the attachment), is this OK? If I can use this scanning mode, do I still need to consider the intermittent sampling?
2.In my assumption, the sample rate should be set as 104800 S/s (including the intermittent sampling), but What is the frequency and number of samples setting? number of sample is 1024? frequency is decided by the scanning time I want? If for 1024 x512 image, I hope the scanning time 5s in total. Should the frequency be set at 1/(5/512)=102.4 HZ?
Thanks,
Mei
03-12-2019 01:34 PM
@M.Mei wrote:
2.In my assumption, the sample rate should be set as 104800 S/s (including the intermittent sampling), but What is the frequency and number of samples setting? number of sample is 1024? frequency is decided by the scanning time I want? If for 1024 x512 image, I hope the scanning time 5s in total. Should the frequency be set at 1/(5/512)=102.4 HZ?
Sorry, I think this calculation for frequency is not right... If the number of sample is right, the frequency should be 104800/1024= 102.34 HZ. But how do I change the scanning time?
Thanks,
Mei
03-12-2019 05:26 PM
Hello, Mei.
I think you are right about the "snake-scan" -- it is certainly simpler to reverse the motion of the mirror (and takes less time!) than to "zip" it back to the beginning.
I looked at your numbers again. First, let me (for reasons that will become clear, namely "doing the math in my head") change the sampling rate from 104800 S/s to 102400 S/s. Now we'll do 1024 samples per row, which takes ... 1024/102400 = 0.01 sec, and you want to do 512 rows, which takes 5.12 sec. This seems too "neat" a package -- are you sure the sampling rate is 104800, not either 102400 or 204800? [Maybe the extra 2400 samples/sec are for "end-of-row/end-of-column" extra time].
What do you do after a scan? Do you do a "double-snake" and make Y's waveform also a triangle wave, or do you just do a single pass? And, the Big Question, does it work?
Bob Schor
03-14-2019 04:20 PM
Hi Bob,
Thanks, and sorry for my late reply.
For the sample rate 104800 S/s, it is an example, I think an example will be easier for the explanation. So, I do not need to care about the frequency, only set the sample rates and number of samples?
For X, I will choose the snake scan, and for Y, I intend to use half triangle wave or just some discrete linear numbers same with the scanning rows to do the x-y scanning. I only need one image per time, so single pass should be fine. I do not know whether it works now because something wrong with wave data..
Thanks,
Mei