ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scanning circle and rectengular lens with laser beam

hello! i am a physicist and i have a training now,and i have to do a labview program.it is about lasers and lenses.my job is to make a program that control the lens.when the laser beam comes the lens ,it must scan every part of the lens.lets say my lens is circle firstly laser comes on the center then it starts to scan to the right and when it reaches at the end it jumps up and continue to scan.i want to scan every part of the circle.and i want to show this on a table and a graph.so it is circle and i have parameters x , y , r (radius) , and ST (step weight).and i want to control which point i want to scan on the circle.the problem is i cant do this program.because i am new in labview.i dont have a backround about programs.can somebody help me please? how can i do? and can somebody do this program for me and post me?it is so important for me...i am waiting your answers.thank you very much for your answers...sorry for english
0 Kudos
Message 1 of 9
(5,115 Views)

Greetings!  I, too, am a physicist, so I know what you are facing.  I, too, have no formal training in software.  However, you can not be an effective physicist without knowing how to program a computer, so you need to learn.  LabVIEW is a good language for a physicist to know, since it was designed for data acquisition, data analysis, and instrument control.  We cannot teach you LabVIEW in a developement forum, but we can point you to some resources.  Online, you can find LabVIEW Zone Learning Center.  The first link is a "getting started" guide.  Alternately, you can look at the getting started guide that comes with LabVIEW.  Open Help->Search the LabVIEW Help...  When the help file opens, click on

LabVIEW Documentation Resources.  Under Print Documents, select Getting Started with LabVIEW.  There are also many LabVIEW tutorials on the web (e.g. LabVIEW for Dummiees).  There are many books on the subject (e.g. LabVIEW for Everyone).  You can also contact your local National Instruments office and take courses on how to program LabVIEW (these are normally one week each).  Take a few days and learn the basics of data acquisition, instrument control, and data analysis/display.  Then start solving your actual problem.

 

For us to help you further, we will need much more information.  Some examples of this are:

  1. Why are you scanning the lens with a laser?  Do you need to acquire data while scanning or is it simply to irradiate the lens?  Is this just an exercise to teach machine control?
  2. What hardware are you using the scan the laser - galvanometers, XY stages?
  3. What is the interface between the laser scanner and the computer - GPIB, serial, DAQ board, custom/proprietary?
  4. Are there any time constraints?
  5. Is there a LabVIEW API for the scanning system?
Scanning a lens with a laser can be either very easy or very hard, depending on the answers to the above questions.

Good luck!  Have fun learning LabVIEW.
Message 2 of 9
(5,091 Views)

thank you for your advice...

        firstly,I have only 1 weak to finish my job.i want to tell about my job clearly now.i am a bacelor student and my supervisor who is a phd student,he is going to make an experiment about laser and cristals(lens).i am not working in a laboratory.

        so, he said me, make a program that is first part of the main program.and my goal is in this program that there are cristals which are shaped circle and rectengular.he said.the aim of the experiment is when the U_V laser comes to the cristal to destroy a molecule or an atom.we will measuere how much energy is needed to destroy them.and he said me make aprogram to move the cristal.and i want to scan all part or a part of the cristal which are circle and rectangular.

        lets say firstly laser comes to the centre of the cristal and move right or whatever direction.and i have a parameters x,y ,r(radius),st(step weight),so if i want to see (5,10) coordinates to scan i can enter the x and y datas.or if i want to scan a circle cristal in boundary of radius =5cm.so my aim is control the cristal.when i finish my part of the program then he will add and improve my program with formulas and other acquire datas.

        it is just this not so complicated.but for me yes it is complicated.and he told me above information about the program.not details about the experiment.i have to make this program in a few days. if you make this program and post me i will appreciate to you.because i couldnt make.sorry for english.i am waiting your answers as soon as possible.

       thank you for your interest.

0 Kudos
Message 3 of 9
(5,069 Views)

hi anfora,

 

first thing you need to do is to get more time, relly.

When I was before my BA, I programmed a photogoniometer (which was for lens scanning, polar coordinates only). But had LV-Experience before. Total was around 75 hours

 

You will need at least 3 days to learn LV basics.

 

For the remaining part, is there already some LV code? You need just to do a coordinate transformation (caartesion to polar)? Or do you need to write it from the scratch (complete apllication)? That's half a day to 2 month work difference.

 

Felix 

0 Kudos
Message 4 of 9
(5,057 Views)

 hi felix...

 

For the remaining part,  there isnt  LV code.i dont need a coordinate transformation.i want to just scan the cristal with parameters.and i want to show  this on the front panel with x -y table maybe we can add x-y chart.

          not so complicated that you think.i am waiting your answer.see you

 

 

0 Kudos
Message 5 of 9
(5,047 Views)

Use an XY Graph on your front panel.  Start your program by simply plotting the points you want to scan to this graph.  Use a FOR loop set to the number of points to scan.  Set up the coordinates as a array of clusters, each cluster containing two DBL scalars labeled X and Y for your X and Y coordinates.  The examples I pointed to above will tell you how to do this.  This should take you about four hours and you will know a lot more LabVIEW.

 

Now wire the plot coordinates to whatever interface you are using to move the laser.  You may want to put a delay in the loop to prevent it from executing too fast.  This will depend on your interface.  Delays are built into some of them.  This should take you another four to eight hours and again you will learn more LabVIEW.

 

Then you can explore other options, such as creating the scan points from a pattern or reading them from a file.  This should take another day or two.

 

If you can, find someone local who knows LabVIEW to give you some help.  This could shorten the whole process considerably. However, make sure you do all the work so you learn how to do all this stuff.  It is not particularly hard, but it is a lot to learn all at once.  I taught myself the basics of LabVIEW 3.0 under similar circumstances in about four days while completing a more complex project.  You can do it.

0 Kudos
Message 6 of 9
(5,038 Views)

hello DFgray

thank you for your information.i will try your method. but i attached my vi,maybe it can help you to understand my job.i made this vi but it doesnt work efficiently.i am confused.i wrote circle equatin in the formula node and also i want to write rectangular equation.but i think i should use case structure.can you correct my vi and send me?lets say i want to scan a circle with radius =5 and i want to see it on the front panel.with step weight 0,5 and my centre of the circle will be 0.you can use table to show every coordinates in this area.this is just what i want.can you do this for me?it takes i think 15 or 20 minutes for you.the problem is i cant make an algorithm.

thank you.

0 Kudos
Message 7 of 9
(5,033 Views)

From your previous posts, I thought you were scanning in a circle, but it appears from your code you want to raster scan.  Here are a few things you can do to improve the code:

  1. You missed a square root in the circle equation.  This can also be easily implemented without the formula node.
  2. There is a -1 primitive in the arithmetic palette right under the +/-/*//.  Don't confuse it with the negate (-x) operator.  You can use this to replace the locations you are using the expression node.
  3. Don't use a local when you can use the terminal.  Replace the SW local in your loop with the SW terminal which is currently unconnected below the loop.  In general, locals should only be used for user interface interaction when the terminal is in use somewhere else.  Never use them as a way of passing data.
  4. The array creator between the bundle and the graph is unnecessary.  The XY graph takes several data types.  A bundle consisting of an X array and a Y array is one of them.  I originally suggested and array of bundles, each bundle containing a single X and Y point, which is another valid data type.
  5. The calculation for the stop condition of the inner loop can be moved outside both loops, since it is static.  This, in itself, is a problem, since a raster scan will have the y limits increase, then decrease if scanning a circle.  This calculation should be in the outer loop and dependent upon the particular scan line.  Don't forget that a circle is symmetric.  You need both plus and minus limits.
  6. Use FOR loops instead of WHILE loops.  The number of points in each of your scan lines is easily calculated.  FOR loops are more efficient than WHILE loops.
You really need to find someone locally to help you.  I answer these posts once a day (I do actually write code for a livingSmiley Happy).  You need more frequent feedback to finish on time.
0 Kudos
Message 8 of 9
(5,000 Views)

I wrote a sample program which does something very similar. 

Basically its a beam scanner program.  

you can check it out and use it. if it fits you.

 

http://decibel.ni.com/content/docs/DOC-4358 

 

all the best.

Yoni.  

 

0 Kudos
Message 9 of 9
(4,814 Views)