Hello All,
I'm quite new to this Labview programming having slowly been teaching myself over the past few months. I've just started a physics PhD and am developing a few programs to generate phase-only holograms (kinoforms) to run on an optics system I have constructed. The physics works fine and the results from the program do what i want them to.
However, the problem comes when I wish to improve my program. Ideally I would like to run it real time which intially posed me a few problems which I 'fixed' and it does now run in "real time". Unfortunately some of the programs run unexpectedly slow (some of them I expect to as they use 2D Fourier Transforms). The particular program in question does not use any fourier transforms and is thus the simplest one I use and hence I would expect it to run rather quickly but it doesn't.
I'm not sure why this is, it could be because of the large arrays I am using, at times 768 x 768 x N, and their use in For Loops. Or it could be something really obvious and stupid that a naive programmer such as myself has done wrong.
If anyone could take a look at my program and suggest any improvements, mostly to do with speed, I would be very grateful. Or indeed any criticism at all would be great. Below is a small list of instructions on how to run the program.
I've attached all the VIs as a Library "Kinoform Generation.llb" (this is also a first for me so here's hoping it works!)
Step 1. Load and Run "Gratings And Lenses.vi"
Step 2. Choose the size of Hologram you would like to generate on the dialog popup (256 works reasonbly fast but that really only gets used for testing the program and I ned to have ones 768 pixels in size)
Step 3. Choose where you would like the resulting hologram image window to popup on the dialog popup - I have it pop up on a secondary microdisplay in my laboratory - but you can also display it on screen by chosing appropriate pixel coordinates
Step 4. Push Start to start the VI and then click any of the number controls on the front panel to alter the desired pattern.
Please don't hesitate to ask me anything if I've made things unclear.
I hope someone can help, any advice and criticism would be greatly appreciated - I'm wanting to learn.
Thanks in advance
Daniel Burnham
P.S. If I get this one sorted out I'll no doubt see if someone can help me improve my more complicated ones that use Fourier Transforms in iterative loops! They really did cause me a headache!