From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Non linear curve fiting Poly VI_Gmath.lvb:Nonlinear Curve Fit.vi is not executable

Hi,

 

 

Description of intended function:

Given position as a function of time, I am attempting to calculate the powerspectrum of the object in motion, then "block" the data (smooth it by replacing n consecutive elements of data with the average of those n elements), lastly I need to apply a curve fit to the blocked power spectrum. However the code will not run, saying there is an internal problem to the curve fitting VI. speciffically, the error list says: 

 

Poly VI 'NI_Gmath.llvlib:Nonlinear Curve Fit.VI': SubVI is not executable

Poly VI'NI_Gmath.lvlib:Nonlinear Curve Fit.vi': Polymorphic subVI is broken

 

Attached is the program, it can be run from the "main pannel.vi" file. The test.dat file is the data I've been using for testing

 

 

This is my first post to the NI forum, so I'll pre-emptively appologize if this is in the wrong place.

 

Thanks, 

Sam

Download All
0 Kudos
Message 1 of 3
(2,374 Views)

Your VI is full of race conditions due to overuse of local varaibles. For example there is no guarantee that "df" gets a valid value in the FOR loop before the code above it writes to the "df" local variable. Eliminate all these locals and hidden controls and just use a plain wire. (same in the subVI).

 

I haven't look at your data yet.

 

You also need to retain useful default values, for example for the model description, before you attach a VI. These fields are currently blank.

 

Code looks quite convoluted in places.... Why don't you connect the erorr out to the fitting VI? The output size of the subVI might not be as expected since you do a division and rounding for the loop count.

0 Kudos
Message 2 of 3
(2,356 Views)

Ok, thank you very much. I'll try fixing that.

0 Kudos
Message 3 of 3
(2,351 Views)