06-06-2018 01:08 PM
Hi there,
Actually i am having a trouble to initialize a shift register, so my purpose is that like the following:
i am having a matrix within a for loop and in each iteration it has a proper value, so all what i need is to multiply all these matrix with each others. i though about using a shift register but it must initialized cause the first iteration might be the first matrix times the identity matrix.
i am willing to hear any other manner that serve the same purpose or how to initialize the register.
Please check the picture below for further illustration.
Thanks
06-06-2018 01:18 PM
That inner FOR loop looks like it is not needed at all. All you are doing is multiplying a 2D array with itself 6 times. I think you need the shift register on the outer loop. If you know the size of the matrix, then initialize with the identity matrix. If you do not know the size, then initialize to an empty array. On the first iteration (i = 0) set the value to the current value. Subsequent iterations perform the multiplication.
06-06-2018 01:40 PM - edited 06-06-2018 01:46 PM
We don't debug pictures, so please attach the VI and subVIs.
I would recommend a few simple tutorials on LabVIEW and dataflow, because there are some glaring weird code constructs, for example:
Again please attach the VI and explain what it is supposed to do.
06-06-2018 01:49 PM
Thanks, i am glad to hear such tremendous response thanks.
Okay i will attach the VI below as well as for the whole post.
all what i want is to multiply all that matrix with each other like H06=H01*H02*H03*H0i....
Thanks
06-06-2018 01:57 PM
@DALIXX wrote:
all what i want is to multiply all that matrix with each other like H06=H01*H02*H03*H0i....
As I said, you don't have a "matrix", just a 2D array. If you want real matrix multiplication, you need to change things. Multiplications on arrays are "element by element", while matrix multiplications are very different. So what is it?
06-06-2018 02:46 PM
Here's how you would do it using matrix multiplications. Of course order matters so switch the multiplication inputs if needed. I am sure the mathscript node could be easily replaced by plain G code.
This is just a quick draft, check for errors and things... No guarantees.
If you want plain multiplications, modify as needed. Should be trivial to change.
(Of course you don't need the delays and indicators in the FOR loop, but I left them in to aid in debugging)
06-07-2018 10:09 AM
Thanks,
Your kindly gesture it's deeply appreciated,
You gave me the clue to solve my problem and i did,
So now my issue is that i need to use all that code to generate the inverse kinematic using the Robotic Solver.
May you please check the attachments below for what i did and what i am willing to do.
Regards.
06-07-2018 11:30 AM - edited 06-07-2018 11:31 AM
Sorry, I don't have the robotics module. Cannot help further.
06-07-2018 11:42 AM
Please keep it all in one place. Continued here.