LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -23034 with fitting on a sphere

Solved!
Go to solution

Dear all,

 

I'm trying to fit measurement data to a circle using the fitting on a sphere VI.

 

The data is 2D and represents approximatly have of the circle perimeter.

 

To use the fit on a sphere, I fed the data as X and Y into the VI and created an array of same dimensions containing 0s for the Z component.

 

However, the result is an error -23034, which is not documented anywhere. There was no error discription when using error cluster from error, nor could I find the code or error description in the forum or on the internet in general.

 

I also checked that all arrays have the same length which was noted in the help page for the fitting on a sphere VI.

 

In terms of data manipulation I tried manually shifting the center of the circle to 0 (the -45 part in the VI) and also doubling the data to get a complete perimeter of the sphere (although I hope this is not a necessary step as I tried fitting actual half circles with the VI and I had no problems).

Also I I created a little circle drawing section to see if my data was off from an actual circle which it doesn't seem to be. At least not by much.

 

 

Therefore my question is, what is the meaning of the error and what did I do wrong? I can't think of any reason anymore why I would get this persistant error with the data. So maybe there is something wrong with the data itself, like it has to be ordered in some way?

 

I would be grateful for any advice.

 

BR Kiwi

0 Kudos
Message 1 of 3
(1,175 Views)

Hi Kiwi,

 

look inside the "Fitting on a sphere" function: you get error -23034, when the SolveLinearEquations function outputs an error…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,141 Views)
Solution
Accepted by topic author Kiwi6

Thanks for the answer, I figured it out.

 

So if anyone runs in the same problem, there were a bunch of NaN in the output of the sensor, mixed in the measurement data, probably when the sensor couldn't determine a valid measurement value. This resulted in the block, which calculates the mean of the input throwing a bunch of NaN in turn which didn't work for the linear equation solver, hence the error code.

 

I debugged it by copying the content of the fitting on a sphere to a new VI which let me probe the problem, as fitting on a sphere only opens a clone of the VI which means probes don't work.

 

From there I worked backwards until I found the faulty input and the reason for the problem.

 

BR Kiwi

0 Kudos
Message 3 of 3
(1,110 Views)