09-27-2012 01:53 AM
I'm trying to control a spatial light modulator (Hamamatsu Photonics, X10468 SLM) using LabVIEW. The connections and LabVIEW program are as shown. When I move the image window
generated by IMAQ WindMove, the display on SLM changes. Why is it so ?
07-15-2013 01:39 PM
Hi Alice12,
Your USB to DVI converter creates a second (or third) monitor. These days, most spatial light modulators work as an additional monitor. Whatever the computer displays on that second monitor (program windows, the desktop, your mouse pointer) will be "displayed" on the SLM. To display an image on the SLM, you need to create a window to display the image and then put that window on the second monitor. That's what the WindDraw and WindMove VIs do -- they create a window to display your image and position the window on the second monitor. Of course, if you move that window, the SLM display will change. The SLM is displaying whatever your computer puts on the second monitor.
While developing and testing your program, it is very helpful if you can temporarily replace the SLM with an actual second monitor. If at all possible, get a monitor with a DVI input, connect it to your USB to DVI converter, and set it to a resolution that is as close as possible to your SLM (looks like 792x300 according to your program). Then it will be easy to see what will actually be displayed on the SLM. Once your program is 100% working and you want to run your experiment, unplug the extra monitor and plug the SLM in.
A couple of other tips: You can replace those For loops with a single Initialize Array function (on the Programming > Array palette) -- resize it vertically to be the right number of array dimensions, then create a numeric constant with the value you want each element of the array, and right-click on the numeric constant and select Representation > U8. Also, the IMAQ manual says you should call IMAQ WindClose when your program is done (I have little experience with IMAQ).
Does this help? Some of the specifics of getting the second monitor working properly depend on your operating system, so if you still need assistance it would be helpful to know what OS you're using and which version it is.
07-26-2016 10:13 AM
Hi Alice12, I need to do the same thing as you, i.e. control the Hamamatsu SLM with Labview. I wonder if you have figured out the solution, could you please share it? Thanks!