From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build a matrix while acquiring data from FPGA

I am acquiring an array with 14 elements from FPGA to a VI in RT. In RT I have a while cycle and I use the function Build matrix from the array with a Feedback Node function.

The problem I am facing is that I need to clear some line from this matrix with the Delete from Array Function and it works until the next cycle. In other words, I can erase two lines from the matrix, but because the Feedback Node I think the labview stores the information and replaces again the 2 lines I have just erased.

Is there any other way to do this?

Thank you very much

José Pedro

0 Kudos
Message 1 of 4
(2,406 Views)

Without your code, we can't help much.  Your basic idea is sound (get data from FPGA into RT, process matrix in RT).  You do need either a feedback node or shift register on you WHILE loop in RT to hold the array.  Your data passing mechanism should ensure that you do not try to add or subtract data unless you should.  For example, if you are reading a front panel variable, you need to use an interrupt to tell you when the next data arrives.  Simply polling will give you the last data, but will not tell you when it changes.  I suspect this is your problem, but don't know.

 

Please post your FPGA and RT code (or screenshots/snippets of enough of it) so we can see what you are doing and give you better advice.

0 Kudos
Message 2 of 4
(2,399 Views)

Thank you for your reply.

Please find attached the FPGA and RT code... and I am sorry about the portuguese!

 

The idea was to create the entire matrix in the FPGA, but I think, not sure, that in FPGA I can´t create a matrix, bur only an array.

 

 

Regards

José Pedro

 

Download All
0 Kudos
Message 3 of 4
(2,396 Views)

I don't see code to delete a line from the array, so will guess that it is in the FALSE case of the case statement.  If this is true, then your original assumption is correct.  Your matrix data is contained in the local loop in the wire.  Your indicator is just that, an indicator (as it should be, LabVIEW data is in the wires, not the controls and indicators).  To fix this, move the feedback node outside th case statement and run its wire through both cases.  You can then modify it in different ways in the two cases (add as you do in the shown case, delete in the other) and the changes will persist.

0 Kudos
Message 4 of 4
(2,376 Views)