12-05-2020 08:56 AM
In LabVIEW, I have a problem where I try to solve four linear equations with "linearsolve" command. I have two input signals from the DAQ assistant which I convert from a dynamic system to a numeric array.
When I try to solve the equations in the Mathscript it says "Error -90051 occurred at Error in function linearsolve at line 13: You specified an invalid number of input parameters for this function."
I have not been able to find help anywhere in other forums other than one place where it suddenly worked again.
I have attached a picture of the block diagram and the error.
Hope someone can help me solve this problem.
12-05-2020 09:21 AM
Showing us a picture of your code that we cannot modify, or try to run ourselves, makes it more difficult for us to help you (imagine that I asked you for help with a Matlab routine and attached a picture of a 3-page printout of its listing).
Attach your VI!
The error message suggests the problem is in "linearsolve", whatever that is. Have you looked into that?
Bob Schor
12-05-2020 01:14 PM - edited 12-05-2020 01:57 PM
Some of your parameters seem to have higher dimensions. What are you actually trying to achieve with all this? Can you take a step back and explain what the data represents and what you are trying to get out of it? I doubt that you need to use mathscript at all. (hint!)
Did you look at the help page for the function?
Why did you wire charts to the 2D array output? Why are there so many coercion dots? Do you know the difference between charts and graphs?
12-06-2020 04:43 AM
Oh sorry about that. The VI is attached now.
Yes, we have looked into the linearsolve, but we can't seem to figure out what the problem is. We are trying to solve the four equations with four unknowns, and linearsolve is the only function that solves linear equations as far as I understand.
Oscar Lyhne
12-06-2020 04:56 AM
We are trying to do forward kinematics for a two-dimensional platform. We have a potentiometer output in voltage which we are converting to an mm output, which is why we have the coercion dots. These two lengths are the input for the mathscript.
The output is then the angle and movement in the y-direction of the platform.
As I understand the mathscript has to have a numeric input which is why we are converting the dynamic data.
The VI is attached to the answer from Bob.
I am really grateful for the help from both of you, but I am quite new at LabView so I really appreciate your help!
12-06-2020 03:49 PM
I don't have MathScript installed, and I don't know what "linearsolve" does nor what its parameters mean -- the error you are seeing suggests that you are calling it improperly.
There are equation-solvers and curve-fitters in LabVIEW that don't require "mystery functions".
Bob Schor