ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

constrained optimization - function conflict and error 91?

I am a fresh hand on Labview. I tried to use the constrained optimization approach for curve fitting, which unformately leads to the following errors.
1. "error 91".
 
I build the objective function (subvi1.vi) using "cno_objective function template.vit". When I tried to run it, an error message "error 91" pups up.

2. "function conflict"

When I tried to link the objective function (subvi1.vi) to the constrained nonlinear optimization block, the link is always broken, saying "function conflict".

Any help and comments are appreciated. Thanks!

 

 
 
 
Download All
0 Kudos
Message 1 of 2
(2,563 Views)
Hey guest,

I checked your VIs and might have a few suggestions for you in using the constrained optimization.  First of all error 91 is usually a variant error.  It has the following text: "The data type of the variant is not compatible with the data type wired to the type input."  I believe you get this error since you don't have any data in the variant in the subVI, so it doesn't know how to translate that into a cluster.

The broken wire you are seeing is due to there not being any connections made on the Connector Pane.  To link inputs and outputs of subVIs you need to first configure the Connector Pane by right-clicking on the icon and selecting Show Connector and then wiring the controls and indicators to terminals there.  I would suggest checking out the example for this VI, which you can then use for your application.  If you open the context help (Ctrl+H) and then hover over the VI you want and then click the detailed help link.  This will bring up the help file for this VI.  At the bottom there should be a button for Open Example. You could also find it in the Example Finder (Help >> Find Examples)

You mentioned that you are fairly new at LabVIEW, so I wanted to point you toward a good tutorial for beginners called Learn LabVIEW in 6 Hours.  This should give you a good general overview of what LabVIEW can do.  Please let me know if you have any further questions!

Thanks!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 2 of 2
(2,549 Views)