08-10-2020 02:49 AM - edited 08-10-2020 02:53 AM
Hello. I was looking on the LabView's example of Ellipse fit VI (in folder: labview\examples\Mathematics\Fitting )
How do they pass data (The 'a' and 'X' arrays) to the "Model Eclipse"?
I am trying to understand it, since I want to make a model myself. I can make my 'Strictly typed VI Reference', but I cannot pass data to it.
Thank you.
Solved! Go to Solution.
08-10-2020 03:14 AM - edited 08-10-2020 03:24 AM
Hi Christianidis,
look inside the LevMar-VI to see how NI does it…
(Some subVI-levels deep there is a CallByReference node.)
It seems you already found the answer on your own!?
08-10-2020 03:32 AM - edited 08-10-2020 03:34 AM
I think I found it. Like this: right?
I wonder why LabView does not give you the option to select the inputs of your Reference directly, and instead you need to make use of another function, the 'CallByReference' function.
08-10-2020 03:47 AM
Hi Christianidis,
@Christianidis wrote:
I think I found it. Like this: right?
The LevMar-VI uses CallByReference itself, no need to call your VI before using CbR.
@Christianidis wrote:
I wonder why LabView does not give you the option to select the inputs of your Reference directly, and instead you need to make use of another function, the 'CallByReference' function.
But CbR gives you direct access to the in/outputs of the called VI, what else do you need?
08-10-2020 03:57 AM
But CbR gives you direct access to the in/outputs of the called VI, what else do you need?
No, I know, I am fine with that.
The LevMar-VI uses CallByReference itself, no need to call your VI before using CbR.
LevMar-VI needs to know my f(X,a) that I want my noisy data to fit. So I need to give it my model function, and this is done using a Vi-Reference.That is what LevMar Help says.
08-10-2020 04:07 AM
Hi Christianidis,
@Christianidis wrote:
LevMar-VI needs to know my f(X,a) that I want my noisy data to fit. So I need to give it my model function, and this is done using a Vi-Reference.That is what LevMar Help says.
Yes, and you need to provide a VI reference of the exact required type so LevMar can call this subVI using its CbR node. That's why it requires that exact connector pane to handover the parameters for your fit model function…
08-14-2020 07:52 AM
You are right.
I also found out another way to pass the data, which helps me pass even the data that are not properties of the L-M function. Using global variables!
Thats what I was actually looking for. Passing data to a sub-vi (for example L-M function) that are not already properties of this sub-vi.