LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify variables in a fitting model?

Solved!
Go to solution

I am using the constrained non-linear curve fit VI to fit a non-linear curve and I am using it in the mode where you supply the reference to the VI to do the fitting model. (The dark teal wire wired to the fitting vi)


In my fitting parameters I have n1 and d (refractive index and thickness), however, I also have parameters that I'd like to change on my front panel such as wavelength (lambda) and refractive index n0 and n2 of the surrounding media. I was just inserting these values as constants before (setting as 1.519, etc.) but now I have the need to change them without having to rewrite the reference to the VI every time. How do I do this?

0 Kudos
Message 1 of 3
(2,301 Views)

Hi bravedonxiote,

 

Can you attach your VI or snapshots...? It will be more helpful to understand

0 Kudos
Message 2 of 3
(2,274 Views)
Solution
Accepted by topic author bravedonxiote

Use the "data" input (on the top of the conpane but not identified in the Context Help window). This a Variant data type so you can wire anything to it.  You can use a cluster or for cases where all the data is of the same type an array.  Use a typedefed cluster with named elements and it becomes quite easy to document what is happening in the function VI. Use the Variant to Data function inside the function VI with a constant of the typedef cluster wired to the datatype input.

 

Lynn

Message 3 of 3
(2,234 Views)