LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass data to Strictly typed VI Reference

Solved!
Go to solution

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"? 

 

vi_example.png

 

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.

0 Kudos
Message 1 of 7
(1,834 Views)
Solution
Accepted by topic author Christianidis

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!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(1,812 Views)

I think I found it. Like this: right?Call_by_reference.png

 

 

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.

0 Kudos
Message 3 of 7
(1,792 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(1,777 Views)


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.

0 Kudos
Message 5 of 7
(1,773 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(1,769 Views)

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!

Untitled.png

 

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.

0 Kudos
Message 7 of 7
(1,657 Views)