10-20-2022 10:03 AM
Hello
I have a simple question about saving a variable at different times as an array in a text file in LabVIEW FPGA. You can find my code and a screenshot of it attached. I will explain the relevant part of the code:
I have an infinite outer loop; inside this loop, I have an inner loop that is executed until some conditions (it doesn't matter what conditions) are satisfied. However, I want to save the iteration of the inner loop at which the condition is satisfied (The value of the final iteration of the inner loop). Ultimately, I want to output a text file containing values of the last loop iteration every time it comes into this loop. How should I do it?
In Labview, it is possible to write data to a text-based spreadsheet file. But I did not find this option in Labview FPGA!
I appreciate your help.
Sincerely,
Majid
10-20-2022 10:24 AM
Because there is no storage space or file system on the FPGA. If you need to save the data, you need to send it to the host and let the host save it to a file.
10-20-2022 11:07 AM
Hi Santhosh
Thanks for your comment.
May you explain how I can send the data to the host?
Bests,
Majid
10-20-2022 11:12 AM
This is a good article to get started,
10-21-2022 02:32 PM
Dear Santhosh
Thanks for your helpful comment.
I created a host VI and sent the loop number through the DMA FIFO method to host VI. But I can not write this data into a text file!
My data are integer numbers, but the "Write to Text File" function only accepts strings! I use the Format into String Function to convert each integer value into a string, but it makes an error.
(The error says: The type of the source is 1D array of unsigned long [32-bit integer (0 to 4,294,967,295)]. The type of the sink is unsigned long [32-bit integer (0 to 4,294,967,295)]. )
How should I do it?
The picture of my codes is attached.
Kind regards,
Majid