Hein,
Here's an example of the kind of sub-vi I
think you're looking for: just a simple matrix gain block. The gain matrix is held inside the sub-vi as a numeric constant, representing the gain of a particular optical element. There's a single numeric input matrix and a single numeric output matrix, so you can easily string a bunch of these together end-to-end to represent your entire optical system.
Just setup the constant matrix values properly and save with a unique name for each particular optical element. Then as you wire from one to another, each stage will apply that element's gain, and you can quickly look at the effect of different combinations.
Just to clarify the matrix multiplication: with an input matrix A and an
internal gain G, the output will be G*A.
A future development may be to have a single top-level gain vi you always call along with an enum that specifies which optical element sub-vi gain to apply. Be sure to include a unity gain option as a quick way to simulate removal of a particular element from the optical path.
-Kevin Price
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).