02-06-2025 03:49 PM
I am trying to get the engineering units of force and moment off of a load cell but can't get the matrix mathematics to work. And If that can be done, have the output displayed on a waveform graph and later save to an excel document for reports.
I have ZERO experience with labview so I'm just trying to get life out of the sensor. I have tried to "transpose" the 1-D array so that it might work in the AxB matrix multiplication VI. In the A portion of the AxB operator is my Calibration matrix and the B input is the signal from the sensor and in the birds nest are array outputs to the front panel to show signals.
I have Error -20039 code off the AxB matrix multiplication.
Solved! Go to Solution.
02-07-2025 01:09 AM - edited 02-07-2025 01:10 AM
Hi DePeppers,
@DePeppers wrote:
I am trying to get the engineering units of force and moment off of a load cell but can't get the matrix mathematics to work.
Why do you need matrix operations to convert a (voltage?) signal to engineering units?
@DePeppers wrote:
I have tried to "transpose" the 1-D array
A 1D array doesn't have any "direction", it is a vector. You are using LabVIEW, not Matlab…
@DePeppers wrote:
In the A portion of the AxB operator is my Calibration matrix and the B input is the signal from the sensor and in the birds nest are array outputs to the front panel to show signals.
I have Error -20039 code off the AxB matrix multiplication.
Can you please downconvert to LV2019 (File->Save for previous) and attach again?
On the error: why don't you read the error explanation? It's pretty clear: "Possible reason(s):
Analysis: (Hex 0xFFFFB1B9) The number of columns in the first matrix is not equal to the number of rows in the second matrix or vector."
(Basic rules for matrix math…)
02-07-2025 02:45 AM
Your "matrix" (actually a 2D array is 11x11 and you are trying to multiply it with a 1D array that has six elements.
(It is a good habit to always resize the array to show one more row/column than the data size or show the scrollbars. Container size has nothing to do with the array size!)
I am pretty sure "reshape array" does not do what you think it does. Do you have a link to a website that explains what you are trying to do with the six voltage values? Makes very little sense. (...and please don't maximize the diagram to the screen)
02-07-2025 03:49 AM
Once the dimension match, there are no more errors.
(I simulate some data with 6 values and take the 6x6 subset of the matrix.
02-10-2025 06:24 AM
Thank you for pointing this out to me. Whenever I had made the 2-D array I had the container indexed to 5 & 5 whenever I had initialized the values. And when I did this I overlooked the autofill of the other cells with values making it automatically an 11x11 matrix.
02-10-2025 07:14 AM
I am trying to create a VI to record data from a sensor. The sensor has three channels for load in lbs. and another three for moment in in-lb.
02-10-2025 10:56 AM
@DePeppers wrote:
I am trying to create a VI to record data from a sensor. The sensor has three channels for load in lbs. and another three for moment in in-lb.
Can you explain the scaling math and the need for linear algebra here?
02-10-2025 11:51 AM - edited 02-10-2025 11:53 AM
@DePeppers wrote:
Thank you for pointing this out to me. Whenever I had made the 2-D array I had the container indexed to 5 & 5 whenever I had initialized the values. And when I did this I overlooked the autofill of the other cells with values making it automatically an 11x11 matrix.
A very important habit for array diagram constant is to resize the container to always show the first invalid row column (OR show the scrollbars if the array is large). An additional problem in your case is that the default value for the element seems to be nonzero (23.7666). Confusing!
02-10-2025 12:37 PM
Thank you for your help. What I had been trying to do was create a VI to record data from a force and torque sensor. But I do not have the right NI module to do that (I have a NI 9205 when something like https://www.ni.com/en-us/shop/category/strain-pressure-and-force.html?srsltid=AfmBOopFfH5VP7_N9VVSMn...
02-10-2025 01:35 PM
Hardware is irrelevant for the math!
I understand that you get six readings.
I am trying to understand the reason for the matrix multiplications. Where do the matrix values come from? What do they mean? How does the result depend on the raw readings?