LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Coercion dot on LabVIEW FPGA Matrix*vector block

Solved!
Go to solution

Greetings, 

 

I cannot get a coercion dot on a bit of LabVIEW FPGA code to go away. The dot is on the input to the matrix*vector block

Austin-Downey_0-1622051145450.png

Before it, I have an FXP conversion to set the FXP word lengths,  

Austin-Downey_1-1622051191722.png

These line up with what is selected in the matrix multiply vector form (the are both FXP of 32, 16). The code that loads the values into the A matrix is also set at FXP 32,16. 

Austin-Downey_2-1622051269615.png

Lastly, on the right-hand side of the code, I have another matrix*vector also with an FXP conversion right before it in a for loop, but that one is working just fine. 

a.png

Any idea on what is causing this coercion dot?  I have also attached the code if this helps. 

 

Thanks in advance! 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 3
(676 Views)

I have continued to work on this problem and I think my issue is the fact that I am deleting an element from, and adding an element to my array. This changes the size of my array and LabVIEW does not know how to handle this. See the code below (and attached). See the attached code, the for loop on the bottom does not have coercion dots, but the one on top has 2 (one on the shift register, one at the matrix-vector multiply). I suspect this is because the size of the array goes from 50 to 49 to 50 during the element shift.

 

thumbnail_target code.png

 

I was told maybe coercion dot is correcting the size of the array rather than shifting the element type? However, I don't see that functionality in this info page about coercion dots. 

 

https://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/coercion_dots/

 

Is there a better way to shift all the elements in an array up (or down) and place a new element at the end (start) of the array? I would like to get rid of the coercion dot so I can move forward without worrying about future side effects. 

 

 

 

0 Kudos
Message 2 of 3
(557 Views)
Solution
Accepted by topic author Austin-Downey

I think I figured it out, flipping the insert array and delete array functions seems to fix it. For some reason, having the array change in size from 50, to 51 back to 50 is OK, but 50-49-50 is not. I even tried to just insert an array, but this results in a shift register that cannot resolve its size. 

target code.png

0 Kudos
Message 3 of 3
(551 Views)