LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting error: Wire: function conflict

Hi,

I'm trying to use the nonlinear fitting function to fit a custom equation to some data. I made a VI that goes through the equation (attached, I know there are ways to make it more simple and clean but right now I am just concerned with making functional fitting). When I try to attach it to the fitting VI in the format pictured, I get an error. Can someone please clue me in to what I'm doing wrong? I made sure the Static VI Reference was strictly typed.

 

Thank you!

Download All
0 Kudos
Message 1 of 4
(561 Views)

Making the reference strictly typed isn't enough.  The type has to match the connection pane that the VI in question needs exactly, and the "call by reference" node inline there shows that you have a default blank connection pane.

 

I don't have the most recent LabVIEW so I can't open your VI to verify, but it's likely this type definition it needs to match:

\vi.lib\gmath\NumericalOptimization\LM model function reference.ctl

 

If not it will be something similar.  Your VI will need to match whatever connection pane you get when you right click on the terminal of the VI it connects to and select "create constant", which will likely be this (or similar):

Kyle97330_0-1689007271543.png

 

Message 2 of 4
(550 Views)

Thank you, I see that same setup when I right-click the fitting VI and create a constant. It seems like you're saying that I made the equation's VI incorrectly. If that's the case, how should the equation's VI be made in order to be compatible with what the fitting VI expects?

0 Kudos
Message 3 of 4
(545 Views)

First change the pattern of the connection pane to match:

 

Kyle97330_0-1689007799732.png

Then you need to match the input and outputs for each of the connections.  You can probably copy them off of the front panel of the template VI here:

vi.lib\gmath\NumericalOptimization\LM model function and gradient.vit

Kyle97330_1-1689008061356.png

If you need to do this in the future, the idea is that you would start with that VI template, make a copy in your project, and then modify that VI without changing the connection pane.

0 Kudos
Message 4 of 4
(541 Views)