LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to link Zemax externally to Labview for a specific operand caclulation

Hello,
 
 Is there anyone out there crazy enough to have tried to use LabView to process data generated by an optical simulation software called Zemax?
 
I'm trying to build a subroutine from Zemax that can use an externally called LabView code to compute a specific value, which is called "operand" in Zemax's optimization algorithm.
 
I know that Zemax can do this using Matlab commands, which is OK, but it is much easier actually to do the operations in LabView. However, nobody has done this at the Zemax support center...
0 Kudos
Message 1 of 4
(4,383 Views)
Hi,

I have not used Zemax but I can try to help you out. What does operand mean? It sounds as though you are trying to export labVIEW code into Zemax. I searched through the data that we have here to find if anyone else has used this Zemax and unfortunately I couldn't find anyone.
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(4,370 Views)
Hello,
 
 Thanks for your help!
 
 An 'operand' is an operation that this program, ZEMAX, performs using parameters and results obtained from a given optical simulation. The simulation is carried out by Zemax, and the heart of the design process consists in optimizing the parameters such that the value of 'operand' is minimized. Zemax has a pretty powerful optimization routine, but lacks enormously the capability to come up with useful 'operands'. As a consequence, one usually ends up exporting Zemax results into programs such as C++, Matlab, or LabView (in my case), where mathematical operations on large sets of data are much quicker and simple to implement. Then the problem is to go back to Zemax and stick the value of 'operand' into their optimization routine. In principle, Zemax is designed to be able to do this export-import operation, based on a 'DDE' platform. However, most examples in the manual are geared towards C++ or Matlab, and seem pretty obscure to me. I'm pretty sure that I can implement this 'DDE' communication from LabView, but have no idea where to start...
 
 I'm attaching a 'DDE' code example written in C. This code is supposed to be called from Zemax, once an optimization routine is started. The code itself is a C program that calculates some operation on data imported from Zemax, and then return a value back to Zemax.
 
Let me know if you can find equivalent expression or structures in LabView....
0 Kudos
Message 3 of 4
(4,354 Views)

Hi Gorduix,

There are multiples ways to interface with LabVIEW. By .NET, text based programming languages or through DLLs. 

My suggestion would be to interface to Zemax through one of the above methods. If Zemax allows you to create a DLL, that would probably be the easiest out of the three.


An overview of accessing DLLs or shared Libraries from LabVIEW
Starting Point: External Code for LabVIEW- CIN/DLL

I hope this helps!

 
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(4,335 Views)